Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… in KAME-SNAP
  • Loading branch information...
commit 2fb5d928293430bd6b006e9d6043b9452ce3b18d 1 parent c80b26a
suz authored
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
5 CHANGELOG
@@ -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
View
4 kame/kame/bgpd/include.h
@@ -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>
View
4 kame/kame/dhcp6/addrconf.c
@@ -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
View
4 kame/kame/dhcp6/common.c
@@ -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>
View
4 kame/kame/dhcp6/dhcp6c.c
@@ -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>
View
4 kame/kame/dhcp6/dhcp6relay.c
@@ -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
View
4 kame/kame/dhcp6/dhcp6s.c
@@ -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
View
4 kame/kame/dhcp6/prefixconf.c
@@ -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
View
6 kame/kame/gifconfig/gifconfig.c
@@ -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>
View
26 kame/kame/ifmcstat/ifmcstat.c
@@ -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 */
View
6 kame/kame/ip6addrctl/ip6addrctl.c
@@ -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>
View
14 kame/kame/libaltq/qop.c
@@ -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,7 +1422,7 @@ 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)
@@ -1430,11 +1430,7 @@ open_module(const char *devname, int flags)
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);
View
4 kame/kame/libinet6/bindresvport.c
@@ -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
View
8 kame/kame/libinet6/getaddrinfo.c
@@ -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>
View
4 kame/kame/libinet6/getifaddrs.c
@@ -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
View
6 kame/kame/libinet6/resolv/res_query.c
@@ -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())
View
4 kame/kame/mdnsd/mainloop.c
@@ -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>
View
7 kame/kame/nodeinfod/nodeinfod.c
@@ -1,4 +1,4 @@
-/* $KAME: nodeinfod.c,v 1.30 2002/05/24 08:48:04 itojun Exp $ */
+/* $KAME: nodeinfod.c,v 1.31 2005/04/14 06:22:34 suz Exp $ */
/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
@@ -57,11 +57,6 @@
#endif
#include <ctype.h>
-/* portability */
-#if (defined(__bsdi__) && _BSDI_VERSION < 199802) || (defined(__FreeBSD__) && __FreeBSD__ < 3)
-#define socklen_t int
-#endif
-
int main __P((int, char **));
void usage __P((void));
void sockinit __P((void));
View
4 kame/kame/pim6sd/mtrace6/mtrace6.c
@@ -1,4 +1,4 @@
-/* $KAME: mtrace6.c,v 1.23 2004/08/24 01:35:20 suz Exp $ */
+/* $KAME: mtrace6.c,v 1.24 2005/04/14 06:22:34 suz Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@@ -37,7 +37,7 @@
#include <sys/queue.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
View
4 kame/kame/racoon/grabmyaddr.c
@@ -1,4 +1,4 @@
-/* $KAME: grabmyaddr.c,v 1.37 2004/04/15 08:22:14 sakane Exp $ */
+/* $KAME: grabmyaddr.c,v 1.38 2005/04/14 06:22:34 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 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
#include <net/route.h>
View
4 kame/kame/revlookupd/mainloop.c
@@ -1,4 +1,4 @@
-/* $KAME: mainloop.c,v 1.8 2002/06/10 09:33:25 itojun Exp $ */
+/* $KAME: mainloop.c,v 1.9 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -53,7 +53,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>
View
6 kame/kame/rtadvd/config.c
@@ -1,4 +1,4 @@
-/* $KAME: config.c,v 1.91 2005/04/01 06:04:36 suz Exp $ */
+/* $KAME: config.c,v 1.92 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -56,11 +56,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
-#if defined(__FreeBSD__) && __FreeBSD_version < 500000
-#include <sys/queue.h>
-#else
#include <search.h>
-#endif
#include <unistd.h>
#include <ifaddrs.h>
View
6 kame/kame/rtadvd/timer.c
@@ -1,4 +1,4 @@
-/* $KAME: timer.c,v 1.10 2004/10/12 05:38:57 suz Exp $ */
+/* $KAME: timer.c,v 1.11 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@@ -35,11 +35,7 @@
#include <syslog.h>
#include <stdlib.h>
#include <string.h>
-#if defined(__FreeBSD__) && __FreeBSD_version < 500000
-#include <sys/queue.h>
-#else
#include <search.h>
-#endif
#include "timer.h"
static struct rtadvd_timer timer_head;
View
2  kame/kame/scope6config/scope6config.c
@@ -33,7 +33,7 @@
#include <sys/ioctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
View
6 kame/kame/shisad/binding.c
@@ -1,4 +1,4 @@
-/* $KAME: binding.c,v 1.11 2005/03/10 23:43:26 t-momose Exp $ */
+/* $KAME: binding.c,v 1.12 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -39,9 +39,9 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/mipsock.h>
#include <netinet/ip6.h>
#include <netinet/icmp6.h>
View
6 kame/kame/shisad/cnd.c
@@ -1,4 +1,4 @@
-/* $KAME: cnd.c,v 1.4 2005/02/12 15:22:39 t-momose Exp $ */
+/* $KAME: cnd.c,v 1.5 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -43,9 +43,9 @@
#include <sys/sockio.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 <netinet/icmp6.h>
#include <netinet/ip6mh.h>
View
6 kame/kame/shisad/common.c
@@ -1,4 +1,4 @@
-/* $KAME: common.c,v 1.16 2005/03/02 02:47:52 t-momose Exp $ */
+/* $KAME: common.c,v 1.17 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -44,10 +44,10 @@
#include <net/if.h>
#include <net/if_types.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#include <net/ethernet.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#ifdef __NetBSD__
#include <net/if_ether.h>
#endif /* __NetBSD__ */
View
4 kame/kame/shisad/fsm.c
@@ -1,4 +1,4 @@
-/* $KAME: fsm.c,v 1.26 2005/03/14 06:40:43 mitsuya Exp $ */
+/* $KAME: fsm.c,v 1.27 2005/04/14 06:22:35 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
@@ -40,7 +40,7 @@
#include <sys/syslog.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <net/if_dl.h>
View
6 kame/kame/shisad/had.c
@@ -1,4 +1,4 @@
-/* $KAME: had.c,v 1.13 2005/02/18 17:22:41 t-momose Exp $ */
+/* $KAME: had.c,v 1.14 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -49,9 +49,9 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/route.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <netinet/in.h>
#include <netinet/icmp6.h>
#include <netinet/ip6mh.h>
View
6 kame/kame/shisad/mdd.c
@@ -1,4 +1,4 @@
-/* $KAME: mdd.c,v 1.2 2005/02/18 05:57:44 t-momose Exp $ */
+/* $KAME: mdd.c,v 1.3 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -50,9 +50,9 @@
#ifdef MIP_MCOA
#include <sys/sysctl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* defined(__FreeBSD__) && __FreeBSD__ >= 3 */
+#endif
#include <netinet6/in6_var.h>
#endif /* MIP_MCOA */
View
6 kame/kame/shisad/mdd_nemo.c
@@ -1,4 +1,4 @@
-/* $KAME: mdd_nemo.c,v 1.1 2004/12/09 02:18:39 t-momose Exp $ */
+/* $KAME: mdd_nemo.c,v 1.2 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -48,9 +48,9 @@
#include <net/if.h>
#include <net/if_dl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/if_types.h>
#if 0
#include <net/ethernet.h>
View
6 kame/kame/shisad/mdd_probe.c
@@ -1,4 +1,4 @@
-/* $KAME: mdd_probe.c,v 1.2 2004/12/21 02:21:16 keiichi Exp $ */
+/* $KAME: mdd_probe.c,v 1.3 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -42,9 +42,9 @@
#include <net/if_dl.h>
#include <net/if_media.h>
#include <net/route.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <netinet/in.h>
#include <netinet/icmp6.h>
View
4 kame/kame/shisad/mdd_rtsock.c
@@ -1,4 +1,4 @@
-/* $KAME: mdd_rtsock.c,v 1.1 2004/12/09 02:18:40 t-momose Exp $ */
+/* $KAME: mdd_rtsock.c,v 1.2 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -36,7 +36,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <net/if_dl.h>
View
6 kame/kame/shisad/mh.c
@@ -1,4 +1,4 @@
-/* $KAME: mh.c,v 1.20 2005/03/11 06:44:32 keiichi Exp $ */
+/* $KAME: mh.c,v 1.21 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -49,9 +49,9 @@
#include <net/if_dl.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/mipsock.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
View
6 kame/kame/shisad/mnd.c
@@ -1,4 +1,4 @@
-/* $KAME: mnd.c,v 1.11 2005/03/10 23:43:26 t-momose Exp $ */
+/* $KAME: mnd.c,v 1.12 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -50,9 +50,9 @@
#include <net/if.h>
#include <net/if_dl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/route.h>
#include <net/mipsock.h>
#include <netinet/in.h>
View
6 kame/kame/shisad/nemo_var.c
@@ -1,4 +1,4 @@
-/* $KAME: nemo_var.c,v 1.5 2005/02/12 15:22:40 t-momose Exp $ */
+/* $KAME: nemo_var.c,v 1.6 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -45,9 +45,9 @@
#include <net/if.h>
#include <net/if_dl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/route.h>
#include <net/mipsock.h>
View
6 kame/kame/shisad/network.c
@@ -1,4 +1,4 @@
-/* $KAME: network.c,v 1.3 2005/02/18 05:57:44 t-momose Exp $ */
+/* $KAME: network.c,v 1.4 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -45,9 +45,9 @@
#include <net/if.h>
#include <net/if_dl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/route.h>
#include <net/mipsock.h>
View
6 kame/kame/shisad/util/shisaconfig.c
@@ -1,4 +1,4 @@
-/* $KAME: shisaconfig.c,v 1.1 2004/12/09 02:18:51 t-momose Exp $ */
+/* $KAME: shisaconfig.c,v 1.2 2005/04/14 06:22:36 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project. All rights reserved.
*
@@ -49,9 +49,9 @@
#include <net/if.h>
#include <net/if_dl.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
+#endif
#include <net/route.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
View
6 kame/kame/traceroute/traceroute.c
@@ -24,7 +24,7 @@ static const char copyright[] =
"@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] =
- "@(#)$Header: /usr/home/sumikawa/kame/kame/kame/kame/traceroute/traceroute.c,v 1.21 2003/05/17 18:13:36 itojun Exp $ (LBL)";
+ "@(#)$Header: /usr/home/sumikawa/kame/kame/kame/kame/traceroute/traceroute.c,v 1.22 2005/04/14 06:22:37 suz Exp $ (LBL)";
#endif
/*
@@ -224,7 +224,7 @@ static const char rcsid[] =
#include <ctype.h>
#include <errno.h>
#ifdef HAVE_MALLOC_H
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#ifndef __FreeBSD__
#include <malloc.h>
#endif
#endif
@@ -1080,7 +1080,7 @@ send_probe(register int seq, int ttl, register struct timeval *tp)
tip = *outip;
ui = (struct udpiphdr *)outip;
#ifdef HAVE_UDPIPHDR_NEXT
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#ifndef __FreeBSD__
ui->ui_next = 0;
ui->ui_prev = 0;
#endif
View
7 kame/kame/wru/wru.c
@@ -1,4 +1,4 @@
- /* $KAME: wru.c,v 1.12 2003/05/17 18:12:41 itojun Exp $ */
+ /* $KAME: wru.c,v 1.13 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (C) 2002 WIDE Project.
@@ -37,7 +37,7 @@
#include <sys/queue.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <net/if_var.h>
#endif
#include <net/if_dl.h>
@@ -67,9 +67,6 @@
#ifndef NI_NODENAME_FLAG_VALIDTTL
#define NI_NODENAME_FLAG_VALIDTTL NI_FQDN_FLAG_VALIDTTL
#endif
-#if defined(__FreeBSD__) && __FreeBSD__ <= 3
-#define socklen_t int
-#endif
static void update_nonce __P((u_int8_t *, size_t));
static int do_reply __P((char *, int, int, char *, struct sockaddr *,
View
16 kame/sys/kern/uipc_mbuf2.c
@@ -1,4 +1,4 @@
-/* $KAME: uipc_mbuf2.c,v 1.46 2004/12/27 05:41:16 itojun Exp $ */
+/* $KAME: uipc_mbuf2.c,v 1.47 2005/04/14 06:22:37 suz Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */
/*
@@ -67,16 +67,14 @@
/*#define PULLDOWN_DEBUG*/
-#if defined(__FreeBSD__) && __FreeBSD_version >= 501000
+#ifdef __FreeBSD__
#include "opt_mac.h"
#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <sys/kernel.h>
-#endif
-#if defined(__FreeBSD__) && __FreeBSD_version >= 501000
#include <sys/lock.h>
#include <sys/mac.h>
#endif
@@ -88,7 +86,7 @@
static struct mbuf *m_dup1 __P((struct mbuf *, int, int, int));
#endif
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
MALLOC_DEFINE(M_PACKET_TAGS, "packet tags", "Packet tags");
#endif
@@ -218,7 +216,7 @@ m_pulldown(m, off, len, offp)
return NULL; /* mbuf chain too short */
}
-#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#ifdef __FreeBSD__
sharedcluster = !M_WRITABLE(n);
#else
sharedcluster = M_READONLY(n);
@@ -426,7 +424,7 @@ m_tag_free(t)
struct m_tag *t;
{
-#if defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
#ifdef MAC
if (t->m_tag_id == PACKET_TAG_MACLABEL)
mac_destroy_mbuf_tag(t);
@@ -533,7 +531,7 @@ m_tag_copy(t)
if (p == NULL)
return (NULL);
-#if defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
#ifdef MAC
/*
* XXXMAC: we should probably pass off the initialization, and
View
34 kame/sys/net/if_dummy.c
@@ -1,4 +1,4 @@
-/* $KAME: if_dummy.c,v 1.28 2004/11/11 22:34:44 suz Exp $ */
+/* $KAME: if_dummy.c,v 1.29 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -149,13 +149,10 @@ dummyattach(dummy)
for (i = 0; i < NDUMMY; i++) {
ifp = &dummyif[i];
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- sprintf(ifp->if_xname, "dummy%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(ifp, "dummy", i);
#else
- ifp->if_name = "dummy";
- ifp->if_unit = i;
+ sprintf(ifp->if_xname, "dummy%d", i);
#endif
ifp->if_softc = NULL;
ifp->if_mtu = DUMMYMTU;
@@ -193,7 +190,7 @@ dummyoutput(ifp, m, dst, rt)
struct sockaddr *dst;
struct rtentry *rt;
{
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
struct ifqueue *ifq = 0;
#endif
@@ -246,7 +243,7 @@ dummyoutput(ifp, m, dst, rt)
#ifdef INET
case AF_INET:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ipintrq;
#endif
isr = NETISR_IP;
@@ -254,7 +251,7 @@ dummyoutput(ifp, m, dst, rt)
#endif
#ifdef IPX
case AF_IPX:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ipxintrq;
#endif
isr = NETISR_IPX;
@@ -262,7 +259,7 @@ dummyoutput(ifp, m, dst, rt)
#endif
#ifdef INET6
case AF_INET6:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ip6intrq;
#endif
isr = NETISR_IPV6;
@@ -270,7 +267,7 @@ dummyoutput(ifp, m, dst, rt)
#endif
#ifdef NS
case AF_NS:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &nsintrq;
#endif
isr = NETISR_NS;
@@ -278,7 +275,7 @@ dummyoutput(ifp, m, dst, rt)
#endif
#ifdef ISO
case AF_ISO:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &clnlintrq;
#endif
isr = NETISR_ISO;
@@ -286,7 +283,7 @@ dummyoutput(ifp, m, dst, rt)
#endif
#ifdef NETATALK
case AF_APPLETALK:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &atintrq2;
#endif
isr = NETISR_ATALK;
@@ -299,7 +296,7 @@ dummyoutput(ifp, m, dst, rt)
return (EAFNOSUPPORT);
}
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifdef __FreeBSD__
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
netisr_queue(isr, m);
@@ -334,15 +331,6 @@ dummyrtrequest(cmd, rt, info)
{
if (rt) {
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
-#if defined(__FreeBSD__) && __FreeBSD_version < 502000
- /*
- * For optimal performance, the send and receive buffers
- * should be at least twice the MTU plus a little more for
- * overhead.
- */
- rt->rt_rmx.rmx_recvpipe =
- rt->rt_rmx.rmx_sendpipe = 3 * DUMMYMTU;
-#endif
}
}
View
26 kame/sys/net/if_faith.c
@@ -1,4 +1,4 @@
-/* $KAME: if_faith.c,v 1.40 2004/11/11 22:34:45 suz Exp $ */
+/* $KAME: if_faith.c,v 1.41 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -139,13 +139,10 @@ faithattach(faith)
for (i = 0; i < NFAITH; i++) {
ifp = &faithif[i];
bzero(ifp, sizeof(faithif[i]));
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- sprintf(ifp->if_xname, "faith%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(ifp, "faith", i);
#else
- ifp->if_name = "faith";
- ifp->if_unit = i;
+ sprintf(ifp->if_xname, "faith%d", i);
#endif
ifp->if_mtu = FAITHMTU;
/* Change to BROADCAST experimentaly to announce its prefix. */
@@ -182,7 +179,7 @@ faithoutput(ifp, m, dst, rt)
struct sockaddr *dst;
struct rtentry *rt;
{
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
struct ifqueue *ifq = NULL;
#endif
@@ -233,7 +230,7 @@ faithoutput(ifp, m, dst, rt)
switch (dst->sa_family) {
#ifdef INET
case AF_INET:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ipintrq;
#endif
isr = NETISR_IP;
@@ -241,7 +238,7 @@ faithoutput(ifp, m, dst, rt)
#endif
#ifdef INET6
case AF_INET6:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ip6intrq;
#endif
isr = NETISR_IPV6;
@@ -256,7 +253,7 @@ faithoutput(ifp, m, dst, rt)
m->m_pkthdr.rcvif = ifp;
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifdef __FreeBSD__
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
netisr_queue(isr, m);
@@ -291,15 +288,6 @@ faithrtrequest(cmd, rt, info)
{
if (rt) {
rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
-#if defined(__FreeBSD__) && __FreeBSD_version < 502000
- /*
- * For optimal performance, the send and receive buffers
- * should be at least twice the MTU plus a little more for
- * overhead.
- */
- rt->rt_rmx.rmx_recvpipe =
- rt->rt_rmx.rmx_sendpipe = 3 * FAITHMTU;
-#endif
}
}
View
29 kame/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $KAME: if_gif.c,v 1.113 2004/12/09 02:18:54 t-momose Exp $ */
+/* $KAME: if_gif.c,v 1.114 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -68,7 +68,7 @@
#include <net/netisr.h>
#include <net/route.h>
#include <net/bpf.h>
-#if defined(__FreeBSD__) && __FreeBSD_version > 502000
+#ifdef __FreeBSD__
#include <net/pfil.h>
#endif
@@ -159,14 +159,11 @@ gifattach(dummy)
M_DEVBUF, M_WAITOK);
bzero(sc, ngif * sizeof(struct gif_softc));
for (i = 0; i < ngif; sc++, i++) {
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- snprintf(sc->gif_if.if_xname, sizeof(sc->gif_if.if_xname),
- "gif%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(&sc->gif_if, "gif", i);
#else
- sc->gif_if.if_name = "gif";
- sc->gif_if.if_unit = i;
+ snprintf(sc->gif_if.if_xname, sizeof(sc->gif_if.if_xname),
+ "gif%d", i);
#endif
gifattach0(sc);
LIST_INSERT_HEAD(&gif_softc_list, sc, gif_list);
@@ -345,7 +342,7 @@ gif_output(ifp, m, dst, rt)
int s;
struct m_tag *mtag;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ALTQ_DECL(struct altq_pktattr pktattr;)
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
#endif
@@ -375,7 +372,7 @@ gif_output(ifp, m, dst, rt)
mtag = m_tag_get(PACKET_TAG_GIF, sizeof(struct ifnet *), M_NOWAIT);
if (!mtag) {
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
_IF_DROP(&ifp->if_snd);
#else
IF_DROP(&ifp->if_snd);
@@ -422,7 +419,7 @@ gif_output(ifp, m, dst, rt)
*mtod(m, int *) = dst->sa_family;
s = splnet();
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifdef __FreeBSD__
IFQ_ENQUEUE(&ifp->if_snd, m, error);
#else
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
@@ -540,7 +537,7 @@ gif_input(m, af, ifp)
int af;
struct ifnet *ifp;
{
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
struct ifqueue *ifq = NULL;
#endif
@@ -593,7 +590,7 @@ gif_input(m, af, ifp)
switch (af) {
#ifdef INET
case AF_INET:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ipintrq;
#endif
isr = NETISR_IP;
@@ -601,7 +598,7 @@ gif_input(m, af, ifp)
#endif
#ifdef INET6
case AF_INET6:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ip6intrq;
#endif
isr = NETISR_IPV6;
@@ -612,7 +609,7 @@ gif_input(m, af, ifp)
m = gif_eon_decap(ifp, m);
if (!m)
return;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &clnlintrq;
#endif
isr = NETISR_ISO;
@@ -623,7 +620,7 @@ gif_input(m, af, ifp)
return;
}
-#if defined(__FreeBSD__) && __FreeBSD_version >= 503000
+#ifdef __FreeBSD__
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
netisr_queue(isr, m);
View
6 kame/sys/net/if_gif.h
@@ -1,4 +1,4 @@
-/* $KAME: if_gif.h,v 1.38 2004/12/09 02:18:54 t-momose Exp $ */
+/* $KAME: if_gif.h,v 1.39 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -49,7 +49,7 @@
struct encaptab;
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
extern void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp,
int af);
extern void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m,
@@ -82,7 +82,7 @@ struct gif_softc {
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *gif_si; /* softintr handle */
#endif
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
void *gif_netgraph; /* ng_gif(4) netgraph node info */
#endif
View
19 kame/sys/net/if_ist.c
@@ -1,4 +1,4 @@
-/* $KAME: if_ist.c,v 1.7 2005/03/23 10:03:22 suz Exp $ */
+/* $KAME: if_ist.c,v 1.8 2005/04/14 06:22:37 suz Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -140,7 +140,7 @@ extern struct domain inetdomain;
struct protosw in_ist_protosw =
{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
in_ist_input,
-#if defined(__FreeBSD__) && __FreeBSD_version >= 502010
+#ifdef __FreeBSD__
(pr_output_t *)rip_output,
#else
rip_output,
@@ -208,14 +208,11 @@ istattach(dummy)
for (i = 0; i < nist; i++) {
sc = &ist[i];
bzero(sc, sizeof(*sc));
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- snprintf(sc->sc_if.if_xname, sizeof(sc->sc_if.if_xname),
- "ist%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version >= 502010
+#ifdef __FreeBSD__
if_initname(&sc->sc_if, "ist", i);
#else
- sc->sc_if.if_name = "ist";
- sc->sc_if.if_unit = i;
+ snprintf(sc->sc_if.if_xname, sizeof(sc->sc_if.if_xname),
+ "ist%d", i);
#endif
p = encap_attach_func(AF_INET, IPPROTO_IPV6, ist_encapcheck,
@@ -881,7 +878,7 @@ in_ist_input(m, va_alist)
struct ip *ip;
struct ip6_hdr *ip6;
u_int8_t otos, itos;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
#endif
int isr;
@@ -995,7 +992,7 @@ in_ist_input(m, va_alist)
ifq = &ip6intrq;
isr = NETISR_IPV6;
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
if (!IF_HANDOFF(ifq, m, NULL))
return;
#else
@@ -1016,7 +1013,7 @@ in_ist_input(m, va_alist)
schednetisr(isr);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
splx(s);
#endif
}
View
28 kame/sys/net/if_mip.c
@@ -1,4 +1,4 @@
-/* $Id: if_mip.c,v 1.3 2005/03/01 18:17:22 t-momose Exp $ */
+/* $Id: if_mip.c,v 1.4 2005/04/14 06:22:38 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mip6.h"
@@ -63,7 +63,7 @@
#include <net/if_mip.h>
#include "mip.h"
-#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#ifdef __FreeBSD__
#include "bpf.h"
#define NBPFILTER NBPF
#else
@@ -106,15 +106,11 @@ mipattach(dummy)
sc = malloc(NMIP * sizeof(struct mip_softc), M_DEVBUF, M_WAITOK);
bzero(sc, NMIP * sizeof(struct mip_softc));
for (i = 0 ; i < NMIP; sc++, i++) {
-#if defined(__NetBSD__)
- sprintf(sc->mip_if.if_xname, "mip%d", i);
-#elif defined(__OpenBSD__)
- snprintf(sc->mip_if.if_xname, sizeof sc->mip_if.if_xname, "mip%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(&sc->mip_if, "mip", i);
#else
- sc->mip_if.if_name = "mip";
- sc->mip_if.if_unit = i;
+ snprintf(sc->mip_if.if_xname, sizeof(sc->mip_if.if_xname),
+ "mip%d", i);
#endif
sc->mip_if.if_flags = IFF_MULTICAST | IFF_SIMPLEX;
sc->mip_if.if_mtu = MIP_MTU;
@@ -124,7 +120,7 @@ mipattach(dummy)
#ifdef __NetBSD__
sc->mip_if.if_dlt = DLT_NULL;
#endif
-#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#ifdef __FreeBSD__
IFQ_SET_MAXLEN(&sc->mip_if.if_snd, ifqmaxlen);
IFQ_SET_READY(&sc->mip_if.if_snd);
#endif
@@ -275,7 +271,7 @@ mip_output(ifp, m, dst, rt)
#ifdef IPV6_MINMTU
/* XXX */
return (ip6_output(m, 0, 0, IPV6_MINMTU, 0
-#if defined(__FreeBSD__) && __FreeBSD_version >= 480000
+#ifdef __FreeBSD__
, &ifp, NULL
#elif defined(__NetBSD__)
, NULL, &ifp
@@ -285,7 +281,7 @@ mip_output(ifp, m, dst, rt)
));
#else
return (ip6_output(m, 0, 0, 0, 0
-#if defined(__FreeBSD__) && __FreeBSD_version >= 480000
+#ifdef __FreeBSD__
, &ifp, NULL
#elif defined(__NetBSD__)
, NULL, &ifp
@@ -309,11 +305,7 @@ mip_output(ifp, m, dst, rt)
int
mip_ioctl(ifp, cmd, data)
struct ifnet *ifp;
-#if defined(__FreeBSD__) && __FreeBSD__ < 3
- int cmd;
-#else
u_long cmd;
-#endif
caddr_t data;
{
int s, error;
@@ -371,7 +363,7 @@ mip_ioctl(ifp, cmd, data)
#ifdef __FreeBSD__
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
+#else
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
#endif
{
View
45 kame/sys/net/if_nemo.c
@@ -1,4 +1,4 @@
-/* $KAME: if_nemo.c,v 1.2 2005/01/17 15:05:01 mitsuya Exp $ */
+/* $KAME: if_nemo.c,v 1.3 2005/04/14 06:22:38 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*/
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_mip6.h"
@@ -43,16 +43,14 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include <sys/malloc.h>
#endif
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/errno.h>
-#if defined(__FreeBSD__) || __FreeBSD__ >= 3
-/*nothing*/
-#else
+#ifndef __FreeBSD__
#include <sys/ioctl.h>
#endif
#include <sys/time.h>
@@ -98,7 +96,7 @@
#include <net/if_nemo.h>
#include "nemo.h"
-#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#ifdef __FreeBSD__
#include "bpf.h"
#define NBPFILTER NBPF
#else
@@ -156,14 +154,11 @@ nemoattach(dummy)
M_DEVBUF, M_WAIT);
bzero(sc, nnemo * sizeof(struct nemo_softc));
for (i = 0; i < nnemo; sc++, i++) {
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- snprintf(sc->nemo_if.if_xname, sizeof(sc->nemo_if.if_xname),
- "nemo%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(&sc->nemo_if, "nemo", i);
#else
- sc->nemo_if.if_name = "nemo";
- sc->nemo_if.if_unit = i;
+ snprintf(sc->nemo_if.if_xname, sizeof(sc->nemo_if.if_xname),
+ "nemo%d", i);
#endif
nemoattach0(sc);
LIST_INSERT_HEAD(&nemo_softc_list, sc, nemo_list);
@@ -191,7 +186,7 @@ nemoattach0(sc)
#ifdef __NetBSD__
sc->nemo_if.if_dlt = DLT_NULL;
#endif
-#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#ifdef __FreeBSD__
IFQ_SET_MAXLEN(&sc->nemo_if.if_snd, IFQ_MAXLEN);
#endif
IFQ_SET_READY(&sc->nemo_if.if_snd);
@@ -342,7 +337,7 @@ nemo_output(ifp, m, dst, rt)
int s;
struct m_tag *mtag;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ALTQ_DECL(struct altq_pktattr pktattr;)
IFQ_CLASSIFY(&ifp->if_snd, m, dst->sa_family, &pktattr);
#endif
@@ -364,7 +359,7 @@ nemo_output(ifp, m, dst, rt)
mtag = m_tag_get(PACKET_TAG_GIF, sizeof(struct ifnet *), M_NOWAIT);
if (!mtag) {
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
_IF_DROP(&ifp->if_snd);
#else
IF_DROP(&ifp->if_snd);
@@ -411,7 +406,7 @@ nemo_output(ifp, m, dst, rt)
*mtod(m, int *) = dst->sa_family;
s = splnet();
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifdef __FreeBSD__
IFQ_ENQUEUE(&ifp->if_snd, m, error);
#else
IFQ_ENQUEUE(&ifp->if_snd, m, &pktattr, error);
@@ -529,7 +524,7 @@ nemo_input(m, af, ifp)
int af;
struct ifnet *ifp;
{
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
#endif
int isr;
@@ -582,7 +577,7 @@ nemo_input(m, af, ifp)
switch (af) {
#ifdef INET
case AF_INET:
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 503000)
+#ifndef __FreeBSD__
ifq = &ipintrq;
#endif
isr = NETISR_IP;
@@ -608,7 +603,7 @@ nemo_input(m, af, ifp)
return;
}
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
if (!IF_HANDOFF(ifq, m, NULL))
return;
#else
@@ -631,7 +626,7 @@ nemo_input(m, af, ifp)
/* we need schednetisr since the address family may change */
schednetisr(isr);
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
splx(s);
#endif
return;
@@ -642,11 +637,7 @@ nemo_input(m, af, ifp)
int
nemo_ioctl(ifp, cmd, data)
struct ifnet *ifp;
-#if defined(__FreeBSD__) && __FreeBSD__ < 3
- int cmd;
-#else
u_long cmd;
-#endif
caddr_t data;
{
struct nemo_softc *sc = (struct nemo_softc*)ifp;
@@ -667,7 +658,7 @@ nemo_ioctl(ifp, cmd, data)
case SIOCADDMULTI:
case SIOCDELMULTI:
-#if !(defined(__FreeBSD__) && __FreeBSD__ >= 3)
+#ifndef __FreeBSD__
switch (ifr->ifr_addr.sa_family) {
#ifdef INET
case AF_INET: /* IP supports Multicast */
@@ -681,7 +672,7 @@ nemo_ioctl(ifp, cmd, data)
error = EAFNOSUPPORT;
break;
}
-#endif /*not FreeBSD3*/
+#endif /* not FreeBSD */
break;
#ifdef SIOCSIFMTU /* xxx */
View
12 kame/sys/net/if_nemo.h
@@ -1,4 +1,4 @@
-/* $KAME: if_nemo.h,v 1.1 2004/12/09 02:18:58 t-momose Exp $ */
+/* $KAME: if_nemo.h,v 1.2 2005/04/14 06:22:38 suz Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -37,7 +37,7 @@
#define _NET_IF_GIF_H_
-#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || defined(__NetBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
#if defined(_KERNEL) && !defined(_LKM)
#include "opt_inet.h"
#include "opt_mip6.h"
@@ -49,7 +49,7 @@
struct encaptab;
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
extern void (*ng_nemo_input_p)(struct ifnet *ifp, struct mbuf **mp,
int af);
extern void (*ng_nemo_input_orphan_p)(struct ifnet *ifp, struct mbuf *m,
@@ -82,7 +82,7 @@ struct nemo_softc {
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
void *nemo_si; /* softintr handle */
#endif
-#if defined(__FreeBSD__) && __FreeBSD_version >= 500000
+#ifdef __FreeBSD__
void *nemo_netgraph; /* ng_nemo(4) netgraph node info */
#endif
@@ -110,11 +110,7 @@ void nemo_input __P((struct mbuf *, int, struct ifnet *));
#endif
int nemo_output __P((struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *));
-#if defined(__FreeBSD__) && __FreeBSD__ < 3
-int nemo_ioctl __P((struct ifnet *, int, caddr_t));
-#else
int nemo_ioctl __P((struct ifnet *, u_long, caddr_t));
-#endif
int nemo_set_tunnel __P((struct ifnet *, struct sockaddr *, struct sockaddr *));
void nemo_delete_tunnel __P((struct ifnet *));
#ifdef __OpenBSD__
View
11 kame/sys/net/if_pflog.c
@@ -129,13 +129,10 @@ pflogattach(int npflog)
for (i = 0; i < NPFLOG; i++) {
ifp = &pflogif[i].sc_if;
-#ifndef __FreeBSD__
- snprintf(ifp->if_xname, sizeof ifp->if_xname, "pflog%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version >= 502000
+#ifdef __FreeBSD__
if_initname(ifp, "pflog", i);
#else
- ifp->if_name = "pflog";
- ifp->if_unit = i;
+ snprintf(ifp->if_xname, sizeof ifp->if_xname, "pflog%d", i);
#endif
ifp->if_softc = &pflogif[i];
ifp->if_mtu = PFLOGMTU;
@@ -177,13 +174,13 @@ pflogstart(struct ifnet *ifp)
#else
s = splnet();
#endif
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
IFQ_LOCK(&ifp->if_snd);
#else
IF_DROP(&ifp->if_snd);
#endif
IF_DEQUEUE(&ifp->if_snd, m);
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
IFQ_UNLOCK(&ifp->if_snd);
#endif
splx(s);
View
13 kame/sys/net/if_pfsync.c
@@ -127,13 +127,10 @@ pfsyncattach(int npfsync)
pfsyncif.sc_ptr = NULL;
pfsyncif.sc_count = 8;
ifp = &pfsyncif.sc_if;
-#ifndef __FreeBSD__
- strlcpy(ifp->if_xname, "pfsync0", sizeof ifp->if_xname);
-#elif defined(__FreeBSD__) && __FreeBSD_version >= 502000
+#ifdef __FreeBSD__
if_initname(ifp, "pfsync", 0);
#else
- ifp->if_name = "pfsync";
- ifp->if_unit = 0;
+ strlcpy(ifp->if_xname, "pfsync0", sizeof ifp->if_xname);
#endif
ifp->if_softc = &pfsyncif;
ifp->if_ioctl = pfsyncioctl;
@@ -150,7 +147,7 @@ pfsyncattach(int npfsync)
pfsync_setmtu(&pfsyncif, MCLBYTES);
#ifdef __OpenBSD__
timeout_set(&pfsyncif.sc_tmo, pfsync_timeout, &pfsyncif);
-#elif defined(__FreeBSD__) && __FreeBSD__ >= 5
+#elif defined(__FreeBSD__)
callout_init(&pfsyncif.sc_tmo, 0);
#else
callout_init(&pfsyncif.sc_tmo);
@@ -185,13 +182,13 @@ pfsyncstart(struct ifnet *ifp)
#else
s = splnet();
#endif
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
IFQ_LOCK(&ifp->if_snd);
#else
IF_DROP(&ifp->if_snd);
#endif
IF_DEQUEUE(&ifp->if_snd, m);
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
IFQ_UNLOCK(&ifp->if_snd);
#endif
splx(s);
View
25 kame/sys/net/if_stf.c
@@ -1,4 +1,4 @@
-/* $KAME: if_stf.c,v 1.120 2005/02/02 12:35:57 suz Exp $ */
+/* $KAME: if_stf.c,v 1.121 2005/04/14 06:22:38 suz Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -179,7 +179,7 @@ extern struct domain inetdomain;
struct protosw in_stf_protosw =
{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR,
in_stf_input,
-#if defined(__FreeBSD__) && __FreeBSD_version >= 502010
+#ifdef __FreeBSD__
(pr_output_t *)rip_output,
#else
rip_output,
@@ -240,14 +240,11 @@ stfattach(dummy)
for (i = 0; i < nstf; i++) {
sc = &stf[i];
bzero(sc, sizeof(*sc));
-#if defined(__NetBSD__) || defined(__OpenBSD__)
- snprintf(sc->sc_if.if_xname, sizeof(sc->sc_if.if_xname),
- "stf%d", i);
-#elif defined(__FreeBSD__) && __FreeBSD_version > 501000
+#ifdef __FreeBSD__
if_initname(&sc->sc_if, "stf", i);
#else
- sc->sc_if.if_name = "stf";
- sc->sc_if.if_unit = i;
+ snprintf(sc->sc_if.if_xname, sizeof(sc->sc_if.if_xname),
+ "stf%d", i);
#endif
p = encap_attach_func(AF_INET, IPPROTO_IPV6, stf_encapcheck,
@@ -701,7 +698,7 @@ stf_output(ifp, m, dst, rt)
ifp->if_opackets++;
return ip_output(m, NULL, &sc->sc_ro, 0, NULL
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 480000)
+#ifdef __FreeBSD__
, NULL
#endif
);
@@ -889,7 +886,7 @@ in_stf_input(m, va_alist)
struct ip *ip;
struct ip6_hdr *ip6;
u_int8_t otos, itos;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
int s;
#endif
int isr;
@@ -1003,15 +1000,11 @@ in_stf_input(m, va_alist)
ifq = &ip6intrq;
isr = NETISR_IPV6;
-#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifdef __FreeBSD__
if (!IF_HANDOFF(ifq, m, NULL))
return;
#else
-#if defined(__NetBSD__) || defined(__OpenBSD__)
s = splnet();
-#else
- s = splimp();
-#endif
if (IF_QFULL(ifq)) {
IF_DROP(ifq); /* update statistics */
m_freem(m);
@@ -1024,7 +1017,7 @@ in_stf_input(m, va_alist)
schednetisr(isr);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_pkthdr.len;
-#if !(defined(__FreeBSD__) && __FreeBSD_version >= 500000)
+#ifndef __FreeBSD__
splx(s);
#endif
}
View
34 kame/sys/net/mipsock.c
@@ -1,4 +1,4 @@
-/* $Id: mipsock.c,v 1.10 2005/03/10 23:30:36 t-momose Exp $ */
+/* $Id: mipsock.c,v 1.11 2005/04/14 06:22:38 suz Exp $ */
/*
* Copyright (C) 2004 WIDE Project.
@@ -29,9 +29,9 @@
* SUCH DAMAGE.
*/
-#if __FreeBSD__ >= 3
+#ifdef __FreeBSD__
#include "opt_mip6.h"
-#endif
+#endif /* __FreeBSD__ */
#include "mip.h"
#include <sys/param.h>
@@ -74,19 +74,11 @@ static struct sockproto mips_proto = { PF_MOBILITY, };
#ifdef __FreeBSD__
static int mips_abort(struct socket *);
-#if __FreeBSD_version >= 503000
static int mips_attach(struct socket *, int, struct thread *);
static int mips_bind(struct socket *, struct sockaddr *, struct thread *);
static int mips_connect(struct socket *, struct sockaddr *, struct thread *);
static int mips_send(struct socket *, int, struct mbuf *, struct sockaddr *,
struct mbuf *, struct thread *);
-#else /* __FreeBSD_version >= 503000 */
-static int mips_attach(struct socket *, int, struct proc *);
-static int mips_bind(struct socket *, struct sockaddr *, struct proc *);
-static int mips_connect(struct socket *, struct sockaddr *, struct proc *);
-static int mips_send(struct socket *, int, struct mbuf *, struct sockaddr *,
- struct mbuf *, struct proc *);
-#endif /* __FreeBSD_version >= 503000 */
static int mips_detach(struct socket *);
static int mips_disconnect(struct socket *);
static int mips_peeraddr(struct socket *, struct sockaddr **);
@@ -128,11 +120,7 @@ static int
mips_attach(so, proto, p)
struct socket *so;
int proto;
-#if __FreeBSD_version >= 503000
struct thread *p;
-#else
- struct proc *p;
-#endif
{