xref: /netbsd-src/external/bsd/tcpdump/dist/ipproto.c (revision 26ba0b503b498a5194a71ac319838b7f5497f3fe)
10f74e101Schristos /*
20f74e101Schristos  * Redistribution and use in source and binary forms, with or without
30f74e101Schristos  * modification, are permitted provided that: (1) source code
40f74e101Schristos  * distributions retain the above copyright notice and this paragraph
50f74e101Schristos  * in its entirety, and (2) distributions including binary code include
60f74e101Schristos  * the above copyright notice and this paragraph in its entirety in
70f74e101Schristos  * the documentation or other materials provided with the distribution.
80f74e101Schristos  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
90f74e101Schristos  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
100f74e101Schristos  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
110f74e101Schristos  * FOR A PARTICULAR PURPOSE.
120f74e101Schristos  *
1372c96ff3Schristos  * Original code by Hannes Gredler (hannes@gredler.at)
140f74e101Schristos  */
150f74e101Schristos 
1611b3aaa1Schristos #include <sys/cdefs.h>
170f74e101Schristos #ifndef lint
18*26ba0b50Schristos __RCSID("$NetBSD: ipproto.c,v 1.8 2024/09/02 16:15:30 christos Exp $");
190f74e101Schristos #endif
200f74e101Schristos 
21c74ad251Schristos #include <config.h>
220f74e101Schristos 
23c74ad251Schristos #include "netdissect-stdinc.h"
240f74e101Schristos 
25fdccd7e4Schristos #include "netdissect.h"
260f74e101Schristos #include "ipproto.h"
270f74e101Schristos 
280f74e101Schristos const struct tok ipproto_values[] = {
290f74e101Schristos     { IPPROTO_HOPOPTS, "Options" },
300f74e101Schristos     { IPPROTO_ICMP, "ICMP" },
310f74e101Schristos     { IPPROTO_IGMP, "IGMP" },
320f74e101Schristos     { IPPROTO_IPV4, "IPIP" },
330f74e101Schristos     { IPPROTO_TCP, "TCP" },
340f74e101Schristos     { IPPROTO_EGP, "EGP" },
350f74e101Schristos     { IPPROTO_PIGP, "IGRP" },
360f74e101Schristos     { IPPROTO_UDP, "UDP" },
370f74e101Schristos     { IPPROTO_DCCP, "DCCP" },
380f74e101Schristos     { IPPROTO_IPV6, "IPv6" },
390f74e101Schristos     { IPPROTO_ROUTING, "Routing" },
400f74e101Schristos     { IPPROTO_FRAGMENT, "Fragment" },
410f74e101Schristos     { IPPROTO_RSVP, "RSVP" },
420f74e101Schristos     { IPPROTO_GRE, "GRE" },
430f74e101Schristos     { IPPROTO_ESP, "ESP" },
440f74e101Schristos     { IPPROTO_AH, "AH" },
450f74e101Schristos     { IPPROTO_MOBILE, "Mobile IP" },
460f74e101Schristos     { IPPROTO_ICMPV6, "ICMPv6" },
470f74e101Schristos     { IPPROTO_MOBILITY_OLD, "Mobile IP (old)" },
480f74e101Schristos     { IPPROTO_EIGRP, "EIGRP" },
490f74e101Schristos     { IPPROTO_OSPF, "OSPF" },
500f74e101Schristos     { IPPROTO_PIM, "PIM" },
510f74e101Schristos     { IPPROTO_IPCOMP, "Compressed IP" },
52c74ad251Schristos     { IPPROTO_VRRP, "VRRP" }, /* See also CARP. */
530f74e101Schristos     { IPPROTO_PGM, "PGM" },
540f74e101Schristos     { IPPROTO_SCTP, "SCTP" },
550f74e101Schristos     { IPPROTO_MOBILITY, "Mobility" },
5611b3aaa1Schristos     { IPPROTO_PFSYNC, "PFSYNC" },
570e9868baSchristos     { IPPROTO_CARP, "CARP" },
58c74ad251Schristos     { IPPROTO_ETHERNET, "Ethernet" },
590f74e101Schristos     { 0, NULL }
600f74e101Schristos };
610f74e101Schristos 
6272c96ff3Schristos /*
6372c96ff3Schristos  * For completeness the number space in the array below comes from IANA:
6472c96ff3Schristos  * https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
6572c96ff3Schristos  * However, the spelling tries to match that of /etc/protocols to achieve as
6672c96ff3Schristos  * much consistency as possible with the previously implemented behaviour,
6772c96ff3Schristos  * which was based on getprotobynumber (3).
6872c96ff3Schristos  */
6972c96ff3Schristos static const char *netdb_protocol_names[256] = {
7072c96ff3Schristos 	"hopopt",            /* 0 (IPPROTO_HOPOPTS, IPv6 Hop-by-Hop Option) */
7172c96ff3Schristos 	"icmp",              /* 1 (IPPROTO_ICMP, Internet Control Message) */
7272c96ff3Schristos 	"igmp",              /* 2 (IPPROTO_IGMP, Internet Group Management) */
7372c96ff3Schristos 	"ggp",               /* 3 (Gateway-to-Gateway) */
7472c96ff3Schristos 	"ipencap",           /* 4 (IPPROTO_IPV4, IPv4 encapsulation) */
7572c96ff3Schristos 	"st",                /* 5 (Stream, ST datagram mode) */
7672c96ff3Schristos 	"tcp",               /* 6 (IPPROTO_TCP, Transmission Control) */
7772c96ff3Schristos 	"cbt",               /* 7 (CBT) */
7872c96ff3Schristos 	"egp",               /* 8 (IPPROTO_EGP, Exterior Gateway Protocol) */
7972c96ff3Schristos 	"igp",               /* 9 (IPPROTO_PIGP, "any private interior gateway
8072c96ff3Schristos 	                      *   (used by Cisco for their IGRP)")
8172c96ff3Schristos 	                      */
8272c96ff3Schristos 	"bbn-rcc-mon",       /* 10 (BBN RCC Monitoring) */
8372c96ff3Schristos 	"nvp-ii",            /* 11 (Network Voice Protocol) */
8472c96ff3Schristos 	"pup",               /* 12 (PARC universal packet protocol) */
8572c96ff3Schristos 	"argus",             /* 13 (ARGUS) */
8672c96ff3Schristos 	"emcon",             /* 14 (EMCON) */
8772c96ff3Schristos 	"xnet",              /* 15 (Cross Net Debugger) */
8872c96ff3Schristos 	"chaos",             /* 16 (Chaos) */
8972c96ff3Schristos 	"udp",               /* 17 (IPPROTO_UDP, User Datagram) */
9072c96ff3Schristos 	"mux",               /* 18 (Multiplexing) */
9172c96ff3Schristos 	"dcn-meas",          /* 19 (DCN Measurement Subsystems) */
9272c96ff3Schristos 	"hmp",               /* 20 (Host Monitoring) */
9372c96ff3Schristos 	"prm",               /* 21 (Packet Radio Measurement) */
9472c96ff3Schristos 	"xns-idp",           /* 22 (XEROX NS IDP) */
9572c96ff3Schristos 	"trunk-1",           /* 23 (Trunk-1) */
9672c96ff3Schristos 	"trunk-2",           /* 24 (Trunk-2) */
9772c96ff3Schristos 	"leaf-1",            /* 25 (Leaf-1) */
9872c96ff3Schristos 	"leaf-2",            /* 26 (Leaf-2) */
9972c96ff3Schristos 	"rdp",               /* 27 (Reliable Data Protocol) */
10072c96ff3Schristos 	"irtp",              /* 28 (Internet Reliable Transaction) */
10172c96ff3Schristos 	"iso-tp4",           /* 29 (ISO Transport Protocol Class 4) */
10272c96ff3Schristos 	"netblt",            /* 30 (Bulk Data Transfer Protocol) */
10372c96ff3Schristos 	"mfe-nsp",           /* 31 (MFE Network Services Protocol) */
10472c96ff3Schristos 	"merit-inp",         /* 32 (MERIT Internodal Protocol) */
10572c96ff3Schristos 	"dccp",              /* 33 (IPPROTO_DCCP, Datagram Congestion
10672c96ff3Schristos 	                      *    Control Protocol)
10772c96ff3Schristos 	                      */
10872c96ff3Schristos 	"3pc",               /* 34 (Third Party Connect Protocol) */
10972c96ff3Schristos 	"idpr",              /* 35 (Inter-Domain Policy Routing Protocol) */
11072c96ff3Schristos 	"xtp",               /* 36 (Xpress Transfer Protocol) */
11172c96ff3Schristos 	"ddp",               /* 37 (Datagram Delivery Protocol) */
11272c96ff3Schristos 	"idpr-cmtp",         /* 38 (IDPR Control Message Transport Proto) */
11372c96ff3Schristos 	"tp++",              /* 39 (TP++ Transport Protocol) */
11472c96ff3Schristos 	"il",                /* 40 (IL Transport Protocol) */
11572c96ff3Schristos 	"ipv6",              /* 41 (IPPROTO_IPV6, IPv6 encapsulation) */
11672c96ff3Schristos 	"sdrp",              /* 42 (Source Demand Routing Protocol) */
11772c96ff3Schristos 	"ipv6-route",        /* 43 (IPPROTO_ROUTING, Routing Header for IPv6) */
11872c96ff3Schristos 	"ipv6-frag",         /* 44 (IPPROTO_FRAGMENT, Fragment Header for
11972c96ff3Schristos 	                      *    IPv6)
12072c96ff3Schristos 	                      */
12172c96ff3Schristos 	"idrp",              /* 45 (Inter-Domain Routing Protocol) */
12272c96ff3Schristos 	"rsvp",              /* 46 (IPPROTO_RSVP, Reservation Protocol) */
12372c96ff3Schristos 	"gre",               /* 47 (IPPROTO_GRE, Generic Routing
12472c96ff3Schristos 	                      *    Encapsulation)
12572c96ff3Schristos 	                      */
12672c96ff3Schristos 	"dsr",               /* 48 (Dynamic Source Routing Protocol) */
12772c96ff3Schristos 	"bna",               /* 49 (BNA) */
12872c96ff3Schristos 	"esp",               /* 50 (IPPROTO_ESP, Encap Security Payload) */
12972c96ff3Schristos 	"ah",                /* 51 (IPPROTO_AH, Authentication Header) */
13072c96ff3Schristos 	"i-nlsp",            /* 52 (Integrated Net Layer Security TUBA) */
13172c96ff3Schristos 	"swipe",             /* 53 (IP with Encryption) */
13272c96ff3Schristos 	"narp",              /* 54 (NBMA Address Resolution Protocol) */
13372c96ff3Schristos 	"mobile",            /* 55 (IPPROTO_MOBILE, IP Mobility) */
13472c96ff3Schristos 	"tlsp",              /* 56 (Transport Layer Security Protocol using
13572c96ff3Schristos 	                      *    Kryptonet key management)
13672c96ff3Schristos 	                      */
13772c96ff3Schristos 	"skip",              /* 57 (SKIP) */
13872c96ff3Schristos 	"ipv6-icmp",         /* 58 (IPPROTO_ICMPV6, ICMP for IPv6) */
13972c96ff3Schristos 	"ipv6-nonxt",        /* 59 (IPPROTO_NONE, No Next Header for IPv6) */
14072c96ff3Schristos 	"ipv6-opts",         /* 60 (IPPROTO_DSTOPTS, Destination Options for
14172c96ff3Schristos 	                      *    IPv6)
14272c96ff3Schristos 	                      */
14372c96ff3Schristos 	NULL,                /* 61 (any host internal protocol) */
14472c96ff3Schristos 	"cftp",              /* 62 (IPPROTO_MOBILITY_OLD, CFTP, see the note
14572c96ff3Schristos 	                      *    in ipproto.h)
14672c96ff3Schristos 	                      */
14772c96ff3Schristos 	NULL,                /* 63 (any local network) */
14872c96ff3Schristos 	"sat-expak",         /* 64 (SATNET and Backroom EXPAK) */
14972c96ff3Schristos 	"kryptolan",         /* 65 (Kryptolan) */
15072c96ff3Schristos 	"rvd",               /* 66 (MIT Remote Virtual Disk Protocol) */
15172c96ff3Schristos 	"ippc",              /* 67 (Internet Pluribus Packet Core) */
15272c96ff3Schristos 	NULL,                /* 68 (any distributed file system) */
15372c96ff3Schristos 	"sat-mon",           /* 69 (SATNET Monitoring) */
15472c96ff3Schristos 	"visa",              /* 70 (VISA Protocol) */
15572c96ff3Schristos 	"ipcv",              /* 71 (Internet Packet Core Utility) */
15672c96ff3Schristos 	"cpnx",              /* 72 (Computer Protocol Network Executive) */
15772c96ff3Schristos 	"rspf",              /* 73 (Radio Shortest Path First, CPHB -- Computer
15872c96ff3Schristos 	                      *    Protocol Heart Beat -- in IANA)
15972c96ff3Schristos 	                      */
16072c96ff3Schristos 	"wsn",               /* 74 (Wang Span Network) */
16172c96ff3Schristos 	"pvp",               /* 75 (Packet Video Protocol) */
16272c96ff3Schristos 	"br-sat-mon",        /* 76 (Backroom SATNET Monitoring) */
16372c96ff3Schristos 	"sun-nd",            /* 77 (IPPROTO_ND, SUN ND PROTOCOL-Temporary) */
16472c96ff3Schristos 	"wb-mon",            /* 78 (WIDEBAND Monitoring) */
16572c96ff3Schristos 	"wb-expak",          /* 79 (WIDEBAND EXPAK) */
16672c96ff3Schristos 	"iso-ip",            /* 80 (ISO Internet Protocol) */
16772c96ff3Schristos 	"vmtp",              /* 81 (Versatile Message Transport) */
16872c96ff3Schristos 	"secure-vmtp",       /* 82 (Secure VMTP) */
16972c96ff3Schristos 	"vines",             /* 83 (VINES) */
17072c96ff3Schristos 	"ttp",               /* 84 (Transaction Transport Protocol, also IPTM --
17172c96ff3Schristos 	                      *    Internet Protocol Traffic Manager)
17272c96ff3Schristos 	                      */
17372c96ff3Schristos 	"nsfnet-igp",        /* 85 (NSFNET-IGP) */
17472c96ff3Schristos 	"dgp",               /* 86 (Dissimilar Gateway Protocol) */
17572c96ff3Schristos 	"tcf",               /* 87 (TCF) */
17672c96ff3Schristos 	"eigrp",             /* 88 (IPPROTO_EIGRP, Cisco EIGRP) */
17772c96ff3Schristos 	"ospf",              /* 89 (IPPROTO_OSPF, Open Shortest Path First
17872c96ff3Schristos 	                      *    IGP)
17972c96ff3Schristos 	                      */
18072c96ff3Schristos 	"sprite-rpc",        /* 90 (Sprite RPC Protocol) */
18172c96ff3Schristos 	"larp",              /* 91 (Locus Address Resolution Protocol) */
18272c96ff3Schristos 	"mtp",               /* 92 (Multicast Transport Protocol) */
18372c96ff3Schristos 	"ax.25",             /* 93 (AX.25 Frames) */
18472c96ff3Schristos 	"ipip",              /* 94 (IP-within-IP Encapsulation Protocol) */
18572c96ff3Schristos 	"micp",              /* 95 (Mobile Internetworking Control Pro.) */
18672c96ff3Schristos 	"scc-sp",            /* 96 (Semaphore Communications Sec. Pro.) */
18772c96ff3Schristos 	"etherip",           /* 97 (Ethernet-within-IP Encapsulation) */
18872c96ff3Schristos 	"encap",             /* 98 (Encapsulation Header) */
18972c96ff3Schristos 	NULL,                /* 99 (any private encryption scheme) */
19072c96ff3Schristos 	"gmtp",              /* 100 (GMTP) */
19172c96ff3Schristos 	"ifmp",              /* 101 (Ipsilon Flow Management Protocol) */
19272c96ff3Schristos 	"pnni",              /* 102 (PNNI over IP) */
19372c96ff3Schristos 	"pim",               /* 103 (IPPROTO_PIM, Protocol Independent
19472c96ff3Schristos 	                      *     Multicast)
19572c96ff3Schristos 	                      */
19672c96ff3Schristos 	"aris",              /* 104 (ARIS) */
19772c96ff3Schristos 	"scps",              /* 105 (SCPS) */
19872c96ff3Schristos 	"qnx",               /* 106 (QNX) */
19972c96ff3Schristos 	"a/n",               /* 107 (Active Networks) */
20072c96ff3Schristos 	"ipcomp",            /* 108 (IPPROTO_IPCOMP, IP Payload Compression
20172c96ff3Schristos 	                      *     Protocol)
20272c96ff3Schristos 	                      */
20372c96ff3Schristos 	"snp",               /* 109 (Sitara Networks Protocol) */
20472c96ff3Schristos 	"compaq-peer",       /* 110 (Compaq Peer Protocol) */
20572c96ff3Schristos 	"ipx-in-ip",         /* 111 (IPX in IP) */
20672c96ff3Schristos 	"vrrp",              /* 112 (IPPROTO_VRRP, Virtual Router Redundancy
20772c96ff3Schristos 	                      *     Protocol)
20872c96ff3Schristos 	                      */
20972c96ff3Schristos 	"pgm",               /* 113 (IPPROTO_PGM, PGM Reliable Transport
21072c96ff3Schristos 	                      *     Protocol)
21172c96ff3Schristos 	                      */
21272c96ff3Schristos 	NULL,                /* 114 (any 0-hop protocol) */
21372c96ff3Schristos 	"l2tp",              /* 115 (Layer Two Tunneling Protocol) */
21472c96ff3Schristos 	"ddx",               /* 116 (D-II Data Exchange (DDX)) */
21572c96ff3Schristos 	"iatp",              /* 117 (Interactive Agent Transfer Protocol) */
21672c96ff3Schristos 	"stp",               /* 118 (Schedule Transfer Protocol) */
21772c96ff3Schristos 	"srp",               /* 119 (SpectraLink Radio Protocol) */
21872c96ff3Schristos 	"uti",               /* 120 (UTI) */
21972c96ff3Schristos 	"smp",               /* 121 (Simple Message Protocol) */
22072c96ff3Schristos 	"sm",                /* 122 (Simple Multicast Protocol) */
22172c96ff3Schristos 	"ptp",               /* 123 (Performance Transparency Protocol) */
22272c96ff3Schristos 	"isis",              /* 124 (ISIS over IPv4) */
22372c96ff3Schristos 	"fire",              /* 125 (FIRE) */
22472c96ff3Schristos 	"crtp",              /* 126 (Combat Radio Transport Protocol) */
22572c96ff3Schristos 	"crudp",             /* 127 (Combat Radio User Datagram) */
22672c96ff3Schristos 	"sscopmce",          /* 128 (SSCOPMCE) */
22772c96ff3Schristos 	"iplt",              /* 129 (IPLT) */
22872c96ff3Schristos 	"sps",               /* 130 (Secure Packet Shield) */
22972c96ff3Schristos 	"pipe",              /* 131 (Private IP Encapsulation within IP) */
23072c96ff3Schristos 	"sctp",              /* 132 (IPPROTO_SCTP, Stream Control Transmission
23172c96ff3Schristos 	                      *     Protocol)
23272c96ff3Schristos 	                      */
23372c96ff3Schristos 	"fc",                /* 133 (Fibre Channel) */
23472c96ff3Schristos 	"rsvp-e2e-ignore",   /* 134 (RSVP-E2E-IGNORE) */
23572c96ff3Schristos 	"mobility-header",   /* 135 (IPPROTO_MOBILITY, Mobility Header) */
23672c96ff3Schristos 	"udplite",           /* 136 (UDPLite) */
23772c96ff3Schristos 	"mpls-in-ip",        /* 137 (MPLS-in-IP) */
23872c96ff3Schristos 	"manet",             /* 138 (MANET Protocols) */
23972c96ff3Schristos 	"hip",               /* 139 (Host Identity Protocol) */
24072c96ff3Schristos 	"shim6",             /* 140 (Shim6 Protocol) */
24172c96ff3Schristos 	"wesp",              /* 141 (Wrapped Encapsulating Security Payload) */
24272c96ff3Schristos 	"rohc",              /* 142 (Robust Header Compression) */
24372c96ff3Schristos 	NULL,                /* 143 (unassigned) */
24472c96ff3Schristos 	NULL,                /* 144 (unassigned) */
24572c96ff3Schristos 	NULL,                /* 145 (unassigned) */
24672c96ff3Schristos 	NULL,                /* 146 (unassigned) */
24772c96ff3Schristos 	NULL,                /* 147 (unassigned) */
24872c96ff3Schristos 	NULL,                /* 148 (unassigned) */
24972c96ff3Schristos 	NULL,                /* 149 (unassigned) */
25072c96ff3Schristos 	NULL,                /* 150 (unassigned) */
25172c96ff3Schristos 	NULL,                /* 151 (unassigned) */
25272c96ff3Schristos 	NULL,                /* 152 (unassigned) */
25372c96ff3Schristos 	NULL,                /* 153 (unassigned) */
25472c96ff3Schristos 	NULL,                /* 154 (unassigned) */
25572c96ff3Schristos 	NULL,                /* 155 (unassigned) */
25672c96ff3Schristos 	NULL,                /* 156 (unassigned) */
25772c96ff3Schristos 	NULL,                /* 157 (unassigned) */
25872c96ff3Schristos 	NULL,                /* 158 (unassigned) */
25972c96ff3Schristos 	NULL,                /* 159 (unassigned) */
26072c96ff3Schristos 	NULL,                /* 160 (unassigned) */
26172c96ff3Schristos 	NULL,                /* 161 (unassigned) */
26272c96ff3Schristos 	NULL,                /* 162 (unassigned) */
26372c96ff3Schristos 	NULL,                /* 163 (unassigned) */
26472c96ff3Schristos 	NULL,                /* 164 (unassigned) */
26572c96ff3Schristos 	NULL,                /* 165 (unassigned) */
26672c96ff3Schristos 	NULL,                /* 166 (unassigned) */
26772c96ff3Schristos 	NULL,                /* 167 (unassigned) */
26872c96ff3Schristos 	NULL,                /* 168 (unassigned) */
26972c96ff3Schristos 	NULL,                /* 169 (unassigned) */
27072c96ff3Schristos 	NULL,                /* 170 (unassigned) */
27172c96ff3Schristos 	NULL,                /* 171 (unassigned) */
27272c96ff3Schristos 	NULL,                /* 172 (unassigned) */
27372c96ff3Schristos 	NULL,                /* 173 (unassigned) */
27472c96ff3Schristos 	NULL,                /* 174 (unassigned) */
27572c96ff3Schristos 	NULL,                /* 175 (unassigned) */
27672c96ff3Schristos 	NULL,                /* 176 (unassigned) */
27772c96ff3Schristos 	NULL,                /* 177 (unassigned) */
27872c96ff3Schristos 	NULL,                /* 178 (unassigned) */
27972c96ff3Schristos 	NULL,                /* 179 (unassigned) */
28072c96ff3Schristos 	NULL,                /* 180 (unassigned) */
28172c96ff3Schristos 	NULL,                /* 181 (unassigned) */
28272c96ff3Schristos 	NULL,                /* 182 (unassigned) */
28372c96ff3Schristos 	NULL,                /* 183 (unassigned) */
28472c96ff3Schristos 	NULL,                /* 184 (unassigned) */
28572c96ff3Schristos 	NULL,                /* 185 (unassigned) */
28672c96ff3Schristos 	NULL,                /* 186 (unassigned) */
28772c96ff3Schristos 	NULL,                /* 187 (unassigned) */
28872c96ff3Schristos 	NULL,                /* 188 (unassigned) */
28972c96ff3Schristos 	NULL,                /* 189 (unassigned) */
29072c96ff3Schristos 	NULL,                /* 190 (unassigned) */
29172c96ff3Schristos 	NULL,                /* 191 (unassigned) */
29272c96ff3Schristos 	NULL,                /* 192 (unassigned) */
29372c96ff3Schristos 	NULL,                /* 193 (unassigned) */
29472c96ff3Schristos 	NULL,                /* 194 (unassigned) */
29572c96ff3Schristos 	NULL,                /* 195 (unassigned) */
29672c96ff3Schristos 	NULL,                /* 196 (unassigned) */
29772c96ff3Schristos 	NULL,                /* 197 (unassigned) */
29872c96ff3Schristos 	NULL,                /* 198 (unassigned) */
29972c96ff3Schristos 	NULL,                /* 199 (unassigned) */
30072c96ff3Schristos 	NULL,                /* 200 (unassigned) */
30172c96ff3Schristos 	NULL,                /* 201 (unassigned) */
30272c96ff3Schristos 	NULL,                /* 202 (unassigned) */
30372c96ff3Schristos 	NULL,                /* 203 (unassigned) */
30472c96ff3Schristos 	NULL,                /* 204 (unassigned) */
30572c96ff3Schristos 	NULL,                /* 205 (unassigned) */
30672c96ff3Schristos 	NULL,                /* 206 (unassigned) */
30772c96ff3Schristos 	NULL,                /* 207 (unassigned) */
30872c96ff3Schristos 	NULL,                /* 208 (unassigned) */
30972c96ff3Schristos 	NULL,                /* 209 (unassigned) */
31072c96ff3Schristos 	NULL,                /* 210 (unassigned) */
31172c96ff3Schristos 	NULL,                /* 211 (unassigned) */
31272c96ff3Schristos 	NULL,                /* 212 (unassigned) */
31372c96ff3Schristos 	NULL,                /* 213 (unassigned) */
31472c96ff3Schristos 	NULL,                /* 214 (unassigned) */
31572c96ff3Schristos 	NULL,                /* 215 (unassigned) */
31672c96ff3Schristos 	NULL,                /* 216 (unassigned) */
31772c96ff3Schristos 	NULL,                /* 217 (unassigned) */
31872c96ff3Schristos 	NULL,                /* 218 (unassigned) */
31972c96ff3Schristos 	NULL,                /* 219 (unassigned) */
32072c96ff3Schristos 	NULL,                /* 220 (unassigned) */
32172c96ff3Schristos 	NULL,                /* 221 (unassigned) */
32272c96ff3Schristos 	NULL,                /* 222 (unassigned) */
32372c96ff3Schristos 	NULL,                /* 223 (unassigned) */
32472c96ff3Schristos 	NULL,                /* 224 (unassigned) */
32572c96ff3Schristos 	NULL,                /* 225 (unassigned) */
32672c96ff3Schristos 	NULL,                /* 226 (unassigned) */
32772c96ff3Schristos 	NULL,                /* 227 (unassigned) */
32872c96ff3Schristos 	NULL,                /* 228 (unassigned) */
32972c96ff3Schristos 	NULL,                /* 229 (unassigned) */
33072c96ff3Schristos 	NULL,                /* 230 (unassigned) */
33172c96ff3Schristos 	NULL,                /* 231 (unassigned) */
33272c96ff3Schristos 	NULL,                /* 232 (unassigned) */
33372c96ff3Schristos 	NULL,                /* 233 (unassigned) */
33472c96ff3Schristos 	NULL,                /* 234 (unassigned) */
33572c96ff3Schristos 	NULL,                /* 235 (unassigned) */
33672c96ff3Schristos 	NULL,                /* 236 (unassigned) */
33772c96ff3Schristos 	NULL,                /* 237 (unassigned) */
33872c96ff3Schristos 	NULL,                /* 238 (unassigned) */
33972c96ff3Schristos 	NULL,                /* 239 (unassigned) */
34072c96ff3Schristos 	NULL,                /* 240 (unassigned) */
34172c96ff3Schristos 	NULL,                /* 241 (unassigned) */
34272c96ff3Schristos 	NULL,                /* 242 (unassigned) */
34372c96ff3Schristos 	NULL,                /* 243 (unassigned) */
34472c96ff3Schristos 	NULL,                /* 244 (unassigned) */
34572c96ff3Schristos 	NULL,                /* 245 (unassigned) */
34672c96ff3Schristos 	NULL,                /* 246 (unassigned) */
34772c96ff3Schristos 	NULL,                /* 247 (unassigned) */
34872c96ff3Schristos 	NULL,                /* 248 (unassigned) */
34972c96ff3Schristos 	NULL,                /* 249 (unassigned) */
35072c96ff3Schristos 	NULL,                /* 250 (unassigned) */
35172c96ff3Schristos 	NULL,                /* 251 (unassigned) */
35272c96ff3Schristos 	NULL,                /* 252 (unassigned) */
35372c96ff3Schristos 	"exptest-253",       /* 253 (Use for experimentation and testing,
35472c96ff3Schristos 	                      *     RFC 3692)
35572c96ff3Schristos 	                      */
35672c96ff3Schristos 	"exptest-254",       /* 254 (Use for experimentation and testing,
35772c96ff3Schristos 	                      *     RFC 3692)
35872c96ff3Schristos 	                      */
35972c96ff3Schristos 	"reserved",          /* 255 (reserved) */
36072c96ff3Schristos };
36172c96ff3Schristos 
36272c96ff3Schristos /* The function enforces the array index to be 8-bit. */
36372c96ff3Schristos const char *
364c74ad251Schristos netdb_protoname (const uint8_t protoid)
36572c96ff3Schristos {
36672c96ff3Schristos 	return netdb_protocol_names[protoid];
36772c96ff3Schristos }
368