From: sthen Date: Wed, 4 Aug 2010 16:47:01 +0000 (+0000) Subject: Print the MTU in OSPF dd packets. Borrowed from the ospf6 printer. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f54425a5b1009f2236690b07776e6dd6cbc87cdc;p=openbsd Print the MTU in OSPF dd packets. Borrowed from the ospf6 printer. ok claudio@ deraadt@ --- 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 */