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
tcp-option-rfc793.h
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
* Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
7
*/
8
#ifndef TCPOPTIONRFC793_H
9
#define TCPOPTIONRFC793_H
10
11
#include "
tcp-option.h
"
12
13
namespace
ns3
14
{
15
16
/**
17
* @ingroup tcp
18
*
19
* Defines the TCP option of kind 0 (end of option list) as in \RFC{793}
20
*/
21
class
TcpOptionEnd
:
public
TcpOption
22
{
23
public
:
24
TcpOptionEnd
();
25
~TcpOptionEnd
()
override
;
26
27
/**
28
* @brief Get the type ID.
29
* @return the object TypeId
30
*/
31
static
TypeId
GetTypeId
();
32
33
void
Print
(std::ostream& os)
const override
;
34
void
Serialize
(
Buffer::Iterator
start)
const override
;
35
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
36
37
uint8_t
GetKind
()
const override
;
38
uint32_t
GetSerializedSize
()
const override
;
39
};
40
41
/**
42
* Defines the TCP option of kind 1 (no operation) as in \RFC{793}
43
*/
44
class
TcpOptionNOP
:
public
TcpOption
45
{
46
public
:
47
TcpOptionNOP
();
48
~TcpOptionNOP
()
override
;
49
50
/**
51
* @brief Get the type ID.
52
* @return the object TypeId
53
*/
54
static
TypeId
GetTypeId
();
55
56
void
Print
(std::ostream& os)
const override
;
57
void
Serialize
(
Buffer::Iterator
start)
const override
;
58
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
59
60
uint8_t
GetKind
()
const override
;
61
uint32_t
GetSerializedSize
()
const override
;
62
};
63
64
/**
65
* Defines the TCP option of kind 2 (maximum segment size) as in \RFC{793}
66
*/
67
class
TcpOptionMSS
:
public
TcpOption
68
{
69
public
:
70
TcpOptionMSS
();
71
~TcpOptionMSS
()
override
;
72
73
/**
74
* @brief Get the type ID.
75
* @return the object TypeId
76
*/
77
static
TypeId
GetTypeId
();
78
79
void
Print
(std::ostream& os)
const override
;
80
void
Serialize
(
Buffer::Iterator
start)
const override
;
81
uint32_t
Deserialize
(
Buffer::Iterator
start)
override
;
82
83
uint8_t
GetKind
()
const override
;
84
uint32_t
GetSerializedSize
()
const override
;
85
86
/**
87
* @brief Get the Maximum Segment Size stored in the Option
88
* @return The Maximum Segment Size
89
*/
90
uint16_t
GetMSS
()
const
;
91
/**
92
* @brief Set the Maximum Segment Size stored in the Option
93
* @param mss The Maximum Segment Size
94
*/
95
void
SetMSS
(uint16_t mss);
96
97
protected
:
98
uint16_t
m_mss
;
//!< maximum segment size
99
};
100
101
}
// namespace ns3
102
103
#endif
// TCPOPTIONRFC793_H
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::TcpOptionEnd::TcpOptionEnd
TcpOptionEnd()
Definition
tcp-option-rfc793.cc:22
ns3::TcpOptionEnd::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
Definition
tcp-option-rfc793.cc:54
ns3::TcpOptionEnd::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the `kind' (as in \RFC{793}) of this option.
Definition
tcp-option-rfc793.cc:48
ns3::TcpOptionEnd::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-option-rfc793.cc:32
ns3::TcpOptionEnd::~TcpOptionEnd
~TcpOptionEnd() override
Definition
tcp-option-rfc793.cc:27
ns3::TcpOptionEnd::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
Definition
tcp-option-rfc793.cc:61
ns3::TcpOptionEnd::GetKind
uint8_t GetKind() const override
Definition
tcp-option-rfc793.cc:77
ns3::TcpOptionEnd::Print
void Print(std::ostream &os) const override
Print the Option contents.
Definition
tcp-option-rfc793.cc:42
ns3::TcpOption::TcpOption
TcpOption()
Definition
tcp-option.cc:29
ns3::TcpOptionMSS::GetMSS
uint16_t GetMSS() const
Get the Maximum Segment Size stored in the Option.
Definition
tcp-option-rfc793.cc:217
ns3::TcpOptionMSS::m_mss
uint16_t m_mss
maximum segment size
Definition
tcp-option-rfc793.h:98
ns3::TcpOptionMSS::SetMSS
void SetMSS(uint16_t mss)
Set the Maximum Segment Size stored in the Option.
Definition
tcp-option-rfc793.cc:223
ns3::TcpOptionMSS::TcpOptionMSS
TcpOptionMSS()
Definition
tcp-option-rfc793.cc:149
ns3::TcpOptionMSS::~TcpOptionMSS
~TcpOptionMSS() override
Definition
tcp-option-rfc793.cc:155
ns3::TcpOptionMSS::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-option-rfc793.cc:160
ns3::TcpOptionMSS::GetKind
uint8_t GetKind() const override
Definition
tcp-option-rfc793.cc:211
ns3::TcpOptionMSS::Print
void Print(std::ostream &os) const override
Print the Option contents.
Definition
tcp-option-rfc793.cc:170
ns3::TcpOptionMSS::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the `kind' (as in \RFC{793}) of this option.
Definition
tcp-option-rfc793.cc:176
ns3::TcpOptionMSS::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
Definition
tcp-option-rfc793.cc:182
ns3::TcpOptionMSS::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
Definition
tcp-option-rfc793.cc:191
ns3::TcpOptionNOP::Deserialize
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
Definition
tcp-option-rfc793.cc:125
ns3::TcpOptionNOP::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
Definition
tcp-option-rfc793.cc:118
ns3::TcpOptionNOP::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the `kind' (as in \RFC{793}) of this option.
Definition
tcp-option-rfc793.cc:112
ns3::TcpOptionNOP::TcpOptionNOP
TcpOptionNOP()
Definition
tcp-option-rfc793.cc:86
ns3::TcpOptionNOP::GetKind
uint8_t GetKind() const override
Definition
tcp-option-rfc793.cc:140
ns3::TcpOptionNOP::Print
void Print(std::ostream &os) const override
Print the Option contents.
Definition
tcp-option-rfc793.cc:106
ns3::TcpOptionNOP::~TcpOptionNOP
~TcpOptionNOP() override
Definition
tcp-option-rfc793.cc:91
ns3::TcpOptionNOP::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-option-rfc793.cc:96
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:49
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-option.h
src
internet
model
tcp-option-rfc793.h
Generated on
for ns-3 by
1.15.0