1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)if_arp.h	7.1 (Berkeley) 6/4/86
   7:  */
   8: 
   9: /*
  10:  * Address Resolution Protocol.
  11:  *
  12:  * See RFC 826 for protocol description.  ARP packets are variable
  13:  * in size; the arphdr structure defines the fixed-length portion.
  14:  * Protocol type values are the same as those for 10 Mb/s Ethernet.
  15:  * It is followed by the variable-sized fields ar_sha, arp_spa,
  16:  * arp_tha and arp_tpa in that order, according to the lengths
  17:  * specified.  Field names used correspond to RFC 826.
  18:  */
  19: struct  arphdr {
  20:     u_short ar_hrd;     /* format of hardware address */
  21: #define ARPHRD_ETHER    1   /* ethernet hardware address */
  22:     u_short ar_pro;     /* format of protocol address */
  23:     u_char  ar_hln;     /* length of hardware address */
  24:     u_char  ar_pln;     /* length of protocol address */
  25:     u_short ar_op;      /* one of: */
  26: #define ARPOP_REQUEST   1   /* request to resolve address */
  27: #define ARPOP_REPLY 2   /* response to previous request */
  28: /*
  29:  * The remaining fields are variable in size,
  30:  * according to the sizes above.
  31:  */
  32: /*	u_char	ar_sha[];	/* sender hardware address */
  33: /*	u_char	ar_spa[];	/* sender protocol address */
  34: /*	u_char	ar_tha[];	/* target hardware address */
  35: /*	u_char	ar_tpa[];	/* target protocol address */
  36: };
  37: 
  38: /*
  39:  * ARP ioctl request
  40:  */
  41: struct arpreq {
  42:     struct  sockaddr arp_pa;        /* protocol address */
  43:     struct  sockaddr arp_ha;        /* hardware address */
  44:     int arp_flags;          /* flags */
  45: };
  46: /*  arp_flags and at_flags field values */
  47: #define ATF_INUSE   0x01    /* entry in use */
  48: #define ATF_COM     0x02    /* completed entry (enaddr valid) */
  49: #define ATF_PERM    0x04    /* permanent entry */
  50: #define ATF_PUBL    0x08    /* publish entry (respond for other host) */
  51: #define ATF_USETRAILERS 0x10    /* has requested trailers */

Defined struct's

arphdr defined in line 19; never used
arpreq defined in line 41; never used

Defined macros

ARPHRD_ETHER defined in line 21; never used
ARPOP_REPLY defined in line 27; never used
ARPOP_REQUEST defined in line 26; never used
ATF_COM defined in line 48; never used
ATF_INUSE defined in line 47; never used
ATF_PERM defined in line 49; never used
ATF_PUBL defined in line 50; never used
ATF_USETRAILERS defined in line 51; never used
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 933
Valid CSS Valid XHTML 1.0 Strict