Class PacketUtils


  • public abstract class PacketUtils
    extends Object
    • Method Detail

      • 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