]> The Tcpdump Group git mirrors - tcpdump/commitdiff
dissect traffic on port 5353 as multicast DNS. [email protected]
authoritojun <itojun>
Fri, 16 Aug 2002 22:40:33 +0000 (22:40 +0000)
committeritojun <itojun>
Fri, 16 Aug 2002 22:40:33 +0000 (22:40 +0000)
nameser.h
print-tcp.c
print-udp.c

index 60e1dcbbd7a5b36b42e67c07e78437bb0e507d36..ae5c4c321195c47c826d58963b959dde5eb5407f 100644 (file)
--- a/nameser.h
+++ b/nameser.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.10 2002-06-11 17:08:40 itojun Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.11 2002-08-16 22:40:33 itojun Exp $ (LBL) */
 /*
  * Copyright (c) 1983, 1989, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -75,6 +75,7 @@
  * Internet nameserver port number
  */
 #define NAMESERVER_PORT        53
+#define MULTICASTDNS_PORT      5353
 
 /*
  * Currently defined opcodes
index 21d855ed72b1a38b508e73ea4d3090a8f6e34287..8992e64de82fa41e03ddd9616746a205ecce5dd7 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.98 2002-08-01 08:53:31 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.99 2002-08-16 22:40:33 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -606,7 +606,8 @@ tcp_print(register const u_char *bp, register u_int length,
                else if (sport == BEEP_PORT || dport == BEEP_PORT)
                        beep_print(bp, length);
                else if (length > 2 &&
-                   (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT)) {
+                   (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
+                    sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) {
                        /*
                         * TCP DNS query has 2byte length at the head.
                         * XXX packet could be unaligned, it can go strange
index 9c91d429b682eb3677427c6e3ed24fed37f9750d..cd49a151a44d6e5d41388694d3fd684a78244395 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.106 2002-08-01 08:53:33 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.107 2002-08-16 22:40:34 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -594,7 +594,7 @@ udp_print(register const u_char *bp, u_int length,
 
        if (!qflag) {
 #define ISPORT(p) (dport == (p) || sport == (p))
-               if (ISPORT(NAMESERVER_PORT))
+               if (ISPORT(NAMESERVER_PORT) || ISPORT(MULTICASTDNS_PORT))
                        ns_print((const u_char *)(up + 1), length);
                else if (ISPORT(TIMED_PORT))
                        timed_print((const u_char *)(up + 1), length);