Permalink
Browse files

remove freebsd[234]-specific code, since they are no longer supported…

… in KAME-SNAP
  • Loading branch information...
1 parent c80b26a commit 2fb5d928293430bd6b006e9d6043b9452ce3b18d suz committed Apr 14, 2005
Showing with 418 additions and 808 deletions.
  1. +4 −1 CHANGELOG
  2. +2 −2 kame/kame/bgpd/include.h
  3. +2 −2 kame/kame/dhcp6/addrconf.c
  4. +2 −2 kame/kame/dhcp6/common.c
  5. +2 −2 kame/kame/dhcp6/dhcp6c.c
  6. +2 −2 kame/kame/dhcp6/dhcp6relay.c
  7. +2 −2 kame/kame/dhcp6/dhcp6s.c
  8. +2 −2 kame/kame/dhcp6/prefixconf.c
  9. +3 −3 kame/kame/gifconfig/gifconfig.c
  10. +1 −25 kame/kame/ifmcstat/ifmcstat.c
  11. +3 −3 kame/kame/ip6addrctl/ip6addrctl.c
  12. +5 −9 kame/kame/libaltq/qop.c
  13. +1 −3 kame/kame/libinet6/bindresvport.c
  14. +4 −4 kame/kame/libinet6/getaddrinfo.c
  15. +1 −3 kame/kame/libinet6/getifaddrs.c
  16. +2 −4 kame/kame/libinet6/resolv/res_query.c
  17. +2 −2 kame/kame/mdnsd/mainloop.c
  18. +1 −6 kame/kame/nodeinfod/nodeinfod.c
  19. +2 −2 kame/kame/pim6sd/mtrace6/mtrace6.c
  20. +2 −2 kame/kame/racoon/grabmyaddr.c
  21. +2 −2 kame/kame/revlookupd/mainloop.c
  22. +1 −5 kame/kame/rtadvd/config.c
  23. +1 −5 kame/kame/rtadvd/timer.c
  24. +1 −1 kame/kame/scope6config/scope6config.c
  25. +3 −3 kame/kame/shisad/binding.c
  26. +3 −3 kame/kame/shisad/cnd.c
  27. +3 −3 kame/kame/shisad/common.c
  28. +2 −2 kame/kame/shisad/fsm.c
  29. +3 −3 kame/kame/shisad/had.c
  30. +3 −3 kame/kame/shisad/mdd.c
  31. +3 −3 kame/kame/shisad/mdd_nemo.c
  32. +3 −3 kame/kame/shisad/mdd_probe.c
  33. +2 −2 kame/kame/shisad/mdd_rtsock.c
  34. +3 −3 kame/kame/shisad/mh.c
  35. +3 −3 kame/kame/shisad/mnd.c
  36. +3 −3 kame/kame/shisad/nemo_var.c
  37. +3 −3 kame/kame/shisad/network.c
  38. +3 −3 kame/kame/shisad/util/shisaconfig.c
  39. +3 −3 kame/kame/traceroute/traceroute.c
  40. +2 −5 kame/kame/wru/wru.c
  41. +7 −9 kame/sys/kern/uipc_mbuf2.c
  42. +11 −23 kame/sys/net/if_dummy.c
  43. +7 −19 kame/sys/net/if_faith.c
  44. +13 −16 kame/sys/net/if_gif.c
  45. +3 −3 kame/sys/net/if_gif.h
  46. +8 −11 kame/sys/net/if_ist.c
  47. +10 −18 kame/sys/net/if_mip.c
  48. +18 −27 kame/sys/net/if_nemo.c
  49. +4 −8 kame/sys/net/if_nemo.h
  50. +4 −7 kame/sys/net/if_pflog.c
  51. +5 −8 kame/sys/net/if_pfsync.c
  52. +9 −16 kame/sys/net/if_stf.c
  53. +4 −30 kame/sys/net/mipsock.c
  54. +3 −3 kame/sys/net/net_osdep.c
  55. +4 −25 kame/sys/net/pf_ioctl.c
  56. +0 −4 kame/sys/net/pf_osfp.c
  57. +3 −3 kame/sys/netinet/in_gif.c
  58. +2 −2 kame/sys/netinet/in_msf.c
  59. +2 −2 kame/sys/netinet/ip_encap.c
  60. +8 −8 kame/sys/netinet6/ah_input.c
  61. +8 −12 kame/sys/netinet6/esp_input.c
  62. +13 −40 kame/sys/netinet6/icmp6.c
  63. +15 −15 kame/sys/netinet6/in6.c
  64. +3 −5 kame/sys/netinet6/in6_gif.c
  65. +3 −3 kame/sys/netinet6/in6_ifattach.c
  66. +3 −7 kame/sys/netinet6/in6_msf.c
  67. +2 −2 kame/sys/netinet6/in6_proto.c
  68. +4 −8 kame/sys/netinet6/in6_rmx.c
  69. +30 −40 kame/sys/netinet6/in6_src.c
  70. +3 −22 kame/sys/netinet6/in6_var.h
  71. +8 −54 kame/sys/netinet6/ip6_forward.c
  72. +2 −2 kame/sys/netinet6/ip6_fw.c
  73. +15 −27 kame/sys/netinet6/ip6_input.c
  74. +5 −7 kame/sys/netinet6/ip6_mroute.c
  75. +23 −65 kame/sys/netinet6/ip6_output.c
  76. +1 −13 kame/sys/netinet6/ip6_var.h
  77. +4 −10 kame/sys/netinet6/ipsec.c
  78. +13 −23 kame/sys/netinet6/mip6.c
  79. +2 −10 kame/sys/netinet6/mld6.c
  80. +2 −6 kame/sys/netinet6/mldv2.c
  81. +2 −2 kame/sys/netinet6/natpt_trans.c
  82. +19 −29 kame/sys/netinet6/nd6.c
  83. +5 −5 kame/sys/netinet6/nd6_nbr.c
  84. +7 −7 kame/sys/netinet6/nd6_rtr.c
  85. +3 −3 kame/sys/netinet6/scope6.c
  86. +3 −7 kame/sys/netinet6/udp6_output.c
