]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsmessage.proto
auth: switch circleci mssql image
[thirdparty/pdns.git] / pdns / dnsmessage.proto
index d64de370c8270b4a3ca23a0ce7351f26d7d7ddd1..a460b51f3cd09ca2f404252dcdad0f0a7ccf06e2 100644 (file)
@@ -36,9 +36,17 @@ message PBDNSMessage {
     UDP = 1;                                    // User Datagram Protocol (RFC 768)
     TCP = 2;                                    // Transmission Control Protocol (RFC 793)
   }
+  enum PolicyType {
+    UNKNOWN = 1;                                // No policy applied, or unknown type
+    QNAME = 2;                                  // Policy matched on the QName
+    CLIENTIP = 3;                               // Policy matched on the client IP
+    RESPONSEIP = 4;                             // Policy matched on one of the IPs contained in the answer
+    NSDNAME = 5;                                // Policy matched on the name of one nameserver involved
+    NSIP = 6;                                   // Policy matched on the IP of one nameserver involved
+  }
   required Type type = 1;
   optional bytes messageId = 2;                 // UUID, shared by the query and the response
-  optional bytes serverIdentity = 3;            // UUID of the server emitting the protobuf message
+  optional bytes serverIdentity = 3;            // ID of the server emitting the protobuf message
   optional SocketFamily socketFamily = 4;
   optional SocketProtocol socketProtocol = 5;
   optional bytes from = 6;                      // DNS requestor (client)
@@ -62,6 +70,7 @@ message PBDNSMessage {
       optional uint32 class = 3;
       optional uint32 ttl = 4;
       optional bytes rdata = 5;
+      optional bool  udr = 6;                   // True if this is the first time this RR has been seen for this question
     }
     optional uint32 rcode = 1;
     repeated DNSRR rrs = 2;
@@ -69,10 +78,13 @@ message PBDNSMessage {
     repeated string tags = 4;                   // Additional tags
     optional uint32 queryTimeSec = 5;           // Time of the corresponding query reception (seconds since epoch)
     optional uint32 queryTimeUsec = 6;          // Time of the corresponding query reception (additional micro-seconds)
+    optional PolicyType appliedPolicyType = 7;  // Type of the filtering policy (RPZ or Lua) applied
   }
 
   optional DNSResponse response = 13;
   optional bytes originalRequestorSubnet = 14;  // EDNS Client Subnet value
   optional string requestorId = 15;             // Username of the requestor
   optional bytes initialRequestId = 16;         // UUID of the incoming query that initiated this outgoing query or incoming response
+  optional bytes deviceId = 17;                // Device ID of the requestor (could be mac address IP address or e.g. IMEI)
+  optional bool  newlyObservedDomain = 18;      // True if the domain has not been seen before
 }