friendev EtherDune TCP/IP library
Public Attributes | List of all members
ARPPacket Union Reference

ARP packet layout. More...

#include <inet.h>

Public Attributes

struct {
   nint16_t   HTYPE
 Hardware type. More...
 
   nint16_t   PTYPE
 Protocol type. More...
 
   uint8_t   HLEN
 Hardware address length. More...
 
   uint8_t   PLEN
 Protocol address length. More...
 
   nint16_t   OPER
 Operation. More...
 
   MACAddress   senderMAC
 Sender hardware address. More...
 
   IPAddress   senderIP
 Sender protocol address. More...
 
   MACAddress   targetMAC
 Target hardware address. More...
 
   IPAddress   targetIP
 Target protocol address. More...
 
}; 
 
uint8_t raw [28]
 byte-wise access to all fields More...
 

Detailed Description

ARP packet layout.

Definition at line 278 of file inet.h.

Member Data Documentation

struct { ... }
uint8_t ARPPacket::HLEN

Hardware address length.

Length (in octets) of a hardware address. Ethernet addresses size is 6.

Definition at line 284 of file inet.h.

nint16_t ARPPacket::HTYPE

Hardware type.

This field specifies the network protocol type. Example: Ethernet is 1.

Definition at line 282 of file inet.h.

nint16_t ARPPacket::OPER

Operation.

Specifies the operation that the sender is performing: 1 for request, 2 for reply.

Definition at line 286 of file inet.h.

uint8_t ARPPacket::PLEN

Protocol address length.

Length (in octets) of addresses used in the upper layer protocol. (The upper layer protocol specified in PTYPE.) IPv4 address size is 4.

Definition at line 285 of file inet.h.

nint16_t ARPPacket::PTYPE

Protocol type.

This field specifies the internetwork protocol for which the ARP request is intended. For IPv4, this has the value 0x0800. The permitted PTYPE values share a numbering space with those for EtherType.

Definition at line 283 of file inet.h.

uint8_t ARPPacket::raw[28]

byte-wise access to all fields

Definition at line 292 of file inet.h.

IPAddress ARPPacket::senderIP

Sender protocol address.

Internet address of the sender.

Definition at line 288 of file inet.h.

MACAddress ARPPacket::senderMAC

Sender hardware address.

Media address of the sender. In an ARP request this field is used to indicate the address of the host sending the request. In an ARP reply this field is used to indicate the address of the host that the request was looking for. (Not necessarily address of the host replying as in the case of virtual media.) Note that switches do not pay attention to this field, particularly in learning MAC addresses.

Definition at line 287 of file inet.h.

IPAddress ARPPacket::targetIP

Target protocol address.

Internet address of the intended receiver.

Definition at line 290 of file inet.h.

MACAddress ARPPacket::targetMAC

Target hardware address.

Media address of the intended receiver. In an ARP request this field is ignored. In an ARP reply this field is used to indicate the address of the host that originated the ARP request.

Definition at line 289 of file inet.h.


The documentation for this union was generated from the following file: