if_arp.h File Reference

Address Resolution Protocol constants and types. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  arphdr
 An ARP header. More...

Defines

#define ARPHRD_NETROM   0
 from KA9Q: NET/ROM pseudo
#define ARPHRD_ETHER   1
 Ethernet 10Mbps.
#define ARPHRD_EETHER   2
 Experimental Ethernet.
#define ARPHRD_AX25   3
 AX.25 Level 2.
#define ARPHRD_PRONET   4
 PROnet token ring.
#define ARPHRD_CHAOS   5
 Chaosnet.
#define ARPHRD_IEEE802   6
 IEEE 802.2 Ethernet/TR/TB.
#define ARPHRD_ARCNET   7
 ARCnet.
#define ARPHRD_APPLETLK   8
 APPLEtalk.
#define ARPHRD_DLCI   15
 Frame Relay DLCI.
#define ARPHRD_ATM   19
 ATM.
#define ARPHRD_METRICOM   23
 Metricom STRIP (new IANA id).
#define ARPHRD_IEEE1394   24
 IEEE 1394 IPv4 - RFC 2734.
#define ARPHRD_EUI64   27
 EUI-64.
#define ARPHRD_INFINIBAND   32
 InfiniBand.
#define ARPOP_REQUEST   1
 ARP request.
#define ARPOP_REPLY   2
 ARP reply.
#define ARPOP_RREQUEST   3
 RARP request.
#define ARPOP_RREPLY   4
 RARP reply.
#define ARPOP_InREQUEST   8
 InARP request.
#define ARPOP_InREPLY   9
 InARP reply.
#define ARPOP_NAK   10
 (ATM)ARP NAK

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static void * arp_sender_ha (struct arphdr *arphdr)
 ARP packet sender hardware address.
static void * arp_sender_pa (struct arphdr *arphdr)
 ARP packet sender protocol address.
static void * arp_target_ha (struct arphdr *arphdr)
 ARP packet target hardware address.
static void * arp_target_pa (struct arphdr *arphdr)
 ARP packet target protocol address.

Variables

struct arphdr packed
 An ARP header.


Detailed Description

Address Resolution Protocol constants and types.

Definition in file if_arp.h.


Define Documentation

#define ARPHRD_NETROM   0

from KA9Q: NET/ROM pseudo

Definition at line 15 of file if_arp.h.

#define ARPHRD_ETHER   1

Ethernet 10Mbps.

Definition at line 16 of file if_arp.h.

Referenced by gdbudp_recv().

#define ARPHRD_EETHER   2

Experimental Ethernet.

Definition at line 17 of file if_arp.h.

#define ARPHRD_AX25   3

AX.25 Level 2.

Definition at line 18 of file if_arp.h.

#define ARPHRD_PRONET   4

PROnet token ring.

Definition at line 19 of file if_arp.h.

#define ARPHRD_CHAOS   5

Chaosnet.

Definition at line 20 of file if_arp.h.

#define ARPHRD_IEEE802   6

IEEE 802.2 Ethernet/TR/TB.

Definition at line 21 of file if_arp.h.

#define ARPHRD_ARCNET   7

ARCnet.

Definition at line 22 of file if_arp.h.

#define ARPHRD_APPLETLK   8

APPLEtalk.

Definition at line 23 of file if_arp.h.

#define ARPHRD_DLCI   15

Frame Relay DLCI.

Definition at line 24 of file if_arp.h.

#define ARPHRD_ATM   19

ATM.

Definition at line 25 of file if_arp.h.

#define ARPHRD_METRICOM   23

Metricom STRIP (new IANA id).

Definition at line 26 of file if_arp.h.

#define ARPHRD_IEEE1394   24

IEEE 1394 IPv4 - RFC 2734.

Definition at line 27 of file if_arp.h.

#define ARPHRD_EUI64   27

EUI-64.

Definition at line 28 of file if_arp.h.

#define ARPHRD_INFINIBAND   32

InfiniBand.

Definition at line 29 of file if_arp.h.

#define ARPOP_REQUEST   1

ARP request.

Definition at line 32 of file if_arp.h.

Referenced by arp_resolve(), arp_rx(), and gdbudp_recv().

#define ARPOP_REPLY   2

ARP reply.

Definition at line 33 of file if_arp.h.

Referenced by arp_rx(), and gdbudp_recv().

#define ARPOP_RREQUEST   3

RARP request.

Definition at line 34 of file if_arp.h.

#define ARPOP_RREPLY   4

RARP reply.

Definition at line 35 of file if_arp.h.

#define ARPOP_InREQUEST   8

InARP request.

Definition at line 36 of file if_arp.h.

#define ARPOP_InREPLY   9

InARP reply.

Definition at line 37 of file if_arp.h.

#define ARPOP_NAK   10

(ATM)ARP NAK

Definition at line 38 of file if_arp.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

static void* arp_sender_ha ( struct arphdr arphdr  )  [inline, static]

ARP packet sender hardware address.

Parameters:
arphdr ARP header
Return values:
ar_sha Sender hardware address

Definition at line 71 of file if_arp.h.

Referenced by arp_rx(), arp_sender_pa(), and gdbudp_recv().

00071                                                              {
00072         return ( ( ( void * ) arphdr ) + sizeof ( *arphdr ) );
00073 }

static void* arp_sender_pa ( struct arphdr arphdr  )  [inline, static]

ARP packet sender protocol address.

Parameters:
arphdr ARP header
Return values:
ar_spa Sender protocol address

Definition at line 80 of file if_arp.h.

References arphdr::ar_hln, and arp_sender_ha().

Referenced by arp_rx(), arp_target_ha(), and gdbudp_recv().

00080                                                              {
00081         return ( arp_sender_ha ( arphdr ) + arphdr->ar_hln );
00082 }

static void* arp_target_ha ( struct arphdr arphdr  )  [inline, static]

ARP packet target hardware address.

Parameters:
arphdr ARP header
Return values:
ar_tha Target hardware address

Definition at line 89 of file if_arp.h.

References arphdr::ar_pln, and arp_sender_pa().

Referenced by arp_rx(), arp_target_pa(), and gdbudp_recv().

00089                                                              {
00090         return ( arp_sender_pa ( arphdr ) + arphdr->ar_pln );
00091 }

static void* arp_target_pa ( struct arphdr arphdr  )  [inline, static]

ARP packet target protocol address.

Parameters:
arphdr ARP header
Return values:
ar_tpa Target protocol address

Definition at line 98 of file if_arp.h.

References arphdr::ar_hln, and arp_target_ha().

Referenced by arp_rx(), and gdbudp_recv().

00098                                                              {
00099         return ( arp_target_ha ( arphdr ) + arphdr->ar_hln );
00100 }


Variable Documentation

struct arphdr packed

An ARP header.

This contains only the fixed-size portions of an ARP header; for other fields use the arp_{sender,target}_{ha,pa} family of functions.


Generated on Tue Apr 6 20:01:50 2010 for gPXE by  doxygen 1.5.7.1