|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.TCP.tcpSessionMaster
This class manages all the TCP sessions, such as creating a new TCP session and closing an existing TCP session. It receives messages coming from the upper level protocol and lower level protocol, demultiplex them and pass them to the corresponding TCP sessions according to different IP address and port number.
| Field Summary | |
static short |
DELACK
flag for delayed-ack option |
static short |
FAST_RECOVERY
flag for fast recovery option |
long |
init_time
random initial ofset of the system clock |
long |
ISS
initial send sequence number |
long |
ISS_INCR
initial send sequence number increment |
int |
MaxConWnd
maximum congestion window size |
long |
MaxIdleTime
TCP maximum idle time, seconds |
int |
MaxRexmitTimes
maximum retransmission times |
long |
MSL
TCP maximum segment lifetime, seconds |
int |
MSS
maximum segment size, bytes |
int |
RcvWndSize
receive window size, MSS units |
int |
SendBufferSize
send buffer size, MSS units |
int |
SendWndSize
send window size, MSS units |
long |
TCP_FAST_INTERVAL
TCP fast timer interval, seconds |
long |
TCP_SLOW_INTERVAL
TCP slow timer interval, seconds |
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
tcpSessionMaster()
Constructors |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the TCP parameters. |
tcpSession |
FindServer(int srcPort)
Find the listening (server) tcpSession bound to the given local port number. |
tcpSession |
FindSession(int srcPort,
int DesIpAdr,
int DesPort)
Find a session in the TCP session list by its identification via source port number, destination IP address and port number. |
int |
getSessionID()
Returns the next higher automatically assigned integer session number. |
void |
init()
initialize the tcpSessionMaster: get references to Socket session and IP session in enclosing ProtocolGraph. |
void |
open(ProtocolSession higher,
java.lang.Object request)
No-op, for conformance with ProtocolSession interface. |
void |
openConnect(ProtocolSession higher,
int SrcIpAddr,
int SrcPort,
int DesIpAddr,
int DesPort)
Actively open a connection. |
boolean |
opened(int SrcPort,
int DesIpAddr,
int DesPort)
Find if the connection has been already established. |
void |
openServer(ProtocolSession higher,
int SrcIpAddr,
int SrcPort)
Passive open of a listening server session. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Demoltiplex the arriving TCP/IP message to its tcpSession session in the protocol graph. |
void |
removeConnect(tcpSession tobeRemoved)
remove the connection from the connection list |
void |
removeServer(int SrcIpAddr,
int SrcPort)
Remove a pasive server session listening on local port SrcPort. |
void |
respond(int srcIpAddr,
int desIpAddr,
int srcPort,
int desPort,
int win,
long seqNo,
long ackNo,
byte flag,
int seglen)
Send a TCP message with given header fields, and seglen virtual payload bytes. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, opened, pushAfterDelay, pushAfterDelayFailed, setGraph, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public long init_time
public long ISS
public long ISS_INCR
public int MSS
public int RcvWndSize
public int SendWndSize
public int SendBufferSize
public int MaxConWnd
public int MaxRexmitTimes
public long TCP_SLOW_INTERVAL
public long TCP_FAST_INTERVAL
public long MSL
public long MaxIdleTime
public static short DELACK
public static short FAST_RECOVERY
| Constructor Detail |
public tcpSessionMaster()
| Method Detail |
public int getSessionID()
public void init()
throws ProtocolException
init in class ProtocolSessionProtocolException
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
ProtocolSession [name tcp use SSF.OS.TCP.tcpSessionMaster
tcpinit[
ISS %I # initial sequence number
MSS %I # maximum segment size, bytes
RcvWndSize %I # receive buffer size in units of MSS
SendWndSize %I # maximum send window size in units of MSS
SendBufferSize %I # send buffer size in units of MSS
MaxConWnd %I # maximum congestion window size in units of MSS
MaxRexmitTimes %I # maximum number of retransmissions
TCP_SLOW_INTERVAL %F # granularity of TCP slow timer, sec
TCP_FAST_INTERVAL %F # granularity of TCP fast(delay-ack), sec
MSL %F # maximum segment lifetime, sec
MaxIdleTime %F # maximum idle time, sec
delayed_ack %S # delayed ack option, true/false
fast_recovery %S # use fast recovery algorithm, true/false
show_report %S # print summary connection report, true/false
]
debug %S # if true, dump verbose TCP diagnostics to files
# for session & host (see below), true/false
warn %S # if true, prints warnings about certain
# important TCP events and errors (default: true)
# dump filename prefixes - actual filenames end with "_hostID_flowID.out"
# for session info, and with "_hostID.out" for host info
rttdump %S # rtt dumpfile prefix (session)
cwnddump %S # cwnd dumpfile prefix (session)
rexdump %S # rexmit timer dumpfile prefix (session)
eventdump %S # dumpfile prefix for all events (session)
con_count %S # dumpfile prefix for number of connections (host)
rto_count %S # dumpfile prefix for timeout info (host)
]
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncom.renesys.raceway.DML.configException
public void open(ProtocolSession higher,
java.lang.Object request)
throws ProtocolException
open in class ProtocolSessionProtocolException - if neither the opening session nor the opened session are contained within a valid protocol graph, or if they are already contained within different protocol graphs, or if the opening session could not be added to the list of open sessions, perhaps because the max session count has been exceeded
public void openServer(ProtocolSession higher,
int SrcIpAddr,
int SrcPort)
public void removeServer(int SrcIpAddr,
int SrcPort)
public tcpSession FindServer(int srcPort)
public void openConnect(ProtocolSession higher,
int SrcIpAddr,
int SrcPort,
int DesIpAddr,
int DesPort)
public boolean opened(int SrcPort,
int DesIpAddr,
int DesPort)
public tcpSession FindSession(int srcPort,
int DesIpAdr,
int DesPort)
public void removeConnect(tcpSession tobeRemoved)
tobeRemoved - tcpSession which represent this connection
public void respond(int srcIpAddr,
int desIpAddr,
int srcPort,
int desPort,
int win,
long seqNo,
long ackNo,
byte flag,
int seglen)
throws ProtocolException
ProtocolException
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
If the destination tcpSession can be found, then put the message to the receive buffer, otherwise, check the flag of TCP header, and if it's a connection request, then find the server socket by port number and create a new tcpSession for this connection.
push in class ProtocolSessionProtocolException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||