| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
iana-info.h
1/* iana-info.h
2 *
3 * Constants and lookups for IANA-assigned values.
4 * This file was partially generated by running ./tools/make-iana-constants.py.
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12#ifndef __IANA_INFO_H__
13#define __IANA_INFO_H__
14
15#include <wireshark.h>
16#include "ws_symbol_export.h"
17#include <wsutil/value_string.h>
18#include <wsutil/inet_cidr.h>
19
20#ifdef __cplusplus
21 extern "C" {
22#endif /* __cplusplus */
23
24/* <BEGIN GENERATED SOURCE> */
25/*
26 * Address family numbers, from
27 *
28 * http://www.iana.org/assignments/address-family-numbers
29 */
30#define AFNUM_RESERVED_0 0 /* Reserved */
31#define AFNUM_IP 1 /* IP (IP version 4) */
32#define AFNUM_IP6 2 /* IP6 (IP version 6) */
33#define AFNUM_NSAP 3 /* NSAP */
34#define AFNUM_HDLC 4 /* HDLC (8-bit multidrop) */
35#define AFNUM_BBN_1822 5 /* BBN 1822 */
36#define AFNUM_802 6 /* 802 (includes all 802 media plus Ethernet 'canonical format') */
37#define AFNUM_E163 7 /* E.163 */
38#define AFNUM_E164 8 /* E.164 (SMDS, Frame Relay, ATM) */
39#define AFNUM_F69 9 /* F.69 (Telex) */
40#define AFNUM_X121 10 /* X.121 (X.25, Frame Relay) */
41#define AFNUM_IPX 11 /* IPX */
42#define AFNUM_APPLETALK 12 /* Appletalk */
43#define AFNUM_DECNET_IV 13 /* Decnet IV */
44#define AFNUM_BANYAN_VINES 14 /* Banyan Vines */
45#define AFNUM_E164_WITH_NSAP_FORMAT_SUBADDRESS 15 /* E.164 with NSAP format subaddress */
46#define AFNUM_DNS 16 /* DNS (Domain Name System) */
47#define AFNUM_DISTINGUISHED_NAME 17 /* Distinguished Name */
48#define AFNUM_AS_NUMBER 18 /* AS Number */
49#define AFNUM_XTP_OVER_IP_VERSION_4 19 /* XTP over IP version 4 */
50#define AFNUM_XTP_OVER_IP_VERSION_6 20 /* XTP over IP version 6 */
51#define AFNUM_XTP_NATIVE_MODE_XTP 21 /* XTP native mode XTP */
52#define AFNUM_FIBRE_CHANNEL_WORLD_WIDE_PORT_NAME 22 /* Fibre Channel World-Wide Port Name */
53#define AFNUM_FIBRE_CHANNEL_WORLD_WIDE_NODE_NAME 23 /* Fibre Channel World-Wide Node Name */
54#define AFNUM_GWID 24 /* GWID */
55#define AFNUM_AFI_FOR_L2VPN_INFORMATION 25 /* AFI for L2VPN information */
56#define AFNUM_MPLS_TP_SECTION_ENDPOINT_IDENTIFIER 26 /* MPLS-TP Section Endpoint Identifier */
57#define AFNUM_MPLS_TP_LSP_ENDPOINT_IDENTIFIER 27 /* MPLS-TP LSP Endpoint Identifier */
58#define AFNUM_MPLS_TP_PSEUDOWIRE_ENDPOINT_IDENTIFIER 28 /* MPLS-TP Pseudowire Endpoint Identifier */
59#define AFNUM_MT_IP_MULTI_TOPOLOGY_IP_VERSION_4 29 /* MT IP: Multi-Topology IP version 4 */
60#define AFNUM_MT_IPV6_MULTI_TOPOLOGY_IP_VERSION_6 30 /* MT IPv6: Multi-Topology IP version 6 */
61#define AFNUM_BGP_SFC 31 /* BGP SFC */
62#define AFNUM_EIGRP_COMMON_SERVICE_FAMILY 16384 /* EIGRP Common Service Family */
63#define AFNUM_EIGRP_IPV4_SERVICE_FAMILY 16385 /* EIGRP IPv4 Service Family */
64#define AFNUM_EIGRP_IPV6_SERVICE_FAMILY 16386 /* EIGRP IPv6 Service Family */
65#define AFNUM_LISP_CANONICAL_ADDRESS_FORMAT 16387 /* LISP Canonical Address Format (LCAF) */
66#define AFNUM_BGP_LS 16388 /* BGP-LS */
67#define AFNUM_48_BIT_MAC 16389 /* 48-bit MAC */
68#define AFNUM_64_BIT_MAC 16390 /* 64-bit MAC */
69#define AFNUM_OUI 16391 /* OUI */
70#define AFNUM_MAC_24 16392 /* MAC/24 */
71#define AFNUM_MAC_40 16393 /* MAC/40 */
72#define AFNUM_IPV6_64 16394 /* IPv6/64 */
73#define AFNUM_RBRIDGE_PORT_ID 16395 /* RBridge Port ID */
74#define AFNUM_TRILL_NICKNAME 16396 /* TRILL Nickname */
75#define AFNUM_UNIVERSALLY_UNIQUE_IDENTIFIER 16397 /* Universally Unique Identifier (UUID) */
76#define AFNUM_ROUTING_POLICY_AFI 16398 /* Routing Policy AFI */
77#define AFNUM_MPLS_NAMESPACES 16399 /* MPLS Namespaces */
78#define AFNUM_RESERVED_65535 65535 /* Reserved */
79
80WS_DLL_PUBLIC const value_string afn_vals[];
81
82/*
83 * IP protocol numbers.
84 * http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
85 */
86#define IP_PROTO_HOPOPT 0 /* IPv6 Hop-by-Hop Option */
87#define IP_PROTO_ICMP 1 /* Internet Control Message */
88#define IP_PROTO_IGMP 2 /* Internet Group Management */
89#define IP_PROTO_GGP 3 /* Gateway-to-Gateway */
90#define IP_PROTO_IPV4 4 /* IPv4 encapsulation */
91#define IP_PROTO_ST 5 /* Stream */
92#define IP_PROTO_TCP 6 /* Transmission Control */
93#define IP_PROTO_CBT 7 /* CBT */
94#define IP_PROTO_EGP 8 /* Exterior Gateway Protocol */
95#define IP_PROTO_IGP 9 /* any private interior gateway (used by Cisco for their IGRP) */
96#define IP_PROTO_BBN_RCC_MON 10 /* BBN RCC Monitoring */
97#define IP_PROTO_NVP_II 11 /* Network Voice Protocol */
98#define IP_PROTO_PUP 12 /* PUP */
99#define IP_PROTO_ARGUS_DEPRECATED 13 /* ARGUS */
100#define IP_PROTO_EMCON 14 /* EMCON */
101#define IP_PROTO_XNET 15 /* Cross Net Debugger */
102#define IP_PROTO_CHAOS 16 /* Chaos */
103#define IP_PROTO_UDP 17 /* User Datagram */
104#define IP_PROTO_MUX 18 /* Multiplexing */
105#define IP_PROTO_DCN_MEAS 19 /* DCN Measurement Subsystems */
106#define IP_PROTO_HMP 20 /* Host Monitoring */
107#define IP_PROTO_PRM 21 /* Packet Radio Measurement */
108#define IP_PROTO_XNS_IDP 22 /* XEROX NS IDP */
109#define IP_PROTO_TRUNK_1 23 /* Trunk-1 */
110#define IP_PROTO_TRUNK_2 24 /* Trunk-2 */
111#define IP_PROTO_LEAF_1 25 /* Leaf-1 */
112#define IP_PROTO_LEAF_2 26 /* Leaf-2 */
113#define IP_PROTO_RDP 27 /* Reliable Data Protocol */
114#define IP_PROTO_IRTP 28 /* Internet Reliable Transaction */
115#define IP_PROTO_ISO_TP4 29 /* ISO Transport Protocol Class 4 */
116#define IP_PROTO_NETBLT 30 /* Bulk Data Transfer Protocol */
117#define IP_PROTO_MFE_NSP 31 /* MFE Network Services Protocol */
118#define IP_PROTO_MERIT_INP 32 /* MERIT Internodal Protocol */
119#define IP_PROTO_DCCP 33 /* Datagram Congestion Control Protocol */
120#define IP_PROTO_3PC 34 /* Third Party Connect Protocol */
121#define IP_PROTO_IDPR 35 /* Inter-Domain Policy Routing Protocol */
122#define IP_PROTO_XTP 36 /* XTP */
123#define IP_PROTO_DDP 37 /* Datagram Delivery Protocol */
124#define IP_PROTO_IDPR_CMTP 38 /* IDPR Control Message Transport Proto */
125#define IP_PROTO_TP 39 /* TP++ Transport Protocol */
126#define IP_PROTO_IL 40 /* IL Transport Protocol */
127#define IP_PROTO_IPV6 41 /* IPv6 encapsulation */
128#define IP_PROTO_SDRP 42 /* Source Demand Routing Protocol */
129#define IP_PROTO_IPV6_ROUTE 43 /* Routing Header for IPv6 */
130#define IP_PROTO_IPV6_FRAG 44 /* Fragment Header for IPv6 */
131#define IP_PROTO_IDRP 45 /* Inter-Domain Routing Protocol */
132#define IP_PROTO_RSVP 46 /* Reservation Protocol */
133#define IP_PROTO_GRE 47 /* Generic Routing Encapsulation */
134#define IP_PROTO_DSR 48 /* Dynamic Source Routing Protocol */
135#define IP_PROTO_BNA 49 /* BNA */
136#define IP_PROTO_ESP 50 /* Encap Security Payload */
137#define IP_PROTO_AH 51 /* Authentication Header */
138#define IP_PROTO_I_NLSP 52 /* Integrated Net Layer Security TUBA */
139#define IP_PROTO_SWIPE_DEPRECATED 53 /* IP with Encryption */
140#define IP_PROTO_NARP 54 /* NBMA Address Resolution Protocol */
141#define IP_PROTO_MIN_IPV4 55 /* Minimal IPv4 Encapsulation */
142#define IP_PROTO_TLSP 56 /* Transport Layer Security Protocol using Kryptonet key management */
143#define IP_PROTO_SKIP 57 /* SKIP */
144#define IP_PROTO_IPV6_ICMP 58 /* ICMP for IPv6 */
145#define IP_PROTO_IPV6_NONXT 59 /* No Next Header for IPv6 */
146#define IP_PROTO_IPV6_OPTS 60 /* Destination Options for IPv6 */
147#define IP_PROTO_CFTP 62 /* CFTP */
148#define IP_PROTO_SAT_EXPAK 64 /* SATNET and Backroom EXPAK */
149#define IP_PROTO_KRYPTOLAN 65 /* Kryptolan */
150#define IP_PROTO_RVD 66 /* MIT Remote Virtual Disk Protocol */
151#define IP_PROTO_IPPC 67 /* Internet Pluribus Packet Core */
152#define IP_PROTO_SAT_MON 69 /* SATNET Monitoring */
153#define IP_PROTO_VISA 70 /* VISA Protocol */
154#define IP_PROTO_IPCV 71 /* Internet Packet Core Utility */
155#define IP_PROTO_CPNX 72 /* Computer Protocol Network Executive */
156#define IP_PROTO_CPHB 73 /* Computer Protocol Heart Beat */
157#define IP_PROTO_WSN 74 /* Wang Span Network */
158#define IP_PROTO_PVP 75 /* Packet Video Protocol */
159#define IP_PROTO_BR_SAT_MON 76 /* Backroom SATNET Monitoring */
160#define IP_PROTO_SUN_ND 77 /* SUN ND PROTOCOL-Temporary */
161#define IP_PROTO_WB_MON 78 /* WIDEBAND Monitoring */
162#define IP_PROTO_WB_EXPAK 79 /* WIDEBAND EXPAK */
163#define IP_PROTO_ISO_IP 80 /* ISO Internet Protocol */
164#define IP_PROTO_VMTP 81 /* VMTP */
165#define IP_PROTO_SECURE_VMTP 82 /* SECURE-VMTP */
166#define IP_PROTO_VINES 83 /* VINES */
167#define IP_PROTO_IPTM 84 /* Internet Protocol Traffic Manager */
168#define IP_PROTO_NSFNET_IGP 85 /* NSFNET-IGP */
169#define IP_PROTO_DGP 86 /* Dissimilar Gateway Protocol */
170#define IP_PROTO_TCF 87 /* TCF */
171#define IP_PROTO_EIGRP 88 /* EIGRP */
172#define IP_PROTO_OSPFIGP 89 /* OSPFIGP */
173#define IP_PROTO_SPRITE_RPC 90 /* Sprite RPC Protocol */
174#define IP_PROTO_LARP 91 /* Locus Address Resolution Protocol */
175#define IP_PROTO_MTP 92 /* Multicast Transport Protocol */
176#define IP_PROTO_AX25 93 /* AX.25 Frames */
177#define IP_PROTO_IPIP 94 /* IP-within-IP Encapsulation Protocol */
178#define IP_PROTO_MICP_DEPRECATED 95 /* Mobile Internetworking Control Pro. */
179#define IP_PROTO_SCC_SP 96 /* Semaphore Communications Sec. Pro. */
180#define IP_PROTO_ETHERIP 97 /* Ethernet-within-IP Encapsulation */
181#define IP_PROTO_ENCAP 98 /* Encapsulation Header */
182#define IP_PROTO_GMTP 100 /* GMTP */
183#define IP_PROTO_IFMP 101 /* Ipsilon Flow Management Protocol */
184#define IP_PROTO_PNNI 102 /* PNNI over IP */
185#define IP_PROTO_PIM 103 /* Protocol Independent Multicast */
186#define IP_PROTO_ARIS 104 /* ARIS */
187#define IP_PROTO_SCPS 105 /* SCPS */
188#define IP_PROTO_QNX 106 /* QNX */
189#define IP_PROTO_A_N 107 /* Active Networks */
190#define IP_PROTO_IPCOMP 108 /* IP Payload Compression Protocol */
191#define IP_PROTO_SNP 109 /* Sitara Networks Protocol */
192#define IP_PROTO_COMPAQ_PEER 110 /* Compaq Peer Protocol */
193#define IP_PROTO_IPX_IN_IP 111 /* IPX in IP */
194#define IP_PROTO_VRRP 112 /* Virtual Router Redundancy Protocol */
195#define IP_PROTO_PGM 113 /* PGM Reliable Transport Protocol */
196#define IP_PROTO_L2TP 115 /* Layer Two Tunneling Protocol */
197#define IP_PROTO_DDX 116 /* D-II Data Exchange (DDX) */
198#define IP_PROTO_IATP 117 /* Interactive Agent Transfer Protocol */
199#define IP_PROTO_STP 118 /* Schedule Transfer Protocol */
200#define IP_PROTO_SRP 119 /* SpectraLink Radio Protocol */
201#define IP_PROTO_UTI 120 /* UTI */
202#define IP_PROTO_SMP 121 /* Simple Message Protocol */
203#define IP_PROTO_SM_DEPRECATED 122 /* Simple Multicast Protocol */
204#define IP_PROTO_PTP 123 /* Performance Transparency Protocol */
205#define IP_PROTO_ISIS_OVER_IPV4 124
206#define IP_PROTO_FIRE 125
207#define IP_PROTO_CRTP 126 /* Combat Radio Transport Protocol */
208#define IP_PROTO_CRUDP 127 /* Combat Radio User Datagram */
209#define IP_PROTO_SSCOPMCE 128
210#define IP_PROTO_IPLT 129
211#define IP_PROTO_SPS 130 /* Secure Packet Shield */
212#define IP_PROTO_PIPE 131 /* Private IP Encapsulation within IP */
213#define IP_PROTO_SCTP 132 /* Stream Control Transmission Protocol */
214#define IP_PROTO_FC 133 /* Fibre Channel */
215#define IP_PROTO_RSVP_E2E_IGNORE 134
216#define IP_PROTO_MOBILITY_HEADER 135
217#define IP_PROTO_UDPLITE 136
218#define IP_PROTO_MPLS_IN_IP 137
219#define IP_PROTO_MANET 138 /* MANET Protocols */
220#define IP_PROTO_HIP 139 /* Host Identity Protocol */
221#define IP_PROTO_SHIM6 140 /* Shim6 Protocol */
222#define IP_PROTO_WESP 141 /* Wrapped Encapsulating Security Payload */
223#define IP_PROTO_ROHC 142 /* Robust Header Compression */
224#define IP_PROTO_ETHERNET 143 /* Ethernet */
225#define IP_PROTO_AGGFRAG 144 /* AGGFRAG encapsulation payload for ESP */
226#define IP_PROTO_NSH 145 /* Network Service Header */
227#define IP_PROTO_HOMA 146 /* Homa */
228#define IP_PROTO_BIT_EMU 147 /* Bit-stream Emulation */
229#define IP_PROTO_RESERVED 255
230
231WS_DLL_PUBLIC value_string_ext ipproto_val_ext;
232
233
234/*
235 * Enterprise numbers, from
236 * https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
237 */
238WS_DLL_PUBLIC value_string_ext enterprise_val_ext;
239/* <END GENERATED SOURCE> */
240
241
242 typedef enum {
243 ws_tcp,
244 ws_udp,
245 ws_sctp,
246 ws_dccp,
247} ws_services_proto_t;
248
249 typedef struct {
250 uint16_t port;
251 const char* name;
252 const char* description;
253} ws_services_entry_t;
254
255 ws_services_entry_t const*
256global_services_lookup(uint16_t value, ws_services_proto_t proto);
257
258WS_DLL_PUBLIC
259 void global_services_dump(FILE* fp);
260
261WS_DLL_PUBLIC
262 void global_enterprises_dump(FILE* fp);
263
264 enum iana_ip {
265 WS_IANA_IPv4 = 4,
266 WS_IANA_IPv6 = 6,
267};
268
269 struct ws_iana_ip_special_block {
270 enum iana_ip type;
271 union {
272 ipv4_addr_and_mask ipv4;
273 ipv6_addr_and_prefix ipv6;
274 } u_ip;
275 const char* name;
276 /* true = 1; false = 0; n/a = -1 */
277 int source, destination, forwardable, global, reserved;
278};
279
280WS_DLL_PUBLIC
281 const struct ws_iana_ip_special_block*
282ws_iana_ipv4_special_block_lookup(uint32_t ipnum);
283
284WS_DLL_PUBLIC
285 const struct ws_iana_ip_special_block*
286ws_iana_ipv6_special_block_lookup(const ws_in6_addr* addr);
287
288#ifdef __cplusplus
289}
290#endif /* __cplusplus */
291
292#endif
inet_cidr.h
_value_string_ext
Extended metadata for a value_string array.
Definition value_string.h:325
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
e_in6_addr
Represents a 128-bit IPv6 address.
Definition inet_addr.h:27
ipv4_addr_and_mask
Definition inet_cidr.h:22
ipv6_addr_and_prefix
Definition inet_cidr.h:27
ws_iana_ip_special_block
Definition iana-info.h:269
ws_services_entry_t
Definition iana-info.h:249
value_string.h