ArpPacket¶
Namespace: inet
class ArpPacket
ARP packet. This is a specialized version: prepared for IEEE 802 hardware addresses and IPv4. Packet fields are therefore represented by C++ classes MACAddress and IPv4Address. Also, some ARP protocol header fields are not modelled explicitly (their values are implied):
hardwareType (not needed for modeling);
protocol type (0x800 IPv4)
hardware address length (6)
protocol address length (4)
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
class |
(no description) |
Fields¶
Name |
Type |
Description |
|---|---|---|
id |
int |
|
mutable |
bool |
|
complete |
bool |
|
correct |
bool |
|
properlyRepresented |
bool |
|
chunkLength |
||
rawBin |
string[] |
|
rawHex |
string[] |
|
regionTags |
||
chunkLength |
ARP header length for IPv4 (4-byte addresses) and 802 LANs (6-byte MAC addrs) |
|
opcode |
||
srcMacAddress |
||
destMacAddress |
||
srcIpAddress |
||
destIpAddress |
Properties¶
Name |
Value |
Description |
|---|---|---|
beforeChange |
handleChange() |
|
descriptor |
readonly |
|
existingClass |
||
packetData |
Source code¶
//
// ARP packet. This is a specialized version: prepared for IEEE 802 hardware
// addresses and IPv4. Packet fields are therefore represented by C++ classes
// MACAddress and IPv4Address. Also, some ARP protocol header fields are
// not modelled explicitly (their values are implied):
// - hardwareType (not needed for modeling);
// - protocol type (0x800 IPv4)
// - hardware address length (6)
// - protocol address length (4)
//
class ArpPacket extends FieldsChunk
{
// ARP header length for IPv4 (4-byte addresses) and 802 LANs (6-byte MAC addrs)
chunkLength = B(28);
ArpOpcode opcode;
MacAddress srcMacAddress;
MacAddress destMacAddress;
Ipv4Address srcIpAddress;
Ipv4Address destIpAddress;
}