diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-04-23 17:51:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-04-23 17:51:37 +0000 |
commit | c75f555d8cb42057204a7e9f738cd0bb6b865d6e (patch) | |
tree | d605c6be388c451adc3c40e9b1d06d073085f88c | |
parent | 4f10e27d03d0f4becf442551c45bcb086d0218d2 (diff) |
Move the declarations of IP protocol numbers to "ipproto.h" from
"packet-ip.h".
Fix Gerald's address in some files while we're at it.
svn path=/trunk/; revision=3366
-rw-r--r-- | gtk/decode_as_dlg.c | 4 | ||||
-rw-r--r-- | ipproto.h | 44 | ||||
-rw-r--r-- | packet-eigrp.c | 6 | ||||
-rw-r--r-- | packet-gre.c | 6 | ||||
-rw-r--r-- | packet-icmpv6.c | 4 | ||||
-rw-r--r-- | packet-igrp.c | 6 | ||||
-rw-r--r-- | packet-ip.h | 38 | ||||
-rw-r--r-- | packet-ospf.c | 6 | ||||
-rw-r--r-- | packet-pim.c | 6 | ||||
-rw-r--r-- | packet-rsvp.c | 6 | ||||
-rw-r--r-- | packet-sctp.c | 4 | ||||
-rw-r--r-- | packet-tcp.c | 5 | ||||
-rw-r--r-- | packet-udp.c | 5 | ||||
-rw-r--r-- | packet-vines.c | 6 | ||||
-rw-r--r-- | packet-vrrp.c | 6 |
15 files changed, 79 insertions, 73 deletions
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c index ebcdec2c57..4ff496ab31 100644 --- a/gtk/decode_as_dlg.c +++ b/gtk/decode_as_dlg.c @@ -1,6 +1,6 @@ /* decode_as_dlg.c * - * $Id: decode_as_dlg.c,v 1.5 2001/03/26 10:28:34 guy Exp $ + * $Id: decode_as_dlg.c,v 1.6 2001/04/23 17:51:37 guy Exp $ * * Routines to modify dissector tables on the fly. * @@ -44,7 +44,7 @@ #include "globals.h" #include "simple_dialog.h" #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" #include "ui_util.h" #undef DEBUG @@ -1,12 +1,13 @@ /* ipproto.h - * Declarations of outines for converting IPv4 protocol/v6 nxthdr field into string + * Declarations of IP protocol numbers, and of routines for converting + * IP protocol numbers into strings. * - * $Id: ipproto.h,v 1.1 2001/04/17 06:29:12 guy Exp $ + * $Id: ipproto.h,v 1.2 2001/04/23 17:51:33 guy Exp $ * * Gilbert Ramirez <gram@xiexie.org> * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -28,6 +29,43 @@ #ifndef __IPPROTO_H__ #define __IPPROTO_H__ +/* + * IP protocol numbers. + */ +#define IP_PROTO_IP 0 /* dummy for IP */ +#define IP_PROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ +#define IP_PROTO_ICMP 1 /* control message protocol */ +#define IP_PROTO_IGMP 2 /* group mgmt protocol */ +#define IP_PROTO_GGP 3 /* gateway^2 (deprecated) */ +#define IP_PROTO_IPIP 4 /* IP inside IP */ +#define IP_PROTO_IPV4 4 /* IP header */ +#define IP_PROTO_TCP 6 /* tcp */ +#define IP_PROTO_EGP 8 /* exterior gateway protocol */ +#define IP_PROTO_IGRP 9 +#define IP_PROTO_PUP 12 /* pup */ +#define IP_PROTO_UDP 17 /* user datagram protocol */ +#define IP_PROTO_IDP 22 /* xns idp */ +#define IP_PROTO_TP 29 /* tp-4 w/ class negotiation */ +#define IP_PROTO_IPV6 41 /* IP6 header */ +#define IP_PROTO_ROUTING 43 /* IP6 routing header */ +#define IP_PROTO_FRAGMENT 44 /* IP6 fragmentation header */ +#define IP_PROTO_RSVP 46 /* Resource ReSerVation protocol */ +#define IP_PROTO_GRE 47 /* GRE */ +#define IP_PROTO_ESP 50 /* ESP */ +#define IP_PROTO_AH 51 /* AH */ +#define IP_PROTO_ICMPV6 58 /* ICMP6 */ +#define IP_PROTO_NONE 59 /* IP6 no next header */ +#define IP_PROTO_DSTOPTS 60 /* IP6 no next header */ +#define IP_PROTO_EON 80 /* ISO cnlp */ +#define IP_PROTO_VINES 83 /* Vines over raw IP */ +#define IP_PROTO_EIGRP 88 +#define IP_PROTO_OSPF 89 +#define IP_PROTO_ENCAP 98 /* encapsulation header */ +#define IP_PROTO_PIM 103 /* Protocol Independent Mcast */ +#define IP_PROTO_IPCOMP 108 /* IP payload compression */ +#define IP_PROTO_VRRP 112 /* Virtual Router Redundancy Protocol */ +#define IP_PROTO_SCTP 132 /* Stream Control Transmission Protocol */ + extern const char *ipprotostr(int proto); #endif /* ipproto.h */ diff --git a/packet-eigrp.c b/packet-eigrp.c index b58d1cb262..43b9147c05 100644 --- a/packet-eigrp.c +++ b/packet-eigrp.c @@ -2,10 +2,10 @@ * Routines for EIGRP dissection * Copyright 2000, Paul Ionescu <paul@acorp.ro> * - * $Id: packet-eigrp.c,v 1.14 2001/04/20 08:14:35 guy Exp $ + * $Id: packet-eigrp.c,v 1.15 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -41,7 +41,7 @@ #include "resolv.h" #include "atalk-utils.h" -#include "packet-ip.h" +#include "ipproto.h" #include "packet-ipx.h" #define EIGRP_UPDATE 0x01 diff --git a/packet-gre.c b/packet-gre.c index 2c83d8db73..546d608046 100644 --- a/packet-gre.c +++ b/packet-gre.c @@ -2,10 +2,10 @@ * Routines for the Generic Routing Encapsulation (GRE) protocol * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-gre.c,v 1.41 2001/04/17 06:43:18 guy Exp $ + * $Id: packet-gre.c,v 1.42 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -37,12 +37,12 @@ #endif #include <glib.h> #include "packet.h" -#include "packet-ip.h" #include "packet-ipx.h" #include "packet-wccp.h" #include "in_cksum.h" #include "etypes.h" #include "greproto.h" +#include "ipproto.h" static int proto_gre = -1; static int hf_gre_proto = -1; diff --git a/packet-icmpv6.c b/packet-icmpv6.c index f4a7ada75d..b1825ed054 100644 --- a/packet-icmpv6.c +++ b/packet-icmpv6.c @@ -1,7 +1,7 @@ /* packet-icmpv6.c * Routines for ICMPv6 packet disassembly * - * $Id: packet-icmpv6.c,v 1.40 2001/04/23 03:56:57 guy Exp $ + * $Id: packet-icmpv6.c,v 1.41 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -53,10 +53,10 @@ #include "packet.h" #include "packet-ipv6.h" -#include "packet-ip.h" #include "packet-dns.h" #include "in_cksum.h" #include "resolv.h" +#include "ipproto.h" #ifndef offsetof #define offsetof(type, member) ((size_t)(&((type *)0)->member)) diff --git a/packet-igrp.c b/packet-igrp.c index c4180bcd3e..e4bd8001f6 100644 --- a/packet-igrp.c +++ b/packet-igrp.c @@ -2,10 +2,10 @@ * Routines for IGRP dissection * Copyright 2000, Paul Ionescu <paul@acorp.ro> * - * $Id: packet-igrp.c,v 1.6 2001/03/05 20:11:36 guy Exp $ + * $Id: packet-igrp.c,v 1.7 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * Copied from packet-syslog.c @@ -36,7 +36,7 @@ #include <string.h> #include <glib.h> #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" #define IGRP_HEADER_LENGTH 12 #define IGRP_ENTRY_LENGTH 14 diff --git a/packet-ip.h b/packet-ip.h index 0ec24835d5..3436f95e17 100644 --- a/packet-ip.h +++ b/packet-ip.h @@ -1,10 +1,10 @@ /* packet-ip.h * Definitions for IP packet disassembly structures and routines * - * $Id: packet-ip.h,v 1.18 2001/03/05 20:11:36 guy Exp $ + * $Id: packet-ip.h,v 1.19 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -29,40 +29,6 @@ void capture_ip(const u_char *, int, packet_counts *); -#define IP_PROTO_IP 0 /* dummy for IP */ -#define IP_PROTO_HOPOPTS 0 /* IP6 hop-by-hop options */ -#define IP_PROTO_ICMP 1 /* control message protocol */ -#define IP_PROTO_IGMP 2 /* group mgmt protocol */ -#define IP_PROTO_GGP 3 /* gateway^2 (deprecated) */ -#define IP_PROTO_IPIP 4 /* IP inside IP */ -#define IP_PROTO_IPV4 4 /* IP header */ -#define IP_PROTO_TCP 6 /* tcp */ -#define IP_PROTO_EGP 8 /* exterior gateway protocol */ -#define IP_PROTO_IGRP 9 -#define IP_PROTO_PUP 12 /* pup */ -#define IP_PROTO_UDP 17 /* user datagram protocol */ -#define IP_PROTO_IDP 22 /* xns idp */ -#define IP_PROTO_TP 29 /* tp-4 w/ class negotiation */ -#define IP_PROTO_IPV6 41 /* IP6 header */ -#define IP_PROTO_ROUTING 43 /* IP6 routing header */ -#define IP_PROTO_FRAGMENT 44 /* IP6 fragmentation header */ -#define IP_PROTO_RSVP 46 /* Resource ReSerVation protocol */ -#define IP_PROTO_GRE 47 /* GRE */ -#define IP_PROTO_ESP 50 /* ESP */ -#define IP_PROTO_AH 51 /* AH */ -#define IP_PROTO_ICMPV6 58 /* ICMP6 */ -#define IP_PROTO_NONE 59 /* IP6 no next header */ -#define IP_PROTO_DSTOPTS 60 /* IP6 no next header */ -#define IP_PROTO_EON 80 /* ISO cnlp */ -#define IP_PROTO_VINES 83 /* Vines over raw IP */ -#define IP_PROTO_EIGRP 88 -#define IP_PROTO_OSPF 89 -#define IP_PROTO_ENCAP 98 /* encapsulation header */ -#define IP_PROTO_PIM 103 /* Protocol Independent Mcast */ -#define IP_PROTO_IPCOMP 108 /* IP payload compression */ -#define IP_PROTO_VRRP 112 /* Virtual Router Redundancy Protocol */ -#define IP_PROTO_SCTP 132 /* Stream Control Transmission Protocol */ - typedef enum { NO_LENGTH, /* option has no data, hence no length */ FIXED_LENGTH, /* option always has the same length */ diff --git a/packet-ospf.c b/packet-ospf.c index 600a5aa581..77693f7f72 100644 --- a/packet-ospf.c +++ b/packet-ospf.c @@ -2,7 +2,7 @@ * Routines for OSPF packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-ospf.c,v 1.37 2001/02/04 08:21:35 guy Exp $ + * $Id: packet-ospf.c,v 1.38 2001/04/23 17:51:33 guy Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -12,7 +12,7 @@ * TOS - support is not fully implemented * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -48,7 +48,7 @@ #include <glib.h> #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" #include "in_cksum.h" #include "ieee-float.h" diff --git a/packet-pim.c b/packet-pim.c index 3e778e735d..936111887a 100644 --- a/packet-pim.c +++ b/packet-pim.c @@ -2,10 +2,10 @@ * Routines for PIM disassembly * (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org> * - * $Id: packet-pim.c,v 1.26 2001/04/23 03:56:57 guy Exp $ + * $Id: packet-pim.c,v 1.27 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -44,7 +44,7 @@ #endif #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" #include "in_cksum.h" #define PIM_TYPE(x) ((x) & 0x0f) diff --git a/packet-rsvp.c b/packet-rsvp.c index 86c93d329f..e11b0bb555 100644 --- a/packet-rsvp.c +++ b/packet-rsvp.c @@ -3,10 +3,10 @@ * * (c) Copyright Ashok Narayanan <ashokn@cisco.com> * - * $Id: packet-rsvp.c,v 1.38 2001/04/20 01:22:23 guy Exp $ + * $Id: packet-rsvp.c,v 1.39 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -69,10 +69,10 @@ #include "packet.h" #include "in_cksum.h" -#include "packet-ip.h" #include "packet-ipv6.h" #include "ieee-float.h" #include "etypes.h" +#include "ipproto.h" static int proto_rsvp = -1; diff --git a/packet-sctp.c b/packet-sctp.c index 5c137d2a18..7ab680d69a 100644 --- a/packet-sctp.c +++ b/packet-sctp.c @@ -2,7 +2,7 @@ * Routines for Stream Control Transmission Protocol dissection * Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de> * - * $Id: packet-sctp.c,v 1.15 2001/04/20 20:34:29 guy Exp $ + * $Id: packet-sctp.c,v 1.16 2001/04/23 17:51:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -49,7 +49,7 @@ #endif #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" /* Initialize the protocol and registered fields */ static int proto_sctp = -1; diff --git a/packet-tcp.c b/packet-tcp.c index a0e1e7830b..3e75459461 100644 --- a/packet-tcp.c +++ b/packet-tcp.c @@ -1,10 +1,10 @@ /* packet-tcp.c * Routines for TCP packet disassembly * - * $Id: packet-tcp.c,v 1.101 2001/03/28 21:33:31 guy Exp $ + * $Id: packet-tcp.c,v 1.102 2001/04/23 17:51:34 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -46,6 +46,7 @@ #include "globals.h" #include "resolv.h" +#include "ipproto.h" #include "follow.h" #include "prefs.h" #include "packet-tcp.h" diff --git a/packet-udp.c b/packet-udp.c index 5d07d8702c..e377ef537f 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,10 +1,10 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.89 2001/03/28 21:33:31 guy Exp $ + * $Id: packet-udp.c,v 1.90 2001/04/23 17:51:34 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * Richard Sharpe, 13-Feb-1999, added dispatch table support and @@ -44,6 +44,7 @@ #include <glib.h> #include "globals.h" #include "resolv.h" +#include "ipproto.h" #include "in_cksum.h" #include "packet-udp.h" diff --git a/packet-vines.c b/packet-vines.c index 10b4d78e32..f51370ac69 100644 --- a/packet-vines.c +++ b/packet-vines.c @@ -1,12 +1,12 @@ /* packet-vines.c * Routines for Banyan VINES protocol packet disassembly * - * $Id: packet-vines.c,v 1.29 2001/04/17 06:43:19 guy Exp $ + * $Id: packet-vines.c,v 1.30 2001/04/23 17:51:34 guy Exp $ * * Don Lafontaine <lafont02@cn.ca> * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * Joerg Mayer <jmayer@loplof.de> * @@ -42,9 +42,9 @@ #include <glib.h> #include "packet.h" #include "packet-vines.h" -#include "packet-ip.h" #include "etypes.h" #include "ppptypes.h" +#include "ipproto.h" #define UDP_PORT_VINES 573 diff --git a/packet-vrrp.c b/packet-vrrp.c index a508580869..e022a07118 100644 --- a/packet-vrrp.c +++ b/packet-vrrp.c @@ -4,10 +4,10 @@ * * Heikki Vatiainen <hessu@cs.tut.fi> * - * $Id: packet-vrrp.c,v 1.14 2001/01/22 03:33:45 guy Exp $ + * $Id: packet-vrrp.c,v 1.15 2001/04/23 17:51:34 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * @@ -41,7 +41,7 @@ #include <string.h> #include <glib.h> #include "packet.h" -#include "packet-ip.h" +#include "ipproto.h" #include "in_cksum.h" static gint proto_vrrp = -1; |