Packet ARPPacket

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

C++ definition

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):

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Fields:

Name Type Description
opcode int
srcMACAddress MACAddress
destMACAddress MACAddress
srcIPAddress IPv4Address
destIPAddress IPv4Address

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 modelling);
//   - protocol type (0x800 IPv4)
//   - hardware address length (6)
//   - protocol address length (4)
//
packet ARPPacket
{
    int opcode @enum(ARPOpcode);
    MACAddress srcMACAddress;
    MACAddress destMACAddress;
    IPv4Address srcIPAddress;
    IPv4Address destIPAddress;
}