View
@@ -1,5 +1,5 @@
CHANGELOG for KAME kit
-$KAME: CHANGELOG,v 1.2746 2005/04/14 02:25:48 suz Exp $
+$KAME: CHANGELOG,v 1.2747 2005/04/14 06:22:31 suz Exp $
<200504>
2005-04-14 SUZUKI, Shinsuke <suz@kame.net>
@@ -16,6 +16,9 @@ $KAME: CHANGELOG,v 1.2746 2005/04/14 02:25:48 suz Exp $
* freebsd5/sys/netinet/ip_output.c: specifies spl()s as done in
original FreeBSD5
+ * kame/*: remove freebsd[234]-specific code, since they are no longer
+ supported in KAME-SNAP
+
2005-04-05 SUZUKI, Shinsuke <suz@kame.net>
* freebsd5/sys/ufs/ffs/ffs_inode.c: FreeBSD Security Advisory
FreeBSD-SA-05:02.sendfile
@@ -50,9 +50,9 @@
#include <netinet/udp.h>
#include <netinet/ip6.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <arpa/inet.h>
#include <sys/ioctl.h>
@@ -1,4 +1,4 @@
-/* $KAME: addrconf.c,v 1.4 2005/03/29 14:13:29 jinmei Exp $ */
+/* $KAME: addrconf.c,v 1.5 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 2002 WIDE Project.
@@ -35,7 +35,7 @@
#include <sys/ioctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
@@ -1,4 +1,4 @@
-/* $KAME: common.c,v 1.125 2005/03/20 06:46:09 jinmei Exp $ */
+/* $KAME: common.c,v 1.126 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
@@ -45,7 +45,7 @@
#endif
#include <net/if.h>
#include <net/if_types.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <net/if_dl.h>
@@ -1,4 +1,4 @@
-/* $KAME: dhcp6c.c,v 1.159 2005/03/30 06:33:11 jinmei Exp $ */
+/* $KAME: dhcp6c.c,v 1.160 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
@@ -46,7 +46,7 @@
# endif
#endif
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <net/if_dl.h>
@@ -1,4 +1,4 @@
-/* $KAME: dhcp6relay.c,v 1.54 2005/03/18 10:31:17 jinmei Exp $ */
+/* $KAME: dhcp6relay.c,v 1.55 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
* All rights reserved.
@@ -34,7 +34,7 @@
#include <sys/uio.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
@@ -1,4 +1,4 @@
-/* $KAME: dhcp6s.c,v 1.156 2005/03/31 12:44:09 jinmei Exp $ */
+/* $KAME: dhcp6s.c,v 1.157 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 1998 and 1999 WIDE Project.
* All rights reserved.
@@ -47,7 +47,7 @@
#include <errno.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
@@ -1,4 +1,4 @@
-/* $KAME: prefixconf.c,v 1.30 2005/03/29 14:11:07 jinmei Exp $ */
+/* $KAME: prefixconf.c,v 1.31 2005/04/14 06:22:32 suz Exp $ */
/*
* Copyright (C) 2002 WIDE Project.
@@ -35,7 +35,7 @@
#include <sys/ioctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
@@ -1,4 +1,4 @@
-/* $KAME: gifconfig.c,v 1.19 2001/11/13 12:38:45 jinmei Exp $ */
+/* $KAME: gifconfig.c,v 1.20 2005/04/14 06:22:33 suz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -57,9 +57,9 @@
#include <sys/sysctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/route.h>
@@ -282,13 +282,7 @@ char *ifname(ifp)
#endif
KREAD(ifp, &ifnet, struct ifnet);
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD_version >= 502010)
strlcpy(buf, ifnet.if_xname, sizeof(buf));
-#else
- KREAD(ifnet.if_name, ifnamebuf, sizeof(ifnamebuf));
- snprintf(buf, sizeof(buf), "%s%d", ifnamebuf,
- ifnet.if_unit); /* does snprintf allow overlap copy?? */
-#endif
return buf;
}
@@ -303,7 +297,7 @@ void kread(addr, buf, len)
}
}
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#ifndef __FreeBSD__
void acmc(am)
struct ether_multi *am;
{
@@ -367,13 +361,8 @@ if6_addrlist(ifap)
KREAD(ifap0, &ifa, struct ifaddr);
KREAD(ifa.ifa_ifp, &ifnet, struct ifnet);
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
if (TAILQ_FIRST(&ifnet.if_multiaddrs))
ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs);
-#else
- if (ifnet.if_multiaddrs.lh_first)
- ifmp = ifnet.if_multiaddrs.lh_first;
-#endif
while (ifmp) {
KREAD(ifmp, &ifm, struct ifmultiaddr);
if (ifm.ifma_addr == NULL)
@@ -390,11 +379,7 @@ if6_addrlist(ifap)
ether_ntoa((struct ether_addr *)LLADDR(&sdl)),
ifm.ifma_refcount);
nextmulti:
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
ifmp = TAILQ_NEXT(&ifm, ifma_link);
-#else
- ifmp = ifm.ifma_link.le_next;
-#endif
}
}
#else
@@ -571,13 +556,8 @@ if_addrlist(ifap)
KREAD(ifap0, &ifa, struct ifaddr);
KREAD(ifa.ifa_ifp, &ifnet, struct ifnet);
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
if (TAILQ_FIRST(&ifnet.if_multiaddrs))
ifmp = TAILQ_FIRST(&ifnet.if_multiaddrs);
-#else
- if (ifnet.if_multiaddrs.lh_first)
- ifmp = ifnet.if_multiaddrs.lh_first;
-#endif
while (ifmp) {
KREAD(ifmp, &ifm, struct ifmultiaddr);
if (ifm.ifma_addr == NULL)
@@ -594,11 +574,7 @@ if_addrlist(ifap)
ether_ntoa((struct ether_addr *)LLADDR(&sdl)),
ifm.ifma_refcount);
nextmulti:
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
ifmp = TAILQ_NEXT(&ifm, ifma_link);
-#else
- ifmp = ifm.ifma_link.le_next;
-#endif
}
}
#else /* !FreeBSD */
@@ -1,4 +1,4 @@
-/* $KAME: ip6addrctl.c,v 1.3 2003/12/16 08:14:28 suz Exp $ */
+/* $KAME: ip6addrctl.c,v 1.4 2005/04/14 06:22:33 suz Exp $ */
/*
* Copyright (C) 2001 WIDE Project.
@@ -37,9 +37,9 @@
#include <sys/sysctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <netinet/in.h>
#include <netinet6/in6_var.h>
@@ -1,4 +1,4 @@
-/* $KAME: qop.c,v 1.12 2002/10/26 06:59:53 kjc Exp $ */
+/* $KAME: qop.c,v 1.13 2005/04/14 06:22:33 suz Exp $ */
/*
* Copyright (C) 1999-2000
* Sony Computer Science Laboratories, Inc. All rights reserved.
@@ -31,7 +31,7 @@
#include <sys/ioctl.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
-#if defined(__FreeBSD__) && (__FreeBSD_version > 300000)
+#ifdef __FreeBSD__
#include <sys/linker.h>
#endif
@@ -1406,13 +1406,13 @@ qop_rio_set_defaults(struct redparams *params)
int
open_module(const char *devname, int flags)
{
-#if defined(__FreeBSD__) && (__FreeBSD_version > 300000)
+#ifdef __FreeBSD__
char modname[64], filename[MAXPATHLEN], *cp;
int fd;
#endif
struct stat sbuf;
-#if (__FreeBSD_version > 500000)
+#ifdef __FreeBSD__
/* the device is dynamically created by devfs */
#else
/* check if the altq device exists */
@@ -1422,19 +1422,15 @@ open_module(const char *devname, int flags)
}
#endif
-#if defined(__FreeBSD__) && (__FreeBSD_version > 300000)
+#ifdef __FreeBSD__
/* turn discipline name into module name */
strlcpy(modname, "altq_", sizeof(modname));
if ((cp = strrchr(devname, '/')) == NULL)
return (-1);
strlcat(modname, cp + 1, sizeof(modname));
/* check if the kld module exists */
-#if (__FreeBSD_version > 500000)
snprintf(filename, sizeof(filename), "/boot/kernel/%s.ko", modname);
-#else
- snprintf(filename, sizeof(filename), "/modules/%s.ko", modname);
-#endif
if (stat(filename, &sbuf) < 0) {
/* module file doesn't exist */
return (-1);
@@ -1,4 +1,4 @@
-/* $KAME: bindresvport.c,v 1.4 2001/08/20 02:32:40 itojun Exp $ */
+/* $KAME: bindresvport.c,v 1.5 2005/04/14 06:22:33 suz Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -46,9 +46,7 @@ static char *rcsid = "$OpenBSD: bindresvport.c,v 1.11 1999/12/17 19:22:08 deraad
#include <netinet/in.h>
#include <errno.h>
-#if defined(__NetBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__OpenBSD__)
#include <rpc/rpc.h>
-#endif
/*
* Bind a socket to a privileged IP port
@@ -1,4 +1,4 @@
-/* $KAME: getaddrinfo.c,v 1.214 2005/03/11 14:22:35 itojun Exp $ */
+/* $KAME: getaddrinfo.c,v 1.215 2005/04/14 06:22:33 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -121,7 +121,7 @@
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <netdb.h>
-#if defined(__FreeBSD__) && __FreeBSD_version >= 503000
+#ifdef __FreeBSD__
#include <pthread.h>
#endif
#include <resolv.h>
@@ -373,7 +373,7 @@ static const struct ai_errlist {
{ NULL, -1 },
};
-#if defined(__FreeBSD__) && __FreeBSD_version >= 503000
+#ifdef __FreeBSD__
/*
* XXX: Many dependencies are not thread-safe. So, we share lock between
* getaddrinfo() and getipnodeby*(). Still, we cannot use
@@ -3918,7 +3918,7 @@ res_querydomainN(name, domain, target)
return (res_queryN(longname, target));
}
-#elif defined(__FreeBSD__) && __FreeBSD_version >= 503000
+#elif defined(__FreeBSD__)
#include <stdarg.h>
#include <nsswitch.h>
@@ -1,4 +1,4 @@
-/* $KAME: getifaddrs.c,v 1.10 2002/07/25 04:46:15 jinmei Exp $ */
+/* $KAME: getifaddrs.c,v 1.11 2005/04/14 06:22:33 suz Exp $ */
/*
* Copyright (c) 1995, 1999
@@ -75,9 +75,7 @@
#define HAVE_IFAM_DATA
#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
#define HAVE_IFM_DATA
-#endif
#define MAX_SYSCTL_TRY 5
@@ -55,7 +55,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id: res_query.c,v 1.13 2003/05/17 18:25:38 itojun Exp $";
+static char rcsid[] = "$Id: res_query.c,v 1.14 2005/04/14 06:22:34 suz Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -90,11 +90,9 @@ const char *hostalias __P((const char *));
extern int res_opt __P((int, u_char *, int, int));
#endif
-#if defined(__NetBSD__) || defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 4)
int res_queryN __P((const char *, struct res_target *));
int res_searchN __P((const char *, struct res_target *));
int res_querydomainN __P((const char *, const char *, struct res_target *));
-#endif
int h_errno;
@@ -530,7 +528,7 @@ hostalias(name)
* forbid hostaliases for setuid binray, due to possible security
* breach.
*/
-#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
if (issetugid())
#else
if (getuid() != geteuid() || getgid() != getegid())
@@ -1,4 +1,4 @@
-/* $KAME: mainloop.c,v 1.96 2003/05/17 18:21:09 itojun Exp $ */
+/* $KAME: mainloop.c,v 1.97 2005/04/14 06:22:34 suz Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -88,7 +88,7 @@
#include <sys/param.h>
#include <sys/queue.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <netinet/in.h>
Oops, something went wrong.

0 comments on commit 2fb5d92

Please sign in to comment.