Class EthernetPacket

java.lang.Object
io.netty.handler.pcap.EthernetPacket

final class EthernetPacket extends Object
  • Field Details

    • DUMMY_SOURCE_MAC_ADDRESS

      private static final byte[] DUMMY_SOURCE_MAC_ADDRESS
      MAC Address: 00:00:5E:00:53:00
    • DUMMY_DESTINATION_MAC_ADDRESS

      private static final byte[] DUMMY_DESTINATION_MAC_ADDRESS
      MAC Address: 00:00:5E:00:53:FF
    • V4

      private static final int V4
      IPv4
      See Also:
    • V6

      private static final int V6
      IPv6
      See Also:
  • Constructor Details

    • EthernetPacket

      private EthernetPacket()
  • Method Details

    • writeIPv4

      static void writeIPv4(ByteBuf byteBuf, ByteBuf payload)
      Write IPv4 Ethernet Packet. It uses a dummy MAC address for both source and destination.
      Parameters:
      byteBuf - ByteBuf where Ethernet Packet data will be set
      payload - Payload of IPv4
    • writeIPv6

      static void writeIPv6(ByteBuf byteBuf, ByteBuf payload)
      Write IPv6 Ethernet Packet. It uses a dummy MAC address for both source and destination.
      Parameters:
      byteBuf - ByteBuf where Ethernet Packet data will be set
      payload - Payload of IPv6
    • writePacket

      private static void writePacket(ByteBuf byteBuf, ByteBuf payload, byte[] srcAddress, byte[] dstAddress, int type)
      Write IPv6 Ethernet Packet
      Parameters:
      byteBuf - ByteBuf where Ethernet Packet data will be set
      payload - Payload of IPv6
      srcAddress - Source MAC Address
      dstAddress - Destination MAC Address
      type - Type of Frame