A Discrete-Event Network Simulator
lorawan @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
l
m
n
o
p
q
r
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Symbols
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
e
l
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
▼
ns-3
►
ns-3 Documentation
►
All Environment Variables
Todo List
Deprecated List
Bug List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
doc
►
examples
▼
src
►
antenna
►
aodv
►
applications
►
bridge
►
brite
►
buildings
►
click
►
config-store
►
core
►
csma
►
csma-layout
►
dsdv
►
dsr
►
energy
►
fd-net-device
►
flow-monitor
▼
internet
►
examples
►
helper
▼
model
arp-cache.cc
►
arp-cache.h
arp-header.cc
arp-header.h
arp-l3-protocol.cc
arp-l3-protocol.h
arp-queue-disc-item.cc
arp-queue-disc-item.h
►
candidate-queue.cc
candidate-queue.h
►
global-route-manager-impl.cc
►
global-route-manager-impl.h
global-route-manager.cc
global-route-manager.h
►
global-router-interface.cc
►
global-router-interface.h
global-routing.h
icmpv4-l4-protocol.cc
icmpv4-l4-protocol.h
icmpv4.cc
icmpv4.h
icmpv6-header.cc
icmpv6-header.h
icmpv6-l4-protocol.cc
icmpv6-l4-protocol.h
ip-l4-protocol.cc
ip-l4-protocol.h
►
ipv4-address-generator.cc
ipv4-address-generator.h
ipv4-end-point-demux.cc
ipv4-end-point-demux.h
ipv4-end-point.cc
ipv4-end-point.h
ipv4-global-routing.cc
ipv4-global-routing.h
ipv4-header.cc
ipv4-header.h
►
ipv4-interface-address.cc
►
ipv4-interface-address.h
ipv4-interface.cc
ipv4-interface.h
ipv4-l3-protocol.cc
►
ipv4-l3-protocol.h
ipv4-list-routing.cc
ipv4-list-routing.h
ipv4-packet-filter.cc
ipv4-packet-filter.h
ipv4-packet-info-tag.cc
ipv4-packet-info-tag.h
ipv4-packet-probe.cc
ipv4-packet-probe.h
ipv4-queue-disc-item.cc
ipv4-queue-disc-item.h
ipv4-raw-socket-factory-impl.cc
ipv4-raw-socket-factory-impl.h
ipv4-raw-socket-factory.cc
ipv4-raw-socket-factory.h
ipv4-raw-socket-impl.cc
►
ipv4-raw-socket-impl.h
►
ipv4-route.cc
►
ipv4-route.h
ipv4-routing-protocol.cc
ipv4-routing-protocol.h
►
ipv4-routing-table-entry.cc
►
ipv4-routing-table-entry.h
►
ipv4-static-routing.cc
ipv4-static-routing.h
ipv4.cc
ipv4.h
►
ipv6-address-generator.cc
ipv6-address-generator.h
ipv6-autoconfigured-prefix.cc
ipv6-autoconfigured-prefix.h
ipv6-end-point-demux.cc
ipv6-end-point-demux.h
ipv6-end-point.cc
ipv6-end-point.h
ipv6-extension-demux.cc
ipv6-extension-demux.h
ipv6-extension-header.cc
ipv6-extension-header.h
ipv6-extension.cc
ipv6-extension.h
ipv6-header.cc
ipv6-header.h
►
ipv6-interface-address.cc
►
ipv6-interface-address.h
ipv6-interface.cc
ipv6-interface.h
►
ipv6-l3-protocol.cc
ipv6-l3-protocol.h
ipv6-list-routing.cc
ipv6-list-routing.h
ipv6-option-demux.cc
ipv6-option-demux.h
ipv6-option-header.cc
►
ipv6-option-header.h
ipv6-option.cc
ipv6-option.h
ipv6-packet-filter.cc
ipv6-packet-filter.h
ipv6-packet-info-tag.cc
ipv6-packet-info-tag.h
ipv6-packet-probe.cc
ipv6-packet-probe.h
ipv6-pmtu-cache.cc
ipv6-pmtu-cache.h
ipv6-queue-disc-item.cc
ipv6-queue-disc-item.h
ipv6-raw-socket-factory-impl.cc
ipv6-raw-socket-factory-impl.h
ipv6-raw-socket-factory.cc
ipv6-raw-socket-factory.h
ipv6-raw-socket-impl.cc
►
ipv6-raw-socket-impl.h
►
ipv6-route.cc
►
ipv6-route.h
ipv6-routing-protocol.cc
ipv6-routing-protocol.h
►
ipv6-routing-table-entry.cc
►
ipv6-routing-table-entry.h
ipv6-static-routing.cc
ipv6-static-routing.h
ipv6.cc
ipv6.h
loopback-net-device.cc
loopback-net-device.h
►
ndisc-cache.cc
►
ndisc-cache.h
►
rip-header.cc
►
rip-header.h
►
rip.cc
►
rip.h
►
ripng-header.cc
►
ripng-header.h
►
ripng.cc
►
ripng.h
►
rtt-estimator.cc
rtt-estimator.h
tcp-bbr.cc
tcp-bbr.h
tcp-bic.cc
tcp-bic.h
tcp-congestion-ops.cc
►
tcp-congestion-ops.h
►
tcp-cubic.cc
►
tcp-cubic.h
tcp-dctcp.cc
tcp-dctcp.h
►
tcp-header.cc
tcp-header.h
tcp-highspeed.cc
tcp-highspeed.h
tcp-htcp.cc
tcp-htcp.h
tcp-hybla.cc
tcp-hybla.h
tcp-illinois.cc
tcp-illinois.h
►
tcp-l4-protocol.cc
tcp-l4-protocol.h
tcp-ledbat.cc
►
tcp-ledbat.h
tcp-linux-reno.cc
tcp-linux-reno.h
tcp-lp.cc
tcp-lp.h
tcp-option-rfc793.cc
►
tcp-option-rfc793.h
tcp-option-sack-permitted.cc
►
tcp-option-sack-permitted.h
►
tcp-option-sack.cc
►
tcp-option-sack.h
tcp-option-ts.cc
tcp-option-ts.h
tcp-option-winscale.cc
tcp-option-winscale.h
tcp-option.cc
tcp-option.h
tcp-prr-recovery.cc
tcp-prr-recovery.h
►
tcp-rate-ops.cc
►
tcp-rate-ops.h
tcp-recovery-ops.cc
►
tcp-recovery-ops.h
tcp-rx-buffer.cc
tcp-rx-buffer.h
tcp-scalable.cc
tcp-scalable.h
►
tcp-socket-base.cc
►
tcp-socket-base.h
tcp-socket-factory-impl.cc
tcp-socket-factory-impl.h
tcp-socket-factory.cc
tcp-socket-factory.h
tcp-socket-state.cc
►
tcp-socket-state.h
►
tcp-socket.cc
►
tcp-socket.h
►
tcp-tx-buffer.cc
►
tcp-tx-buffer.h
tcp-tx-item.cc
►
tcp-tx-item.h
tcp-vegas.cc
tcp-vegas.h
tcp-veno.cc
tcp-veno.h
tcp-westwood-plus.cc
tcp-westwood-plus.h
tcp-yeah.cc
tcp-yeah.h
udp-header.cc
udp-header.h
udp-l4-protocol.cc
udp-l4-protocol.h
udp-socket-factory-impl.cc
udp-socket-factory-impl.h
udp-socket-factory.cc
udp-socket-factory.h
►
udp-socket-impl.cc
udp-socket-impl.h
udp-socket.cc
udp-socket.h
win32-internet.h
►
windowed-filter.h
►
test
►
internet-apps
►
lorawan
►
lr-wpan
►
lte
►
mesh
►
mobility
►
mpi
►
netanim
►
network
►
nix-vector-routing
►
olsr
►
openflow
►
point-to-point
►
point-to-point-layout
►
propagation
►
sixlowpan
►
spectrum
►
stats
►
tap-bridge
►
test
►
topology-read
►
traffic-control
►
uan
►
virtual-net-device
►
visualizer
►
wifi
►
wimax
►
utils
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
tcp-option-sack-permitted.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Adrian Sai-wah Tam
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Original Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
7
* Documentation, test cases: Truc Anh N. Nguyen <annguyen@ittc.ku.edu>
8
* ResiliNets Research Group https://resilinets.org/
9
* The University of Kansas
10
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
11
*/
12
13
#include "
tcp-option-sack-permitted.h
"
14
15
#include "ns3/log.h"
16
17
namespace
ns3
18
{
19
20
NS_LOG_COMPONENT_DEFINE
(
"TcpOptionSackPermitted"
);
21
22
NS_OBJECT_ENSURE_REGISTERED
(TcpOptionSackPermitted);
23
24
TcpOptionSackPermitted::TcpOptionSackPermitted
()
25
:
TcpOption
()
26
{
27
}
24
TcpOptionSackPermitted::TcpOptionSackPermitted
() {
…
}
28
29
TcpOptionSackPermitted::~TcpOptionSackPermitted
()
30
{
31
}
29
TcpOptionSackPermitted::~TcpOptionSackPermitted
() {
…
}
32
33
TypeId
34
TcpOptionSackPermitted::GetTypeId
()
35
{
36
static
TypeId
tid =
TypeId
(
"ns3::TcpOptionSackPermitted"
)
37
.
SetParent
<
TcpOption
>()
38
.SetGroupName(
"Internet"
)
39
.AddConstructor<
TcpOptionSackPermitted
>();
40
return
tid;
41
}
34
TcpOptionSackPermitted::GetTypeId
() {
…
}
42
43
TypeId
44
TcpOptionSackPermitted::GetInstanceTypeId
()
const
45
{
46
return
GetTypeId
();
47
}
44
TcpOptionSackPermitted::GetInstanceTypeId
()
const
{
…
}
48
49
void
50
TcpOptionSackPermitted::Print
(std::ostream& os)
const
51
{
52
os <<
"[sack_perm]"
;
53
}
50
TcpOptionSackPermitted::Print
(std::ostream& os)
const
{
…
}
54
55
uint32_t
56
TcpOptionSackPermitted::GetSerializedSize
()
const
57
{
58
return
2;
59
}
56
TcpOptionSackPermitted::GetSerializedSize
()
const
{
…
}
60
61
void
62
TcpOptionSackPermitted::Serialize
(
Buffer::Iterator
start)
const
63
{
64
Buffer::Iterator
i = start;
65
i.
WriteU8
(
GetKind
());
// Kind
66
i.
WriteU8
(2);
// Length
67
}
62
TcpOptionSackPermitted::Serialize
(
Buffer::Iterator
start)
const
{
…
}
68
69
uint32_t
70
TcpOptionSackPermitted::Deserialize
(
Buffer::Iterator
start)
71
{
72
Buffer::Iterator
i = start;
73
74
uint8_t readKind = i.
ReadU8
();
75
if
(readKind !=
GetKind
())
76
{
77
NS_LOG_WARN
(
"Malformed Sack-Permitted option"
);
78
return
0;
79
}
80
81
uint8_t size = i.
ReadU8
();
82
if
(size != 2)
83
{
84
NS_LOG_WARN
(
"Malformed Sack-Permitted option"
);
85
return
0;
86
}
87
return
GetSerializedSize
();
88
}
70
TcpOptionSackPermitted::Deserialize
(
Buffer::Iterator
start) {
…
}
89
90
uint8_t
91
TcpOptionSackPermitted::GetKind
()
const
92
{
93
return
TcpOption::SACKPERMITTED
;
94
}
91
TcpOptionSackPermitted::GetKind
()
const
{
…
}
95
96
}
// namespace ns3
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8()
Definition
buffer.h:1016
ns3::Buffer::Iterator::WriteU8
void WriteU8(uint8_t data)
Definition
buffer.h:870
ns3::TcpOption
Base class for all kinds of TCP options.
Definition
tcp-option.h:27
ns3::TcpOption::SACKPERMITTED
@ SACKPERMITTED
SACKPERMITTED.
Definition
tcp-option.h:51
ns3::TcpOptionSackPermitted
Defines the TCP option of kind 4 (selective acknowledgment permitted option) as in RFC 2018
Definition
tcp-option-sack-permitted.h:32
ns3::TcpOptionSackPermitted::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
Definition
tcp-option-sack-permitted.cc:62
ns3::TcpOptionSackPermitted::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
Definition
tcp-option-sack-permitted.cc:70
ns3::TcpOptionSackPermitted::~TcpOptionSackPermitted
~TcpOptionSackPermitted() override
Definition
tcp-option-sack-permitted.cc:29
ns3::TcpOptionSackPermitted::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-option-sack-permitted.cc:34
ns3::TcpOptionSackPermitted::Print
void Print(std::ostream &os) const override
Print the Option contents.
Definition
tcp-option-sack-permitted.cc:50
ns3::TcpOptionSackPermitted::TcpOptionSackPermitted
TcpOptionSackPermitted()
Definition
tcp-option-sack-permitted.cc:24
ns3::TcpOptionSackPermitted::GetSerializedSize
uint32_t GetSerializedSize() const override
Returns number of bytes required for Option serialization.
Definition
tcp-option-sack-permitted.cc:56
ns3::TcpOptionSackPermitted::GetKind
uint8_t GetKind() const override
Get the ‘kind’ (as in RFC 793 ) of this option.
Definition
tcp-option-sack-permitted.cc:91
ns3::TcpOptionSackPermitted::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
tcp-option-sack-permitted.cc:44
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
uint32_t
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_WARN
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition
log.h:250
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-option-sack-permitted.h
src
internet
model
tcp-option-sack-permitted.cc
Generated on Mon Jan 27 2025 16:35:48 for ns-3 by
1.11.0