Allow another object (e.g., a Layer 3 object) to register itself to
get called when this object receives a good frame.
public boolean dropReceivedFrame(Layer2Frame fr,
A default implementation that says we do not drop a received frame.
Override in a subclass to specify when it should be dropped.
The frame is passed in both cooked and raw formats.
public void bitsReceived(BitHandler handler,
Called when the layer below receives bits successfully. This code
drops packets that we sent that were mirrored back to us, parses the
bits into a Layer2Frame (making sure they are a legal format), and
calls dropReceivedFrame (implemented in subclasses, possibly), to
determine if the frame should not be handled here because it isn't
for this endpoint. If the frame is for me, then call the
upper-layer listener with the received frame.