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"
38 "SYN_RCVD",
"ESTABLISHED",
"CLOSE_WAIT",
39 "LAST_ACK",
"FIN_WAIT_1",
"FIN_WAIT_2",
40 "CLOSING",
"TIME_WAIT" };
47 .SetGroupName (
"Internet")
48 .AddAttribute (
"SndBufSize",
49 "TcpSocket maximum transmit buffer size (bytes)",
53 MakeUintegerChecker<uint32_t> ())
54 .AddAttribute (
"RcvBufSize",
55 "TcpSocket maximum receive buffer size (bytes)",
59 MakeUintegerChecker<uint32_t> ())
60 .AddAttribute (
"SegmentSize",
61 "TCP maximum segment size in bytes (may be adjusted based on MTU discovery)",
65 MakeUintegerChecker<uint32_t> ())
66 .AddAttribute (
"InitialSlowStartThreshold",
67 "TCP initial slow start threshold (bytes)",
71 MakeUintegerChecker<uint32_t> ())
72 .AddAttribute (
"InitialCwnd",
73 "TCP initial congestion window size (segments)",
77 MakeUintegerChecker<uint32_t> ())
78 .AddAttribute (
"ConnTimeout",
79 "TCP retransmission timeout when opening connection (seconds)",
84 .AddAttribute (
"ConnCount",
85 "Number of connection attempts (SYN retransmissions) before returning failure",
89 MakeUintegerChecker<uint32_t> ())
90 .AddAttribute (
"DelAckTimeout",
91 "Timeout value for TCP delayed acks, in seconds",
96 .AddAttribute (
"DelAckCount",
97 "Number of packets to wait before sending a TCP ack",
101 MakeUintegerChecker<uint32_t> ())
102 .AddAttribute (
"TcpNoDelay",
"Set to true to disable Nagle's algorithm",
107 .AddAttribute (
"PersistTimeout",
108 "Persist timeout to probe for rx window",
virtual void SetSndBufSize(uint32_t size)=0
Set the send buffer size.
AttributeValue implementation for Boolean.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
virtual void SetInitialCwnd(uint32_t cwnd)=0
Set the initial Congestion Window.
virtual void SetRcvBufSize(uint32_t size)=0
Set the receive buffer size.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
virtual void SetInitialSSThresh(uint32_t threshold)=0
Set the initial Slow Start Threshold.
virtual void SetPersistTimeout(Time timeout)=0
Set the timout for persistent connection.
A low-level Socket API based loosely on the BSD Socket API.
static const char *const TcpStateName[TcpSocket::LAST_STATE]
Literal names of TCP states for use in log messages.
static TypeId GetTypeId(void)
Get the type ID.
AttributeValue implementation for Time.
Hold an unsigned integer type.
virtual uint32_t GetSndBufSize(void) const =0
Get the send buffer size.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Last state, used only in debug messages.
virtual void SetDelAckMaxCount(uint32_t count)=0
Set the number of packet to fire an ACK before delay timeout.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
virtual void SetTcpNoDelay(bool noDelay)=0
Enable/Disable Nagle's algorithm.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual uint32_t GetRcvBufSize(void) const =0
Get the receive buffer size.
virtual void SetDelAckTimeout(Time timeout)=0
Set the time to delay an ACK.
virtual void SetConnCount(uint32_t count)=0
Set the number of connection retries before giving up.
virtual uint32_t GetSegSize(void) const =0
Get the segment size.
virtual Time GetDelAckTimeout(void) const =0
Get the time to delay an ACK.
virtual bool GetTcpNoDelay(void) const =0
Check if Nagle's algorithm is enabled or not.
virtual void SetConnTimeout(Time timeout)=0
Set the connection timeout.
virtual uint32_t GetDelAckMaxCount(void) const =0
Get the number of packet to fire an ACK before delay timeout.
virtual Time GetConnTimeout(void) const =0
Get the connection timeout.
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual void SetSegSize(uint32_t size)=0
Set the segment size.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
virtual uint32_t GetInitialCwnd(void) const =0
Get the initial Congestion Window.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual uint32_t GetInitialSSThresh(void) const =0
Get the initial Slow Start Threshold.
virtual Time GetPersistTimeout(void) const =0
Get the timout for persistent connection.
virtual uint32_t GetConnCount(void) const =0
Get the number of connection retries before giving up.