Deleted Added
full compact
if_var.h (108172) if_var.h (108298)
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 108172 2002-12-22 05:35:03Z hsu $
34 * $FreeBSD: head/sys/net/if_var.h 108298 2002-12-27 00:24:35Z hsu $
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).

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

406#define IFAREF(ifa) \
407 do { \
408 IFA_LOCK(ifa); \
409 ++(ifa)->ifa_refcnt; \
410 IFA_UNLOCK(ifa); \
411 } while (0)
412
413extern struct mtx ifnet_lock;
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).

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

406#define IFAREF(ifa) \
407 do { \
408 IFA_LOCK(ifa); \
409 ++(ifa)->ifa_refcnt; \
410 IFA_UNLOCK(ifa); \
411 } while (0)
412
413extern struct mtx ifnet_lock;
414#define IFNET_LOCK_INIT() mtx_init(&ifnet_lock, "ifnet", NULL, MTX_DEF)
414#define IFNET_LOCK_INIT() \
415 mtx_init(&ifnet_lock, "ifnet", NULL, MTX_DEF | MTX_RECURSE)
415#define IFNET_WLOCK() mtx_lock(&ifnet_lock)
416#define IFNET_WUNLOCK() mtx_unlock(&ifnet_lock)
417#define IFNET_RLOCK() IFNET_WLOCK()
418#define IFNET_RUNLOCK() IFNET_WUNLOCK()
419
420struct ifindex_entry {
421 struct ifnet *ife_ifnet;
422 struct ifaddr *ife_ifnet_addr;

--- 66 unchanged lines hidden ---
416#define IFNET_WLOCK() mtx_lock(&ifnet_lock)
417#define IFNET_WUNLOCK() mtx_unlock(&ifnet_lock)
418#define IFNET_RLOCK() IFNET_WLOCK()
419#define IFNET_RUNLOCK() IFNET_WUNLOCK()
420
421struct ifindex_entry {
422 struct ifnet *ife_ifnet;
423 struct ifaddr *ife_ifnet_addr;

--- 66 unchanged lines hidden ---