|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.clackrouter.component.base.ClackComponent net.clackrouter.component.tcp.TCB
public class TCB
A Transmission Control Block (TCB) represents the state of a single TCP connection.
One TCB exists per (src address, source port, destination address, destination port) tuple. The relationship between TCBs and sockets is one-to-one, though it is a bit confusing in the case of server sockets, since a TCB exists despite the fact that no data is actually ever sent over a server socket.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.clackrouter.component.base.ClackComponent |
---|
ClackComponent.Waiter |
Fields inherited from class net.clackrouter.component.base.ClackComponent |
---|
componentCell, m_has_error, m_log, m_name, m_num_ports, m_packetcount_in, m_packetcount_out, m_ports, mListeners, mRouter, pendingError, SIGNAL_ERROR_LEN_MSEC, UNIQUE_COUNT, view |
Constructor Summary | |
---|---|
TCB(TCP parent,
Router router,
java.lang.String name)
|
Method Summary | |
---|---|
void |
acceptPacket(VNSPacket packet,
int port_num)
The starting point for packet-processing when packets are "pushed" to this component. |
void |
connect_no_gui()
Method to connect all TCP subcomponents for this TCB. |
static java.lang.String |
getStateString(int state)
Conveniance method to get a string value representing a TCP state integer value. |
void |
initiateConnection(java.net.InetAddress r_addr,
int r_port)
Used to start a client connection to a remote host/port pair. |
void |
notifySynReceived(VNSTCPPacket packet)
Initializes the state of a TCB for a server port based on the contents of a newly received SYN packet. |
protected void |
setupPorts(int numports)
Allocates an array of ClackPort objects to be used by this component |
Methods inherited from class net.clackrouter.component.base.ClackComponent |
---|
createCopy, createInputPullPort, createInputPushPort, createOutputPullPort, createOutputPushPort, error, fireListeners, getColor, getComponentCell, getHierarchicalView, getLog, getName, getNumPorts, getPacketCountIn, getPacketCountOut, getPendingError, getPort, getPropertiesView, getRouter, getSerializableProperties, getTime, getTypeName, getUniqueCount, getView, handlePullRequest, hasError, initializeProperties, isHierarchical, isModifying, log, notifyAlarm, poll, registerListener, sendOutPort, setAlarm, setComponentCell, setName, setPendingError, setView, showErrorDialog, signalError, try_repaint, unregisterListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STATE_CLOSED
public static final int STATE_LISTEN
public static final int STATE_SYN_SENT
public static final int STATE_SYN_RECEIVED
public static final int STATE_ESTABLISHED
public static final int STATE_FIN_WAIT1
public static final int STATE_FIN_WAIT2
public static final int STATE_CLOSE_WAIT
public static final int STATE_CLOSING
public static final int STATE_LAST_ACK
public static final int STATE_TIME_WAIT
public static final int STATE_UNKNOWN
public static final int RTO_MSECS
public static final int MAX_WINDOW
public static final int MAX_PAYLOAD
public static final int TOTAL_RETRANS_ATTEMPTS
public int connection_state
public long send_nxt
public long recv_nxt
public long send_una
public int send_window
public long fin_seq_sent
public long initial_sequence_num
public boolean finReceived
public long rto_msec
public boolean done
public long mCloseWaitStart
public static final long CLOSE_WAIT_MILLIS
public int local_port
public int remote_port
public java.net.InetAddress local_address
public java.net.InetAddress remote_address
public TCP mParent
public static int PORT_FROM_NET
public static int PORT_TO_NET
public static int PORT_INTERNAL_FROM_NET
public static int PORT_INTERNAL_TO_NET
public static int NUM_PORTS
public TCPSocket mSocket
public OrderPackets mOrderPackets
public ProcessAck mProcessAck
public ProcessSegment mProcessSegment
public ReceiveWindowCheck mRecvWinCheck
public Retransmitter mRetransmitter
public SendWindowCheck mSendWinCheck
public SetChecksum mSetChecksum
public ValidateChecksum mValidateChecksum
public SockBuffer mSendBuffer
public SockBuffer mRecvBuffer
public ClackComponentEvent mDataChangeEvent
Constructor Detail |
---|
public TCB(TCP parent, Router router, java.lang.String name)
Method Detail |
---|
public void connect_no_gui()
These components are usually connected in HierarchicalComponent, but that is only if we are using the GUI. For testing, we may want to connect them using this method.
public void acceptPacket(VNSPacket packet, int port_num)
ClackComponent
The starting point for packet-processing when packets are "pushed" to this component.
The default implementation warns that the packet is being ignored.
acceptPacket
in class ClackComponent
packet
- The pushed packetport_num
- The number of the port that this packet is arriving onpublic void initiateConnection(java.net.InetAddress r_addr, int r_port)
r_addr
- r_port
- protected void setupPorts(int numports)
ClackComponent
setupPorts
in class ClackComponent
numports
- the number of ports to createpublic static java.lang.String getStateString(int state)
state
- public void notifySynReceived(VNSTCPPacket packet)
This TCB is the result of an accept() call on a server socket, creating a new child socket.
packet
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |