diff options
author | 1999-12-10 10:04:27 +0000 | |
---|---|---|
committer | 1999-12-10 10:04:27 +0000 | |
commit | 58aa7d74bcc928aa05ad0e97ff825b2877a57993 (patch) | |
tree | e8f799ad01c2f7921641cabf998ab30b2f79d02e /sys/netinet6/in6_var.h | |
parent | sorry angelos, they are not used any more :-P (diff) | |
download | wireguard-openbsd-58aa7d74bcc928aa05ad0e97ff825b2877a57993.tar.xz wireguard-openbsd-58aa7d74bcc928aa05ad0e97ff825b2877a57993.zip |
Remove remaining unnecessary ifdefs (itojun will hate me for this :-)
Diffstat (limited to 'sys/netinet6/in6_var.h')
-rw-r--r-- | sys/netinet6/in6_var.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 31ff8983a6e..650a82ec2fe 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_var.h,v 1.5 1999/12/10 08:53:17 angelos Exp $ */ +/* $OpenBSD: in6_var.h,v 1.6 1999/12/10 10:04:28 angelos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -99,10 +99,8 @@ struct in6_ifaddr { struct sockaddr_in6 ia_prefixmask; /* prefix mask */ u_int32_t ia_plen; /* prefix length */ struct in6_ifaddr *ia_next; /* next in6 list of IP6 addresses */ -#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) LIST_HEAD(in6_multihead, in6_multi) ia6_multiaddrs; /* list of multicast addresses */ -#endif int ia6_flags; struct in6_addrlifetime ia6_lifetime; /* NULL = infty */ @@ -429,34 +427,11 @@ extern struct ifqueue ip6intrq; /* IP6 packet input queue */ extern struct in6_addr zeroin6_addr; extern u_char inet6ctlerrmap[]; extern unsigned long in6_maxmtu; -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_IPMADDR); -#endif /* MALLOC_DECLARE */ -#endif /* * Macro for finding the internet address structure (in6_ifaddr) corresponding * to a given interface (ifnet structure). */ -#if defined(__bsdi__) || (defined(__FreeBSD__) && __FreeBSD__ < 3) - -#define IFP_TO_IA6(ifp, ia) \ -/* struct ifnet *ifp; */ \ -/* struct in6_ifaddr *ia; */ \ -do { \ - struct ifaddr *ifa; \ - for (ifa = (ifp)->if_addrlist; ifa; ifa = ifa->ifa_next) { \ - if (!ifa->ifa_addr) \ - continue; \ - if (ifa->ifa_addr->sa_family == AF_INET6) \ - break; \ - } \ - (ia) = (struct in6_ifaddr *)ifa; \ -} while (0) - -#else - #define IFP_TO_IA6(ifp, ia) \ /* struct ifnet *ifp; */ \ /* struct in6_ifaddr *ia; */ \ @@ -472,8 +447,6 @@ do { \ } while (0) #endif /* _KERNEL */ -#endif - /* * Multi-cast membership entry. One for each group/ifp that a PCB * belongs to. @@ -487,21 +460,13 @@ struct in6_multi { LIST_ENTRY(in6_multi) in6m_entry; /* list glue */ struct in6_addr in6m_addr; /* IP6 multicast address */ struct ifnet *in6m_ifp; /* back pointer to ifnet */ -#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3) struct in6_ifaddr *in6m_ia; /* back pointer to in6_ifaddr */ -#else - struct ifmultiaddr *in6m_ifma; /* back pointer to ifmultiaddr */ -#endif u_int in6m_refcount; /* # membership claims by sockets */ u_int in6m_state; /* state of the membership */ u_int in6m_timer; /* MLD6 listener report timer */ }; #ifdef _KERNEL -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 -extern LIST_HEAD(in6_multihead, in6_multi) in6_multihead; -#endif - /* * Structure used by macros below to remember position when stepping through * all of eht in6_multi records. @@ -517,49 +482,6 @@ struct in6_multistep { * returns NLL. */ -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 - -#define IN6_LOOKUP_MULTI(addr, ifp, in6m) \ -/* struct in6_addr addr; */ \ -/* struct ifnet *ifp; */ \ -/* struct in6_multi *in6m; */ \ -do { \ - register struct ifmultiaddr *ifma; \ - for (ifma = (ifp)->if_multiaddrs.lh_first; ifma; \ - ifma = ifma->ifma_link.le_next) { \ - if (ifma->ifma_addr->sa_family == AF_INET6 \ - && IN6_ARE_ADDR_EQUAL(&((struct sockaddr_in6 *)ifma->ifma_addr)->sin6_addr, \ - &(addr))) \ - break; \ - } \ - (in6m) = (struct in6_multi *)(ifma ? ifma->ifma_protospec : 0); \ -} while(0) - -/* - * Macro to step through all of the in6_multi records, one at a time. - * The current position is remembered in "step", which the caller must - * provide. IN6_FIRST_MULTI(), below, must be called to initialize "step" - * and get the first record. Both macros return a NULL "in6m" when there - * are no remaining records. - */ -#define IN6_NEXT_MULTI(step, in6m) \ -/* struct in6_multistep step; */ \ -/* struct in6_multi *in6m; */ \ -do { \ - if (((in6m) = (step).i_in6m) != NULL) \ - (step).i_in6m = (step).i_in6m->in6m_entry.le_next; \ -} while(0) - -#define IN6_FIRST_MULTI(step, in6m) \ -/* struct in6_multistep step; */ \ -/* struct in6_multi *in6m */ \ -do { \ - (step).i_in6m = in6_multihead.lh_first; \ - IN6_NEXT_MULTI((step), (in6m)); \ -} while(0) - -#else /* not FreeBSD3 */ - #define IN6_LOOKUP_MULTI(addr, ifp, in6m) \ /* struct in6_addr addr; */ \ /* struct ifnet *ifp; */ \ @@ -611,8 +533,6 @@ do { \ IN6_NEXT_MULTI((step), (in6m)); \ } while (0) -#endif /* not FreeBSD3 */ - int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, struct sockaddr_in6 *, int)); struct in6_multi *in6_addmulti __P((struct in6_addr *, struct ifnet *, @@ -622,12 +542,8 @@ void in6_ifscrub __P((struct ifnet *, struct in6_ifaddr *)); extern int in6_ifindex2scopeid __P((int)); extern int in6_mask2len __P((struct in6_addr *)); extern void in6_len2mask __P((struct in6_addr *, int)); -#if !defined(__bsdi__) && !(defined(__FreeBSD__) && __FreeBSD__ < 3) int in6_control __P((struct socket *, u_long, caddr_t, struct ifnet *, struct proc *)); -#else -int in6_control __P((struct socket *, u_long, caddr_t, struct ifnet *)); -#endif void in6_savemkludge __P((struct in6_ifaddr *)); void in6_setmaxmtu __P((void)); void in6_restoremkludge __P((struct in6_ifaddr *, struct ifnet *)); |