A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
llc-snap-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
20
#ifndef LLC_SNAP_HEADER_H
21
#define LLC_SNAP_HEADER_H
22
23
#include "ns3/header.h"
24
25
#include <stdint.h>
26
#include <string>
27
28
namespace
ns3
29
{
30
34
static
const
uint16_t
LLC_SNAP_HEADER_LENGTH
= 8;
35
44
class
LlcSnapHeader
:
public
Header
45
{
46
public
:
47
LlcSnapHeader
();
48
53
void
SetType
(uint16_t
type
);
58
uint16_t
GetType
();
59
64
static
TypeId
GetTypeId
();
65
TypeId
GetInstanceTypeId
()
const override
;
66
void
Print
(std::ostream& os)
const override
;
67
uint32_t
GetSerializedSize
()
const override
;
68
void
Serialize
(
Buffer::Iterator
start
)
const override
;
69
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
70
71
private
:
72
uint16_t
m_etherType
;
73
};
74
75
}
// namespace ns3
76
77
#endif
/* LLC_SNAP_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::LlcSnapHeader
Header for the LLC/SNAP encapsulation.
Definition:
llc-snap-header.h:45
ns3::LlcSnapHeader::m_etherType
uint16_t m_etherType
the Ethertype
Definition:
llc-snap-header.h:72
ns3::LlcSnapHeader::Print
void Print(std::ostream &os) const override
Definition:
llc-snap-header.cc:77
ns3::LlcSnapHeader::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
llc-snap-header.cc:61
ns3::LlcSnapHeader::GetType
uint16_t GetType()
Return the Ethertype.
Definition:
llc-snap-header.cc:47
ns3::LlcSnapHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
llc-snap-header.cc:71
ns3::LlcSnapHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
llc-snap-header.cc:54
ns3::LlcSnapHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
llc-snap-header.cc:87
ns3::LlcSnapHeader::SetType
void SetType(uint16_t type)
Set the Ethertype.
Definition:
llc-snap-header.cc:40
ns3::LlcSnapHeader::LlcSnapHeader
LlcSnapHeader()
Definition:
llc-snap-header.cc:34
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:704
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:34
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:520
src
network
utils
llc-snap-header.h
Generated on Sun Mar 3 2024 17:11:06 for ns-3 by
1.9.1