A Discrete-Event Network Simulator
API
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
TcpSocketHalfAck Class Reference

Socket that the 50% of the times saves the entire packet in the buffer, while in the other 50% saves only half the packet. More...

+ Inheritance diagram for TcpSocketHalfAck:

Public Member Functions

 TcpSocketHalfAck ()
 
- Public Member Functions inherited from ns3::TcpSocketMsgBase
 TcpSocketMsgBase ()
 
 TcpSocketMsgBase (const TcpSocketMsgBase &other)
 Constructor. More...
 
void SetAfterRetransmitCb (RetrCb cb)
 Set the callback invoked after the processing of a retransmit timeout. More...
 
void SetBeforeRetransmitCb (RetrCb cb)
 Set the callback invoked before the processing of a retransmit timeout. More...
 
void SetForkCb (Callback< void, Ptr< TcpSocketMsgBase > > cb)
 Set the callback invoked after the forking. More...
 
void SetProcessedAckCb (AckManagementCb cb)
 Set the callback invoked when an ACK is received and processed (at the end of the processing) More...
 
void SetRcvAckCb (AckManagementCb cb)
 Set the callback invoked when an ACK is received (at the beginning of the processing) More...
 
void SetUpdateRttHistoryCb (UpdateRttCallback cb)
 Set the callback invoked when we update rtt history. More...
 
- Public Member Functions inherited from ns3::TcpSocketBase
 TcpSocketBase (void)
 Create an unbound TCP socket. More...
 
 TcpSocketBase (const TcpSocketBase &sock)
 Clone a TCP socket, for use upon receiving a connection request in LISTEN state. More...
 
virtual ~TcpSocketBase (void)
 
virtual int Bind (void)
 Allocate a local IPv4 endpoint for this socket. More...
 
virtual int Bind (const Address &address)
 Allocate a local endpoint for this socket. More...
 
virtual int Bind6 (void)
 Allocate a local IPv6 endpoint for this socket. More...
 
virtual void BindToNetDevice (Ptr< NetDevice > netdevice)
 Bind a socket to specific device. More...
 
bool CheckEcnCe (uint8_t tos) const
 Checks for CE bits. More...
 
bool CheckEcnEct0 (uint8_t tos) const
 Checks for ECT(0) bits. More...
 
bool CheckEcnEct1 (uint8_t tos) const
 Checks for ECT(1) bits. More...
 
bool CheckNoEcn (uint8_t tos) const
 Checks if TOS has no ECN bits. More...
 
uint8_t ClearEcnBits (uint8_t tos) const
 Clears ECN bits from TOS. More...
 
virtual int Close (void)
 Close a socket. More...
 
virtual int Connect (const Address &address)
 Initiate a connection to a remote host. More...
 
Time GetClockGranularity (void) const
 Get the Clock Granularity (used in RTO calcs). More...
 
virtual enum SocketErrno GetErrno (void) const
 Get last error number. More...
 
virtual TypeId GetInstanceTypeId () const
 Get the instance TypeId. More...
 
Time GetMinRto (void) const
 Get the Minimum RTO. More...
 
virtual Ptr< NodeGetNode (void) const
 Return the node this socket is associated with. More...
 
virtual int GetPeerName (Address &address) const
 Get the peer address of a connected socket. More...
 
uint32_t GetRetxThresh (void) const
 Get the retransmission threshold (dup ack threshold for a fast retransmit) More...
 
virtual uint32_t GetRxAvailable (void) const
 Return number of bytes which can be returned from one or multiple calls to Recv. More...
 
Ptr< TcpRxBufferGetRxBuffer (void) const
 Get a pointer to the Rx buffer. More...
 
virtual enum SocketType GetSocketType (void) const
 
virtual int GetSockName (Address &address) const
 Get socket address. More...
 
virtual uint32_t GetTxAvailable (void) const
 Returns the number of bytes which can be sent in a single call to Send. More...
 
Ptr< TcpTxBufferGetTxBuffer (void) const
 Get a pointer to the Tx buffer. More...
 
virtual int Listen (void)
 Listen for incoming connections. More...
 
uint8_t MarkEcnCe (uint8_t tos) const
 Mark CE. More...
 
uint8_t MarkEcnEct0 (uint8_t tos) const
 Mark ECT(0) More...
 
uint8_t MarkEcnEct1 (uint8_t tos) const
 Mark ECT(1) More...
 
virtual Ptr< PacketRecv (uint32_t maxSize, uint32_t flags)
 Read data from the socket. More...
 
virtual Ptr< PacketRecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress)
 Read a single packet from the socket and retrieve the sender address. More...
 
