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-link-type-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
* Centralized definitions for packet capture (pcap) data link layer types.
11
* This file contains the data link numbers as used by many packet analyzers.
12
* (e.g., tcpdump, wireshark)
13
* Only a small subset of data link types supported in ns-3 are included.
14
* References:
15
* - https://www.tcpdump.org/linktypes.html
16
* - https://datatracker.ietf.org/doc/draft-ietf-opsawg-pcaplinktype/05/
17
* - https://www.iana.org/assignments/pcap/pcap.xhtml
18
*
19
*/
20
21
#ifndef IANA_LINK_TYPE_NUMBERS_H
22
#define IANA_LINK_TYPE_NUMBERS_H
23
24
#include <cstdint>
25
26
namespace
ns3
27
{
28
namespace
iana
29
{
30
namespace
linktype
// Helper namespace to avoid using scoped enums
31
{
32
constexpr
uint16_t
NULL_LINK
= 0;
//!< BSD loopback encapsulation.
33
constexpr
uint16_t
ETHERNET
= 1;
//!< IEEE 802.3 Ethernet (10Mb, 100Mb, 1000Mb, and up).
34
constexpr
uint16_t
PPP
= 9;
//!< Point to point protococol [RFC1661]/[RFC1662].
35
constexpr
uint16_t
RAW
= 101;
//!< Raw IP; begins with an IPv4 or IPv6 header.
36
constexpr
uint16_t
IEEE802_11
= 105;
//!< IEEE 802.11 wireless LAN.
37
constexpr
uint16_t
LINUX_SLL
= 113;
//!< Linux "cooked" capture encapsulation.
38
constexpr
uint16_t
IEEE802_11_PRISM
= 119;
//!< Prism monitor mode.
39
constexpr
uint16_t
IEEE802_11_RADIOTAP
= 127;
//!< Radiotap header, followed by an 802.11 header.
40
constexpr
uint16_t
IEEE802_15_4_WITHFCS
= 195;
//!< IEEE 802.15.4 packets with FCS.
41
constexpr
uint16_t
IEEE802_15_4_NOFCS
= 230;
//!< IEEE 802.15.4 packets without FCS.
42
constexpr
uint16_t
NETLINK
= 253;
//!< Linux Netlink capture encapsulation [RFC3549].
43
constexpr
uint16_t
LORATAP
= 270;
//!< LoRaTap pseudo-header.
44
}
// namespace linktype
45
}
// namespace iana
46
}
// namespace ns3
47
48
#endif
// IANA_LINK_TYPE_NUMBERS_H
ns3::iana::linktype
Definition
iana-link-type-numbers.h:31
ns3::iana::linktype::IEEE802_11_PRISM
constexpr uint16_t IEEE802_11_PRISM
Prism monitor mode.
Definition
iana-link-type-numbers.h:38
ns3::iana::linktype::RAW
constexpr uint16_t RAW
Raw IP; begins with an IPv4 or IPv6 header.
Definition
iana-link-type-numbers.h:35
ns3::iana::linktype::LORATAP
constexpr uint16_t LORATAP
LoRaTap pseudo-header.
Definition
iana-link-type-numbers.h:43
ns3::iana::linktype::IEEE802_15_4_WITHFCS
constexpr uint16_t IEEE802_15_4_WITHFCS
IEEE 802.15.4 packets with FCS.
Definition
iana-link-type-numbers.h:40
ns3::iana::linktype::ETHERNET
constexpr uint16_t ETHERNET
IEEE 802.3 Ethernet (10Mb, 100Mb, 1000Mb, and up).
Definition
iana-link-type-numbers.h:33
ns3::iana::linktype::PPP
constexpr uint16_t PPP
Point to point protococol [RFC1661]/[RFC1662].
Definition
iana-link-type-numbers.h:34
ns3::iana::linktype::NULL_LINK
constexpr uint16_t NULL_LINK
BSD loopback encapsulation.
Definition
iana-link-type-numbers.h:32
ns3::iana::linktype::IEEE802_11
constexpr uint16_t IEEE802_11
IEEE 802.11 wireless LAN.
Definition
iana-link-type-numbers.h:36
ns3::iana::linktype::NETLINK
constexpr uint16_t NETLINK
Linux Netlink capture encapsulation [RFC3549].
Definition
iana-link-type-numbers.h:42
ns3::iana::linktype::IEEE802_15_4_NOFCS
constexpr uint16_t IEEE802_15_4_NOFCS
IEEE 802.15.4 packets without FCS.
Definition
iana-link-type-numbers.h:41
ns3::iana::linktype::LINUX_SLL
constexpr uint16_t LINUX_SLL
Linux "cooked" capture encapsulation.
Definition
iana-link-type-numbers.h:37
ns3::iana::linktype::IEEE802_11_RADIOTAP
constexpr uint16_t IEEE802_11_RADIOTAP
Radiotap header, followed by an 802.11 header.
Definition
iana-link-type-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-link-type-numbers.h
Generated on
for ns-3 by
1.16.1