java.lang.Object
org.opendaylight.openflowplugin.learningswitch.PacketUtils

public abstract class PacketUtils extends Object
  • Method Details

    • extractDstMac

      public static byte[] extractDstMac(byte[] payload)
      Extracts the destination MAC address.
      Parameters:
      payload - the payload bytes
      Returns:
      destination MAC address
    • extractSrcMac

      public static byte[] extractSrcMac(byte[] payload)
      Extracts the source MAC address.
      Parameters:
      payload - the payload bytes
      Returns:
      source MAC address
    • extractEtherType

      public static byte[] extractEtherType(byte[] payload)
      Extracts the ethernet type.
      Parameters:
      payload - the payload bytes
      Returns:
      source MAC address
    • rawMacToMac

      public 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:
      MacAddress wrapping string value, baked upon binary MAC address
    • createNodeConnRef

      public static NodeConnectorRef createNodeConnRef(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<Node> nodeInstId, NodeKey nodeKey, String port)
      Returns the port wrapped into NodeConnectorRef.