Deleted Added
full compact
if_var.h (148265) if_var.h (148640)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

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
27 * SUCH DAMAGE.
28 *
29 * From: @(#)if.h 8.1 (Berkeley) 6/10/93
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

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
27 * SUCH DAMAGE.
28 *
29 * From: @(#)if.h 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/net/if_var.h 148265 2005-07-21 22:01:06Z rwatson $
30 * $FreeBSD: head/sys/net/if_var.h 148640 2005-08-02 17:43:35Z rwatson $
31 */
32
33#ifndef _NET_IF_VAR_H_
34#define _NET_IF_VAR_H_
35
36/*
37 * Structures defining a network interface, providing a packet
38 * transport mechanism (ala level 0 of the PUP protocols).

--- 135 unchanged lines hidden (view full) ---

174
175 /* these are only used by IPv6 */
176 struct ifprefixhead if_prefixhead; /* list of prefixes per if */
177 void *if_afdata[AF_MAX];
178 int if_afdata_initialized;
179 struct mtx if_afdata_mtx;
180 struct task if_starttask; /* task for IFF_NEEDSGIANT */
181 struct task if_linktask; /* task for link change events */
31 */
32
33#ifndef _NET_IF_VAR_H_
34#define _NET_IF_VAR_H_
35
36/*
37 * Structures defining a network interface, providing a packet
38 * transport mechanism (ala level 0 of the PUP protocols).

--- 135 unchanged lines hidden (view full) ---

174
175 /* these are only used by IPv6 */
176 struct ifprefixhead if_prefixhead; /* list of prefixes per if */
177 void *if_afdata[AF_MAX];
178 int if_afdata_initialized;
179 struct mtx if_afdata_mtx;
180 struct task if_starttask; /* task for IFF_NEEDSGIANT */
181 struct task if_linktask; /* task for link change events */
182 struct mtx if_addr_mtx; /* mutex to protect address lists */
182};
183
184typedef void if_init_f_t(void *);
185
186/*
187 * XXX These aliases are terribly dangerous because they could apply
188 * to anything.
189 */

--- 22 unchanged lines hidden (view full) ---

212#define if_xmitquota if_data.ifi_xmitquota
213#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)NULL)
214
215/* for compatibility with other BSDs */
216#define if_addrlist if_addrhead
217#define if_list if_link
218
219/*
183};
184
185typedef void if_init_f_t(void *);
186
187/*
188 * XXX These aliases are terribly dangerous because they could apply
189 * to anything.
190 */

--- 22 unchanged lines hidden (view full) ---

213#define if_xmitquota if_data.ifi_xmitquota
214#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)NULL)
215
216/* for compatibility with other BSDs */
217#define if_addrlist if_addrhead
218#define if_list if_link
219
220/*
221 * Locks for address lists on the network interface.
222 */
223#define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_mtx, \
224 "if_addr_mtx", NULL, MTX_DEF)
225#define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_mtx)
226#define IF_ADDR_LOCK(if) mtx_lock(&(if)->if_addr_mtx)
227#define IF_ADDR_UNLOCK(if) mtx_unlock(&(if)->if_addr_mtx)
228#define IF_ADDR_LOCK_ASSERT(if) mtx_assert(&(if)->if_addr_mtx, MA_OWNED)
229
230/*
220 * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq)
221 * are queues of messages stored on ifqueue structures
222 * (defined above). Entries are added to and deleted from these structures
223 * by these macros, which should be called with ipl raised to splimp().
224 */
225#define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx)
226#define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx)
227#define IF_LOCK_ASSERT(ifq) mtx_assert(&(ifq)->ifq_mtx, MA_OWNED)

--- 431 unchanged lines hidden ---
231 * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq)
232 * are queues of messages stored on ifqueue structures
233 * (defined above). Entries are added to and deleted from these structures
234 * by these macros, which should be called with ipl raised to splimp().
235 */
236#define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx)
237#define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx)
238#define IF_LOCK_ASSERT(ifq) mtx_assert(&(ifq)->ifq_mtx, MA_OWNED)

--- 431 unchanged lines hidden ---