public interface NeighbourMessageContext
This includes information about the message accessible through a protocol-agnostic interface, as well as mechanisms to perform an action in response to the incoming message.
Modifier and Type | Method and Description |
---|---|
void |
drop()
Drops the incoming message.
|
MacAddress |
dstMac()
Gets the destination MAC address of the message.
|
void |
flood()
Floods the incoming message out all ports except the input port.
|
void |
forward(ConnectPoint outPort)
Forwards the message to a given output port.
|
void |
forward(Interface outIntf)
Forwards the message to a given interface.
|
ConnectPoint |
inPort()
Gets the port where the packet came in to the network.
|
Ethernet |
packet()
Gets the full parsed representation of the packet.
|
NeighbourProtocol |
protocol()
Gets the protocol of the packet.
|
void |
reply(MacAddress targetMac)
Replies to the request message with a given MAC address.
|
IpAddress |
sender()
Gets the source IP address of the message.
|
MacAddress |
srcMac()
Gets the source MAC address of the message.
|
IpAddress |
target()
Gets the target IP address of the message.
|
NeighbourMessageType |
type()
Gets the message type of the packet.
|
VlanId |
vlan()
Gets the vlan of the packet, if any.
|
ConnectPoint inPort()
Ethernet packet()
NeighbourProtocol protocol()
NeighbourMessageType type()
VlanId vlan()
MacAddress srcMac()
MacAddress dstMac()
Only valid for reply packets, will be null for request packets.
IpAddress target()
IpAddress sender()
void forward(ConnectPoint outPort)
outPort
- output portvoid forward(Interface outIntf)
The message will be modified to fit the parameters of the outgoing interface. For example, if the interface has a VLAN configured, the outgoing packet will have that VLAN tag added.
outIntf
- output interfacevoid reply(MacAddress targetMac)
targetMac
- target MAC addressvoid flood()
void drop()