J-Sim v1.2.1-p7 API

drcl.inet.transport
Class TCPb

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.Protocol
                  extended bydrcl.inet.transport.TCP
                      extended bydrcl.inet.transport.TCPb
All Implemented Interfaces:
ActiveComponent, java.lang.Cloneable, drcl.inet.transport.Connection, InetConstants, ObjectDuplicable, java.io.Serializable, TCPConstants
Direct Known Subclasses:
TCP_socket

public class TCPb
extends TCP

Bi-directional (Single-session) TCP Protocol. This class implements both the TCP sender and receiver. Basically it is a result of carefully merging TCP and TCPSink.

In the current implementation, ACKs are not piggy-backed in data segments. This will be fixed shortly.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.inet.transport.TCP
TCP.VegasVariables
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static boolean NS_COMPATIBLE
          Sets to true to make TCP ns compatible
 
Fields inherited from class drcl.inet.transport.TCP
ackPort, AWND, AWND_DEFAULT, backoff, burst, bytesRetx, cur_rtt, CWND, cwndPort, DEBUG_ACK, DEBUG_DUPACK, DEBUG_LEVELS, DEBUG_RTT, DEBUG_SACK, DEBUG_SAMPLE, DEBUG_SEND, DEBUG_TIMEOUT, DEBUG_VEGAS, dt_max, dup_ack, implementation, INIT_SS_THRESHOLD, last_seq, maxburst, MAXCWND, MAXCWND_DEFAULT, maxrto, MSS, numack, NUMDUPACKS, numTimeouts, recvBuffer, rttvar_bits, rttvar_exp, rttvar_init, rttvarPort, rtxcur_init, SACK, sbuffer, seqNoPort, snd_max, snd_nxt, snd_nxt_marked, snd_nxt_recorded, snd_una, srtt_bits, srtt_init, srttPort, sstPort, state, sthld, t_grain, t_rttvar, t_rtxcur, t_srtt, TTL, vegas
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_EXPOSED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_HAS_EXPOSED_CHILD, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Fields inherited from interface drcl.inet.transport.TCPConstants
ACK_EVENT, ACK_PORT_ID, 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, NEW_RENO, 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
 
Fields inherited from interface drcl.inet.InetConstants
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_LINK_BROKEN, EVENT_LINK_BROKEN_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_AODV, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID
 
Constructor Summary
TCPb()
           
TCPb(java.lang.String id_)
           
 
Method Summary
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 handler invoked when a packet arrives at an "up" port.
 void duplicate(java.lang.Object source_)
          Duplicates the content of source_, including ID, name, child components and connections among them, to this component.
protected  int getAckNo()
           
protected  int getAvailableRcvBuffer()
           
 int getAvailableReceivingBuffers()
           
 double getDelayACKTimeout()
           
 java.lang.String getName()
          Returns the (informational) name of the component.
 int getReceivingBuffers()
           
 java.lang.String info()
          Returns information regarding this component.
 boolean isDelayACKEnabled()
           
 void reset()
          Resets the component for being used anew.
 void setDelayACKEnabled(boolean delayack_)
           
 void setDelayACKTimeout(double v_)
           
 void setDownPort(Port downPort_)
           
 void setMSS(int mss)
          Sets the maximum segment size.
 void setPeer(long peer_)
           
 void setReceivingBuffers(int awnd_)
           
 void setSackEnabled(boolean sack_)
           
 void setTTL(int ttl)
           
 
Methods inherited from class drcl.inet.transport.TCP
_start, ack_syn_fin, configInfo, configureRTT, getBASERTT_INIT, getDebugLevelNames, getImplementation, getLocalAddr, getLocalPort, getMAXCWND, getMAXRTO, getMSS, getNumBytesRetransmitted, getNumTimeouts, getPeer, getRemotePort, getRTTVAR_INIT, getSendingBuffer, getSeqNo, getSRTT_INIT, getState, getTick, getTTL, isMaxburstEnabled, isSackEnabled, option_process, recv, resetRXTTimer, rtt_init, rtt_update, rxt_timer, seq_max, setBASERTT_INIT, setImplementation, setMaxburstEnabled, setMAXCWND, setMAXRTO, setRTTVAR_INIT, setSRTT_INIT, setTick, snd_maxpck, snd_packet, snd_wnd, tcp_init, timeout, timer_backoff, win_decrease, win_increase, win_init
 
