if_var.h (130933) | if_var.h (132152) |
---|---|
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 130933 2004-06-22 20:13:25Z brooks $ | 30 * $FreeBSD: head/sys/net/if_var.h 132152 2004-07-14 13:31:41Z mlaier $ |
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). --- 468 unchanged lines hidden (view full) --- 507 } \ 508 IFQ_UNLOCK(ifq); \ 509 } \ 510} while (0) 511 512#define IFQ_DRV_PREPEND(ifq, m) \ 513do { \ 514 (m)->m_nextpkt = (ifq)->ifq_drv_head; \ | 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). --- 468 unchanged lines hidden (view full) --- 507 } \ 508 IFQ_UNLOCK(ifq); \ 509 } \ 510} while (0) 511 512#define IFQ_DRV_PREPEND(ifq, m) \ 513do { \ 514 (m)->m_nextpkt = (ifq)->ifq_drv_head; \ |
515 if ((ifq)->ifq_tail == NULL) \ 516 (ifq)->ifq_tail = (m); \ | 515 if ((ifq)->ifq_drv_tail == NULL) \ 516 (ifq)->ifq_drv_tail = (m); \ |
517 (ifq)->ifq_drv_head = (m); \ 518 (ifq)->ifq_drv_len++; \ 519} while (0) 520 521#define IFQ_DRV_IS_EMPTY(ifq) \ 522 (((ifq)->ifq_drv_len == 0) && ((ifq)->ifq_len == 0)) 523 524#define IFQ_DRV_PURGE(ifq) \ 525do { \ | 517 (ifq)->ifq_drv_head = (m); \ 518 (ifq)->ifq_drv_len++; \ 519} while (0) 520 521#define IFQ_DRV_IS_EMPTY(ifq) \ 522 (((ifq)->ifq_drv_len == 0) && ((ifq)->ifq_len == 0)) 523 524#define IFQ_DRV_PURGE(ifq) \ 525do { \ |
526 struct mbuf *m = (ifq)->ifq_drv_head; \ 527 while(m != NULL) { \ 528 m = m->m_nextpkt; \ | 526 struct mbuf *m, *n = (ifq)->ifq_drv_head; \ 527 while((m = n) != NULL) { \ 528 n = m->m_nextpkt; \ |
529 m_freem(m); \ 530 } \ 531 (ifq)->ifq_drv_head = (ifq)->ifq_drv_tail = NULL; \ 532 (ifq)->ifq_drv_len = 0; \ 533 IFQ_PURGE(ifq); \ 534} while (0) 535 536/* --- 162 unchanged lines hidden --- | 529 m_freem(m); \ 530 } \ 531 (ifq)->ifq_drv_head = (ifq)->ifq_drv_tail = NULL; \ 532 (ifq)->ifq_drv_len = 0; \ 533 IFQ_PURGE(ifq); \ 534} while (0) 535 536/* --- 162 unchanged lines hidden --- |