diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | ipproto.c | 58 | ||||
-rw-r--r-- | ipproto.h | 8 |
3 files changed, 65 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 44cb4b8e..16fceeb8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,7 +17,7 @@ # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.284 2004-04-19 21:17:15 hannes Exp $ (LBL) +# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.285 2004-04-26 17:49:44 hannes Exp $ (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -65,7 +65,7 @@ INSTALL_DATA = @INSTALL_DATA@ @rm -f $@ $(CC) $(CFLAGS) -c $(srcdir)/$*.c -CSRC = addrtoname.c gmpls.c oui.c gmt2local.c machdep.c parsenfsfh.c \ +CSRC = addrtoname.c gmpls.c oui.c gmt2local.c ipproto.c machdep.c parsenfsfh.c \ print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \ diff --git a/ipproto.c b/ipproto.c new file mode 100755 index 00000000..100c23ee --- /dev/null +++ b/ipproto.c @@ -0,0 +1,58 @@ +/* + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code + * distributions retain the above copyright notice and this paragraph + * in its entirety, and (2) distributions including binary code include + * the above copyright notice and this paragraph in its entirety in + * the documentation or other materials provided with the distribution. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND + * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT + * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE. + * + * Original code by Hannes Gredler (hannes@juniper.net) + */ + +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.1 2004-04-26 17:49:44 hannes Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <tcpdump-stdinc.h> + +#include "ipproto.h" +#include "interface.h" + +struct tok ipproto_values[] = { + { IPPROTO_HOPOPTS, "Options" }, + { IPPROTO_ICMP, "ICMP" }, + { IPPROTO_IGMP, "IGMP" }, + { IPPROTO_IPV4, "IPIP" }, + { IPPROTO_TCP, "TCP" }, + { IPPROTO_EGP, "EGP" }, + { IPPROTO_IGRP, "IGRP" }, + { IPPROTO_UDP, "UDP" }, + { IPPROTO_IPV6, "IPv6" }, + { IPPROTO_ROUTING, "Routing" }, + { IPPROTO_FRAGMENT, "Fragment" }, + { IPPROTO_RSVP, "RSVP" }, + { IPPROTO_GRE, "GRE" }, + { IPPROTO_ESP, "ESP" }, + { IPPROTO_AH, "AH" }, + { IPPROTO_MOBILE, "Mobile IP" }, + { IPPROTO_ICMPV6, "ICMPv6" }, + { IPPROTO_MOBILITY_OLD, "Mobile IP (old)" }, + { IPPROTO_EIGRP, "EIGRP" }, + { IPPROTO_OSPF, "OSPF" }, + { IPPROTO_PIM, "PIM" }, + { IPPROTO_IPCOMP, "Compressed IP" }, + { IPPROTO_VRRP, "VRRP" }, + { IPPROTO_SCTP, "STCP" }, + { IPPROTO_MOBILITY, "Mobility" }, + { 0, NULL } +}; + @@ -30,13 +30,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.2 2003-11-24 20:30:51 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.3 2004-04-26 17:49:44 hannes Exp $ (LBL) * * From: * @(#)in.h 8.3 (Berkeley) 1/3/94 * $FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $ */ +extern struct tok ipproto_values[]; + #ifndef IPPROTO_IP #define IPPROTO_IP 0 /* dummy for IP */ #endif @@ -113,8 +115,8 @@ #ifndef IPPROTO_ND #define IPPROTO_ND 77 /* Sun net disk proto (temp.) */ #endif -#ifndef IPPROTO_IGRP -#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */ +#ifndef IPPROTO_EIGRP +#define IPPROTO_EIGRP 88 /* Cisco/GXS IGRP */ #endif #ifndef IPPROTO_OSPF #define IPPROTO_OSPF 89 |