Teach tcpdump to print out router advertisement and solicitation messages.

This commit is contained in:
Bill Fenner 1996-01-19 01:29:46 +00:00
parent f78623a989
commit 5e26f56623
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13488

View File

@ -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) {