# 2.11BSD#431 - /usr/src/sys/net/if_arp.h

##### Macros

    ARPHRD_ETHER      X
    ARPOP_REPLY       X
    ARPOP_REQUEST     X
    ATF_COM           X
    ATF_INUSE         X
    ATF_PERM          X
    ATF_PUBL          X
    ATF_USETRAILERS   X

##### struct's

    arphdr            X
    arpreq            X

       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

- in /usr/src/sys/netinet/if_ether.c line 250-260(8)

arpreq defined in line 47; used 10 times

- in /usr/src/sys/netinet/if_ether.c line 491(4)
- in /usr/src/usr.sbin/arp/arp.c line 104(2), 160(2), 212(2)

#### Defined macros

ARPHRD_ETHER defined in line 27; used 2 times

- in /usr/src/sys/netinet/if_ether.c line 121, 258

ARPOP_REPLY defined in line 33; used 2 times

- in /usr/src/sys/netinet/if_ether.c line 399, 407

ARPOP_REQUEST defined in line 32; used 4 times

- in /usr/src/sys/netinet/if_ether.c line 125, 324, 364, 375

ATF_COM defined in line 54; used 8 times

- in /usr/src/sys/netinet/if_ether.c line 91, 217, 333-335(2), 350, 537
- in /usr/src/usr.sbin/arp/arp.c line 196, 340

ATF_INUSE defined in line 53; used 2 times

- in /usr/src/sys/netinet/if_ether.c line 483, 537

ATF_PERM defined in line 55; used 8 times

- in /usr/src/sys/netinet/if_ether.c line 89, 470, 521, 538
- in /usr/src/usr.sbin/arp/arp.c line 129-132(2), 200, 344

ATF_PUBL defined in line 56; used 5 times

- in /usr/src/sys/netinet/if_ether.c line 387, 538
- in /usr/src/usr.sbin/arp/arp.c line 134, 201, 345

ATF_USETRAILERS defined in line 57; used 6 times

- in /usr/src/sys/netinet/if_ether.c line 221, 360, 538
- in /usr/src/usr.sbin/arp/arp.c line 136, 202, 346

#### Usage of this include

if_arp.h used 2 times

- in /usr/src/sys/net/if.h line 217, 223

Last modified: 1988-04-27 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1406 |