|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NetInterface
Defines the interface of all Network layer entity implementations.
Nested Class Summary | |
---|---|
static interface |
NetInterface.NetHandler
Network layer callback interface. |
Method Summary | |
---|---|
void |
dropNotify(Message msg,
MacAddress nextHopMac,
Reason reason)
Notification mechanism for packet dropped due to various "Reasons" |
NetAddress |
getAddress()
Return local network address. |
void |
pump(int netid)
Request next packet to send, if one exists; indicate that interface has completed processing previous request. |
void |
receive(Message msg,
MacAddress lastHop,
byte macId,
boolean promiscuous)
Receive a message from the link layer. |
void |
send(Message msg,
NetAddress dst,
short protocol,
byte priority,
byte ttl)
Route, if necessary, and send a message (from TRANSPORT). |
void |
send(NetMessage.Ip msg,
int interfaceId,
MacAddress nextHop)
Send a message along given interface (usually from ROUTING). |
Method Detail |
---|
NetAddress getAddress() throws JistAPI.Continuation
JistAPI.Continuation
- never (blocking event)void receive(Message msg, MacAddress lastHop, byte macId, boolean promiscuous)
msg
- incoming network packetlastHop
- link-level source of incoming packetmacId
- incoming interfacepromiscuous
- whether network interface is in promisc. modevoid send(Message msg, NetAddress dst, short protocol, byte priority, byte ttl)
msg
- packet payload (usually from transport or routing layers)dst
- packet destination addressprotocol
- packet protocol identifierpriority
- packet priorityttl
- packet time-to-live valuevoid send(NetMessage.Ip msg, int interfaceId, MacAddress nextHop)
msg
- packet (usually from routing layer)interfaceId
- interface along which to send packetnextHop
- packet next hop addressvoid pump(int netid)
netid
- interface identifiervoid dropNotify(Message msg, MacAddress nextHopMac, Reason reason)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |