21 #include "ns3/object.h"
23 #include "ns3/uinteger.h"
24 #include "ns3/double.h"
25 #include "ns3/boolean.h"
26 #include "ns3/trace-source-accessor.h"
27 #include "ns3/nstime.h"
36 const char*
const TcpSocket::TcpStateName[
LAST_STATE] = {
"CLOSED",
"LISTEN",
"SYN_SENT",
"SYN_RCVD",
"ESTABLISHED",
"CLOSE_WAIT",
"LAST_ACK",
"FIN_WAIT_1",
"FIN_WAIT_2",
"CLOSING",
"TIME_WAIT" };
43 .AddAttribute (
"SndBufSize",
44 "TcpSocket maximum transmit buffer size (bytes)",
48 MakeUintegerChecker<uint32_t> ())
49 .AddAttribute (
"RcvBufSize",
50 "TcpSocket maximum receive buffer size (bytes)",
54 MakeUintegerChecker<uint32_t> ())
55 .AddAttribute (
"SegmentSize",
56 "TCP maximum segment size in bytes (may be adjusted based on MTU discovery)",
60 MakeUintegerChecker<uint32_t> ())
61 .AddAttribute (
"SlowStartThreshold",
62 "TCP slow start threshold (bytes)",
66 MakeUintegerChecker<uint32_t> ())
67 .AddAttribute (
"InitialCwnd",
68 "TCP initial congestion window size (segments)",
72 MakeUintegerChecker<uint32_t> ())
73 .AddAttribute (
"ConnTimeout",
74 "TCP retransmission timeout when opening connection (seconds)",
79 .AddAttribute (
"ConnCount",
80 "Number of connection attempts (SYN retransmissions) before returning failure",
84 MakeUintegerChecker<uint32_t> ())
85 .AddAttribute (
"DelAckTimeout",
86 "Timeout value for TCP delayed acks, in seconds",
91 .AddAttribute (
"DelAckCount",
92 "Number of packets to wait before sending a TCP ack",
96 MakeUintegerChecker<uint32_t> ())
97 .AddAttribute (
"TcpNoDelay",
"Set to true to disable Nagle's algorithm",
101 MakeBooleanChecker ())
102 .AddAttribute (
"PersistTimeout",
103 "Persist timeout to probe for rx window",
virtual void SetSndBufSize(uint32_t size)=0
virtual void SetSSThresh(uint32_t threshold)=0
#define NS_LOG_COMPONENT_DEFINE(name)
#define NS_LOG_FUNCTION_NOARGS()
virtual void SetRcvBufSize(uint32_t size)=0
virtual void SetPersistTimeout(Time timeout)=0
A low-level Socket API based loosely on the BSD Socket API.A few things to keep in mind about this ty...
static TypeId GetTypeId(void)
static const char *const TcpStateName[LAST_STATE]
hold objects of type ns3::Time
Hold an unsigned integer type.
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
virtual uint32_t GetSndBufSize(void) const =0
virtual void SetDelAckMaxCount(uint32_t count)=0
virtual void SetTcpNoDelay(bool noDelay)=0
virtual uint32_t GetSSThresh(void) const =0
virtual uint32_t GetRcvBufSize(void) const =0
virtual void SetDelAckTimeout(Time timeout)=0
virtual void SetConnCount(uint32_t count)=0
virtual uint32_t GetSegSize(void) const =0
virtual Time GetDelAckTimeout(void) const =0
virtual bool GetTcpNoDelay(void) const =0
virtual void SetInitialCwnd(uint32_t count)=0
virtual void SetConnTimeout(Time timeout)=0
virtual uint32_t GetDelAckMaxCount(void) const =0
virtual Time GetConnTimeout(void) const =0
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. Both limits are inclusive.
virtual void SetSegSize(uint32_t size)=0
a unique identifier for an interface.
virtual uint32_t GetInitialCwnd(void) const =0
TypeId SetParent(TypeId tid)
virtual Time GetPersistTimeout(void) const =0
virtual uint32_t GetConnCount(void) const =0