if_var.h (45720) | if_var.h (46568) |
---|---|
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 * $Id: if_var.h,v 1.10 1998/12/16 18:30:43 phk Exp $ | 34 * $Id: if_var.h,v 1.11 1999/04/16 21:22:46 peter Exp $ |
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). --- 229 unchanged lines hidden (view full) --- 272 struct sockaddr *ifma_lladdr; /* link-layer translation, if any */ 273 struct ifnet *ifma_ifp; /* back-pointer to interface */ 274 u_int ifma_refcount; /* reference count */ 275 void *ifma_protospec; /* protocol-specific state, if any */ 276}; 277 278#ifdef KERNEL 279#define IFAFREE(ifa) \ | 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). --- 229 unchanged lines hidden (view full) --- 272 struct sockaddr *ifma_lladdr; /* link-layer translation, if any */ 273 struct ifnet *ifma_ifp; /* back-pointer to interface */ 274 u_int ifma_refcount; /* reference count */ 275 void *ifma_protospec; /* protocol-specific state, if any */ 276}; 277 278#ifdef KERNEL 279#define IFAFREE(ifa) \ |
280 if ((ifa)->ifa_refcnt <= 0) \ 281 ifafree(ifa); \ 282 else \ 283 (ifa)->ifa_refcnt--; | 280 do { \ 281 if ((ifa)->ifa_refcnt <= 0) \ 282 ifafree(ifa); \ 283 else \ 284 (ifa)->ifa_refcnt--; \ 285 } while (0) |
284 285extern struct ifnethead ifnet; 286extern int ifqmaxlen; 287extern struct ifnet loif[]; 288extern int if_index; 289extern struct ifaddr **ifnet_addrs; 290 291void ether_ifattach __P((struct ifnet *)); --- 44 unchanged lines hidden --- | 286 287extern struct ifnethead ifnet; 288extern int ifqmaxlen; 289extern struct ifnet loif[]; 290extern int if_index; 291extern struct ifaddr **ifnet_addrs; 292 293void ether_ifattach __P((struct ifnet *)); --- 44 unchanged lines hidden --- |