virtual int Send (Ptr< Packet > p, uint32_t flags)
 Send data (or dummy data) to the remote host. More...
 
virtual int SendTo (Ptr< Packet > p, uint32_t flags, const Address &toAddress)
 Send data to a specified peer. More...
 
void SetClockGranularity (Time clockGranularity)
 Sets the Clock Granularity (used in RTO calcs). More...
 
void SetCongestionControlAlgorithm (Ptr< TcpCongestionOps > algo)
 Install a congestion control algorithm on this socket. More...
 
void SetEcn (EcnMode_t ecnMode)
 Set ECN mode to use on the socket. More...
 
void SetMinRto (Time minRto)
 Sets the Minimum RTO. More...
 
virtual void SetNode (Ptr< Node > node)
 Set the associated node. More...
 
void SetRecoveryAlgorithm (Ptr< TcpRecoveryOps > recovery)
 Install a recovery algorithm on this socket. More...
 
void SetRetxThresh (uint32_t retxThresh)
 Set the retransmission threshold (dup ack threshold for a fast retransmit) More...
 
virtual void SetRtt (Ptr< RttEstimator > rtt)
 Set the associated RTT estimator. More...
 
virtual void SetTcp (Ptr< TcpL4Protocol > tcp)
 Set the associated TCP L4 protocol. More...
 
virtual int ShutdownRecv (void)
 
virtual int ShutdownSend (void)
 
void UpdateBytesInFlight (uint32_t oldValue, uint32_t newValue)
 Callback function to hook to TcpSocketState bytes inflight. More...
 
void UpdateCongState (TcpSocketState::TcpCongState_t oldValue, TcpSocketState::TcpCongState_t newValue)
 Callback function to hook to TcpSocketState congestion state. More...
 
void UpdateCwnd (uint32_t oldValue, uint32_t newValue)
 Callback function to hook to TcpSocketState congestion window. More...
 
void UpdateCwndInfl (uint32_t oldValue, uint32_t newValue)
 Callback function to hook to TcpSocketState inflated congestion window. More...
 
void UpdateEcnState (TcpSocketState::EcnState_t oldValue, TcpSocketState::EcnState_t newValue)
 Callback function to hook to EcnState state. More...
 
void UpdateHighTxMark (SequenceNumber32 oldValue, SequenceNumber32 newValue)
 Callback function to hook to TcpSocketState high tx mark. More...
 
void UpdateNextTxSequence (SequenceNumber32 oldValue, SequenceNumber32 newValue)
 Callback function to hook to TcpSocketState next tx sequence. More...
 
void UpdateRtt (Time oldValue, Time newValue)
 Callback function to hook to TcpSocketState rtt. More...
 
void UpdateSsThresh (uint32_t oldValue, uint32_t newValue)
 Callback function to hook to TcpSocketState slow start threshold. More...
 
- Public Member Functions inherited from ns3::TcpSocket
 TcpSocket (void)
 
virtual ~TcpSocket (void)
 
- Public Member Functions inherited from ns3::Socket
 Socket (void)
 
virtual ~Socket (void)
 
Ptr< NetDeviceGetBoundNetDevice ()
 Returns socket's bound NetDevice, if any. More...
 
uint8_t GetIpTos (void) const
 Query the value of IP Type of Service of this socket. More...
 
virtual uint8_t GetIpTtl (void) const
 Query the value of IP Time to Live field of this socket. More...
 
virtual uint8_t GetIpv6HopLimit (void) const
 Query the value of IP Hop Limit field of this socket. More...
 
uint8_t GetIpv6Tclass (void) const
 Query the value of IPv6 Traffic Class field of this socket. More...
 
uint8_t GetPriority (void) const
 Query the priority value of this socket. More...
 
virtual void Ipv6JoinGroup (Ipv6Address address, Ipv6MulticastFilterMode filterMode, std::vector< Ipv6Address > sourceAddresses)
 Joins a IPv6 multicast group. More...
 
virtual void Ipv6JoinGroup (Ipv6Address address)
 Joins a IPv6 multicast group without filters. More...
 
virtual void Ipv6LeaveGroup (void)
 Leaves IPv6 multicast group this socket is joined to. More...
 
bool IsIpRecvTos (void) const
 Ask if the socket is currently passing information about IP Type of Service up the stack. More...
 
bool IsIpRecvTtl (void) const
 Ask if the socket is currently passing information about IP_TTL up the stack. More...
 
bool IsIpv6RecvHopLimit (void) const
 Ask if the socket is currently passing information about IPv6 Hop Limit up the stack. More...
 
bool IsIpv6RecvTclass (void) const
 Ask if the socket is currently passing information about IPv6 Traffic Class up the stack. More...
 
