summaryrefslogtreecommitdiffstats
path: root/sys/net/net_osdep.h
diff options
context:
space:
mode:
authoritojun <itojun@FreeBSD.org>2000-07-04 16:35:15 +0000
committeritojun <itojun@FreeBSD.org>2000-07-04 16:35:15 +0000
commit5f4e854de19331a53788d6100bbcd42845056bc1 (patch)
tree3ff8c876a5868b103fb8713055d83e29a3fa38d5 /sys/net/net_osdep.h
parentbdc16885232d771a99d7dfc247cd27a44cd061f9 (diff)
downloadFreeBSD-src-5f4e854de19331a53788d6100bbcd42845056bc1.zip
FreeBSD-src-5f4e854de19331a53788d6100bbcd42845056bc1.tar.gz
sync with kame tree as of july00. tons of bug fixes/improvements.
API changes: - additional IPv6 ioctls - IPsec PF_KEY API was changed, it is mandatory to upgrade setkey(8). (also syntax change)
Diffstat (limited to 'sys/net/net_osdep.h')
-rw-r--r--sys/net/net_osdep.h56
1 files changed, 50 insertions, 6 deletions
diff --git a/sys/net/net_osdep.h b/sys/net/net_osdep.h
index 11fc27c..47f5216 100644
--- a/sys/net/net_osdep.h
+++ b/sys/net/net_osdep.h
@@ -1,3 +1,6 @@
+/* $FreeBSD$ */
+/* $KAME: net_osdep.h,v 1.21 2000/07/02 23:34:38 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -25,8 +28,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
/*
* glue for kernel code programming differences.
@@ -35,11 +36,25 @@
/*
* OS dependencies:
*
+ * - struct rt_addrinfo
+ * all *BSDs except bsdi4 only have two members; rti_addrs and rti_info[].
+ * bsdi4 has additional members; rti_flags, rti_ifa, rti_ifp, and rti_rtm.
+ *
+ * - side effects of rtrequest[1](RTM_DELETE)
+ * BSDI[34]: delete all cloned routes underneath the route.
+ * FreeBSD[234]: delete all protocol-cloned routes underneath the route.
+ * note that cloned routes from an interface direct route
+ * still remain.
+ * NetBSD, OpenBSD: no side effects.
* - privileged process
* NetBSD, FreeBSD 3
* struct proc *p;
* if (p && !suser(p->p_ucred, &p->p_acflag))
* privileged;
+ * FreeBSD 4
+ * struct proc *p;
+ * if (p && !suser(p))
+ * privileged;
* OpenBSD, BSDI [34], FreeBSD 2
* struct socket *so;
* if (so->so_state & SS_PRIV)
@@ -76,7 +91,7 @@
* NetBSD, OpenBSD, BSDI [34], FreeBSD 2
* timeout() is a void function
* FreeBSD 3
- * timeout() is non-void, must keep returned value for untimeuot()
+ * timeout() is non-void, must keep returned value for untimeout()
* - sysctl
* NetBSD, OpenBSD
* foo_sysctl()
@@ -106,16 +121,45 @@
*
* - dtom()
* NEVER USE IT!
+ *
+ * - struct ifnet for loopback interface
+ * BSDI3: struct ifnet loif;
+ * BSDI4: struct ifnet *loifp;
+ * NetBSD, OpenBSD, FreeBSD2: struct ifnet loif[NLOOP];
+ *
+ * odd thing is that many of them refers loif as ifnet *loif,
+ * not loif[NLOOP], from outside of if_loop.c.
+ *
+ * - number of bpf pseudo devices
+ * others: bpfilter.h, NBPFILTER
+ * FreeBSD4: bpf.h, NBPF
+ * solution:
+ * #if defined(__FreeBSD__) && __FreeBSD__ >= 4
+ * #include "bpf.h"
+ * #define NBPFILTER NBPF
+ * #else
+ * #include "bpfilter.h"
+ * #endif
+ *
+ * - protosw for IPv4 (sys/netinet)
+ * FreeBSD4: struct ipprotosw in netinet/ipprotosw.h
+ * others: struct protosw in sys/protosw.h
+ *
+ * - header files with defopt (opt_xx.h)
+ * FreeBSD3: opt_{inet,ipsec,ip6fw,altq}.h
+ * FreeBSD4: opt_{inet,inet6,ipsec,ip6fw,altq}.h
+ * NetBSD: opt_{inet,ipsec,altq}.h
+ * others: does not use defopt
*/
#ifndef __NET_NET_OSDEP_H_DEFINED_
-#define __NET_NET_OSDEP_H_DEFINED_
+#define __NET_NET_OSDEP_H_DEFINED_
#ifdef _KERNEL
struct ifnet;
-extern const char *if_name __P((struct ifnet *));
+extern const char *if_name __P((struct ifnet *));
-#define HAVE_OLD_BPF
+#define HAVE_OLD_BPF
#endif /*_KERNEL*/
#endif /*__NET_NET_OSDEP_H_DEFINED_ */
OpenPOWER on IntegriCloud