From: Remi Gacogne Date: Fri, 13 Mar 2020 15:58:29 +0000 (+0100) Subject: sdig: Document Proxy Protocol options X-Git-Tag: dnsdist-1.5.0-alpha1~12^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc3d516df386f727d29efa6c599e433a8971ffcc;p=thirdparty%2Fpdns.git sdig: Document Proxy Protocol options --- diff --git a/docs/manpages/sdig.1.rst b/docs/manpages/sdig.1.rst index d355c71b5d..a2a89d0a15 100644 --- a/docs/manpages/sdig.1.rst +++ b/docs/manpages/sdig.1.rst @@ -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 diff --git a/pdns/sdig.cc b/pdns/sdig.cc index 1ef4520c11..c1baff02d6 100644 --- a/pdns/sdig.cc +++ b/pdns/sdig.cc @@ -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; }