diff options
author | suz <suz@FreeBSD.org> | 2002-04-19 04:46:24 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2002-04-19 04:46:24 +0000 |
commit | 553226e8e16639b00d61d81e0125330dbfb7eed8 (patch) | |
tree | 100274bd96d0c95cafbe1a4a5961b54fc403fd47 /sys/net | |
parent | ae841d33c320c4185ecaa0e982c744039b1ba10f (diff) | |
download | FreeBSD-src-553226e8e16639b00d61d81e0125330dbfb7eed8.zip FreeBSD-src-553226e8e16639b00d61d81e0125330dbfb7eed8.tar.gz |
just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128)
Reviewed by: ume
MFC after: 1 week
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 2 | ||||
-rw-r--r-- | sys/net/if_faith.c | 2 | ||||
-rw-r--r-- | sys/net/if_gif.c | 13 | ||||
-rw-r--r-- | sys/net/if_stf.c | 2 | ||||
-rw-r--r-- | sys/net/if_stf.h | 2 | ||||
-rw-r--r-- | sys/net/net_osdep.c | 2 | ||||
-rw-r--r-- | sys/net/net_osdep.h | 75 | ||||
-rw-r--r-- | sys/net/radix.c | 2 |
8 files changed, 78 insertions, 22 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 27279c3..8fc94e7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1486,7 +1486,7 @@ ifioctl(so, cmd, data, td) if ((oif_flags ^ ifp->if_flags) & IFF_UP) { #ifdef INET6 - DELAY(100);/* XXX: temporal workaround for fxp issue*/ + DELAY(100);/* XXX: temporary workaround for fxp issue*/ if (ifp->if_flags & IFF_UP) { int s = splimp(); in6_if_up(ifp); diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index 2359157..a37d9d4 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -1,4 +1,4 @@ -/* $KAME: if_faith.c,v 1.21 2001/02/20 07:59:26 itojun Exp $ */ +/* $KAME: if_faith.c,v 1.23 2001/12/17 13:55:29 sumikawa Exp $ */ /* * Copyright (c) 1982, 1986, 1993 diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index aa8b96a..6af98ce 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: if_gif.c,v 1.47 2001/05/01 05:28:42 itojun Exp $ */ +/* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -129,7 +129,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTLFLAG_RW, 0, * Since, setting a large value to this macro with a careless configuration * may introduce system crash, we don't allow any nestings by default. * If you need to configure nested gif tunnels, you can define this macro - * in your kernel configuration file. However, if you do so, please be + * in your kernel configuration file. However, if you do so, please be * careful to configure the tunnels so that it won't make a loop. */ #define MAX_GIF_NEST 1 @@ -459,13 +459,12 @@ gif_input(m, af, gifp) * Put the packet to the network layer input queue according to the * specified address family. * Note: older versions of gif_input directly called network layer - * input functions, e.g. ip6_input, here. We changed the policy to + * input functions, e.g. ip6_input, here. We changed the policy to * prevent too many recursive calls of such input functions, which - * might cause kernel panic. But the change may introduce another + * might cause kernel panic. But the change may introduce another * problem; if the input queue is full, packets are discarded. - * We believed it rarely occurs and changed the policy. If we find - * it occurs more times than we thought, we may change the policy - * again. + * The kernel stack overflow really happened, and we believed + * queue-full rarely occurs, so we changed the policy. */ switch (af) { #ifdef INET diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index 0c45f43..99ff838 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */ +/* $KAME: if_stf.c,v 1.73 2001/12/03 11:08:30 keiichi Exp $ */ /* * Copyright (C) 2000 WIDE Project. diff --git a/sys/net/if_stf.h b/sys/net/if_stf.h index 998133c..07d3d57 100644 --- a/sys/net/if_stf.h +++ b/sys/net/if_stf.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: if_stf.h,v 1.3 2000/03/25 07:23:33 sumikawa Exp $ */ +/* $KAME: if_stf.h,v 1.5 2001/10/12 10:09:17 keiichi Exp $ */ /* * Copyright (C) 2000 WIDE Project. diff --git a/sys/net/net_osdep.c b/sys/net/net_osdep.c index 3ce162fb..a035bae 100644 --- a/sys/net/net_osdep.c +++ b/sys/net/net_osdep.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: net_osdep.c,v 1.10 2001/07/26 19:08:37 itojun Exp $ */ +/* $KAME: net_osdep.c,v 1.9 2001/04/06 09:22:05 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h index a5ff633..5669275 100644 --- a/sys/net/net_osdep.h +++ b/sys/net/net_osdep.h @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: net_osdep.h,v 1.44 2001/05/16 03:13:40 jinmei Exp $ */ +/* $KAME: net_osdep.h,v 1.68 2001/12/21 08:14:58 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -35,16 +35,28 @@ /* * OS dependencies: + * - ioctl + * FreeBSD 3 and later warn when sys/ioctl.h is included in a kernel source + * file. For socket ioctl, we are suggested to use sys/sockio.h. + * + * - RTFREE() + * bsdi does not escape this macro using do-clause, so it is recommended + * to escape the macro explicitly. + * e.g. + * if (rt) { + * RTFREE(rt); + * } * * - whether the IPv4 input routine convert the byte order of some fileds * of the IP header (x: convert to the host byte order, s: strip the header * length for possible reassembly) - * ip_len ip_id ip_off - * bsdi3: xs x x - * bsdi4: xs x - * FreeBSD: xs x - * NetBSD: x x - * OpenBSD: xs x x + * ip_len ip_id ip_off + * bsdi3: xs x x + * bsdi4: xs x + * freebsd[23]: xs x x + * freebsd4: xs x + * NetBSD: x x + * OpenBSD: xs x x * * - ifa_ifwithaf() * bsdi[34], netbsd, and openbsd define it in sys/net/if.c @@ -131,6 +143,14 @@ * OpenBSD 2.8 * timeout_{add,set,del} is encouraged (sys/timeout.h) * + * - kernel internal time structure + * FreeBSD 2, NetBSD, OpenBSD, BSD/OS + * mono_time.tv_u?sec, time.tv_u?sec + * FreeBSD [34] + * time_second + * if you need portability, #ifdef out FreeBSD[34], or use microtime(&tv) + * then touch tv.tv_sec (note: microtime is an expensive operation). + * * - sysctl * NetBSD, OpenBSD * foo_sysctl() @@ -167,12 +187,16 @@ * * - ovbcopy() * in NetBSD 1.4 or later, ovbcopy() is not supplied in the kernel. - * bcopy() is safe against overwrites. + * we have updated sys/systm.h to include declaration. * * - splnet() * NetBSD 1.4 or later requires splsoftnet(). * other operating systems use splnet(). * + * - splimp() + * NetBSD-current (2001/4/13): use splnet() in network, splvm() in vm. + * other operating systems: use splimp(). + * * - dtom() * NEVER USE IT! * @@ -231,7 +255,40 @@ * others: do not increase refcnt for ifp->if_addrlist and in_ifaddr. * use IFAFREE once when ifaddr is disconnected from * ifp->if_addrlist and in_ifaddr. IFAFREE frees ifaddr when - * ifa_refcnt goes negative. + * ifa_refcnt goes negative. in KAME environment, IFAREF is + * provided as a compatibility wrapper (use it instead of + * ifa_refcnt++ to reduce #ifdef). + * + * - ifnet.if_lastchange + * freebsd, bsdi, netbsd-current (jun 14 2001-), + * openbsd-current (jun 15 2001-): updated only when IFF_UP changes. + * (RFC1573 ifLastChange interpretation) + * netbsd151, openbsd29: updated whenever packets go through the interface. + * (4.4BSD interpretation) + * + * - kernel compilation options ("options HOGE" in kernel config file) + * freebsd4: sys/conf/options has to have mapping between option + * and a header file (opt_hoge.h). + * netbsd: by default, -DHOGE will go into + * sys/arch/foo/compile/BAR/Makefile. + * if you define mapping in sys/conf/files, you can create + * a header file like opt_hoge.h to help make dependencies. + * bsdi/openbsd: always use -DHOGE in Makefile. there's no need/way + * to have opt_hoge.h. + * + * therefore, opt_hoge.h is mandatory on freebsd4 only. + * + * - MALLOC() macro + * Use it only if the size of the allocation is constant. + * When we do NOT collect statistics about kernel memory usage, the result + * of macro expansion contains a large set of condition branches. If the + * size is not constant, compilation optimization cannot be applied, and + * a bunch of the large branch will be embedded in the kernel code. + * + * - M_COPY_PKTHDR + * openbsd30: M_COPY_PKTHDR is deprecated. use M_MOVE_PKTHDR or + * M_DUP_PKTHDR, depending on how you want to handle m_tag. + * others: M_COPY_PKTHDR is available as usual. */ #ifndef __NET_NET_OSDEP_H_DEFINED_ diff --git a/sys/net/radix.c b/sys/net/radix.c index adbb2c2..6d4412e 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -673,7 +673,7 @@ on2: mmask = m->rm_leaf->rn_mask; if (tt->rn_flags & RNF_NORMAL) { log(LOG_ERR, - "Non-unique normal route, mask not entered"); + "Non-unique normal route, mask not entered\n"); return tt; } } else |