if.h (128871) | if.h (130933) |
---|---|
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 * @(#)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 * @(#)if.h 8.1 (Berkeley) 6/10/93 |
30 * $FreeBSD: head/sys/net/if.h 128871 2004-05-03 13:48:35Z andre $ | 30 * $FreeBSD: head/sys/net/if.h 130933 2004-06-22 20:13:25Z brooks $ |
31 */ 32 33#ifndef _NET_IF_H_ 34#define _NET_IF_H_ 35 36#include <sys/cdefs.h> 37 38#ifdef _KERNEL --- 16 unchanged lines hidden (view full) --- 55 * Length of interface external name, including terminating '\0'. 56 * Note: this is the same size as a generic device's external name. 57 */ 58#define IF_NAMESIZE 16 59#if __BSD_VISIBLE 60#define IFNAMSIZ IF_NAMESIZE 61#define IF_MAXUNIT 0x7fff /* historical value */ 62#endif | 31 */ 32 33#ifndef _NET_IF_H_ 34#define _NET_IF_H_ 35 36#include <sys/cdefs.h> 37 38#ifdef _KERNEL --- 16 unchanged lines hidden (view full) --- 55 * Length of interface external name, including terminating '\0'. 56 * Note: this is the same size as a generic device's external name. 57 */ 58#define IF_NAMESIZE 16 59#if __BSD_VISIBLE 60#define IFNAMSIZ IF_NAMESIZE 61#define IF_MAXUNIT 0x7fff /* historical value */ 62#endif |
63 64#ifdef _KERNEL 65/* 66 * Structure describing a `cloning' interface. 67 */ 68struct if_clone { 69 LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */ 70 const char *ifc_name; /* name of device, e.g. `gif' */ 71 size_t ifc_namelen; /* length of name */ 72 int ifc_minifs; /* minimum number of interfaces */ 73 int ifc_maxunit; /* maximum unit number */ 74 unsigned char *ifc_units; /* bitmap to handle units */ 75 int ifc_bmlen; /* bitmap length */ 76 77 int (*ifc_create)(struct if_clone *, int); 78 void (*ifc_destroy)(struct ifnet *); 79}; 80 81#define IF_CLONE_INITIALIZER(name, create, destroy, minifs, maxunit) \ 82 { { 0 }, name, sizeof(name) - 1, minifs, maxunit, NULL, 0, create, destroy } 83#endif 84 | |
85#if __BSD_VISIBLE 86 87/* 88 * Structure used to query names of interface cloners. 89 */ 90 91struct if_clonereq { 92 int ifcr_total; /* total cloners (out) */ --- 281 unchanged lines hidden --- | 63#if __BSD_VISIBLE 64 65/* 66 * Structure used to query names of interface cloners. 67 */ 68 69struct if_clonereq { 70 int ifcr_total; /* total cloners (out) */ --- 281 unchanged lines hidden --- |