1: /*
   2:  * Copyright (c) 1986 Regents of the University of California.
   3:  * All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms are permitted
   6:  * provided that this notice is preserved and that due credit is given
   7:  * to the University of California at Berkeley. The name of the University
   8:  * may not be used to endorse or promote products derived from this
   9:  * software without specific prior written permission. This software
  10:  * is provided ``as is'' without express or implied warranty.
  11:  *
  12:  *	@(#)if_arp.h	7.2 (Berkeley) 12/30/87
  13:  */
  14: 
  15: /*
  16:  * Address Resolution Protocol.
  17:  *
  18:  * See RFC 826 for protocol description.  ARP packets are variable
  19:  * in size; the arphdr structure defines the fixed-length portion.
  20:  * Protocol type values are the same as those for 10 Mb/s Ethernet.
  21:  * It is followed by the variable-sized fields ar_sha, arp_spa,
  22:  * arp_tha and arp_tpa in that order, according to the lengths
  23:  * specified.  Field names used correspond to RFC 826.
  24:  */
  25: struct  arphdr {
  26:     u_short ar_hrd;     /* format of hardware address */
  27: #define ARPHRD_ETHER    1   /* ethernet hardware address */
  28:     u_short ar_pro;     /* format of protocol address */
  29:     u_char  ar_hln;     /* length of hardware address */
  30:     u_char  ar_pln;     /* length of protocol address */
  31:     u_short ar_op;      /* one of: */
  32: #define ARPOP_REQUEST   1   /* request to resolve address */
  33: #define ARPOP_REPLY 2   /* response to previous request */
  34: /*
  35:  * The remaining fields are variable in size,
  36:  * according to the sizes above.
  37:  */
  38: /*	u_char	ar_sha[];	/* sender hardware address */
  39: /*	u_char	ar_spa[];	/* sender protocol address */
  40: /*	u_char	ar_tha[];	/* target hardware address */
  41: /*	u_char	ar_tpa[];	/* target protocol address */
  42: };
  43: 
  44: /*
  45:  * ARP ioctl request
  46:  */
  47: struct arpreq {
  48:     struct  sockaddr arp_pa;        /* protocol address */
  49:     struct  sockaddr arp_ha;        /* hardware address */
  50:     int arp_flags;          /* flags */
  51: };
  52: /*  arp_flags and at_flags field values */
  53: #define ATF_INUSE   0x01    /* entry in use */
  54: #define ATF_COM     0x02    /* completed entry (enaddr valid) */
  55: #define ATF_PERM    0x04    /* permanent entry */
  56: #define ATF_PUBL    0x08    /* publish entry (respond for other host) */
  57: #define ATF_USETRAILERS 0x10    /* has requested trailers */

Defined struct's

arphdr defined in line 25; used 8 times
arpreq defined in line 47; used 10 times

Defined macros

ARPHRD_ETHER defined in line 27; used 2 times
ARPOP_REPLY defined in line 33; used 2 times
ARPOP_REQUEST defined in line 32; used 4 times
ATF_COM defined in line 54; used 8 times
ATF_INUSE defined in line 53; used 2 times
ATF_PERM defined in line 55; used 8 times
ATF_PUBL defined in line 56; used 5 times

Usage of this include

if_arp.h used 2 times
Last modified: 1988-04-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3354
Valid CSS Valid XHTML 1.0 Strict