Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/tcpdump decode mdns/llmnr packet (port 5353). sync w/ ...
details: https://anonhg.NetBSD.org/src/rev/2b6df6067661
branches: trunk
changeset: 536160:2b6df6067661
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Sep 10 01:47:31 2002 +0000
description:
decode mdns/llmnr packet (port 5353). sync w/ tcpdump.org
diffstat:
dist/tcpdump/nameser.h | 5 +++--
dist/tcpdump/print-tcp.c | 7 ++++---
dist/tcpdump/print-udp.c | 6 +++---
3 files changed, 10 insertions(+), 8 deletions(-)
diffs (81 lines):
diff -r c6dc5e62036d -r 2b6df6067661 dist/tcpdump/nameser.h
--- a/dist/tcpdump/nameser.h Tue Sep 10 00:52:37 2002 +0000
+++ b/dist/tcpdump/nameser.h Tue Sep 10 01:47:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nameser.h,v 1.1.1.2 2002/02/18 09:07:40 itojun Exp $ */
+/* $NetBSD: nameser.h,v 1.2 2002/09/10 01:47:31 itojun Exp $ */
/* @(#) Header: /tcpdump/master/tcpdump/nameser.h,v 1.9 2001/06/27 05:40:16 guy Exp (LBL) */
/*
@@ -77,6 +77,7 @@
* Internet nameserver port number
*/
#define NAMESERVER_PORT 53
+#define MULTICASTDNS_PORT 5353
/*
* Currently defined opcodes
@@ -233,7 +234,7 @@
*/
#define INDIR_MASK 0xc0 /* 11.... */
#define EDNS0_MASK 0x40 /* 01.... */
-# define EDNS0_ELT_BITLABEL 0x01
+# define EDNS0_ELT_BITLABEL 0x01
/*
* Structure for passing resource records around.
diff -r c6dc5e62036d -r 2b6df6067661 dist/tcpdump/print-tcp.c
--- a/dist/tcpdump/print-tcp.c Tue Sep 10 00:52:37 2002 +0000
+++ b/dist/tcpdump/print-tcp.c Tue Sep 10 01:47:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print-tcp.c,v 1.4 2002/02/18 09:37:10 itojun Exp $ */
+/* $NetBSD: print-tcp.c,v 1.5 2002/09/10 01:47:31 itojun Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
static const char rcsid[] =
"@(#) Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.95 2001/12/10 08:21:24 guy Exp (LBL)";
#else
-__RCSID("$NetBSD: print-tcp.c,v 1.4 2002/02/18 09:37:10 itojun Exp $");
+__RCSID("$NetBSD: print-tcp.c,v 1.5 2002/09/10 01:47:31 itojun Exp $");
#endif
#endif
@@ -613,7 +613,8 @@
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
diff -r c6dc5e62036d -r 2b6df6067661 dist/tcpdump/print-udp.c
--- a/dist/tcpdump/print-udp.c Tue Sep 10 00:52:37 2002 +0000
+++ b/dist/tcpdump/print-udp.c Tue Sep 10 01:47:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print-udp.c,v 1.5 2002/05/31 09:45:46 itojun Exp $ */
+/* $NetBSD: print-udp.c,v 1.6 2002/09/10 01:47:31 itojun Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
static const char rcsid[] =
"@(#) Header: /tcpdump/master/tcpdump/print-udp.c,v 1.103 2001/12/03 02:06:10 itojun Exp (LBL)";
#else
-__RCSID("$NetBSD: print-udp.c,v 1.5 2002/05/31 09:45:46 itojun Exp $");
+__RCSID("$NetBSD: print-udp.c,v 1.6 2002/09/10 01:47:31 itojun Exp $");
#endif
#endif
@@ -601,7 +601,7 @@
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);
Home |
Main Index |
Thread Index |
Old Index