diff options
Diffstat (limited to 'sys/netinet/if_ether.h')
-rw-r--r-- | sys/netinet/if_ether.h | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index c4f56c8..155cb3f 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 - * $Id: if_ether.h,v 1.16 1996/12/11 17:46:33 wollman Exp $ + * $Id: if_ether.h,v 1.17 1997/01/03 19:51:54 wollman Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -40,7 +40,6 @@ #include <net/ethernet.h> #include <net/if_arp.h> -#ifdef KERNEL /* * Macro to map an IP multicast address to an Ethernet multicast address. * The high-order 25 bits of the Ethernet address are statically assigned, @@ -57,7 +56,6 @@ (enaddr)[4] = ((u_char *)ipaddr)[2]; \ (enaddr)[5] = ((u_char *)ipaddr)[3]; \ } -#endif /* * Ethernet Address Resolution Protocol. @@ -91,7 +89,6 @@ struct arpcom { */ struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[ETHER_ADDR_LEN]; /* ethernet hardware address */ - struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */ int ac_multicnt; /* length of ac_multiaddrs list */ }; @@ -120,75 +117,6 @@ extern struct ifqueue arpintrq; int arpresolve __P((struct arpcom *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *, struct rtentry *)); void arp_ifinit __P((struct arpcom *, struct ifaddr *)); -int ether_addmulti __P((struct ifreq *, struct arpcom *)); -int ether_delmulti __P((struct ifreq *, struct arpcom *)); - -/* - * Ethernet multicast address structure. There is one of these for each - * multicast address or range of multicast addresses that we are supposed - * to listen to on a particular interface. They are kept in a linked list, - * rooted in the interface's arpcom structure. (This really has nothing to - * do with ARP, or with the Internet address family, but this appears to be - * the minimally-disrupting place to put it.) - */ -struct ether_multi { - u_char enm_addrlo[ETHER_ADDR_LEN]; /* low or only address of range */ - u_char enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */ - struct arpcom *enm_ac; /* back pointer to arpcom */ - u_int enm_refcount; /* no. claims to this addr/range */ - struct ether_multi *enm_next; /* ptr to next ether_multi */ -}; - -/* - * Structure used by macros below to remember position when stepping through - * all of the ether_multi records. - */ -struct ether_multistep { - struct ether_multi *e_enm; -}; - -/* - * Macro for looking up the ether_multi record for a given range of Ethernet - * multicast addresses connected to a given arpcom structure. If no matching - * record is found, "enm" returns NULL. - */ -#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \ - /* u_char addrlo[ETHER_ADDR_LEN]; */ \ - /* u_char addrhi[ETHER_ADDR_LEN]; */ \ - /* struct arpcom *ac; */ \ - /* struct ether_multi *enm; */ \ -{ \ - for ((enm) = (ac)->ac_multiaddrs; \ - (enm) != NULL && \ - (bcmp((enm)->enm_addrlo, (addrlo), ETHER_ADDR_LEN) != 0 || \ - bcmp((enm)->enm_addrhi, (addrhi), ETHER_ADDR_LEN) != 0); \ - (enm) = (enm)->enm_next); \ -} - -/* - * Macro to step through all of the ether_multi records, one at a time. - * The current position is remembered in "step", which the caller must - * provide. ETHER_FIRST_MULTI(), below, must be called to initialize "step" - * and get the first record. Both macros return a NULL "enm" when there - * are no remaining records. - */ -#define ETHER_NEXT_MULTI(step, enm) \ - /* struct ether_multistep step; */ \ - /* struct ether_multi *enm; */ \ -{ \ - if (((enm) = (step).e_enm) != NULL) \ - (step).e_enm = (enm)->enm_next; \ -} - -#define ETHER_FIRST_MULTI(step, ac, enm) \ - /* struct ether_multistep step; */ \ - /* struct arpcom *ac; */ \ - /* struct ether_multi *enm; */ \ -{ \ - (step).e_enm = (ac)->ac_multiaddrs; \ - ETHER_NEXT_MULTI((step), (enm)); \ -} - #endif #endif |