2 * Routines for converting IPv4 protocol/IPv6 nxthdr field into string
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/packet.h>
16 #include <epan/ipproto.h>
17 #include <epan/addr_resolv.h>
18 #include <epan/dissectors/packet-ip.h>
19 #include <epan/strutil.h>
21 static const value_string ipproto_val
[] = {
23 { IP_PROTO_IP
, "IPv4" },
25 { IP_PROTO_HOPOPTS
, "IPv6 Hop-by-Hop Option" }, /* 0 HOPOPT IPv6 Hop-by-Hop Option [RFC1883] */
26 { IP_PROTO_ICMP
, "ICMP" }, /* 1 ICMP Internet Control Message [RFC792] */
27 { IP_PROTO_IGMP
, "IGMP" }, /* 2 IGMP Internet Group Management [RFC1112] */
28 { IP_PROTO_GGP
, "GGP" }, /* 3 GGP Gateway-to-Gateway [RFC823] */
29 { IP_PROTO_IPIP
, "IPIP" }, /* 4 IPv4 IPv4 encapsulation [RFC2003] */
30 { IP_PROTO_STREAM
, "Stream" }, /* 5 ST Stream [RFC1190][RFC1819] */
31 { IP_PROTO_TCP
, "TCP" }, /* 6 TCP Transmission Control [RFC793] */
32 { IP_PROTO_CBT
, "CBT" }, /* 7 CBT CBT [Tony_Ballardie] */
33 { IP_PROTO_EGP
, "EGP" }, /* 8 EGP Exterior Gateway Protocol [RFC888][David_Mills] */
34 { IP_PROTO_IGP
, "IGRP" }, /* 9 IGP any private interior gateway (used by Cisco for their IGRP) [Internet_Assigned_Numbers_Authority] */
35 { IP_PROTO_BBN_RCC
, "BBN RCC" }, /* 10 BBN-RCC-MON BBN RCC Monitoring [Steve_Chipman] */
36 { IP_PROTO_NVPII
, "Network Voice" }, /* 11 NVP-II Network Voice Protocol [RFC741][Steve_Casner] */
37 { IP_PROTO_PUP
, "PUP" }, /* 12 PUP PUP */
38 { IP_PROTO_ARGUS
, "ARGUS" }, /* 13 ARGUS ARGUS [Robert_W_Scheifler] */
39 { IP_PROTO_EMCON
, "EMCON" }, /* 14 EMCON EMCON [<mystery contact>] */
40 { IP_PROTO_XNET
, "XNET" }, /* 15 XNET Cross Net Debugger [Haverty, J., "XNET Formats for Internet Protocol Version 4", IEN 158, October 1980.][Jack_Haverty] */
41 { IP_PROTO_CHAOS
, "CHAOS" }, /* 16 CHAOS Chaos [J_Noel_Chiappa] */
42 { IP_PROTO_UDP
, "UDP" }, /* 17 UDP User Datagram [RFC768][Jon_Postel] */
43 { IP_PROTO_MUX
, "Multiplex" }, /* 18 MUX Multiplexing [Cohen, D. and J. Postel, "Multiplexing Protocol", IEN 90, USC/Information Sciences Institute, May 1979.][Jon_Postel] */
44 { IP_PROTO_DCNMEAS
, "DCN Measurement" }, /* 19 DCN-MEAS DCN Measurement Subsystems [David_Mills] */
45 { IP_PROTO_HMP
, "Host Monitoring" }, /* 20 HMP Host Monitoring [RFC869][Robert_Hinden] */
46 { IP_PROTO_PRM
, "Packet radio" }, /* 21 PRM Packet Radio Measurement [Zaw_Sing_Su] */
47 { IP_PROTO_IDP
, "IDP" }, /* 22 XNS-IDP XEROX NS IDP */
48 { IP_PROTO_TRUNK1
, "Trunk-1" }, /* 23 TRUNK-1 Trunk-1 [Barry_Boehm] */
49 { IP_PROTO_TRUNK2
, "Trunk-2" }, /* 24 TRUNK-2 Trunk-2 [Barry_Boehm] */
50 { IP_PROTO_LEAF1
, "Leaf-1" }, /* 25 LEAF-1 Leaf-1 [Barry_Boehm] */
51 { IP_PROTO_LEAF2
, "Leaf-2" }, /* 26 LEAF-2 Leaf-2 [Barry_Boehm] */
52 { IP_PROTO_RDP
, "Reliable Data" }, /* 27 RDP Reliable Data Protocol [RFC908][Robert_Hinden] */
53 { IP_PROTO_IRT
, "IRT" }, /* 28 IRTP Internet Reliable Transaction [RFC938][Trudy_Miller] */
54 { IP_PROTO_TP
, "ISO TP4" }, /* 29 ISO-TP4 ISO Transport Protocol Class 4 [RFC905][<mystery contact>] */
55 { IP_PROTO_BULK
, "Bulk Data" }, /* 30 NETBLT Bulk Data Transfer Protocol [RFC969][David_Clark] */
56 { IP_PROTO_MFE_NSP
, "MFE NSP" }, /* 31 MFE-NSP MFE Network Services Protocol */
57 { IP_PROTO_MERIT
, "Merit Internodal" }, /* 32 MERIT-INP MERIT Internodal Protocol [Hans_Werner_Braun] */
58 { IP_PROTO_DCCP
, "Datagram Congestion Control Protocol" }, /* 33 DCCP Datagram Congestion Control Protocol [RFC4340] */
59 { IP_PROTO_3PC
, "3rd Party Connect" }, /* 34 3PC Third Party Connect Protocol [Stuart_A_Friedberg] */
60 { IP_PROTO_IDPR
, "Inter-Domain Policy Routing Protocol" }, /* 35 IDPR Inter-Domain Policy Routing Protocol [Martha_Steenstrup] */
61 { IP_PROTO_XTP
, "XTP" }, /* 36 XTP XTP [Greg_Chesson] */
62 { IP_PROTO_DDP
, "Datagram delivery"}, /* 37 DDP Datagram Delivery Protocol [Wesley_Craig] */
63 { IP_PROTO_CMTP
, "Control Message" }, /* 38 IDPR-CMTP IDPR Control Message Transport Proto [Martha_Steenstrup] */
64 { IP_PROTO_TPPP
, "TP++" }, /* 39 TP++ TP++ Transport Protocol [Dirk_Fromhein] */
65 { IP_PROTO_IL
, "IL" }, /* 40 IL IL Transport Protocol [Dave_Presotto] */
66 { IP_PROTO_IPV6
, "IPv6" }, /* 41 IPv6 IPv6 encapsulation [RFC2473] */
67 { IP_PROTO_SDRP
, "Source demand routing" }, /* 42 SDRP Source Demand Routing Protocol [Deborah_Estrin] */
68 { IP_PROTO_ROUTING
, "Routing Header for IPv6" }, /* 43 IPv6-Route Routing Header for IPv6 [Steve_Deering] */
69 { IP_PROTO_FRAGMENT
,"Fragment Header for IPv6" }, /* 44 IPv6-Frag Fragment Header for IPv6 [Steve_Deering] */
70 { IP_PROTO_IDRP
, "Inter-Domain Routing Protocol" }, /* 45 IDRP Inter-Domain Routing Protocol [Sue_Hares] */
71 { IP_PROTO_RSVP
, "Reservation Protocol" }, /* 46 RSVP Reservation Protocol [Bob_Braden] */
72 { IP_PROTO_GRE
, "Generic Routing Encapsulation" }, /* 47 GRE General Routing Encapsulation [Tony_Li] */
73 { IP_PROTO_DSR
, "Dynamic source routing" }, /* 48 DSR Dynamic Source Routing Protocol [RFC4728] */
74 { IP_PROTO_BNA
, "BNA" }, /* 49 BNA BNA [Gary Salamon] */
75 { IP_PROTO_ESP
, "Encap Security Payload" }, /* 50 ESP Encap Security Payload [RFC4303] */
76 { IP_PROTO_AH
, "Authentication Header" }, /* 51 AH Authentication Header [RFC4302] */
77 { IP_PROTO_INSLP
, "INSLP" }, /* 52 I-NLSP Integrated Net Layer Security TUBA [K_Robert_Glenn] */
78 { IP_PROTO_SWIPE
, "SWIPE" }, /* 53 SWIPE IP with Encryption [John_Ioannidis] */
79 { IP_PROTO_NARP
, "NBMA ARP"}, /* 54 NARP NBMA Address Resolution Protocol [RFC1735] */
80 { IP_PROTO_MOBILE
, "IP Mobility"}, /* 55 MOBILE IP Mobility [Charlie_Perkins] */
81 { IP_PROTO_TLSP
, "TLSP Kryptonet" }, /* 56 TLSP Transport Layer Security Protocol using Kryptonet key management [Christer_Oberg] */
82 { IP_PROTO_SKIP
, "SKIP" }, /* 57 SKIP SKIP [Tom_Markson] */
83 { IP_PROTO_ICMPV6
, "ICMPv6" }, /* 58 IPv6-ICMP ICMP for IPv6 [RFC1883] */
84 { IP_PROTO_NONE
, "No Next Header for IPv6" }, /* 59 IPv6-NoNxt No Next Header for IPv6 [RFC1883] */
85 { IP_PROTO_DSTOPTS
, "Destination Options for IPv6" }, /* 60 IPv6-Opts Destination Options for IPv6 [RFC1883] */
86 { 61, "any host internal protocol" }, /* 61 any host internal protocol [Internet_Assigned_Numbers_Authority] */
87 { IP_PROTO_MIPV6_OLD
, "Mobile IPv6 (old)" }, /* 62 CFTP CFTP [Forsdick, H., "CFTP", Network Message, Bolt Beranek and Newman, January 1982.][Harry_Forsdick] */
88 { 63, "any local network" }, /* 63 any local network [Internet_Assigned_Numbers_Authority] */
89 { IP_PROTO_SATEXPAK
,"SATNET EXPAK" }, /* 64 SAT-EXPAK SATNET and Backroom EXPAK [Steven_Blumenthal] */
90 { IP_PROTO_KRYPTOLAN
, "Kryptolan" }, /* 65 KRYPTOLAN Kryptolan [Paul Liu] */
91 { IP_PROTO_RVD
, "Remote Virtual Disk" }, /* 66 RVD MIT Remote Virtual Disk Protocol [Michael_Greenwald] */
92 { IP_PROTO_IPPC
, "IPPC" }, /* 67 IPPC Internet Pluribus Packet Core [Steven_Blumenthal] */
93 { 68, "any distributed file system" }, /* 68 any distributed file system [Internet_Assigned_Numbers_Authority] */
94 { IP_PROTO_SATMON
, "SATNET Monitoring" }, /* 69 SAT-MON SATNET Monitoring [Steven_Blumenthal] */
95 { IP_PROTO_VISA
, "VISA" }, /* 70 VISA VISA Protocol [Gene_Tsudik] */
96 { IP_PROTO_IPCV
, "IPCV" }, /* 71 IPCV Internet Packet Core Utility [Steven_Blumenthal] */
97 { IP_PROTO_CPNX
, "CPNX" }, /* 72 CPNX Computer Protocol Network Executive [David Mittnacht] */
98 { IP_PROTO_CPHB
, "CPHB" }, /* 73 CPHB Computer Protocol Heart Beat [David Mittnacht] */
99 { IP_PROTO_WSN
, "Wang Span" }, /* 74 WSN Wang Span Network [Victor Dafoulas] */
100 { IP_PROTO_PVP
, "Packet Video" }, /* 75 PVP Packet Video Protocol [Steve_Casner] */
101 { IP_PROTO_BRSATMON
,"Backroom SATNET Mon" }, /* 76 BR-SAT-MON Backroom SATNET Monitoring [Steven_Blumenthal] */
102 { IP_PROTO_SUNND
, "Sun ND Protocol" }, /* 77 SUN-ND SUN ND PROTOCOL-Temporary [William_Melohn] */
103 { IP_PROTO_WBMON
, "Wideband Mon" }, /* 78 WB-MON WIDEBAND Monitoring [Steven_Blumenthal] */
104 { IP_PROTO_WBEXPAK
, "Wideband Expak" }, /* 79 WB-EXPAK WIDEBAND EXPAK [Steven_Blumenthal] */
105 { IP_PROTO_ISOIP
, "ISO Internet Protocol" }, /* 80 ISO-IP ISO Internet Protocol [Marshall_T_Rose] */
106 { IP_PROTO_VMTP
, "VMTP" }, /* 81 VMTP VMTP [Dave_Cheriton] */
107 { IP_PROTO_SVMTP
, "Secure VMTP" }, /* 82 SECURE-VMTP SECURE-VMTP [Dave_Cheriton] */
108 { IP_PROTO_VINES
, "VINES" }, /* 83 VINES VINES [Brian Horn] */
109 { IP_PROTO_TTP
, "TTP" }, /* 84 TTP TTP [Jim_Stevens] */
110 { IP_PROTO_NSFNETIGP
,"NSFNET IGP" }, /* 85 NSFNET-IGP NSFNET-IGP [Hans_Werner_Braun] */
111 { IP_PROTO_DGP
, "Dissimilar Gateway" }, /* 86 DGP Dissimilar Gateway Protocol */
112 { IP_PROTO_TCF
, "TCF" }, /* 87 TCF TCF [Guillermo_A_Loyola] */
113 { IP_PROTO_EIGRP
, "EIGRP" }, /* 88 EIGRP EIGRP */
114 { IP_PROTO_OSPF
, "OSPF IGP" }, /* 89 OSPFIGP OSPFIGP [RFC1583][John_Moy] */
115 { IP_PROTO_SPRITE
, "Sprite RPC" }, /* 90 Sprite-RPC Sprite RPC Protocol */
116 { IP_PROTO_LARP
, "Locus ARP" }, /* 91 LARP Locus Address Resolution Protocol [Brian Horn] */
117 { IP_PROTO_MTP
, "Multicast Transport" }, /* 92 MTP Multicast Transport Protocol [Susie_Armstrong] */
118 { IP_PROTO_AX25
, "AX.25 Frames" }, /* 93 AX.25 AX.25 Frames [Brian_Kantor] */
119 { IP_PROTO_IPINIP
, "IP in IP" }, /* 94 IPIP IP-within-IP Encapsulation Protocol [John_Ioannidis] */
120 { IP_PROTO_MICP
, "MICP" }, /* 95 MICP Mobile Internetworking Control Pro. [John_Ioannidis] */
121 { IP_PROTO_SCCCP
, "Semaphore" }, /* 96 SCC-SP Semaphore Communications Sec. Pro. [Howard_Hart] */
122 { IP_PROTO_ETHERIP
, "Ether in IP" }, /* 97 ETHERIP Ethernet-within-IP Encapsulation [RFC3378] */
123 { IP_PROTO_ENCAP
, "ENCAP" }, /* 98 ENCAP Encapsulation Header [RFC1241][Robert_Woodburn] */
124 { 99, "any private encryption scheme" }, /* 99 any private encryption scheme [Internet_Assigned_Numbers_Authority] */
125 { IP_PROTO_GMTP
, "GMTP" }, /* 100 GMTP GMTP [[RXB5]] */
126 { IP_PROTO_IFMP
, "Ipsilon Flow" }, /* 101 IFMP Ipsilon Flow Management Protocol [Bob_Hinden][November 1995, 1997.] */
127 { IP_PROTO_PNNI
, "PNNI over IP" }, /* 102 PNNI PNNI over IP [Ross_Callon] */
128 { IP_PROTO_PIM
, "PIM" }, /* 103 PIM Protocol Independent Multicast [Dino_Farinacci] */
129 { IP_PROTO_ARIS
, "ARIS" }, /* 104 ARIS ARIS [Nancy_Feldman] */
130 { IP_PROTO_SCPS
, "SCPS" }, /* 105 SCPS SCPS [Robert_Durst] */
131 { IP_PROTO_QNX
, "QNX" }, /* 106 QNX QNX [Michael_Hunter] */
132 { IP_PROTO_AN
, "Active Networks" }, /* 107 A/N Active Networks [Bob_Braden] */
133 { IP_PROTO_IPCOMP
, "IPComp" }, /* 108 IPComp IP Payload Compression Protocol [RFC2393] */
134 { IP_PROTO_SNP
, "Sitara Networks" }, /* 109 SNP Sitara Networks Protocol [Manickam_R_Sridhar] */
135 { IP_PROTO_COMPAQ
, "Compaq Peer" }, /* 110 Compaq-Peer Compaq Peer Protocol [Victor_Volpe] */
136 { IP_PROTO_IPX
, "IPX IN IP" }, /* 111 IPX-in-IP IPX in IP [CJ_Lee] */
137 { IP_PROTO_VRRP
, "VRRP" }, /* 112 VRRP Virtual Router Redundancy Protocol [RFC3768][RFC5798] */
138 { IP_PROTO_PGM
, "PGM" }, /* 113 PGM PGM Reliable Transport Protocol [Tony_Speakman] */
139 { 114, "any 0-hop protocol" }, /* 114 any 0-hop protocol [Internet_Assigned_Numbers_Authority] */
140 { IP_PROTO_L2TP
, "Layer 2 Tunneling" }, /* 115 L2TP Layer Two Tunneling Protocol [Bernard_Aboba] */
141 { IP_PROTO_DDX
, "DDX" }, /* 116 DDX D-II Data Exchange (DDX) [John_Worley] */
142 { IP_PROTO_IATP
, "IATP" }, /* 117 IATP Interactive Agent Transfer Protocol [John_Murphy] */
143 { IP_PROTO_STP
, "STP" }, /* 118 STP Schedule Transfer Protocol [Jean_Michel_Pittet] */
144 { IP_PROTO_SRP
, "SpectraLink" }, /* 119 SRP SpectraLink Radio Protocol [Mark_Hamilton] */
145 { IP_PROTO_UTI
, "UTI" }, /* 120 UTI UTI [Peter_Lothberg] */
146 { IP_PROTO_SMP
, "SMP" }, /* 121 SMP Simple Message Protocol [Leif_Ekblad] */
147 { IP_PROTO_SM
, "SM" }, /* 122 SM SM [Jon_Crowcroft] */
148 { IP_PROTO_PTP
, "PTP" }, /* 123 PTP Performance Transparency Protocol [Michael_Welzl] */
149 { IP_PROTO_ISIS
, "ISIS over IP" }, /* 124 ISIS over IPv4 [Tony_Przygienda] */
150 { IP_PROTO_FIRE
, "FIRE" }, /* 125 FIRE [Criag_Partridge] */
151 { IP_PROTO_CRTP
, "CRTP" }, /* 126 CRTP Combat Radio Transport Protocol [Robert_Sautter] */
152 { IP_PROTO_CRUDP
, "CRUDP" }, /* 127 CRUDP Combat Radio User Datagram [Robert_Sautter] */
153 { IP_PROTO_SSCOPMCE
,"SSCOPMCE" }, /* 128 SSCOPMCE [Kurt_Waber] */
154 { IP_PROTO_IPLT
, "IPLT" }, /* 129 IPLT [[Hollbach]] */
155 { IP_PROTO_SPS
, "Secure Packet" }, /* 130 SPS Secure Packet Shield [Bill_McIntosh] */
156 { IP_PROTO_PIPE
, "PIPE" }, /* 131 PIPE Private IP Encapsulation within IP [Bernhard_Petri] */
157 { IP_PROTO_SCTP
, "SCTP" }, /* 132 SCTP Stream Control Transmission Protocol [Randall_R_Stewart] */
158 { IP_PROTO_FC
, "Fibre Channel" }, /* 133 FC Fibre Channel [Murali_Rajagopal] */
159 { IP_PROTO_RSVPE2EI
,"RSVP E2EI" }, /* 134 RSVP-E2E-IGNORE [RFC3175] */
160 { IP_PROTO_MIPV6
, "Mobile IPv6" }, /* 135 Mobility Header [RFC3775] */
161 { IP_PROTO_UDPLITE
, "UDPLite" }, /* 136 UDPLite [RFC3828] */
162 { IP_PROTO_MPLS_IN_IP
, "MPLS in IP" }, /* 137 MPLS-in-IP [RFC4023] */
163 { IP_PROTO_MANET
, "MANET" }, /* 138 manet MANET Protocols [RFC-ietf-manet-iana-07] */
164 { IP_PROTO_HIP
, "HIP" }, /* 139 HIP Host Identity Protocol [RFC5201] */
165 { IP_PROTO_SHIM6
, "Shim6 header" }, /* 140 Shim6 Shim6 Protocol [RFC5533] */
166 { IP_PROTO_WESP
, "WESP" }, /* 141 WESP Wrapped Encapsulating Security Payload [RFC5840] */
167 { IP_PROTO_ROHC
, "ROHC" }, /* 142 ROHC Robust Header Compression [RFC5858] */
168 { IP_PROTO_ETHERNET
,"Ethernet" }, /* 143 Ethernet [RFC8986] */
169 { IP_PROTO_AGGFRAG
, "AGGFRAG" }, /* 144 AGGFRAG encapsulation for ESP */
170 { IP_PROTO_NSH
, "NSH" }, /* 145 Network Service Header */
171 { 146, "Unassigned" }, /* 146 Unassigned */
172 { 147, "Unassigned" }, /* 147 Unassigned */
173 { 148, "Unassigned" }, /* 148 Unassigned */
174 { 149, "Unassigned" }, /* 149 Unassigned */
175 { 150, "Unassigned" }, /* 150 Unassigned */
176 { 151, "Unassigned" }, /* 151 Unassigned */
177 { 152, "Unassigned" }, /* 152 Unassigned */
178 { 153, "Unassigned" }, /* 153 Unassigned */
179 { 154, "Unassigned" }, /* 154 Unassigned */
180 { 155, "Unassigned" }, /* 155 Unassigned */
181 { 156, "Unassigned" }, /* 156 Unassigned */
182 { 157, "Unassigned" }, /* 157 Unassigned */
183 { 158, "Unassigned" }, /* 158 Unassigned */
184 { 159, "Unassigned" }, /* 159 Unassigned */
185 { 160, "Unassigned" }, /* 160 Unassigned */
186 { 161, "Unassigned" }, /* 161 Unassigned */
187 { 162, "Unassigned" }, /* 162 Unassigned */
188 { 163, "Unassigned" }, /* 163 Unassigned */
189 { 164, "Unassigned" }, /* 164 Unassigned */
190 { 165, "Unassigned" }, /* 165 Unassigned */
191 { 166, "Unassigned" }, /* 166 Unassigned */
192 { 167, "Unassigned" }, /* 167 Unassigned */
193 { 168, "Unassigned" }, /* 168 Unassigned */
194 { 169, "Unassigned" }, /* 169 Unassigned */
195 { 170, "Unassigned" }, /* 170 Unassigned */
196 { 171, "Unassigned" }, /* 171 Unassigned */
197 { 172, "Unassigned" }, /* 172 Unassigned */
198 { IP_PROTO_AX4000
, "AX/4000 Testframe" }, /* 173 AX/4000 Testblock - non IANA */
199 { 174, "Unassigned" }, /* 174 Unassigned */
200 { 175, "Unassigned" }, /* 175 Unassigned */
201 { 176, "Unassigned" }, /* 176 Unassigned */
202 { 177, "Unassigned" }, /* 177 Unassigned */
203 { 178, "Unassigned" }, /* 178 Unassigned */
204 { 179, "Unassigned" }, /* 179 Unassigned */
205 { 180, "Unassigned" }, /* 180 Unassigned */
206 { 181, "Unassigned" }, /* 181 Unassigned */
207 { 182, "Unassigned" }, /* 182 Unassigned */
208 { 183, "Unassigned" }, /* 183 Unassigned */
209 { 184, "Unassigned" }, /* 184 Unassigned */
210 { 185, "Unassigned" }, /* 185 Unassigned */
211 { 186, "Unassigned" }, /* 186 Unassigned */
212 { 187, "Unassigned" }, /* 187 Unassigned */
213 { 188, "Unassigned" }, /* 188 Unassigned */
214 { 189, "Unassigned" }, /* 189 Unassigned */
215 { 190, "Unassigned" }, /* 190 Unassigned */
216 { 191, "Unassigned" }, /* 191 Unassigned */
217 { 192, "Unassigned" }, /* 192 Unassigned */
218 { 193, "Unassigned" }, /* 193 Unassigned */
219 { 194, "Unassigned" }, /* 194 Unassigned */
220 { 195, "Unassigned" }, /* 195 Unassigned */
221 { 196, "Unassigned" }, /* 196 Unassigned */
222 { 197, "Unassigned" }, /* 197 Unassigned */
223 { 198, "Unassigned" }, /* 198 Unassigned */
224 { 199, "Unassigned" }, /* 199 Unassigned */
225 { 200, "Unassigned" }, /* 200 Unassigned */
226 { 201, "Unassigned" }, /* 201 Unassigned */
227 { 202, "Unassigned" }, /* 202 Unassigned */
228 { 203, "Unassigned" }, /* 203 Unassigned */
229 { 204, "Unassigned" }, /* 204 Unassigned */
230 { 205, "Unassigned" }, /* 205 Unassigned */
231 { 206, "Unassigned" }, /* 206 Unassigned */
232 { 207, "Unassigned" }, /* 207 Unassigned */
233 { 208, "Unassigned" }, /* 208 Unassigned */
234 { 209, "Unassigned" }, /* 209 Unassigned */
235 { 210, "Unassigned" }, /* 210 Unassigned */
236 { 211, "Unassigned" }, /* 211 Unassigned */
237 { 212, "Unassigned" }, /* 212 Unassigned */
238 { 213, "Unassigned" }, /* 213 Unassigned */
239 { 214, "Unassigned" }, /* 214 Unassigned */
240 { 215, "Unassigned" }, /* 215 Unassigned */
241 { 216, "Unassigned" }, /* 216 Unassigned */
242 { 217, "Unassigned" }, /* 217 Unassigned */
243 { 218, "Unassigned" }, /* 218 Unassigned */
244 { 219, "Unassigned" }, /* 219 Unassigned */
245 { 220, "Unassigned" }, /* 220 Unassigned */
246 { 221, "Unassigned" }, /* 221 Unassigned */
247 { 222, "Unassigned" }, /* 222 Unassigned */
248 { 223, "Unassigned" }, /* 223 Unassigned */
249 { IP_PROTO_NCS_HEARTBEAT
,"Novell NCS Heartbeat" }, /* 224 Novell NCS Heartbeat - http://support.novell.com/cgi-bin/search/searchtid.cgi?/10071158.htm */
253 value_string_ext ipproto_val_ext
= VALUE_STRING_EXT_INIT(ipproto_val
);
255 const char *ipprotostr(const int proto
) {
256 return val_to_str_ext_const(proto
, &ipproto_val_ext
, "Unknown");
259 /* https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#extension-header */
261 static bool ipv6_exthdr_check(int proto
)
264 /* fall through all cases */
265 case IP_PROTO_HOPOPTS
: /* IPv6 Hop-by-Hop Option */
266 case IP_PROTO_ROUTING
: /* Routing Header for IPv6 */
267 case IP_PROTO_FRAGMENT
: /* Fragment Header for IPv6 */
268 case IP_PROTO_ESP
: /* Encapsulating Security Payload */
269 case IP_PROTO_AH
: /* Authentication Header */
270 case IP_PROTO_DSTOPTS
: /* Destination Options for IPv6 */
271 case IP_PROTO_MIPV6
: /* Mobility Header */
272 case IP_PROTO_HIP
: /* Host Identity Protocol */
273 case IP_PROTO_SHIM6
: /* Shim6 Protocol */
281 const char *ipv6extprotostr(int proto
)
283 if (ipv6_exthdr_check(proto
))
284 return ipprotostr(proto
);
294 * indent-tabs-mode: nil
297 * ex: set shiftwidth=4 tabstop=8 expandtab:
298 * :indentSize=4:tabSize=8:noTabs=true: