A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-option-sack-permitted.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Adrian Sai-wah Tam
3 * Copyright (c) 2015 ResiliNets, ITTC, University of Kansas
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Original Author: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
8 * Documentation, test cases: Truc Anh N. Nguyen <annguyen@ittc.ku.edu>
9 * ResiliNets Research Group https://resilinets.org/
10 * The University of Kansas
11 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
12 */
13
14#ifndef TCP_OPTION_SACK_PERMITTED_H
15#define TCP_OPTION_SACK_PERMITTED_H
16
17#include "tcp-option.h"
18
19namespace ns3
20{
21
22/**
23 * \brief Defines the TCP option of kind 4 (selective acknowledgment permitted
24 * option) as in \RFC{2018}
25 *
26 * TCP Sack-Permitted Option is 2-byte in length and sent in a SYN segment by a
27 * TCP host that can recognize and process SACK option during the lifetime of a
28 * connection.
29 */
30
32{
33 public:
34 /**
35 * \brief Get the type ID.
36 * \return the object TypeId
37 */
38 static TypeId GetTypeId();
39 TypeId GetInstanceTypeId() const override;
40
42 ~TcpOptionSackPermitted() override;
43
44 void Print(std::ostream& os) const override;
45 void Serialize(Buffer::Iterator start) const override;
47
48 uint8_t GetKind() const override;
49 uint32_t GetSerializedSize() const override;
50};
51
52} // namespace ns3
53
54#endif /* TCP_OPTION_SACK_PERMITTED */
iterator in a Buffer instance
Definition buffer.h:89
Base class for all kinds of TCP options.
Definition tcp-option.h:27
Defines the TCP option of kind 4 (selective acknowledgment permitted option) as in RFC 2018
void Serialize(Buffer::Iterator start) const override
Serialize the Option to a buffer iterator.
uint32_t Deserialize(Buffer::Iterator start) override
Deserialize the Option from a buffer iterator.
static TypeId GetTypeId()
Get the type ID.
void Print(std::ostream &os) const override
Print the Option contents.
uint32_t GetSerializedSize() const override
Returns number of bytes required for Option serialization.
uint8_t GetKind() const override
Get the ‘kind’ (as in RFC 793 ) of this option.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.