if.h (48021) | if.h (48589) |
---|---|
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 * @(#)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 * @(#)if.h 8.1 (Berkeley) 6/10/93 |
34 * $Id: if.h,v 1.53 1999/06/06 09:17:51 phk Exp $ | 34 * $Id: if.h,v 1.54 1999/06/19 18:42:27 phk Exp $ |
35 */ 36 37#ifndef _NET_IF_H_ 38#define _NET_IF_H_ 39 40/* 41 * <net/if.h> does not depend on <sys/time.h> on most other systems. This 42 * helps userland compatability. (struct timeval ifi_lastchange) --- 152 unchanged lines hidden (view full) --- 195 int ifm_status; /* media status */ 196 int ifm_active; /* active options */ 197 int ifm_count; /* # entries in ifm_ulist array */ 198 int *ifm_ulist; /* media words */ 199}; 200 201/* 202 * Structure used to retrieve aux status data from interfaces. | 35 */ 36 37#ifndef _NET_IF_H_ 38#define _NET_IF_H_ 39 40/* 41 * <net/if.h> does not depend on <sys/time.h> on most other systems. This 42 * helps userland compatability. (struct timeval ifi_lastchange) --- 152 unchanged lines hidden (view full) --- 195 int ifm_status; /* media status */ 196 int ifm_active; /* active options */ 197 int ifm_count; /* # entries in ifm_ulist array */ 198 int *ifm_ulist; /* media words */ 199}; 200 201/* 202 * Structure used to retrieve aux status data from interfaces. |
203 * kernel suppliers to this interface should respect the formatting | 203 * Kernel suppliers to this interface should respect the formatting |
204 * needed by ifconfig(8): each line starts with a TAB and ends with | 204 * needed by ifconfig(8): each line starts with a TAB and ends with |
205 * a newline. The canonical example to copy&past is in if_tun.c | 205 * a newline. The canonical example to copy and paste is in if_tun.c. |
206 */ 207 | 206 */ 207 |
208#define IFSTATMAX 800 /* 10 lines of text */ | 208#define IFSTATMAX 800 /* 10 lines of text */ |
209struct ifstat { | 209struct ifstat { |
210 char ifs_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 211 char ascii[IFSTATMAX+1]; | 210 char ifs_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 211 char ascii[IFSTATMAX + 1]; |
212}; 213 214/* 215 * Structure used in SIOCGIFCONF request. 216 * Used to retrieve interface configuration 217 * for machine (useful for programs which 218 * must know all networks accessible). 219 */ --- 11 unchanged lines hidden (view full) --- 231#ifdef MALLOC_DECLARE 232MALLOC_DECLARE(M_IFADDR); 233MALLOC_DECLARE(M_IFMADDR); 234#endif 235#endif 236 237#ifdef KERNEL 238struct proc; | 212}; 213 214/* 215 * Structure used in SIOCGIFCONF request. 216 * Used to retrieve interface configuration 217 * for machine (useful for programs which 218 * must know all networks accessible). 219 */ --- 11 unchanged lines hidden (view full) --- 231#ifdef MALLOC_DECLARE 232MALLOC_DECLARE(M_IFADDR); 233MALLOC_DECLARE(M_IFMADDR); 234#endif 235#endif 236 237#ifdef KERNEL 238struct proc; |
239 |
|
239int prison_if __P((struct proc *p, struct sockaddr *sa)); | 240int prison_if __P((struct proc *p, struct sockaddr *sa)); |
240/* XXX - this should go away soon */ | 241 242/* XXX - this should go away soon. */ |
241#include <net/if_var.h> 242#endif 243 244#endif /* !_NET_IF_H_ */ | 243#include <net/if_var.h> 244#endif 245 246#endif /* !_NET_IF_H_ */ |