simnet
Class ICMP

java.lang.Object
  extended bysimnet.Transport
      extended bysimnet.ICMP
All Implemented Interfaces:
Pluggable, PlugoutListener

public class ICMP
extends Transport
implements Pluggable

An implementation of the ICMP protocol.


Field Summary
 
Fields inherited from class simnet.Transport
node, NODE_ID, sim
 
Constructor Summary
ICMP()
           
 
Method Summary
 int getProtocol()
          Returns the protocol (id) of this Transport
 void in(int src, Packet packet)
          Processes incoming packets from the IP stack.
 void initialize(Node parent_node)
          Initializes a new ICMP object by setting its ID.
 boolean prePlugout(java.lang.Object replacement)
          No special cleanup is required.
 
Methods inherited from class simnet.Transport
finalize, plugoutNotification, rawIn
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICMP

public ICMP()
Method Detail

initialize

public void initialize(Node parent_node)
Initializes a new ICMP object by setting its ID.

Overrides:
initialize in class Transport
Parameters:
parent_node - the Node that owns this Transport

getProtocol

public int getProtocol()
Returns the protocol (id) of this Transport

Specified by:
getProtocol in class Transport

in

public void in(int src,
               Packet packet)
Processes incoming packets from the IP stack.

Specified by:
in in class Transport
Parameters:
src - the incoming packet' s source
packet - incoming packet

prePlugout

public boolean prePlugout(java.lang.Object replacement)
No special cleanup is required.

Specified by:
prePlugout in interface Pluggable
Returns:
if this object can now be removed (was the operation sucessful)