bool IsRecvPktInfo () const
 Get status indicating whether enable/disable packet information to socket. More...
 
Ptr< PacketRecv (void)
 Read a single packet from the socket. More...
 
int Recv (uint8_t *buf, uint32_t size, uint32_t flags)
 Recv data (or dummy data) from the remote host. More...
 
Ptr< PacketRecvFrom (Address &fromAddress)
 Read a single packet from the socket and retrieve the sender address. More...
 
int RecvFrom (uint8_t *buf, uint32_t size, uint32_t flags, Address &fromAddress)
 Read a single packet from the socket and retrieve the sender address. More...
 
int Send (Ptr< Packet > p)
 Send data (or dummy data) to the remote host. More...
 
int Send (const uint8_t *buf, uint32_t size, uint32_t flags)
 Send data (or dummy data) to the remote host. More...
 
int SendTo (const uint8_t *buf, uint32_t size, uint32_t flags, const Address &address)
 Send data to a specified peer. More...
 
void SetAcceptCallback (Callback< bool, Ptr< Socket >, const Address &> connectionRequest, Callback< void, Ptr< Socket >, const Address &> newConnectionCreated)
 Accept connection requests from remote hosts. More...
 
void SetCloseCallbacks (Callback< void, Ptr< Socket > > normalClose, Callback< void, Ptr< Socket > > errorClose)
 Detect socket recv() events such as graceful shutdown or error. More...
 
void SetConnectCallback (Callback< void, Ptr< Socket > > connectionSucceeded, Callback< void, Ptr< Socket > > connectionFailed)
 Specify callbacks to allow the caller to determine if the connection succeeds of fails. More...
 
void SetDataSentCallback (Callback< void, Ptr< Socket >, uint32_t > dataSent)
 Notify application when a packet has been sent from transport protocol (non-standard socket call) More...
 
void SetIpRecvTos (bool ipv4RecvTos)
 Tells a socket to pass information about IP Type of Service up the stack. More...
 
void SetIpRecvTtl (bool ipv4RecvTtl)
 Tells a socket to pass information about IP_TTL up the stack. More...
 
void SetIpTos (uint8_t ipTos)
 Manually set IP Type of Service field. More...
 
virtual void SetIpTtl (uint8_t ipTtl)
 Manually set IP Time to Live field. More...
 
virtual void SetIpv6HopLimit (uint8_t ipHopLimit)
 Manually set IPv6 Hop Limit. More...
 
void SetIpv6RecvHopLimit (bool ipv6RecvHopLimit)
 Tells a socket to pass information about IPv6 Hop Limit up the stack. More...
 
void SetIpv6RecvTclass (bool ipv6RecvTclass)
 Tells a socket to pass information about IPv6 Traffic Class up the stack. More...
 
void SetIpv6Tclass (int ipTclass)
 Manually set IPv6 Traffic Class field. More...
 
void SetPriority (uint8_t priority)
 Manually set the socket priority. More...
 
void SetRecvCallback (Callback< void, Ptr< Socket > >)
 Notify application when new data is available to be read. More...
 
void SetRecvPktInfo (bool flag)
 Enable/Disable receive packet information to socket. More...
 
void SetSendCallback (Callback< void, Ptr< Socket >, uint32_t > sendCb)
 Notify application when space in transmit buffer is added. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::TcpSocketMsgBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::TcpSocketBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::TcpSocket
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Socket
static Ptr< SocketCreateSocket (Ptr< Node > node, TypeId tid)
 This method wraps the creation of sockets that is performed on a given node by a SocketFactory specified by TypeId. More...
 
static TypeId GetTypeId (void)
 Get the type ID. More...
 
static uint8_t IpTos2Priority (uint8_t ipTos)
 Return the priority corresponding to a given TOS value. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual Ptr< TcpSocketBaseFork ()
 Call CopyObject<> to clone me. More...
 
virtual void ReceivedData (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Recv of a data, put into buffer, call L7 to get it if necessary. More...
 
- Protected Member Functions inherited from ns3::TcpSocketMsgBase
virtual void CompleteFork (Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
 Complete a connection by forking the socket. More...
 
virtual void ReceivedAck (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received an ACK packet. More...
 
virtual void ReTxTimeout (void)
 An RTO event happened. More...
 
virtual void UpdateRttHistory (const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
 Update the RTT history, when we send TCP segments. More...
 
- Protected Member Functions inherited from ns3::TcpSocketBase
void AddOptions (TcpHeader &tcpHeader)
 Add options to TcpHeader. More...
 
void AddOptionSack (TcpHeader &header)
 Add the SACK option to the header. More...
 
void AddOptionSackPermitted (TcpHeader &header)
 Add the SACK PERMITTED option to the header. More...
 
void AddOptionTimestamp (TcpHeader &header)
 Add the timestamp option to the header. More...
 
void AddOptionWScale (TcpHeader &header)
 Add the window scale option to the header. More...
 
void AddSocketTags (const Ptr< Packet > &p) const
 Add Tags for the Socket. More...
 
virtual uint16_t AdvertisedWindowSize (bool scale=true) const
 The amount of Rx window announced to the peer. More...
 
virtual uint32_t AvailableWindow (void) const
 Return unfilled portion of window. More...
 
virtual uint32_t BytesInFlight (void) const
 Return total bytes in flight. More...
 
uint8_t CalculateWScale () const
 Calculate window scale value based on receive buffer space. More...
 
void CancelAllTimers (void)
 Cancel all timer when endpoint is deleted. More...
 
void CloseAndNotify (void)
 Peacefully close the socket by notifying the upper layer and deallocate end point. More...
 
void ConnectionSucceeded (void)
 Schedule-friendly wrapper for Socket::NotifyConnectionSucceeded() More...
 
void DeallocateEndPoint (void)
 Deallocate m_endPoint and m_endPoint6. More...
 
virtual void DelAckTimeout (void)
 Action upon delay ACK timeout, i.e. More...
 
void Destroy (void)
 Kill this socket by zeroing its attributes (IPv4) More...
 
void Destroy6 (void)
 Kill this socket by zeroing its attributes (IPv6) More...
 
int DoClose (void)
 Close a socket by sending RST, FIN, or FIN+ACK, depend on the current state. More...
 
int DoConnect (void)
 Perform the real connection tasks: Send SYN if allowed, RST if invalid. More...
 
virtual void DoForwardUp (Ptr< Packet > packet, const Address &fromAddress, const Address &toAddress)
 Called by TcpSocketBase::ForwardUp{,6}(). More...
 
void DoPeerClose (void)
 FIN is in sequence, notify app and respond with a FIN. More...
 
void DoRetransmit (void)
 Retransmit the first segment marked as lost, without considering available window nor pacing. More...
 
void DupAck ()
 Dupack management. More...
 
void EnterRecovery ()
 Enter the CA_RECOVERY, and retransmit the head. More...
 
virtual void EstimateRtt (const TcpHeader &tcpHeader)
 Take into account the packet for RTT estimation. More...
 
void ForwardIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
 Called by the L3 protocol when it received an ICMP packet to pass on to TCP. More...
 
void ForwardIcmp6 (Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
 Called by the L3 protocol when it received an ICMPv6 packet to pass on to TCP. More...
 
void ForwardUp (Ptr< Packet > packet, Ipv4Header header, uint16_t port, Ptr< Ipv4Interface > incomingInterface)
 Called by the L3 protocol when it received a packet to pass on to TCP. More...
 
void ForwardUp6 (Ptr< Packet > packet, Ipv6Header header, uint16_t port, Ptr< Ipv6Interface > incomingInterface)
 Called by the L3 protocol when it received a packet to pass on to TCP. More...
 
virtual bool GetAllowBroadcast (void) const
 Query whether broadcast datagram transmissions are allowed. More...
 
virtual Time GetConnTimeout (void) const
 Get the connection timeout. More...
 
virtual uint32_t GetDataRetries (void) const
 Get the number of data transmission retries before giving up. More...
 
virtual uint32_t GetDelAckMaxCount (void) const
 Get the number of packet to fire an ACK before delay timeout. More...
 
virtual Time GetDelAckTimeout (void) const
 Get the time to delay an ACK. More...
 
virtual uint32_t GetInitialCwnd (void) const
 Get the initial Congestion Window. More...
 
virtual uint32_t GetInitialSSThresh (void) const
 Get the initial Slow Start Threshold. More...
 
virtual Time GetPersistTimeout (void) const
 Get the timeout for persistent connection. More...
 
virtual uint32_t GetRcvBufSize (void) const
 Get the receive buffer size. More...
 
virtual uint32_t GetSegSize (void) const
 Get the segment size. More...
 
virtual uint32_t GetSndBufSize (void) const
 Get the send buffer size. More...
 
virtual uint32_t GetSynRetries (void) const
 Get the number of connection retries before giving up. More...
 
virtual bool GetTcpNoDelay (void) const
 Check if Nagle's algorithm is enabled or not. More...
 
bool IsTcpOptionEnabled (uint8_t kind) const
 Return true if the specified option is enabled. More...
 
bool IsValidTcpSegment (const SequenceNumber32 seq, const uint32_t tcpHeaderSize, const uint32_t tcpPayloadSize)
 Checks whether the given TCP segment is valid or not. More...
 
virtual void LastAckTimeout (void)
 Timeout at LAST_ACK, close the connection. More...
 
virtual void NewAck (SequenceNumber32 const &seq, bool resetRTO)
 Update buffers w.r.t. More...
 
void NotifyPacingPerformed (void)
 Notify Pacing. More...
 
bool OutOfRange (SequenceNumber32 head, SequenceNumber32 tail) const
 Check if a sequence number range is within the rx window. More...
 
void PeerClose (Ptr< Packet > p, const TcpHeader &tcpHeader)
 Received a FIN from peer, notify rx buffer. More...
 
virtual void PersistTimeout (void)
 Send 1 byte probe to get an updated window size. More...
 
virtual void ProcessAck (const SequenceNumber32 &ackNumber, bool scoreboardUpdated, const SequenceNumber32 &oldHeadSequence)
 Process a received ack. More...
 
void ProcessClosing (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received a packet upon CLOSING. More...
 
void ProcessEstablished (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received a packet upon ESTABLISHED state. More...
 
void ProcessLastAck (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received a packet upon LAST_ACK. More...
 
void ProcessListen (Ptr< Packet > packet, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
 Received a packet upon LISTEN state. More...
 
bool ProcessOptionSack (const Ptr< const TcpOption > option)
 Read the SACK option. More...
 
void ProcessOptionSackPermitted (const Ptr< const TcpOption > option)
 Read the SACK PERMITTED option. More...
 
void ProcessOptionTimestamp (const Ptr< const TcpOption > option, const SequenceNumber32 &seq)
 Process the timestamp option from other side. More...
 
void ProcessOptionWScale (const Ptr< const TcpOption > option)
 Read and parse the Window scale option. More...
 
void ProcessSynRcvd (Ptr< Packet > packet, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
 Received a packet upon SYN_RCVD. More...
 
void ProcessSynSent (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received a packet upon SYN_SENT. More...
 
void ProcessWait (Ptr< Packet > packet, const TcpHeader &tcpHeader)
 Received a packet upon CLOSE_WAIT, FIN_WAIT_1, FIN_WAIT_2. More...
 
void ReadOptions (const TcpHeader &tcpHeader, bool &scoreboardUpdated)
 Read TCP options before Ack processing. More...
 
virtual uint32_t SendDataPacket (SequenceNumber32 seq, uint32_t maxSize, bool withAck)
 Extract at most maxSize bytes from the TxBuffer at sequence seq, add the TCP header, and send to TcpL4Protocol. More...
 
virtual void SendEmptyPacket (uint8_t flags)
 Send a empty packet that carries a flag, e.g., ACK. More...
 
uint32_t SendPendingData (bool withAck=false)
 Send as much pending data as possible according to the Tx window. More...
 
void SendRST (void)
 Send reset and tear down this socket. More...
 
virtual bool SetAllowBroadcast (bool allowBroadcast)
 Configure whether broadcast datagram transmissions are allowed. More...
 
virtual void SetConnTimeout (Time timeout)
 Set the connection timeout. More...
 
virtual void SetDataRetries (uint32_t retries)
 Set the number of data transmission retries before giving up. More...
 
virtual void SetDelAckMaxCount (uint32_t count)
 Set the number of packet to fire an ACK before delay timeout. More...
 
virtual void SetDelAckTimeout (Time timeout)
 Set the time to delay an ACK. More...
 
virtual void SetInitialCwnd (uint32_t cwnd)
 Set the initial Congestion Window. More...
 
virtual void SetInitialSSThresh (uint32_t threshold)
 Set the initial Slow Start Threshold. More...
 
virtual void SetPersistTimeout (Time timeout)
 Set the timeout for persistent connection. More...
 
virtual void SetRcvBufSize (uint32_t size)
 Set the receive buffer size. More...
 
virtual void SetSegSize (uint32_t size)
 Set the segment size. More...
 
virtual void SetSndBufSize (uint32_t size)
 Set the send buffer size. More...
 
virtual void SetSynRetries (uint32_t count)
 Set the number of connection retries before giving up. More...
 
virtual void SetTcpNoDelay (bool noDelay)
 Enable/Disable Nagle's algorithm. More...
 
int SetupCallback (void)
 Common part of the two Bind(), i.e. More...
 
int SetupEndpoint (void)
 Configure the endpoint to a local address. More...
 
int SetupEndpoint6 (void)
 Configure the endpoint v6 to a local address. More...
 
void TimeWait (void)
 Move from CLOSING or FIN_WAIT_2 to TIME_WAIT state. More...
 
virtual uint32_t UnAckDataCount (void) const
 Return count of number of unacked bytes. More...
 
void UpdateWindowSize (const TcpHeader &header)
 Update the receiver window (RWND) based on the value of the window field in the header. More...
 
virtual uint32_t Window (void) const
 Return the max possible number of unacked bytes. More...
 
- Protected Member Functions inherited from ns3::Socket
virtual void DoDispose (void)
 Destructor implementation. More...
 
bool IsManualIpTtl (void) const
 Checks if the socket has a specific IPv4 TTL set. More...
 
bool IsManualIpv6HopLimit (void) const
 Checks if the socket has a specific IPv6 Hop Limit set. More...
 
bool IsManualIpv6Tclass (void) const
 Checks if the socket has a specific IPv6 Tclass set. More...
 
void NotifyConnectionFailed (void)
 Notify through the callback (if set) that the connection has not been established due to an error. More...
 
bool NotifyConnectionRequest (const Address &from)
 Notify through the callback (if set) that an incoming connection is being requested by a remote host. More...
 
void NotifyConnectionSucceeded (void)
 Notify through the callback (if set) that the connection has been established. More...
 
void NotifyDataRecv (void)
 Notify through the callback (if set) that some data have been received. More...
 
void NotifyDataSent (uint32_t size)
 Notify through the callback (if set) that some data have been sent. More...
 
void NotifyErrorClose (void)
 Notify through the callback (if set) that the connection has been closed due to an error. More...
 
void NotifyNewConnectionCreated (Ptr< Socket > socket, const Address &from)
 Notify through the callback (if set) that a new connection has been created. More...
 
void NotifyNormalClose (void)
 Notify through the callback (if set) that the connection has been closed. More...
 
void NotifySend (uint32_t spaceAvailable)
 Notify through the callback (if set) that some data have been sent. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Additional Inherited Members

- Public Types inherited from ns3::TcpSocketMsgBase
typedef Callback< void, Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > AckManagementCb
 Callback for the ACK management. More...
 
typedef Callback< void, Ptr< const TcpSocketState >, Ptr< const TcpSocketBase > > RetrCb
 Callback for the packet retransmission management. More...
 
typedef Callback< void, Ptr< const TcpSocketBase >, const SequenceNumber32 &, uint32_t, bool > UpdateRttCallback
 Callback for the RTT update management. More...
 
- Public Types inherited from ns3::TcpSocketBase
enum  EcnMode_t { NoEcn = 0, ClassicEcn }
 ECN Modes. More...
 
typedef void(* TcpTxRxTracedCallback) (const Ptr< const Packet > packet, const TcpHeader &header, const Ptr< const TcpSocketBase > socket)
 TracedCallback signature for tcp packet transmission or reception events. More...
 
- Public Types inherited from ns3::TcpSocket
enum  TcpStates_t {
  CLOSED = 0, LISTEN, SYN_SENT, SYN_RCVD,
  ESTABLISHED, CLOSE_WAIT, LAST_ACK, FIN_WAIT_1,
  FIN_WAIT_2, CLOSING, TIME_WAIT, LAST_STATE
}
 Names of the 11 TCP states. More...
 
- Public Types inherited from ns3::Socket
enum  Ipv6MulticastFilterMode { INCLUDE =1, EXCLUDE }
 Enumeration of the possible filter of a socket. More...
 
enum  SocketErrno {
  ERROR_NOTERROR, ERROR_ISCONN, ERROR_NOTCONN, ERROR_MSGSIZE,
  ERROR_AGAIN, ERROR_SHUTDOWN, ERROR_OPNOTSUPP, ERROR_AFNOSUPPORT,
  ERROR_INVAL, ERROR_BADF, ERROR_NOROUTETOHOST, ERROR_NODEV,
  ERROR_ADDRNOTAVAIL, ERROR_ADDRINUSE, SOCKET_ERRNO_LAST
}
 Enumeration of the possible errors returned by a socket. More...
 
enum  SocketPriority {
  NS3_PRIO_BESTEFFORT = 0, NS3_PRIO_FILLER = 1, NS3_PRIO_BULK = 2, NS3_PRIO_INTERACTIVE_BULK = 4,
  NS3_PRIO_INTERACTIVE = 6, NS3_PRIO_CONTROL = 7
}
 Enumeration of the possible socket priorities. More...
 
enum  SocketType { NS3_SOCK_STREAM, NS3_SOCK_SEQPACKET, NS3_SOCK_DGRAM, NS3_SOCK_RAW }
 Enumeration of the possible socket types. More...
 
- Public Attributes inherited from ns3::TcpSocketBase
TracedCallback< uint32_t, uint32_t > m_bytesInFlightTrace
 Callback pointer for bytesInFlight trace chaining. More...
 
TracedCallback< TcpSocketState::TcpCongState_t, TcpSocketState::TcpCongState_tm_congStateTrace
 Callback pointer for congestion state trace chaining. More...
 
TracedCallback< uint32_t, uint32_t > m_cWndInflTrace
 Callback pointer for cWndInfl trace chaining. More...
 
TracedCallback< uint32_t, uint32_t > m_cWndTrace
 Callback pointer for cWnd trace chaining. More...
 
TracedCallback< TcpSocketState::EcnState_t, TcpSocketState::EcnState_tm_ecnStateTrace
 Callback pointer for ECN state trace chaining. More...
 
TracedCallback< SequenceNumber32, SequenceNumber32m_highTxMarkTrace
 Callback pointer for high tx mark chaining. More...
 
TracedCallback< Time, Timem_lastRttTrace
 Callback pointer for RTT trace chaining. More...
 
TracedCallback< SequenceNumber32, SequenceNumber32m_nextTxSequenceTrace
 Callback pointer for next tx sequence chaining. More...
 
TracedCallback< uint32_t, uint32_t > m_ssThTrace
 Callback pointer for ssTh trace chaining. More...
 
- Static Public Attributes inherited from ns3::TcpSocket
static const char *const TcpStateName [TcpSocket::LAST_STATE]
 Literal names of TCP states for use in log messages. More...
 
- Static Protected Member Functions inherited from ns3::TcpSocketBase
static uint32_t SafeSubtraction (uint32_t a, uint32_t b)
 Performs a safe subtraction between a and b (a-b) More...
 
- Protected Attributes inherited from ns3::TcpSocketBase
TracedValue< uint32_t > m_advWnd {0}
 Advertised Window size. More...
 
uint32_t m_bytesAckedNotProcessed {0}
 Bytes acked, but not processed. More...
 
Time m_clockGranularity {Seconds (0.001)}
 Clock Granularity used in RTO calcs. More...
 
bool m_closeNotified {false}
 Told app to close socket. More...
 
bool m_closeOnEmpty {false}
 Close socket upon tx buffer emptied. More...
 
Time m_cnTimeout {Seconds (0.0)}
 Timeout for connection retry. More...
 
Ptr< TcpCongestionOpsm_congestionControl
 Congestion control. More...
 
bool m_connected {false}
 Connection established. More...
 
uint32_t m_dataRetrCount {0}
 Count of remaining data retransmission attempts. More...
 
uint32_t m_dataRetries {0}
 Number of data retransmission attempts. More...
 
uint32_t m_delAckCount {0}
 Delayed ACK counter. More...
 
EventId m_delAckEvent {}
 Delayed ACK timeout event. More...
 
uint32_t m_delAckMaxCount {0}
 Number of packet to fire an ACK before delay timeout. More...
 
Time m_delAckTimeout {Seconds (0.0)}
 Time to delay an ACK. More...
 
uint32_t m_dupAckCount {0}
 Dupack counter. More...
 
TracedValue< SequenceNumber32m_ecnCESeq {0}
 Sequence number of the last received Congestion Experienced. More...
 
TracedValue< SequenceNumber32m_ecnCWRSeq {0}
 Sequence number of the last sent CWR. More...
 
TracedValue< SequenceNumber32m_ecnEchoSeq {0}
 Sequence number of the last received ECN Echo. More...
 
EcnMode_t m_ecnMode {EcnMode_t::NoEcn}
 Socket ECN capability. More...
 
Ipv4EndPointm_endPoint {nullptr}
 the IPv4 endpoint More...
 
Ipv6EndPointm_endPoint6 {nullptr}
 the IPv6 endpoint More...
 
TracedValue< SequenceNumber32m_highRxAckMark {0}
 Highest ack received. More...
 
TracedValue< SequenceNumber32m_highRxMark {0}
 Highest seqno received. More...
 
SequenceNumber32 m_highTxAck {0}
 Highest ack sent. More...
 
std::deque< RttHistorym_history
 List of sent packet. More...
 
Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t > m_icmpCallback
 ICMP callback. More...
 
Callback< void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t > m_icmpCallback6
 ICMPv6 callback. More...
 
bool m_isFirstPartialAck {true}
 First partial ACK during RECOVERY. More...
 
EventId m_lastAckEvent {}
 Last ACK timeout event. More...
 
bool m_limitedTx {true}
 perform limited transmit More...
 
uint16_t m_maxWinSize {0}
 Maximum window size to advertise. More...
 
Time m_minRto {Time::Max ()}
 minimum value of the Retransmit timeout More...
 
double m_msl {0.0}
 Max segment lifetime. More...
 
Ptr< Nodem_node
 the associated node More...
 
bool m_noDelay {false}
 Set to true to disable Nagle's algorithm. More...
 
Timer m_pacingTimer {Timer::REMOVE_ON_DESTROY}
 Pacing Event. More...
 
EventId m_persistEvent {}
 Persist event: Send 1 byte to probe for a non-zero Rx window. More...
 
Time m_persistTimeout {Seconds (0.0)}
 Time between sending 1-byte probes. More...
 
uint8_t m_rcvWindShift {0}
 Window shift to apply to outgoing segments. More...
 
SequenceNumber32 m_recover {0}
 Previous highest Tx seqnum for fast recovery (set it to initial seq number) More...
 
Ptr< TcpRecoveryOpsm_recoveryOps
 Recovery Algorithm. More...
 
EventId m_retxEvent {}
 Retransmission event. More...
 
uint32_t m_retxThresh {3}
 Fast Retransmit threshold. More...
 
TracedValue< Timem_rto {Seconds (0.0)}
 Retransmit timeout. More...
 
Ptr< RttEstimatorm_rtt
 Round trip time estimator. More...
 
TracedValue< uint32_t > m_rWnd {0}
 Receiver window (RCV.WND in RFC793) More...
 
Ptr< TcpRxBufferm_rxBuffer
 Rx buffer (reordering buffer) More...
 
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_rxTrace
 Trace of received packets. More...
 
bool m_sackEnabled {true}
 RFC SACK option enabled. More...
 
EventId m_sendPendingDataEvent {}
 micro-delay event to send pending data More...
 
bool m_shutdownRecv {false}
 Receive no longer allowed. More...
 
bool m_shutdownSend {false}
 Send no longer allowed. More...
 
uint8_t m_sndWindShift {0}
 Window shift to apply to incoming segments. More...
 
TracedValue< TcpStates_tm_state {CLOSED}
 TCP state. More...
 
uint32_t m_synCount {0}
 Count of remaining connection retries. More...
 
uint32_t m_synRetries {0}
 Number of connection attempts. More...
 
Ptr< TcpSocketStatem_tcb
 Congestion control information. More...
 
Ptr< TcpL4Protocolm_tcp
 the associated TCP L4 protocol More...
 
bool m_timestampEnabled {true}
 Timestamp option enabled. More...
 
uint32_t m_timestampToEcho {0}
 Timestamp to echo. More...
 
EventId m_timewaitEvent {}
 TIME_WAIT expiration event: Move this socket to CLOSED state. More...
 
Ptr< TcpTxBufferm_txBuffer
 Tx buffer. More...
 
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_txTrace
 Trace of transmitted packets. More...
 
bool m_winScalingEnabled {true}
 Window Scale option enabled (RFC 7323) More...
 
- Protected Attributes inherited from ns3::Socket
Ptr< NetDevicem_boundnetdevice
 the device this socket is bound to (might be null). More...
 
Ipv6Address m_ipv6MulticastGroupAddress
 IPv6 multicast group address. More...
 
bool m_recvPktInfo
 if the socket should add packet info tags to the packet forwarded to L4. More...
 

Detailed Description

Socket that the 50% of the times saves the entire packet in the buffer, while in the other 50% saves only half the packet.

Definition at line 36 of file tcp-datasentcb-test.cc.

Constructor & Destructor Documentation

◆ TcpSocketHalfAck()

TcpSocketHalfAck::TcpSocketHalfAck ( )
inline

Definition at line 45 of file tcp-datasentcb-test.cc.

Member Function Documentation

◆ Fork()

Ptr< TcpSocketBase > TcpSocketHalfAck::Fork ( void  )
protectedvirtual

Call CopyObject<> to clone me.

Returns
a copy of the socket

Reimplemented from ns3::TcpSocketMsgBase.

Definition at line 68 of file tcp-datasentcb-test.cc.

◆ GetTypeId()

TypeId TcpSocketHalfAck::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 57 of file tcp-datasentcb-test.cc.

References ns3::TypeId::SetParent().

Referenced by TcpDataSentCbTestCase::CreateReceiverSocket().

◆ ReceivedData()

void TcpSocketHalfAck::ReceivedData ( Ptr< Packet packet,
const TcpHeader tcpHeader 
)
protectedvirtual

Recv of a data, put into buffer, call L7 to get it if necessary.

Parameters
packetthe packet
tcpHeaderthe packet's TCP header

Reimplemented from ns3::TcpSocketBase.

Definition at line 74 of file tcp-datasentcb-test.cc.

References ns3::Packet::Copy(), ns3::Packet::GetSize(), NS_LOG_FUNCTION, ns3::TcpSocketBase::ReceivedData(), and ns3::Packet::RemoveAtEnd().


The documentation for this class was generated from the following file: