Deleted Added
full compact
ifq.h (123220) ifq.h (126264)
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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * From: @(#)if.h 8.1 (Berkeley) 6/10/93
34 * $FreeBSD: head/sys/net/if_var.h 123220 2003-12-07 05:49:21Z imp $
34 * $FreeBSD: head/sys/net/if_var.h 126264 2004-02-26 04:27:55Z mlaier $
35 */
36
37#ifndef _NET_IF_VAR_H_
38#define _NET_IF_VAR_H_
39
40/*
41 * Structures defining a network interface, providing a packet
42 * transport mechanism (ala level 0 of the PUP protocols).

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

73struct socket;
74struct ether_header;
75#endif
76
77#include <sys/queue.h> /* get TAILQ macros */
78
79#ifdef _KERNEL
80#include <sys/mbuf.h>
35 */
36
37#ifndef _NET_IF_VAR_H_
38#define _NET_IF_VAR_H_
39
40/*
41 * Structures defining a network interface, providing a packet
42 * transport mechanism (ala level 0 of the PUP protocols).

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

73struct socket;
74struct ether_header;
75#endif
76
77#include <sys/queue.h> /* get TAILQ macros */
78
79#ifdef _KERNEL
80#include <sys/mbuf.h>
81#include <sys/eventhandler.h>
81#endif /* _KERNEL */
82#include <sys/lock.h> /* XXX */
83#include <sys/mutex.h> /* XXX */
84#include <sys/event.h> /* XXX */
85
86#define IF_DUNIT_NONE -1
87
88TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */

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

288 if (m == NULL) \
289 break; \
290 m_freem(m); \
291 } \
292 IF_UNLOCK(ifq); \
293} while (0)
294
295#ifdef _KERNEL
82#endif /* _KERNEL */
83#include <sys/lock.h> /* XXX */
84#include <sys/mutex.h> /* XXX */
85#include <sys/event.h> /* XXX */
86
87#define IF_DUNIT_NONE -1
88
89TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */

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

289 if (m == NULL) \
290 break; \
291 m_freem(m); \
292 } \
293 IF_UNLOCK(ifq); \
294} while (0)
295
296#ifdef _KERNEL
297/* interface address change event */
298typedef void (*ifaddr_event_handler_t)(void *, struct ifnet *);
299EVENTHANDLER_DECLARE(ifaddr_event, ifaddr_event_handler_t);
300/* new interface arrival event */
301typedef void (*ifnet_arrival_event_handler_t)(void *, struct ifnet *);
302EVENTHANDLER_DECLARE(ifnet_arrival_event, ifnet_arrival_event_handler_t);
303/* interface departure event */
304typedef void (*ifnet_departure_event_handler_t)(void *, struct ifnet *);
305EVENTHANDLER_DECLARE(ifnet_departure_event, ifnet_departure_event_handler_t);
306/* interface clone event */
307typedef void (*if_clone_event_handler_t)(void *, struct if_clone *);
308EVENTHANDLER_DECLARE(if_clone_event, if_clone_event_handler_t);
309
296#define IF_AFDATA_LOCK_INIT(ifp) \
297 mtx_init(&(ifp)->if_afdata_mtx, "if_afdata", NULL, MTX_DEF)
298#define IF_AFDATA_LOCK(ifp) mtx_lock(&(ifp)->if_afdata_mtx)
299#define IF_AFDATA_TRYLOCK(ifp) mtx_trylock(&(ifp)->if_afdata_mtx)
300#define IF_AFDATA_UNLOCK(ifp) mtx_unlock(&(ifp)->if_afdata_mtx)
301#define IF_AFDATA_DESTROY(ifp) mtx_destroy(&(ifp)->if_afdata_mtx)
302
303#define IF_HANDOFF(ifq, m, ifp) if_handoff(ifq, m, ifp, 0)

--- 200 unchanged lines hidden ---
310#define IF_AFDATA_LOCK_INIT(ifp) \
311 mtx_init(&(ifp)->if_afdata_mtx, "if_afdata", NULL, MTX_DEF)
312#define IF_AFDATA_LOCK(ifp) mtx_lock(&(ifp)->if_afdata_mtx)
313#define IF_AFDATA_TRYLOCK(ifp) mtx_trylock(&(ifp)->if_afdata_mtx)
314#define IF_AFDATA_UNLOCK(ifp) mtx_unlock(&(ifp)->if_afdata_mtx)
315#define IF_AFDATA_DESTROY(ifp) mtx_destroy(&(ifp)->if_afdata_mtx)
316
317#define IF_HANDOFF(ifq, m, ifp) if_handoff(ifq, m, ifp, 0)

--- 200 unchanged lines hidden ---