wm: dnsparser

Download patch

ref: 74185653ad7928a482a46eb125f2a630c5049d5a
parent: 9e35e49da5672f8f5f5fadb23fa06c2106407690
author: mkf <mkf@cloud9p.org>
date: Wed Jul 31 03:42:29 EDT 2024

dnsparser.c: minor changes

--- a/dnsparser.c
+++ b/dnsparser.c
@@ -600,7 +600,7 @@
 		head += 2; /* there is a dns-over-tcp len field we ignore */
 	}
 	else
-		err(1, "unknown proto: %d", p.proto);
+		err(1, "dns_reader(): unknown proto: %d", p.proto);
 	
 	if(debug)
 	{
@@ -634,7 +634,7 @@
 main(int argc, char **argv)
 {
 	if(argc != 2)
-		err(1, "not enough arguments");
+		err(1, "%s: usage: %s file.pcap", argv[0], argv[0]);
 
 	pcap_init(PCAP_CHAR_ENC_LOCAL, errbuf);
 	handle = pcap_open_offline(argv[1], errbuf);