Top Fields Constructors Methods
io.netty.handler.pcap

pack-priv final Class EthernetPacket

extends Object
Class Inheritance
Imports
io.netty.buffer.ByteBuf

Field Summary

Modifier and TypeField and Description
private static final byte[]
DUMMY_DESTINATION_MAC_ADDRESS

MAC Address: 00:00:5E:00:53:FF

private static final byte[]
DUMMY_SOURCE_MAC_ADDRESS

MAC Address: 00:00:5E:00:53:00

private static final int
V4

IPv4

private static final int
V6

IPv6

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
writeIPv4(ByteBuf
ByteBuf where Ethernet Packet data will be set
byteBuf
,
ByteBuf
Payload of IPv4
payload
)

Write IPv4 Ethernet Packet.

pack-priv static void
writeIPv6(ByteBuf
ByteBuf where Ethernet Packet data will be set
byteBuf
,
ByteBuf
Payload of IPv6
payload
)

Write IPv6 Ethernet Packet.

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

Write IPv6 Ethernet Packet

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DUMMY_DESTINATION_MAC_ADDRESSback to summary
private static final byte[] DUMMY_DESTINATION_MAC_ADDRESS

MAC Address: 00:00:5E:00:53:FF

DUMMY_SOURCE_MAC_ADDRESSback to summary
private static final byte[] DUMMY_SOURCE_MAC_ADDRESS

MAC Address: 00:00:5E:00:53:00

V4back to summary
private static final int V4

IPv4

V6back to summary
private static final int V6

IPv6

Constructor Detail

EthernetPacketback to summary
private EthernetPacket()

Method Detail

writeIPv4back to summary
pack-priv 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

ByteBuf where Ethernet Packet data will be set

payload:ByteBuf

Payload of IPv4

writeIPv6back to summary
pack-priv 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

ByteBuf where Ethernet Packet data will be set

payload:ByteBuf

Payload of IPv6

writePacketback to summary
private static void writePacket(ByteBuf byteBuf, ByteBuf payload, byte[] srcAddress, byte[] dstAddress, int type)

Write IPv6 Ethernet Packet

Parameters
byteBuf:ByteBuf

ByteBuf where Ethernet Packet data will be set

payload:ByteBuf

Payload of IPv6

srcAddress:byte[]

Source MAC Address

dstAddress:byte[]

Destination MAC Address

type:int

Type of Frame