From: Michael Orlitzky Date: Fri, 16 Sep 2022 19:13:39 +0000 (-0400) Subject: bin/djbdns-logparse.py: improve existing decode_* docs. X-Git-Tag: 0.0.1~28 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=djbdns-logparse.git;a=commitdiff_plain;h=de12ad5e5f817fd2c4f0de3dde29438ce832eefe bin/djbdns-logparse.py: improve existing decode_* docs. --- diff --git a/bin/djbdns-logparse.py b/bin/djbdns-logparse.py index 5262fe0..0abd5bc 100755 --- a/bin/djbdns-logparse.py +++ b/bin/djbdns-logparse.py @@ -125,6 +125,9 @@ def decode_client(words : list, i : int): 1. clientip:clientport, used by tcpopen/tcpclose entries, 2. clientip:clientport:id, used by "query" entries. + We convert each part from hex to decimal, and in the second + format, separate the packet id from the client information. + Parameters ---------- @@ -172,7 +175,7 @@ def decode_ip(words : list, i : int): entry. A single "serverip" field is present in the lame, nodata, - nxdomain, and rr entry types. + nxdomain, and rr entry types. We convert it from hex to decimal. Parameters ---------- @@ -202,7 +205,6 @@ def decode_ip(words : list, i : int): >>> decode_ip(words, 1) >>> words ['foo', '0000:0000:0000:0000:0000:ffff:7f00:0001', 'bar', 'quux'] - """ words[i] = convert_ip(words[i]) @@ -212,7 +214,8 @@ def decode_ttl(words : list, i : int): entry. A single "ttl" field is present in the nodata, nxdomain, and - rr entry types. + rr entry types. We prefix it with "TTL=" so that its meaning + is clear in the human-readable logs. Parameters ----------