IPv6: Add ipv6extprotostr() to ipproto.h
[metze/wireshark/wip.git] / epan / ipproto.h
1 /* ipproto.h
2  * Declarations of IP protocol numbers, and of routines for converting
3  * IP protocol numbers into strings.
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23
24 #ifndef __IPPROTO_H__
25 #define __IPPROTO_H__
26
27 #include "ws_symbol_export.h"
28
29 /*
30  * IP protocol numbers.
31  * http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
32  */
33 #define IP_PROTO_IP             0       /* dummy for IP */
34 #define IP_PROTO_HOPOPTS        0       /* IP6 hop-by-hop options - RFC1883 */
35 #define IP_PROTO_ICMP           1       /* control message protocol - RFC792 */
36 #define IP_PROTO_IGMP           2       /* group mgmt protocol - RFC1112 */
37 #define IP_PROTO_GGP            3       /* gateway^2 (deprecated) - RFC823*/
38 #define IP_PROTO_IPIP           4       /* IP inside IP - RFC2003*/
39 #define IP_PROTO_IPV4           4       /* IP header */
40 #define IP_PROTO_STREAM         5       /* Stream - RFC1190, RFC1819 */
41 #define IP_PROTO_TCP            6       /* TCP - RFC792 */
42 #define IP_PROTO_CBT            7       /* CBT - <A.Ballardie@cs.ucl.ac.uk> */
43 #define IP_PROTO_EGP            8       /* exterior gateway protocol - RFC888 */
44 #define IP_PROTO_IGP            9       /* any private interior gateway protocol ... */
45 #define IP_PROTO_IGRP           9       /* ... and used by Cisco for IGRP */
46 #define IP_PROTO_BBN_RCC        10      /* BBN RCC Monitoring */
47 #define IP_PROTO_NVPII          11      /* Network Voice Protocol - RFC741 */
48 #define IP_PROTO_PUP            12      /* pup */
49 #define IP_PROTO_ARGUS          13      /* ARGUS */
50 #define IP_PROTO_EMCON          14      /* EMCON */
51 #define IP_PROTO_XNET           15      /* Cross net debugger - IEN158 */
52 #define IP_PROTO_CHAOS          16      /* CHAOS */
53 #define IP_PROTO_UDP            17      /* user datagram protocol - RFC768 */
54 #define IP_PROTO_MUX            18      /* multiplexing - IEN90 */
55 #define IP_PROTO_DCNMEAS        19      /* DCN Measurement Subsystems */
56 #define IP_PROTO_HMP            20      /* Host Monitoring - RFC869 */
57 #define IP_PROTO_PRM            21      /* Packet radio measurement */
58 #define IP_PROTO_IDP            22      /* xns idp */
59 #define IP_PROTO_TRUNK1         23
60 #define IP_PROTO_TRUNK2         24
61 #define IP_PROTO_LEAF1          25
62 #define IP_PROTO_LEAF2          26
63 #define IP_PROTO_RDP            27      /* Reliable Data Protocol - RFC908 */
64 #define IP_PROTO_IRT            28      /* Internet Reliable Transation - RFC938 */
65 #define IP_PROTO_TP             29      /* tp-4 w/ class negotiation - RFC905 */
66 #define IP_PROTO_BULK           30      /* Bulk Data Transfer Protocol - RFC969 */
67 #define IP_PROTO_MFE_NSP        31      /* MFE Network Services Protocol */
68 #define IP_PROTO_MERIT          32      /* MERIT Internodal Protocol */
69 #define IP_PROTO_DCCP           33      /* Datagram Congestion Control Protocol */
70 #define IP_PROTO_3PC            34      /* Third party connect protocol */
71 #define IP_PROTO_IDPR           35      /* Interdomain policy routing protocol */
72 #define IP_PROTO_XTP            36      /* Xpress Transport Protocol */
73 #define IP_PROTO_DDP            37      /* Datagram Delivery Protocol */
74 #define IP_PROTO_CMTP           38      /* Control Message Transport Protocol */
75 #define IP_PROTO_TPPP           39      /* TP++ Transport Protocol */
76 #define IP_PROTO_IL             40      /* IL Transport Protocol */
77 #define IP_PROTO_IPV6           41      /* IP6 header */
78 #define IP_PROTO_SDRP           42      /* Source demand routing protocol */
79 #define IP_PROTO_ROUTING        43      /* IP6 routing header */
80 #define IP_PROTO_FRAGMENT       44      /* IP6 fragmentation header */
81 #define IP_PROTO_IDRP           45      /* Inter-Domain Routing Protocol */
82 #define IP_PROTO_RSVP           46      /* Resource ReSerVation protocol */
83 #define IP_PROTO_GRE            47      /* General Routing Encapsulation */
84 #define IP_PROTO_DSR            48      /* Dynamic Source Routing Protocol */
85 #define IP_PROTO_BNA            49      /* BNA */
86 #define IP_PROTO_ESP            50      /* Encap Security Payload for IPv6 - RFC2406 */
87 #define IP_PROTO_AH             51      /* Authentication Header for IPv6 - RFC2402*/
88 #define IP_PROTO_INSLP          52      /* Integrated Net Layer Security */
89 #define IP_PROTO_SWIPE          53      /* IP with Encryption */
90 #define IP_PROTO_NARP           54      /* NBMA Address resolution protocol - RFC1735 */
91 #define IP_PROTO_MOBILE         55      /* IP Mobility */
92 #define IP_PROTO_TLSP           56      /* Transport Layer Security Protocol using */
93                                         /* Kryptonet key management */
94 #define IP_PROTO_SKIP           57      /* SKIP */
95 #define IP_PROTO_ICMPV6         58      /* ICMP6  - RFC1883*/
96 #define IP_PROTO_NONE           59      /* IP6 no next header - RFC1883 */
97 #define IP_PROTO_DSTOPTS        60      /* IP6 destination options - RFC1883 */
98 /* 61 is reserved by IANA for any host internal protocol */
99
100 /*
101  * The current Protocol Numbers list says that the IP protocol number for
102  * mobility headers is 135; it cites draft-ietf-mobileip-ipv6-24, but
103  * that draft doesn't actually give a number.
104  *
105  * It appears that 62 used to be used, even though that's assigned to
106  * a protocol called CFTP; however, the only reference for CFTP is a
107  * Network Message from BBN back in 1982, so, for now, we support 62,
108  * as well as 135, as a protocol number for mobility headers.
109  */
110 #define IP_PROTO_MIPV6_OLD      62      /* Mobile IPv6  */
111 /* 63 is reserved by IANA for any local network */
112 #define IP_PROTO_SATEXPAK       64
113 #define IP_PROTO_KRYPTOLAN      65
114 #define IP_PROTO_RVD            66      /* MIT Remote virtual disk protocol */
115 #define IP_PROTO_IPPC           67      /* Internet Pluribus Packet Core */
116 /* 68 is reserved by IANA for any distributed file system */
117 #define IP_PROTO_SATMON         69      /* SATNET Monitoring */
118 #define IP_PROTO_VISA           70      /* VISA Protocol */
119 #define IP_PROTO_IPCV           71      /* Internet Packet Core Utility */
120 #define IP_PROTO_CPNX           72      /* Computer Protocol Network Executive */
121 #define IP_PROTO_CPHB           73      /* Computer Protocol Heart Beat */
122 #define IP_PROTO_WSN            74      /* WANG Span Network */
123 #define IP_PROTO_PVP            75      /* Packet Video Protocol */
124 #define IP_PROTO_BRSATMON       76      /* Backroon SATNET Monitoring */
125 #define IP_PROTO_SUNND          77      /* SUN ND Protocol - Temporary */
126 #define IP_PROTO_WBMON          78      /* Wideband Monitoring */
127 #define IP_PROTO_WBEXPAK        79      /* Wideband EXPAK */
128 #define IP_PROTO_ISOIP          80      /* ISO IP */
129 #define IP_PROTO_VMTP           81
130 #define IP_PROTO_SVMTP          82      /* Secure VMTP */
131 #define IP_PROTO_VINES          83      /* Vines over raw IP */
132 #define IP_PROTO_TTP            84
133 #define IP_PROTO_NSFNETIGP      85      /* NSFNET IGP */
134 #define IP_PROTO_DGP            86      /* Dissimilar Gateway Protocol */
135 #define IP_PROTO_TCF            87
136 #define IP_PROTO_EIGRP          88
137 #define IP_PROTO_OSPF           89      /* OSPF Interior Gateway Protocol - RFC1583 */
138 #define IP_PROTO_SPRITE         90      /* SPRITE RPC protocol */
139 #define IP_PROTO_LARP           91      /* Locus Address Resolution Protocol */
140 #define IP_PROTO_MTP            92      /* Multicast Transport Protocol */
141 #define IP_PROTO_AX25           93      /* AX.25 frames */
142 #define IP_PROTO_IPINIP         94      /* IP within IP Encapsulation protocol */
143 #define IP_PROTO_MICP           95      /* Mobile Internetworking Control Protocol */
144 #define IP_PROTO_SCCCP          96      /* Semaphore communications security protocol */
145 #define IP_PROTO_ETHERIP        97      /* Ethernet-within-IP - RFC 3378 */
146 #define IP_PROTO_ENCAP          98      /* encapsulation header - RFC1241*/
147 /* 99 is reserved by IANA for any private encryption scheme */
148 #define IP_PROTO_GMTP           100
149 #define IP_PROTO_IFMP           101     /* Ipsilon flow management protocol */
150 #define IP_PROTO_PNNI           102     /* PNNI over IP */
151 #define IP_PROTO_PIM            103     /* Protocol Independent Mcast */
152 #define IP_PROTO_ARIS           104
153 #define IP_PROTO_SCPS           105
154 #define IP_PROTO_QNX            106
155 #define IP_PROTO_AN             107     /* Active Networks */
156 #define IP_PROTO_IPCOMP         108     /* IP payload compression - RFC2393 */
157 #define IP_PROTO_SNP            109     /* Sitara Networks Protocol */
158 #define IP_PROTO_COMPAQ         110     /* Compaq Peer Protocol */
159 #define IP_PROTO_IPX            111     /* IPX over IP */
160 #define IP_PROTO_VRRP           112     /* Virtual Router Redundancy Protocol */
161 #define IP_PROTO_PGM            113     /* Pragmatic General Multicast */
162 /* 114 is reserved by IANA for any zero hop protocol */
163 #define IP_PROTO_L2TP           115     /* Layer Two Tunnelling Protocol */
164 #define IP_PROTO_DDX            116     /* D-II Data Exchange */
165 #define IP_PROTO_IATP           117     /* Interactive Agent Transfer Protocol */
166 #define IP_PROTO_STP            118     /* Schedule Transfer Protocol */
167 #define IP_PROTO_SRP            119     /* Spectralink Radio Protocol */
168 #define IP_PROTO_UTI            120
169 #define IP_PROTO_SMP            121     /* Simple Message Protocol */
170 #define IP_PROTO_SM             122
171 #define IP_PROTO_PTP            123     /* Performance Transparency Protocol */
172 #define IP_PROTO_ISIS           124     /* ISIS over IPv4 */
173 #define IP_PROTO_FIRE           125
174 #define IP_PROTO_CRTP           126     /* Combat Radio Transport Protocol */
175 #define IP_PROTO_CRUDP          127     /* Combat Radio User Datagram */
176 #define IP_PROTO_SSCOPMCE       128
177 #define IP_PROTO_IPLT           129
178 #define IP_PROTO_SPS            130     /* Secure Packet Shield */
179 #define IP_PROTO_PIPE           131     /* Private IP Encapsulation within IP */
180 #define IP_PROTO_SCTP           132     /* Stream Control Transmission Protocol */
181 #define IP_PROTO_FC             133     /* Fibre Channel */
182 #define IP_PROTO_RSVPE2EI       134     /* RSVP E2E Ignore - RFC3175 */
183 #define IP_PROTO_MIPV6          135     /* Mobile IPv6  */
184 #define IP_PROTO_UDPLITE        136     /* Lightweight user datagram protocol - RFC3828 */
185 #define IP_PROTO_MPLS_IN_IP     137     /* MPLS in IP - RFC4023 */
186 #define IP_PROTO_MANET          138     /* MANET Protocols */
187 #define IP_PROTO_HIP            139     /* Host Identity Protocol */
188 #define IP_PROTO_SHIM6          140     /* Shim6 Protocol */
189 #define IP_PROTO_WESP           141     /* 141 WESP Wrapped Encapsulating Security Payload [RFC5840] */
190 #define IP_PROTO_ROHC           142     /* 142 ROHC Robust Header Compression [RFC5858] */
191 #define IP_PROTO_AX4000         173     /* AX/4000 Testblock - non IANA */
192 #define IP_PROTO_NCS_HEARTBEAT  224     /* Novell NCS Heartbeat - http://support.novell.com/cgi-bin/search/searchtid.cgi?/10071158.htm */
193
194 WS_DLL_PUBLIC value_string_ext ipproto_val_ext;
195 WS_DLL_PUBLIC const char *ipprotostr(const int proto);
196
197 WS_DLL_PUBLIC const char *ipv6extprotostr(int proto);
198
199 #endif /* ipproto.h */
200
201 /*
202  * Editor modelines
203  *
204  * Local Variables:
205  * c-basic-offset: 4
206  * tab-width: 8
207  * indent-tabs-mode: nil
208  * End:
209  *
210  * ex: set shiftwidth=4 tabstop=8 expandtab:
211  * :indentSize=4:tabSize=8:noTabs=true:
212  */