2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the project nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * glue for kernel code programming differences.
38 * - privileged process
41 * if (p && !suser(p->p_ucred, &p->p_acflag))
43 * OpenBSD, BSDI [34], FreeBSD 2
45 * if (so->so_state & SS_PRIV)
49 * needs to give struct proc * as argument
50 * OpenBSD, BSDI [34], FreeBSD 2
51 * do not need struct proc *
53 * OpenBSD, NetBSD, BSDI [34]
54 * need caddr_t * (= if_bpf **) and struct ifnet *
55 * FreeBSD 2, FreeBSD 3
56 * need only struct ifnet * as argument
58 * use queue.h? member names if name
60 * FreeBSD 2 no old standard if_name+unit
61 * FreeBSD 3 yes strange if_name+unit
62 * OpenBSD yes standard if_xname
63 * NetBSD yes standard if_xname
64 * BSDI [34] no old standard if_name+unit
66 * NetBSD, OpenBSD, BSDI [34], FreeBSD 2
67 * single function with PRU_xx, arguments are mbuf
69 * separates functions, non-mbuf arguments
71 * NetBSD, OpenBSD, BSDI [34], FreeBSD 2
72 * manipulation based on mbuf
74 * non-mbuf manipulation using sooptcopy{in,out}()
75 * - timeout() and untimeout()
76 * NetBSD, OpenBSD, BSDI [34], FreeBSD 2
77 * timeout() is a void function
79 * timeout() is non-void, must keep returned value for untimeuot()
84 * foo_sysctl() but with different style
85 * FreeBSD 2, FreeBSD 3
89 * NetBSD, FreeBSD 3, BSDI [34]
90 * 2nd argument is u_long cmd
92 * 2nd argument is int cmd
93 * - if attach routines
96 * FreeBSD 2, FreeBSD 3
97 * void xxattach(void *);
98 * PSEUDO_SET(xxattach, if_xx);
101 * in NetBSD 1.4 or later, ovbcopy() is not supplied in the kernel.
102 * bcopy() is safe against overwrites.
104 * NetBSD 1.4 or later requires splsoftnet().
105 * other operating systems use splnet().
111 #ifndef __NET_NET_OSDEP_H_DEFINED_
112 #define __NET_NET_OSDEP_H_DEFINED_
116 extern const char *if_name __P((struct ifnet *));
121 #endif /*__NET_NET_OSDEP_H_DEFINED_ */