|
||||||||||
| 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 | |
private boolean |
DEBUG
|
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 ProtocolMonitor |
monitor
|
private boolean |
monitorON
|
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 |
inGraph, name, use |
| Constructor Summary | |
IP()
|
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure this IP session. |
private void |
createMonitor(com.renesys.raceway.DML.Configuration config)
Instantiate and configure an IP packet monitor implementing the interface SSF.OS.ProtocolMonitor, if specified locally in this host's IP configuration. |
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)
|
boolean |
push(ProtocolMessage message,
ProtocolSession fromSession)
|
void |
setGraph(ProtocolGraph G)
|
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
private boolean DEBUG
protected java.lang.String tieBreakerClass
protected ProtocolMonitor monitor
private boolean monitorON
| Constructor Detail |
public IP()
| Method Detail |
public RoutingTable getRoutingTable()
public void setGraph(ProtocolGraph G)
throws ProtocolException
setGraph in class ProtocolSessionProtocolException
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
private void createMonitor(com.renesys.raceway.DML.Configuration config)
throws com.renesys.raceway.DML.configException
com.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
opened in class ProtocolSessionProtocolException
public boolean push(ProtocolMessage message,
ProtocolSession fromSession)
throws ProtocolException
push in class ProtocolSessionProtocolExceptionpublic void drop(IpHeader pkt)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||