public class Layer2Endpoint extends Layer2Handler implements BitListener
Constructor and Description |
---|
Layer2Endpoint(int macAddr)
Constructor: store the macAddr that identifies this endpoint, and
use the super class to create a layer 2 object that we use to
send/receive frames.
|
Layer2Endpoint(java.lang.String host,
int port,
int macAddr)
Constructor: store the macAddr that identifies this endpoint, and
use the super class to create a layer 2 object that we use to
send/receive frames.
|
Modifier and Type | Method and Description |
---|---|
boolean |
dropReceivedFrame(Layer2Frame fr,
java.lang.String bits)
drop received frames that do not have either a bcast destination mac address
or this endpoint's destination mac address.
|
int |
getMacAddr()
return the mac address of this endpoint.
|
int |
getVlanId()
return the vlanId of this endpoint.
|
java.lang.String |
toString()
A string representation of this object -- the mac address.
|
bitsReceived, send, setListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
bitsReceived
public Layer2Endpoint(int macAddr)
public Layer2Endpoint(java.lang.String host, int port, int macAddr)
public java.lang.String toString()
toString
in class java.lang.Object
public int getMacAddr()
public int getVlanId()
public boolean dropReceivedFrame(Layer2Frame fr, java.lang.String bits)
dropReceivedFrame
in class Layer2Handler