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

FieldsChunk

class

(no description)

Fields

Name

Type

Description

id

int

mutable

bool

complete

bool

correct

bool

properlyRepresented

bool

chunkLength

b

rawBin

string[]

rawHex

string[]

regionTags

SharingRegionTagSet::TagBaseRegionTag[]

chunkLength

ARP header length for IPv4 (4-byte addresses) and 802 LANs (6-byte MAC addrs)

opcode

ArpOpcode

srcMacAddress

MacAddress

destMacAddress

MacAddress

srcIpAddress

Ipv4Address

destIpAddress

Ipv4Address

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;
}

File: src/inet/networklayer/arp/ipv4/ArpPacket.msg