diff options
author | shin <shin@FreeBSD.org> | 2000-01-07 10:02:43 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-01-07 10:02:43 +0000 |
commit | 5a9ffb7f5aae940fea91a0088b42469832041093 (patch) | |
tree | 130038b0831e28534570623df736f82b68c53204 /usr.sbin/rtsold | |
parent | 315e3c41c25d28924f66c5834082cbc5a0fc31e8 (diff) | |
download | FreeBSD-src-5a9ffb7f5aae940fea91a0088b42469832041093.zip FreeBSD-src-5a9ffb7f5aae940fea91a0088b42469832041093.tar.gz |
remove redundant ifdef's.
some part is specified by: phantom
Diffstat (limited to 'usr.sbin/rtsold')
-rw-r--r-- | usr.sbin/rtsold/if.c | 32 | ||||
-rw-r--r-- | usr.sbin/rtsold/probe.c | 2 |
2 files changed, 1 insertions, 33 deletions
diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c index 4ac1d4b..66aaa55 100644 --- a/usr.sbin/rtsold/if.c +++ b/usr.sbin/rtsold/if.c @@ -35,23 +35,12 @@ #include <sys/ioctl.h> #include <net/if.h> -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 #include <net/if_var.h> -#endif /* __FreeBSD__ >= 3 */ #include <net/if_types.h> #include <net/route.h> #include <net/if_dl.h> #include <net/if_media.h> -#ifdef __FreeBSD__ -# include <net/ethernet.h> -#endif -#ifdef __NetBSD__ -#include <net/if_ether.h> -#endif -#if defined(__bsdi__) || defined(__OpenBSD__) -# include <netinet/in.h> -# include <netinet/if_ether.h> -#endif +#include <net/ethernet.h> #include <netinet/in.h> #include <netinet/icmp6.h> @@ -359,13 +348,7 @@ getifa(char *name, struct in6_ifaddr *ifap) KREAD(ifp, &ifnet, struct ifnet); if (ifnet.if_index == index) break; -#if defined(__NetBSD__) || defined(__OpenBSD__) - ifp = TAILQ_NEXT(&ifnet, if_list); -#elif defined(__FreeBSD__) && __FreeBSD__ >= 3 ifp = TAILQ_NEXT(&ifnet, if_link); -#else - ifp = ifnet.if_next; -#endif } if (!ifp) { warnmsg(LOG_ERR, __FUNCTION__, "interface \"%s\" not found", @@ -373,13 +356,7 @@ getifa(char *name, struct in6_ifaddr *ifap) goto bad; } -#if defined(__NetBSD__) || defined(__OpenBSD__) - ifa = (struct in6_ifaddr *)TAILQ_FIRST(&ifnet.if_addrlist); -#elif defined(__FreeBSD__) && __FreeBSD__ >= 3 ifa = (struct in6_ifaddr *)TAILQ_FIRST(&ifnet.if_addrhead); -#else - ifa = (struct in6_ifaddr *)ifnet.if_addrlist; -#endif while (ifa) { KREAD(ifa, ifap, *ifap); if (ifap->ia_addr.sin6_family == AF_INET6 @@ -388,15 +365,8 @@ getifa(char *name, struct in6_ifaddr *ifap) return 0; } -#if defined(__NetBSD__) || defined(__OpenBSD__) - ifa = (struct in6_ifaddr *) - TAILQ_NEXT((struct ifaddr *)ifap, ifa_list); -#elif defined(__FreeBSD__) && __FreeBSD__ >= 3 ifa = (struct in6_ifaddr *) TAILQ_NEXT((struct ifaddr *)ifap, ifa_link); -#else - ifa = (struct in6_ifaddr *)(((struct ifaddr *)ifap)->ifa_next); -#endif } warnmsg(LOG_ERR, __FUNCTION__, "no IPv6 link-local address for %s", name); diff --git a/usr.sbin/rtsold/probe.c b/usr.sbin/rtsold/probe.c index 4b42c21..824baeb 100644 --- a/usr.sbin/rtsold/probe.c +++ b/usr.sbin/rtsold/probe.c @@ -36,9 +36,7 @@ #include <sys/uio.h> #include <net/if.h> -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 #include <net/if_var.h> -#endif /* __FreeBSD__ >= 3 */ #include <netinet/in.h> #include <netinet6/in6_var.h> |