|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdesmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
verinec.netsim.components.Node
public class Node
A Node represents a Network Component in the Network
| Field Summary | |
|---|---|
private ApplicationLayer |
applicationlayer
|
private AddressTable |
arptable
|
private Vector |
datalinklayers
|
private Firewall |
firewall
|
private Logger |
jlogger
|
private NetworkLayer |
networklayer
|
private String |
nodeID
|
private SocketSimProccessTable |
processes
|
private RoutingTable |
routingtable
|
private List |
services
|
private TransportLayer |
transportlayer
|
| Constructor Summary | |
|---|---|
Node(Model model,
Element element)
Constructs a Node with the parameters in the element |
|
| Method Summary | |
|---|---|
private void |
bind(DataLinkLayer dl,
String binding)
binds a nic to a "physical cable" |
private void |
createApplicationLayer(Element element)
|
private void |
createHardware(Element element)
Creates the "hardware part" of the node |
private void |
createNetworkLayer(Element element)
Creates the "layer 3 part" of the node |
private void |
createNIC(Element element)
Creates a NIC |
void |
createNICethernet(Element element)
Creates a ethernet NIC if now hwaddress is given, a random one is generated. |
void |
createNICserial(Element element)
Creates a serial NIC |
void |
createNICwlan(Element element)
Creates a wlan NIC |
private void |
createServices(Element element)
Creates the application layer with all specified services |
private void |
createTransportLayer()
Creates the "layer 4 part" of the node |
Firewall |
getFirewall()
gets the nodes firewall |
String |
getNodeID()
gets the nodes identifier |
SimProcess |
getProcess(IAddress localhost,
IAddress dsthost,
int dstport)
gets the Sim Proccess that was registered before |
SimProcess |
getProcess(int dstport)
gets the Sim Proccess that was registered before |
TransportLayer |
getTransportlayer()
gets the nodes transport layer |
boolean |
isPacketForwarding()
|
void |
registerClient(IPAddress src,
IPAddress dst,
int port,
SimProcess process)
Registeres a SimProcess with a port of a Socket. |
void |
registerClient(Socket socket,
SimProcess process)
Registeres a SimProcess with a port of a Socket. |
void |
registerServer(int port,
SimProcess process)
Registeres a SimProcess with a port of a ServerSocket. |
private void |
setNodeID(String string)
sets the nodes identifier |
void |
setTransportlayer(TransportLayer layer)
sets the nodes transport layer |
| Methods inherited from class desmoj.core.simulator.ModelComponent |
|---|
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn |
| Methods inherited from class desmoj.core.simulator.NamedObject |
|---|
getName, getQuotedName, rename, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private TransportLayer transportlayer
private Vector datalinklayers
private NetworkLayer networklayer
private ApplicationLayer applicationlayer
private String nodeID
private AddressTable arptable
private RoutingTable routingtable
private SocketSimProccessTable processes
private Logger jlogger
private Firewall firewall
private List services
| Constructor Detail |
|---|
public Node(Model model,
Element element)
throws NetSimException
model - The network model this component is associated toelement - specification of the node
NetSimException - when something gows wrong building the node| Method Detail |
|---|
private void createApplicationLayer(Element element)
private void createNetworkLayer(Element element)
element - element hardware specificationprivate void createTransportLayer()
private void createHardware(Element element)
throws NetSimException
element - hardware specification
NetSimException - when something goes wring constructing the interface. This
may come from an unknown interface type.
private void createNIC(Element element)
throws NetSimException
element - NIC specification
NetSimException - when something goes wrong constructing the node. e.g when an
unknown interface type is used.public void createNICethernet(Element element)
element - NIC specification
private void bind(DataLinkLayer dl,
String binding)
dl - a nicbinding - a binding namepublic void createNICwlan(Element element)
element - NIC specificationpublic void createNICserial(Element element)
element - NIC specificationprivate void createServices(Element element)
element - service specificationspublic Firewall getFirewall()
public String getNodeID()
private void setNodeID(String string)
string - new identifierpublic TransportLayer getTransportlayer()
public void setTransportlayer(TransportLayer layer)
layer - a new transport layer
public SimProcess getProcess(IAddress localhost,
IAddress dsthost,
int dstport)
localhost - local host of the registered Socketdsthost - destination host of the registered Socketdstport - destination port of the registered Socket
public SimProcess getProcess(int dstport)
dstport - destination port of the registered Socket
public void registerServer(int port,
SimProcess process)
port - port of a ServerSocketprocess - the proccess
public void registerClient(Socket socket,
SimProcess process)
socket - a Socketprocess - a Proccess
public void registerClient(IPAddress src,
IPAddress dst,
int port,
SimProcess process)
src - source address of the Socketdst - destination address of the Socketport - destination port of the Socketprocess - a Proccesspublic boolean isPacketForwarding()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||