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 241686 2012-10-18 13:57:24Z andre $ |
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). --- 230 unchanged lines hidden (view full) --- 269void if_addr_runlock(struct ifnet *ifp); /* if_addrhead */ 270void if_maddr_rlock(struct ifnet *ifp); /* if_multiaddrs */ 271void if_maddr_runlock(struct ifnet *ifp); /* if_multiaddrs */ 272 273/* 274 * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) 275 * are queues of messages stored on ifqueue structures 276 * (defined above). Entries are added to and deleted from these structures |
277 * by these macros. |
278 */ 279#define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx) 280#define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx) 281#define IF_LOCK_ASSERT(ifq) mtx_assert(&(ifq)->ifq_mtx, MA_OWNED) 282#define _IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen) 283#define _IF_DROP(ifq) ((ifq)->ifq_drops++) 284#define _IF_QLEN(ifq) ((ifq)->ifq_len) 285 --- 629 unchanged lines hidden --- |