Packet ARPPacket

File: src/networklayer/arp/ARPPacket.msg

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 IPAddress. 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. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Fields:

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

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 IPAddress. 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;
    IPAddress srcIPAddress;
    IPAddress destIPAddress;
}