|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.IP
This class implements a subset of the IP protocol. The primary job of IP is to find a route for each datagram and send it on its way. In order to allow gateways or other intermediate systems to forward the datagram, it adds its own header (IpHeader.java). This version of IP uses a 'next hop' IP address as a surrogate hardware address; future alternatives with more elaborate link layer models will fix this.
Revisions ato 9/24/00: support for configuration of Monitors. Revisions jhc 1/29/01: support for ICMP messages before drop()
IpHeader| Nested Class Summary | |
protected class |
IP.demux_cache
demux_cache: class internal to IP, used for rapid demultiplexing of protocol numbers to protocol session instances. |
| Field Summary | |
int |
INTERFACE_COUNT
|
NIC[] |
INTERFACE_SET
|
int |
INTERFACE_SET_STARTING_SIZE
|
java.util.Vector |
INTERFACES
An array of NIC(s) controlled by this IP. |
protected RoutingTable |
ROUTING_TABLE
The IP routing table. |
protected IP.demux_cache |
session_cache
|
protected java.lang.String |
tieBreakerClass
|
| Fields inherited from class SSF.OS.ProtocolSession |
name, use |
| Constructor Summary | |
IP()
|
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure this IP session. |
void |
drop(IpHeader pkt)
Method called when IP drops a packet that has reached the end of its lifetime, or has no route to its destination. |
boolean |
getMonitorEnable()
An ProtocolMonitor may inquire if IP calls to its receive() are enabled |
RoutingTable |
getRoutingTable()
Return the IP routing table. |
void |
init()
Monitor may need to initialize after the config() phase. |
void |
opened(ProtocolSession nic)
Called by a neighboring session to confirm to this session that an open operation has succeeded, and that this session is now successfully configured over/under the caller session. |
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
Routine to call when a message is being sent to ("pushed into") this ProtocolSession by another ProtocolSession. |
void |
setGraph(ProtocolGraph G)
Set the protocol graph in which this session is configured. |
void |
setMonitorEnable(boolean en)
An ProtocolMonitor may turn on and off calls to its receive() method. |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, pushAfterDelay, pushAfterDelayFailed, version |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.Vector INTERFACES
protected RoutingTable ROUTING_TABLE
protected IP.demux_cache session_cache
public final int INTERFACE_SET_STARTING_SIZE
public NIC[] INTERFACE_SET
public int INTERFACE_COUNT
protected java.lang.String tieBreakerClass
| Constructor Detail |
public IP()
| Method Detail |
public RoutingTable getRoutingTable()
public void setGraph(ProtocolGraph G)
throws ProtocolException
ProtocolSession
setGraph in class ProtocolSessionProtocolException - if the session is already configured in a protocol graph
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
ProtocolSession [for ip use SSF.OS.IP
debug %S # print verbose diagnostics, true/false
tiebreaker [
use %S # class name to use to choose routes of equal cost
]
monitor [
use %S # class name to use for IP Monitoring
]
]
If tiebreaker is omitted, the default is a simple hash on src and
dest address provided in an anonymous inner class in SSF.Net.RadixTreeRoutingTable.
config in interface com.renesys.raceway.DML.Configurableconfig in class ProtocolSessioncom.renesys.raceway.DML.configException
public void init()
throws ProtocolException
init in class ProtocolSessionProtocolExceptionpublic void setMonitorEnable(boolean en)
public boolean getMonitorEnable()
public void opened(ProtocolSession nic)
throws ProtocolException
ProtocolSession
opened in class ProtocolSessionProtocolException - if the opened session could not be added to the list of open sessions, perhaps because the max session count has been exceeded
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
ProtocolSessionIf you desire "safe" interaction with other CPU activities, even though your push() consumes no measurable/modelable CPU cycles, define the "cpudelay true" attribute for the ProtocolGraph and use pushAfterDelay(message,fromSession,0.0). This will guarantee proper ordering; that is, the framework will wait until the CPU is free before proceeding with the requested push().
push in class ProtocolSessionProtocolExceptionpublic void drop(IpHeader pkt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||