2
* Copyright (c) 2009 Lukas Mejdrech
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
9
* - Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* - Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
* - The name of the author may not be used to endorse or promote products
15
* derived from this software without specific prior written permission.
17
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
* Internet protocol numbers according to the on-line IANA - Assigned Protocol numbers - <http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml>, cited January 14 2009.
37
#ifndef __NET_IPPROTOCOLS_H__
38
#define __NET_IPPROTOCOLS_H__
40
/** @name IP protocols definitions
44
/** IPv6 Hop-by-Hop Option internet protocol number.
46
#define IPPROTO_HOPOPT 0
48
/** Internet Control Message internet protocol number.
50
#define IPPROTO_ICMP 1
52
/** Internet Group Management internet protocol number.
54
#define IPPROTO_IGMP 2
56
/** Gateway-to-Gateway internet protocol number.
60
/** IP in IP (encapsulation) internet protocol number.
64
/** Stream internet protocol number.
68
/** Transmission Control internet protocol number.
72
/** CBT internet protocol number.
76
/** Exterior Gateway Protocol internet protocol number.
80
/** any private interior gateway
81
(used by Cisco for their IGRP) internet protocol number.
85
/** BBN RCC Monitoring internet protocol number.
87
#define IPPROTO_BBN_RCC_MON 10
89
/** Network Voice Protocol internet protocol number.
91
#define IPPROTO_NVP_II 11
93
/** PUP internet protocol number.
95
#define IPPROTO_PUP 12
97
/** ARGUS internet protocol number.
99
#define IPPROTO_ARGUS 13
101
/** EMCON internet protocol number.
103
#define IPPROTO_EMCON 14
105
/** Cross Net Debugger internet protocol number.
107
#define IPPROTO_XNET 15
109
/** Chaos internet protocol number.
111
#define IPPROTO_CHAOS 16
113
/** User Datagram internet protocol number.
115
#define IPPROTO_UDP 17
117
/** Multiplexing internet protocol number.
119
#define IPPROTO_MUX 18
121
/** DCN Measurement Subsystems internet protocol number.
123
#define IPPROTO_DCN_MEAS 19
125
/** Host Monitoring internet protocol number.
127
#define IPPROTO_HMP 20
129
/** Packet Radio Measurement internet protocol number.
131
#define IPPROTO_PRM 21
133
/** XEROX NS IDP internet protocol number.
135
#define IPPROTO_XNS_IDP 22
137
/** Trunk-1 internet protocol number.
139
#define IPPROTO_TRUNK_1 23
141
/** Trunk-2 internet protocol number.
143
#define IPPROTO_TRUNK_2 24
145
/** Leaf-1 internet protocol number.
147
#define IPPROTO_LEAF_1 25
149
/** Leaf-2 internet protocol number.
151
#define IPPROTO_LEAF_2 26
153
/** Reliable Data Protocol internet protocol number.
155
#define IPPROTO_RDP 27
157
/** Internet Reliable Transaction internet protocol number.
159
#define IPPROTO_IRTP 28
161
/** ISO Transport Protocol Class 4 internet protocol number.
163
#define IPPROTO_ISO_TP4 29
165
/** Bulk Data Transfer Protocol internet protocol number.
167
#define IPPROTO_NETBLT 30
169
/** MFE Network Services Protocol internet protocol number.
171
#define IPPROTO_MFE_NSP 31
173
/** MERIT Internodal Protocol internet protocol number.
175
#define IPPROTO_MERIT_INP 32
177
/** Datagram Congestion Control Protocol internet protocol number.
179
#define IPPROTO_DCCP 33
181
/** Third Party Connect Protocol internet protocol number.
183
#define IPPROTO_3PC 34
185
/** Inter-Domain Policy Routing Protocol internet protocol number.
187
#define IPPROTO_IDPR 35
189
/** XTP internet protocol number.
191
#define IPPROTO_XTP 36
193
/** Datagram Delivery Protocol internet protocol number.
195
#define IPPROTO_DDP 37
197
/** IDPR Control Message Transport Proto internet protocol number.
199
#define IPPROTO_IDPR_CMTP 38
201
/** TP++ Transport Protocol internet protocol number.
203
#define IPPROTO_TP 39
205
/** IL Transport Protocol internet protocol number.
207
#define IPPROTO_IL 40
209
/** Ipv6 internet protocol number.
211
#define IPPROTO_IPV6 41
213
/** Source Demand Routing Protocol internet protocol number.
215
#define IPPROTO_SDRP 42
217
/** Routing Header for IPv6 internet protocol number.
219
#define IPPROTO_IPv6_Route 43
221
/** Fragment Header for IPv6 internet protocol number.
223
#define IPPROTO_IPv6_Frag 44
225
/** Inter-Domain Routing Protocol internet protocol number.
227
#define IPPROTO_IDRP 45
229
/** Reservation Protocol internet protocol number.
231
#define IPPROTO_RSVP 46
233
/** General Routing Encapsulation internet protocol number.
235
#define IPPROTO_GRE 47
237
/** Dynamic Source Routing Protocol internet protocol number.
239
#define IPPROTO_DSR 48
241
/** BNA internet protocol number.
243
#define IPPROTO_BNA 49
245
/** Encap Security Payload internet protocol number.
247
#define IPPROTO_ESP 50
249
/** Authentication Header internet protocol number.
251
#define IPPROTO_AH 51
253
/** Integrated Net Layer Security TUBA internet protocol number.
255
#define IPPROTO_I_NLSP 52
257
/** IP with Encryption internet protocol number.
259
#define IPPROTO_SWIPE 53
261
/** NBMA Address Resolution Protocol internet protocol number.
263
#define IPPROTO_NARP 54
265
/** IP Mobility internet protocol number.
267
#define IPPROTO_MOBILE 55
269
/** Transport Layer Security Protocol
270
using Kryptonet key management internet protocol number.
272
#define IPPROTO_TLSP 56
274
/** SKIP internet protocol number.
276
#define IPPROTO_SKIP 57
278
/** ICMP for IPv6 internet protocol number.
280
#define IPPROTO_IPv6_ICMP 58
282
/** No Next Header for IPv6 internet protocol number.
284
#define IPPROTO_IPv6_NoNxt 59
286
/** Destination Options for IPv6 internet protocol number.
288
#define IPPROTO_IPv6_Opts 60
290
/** Any host internal protocol internet protocol number.
292
#define IPPROTO_AHIP 61
294
/** CFTP internet protocol number.
296
#define IPPROTO_CFTP 62
298
/** Any local network internet protocol number.
300
#define IPPROTO_ALN 63
302
/** SATNET and Backroom EXPAK internet protocol number.
304
#define IPPROTO_SAT_EXPAK 64
306
/** Kryptolan internet protocol number.
308
#define IPPROTO_KRYPTOLAN 65
310
/** MIT Remote Virtual Disk Protocol internet protocol number.
312
#define IPPROTO_RVD 66
314
/** Internet Pluribus Packet Core internet protocol number.
316
#define IPPROTO_IPPC 67
318
/** Any distributed file system internet protocol number.
320
#define IPPROTO_ADFS 68
322
/** SATNET Monitoring internet protocol number.
324
#define IPPROTO_SAT_MON 69
326
/** VISA Protocol internet protocol number.
328
#define IPPROTO_VISA 70
330
/** Internet Packet Core Utility internet protocol number.
332
#define IPPROTO_IPCV 71
334
/** Computer Protocol Network Executive internet protocol number.
336
#define IPPROTO_CPNX 72
338
/** Computer Protocol Heart Beat internet protocol number.
340
#define IPPROTO_CPHB 73
342
/** Wang Span Network internet protocol number.
344
#define IPPROTO_WSN 74
346
/** Packet Video Protocol internet protocol number.
348
#define IPPROTO_PVP 75
350
/** Backroom SATNET Monitoring internet protocol number.
352
#define IPPROTO_BR_SAT_MON 76
354
/** SUN ND IPPROTOCOL_Temporary internet protocol number.
356
#define IPPROTO_SUN_ND 77
358
/** WIDEBAND Monitoring internet protocol number.
360
#define IPPROTO_WB_MON 78
362
/** WIDEBAND EXPAK internet protocol number.
364
#define IPPROTO_WB_EXPAK 79
366
/** ISO Internet Protocol internet protocol number.
368
#define IPPROTO_ISO_IP 80
370
/** VMTP internet protocol number.
372
#define IPPROTO_VMTP 81
374
/** SECURE-VMTP internet protocol number.
376
#define IPPROTO_SECURE_VMTP 82
378
/** VINES internet protocol number.
380
#define IPPROTO_VINES 83
382
/** TTP internet protocol number.
384
#define IPPROTO_TTP 84
386
/** NSFNET-IGP internet protocol number.
388
#define IPPROTO_NSFNET_IGP 85
390
/** Dissimilar Gateway Protocol internet protocol number.
392
#define IPPROTO_DGP 86
394
/** TCF internet protocol number.
396
#define IPPROTO_TCF 87
398
/** EIGRP internet protocol number.
400
#define IPPROTO_EIGRP 88
402
/** OSPFIGP internet protocol number.
404
#define IPPROTO_OSPFIGP 89
406
/** Sprite RPC Protocol internet protocol number.
408
#define IPPROTO_Sprite_RPC 90
410
/** Locus Address Resolution Protocol internet protocol number.
412
#define IPPROTO_LARP 91
414
/** Multicast Transport Protocol internet protocol number.
416
#define IPPROTO_MTP 92
418
/** AX.25 Frames internet protocol number.
420
#define IPPROTO_AX25 93
422
/** IP-within-IP Encapsulation Protocol internet protocol number.
424
#define IPPROTO_IPIP 94
426
/** Mobile Internetworking Control Pro. internet protocol number.
428
#define IPPROTO_MICP 95
430
/** Semaphore Communications Sec. Pro. internet protocol number.
432
#define IPPROTO_SCC_SP 96
434
/** Ethernet-within-IP Encapsulation internet protocol number.
436
#define IPPROTO_ETHERIP 97
438
/** Encapsulation Header internet protocol number.
440
#define IPPROTO_ENCAP 98
442
/** Any private encryption scheme internet protocol number.
444
#define IPPROTO_APES 99
446
/** GMTP internet protocol number.
448
#define IPPROTO_GMTP 100
450
/** Ipsilon Flow Management Protocol internet protocol number.
452
#define IPPROTO_IFMP 101
454
/** PNNI over IP internet protocol number.
456
#define IPPROTO_PNNI 102
458
/** Protocol Independent Multicast internet protocol number.
460
#define IPPROTO_PIM 103
462
/** ARIS internet protocol number.
464
#define IPPROTO_ARIS 104
466
/** SCPS internet protocol number.
468
#define IPPROTO_SCPS 105
470
/** QNX internet protocol number.
472
#define IPPROTO_QNX 106
474
/** Active Networks internet protocol number.
476
#define IPPROTO_AN 107
478
/** IP Payload Compression Protocol internet protocol number.
480
#define IPPROTO_IPComp 108
482
/** Sitara Networks Protocol internet protocol number.
484
#define IPPROTO_SNP 109
486
/** Compaq Peer Protocol internet protocol number.
488
#define IPPROTO_Compaq_Peer 110
490
/** IPX in IP internet protocol number.
492
#define IPPROTO_IPX_in_IP 111
494
/** Virtual Router Redundancy Protocol internet protocol number.
496
#define IPPROTO_VRRP 112
498
/** PGM Reliable Transport Protocol internet protocol number.
500
#define IPPROTO_PGM 113
502
/** Any 0-hop protocol internet protocol number.
504
#define IPPROTO_A0HP 114
506
/** Layer Two Tunneling Protocol internet protocol number.
508
#define IPPROTO_L2TP 115
510
/** D-II Data Exchange (DDX) internet protocol number.
512
#define IPPROTO_DDX 116
514
/** Interactive Agent Transfer Protocol internet protocol number.
516
#define IPPROTO_IATP 117
518
/** Schedule Transfer Protocol internet protocol number.
520
#define IPPROTO_STP 118
522
/** SpectraLink Radio Protocol internet protocol number.
524
#define IPPROTO_SRP 119
526
/** UTI internet protocol number.
528
#define IPPROTO_UTI 120
530
/** Simple Message Protocol internet protocol number.
532
#define IPPROTO_SMP 121
534
/** SM internet protocol number.
536
#define IPPROTO_SM 122
538
/** Performance Transparency Protocol internet protocol number.
540
#define IPPROTO_PTP 123
542
/** ISIS over IPv4 internet protocol number.
544
#define IPPROTO_ISIS 124
546
/** FIRE internet protocol number.
548
#define IPPROTO_FIRE 125
550
/** Combat Radio Transport Protocol internet protocol number.
552
#define IPPROTO_CRTP 126
554
/** Combat Radio User Datagram internet protocol number.
556
#define IPPROTO_CRUDP 127
558
/** SSCOPMCE internet protocol number.
560
#define IPPROTO_SSCOPMCE 128
562
/** IPLT internet protocol number.
564
#define IPPROTO_IPLT 129
566
/** Secure Packet Shield internet protocol number.
568
#define IPPROTO_SPS 130
570
/** Private IP Encapsulation within IP internet protocol number.
572
#define IPPROTO_PIPE 131
574
/** Stream Control Transmission Protocol internet protocol number.
576
#define IPPROTO_SCTP 132
578
/** Fibre Channel internet protocol number.
580
#define IPPROTO_FC 133
582
/** RSVP-E2E-IGNORE internet protocol number.
584
#define IPPROTO_RSVP_E2E_IGNORE 134
586
/** Mobility Header internet protocol number.
588
#define IPPROTO_MH 135
590
/** UDPLite internet protocol number.
592
#define IPPROTO_UDPLITE 136
594
/** MPLS-in-IP internet protocol number.
596
#define IPPROTO_MPLS_in_IP 137
598
/** MANET Protocols internet protocol number.
600
#define IPPROTO_manet 138
602
/** Host Identity Protocol internet protocol number.
604
#define IPPROTO_HIP 139
606
/** Raw internet protocol number.
608
#define IPPROTO_RAW 255
610
/** Maximum internet protocol number.
612
#define IPPROTO_MAX ( IPPROTO_RAW + 1 )