summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2010-08-04 16:47:02 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2010-08-04 16:47:02 +0000
commit6aa706e08f999cdcd4465cbc813ddd85d0491b0b (patch)
tree1c1c6fcf0d49f12930ac7b38189eeb84c22af744 /usr.sbin/tcpdump
parent65e27e22c35cb5035dd3a1731064c58854b36e33 (diff)
Print the MTU in OSPF dd packets. Borrowed from the ospf6 printer.
ok claudio@ deraadt@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/ospf.h4
-rw-r--r--usr.sbin/tcpdump/print-ospf.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/ospf.h b/usr.sbin/tcpdump/ospf.h
index 3013eb96a4f..007d1e26e26 100644
--- a/usr.sbin/tcpdump/ospf.h
+++ b/usr.sbin/tcpdump/ospf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf.h,v 1.9 2007/06/14 03:23:49 reyk Exp $ */
+/* $OpenBSD: ospf.h,v 1.10 2010/08/04 16:47:01 sthen Exp $ */
/*
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
@@ -193,7 +193,7 @@ struct ospfhdr {
/* Database Description packet */
struct {
- u_char db_zero[2];
+ u_int16_t db_mtu;
u_char db_options;
u_char db_flags;
u_int32_t db_seq;
diff --git a/usr.sbin/tcpdump/print-ospf.c b/usr.sbin/tcpdump/print-ospf.c
index a69898c3ded..bd25bb0657d 100644
--- a/usr.sbin/tcpdump/print-ospf.c
+++ b/usr.sbin/tcpdump/print-ospf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ospf.c,v 1.14 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-ospf.c,v 1.15 2010/08/04 16:47:01 sthen Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
@@ -425,7 +425,8 @@ ospf_decode_v2(register const struct ospfhdr *op,
sep = '/';
}
TCHECK(op->ospf_db.db_seq);
- printf(" S %X", (u_int32_t)ntohl(op->ospf_db.db_seq));
+ printf(" mtu %u S %X", ntohs(op->ospf_db.db_mtu),
+ (u_int32_t)ntohl(op->ospf_db.db_seq));
if (vflag) {
/* Print all the LS adv's */