public class L3Handler extends java.lang.Object implements L3ShimListener
Constructor and Description |
---|
L3Handler(Layer2Endpoint l2e,
int netPart)
Create a L3Handler, given a layer 2 endpoint, and the network part
of the L3Address.
|
Modifier and Type | Method and Description |
---|---|
boolean |
dropReceivedPacket(L3Packet pkt,
java.lang.String bits)
Drop any received packet that isn't for this interface.
|
L3Address |
getAddr() |
void |
packetReceived(Layer2Endpoint l2e,
java.lang.String bits)
Called when the layer below receives bits successfully.
|
void |
send(L3Packet pkt)
Given a frame, convert it to a string of bits and send it using the
L3Shim on layer 2 "below".
|
void |
setListener(L3Listener l)
Store a reference to a listener for packets received
here.
|
public L3Handler(Layer2Endpoint l2e, int netPart)
public void setListener(L3Listener l)
public void send(L3Packet pkt)
public boolean dropReceivedPacket(L3Packet pkt, java.lang.String bits)
public void packetReceived(Layer2Endpoint l2e, java.lang.String bits)
packetReceived
in interface L3ShimListener
public L3Address getAddr()