|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
19 #define __STDC_LIMIT_MACROS
21 #include "ns3/node-container.h"
22 #include "ns3/tcp-socket-base.h"
23 #include "ns3/simple-net-device-helper.h"
24 #include "ns3/ipv4-address-helper.h"
25 #include "ns3/internet-stack-helper.h"
27 #include "ns3/queue.h"
28 #include "ns3/tcp-l4-protocol.h"
29 #include "ns3/ipv4-end-point.h"
30 #include "ns3/ipv6-end-point.h"
31 #include "ns3/tcp-header.h"
32 #include "ns3/tcp-tx-buffer.h"
33 #include "ns3/tcp-rx-buffer.h"
34 #include "ns3/rtt-estimator.h"
44 m_congControlTypeId (
TcpNewReno::GetTypeId ()),
63 while ((packet = socket->
RecvFrom (from)))
74 uint32_t pktCount,
Time pktInterval )
82 socket,
pktSize, pktCount - 1, pktInterval);
152 senderDev->
GetQueue ()->TraceConnect (
"Drop",
"SENDER",
158 receiverDev->
GetQueue ()->TraceConnect (
"Drop",
"RECEIVER",
167 ipv4.
SetBase (
"10.1.1.0",
"255.255.255.0");
207 m_senderSocket->TraceConnectWithoutContext (
"CongestionWindowInflated",
227 m_senderSocket->m_rateOps->TraceConnectWithoutContext (
"TcpRateUpdated",
229 m_senderSocket->m_rateOps->TraceConnectWithoutContext (
"TcpRateSampleUpdated",
294 congestionAlgorithmFactory.
SetTypeId (congControl);
295 recoveryAlgorithmFactory.
SetTypeId (recoveryAlgorithm);
303 socket->SetNode (node);
305 socket->SetRtt (rtt);
306 socket->SetCongestionControlAlgorithm (algo);
307 socket->SetRecoveryAlgorithm (recovery);
338 if (context.compare (
"SENDER") == 0)
342 else if (context.compare (
"RECEIVER") == 0)
348 NS_FATAL_ERROR (
"Packet dropped in a queue, but queue not recognized");
356 if (context.compare (
"SENDER") == 0)
360 else if (context.compare (
"RECEIVER") == 0)
366 NS_FATAL_ERROR (
"Packet dropped in a queue, but queue not recognized");
390 bool isRetransmission)
573 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_retxThresh;
590 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_dupAckCount;
607 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_delAckMaxCount;
624 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->GetDelAckTimeout ();
628 return DynamicCast<TcpSocketMsgBase> (
m_receiverSocket)->GetDelAckTimeout ();
641 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->GetSegSize ();
664 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->GetInitialCwnd ();
681 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->GetInitialSSThresh ();
685 return DynamicCast<TcpSocketMsgBase> (
m_receiverSocket)->GetInitialSSThresh ();
698 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_rto.Get ();
732 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_cnTimeout;
766 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_clockGranularity;
770 return DynamicCast<TcpSocketMsgBase> (
m_receiverSocket)->m_clockGranularity;
783 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_state.Get ();
801 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_rWnd.Get ();
819 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_persistEvent;
837 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_persistTimeout;
873 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_tcb->m_rxBuffer;
891 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_txBuffer;
1045 .SetGroupName (
"Internet")
1054 return CopyObject<TcpSocketMsgBase> (
this);
1120 bool isRetransmission)
1148 .SetGroupName (
"Internet")
1204 NS_LOG_WARN (
"Failed to send empty packet due to null endpoint");
1224 if (hasSyn || hasFin)
1306 NS_LOG_LOGIC (
"Schedule retransmission timeout at time "
1323 return CopyObject<TcpSocketSmallAcks> (
this);
holds a vector of ns3::NetDevice pointers
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void TxPacketCb(const Ptr< const Packet > p, const TcpHeader &h, const Ptr< const TcpSocketBase > tcp)
Tx packet Callback.
void SetProcessedAckCb(AckManagementCb cb)
Set the callback invoked when an ACK is received and processed (at the end of the processing)
virtual uint16_t AdvertisedWindowSize(bool scale=true) const
The amount of Rx window announced to the peer.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
Time m_startTime
Data transmission time.
T Get(void) const
Get the underlying value.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void BytesInFlightTrace(uint32_t oldValue, uint32_t newValue)
Bytes in flight changes.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
virtual void NextTxSeqTrace(SequenceNumber32 oldValue, SequenceNumber32 newValue)
Next tx seq changes.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
static void ScheduleWithContext(uint32_t context, Time const &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
void NormalCloseCb(Ptr< Socket > socket)
Normal Close Callback.
void RxPacketCb(const Ptr< const Packet > p, const TcpHeader &h, const Ptr< const TcpSocketBase > tcp)
Rx packet Callback.
An identifier for simulation events.
virtual void RcvAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Received ack.
@ LAST_ACK
Our side has shutdown after remote has shutdown.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void SetCloseCallbacks(Callback< void, Ptr< Socket > > normalClose, Callback< void, Ptr< Socket > > errorClose)
Detect socket recv() events such as graceful shutdown or error.
virtual void DataSent(uint32_t size, SocketWho who)
Notifying application for sent data.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< SimpleChannel > CreateChannel()
Create and return the channel installed between the two socket.
void ProcessedAckCb(Ptr< const Packet > p, const TcpHeader &h, Ptr< const TcpSocketBase > tcp)
ACK processed Callback.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Base class for all RTT Estimators.
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx.
bool IsNull(void) const
Check for null implementation.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
void SetCongestionControl(TypeId congControl)
Congestion control of the sender socket.
uint32_t m_pktCount
Count of the application packet.
TracedValue< SequenceNumber32 > m_nextTxSequence
Next seqnum to be sent (SND.NXT), ReTx pushes it back.
TcpGeneralTest(const std::string &desc)
TcpGeneralTest constructor.
TcpSocket::TcpStates_t GetTcpState(SocketWho who)
Get the state of the TCP state machine.
virtual void ConfigureProperties(void)
Change the configuration of the socket properties.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
virtual Ptr< Node > GetNode(void) const =0
Return the node this socket is associated with.
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Tracks the congestion window changes.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
static void EnablePrinting(void)
Enable printing packets metadata.
Time GetConnTimeout(SocketWho who)
Get the retransmission time for the SYN segments.
void SetPaceInitialWindow(SocketWho who, bool paceWindow)
Enable or disable pacing of the initial window.
Ipv6Address GetLocalAddress()
Get the local address.
Class for inserting callbacks special points of the flow of TCP sockets.
RetrCb m_beforeRetrCallback
Before retransmission callback.
virtual Ptr< TcpSocketMsgBase > CreateSocket(Ptr< Node > node, TypeId socketType, TypeId congControl)
Create a socket.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
void ForkCb(Ptr< TcpSocketMsgBase > tcp)
Fork Callback.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
uint32_t m_bytesToAck
Number of bytes to be ACKed.
uint32_t GetRWnd(SocketWho who)
Get the rWnd of the selected socket.
@ FIN_WAIT_1
Our side has shutdown, waiting to complete transmission of remaining buffered data
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void HandleAccept(Ptr< Socket > socket, const Address &from)
Handle an accept connection.
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
Ipv4 addresses are stored in host order in this class.
void AddOptions(TcpHeader &tcpHeader)
Add options to TcpHeader.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
EventId m_retxEvent
Retransmission event.
uint32_t m_pktSize
Size of the application packet.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
AckManagementCb m_rcvAckCb
Receive ACK callback.
void SetTtl(uint8_t ttl)
Set the tag's TTL.
virtual void ReTxTimeout(void)
An RTO event happened.
virtual bool SetMtu(const uint16_t mtu)
TypeId m_recoveryTypeId
Recovery.
Ipv4EndPoint * m_endPoint
the IPv4 endpoint
A base class for implementation of a stream socket using TCP.
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Ptr< TcpSocketState > m_tcb
Congestion control information.
virtual void RateSampleUpdatedTrace(const TcpRateLinux::TcpRateSample &sample)
Track the rate sample value of TcpRateLinux.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
virtual uint8_t GetIpTtl(void) const
Query the value of IP Time to Live field of this socket.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
Ptr< TcpSocketMsgBase > m_receiverSocket
Pointer to receiver socket.
virtual void ReTxTimeout(void)
An RTO event happened.
Callback< R, Ts... > MakeNullCallback(void)
InetSocketAddress m_remoteAddr
Remote peer address.
virtual void HighestTxSeqTrace(SequenceNumber32 oldValue, SequenceNumber32 newValue)
Highest tx seq changes.
virtual uint8_t GetIpv6HopLimit(void) const
Query the value of IP Hop Limit field of this socket.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Ptr< TcpL4Protocol > m_tcp
the associated TCP L4 protocol
A TCP socket which sends ACKs smaller than the segment received.
Ipv6Address GetPeerAddress()
Get the peer address.
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
uint16_t GetLocalPort(void)
Get the local port.
void SetRecvCallback(Callback< void, Ptr< Socket > > receivedData)
Notify application when new data is available to be read.
uint32_t GetInitialCwnd(SocketWho who)
Get the initial congestion window.
virtual void RateUpdatedTrace(const TcpRateLinux::TcpRateConnection &rate)
Track the rate value of TcpRateLinux.
void BeforeRetransmitCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
Invoked before a retransmit event.
Ptr< TcpSocketMsgBase > m_senderSocket
Pointer to sender socket.
virtual void UpdateRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update the RTT history, when we send TCP segments.
virtual Ptr< ErrorModel > CreateSenderErrorModel()
Create and return the error model to install in the sender node.
RetrCb m_afterRetrCallback
After retransmission callback.
a polymophic address class
EventId m_delAckEvent
Delayed ACK timeout event.
virtual void PhyDrop(SocketWho who)
Link drop.
uint32_t m_mtu
MTU of the environment.
virtual Ptr< Node > GetNode(void) const
Return the node this socket is associated with.
virtual void SendEmptyPacket(uint8_t flags)
Send a empty packet that carries a flag, e.g., ACK.
Time m_clockGranularity
Clock Granularity used in RTO calcs.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
static TypeId GetTypeId(void)
Get the type ID.
virtual void RtoTrace(Time oldValue, Time newValue)
RTO changes.
void SetDelAckMaxCount(SocketWho who, uint32_t count)
Forcefully set the delayed acknowledgement count.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet.
Time GetDelAckTimeout(SocketWho who)
Get the timeout of delayed ack (if present)
virtual Ptr< Packet > RecvFrom(uint32_t maxSize, uint32_t flags, Address &fromAddress)=0
Read a single packet from the socket and retrieve the sender address.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ipv6EndPoint * m_endPoint6
the IPv6 endpoint
UpdateRttCallback m_updateRttCb
Update RTT callback.
This class implements a tag that carries the socket-specific HOPLIMIT of a packet to the IPv6 layer.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
#define NS_UNUSED(x)
Mark a local variable as unused.
Instantiate subclasses of ns3::Object.
uint16_t GetLocalPort()
Get the local port.
virtual void CompleteFork(Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Complete a connection by forking the socket.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet.
virtual void CWndInflTrace(uint32_t oldValue, uint32_t newValue)
Tracks the inflated congestion window changes.
void SetAppPktInterval(Time pktInterval)
Interval between app-generated packet.
virtual void ConfigureEnvironment(void)
Change the configuration of the environment.
void ErrorCloseCb(Ptr< Socket > socket)
Error Close Callback.
virtual void DoTeardown(void)
Teardown the TCP test.
Time GetMinRto(SocketWho who)
Get the minimum RTO attribute.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
@ CLOSING
Both sides have shutdown but we still have data we have to finish sending
uint16_t GetPeerPort()
Get the peer port.
build a set of SimpleNetDevice objects
Ipv4Address GetLocalAddress(void)
Get the local address.
void SetPacingStatus(SocketWho who, bool pacing)
Enable or disable pacing in the TCP socket.
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
void RcvAckCb(Ptr< const Packet > p, const TcpHeader &h, Ptr< const TcpSocketBase > tcp)
Receive ACK Callback.
bool IsManualIpv6HopLimit(void) const
Checks if the socket has a specific IPv6 Hop Limit set.
indicates whether the socket has IPV6_TCLASS set.
Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
Simulation virtual time values and global simulation resolution.
virtual int Close(void)=0
Close a socket.
virtual void ErrorClose(SocketWho who)
Socket closed with an error.
virtual void UpdatedRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission, SocketWho who)
Updated the Rtt history.
virtual void NormalClose(SocketWho who)
Socket closed normally.
Ptr< TcpRxBuffer > GetRxBuffer(SocketWho who)
Get the Rx buffer from selected socket.
virtual void CompleteFork(Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Complete a connection by forking the socket.
void SetAfterRetransmitCb(RetrCb cb)
Set the callback invoked after the processing of a retransmit timeout.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
virtual void CongStateTrace(const TcpSocketState::TcpCongState_t oldValue, const TcpSocketState::TcpCongState_t newValue)
State on Ack state machine changes.
Ptr< Queue< Packet > > GetQueue(void) const
Get a copy of the attached Queue.
void SetRcvAckCb(AckManagementCb cb)
Set the callback invoked when an ACK is received (at the beginning of the processing)
virtual void ReceivePacket(Ptr< Socket > socket)
Packet received.
void PhyDropCb(std::string context, Ptr< const Packet > p)
Drop at Phy layer Callback.
void SetBeforeRetransmitCb(RetrCb cb)
Set the callback invoked before the processing of a retransmit timeout.
void SetUpdateRttHistoryCb(UpdateRttCallback cb)
Set the callback invoked when we update rtt history.
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
virtual void BeforeRTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
static void Run(void)
Run the simulation.
TracedValue< TcpStates_t > m_state
TCP state.
AckManagementCb m_processedAckCb
Processed ACK callback.
virtual void DoRun(void)
Execute the tcp test.
Ptr< TcpRxBuffer > m_rxBuffer
Rx buffer (reordering buffer)
virtual void RttTrace(Time oldTime, Time newTime)
Rtt changes.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Ptr< RttEstimator > m_rtt
Round trip time estimator.
Time GetPersistentTimeout(SocketWho who)
Get the persistent timeout of the selected socket.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number.
Time m_minRto
minimum value of the Retransmit timeout
uint32_t m_bytesLeftToBeAcked
Number of bytes to be ACKed left.
void SetForkCb(Callback< void, Ptr< TcpSocketMsgBase > > cb)
Set the callback invoked after the forking.
Time GetRto(SocketWho who)
Get the retransmission time.
void DataSentCb(Ptr< Socket > socket, uint32_t size)
Data sent Callback.
bool IsManualIpv6Tclass(void) const
Checks if the socket has a specific IPv6 Tclass set.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
UseEcn_t
Parameter value related to ECN enable/disable functionality similar to sysctl for tcp_ecn.
static Ipv4Address GetAny(void)
SequenceNumber32 m_lastAckedSeq
Last sequence number ACKed.
void SetTclass(uint8_t tclass)
Set the tag's Tclass.
Congestion control abstract class.
indicates whether the socket has IP_TOS set.
SequenceNumber32 GetHighestTxMark(SocketWho who)
Get the highest tx mark of the node specified.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SendPacket(Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval)
Send packets to other endpoint.
uint32_t m_delAckCount
Delayed ACK counter.
void QueueDropCb(std::string context, Ptr< const Packet > p)
Queue Drop Callback.
void SetTos(uint8_t tos)
Set the tag's TOS.
uint32_t GetDupAckCount(SocketWho who)
Get the number of dupack received.
virtual void SsThreshTrace(uint32_t oldValue, uint32_t newValue)
Slow start threshold changes.
uint32_t GetDelAckCount(SocketWho who)
Get the number of delayed ack (if present)
EventId GetPersistentEvent(SocketWho who)
Get the persistent event of the selected socket.
void UpdateRttHistoryCb(Ptr< const TcpSocketBase > tcp, const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update RTT with new data.
void DoConnect()
Scheduled at 0.0, SENDER starts the connection to RECEIVER.
Time Seconds(double value)
Construct a Time in the indicated unit.
bool TraceConnect(std::string name, std::string context, const CallbackBase &cb)
Connect a TraceSource to a Callback with a context.
Callback< void, Ptr< TcpSocketMsgBase > > m_forkCb
Fork callback.
uint32_t m_synCount
Count of remaining connection retries.
virtual void QueueDrop(SocketWho who)
Drop on the queue.
TracedValue< Time > m_rto
Retransmit timeout.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
This class implements a tag that carries the socket-specific TTL of a packet to the IP layer.
TypeId m_congControlTypeId
Congestion control.
Time m_interPacketInterval
Time between sending application packet down to tcp socket.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
uint32_t pktSize
packet size used for the simulation (in bytes)
The NewReno implementation.
The Classic recovery implementation.
AttributeValue implementation for Time.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
static TypeId GetTypeId(void)
Get the type ID.
uint32_t GetReTxThreshold(SocketWho who)
Get the retransmission threshold.
keep track of a set of node pointers.
virtual void UpdateRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update the RTT history, when we send TCP segments.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
uint16_t GetPeerPort(void)
Get the peer port.
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_txTrace
Trace of transmitted packets.
static TypeId GetTypeId(void)
Get the type ID.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
TCP socket creation and multiplexing/demultiplexing.
void AfterRetransmitCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
Invoked after a retransmit event.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
uint32_t GetInitialSsThresh(SocketWho who)
Get the initial slow start threshold.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void SetUseEcn(SocketWho who, TcpSocketState::UseEcn_t useEcn)
Forcefully set the ECN mode of use.
Ptr< NetDevice > m_boundnetdevice
the device this socket is bound to (might be null).
void CloseAndNotify(void)
Peacefully close the socket by notifying the upper layer and deallocate end point.
Time m_propagationDelay
Propagation delay of the channel.
uint32_t m_synRetries
Number of connection attempts.
Ipv4Address GetPeerAddress(void)
Get the peer address.
virtual Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
void SetRecoveryAlgorithm(TypeId recovery)
recovery algorithm of the sender socket
virtual void AfterRTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
void SetInitialSsThresh(SocketWho who, uint32_t initialSsThresh)
Forcefully set the initial ssthresh.
aggregate IP/TCP/UDP functionality to existing Nodes.
bool IsManualIpTtl(void) const
Checks if the socket has a specific IPv4 TTL set.
uint8_t GetIpTos(void) const
Query the value of IP Type of Service of this socket.
Time m_cnTimeout
Timeout for connection retry.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Time GetClockGranularity(SocketWho who)
Get the clock granularity attribute.
uint8_t GetIpv6Tclass(void) const
Query the value of IPv6 Traffic Class field of this socket.
void SetHopLimit(uint8_t hopLimit)
Set the tag's Hop Limit.
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SimpleNetDevice.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Ptr< TcpTxBuffer > GetTxBuffer(SocketWho who)
Get the Tx buffer from selected socket.
Ptr< RttEstimator > GetRttEstimator(SocketWho who)
Get the Rtt estimator of the socket.
TcpStates_t
Names of the 11 TCP states.
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.