diff options
author | fenner <fenner@FreeBSD.org> | 1996-01-19 01:29:46 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1996-01-19 01:29:46 +0000 |
commit | 61b348c119a4137e3e7927cb6ec1485cb2088535 (patch) | |
tree | 1f27d8853a91964d98d0979caa6bedbf5ea5e33d /usr.sbin | |
parent | 83b323c8bd36c10521fce66c79e1ddb594f4712c (diff) | |
download | FreeBSD-src-61b348c119a4137e3e7927cb6ec1485cb2088535.zip FreeBSD-src-61b348c119a4137e3e7927cb6ec1485cb2088535.tar.gz |
Teach tcpdump to print out router advertisement and solicitation messages.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tcpdump/tcpdump/print-icmp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/tcpdump/tcpdump/print-icmp.c b/usr.sbin/tcpdump/tcpdump/print-icmp.c index ccd3156..6bd9ac4 100644 --- a/usr.sbin/tcpdump/tcpdump/print-icmp.c +++ b/usr.sbin/tcpdump/tcpdump/print-icmp.c @@ -21,7 +21,7 @@ #ifndef lint static char rcsid[] = - "@(#) $Header: print-icmp.c,v 1.20 94/06/14 20:17:39 leres Exp $ (LBL)"; + "@(#) $Header: /home/ncvs/src/usr.sbin/tcpdump/tcpdump/print-icmp.c,v 1.2 1995/03/08 12:52:32 olah Exp $ (LBL)"; #endif #include <sys/param.h> @@ -162,6 +162,13 @@ icmp_print(register const u_char *bp, register const u_char *bp2) case ICMP_ECHO: str = "echo request"; break; + case ICMP_ROUTERADVERT: + (void)sprintf(buf, "router advert, %d rtrs, lifetime %d", + dp->icmp_num_addrs, ntohs(dp->icmp_lifetime)); + break; + case ICMP_ROUTERSOLICIT: + str = "router solicitation"; + break; case ICMP_TIMXCEED: TCHECK(dp->icmp_ip.ip_dst, sizeof(dp->icmp_ip.ip_dst)); switch (dp->icmp_code) { |