|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.comp.Component
|
+--drcl.net.Module
|
+--drcl.inet.Protocol
|
+--drcl.inet.transport.TCPSink
This component implements the single-session receiving-side TCP.
By default, when this component receives a TCP packet, it processes the timestamp option and sends back an acknowledgement. In addition, one can enable the SACK flag to make this component append the SACK blocks in the acknowledgement packets. The realization of SACK is based on [RFC2018].
This component also implements delayed ACK. The delay timer is 100ms(0.1 second) as specified in [TCPILL2]. When the delayed ACK flag is enabled, an acknowledgment is sent when (1) the delay timer expires or (2) a new data packet arrives.
Since only one session is handled in this component, open and close of a connection are not implemented, nor is 3-way handshaking.
Additional usage infomation:
setTTL(int).
setReceivingBuffers(int).
setDelayACKTimeout(double).
TCP,
TCPPacket, Serialized Form| Inner classes inherited from class drcl.comp.Component |
Component.LockPack |
| Field Summary | |
static int |
DEBUG_RCV
|
static int |
DEBUG_SACK
|
static int |
DEBUG_SAMPLE
|
static int |
DEBUG_SEND
|
static boolean |
NS_COMPATIBLE
Sets to true to make TCP ns compatible |
protected boolean |
SACK
|
| Fields inherited from class drcl.net.Module |
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort |
| Fields inherited from interface drcl.inet.transport.TCPConstants |
ACK_EVENT, ACK_PORT_ID, AWND_DEFAULT, CLOSE_WAIT, CLOSED, CLOSING, CWND_EVENT, CWND_PORT_ID, DEFAULT_PID, DELAY_ACK, ESTABLISHED, ESTABLISHED_FIN, ESTABLISHED_OVER, FIN_WAIT_1, FIN_WAIT_2, LAST_ACK, LISTEN, LISTEN1, LISTEN2, MAXCWND_DEFAULT, NEW_RENO, NUMDUPACKS, PRE_CLOSED, PRE_LAST_ACK, PRE_SYN_SENT, RECEIVE, RENO, RTT_EVT, RTTVAR_EVENT, RTTVAR_PORT_ID, RXT_EVT, SEND, SEQNO_EVENT, SEQNO_PORT_ID, SEQNO_RCV_EVENT, SEQNO_RCV_PORT_ID, SEQNO_SENT_EVENT, SEQNO_SENT_PORT_ID, SRTT_EVENT, SRTT_PORT_ID, SST_EVENT, SST_PORT_ID, STATES, SYN_RCVD, SYN_SENT, TAHOE, TIME_WAIT, TIMEOUT_TYPES, VEGAS |
| Constructor Summary | |
TCPSink()
|
|
TCPSink(java.lang.String id_)
|
|
| Method Summary | |
protected void |
ack_syn_fin(boolean doSACK_)
Sends an acknowledgement packet. |
protected void |
dataArriveAtDownPort(java.lang.Object data_,
Port downPort_)
The down port follows the PktDelivery contract. |
protected void |
dataArriveAtUpPort(java.lang.Object data_,
Port upPort_)
The up port group ports follow the ByteStreamContract. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
int |
getAvailableReceivingBuffers()
|
java.lang.String[] |
getDebugLevelNames()
Returns the names of defined debug levels; subclasses should override this method if debug levels are defined. |
double |
getDelayACKTimeout()
|
long |
getLocalAddr()
Returns the local address. |
int |
getLocalPort()
Returns the local port. |
int |
getMSS()
|
java.lang.String |
getName()
Returns the (informational) name of the component. |
long |
getPeer()
Returns the peer address. |
int |
getReceivingBuffers()
|
int |
getRemotePort()
Returns the peer port. |
int |
getTTL()
|
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isDelayACKEnabled()
|
boolean |
isSackEnabled()
|
protected void |
option_process(TCPPacket pkt_)
Processes TCP options in the packet header. |
protected void |
recv(TCPPacket pkt_)
Handles incoming packets. |
void |
reset()
Resets the component for being used anew. |
void |
setDelayACKEnabled(boolean delayack_)
|
void |
setDelayACKTimeout(double v_)
|
void |
setMSS(int mss)
|
void |
setReceivingBuffers(int awnd_)
|
void |
setSackEnabled(boolean sack_)
|
void |
setTTL(int ttl)
|
protected void |
timeout(java.lang.Object evt_)
Handles timeout events. |
| Methods inherited from class drcl.net.Module |
cancelTimeout, deliver, getAddress, process, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static boolean NS_COMPATIBLE
protected boolean SACK
public static final int DEBUG_RCV
public static final int DEBUG_SEND
public static final int DEBUG_SACK
public static final int DEBUG_SAMPLE
| Constructor Detail |
public TCPSink()
public TCPSink(java.lang.String id_)
| Method Detail |
public java.lang.String getName()
ComponentgetName in class Componentpublic java.lang.String[] getDebugLevelNames()
ComponentgetDebugLevelNames in class Componentpublic void reset()
Componentreset in class Componentpublic void duplicate(java.lang.Object source_)
Componentduplicate in class Protocolpublic void setTTL(int ttl)
public int getTTL()
public void setMSS(int mss)
public int getMSS()
public void setReceivingBuffers(int awnd_)
public int getReceivingBuffers()
public int getAvailableReceivingBuffers()
public void setSackEnabled(boolean sack_)
public boolean isSackEnabled()
public void setDelayACKEnabled(boolean delayack_)
public boolean isDelayACKEnabled()
public void setDelayACKTimeout(double v_)
public double getDelayACKTimeout()
protected void timeout(java.lang.Object evt_)
timeout in class Moduledrcl.net.ModuleModule.setTimeout(Object, double),
Module.setTimeoutAt(Object, double)
protected void dataArriveAtUpPort(java.lang.Object data_,
Port upPort_)
ByteStreamContract.
The method is blocked until the receiving is complete.dataArriveAtUpPort in class Module
protected void dataArriveAtDownPort(java.lang.Object data_,
Port downPort_)
PktDelivery contract.dataArriveAtDownPort in class Moduleprotected void recv(TCPPacket pkt_)
protected void option_process(TCPPacket pkt_)
protected void ack_syn_fin(boolean doSACK_)
public int getLocalPort()
drcl.inet.transport.ConnectiongetLocalPort in interface drcl.inet.transport.Connectionpublic int getRemotePort()
drcl.inet.transport.ConnectiongetRemotePort in interface drcl.inet.transport.Connectionpublic long getLocalAddr()
drcl.inet.transport.ConnectiongetLocalAddr in interface drcl.inet.transport.Connectionpublic long getPeer()
drcl.inet.transport.ConnectiongetPeer in interface drcl.inet.transport.Connectionpublic java.lang.String info()
Componentinfo in class Component
|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||