Class TransmissionControlBlock


public class TransmissionControlBlock extends Object
       Send Sequence Space

                    1         2          3          4
                      SND.UNA    SND.NXT    SND.UNA

         1 - old sequence numbers which have been acknowledged
         2 - sequence numbers of unacknowledged data
         3 - sequence numbers allowed for new data transmission
         4 - future sequence numbers which are not yet allowed
          Receive Sequence Space

                        1          2          3
                           RCV.NXT    RCV.NXT

         1 - old sequence numbers which have been acknowledged
         2 - sequence numbers allowed for new reception
         3 - future sequence numbers which are not yet allowed
  • Field Details

  • Method Details

    • state

      public State state()
    • state

      public void state(State state)
    • sndUna

      public long sndUna()
      Returns the number of the oldest unacknowledged segment. In other words, it is the sequence number of the first byte of data that has been sent, but not yet acknowledged by the receiver.
      the number of the oldest unacknowledged segment
    • sndNxt

      public long sndNxt()
      Returns the sequence number for the next byte of data that is to be sent.
      the sequence number for the next byte of data that is to be sent
    • sndWnd

      public long sndWnd()
      Returns the send window. It indicates the amount of free buffer space available at the receiver's end for incoming data. This value is communicated from the receiver to the sender, which allows the sender to adjust the data transmission rate accordingly.
      the send window
    • iss

      public long iss()
      Returns the initial sequence number. At the start of a new connection, both the peers randomly generate an initial sequence number, known as the iss(), for their respective send sequences. This sequence number is used as the starting point for the sequence numbers assigned to the data bytes that are transmitted during the connection.
      the initial sequence number
    • rcvNxt

      public long rcvNxt()
      Returns the sequence number of the next byte that the receiver is expecting to get from the sender. After a segment is received and its data is successfully delivered to the receiving application, rcvNxt() is incremented by the number of bytes received.
      the sequence number of the next byte that the receiver is expecting to get from the sender
    • rcvWnd

      public long rcvWnd()
      Returns the receive window. It represents the amount of data that the receiver is able to accept. This variable communicates the size of the available buffer space on the receiving end back to the sender, which allows the sender to understand how much data can be sent without overwhelming the receiver. It is updated each time the receiver sends an acknowledgement back to the sender.
      the receive window
    • irs

      public long irs()
      Returns the initial receive sequence. This is the iss() received from the other side.
      the initial receive sequence.
    • equals

      public boolean equals(Object o)
      equals in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • toString

      public String toString()
      toString in class Object
    • delete

      public void delete()
    • receiveBuffer

      public ReceiveBuffer receiveBuffer()
    • sendBuffer

      public SendBuffer sendBuffer()
    • sndWl1

      public long sndWl1()
    • sndWl2

      public long sndWl2()
    • cwnd

      public long cwnd()
    • outgoingSegmentQueue

      public OutgoingSegmentQueue outgoingSegmentQueue()
    • retransmissionQueue

      public RetransmissionQueue retransmissionQueue()
    • ssthresh

      public long ssthresh()
    • rcvNxt

      public void rcvNxt( ctx, long newRcvNxt)
    • updateRcvWnd

      public void updateRcvWnd( ctx)
    • maxSndWnd

      public long maxSndWnd()
    • effSndMss

      public int effSndMss()
      The maximum size of a segment that TCP really sends, the "effective send MSS,"
    • smss

      public int smss()
      RFC 5681: The SMSS is the size of the largest segment that the sender can transmit. This RFC 5681: value can be based on the maximum transmission unit of the network, the path MTU RFC 5681: discovery [RFC1191, RFC4821] algorithm, RMSS (see next item), or other factors. The RFC 5681: size does not include the TCP/IP headers and options.
    • selectIss

      public void selectIss()
    • initSndUnaSndNxt

      public void initSndUnaSndNxt()
    • rto

      public void rto( ctx, int newRto)
    • tsRecent

      public long tsRecent()
    • sndUna

      public long sndUna( ctx, long newSndUna)
      Returns the number of acked segments.
      ctx -
      newSndUna -
    • tsRecent

      public void tsRecent( ctx, long newTsRecent)
    • turnOnSndTsOk

      public void turnOnSndTsOk()
    • sRtt

      public void sRtt( ctx, float newSRtt)
    • rttVar

      public void rttVar( ctx, float newRttVar)
    • lastAckSent

      public void lastAckSent( ctx, long newLastAckSent)
    • sRtt

      public float sRtt()
    • rttVar

      public float rttVar()
    • rcvNxt

      public void rcvNxt(long rcvNxt)
    • irs

      public void irs(long irs)
    • sndTsOk

      public boolean sndTsOk()
    • lastAckSent

      public long lastAckSent()
    • rto

      public int rto()
    • ssthresh

      public void ssthresh( ctx, long newSsthresh)
    • cwnd

      public void cwnd( ctx, long newCwnd)
    • sendMss

      public long sendMss()
    • sndWnd

      public void sndWnd( ctx, long newSndWnd)
    • sndWl1

      public void sndWl1(long sndWl1)
    • sndWl2

      public void sndWl2(long sndWl2)
    • duplicateAcks

      public int duplicateAcks()
    • lastAdvertisedWindow

      public void lastAdvertisedWindow(long lastAdvertisedWindow)
    • incrementDuplicateAcks

      public void incrementDuplicateAcks()
    • resetDuplicateAcks

      public void resetDuplicateAcks()
    • lastAdvertisedWindow

      public long lastAdvertisedWindow()
    • localPort

      public int localPort()
    • remotePort

      public void remotePort(int remotePort)
    • remotePort

      public int remotePort()
    • ensureLocalPortIsSelected

      public void ensureLocalPortIsSelected(int requestedLocalPort)