Class PacketUtils
java.lang.Object
org.opendaylight.openflowplugin.learningswitch.PacketUtils
- 
Method SummaryModifier and TypeMethodDescriptionstatic NodeConnectorRefcreateNodeConnRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Node> nodeInstId, NodeKey nodeKey, String port) Returns the port wrapped intoNodeConnectorRef.static byte[]extractDstMac(byte[] payload) Extracts the destination MAC address.static byte[]extractEtherType(byte[] payload) Extracts the ethernet type.static byte[]extractSrcMac(byte[] payload) Extracts the source MAC address.static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddressrawMacToMac(byte[] rawMac) Converts a raw MAC bytes to a MacAddress.
- 
Method Details- 
extractDstMacpublic static byte[] extractDstMac(byte[] payload) Extracts the destination MAC address.- Parameters:
- payload- the payload bytes
- Returns:
- destination MAC address
 
- 
extractSrcMacpublic static byte[] extractSrcMac(byte[] payload) Extracts the source MAC address.- Parameters:
- payload- the payload bytes
- Returns:
- source MAC address
 
- 
extractEtherTypepublic static byte[] extractEtherType(byte[] payload) Extracts the ethernet type.- Parameters:
- payload- the payload bytes
- Returns:
- source MAC address
 
- 
rawMacToMacpublic static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress rawMacToMac(byte[] rawMac) Converts a raw MAC bytes to a MacAddress.- Parameters:
- rawMac- the raw bytes
- Returns:
- MacAddresswrapping string value, baked upon binary MAC address
 
- 
createNodeConnRefpublic static NodeConnectorRef createNodeConnRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Node> nodeInstId, NodeKey nodeKey, String port) Returns the port wrapped intoNodeConnectorRef.
 
-