@Beta public class DefaultNeighbourMessageContext extends Object implements NeighbourMessageContext
| Modifier and Type | Method and Description |
|---|---|
static NeighbourMessageContext |
createContext(org.onlab.packet.Ethernet eth,
org.onosproject.net.ConnectPoint inPort,
NeighbourMessageActions actions)
Attempts to create a MessageContext for the given Ethernet frame.
|
void |
drop()
Drops the incoming message.
|
org.onlab.packet.MacAddress |
dstMac()
Gets the destination MAC address of the message.
|
boolean |
equals(Object obj) |
void |
flood()
Floods the incoming message out all ports except the input port.
|
void |
forward(org.onosproject.net.ConnectPoint outPort)
Forwards the message to a given output port.
|
void |
forward(Interface outIntf)
Forwards the message to a given interface.
|
int |
hashCode() |
org.onosproject.net.ConnectPoint |
inPort()
Gets the port where the packet came in to the network.
|
org.onlab.packet.Ethernet |
packet()
Gets the full parsed representation of the packet.
|
NeighbourProtocol |
protocol()
Gets the protocol of the packet.
|
void |
reply(org.onlab.packet.MacAddress targetMac)
Replies to the request message with a given MAC address.
|
org.onlab.packet.IpAddress |
sender()
Gets the source IP address of the message.
|
org.onlab.packet.MacAddress |
srcMac()
Gets the source MAC address of the message.
|
org.onlab.packet.IpAddress |
target()
Gets the target IP address of the message.
|
NeighbourMessageType |
type()
Gets the message type of the packet.
|
org.onlab.packet.VlanId |
vlan()
Gets the vlan of the packet, if any.
|
public org.onosproject.net.ConnectPoint inPort()
NeighbourMessageContextinPort in interface NeighbourMessageContextpublic org.onlab.packet.Ethernet packet()
NeighbourMessageContextpacket in interface NeighbourMessageContextpublic NeighbourProtocol protocol()
NeighbourMessageContextprotocol in interface NeighbourMessageContextpublic NeighbourMessageType type()
NeighbourMessageContexttype in interface NeighbourMessageContextpublic org.onlab.packet.VlanId vlan()
NeighbourMessageContextvlan in interface NeighbourMessageContextpublic org.onlab.packet.MacAddress srcMac()
NeighbourMessageContextsrcMac in interface NeighbourMessageContextpublic org.onlab.packet.MacAddress dstMac()
NeighbourMessageContextOnly valid for reply packets, will be null for request packets.
dstMac in interface NeighbourMessageContextpublic org.onlab.packet.IpAddress target()
NeighbourMessageContexttarget in interface NeighbourMessageContextpublic org.onlab.packet.IpAddress sender()
NeighbourMessageContextsender in interface NeighbourMessageContextpublic void forward(org.onosproject.net.ConnectPoint outPort)
NeighbourMessageContextforward in interface NeighbourMessageContextoutPort - output portpublic void forward(Interface outIntf)
NeighbourMessageContextThe 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.
forward in interface NeighbourMessageContextoutIntf - output interfacepublic void reply(org.onlab.packet.MacAddress targetMac)
NeighbourMessageContextreply in interface NeighbourMessageContexttargetMac - target MAC addresspublic void flood()
NeighbourMessageContextflood in interface NeighbourMessageContextpublic void drop()
NeighbourMessageContextdrop in interface NeighbourMessageContextpublic static NeighbourMessageContext createContext(org.onlab.packet.Ethernet eth, org.onosproject.net.ConnectPoint inPort, NeighbourMessageActions actions)
eth - input Ethernet frameinPort - in portactions - actions to take