Methods inherited from class drcl.inet.Protocol
broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, createConfigSwitchPort, createIDChangedEventPort, createIDServicePort, createIFEventPort, createIFQueryPort, createLinkBrokenEventPort, createMcastHostEventPort, createMcastQueryPort, createMulticastRTChangedEventPort, createPktArrivalEventPort, createRTServicePort, createUcastQueryPort, createUnicastRTChangedEventPort, createVIFEventPort, forward, forward, forward, forward, forward, forward, idAddedEventHandler, idRemovedEventHandler, LinkBrokenEventHandler, mcastHostJoinEventHandler, mcastHostLeaveEventHandler, neighborDownEventHandler, neighborUpEventHandler, pktArrivalHandler, processOther, routeQueryHandler, routeQueryHandler, rtAddedEventHandler, rtModifiedEventHandler, rtRemovedEventHandler, vNeighborDownEventHandler, vNeighborUpEventHandler
 
Methods inherited from class drcl.net.Module
cancelTimeout, deliver, getAddress, process, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
_resume, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getForkManager, getID, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait, yield
 
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

NS_COMPATIBLE

public static boolean NS_COMPATIBLE
Sets to true to make TCP ns compatible

Constructor Detail

TCPb

public TCPb()

TCPb

public TCPb(java.lang.String id_)
Method Detail

getName

public java.lang.String getName()
Description copied from class: Component
Returns the (informational) name of the component.

Overrides:
getName in class TCP

reset

public void reset()
Description copied from class: Component
Resets the component for being used anew. All the internal variables must be set to the initial state. All the ports and child components are reset as well.

Overrides:
reset in class TCP

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: Component
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. Subclasses need to override this method to copy its own variables.

Specified by:
duplicate in interface ObjectDuplicable
Overrides:
duplicate in class TCP

setDownPort

public void setDownPort(Port downPort_)

setTTL

public void setTTL(int ttl)
Overrides:
setTTL in class TCP

setMSS

public void setMSS(int mss)
Description copied from class: TCP
Sets the maximum segment size. This method initializes this TCP component. Should not be called during simulation.

Overrides:
setMSS in class TCP

setReceivingBuffers

public void setReceivingBuffers(int awnd_)

getReceivingBuffers

public int getReceivingBuffers()

getAvailableReceivingBuffers

public int getAvailableReceivingBuffers()

setSackEnabled

public void setSackEnabled(boolean sack_)
Overrides:
setSackEnabled in class TCP

setDelayACKEnabled

public void setDelayACKEnabled(boolean delayack_)

isDelayACKEnabled

public boolean isDelayACKEnabled()

setDelayACKTimeout

public void setDelayACKTimeout(double v_)

getDelayACKTimeout

public double getDelayACKTimeout()

setPeer

public void setPeer(long peer_)
Overrides:
setPeer in class TCP

dataArriveAtUpPort

protected void dataArriveAtUpPort(java.lang.Object data_,
                                  Port upPort_)
Description copied from class: Module
The handler invoked when a packet arrives at an "up" port. Subclasses should override it to handle such an event.

Overrides:
dataArriveAtUpPort in class TCP

dataArriveAtDownPort

protected void dataArriveAtDownPort(java.lang.Object data_,
                                    Port downPort_)
The down port follows the PktDelivery contract.

Overrides:
dataArriveAtDownPort in class TCP

getAckNo

protected int getAckNo()
Overrides:
getAckNo in class TCP

getAvailableRcvBuffer

protected int getAvailableRcvBuffer()
Overrides:
getAvailableRcvBuffer in class TCP

info

public java.lang.String info()
Description copied from class: Component
Returns information regarding this component. Subclasses should override this method to provide useful information at run time.

Overrides:
info in class TCP

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~