]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
sdig: Document Proxy Protocol options
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Mar 2020 15:58:29 +0000 (16:58 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 17 Mar 2020 13:12:56 +0000 (14:12 +0100)
docs/manpages/sdig.1.rst
pdns/sdig.cc

index d355c71b5d9df72915f1d1221e6e1b9353a7a50f..a2a89d0a150e26878f203d7410d257e33adbb485 100644 (file)
@@ -32,7 +32,7 @@ hidesoadetails
 hidettl
     Replace TTLs with `[ttl]` in the response.
 proxy *TCP?* *SRC* *DST*
-    Wrap query in PROXYv2 protocol with these parameters.
+    Wrap query in PROXYv2 protocol with these parameters. The first parameter accepts 0 for UDP and 1 for TCP. The second and third take IP addresses and port.
 recurse
     Set the RD bit in the question.
 showflags
index 1ef4520c11588db0fcae3eebe512379c80cabc2e..c1baff02d662a11bcf97f8739226debf0dee1a87 100644 (file)
@@ -18,9 +18,9 @@
 
 StatBag S;
 
-bool hidettl = false;
+static bool hidettl = false;
 
-string ttl(uint32_t ttl)
+static string ttl(uint32_t ttl)
 {
   if (hidettl)
     return "[ttl]";
@@ -28,13 +28,13 @@ string ttl(uint32_t ttl)
     return std::to_string(ttl);
 }
 
-void usage()
+static void usage()
 {
   cerr << "sdig" << endl;
   cerr << "Syntax: sdig IP-ADDRESS-OR-DOH-URL PORT QNAME QTYPE "
           "[dnssec] [ednssubnet SUBNET/MASK] [hidesoadetails] [hidettl] "
           "[recurse] [showflags] [tcp] [xpf XPFDATA] [class CLASSNUM] "
-          "[proxy PROXYDATA]"
+          "[proxy UDP(0)/TCP(1) SOURCE-IP-ADDRESS-AND-PORT DESTINATION-IP-ADDRESS-AND-PORT]"
        << endl;
 }