A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
iana-internet-protocol-numbers.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2026 Tokushima University, Japan
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
7
*
8
*/
9
10
/*
11
* Centralized definitions for internet protocol numbers.
12
* This enumeration contains the IEEE 802 protocol numbers as defined by IANA.
13
* This represents only a portion of the complete list, protocols should
14
* be added as needed.
15
*
16
* In the Internet Protocol version 4 (IPv4) [RFC791] there is a field
17
* called "Protocol" to identify the next level protocol. This is an 8
18
* bit field. In Internet Protocol version 6 (IPv6) [RFC8200], this field
19
* is called the "Next Header" field.
20
* References:
21
* - https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
22
23
*/
24
25
#ifndef IANA_INTERNET_PROTOCOL_NUMBERS_H
26
#define IANA_INTERNET_PROTOCOL_NUMBERS_H
27
28
#include <cstdint>
29
30
namespace
ns3
31
{
32
namespace
iana
33
{
34
namespace
internetprotocolnumbers
35
{
36
constexpr
uint8_t
HOPOPT
= 0;
//!< IPv6 Hop-by-Hop Option [RFC8200]
37
constexpr
uint8_t
ICMP
= 1;
//!< Internet Control Message for IPV4 [RFC792]
38
constexpr
uint8_t
IGMP
= 2;
//!< Internet Group Management [RFC1112]
39
constexpr
uint8_t
TCP
= 6;
//!< Transmission Control [RFC9293]
40
constexpr
uint8_t
UDP
= 17;
//!< User Datagram [RFC768]
41
constexpr
uint8_t
IPV6_FRAG
= 44;
//!< IPV6 Fragment Header
42
constexpr
uint8_t
DSR
= 48;
//!< Dynamic Source Routing Protocol [RFC4728]
43
constexpr
uint8_t
ICMPV6
= 58;
//!< ICMP for IPv6 [RFC8200]
44
constexpr
uint8_t
NO_NEXT_HEADER
= 59;
//!< No Next Header for IPV4 and IPv6 [RFC8200]
45
constexpr
uint8_t
MANET
= 138;
//!< MANET Protocols [RFC5498]
46
}
// namespace internetprotocolnumbers
47
}
// namespace iana
48
}
// namespace ns3
49
50
#endif
// IANA_INTERNET_PROTOCOL_NUMBERS_H
ns3::iana::internetprotocolnumbers
Definition
iana-internet-protocol-numbers.h:35
ns3::iana::internetprotocolnumbers::NO_NEXT_HEADER
constexpr uint8_t NO_NEXT_HEADER
No Next Header for IPV4 and IPv6 [RFC8200].
Definition
iana-internet-protocol-numbers.h:44
ns3::iana::internetprotocolnumbers::ICMP
constexpr uint8_t ICMP
Internet Control Message for IPV4 [RFC792].
Definition
iana-internet-protocol-numbers.h:37
ns3::iana::internetprotocolnumbers::IPV6_FRAG
constexpr uint8_t IPV6_FRAG
IPV6 Fragment Header.
Definition
iana-internet-protocol-numbers.h:41
ns3::iana::internetprotocolnumbers::DSR
constexpr uint8_t DSR
Dynamic Source Routing Protocol [RFC4728].
Definition
iana-internet-protocol-numbers.h:42
ns3::iana::internetprotocolnumbers::ICMPV6
constexpr uint8_t ICMPV6
ICMP for IPv6 [RFC8200].
Definition
iana-internet-protocol-numbers.h:43
ns3::iana::internetprotocolnumbers::MANET
constexpr uint8_t MANET
MANET Protocols [RFC5498].
Definition
iana-internet-protocol-numbers.h:45
ns3::iana::internetprotocolnumbers::UDP
constexpr uint8_t UDP
User Datagram [RFC768].
Definition
iana-internet-protocol-numbers.h:40
ns3::iana::internetprotocolnumbers::HOPOPT
constexpr uint8_t HOPOPT
IPv6 Hop-by-Hop Option [RFC8200].
Definition
iana-internet-protocol-numbers.h:36
ns3::iana::internetprotocolnumbers::IGMP
constexpr uint8_t IGMP
Internet Group Management [RFC1112].
Definition
iana-internet-protocol-numbers.h:38
ns3::iana::internetprotocolnumbers::TCP
constexpr uint8_t TCP
Transmission Control [RFC9293].
Definition
iana-internet-protocol-numbers.h:39
ns3::iana
Definition
iana-ieee802-numbers.h:29
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
utils
iana-internet-protocol-numbers.h
Generated on
for ns-3 by
1.16.1