]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Comments in .proto file
authorOtto <otto.moerbeek@open-xchange.com>
Wed, 15 Sep 2021 08:10:26 +0000 (10:10 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 13 Oct 2021 12:33:17 +0000 (14:33 +0200)
pdns/dnsmessage.proto
pdns/recursordist/rec-eventtrace.cc
pdns/recursordist/rec-eventtrace.hh

index 48eb0af96bcb8d2c84f79b7b57d3cf737a0344ac..5a80267383b599a3d5bb60e5e998c1a99dbf6eec 100644 (file)
@@ -127,13 +127,13 @@ message PBDNSMessage {
   }
   repeated Meta meta = 22;                      // Arbitrary meta-data - to be used in future rather than adding new fields all the time
 
+  // The well known EventTrace event numbers
   enum EventType {
-    RecRecv = 1;
-    DistPipe = 2;
-    PCacheCheck = 3;
-    SyncRes = 4;
-    AnswerSent = 5;
-    LuaGetTag = 100;
+    RecRecv = 1;                                // A request was received by the recursor process
+    PCacheCheck = 2;                            // A packet cache check was initiated or completed; value: bool cacheHit
+    SyncRes = 3;                                // Syncres main function has started or completed; value: int rcode
+    AnswerSent = 4;                             // The answer was sent to the client
+    LuaGetTag = 100;                            // Events below mark start or end of Lua hook calls; value: return value of hook
     LuaGetTagFFI = 101;
     LuaIPFilter = 102;
     LuaPreRPZ = 103;
@@ -143,12 +143,12 @@ message PBDNSMessage {
     LuaNoData = 107;
     LuaNXDomain = 108;
   }
-  
+
   message Event {
-    required uint64 ts = 1;
-    required EventType event = 2;
-    required bool start = 3;
-    optional bool boolVal = 4;
+    required uint64 ts = 1;                     // Timestamp in ns relative to time of creation of event trace data structure
+    required EventType event = 2;               // Type of event
+    required bool start = 3;                    // true for "start" events, false for "completed" events
+    optional bool boolVal = 4;                  // Below are optional values associated with events
     optional int64 intVal = 5;
     optional string stringVal = 6;
     optional bytes bytesVal = 7;
index 35330cf1032209d8439645c33e1fd485b1d86050..c2d04c46abd151a399ac8802a1c15bf20987b9d6 100644 (file)
@@ -28,7 +28,6 @@
 
 const std::unordered_map<RecEventTrace::EventType, std::string> RecEventTrace::s_eventNames = {
   NameEntry(RecRecv),
-  NameEntry(DistPipe),
   NameEntry(PCacheCheck),
   NameEntry(SyncRes),
   NameEntry(AnswerSent),
index 62cc6b612a333b2cc370c84903aed18be59ad7c1..55bf79eec334128af4fc727f78a8f5c9ba2cab1c 100644 (file)
@@ -38,10 +38,9 @@ public:
   {
     // Don't forget to add a new entry to the table in the .cc file!
     RecRecv = 1,
-    DistPipe = 2,
-    PCacheCheck = 3,
-    SyncRes = 4,
-    AnswerSent = 5,
+    PCacheCheck = 2,
+    SyncRes = 3,
+    AnswerSent = 4,
     LuaGetTag = 100,
     LuaGetTagFFI = 101,
     LuaIPFilter = 102,
@@ -86,7 +85,7 @@ public:
     return *this;
   }
 
-  // We distinguisg beteen string and byres. Does not amtter in C++, but in Go, .Java etc it does
+  // We distinguish between strings and byte arrays. Does not matter in C++, but in Go, Java etc it does
   typedef std::variant<std::nullopt_t, bool, int64_t, std::string, PacketBuffer> Value_t;
 
   static std::string toString(const EventType v)