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
llc-snap-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
9
#ifndef LLC_SNAP_HEADER_H
10
#define LLC_SNAP_HEADER_H
11
12
#include "ns3/header.h"
13
14
#include <stdint.h>
15
#include <string>
16
17
namespace
ns3
18
{
19
20
/**
21
* The length in octets of the LLC/SNAP header
22
*/
23
static
const
uint16_t
LLC_SNAP_HEADER_LENGTH
= 8;
24
25
/**
26
* @ingroup network
27
*
28
* @brief Header for the LLC/SNAP encapsulation
29
*
30
* For a list of EtherTypes, see
31
* http://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xhtml
32
*/
33
class
LlcSnapHeader
:
public
Header
34
{
35
public
:
36
LlcSnapHeader
();
37
38
/**
39
* @brief Set the Ethertype.
40
* @param type the Ethertype
41
*/
42
void
SetType
(uint16_t type);
43
/**
44
* @brief Return the Ethertype.
45
* @return Ethertype
46
*/
47
uint16_t
GetType
();
48
49
/**
50
* @brief Get the type ID.
51
* @return the object TypeId
52
*/
53
static
TypeId
GetTypeId
();
54
TypeId
GetInstanceTypeId
()
const override
;
55
void
Print
(std::ostream& os)
const override
;
56
uint32_t
GetSerializedSize
()
const override
;
57
void
Serialize
(
Buffer::Iterator
start)
const override
;
58
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
59
60
private
:
61
uint16_t
m_etherType
;
//!< the Ethertype
62
};
63
64
}
// namespace ns3
65
66
#endif
/* LLC_SNAP_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Header
Protocol header serialization and deserialization.
Definition
header.h:33
ns3::LlcSnapHeader
Header for the LLC/SNAP encapsulation.
Definition
llc-snap-header.h:34
ns3::LlcSnapHeader::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Definition
llc-snap-header.cc:86
ns3::LlcSnapHeader::m_etherType
uint16_t m_etherType
the Ethertype
Definition
llc-snap-header.h:61
ns3::LlcSnapHeader::Print
void Print(std::ostream &os) const override
Definition
llc-snap-header.cc:66
ns3::LlcSnapHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
llc-snap-header.cc:50
ns3::LlcSnapHeader::GetType
uint16_t GetType()
Return the Ethertype.
Definition
llc-snap-header.cc:36
ns3::LlcSnapHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
llc-snap-header.cc:60
ns3::LlcSnapHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
llc-snap-header.cc:43
ns3::LlcSnapHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition
llc-snap-header.cc:76
ns3::LlcSnapHeader::SetType
void SetType(uint16_t type)
Set the Ethertype.
Definition
llc-snap-header.cc:29
ns3::LlcSnapHeader::LlcSnapHeader
LlcSnapHeader()
Definition
llc-snap-header.cc:23
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LLC_SNAP_HEADER_LENGTH
static const uint16_t LLC_SNAP_HEADER_LENGTH
The length in octets of the LLC/SNAP header.
Definition
llc-snap-header.h:23
src
network
utils
llc-snap-header.h
Generated on Fri Dec 13 2024 18:20:47 for ns-3 by
1.11.0