Ignore:
Timestamp:
Apr 14, 2005, 3:09:06 PM (15 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
44557f8
Parents:
8d740cf1
Message:

Partial updates from FreeBSD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/net/if_arp.h

    r8d740cf1 ref1f80e  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)if_arp.h    8.1 (Berkeley) 6/10/93
    34  * $Id$
     30 * $FreeBSD: src/sys/net/if_arp.h,v 1.21 2005/01/07 01:45:34 imp Exp $
    3531 */
    3632
     
    3834#define _NET_IF_ARP_H_
    3935
    40 #include <netinet/in.h>
     36#ifdef __rtems__
     37#define BYTE_PACK __attribute__((packed))
     38#endif
     39
    4140/*
    4241 * Address Resolution Protocol.
     
    7574};
    7675
     76#define ar_sha(ap)      (((caddr_t)((ap)+1)) +   0)
     77#define ar_spa(ap)      (((caddr_t)((ap)+1)) +   (ap)->ar_hln)
     78#define ar_tha(ap)      (((caddr_t)((ap)+1)) +   (ap)->ar_hln + (ap)->ar_pln)
     79#define ar_tpa(ap)      (((caddr_t)((ap)+1)) + 2*(ap)->ar_hln + (ap)->ar_pln)
     80
     81#define arphdr_len2(ar_hln, ar_pln)                                     \
     82        (sizeof(struct arphdr) + 2*(ar_hln) + 2*(ar_pln))
     83#define arphdr_len(ap)  (arphdr_len2((ap)->ar_hln, (ap)->ar_pln))
     84
    7785/*
    7886 * ARP ioctl request
     
    9098#define ATF_USETRAILERS 0x10    /* has requested trailers */
    9199
     100#ifdef _KERNEL
     101/*
     102 * Structure shared between the ethernet driver modules and
     103 * the address resolution code.  For example, each ec_softc or il_softc
     104 * begins with this structure.
     105 * The code is written so that each *_softc _must_ begin with a
     106 * struct arpcom, which in turn _must_ begin with a struct ifnet.
     107 */
     108struct  arpcom {
     109        /*
     110         * The ifnet struct _must_ be at the head of this structure.
     111         */
     112        struct  ifnet ac_if;            /* network-visible interface */
     113        u_char  ac_enaddr[6];           /* ethernet hardware address */
     114#if defined(__rtems__)
     115/* Cruft from ancient BSD - should be removed once RTEMS is updated */
     116        struct  ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
     117        int     ac_multicnt;            /* length of ac_multiaddrs list */
     118#else
     119        int     now_unused;     /* XXX was length of ac_multiaddrs list */
     120        void    *ac_netgraph;           /* ng_ether(4) netgraph node info */
     121#endif
     122};
     123#define IFP2AC(ifp) ((struct arpcom *)(ifp))
     124
     125#endif
     126
    92127#endif /* !_NET_IF_ARP_H_ */
Note: See TracChangeset for help on using the changeset viewer.