Deleted Added
full compact
if_var.h (186199) if_var.h (186207)
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 186199 2008-12-17 00:11:56Z kmacy $
30 * $FreeBSD: head/sys/net/if_var.h 186207 2008-12-17 04:00:43Z kmacy $
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).

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

72struct ifvlantrunk;
73#endif
74
75#include <sys/queue.h> /* get TAILQ macros */
76
77#ifdef _KERNEL
78#include <sys/mbuf.h>
79#include <sys/eventhandler.h>
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).

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

72struct ifvlantrunk;
73#endif
74
75#include <sys/queue.h> /* get TAILQ macros */
76
77#ifdef _KERNEL
78#include <sys/mbuf.h>
79#include <sys/eventhandler.h>
80#include <sys/buf_ring.h>
80#endif /* _KERNEL */
81#include <sys/lock.h> /* XXX */
82#include <sys/mutex.h> /* XXX */
83#include <sys/rwlock.h> /* XXX */
84#include <sys/event.h> /* XXX */
85#include <sys/_task.h>
86
87#define IF_DUNIT_NONE -1

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

543 n = m->m_nextpkt; \
544 m_freem(m); \
545 } \
546 (ifq)->ifq_drv_head = (ifq)->ifq_drv_tail = NULL; \
547 (ifq)->ifq_drv_len = 0; \
548 IFQ_PURGE(ifq); \
549} while (0)
550
81#endif /* _KERNEL */
82#include <sys/lock.h> /* XXX */
83#include <sys/mutex.h> /* XXX */
84#include <sys/rwlock.h> /* XXX */
85#include <sys/event.h> /* XXX */
86#include <sys/_task.h>
87
88#define IF_DUNIT_NONE -1

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

544 n = m->m_nextpkt; \
545 m_freem(m); \
546 } \
547 (ifq)->ifq_drv_head = (ifq)->ifq_drv_tail = NULL; \
548 (ifq)->ifq_drv_len = 0; \
549 IFQ_PURGE(ifq); \
550} while (0)
551
552#ifdef _KERNEL
553static __inline int
554drbr_enqueue(struct buf_ring *br, struct mbuf *m)
555{
556 int error = 0;
557
558 if ((error = buf_ring_enqueue(br, m)) == ENOBUFS) {
559 br->br_drops++;
560 m_freem(m);
561 }
562
563 return (error);
564}
565
566static __inline void
567drbr_free(struct buf_ring *br, struct malloc_type *type)
568{
569 struct mbuf *m;
570
571 while ((m = buf_ring_dequeue_sc(br)) != NULL)
572 m_freem(m);
573
574 buf_ring_free(br, type);
575}
576#endif
577
551/*
552 * 72 was chosen below because it is the size of a TCP/IP
553 * header (40) + the minimum mss (32).
554 */
555#define IF_MINMTU 72
556#define IF_MAXMTU 65535
557
558#endif /* _KERNEL */

--- 177 unchanged lines hidden ---
578/*
579 * 72 was chosen below because it is the size of a TCP/IP
580 * header (40) + the minimum mss (32).
581 */
582#define IF_MINMTU 72
583#define IF_MAXMTU 65535
584
585#endif /* _KERNEL */

--- 177 unchanged lines hidden ---