if.h (226610) | if.h (228571) |
---|---|
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 226610 2011-10-21 12:58:34Z ed $ | 30 * $FreeBSD: head/sys/net/if.h 228571 2011-12-16 12:16:56Z glebius $ |
31 */ 32 33#ifndef _NET_IF_H_ 34#define _NET_IF_H_ 35 36#include <sys/cdefs.h> 37 38#ifdef _KERNEL --- 41 unchanged lines hidden (view full) --- 80 */ 81struct if_data { 82 /* generic interface information */ 83 u_char ifi_type; /* ethernet, tokenring, etc */ 84 u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */ 85 u_char ifi_addrlen; /* media address length */ 86 u_char ifi_hdrlen; /* media header length */ 87 u_char ifi_link_state; /* current link state */ | 31 */ 32 33#ifndef _NET_IF_H_ 34#define _NET_IF_H_ 35 36#include <sys/cdefs.h> 37 38#ifdef _KERNEL --- 41 unchanged lines hidden (view full) --- 80 */ 81struct if_data { 82 /* generic interface information */ 83 u_char ifi_type; /* ethernet, tokenring, etc */ 84 u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */ 85 u_char ifi_addrlen; /* media address length */ 86 u_char ifi_hdrlen; /* media header length */ 87 u_char ifi_link_state; /* current link state */ |
88 u_char ifi_spare_char1; /* spare byte */ | 88 u_char ifi_vhid; /* carp vhid */ |
89 u_char ifi_spare_char2; /* spare byte */ 90 u_char ifi_datalen; /* length of this data struct */ 91 u_long ifi_mtu; /* maximum transmission unit */ 92 u_long ifi_metric; /* routing metric (external only) */ 93 u_long ifi_baudrate; /* linespeed */ 94 /* volatile statistics */ 95 u_long ifi_ipackets; /* packets received on interface */ 96 u_long ifi_ierrors; /* input errors on interface */ --- 165 unchanged lines hidden (view full) --- 262struct ifa_msghdr { 263 u_short ifam_msglen; /* to skip over non-understood messages */ 264 u_char ifam_version; /* future binary compatibility */ 265 u_char ifam_type; /* message type */ 266 int ifam_addrs; /* like rtm_addrs */ 267 int ifam_flags; /* value of ifa_flags */ 268 u_short ifam_index; /* index for associated ifp */ 269 int ifam_metric; /* value of ifa_metric */ | 89 u_char ifi_spare_char2; /* spare byte */ 90 u_char ifi_datalen; /* length of this data struct */ 91 u_long ifi_mtu; /* maximum transmission unit */ 92 u_long ifi_metric; /* routing metric (external only) */ 93 u_long ifi_baudrate; /* linespeed */ 94 /* volatile statistics */ 95 u_long ifi_ipackets; /* packets received on interface */ 96 u_long ifi_ierrors; /* input errors on interface */ --- 165 unchanged lines hidden (view full) --- 262struct ifa_msghdr { 263 u_short ifam_msglen; /* to skip over non-understood messages */ 264 u_char ifam_version; /* future binary compatibility */ 265 u_char ifam_type; /* message type */ 266 int ifam_addrs; /* like rtm_addrs */ 267 int ifam_flags; /* value of ifa_flags */ 268 u_short ifam_index; /* index for associated ifp */ 269 int ifam_metric; /* value of ifa_metric */ |
270 struct if_data ifam_data;/* statistics and other data about if or 271 * address */ |
|
270}; 271 272/* 273 * Message format for use in obtaining information about multicast addresses 274 * from the routing socket 275 */ 276struct ifma_msghdr { 277 u_short ifmam_msglen; /* to skip over non-understood messages */ --- 74 unchanged lines hidden (view full) --- 352 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \ 353 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq)) 354 355struct ifaliasreq { 356 char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 357 struct sockaddr ifra_addr; 358 struct sockaddr ifra_broadaddr; 359 struct sockaddr ifra_mask; | 272}; 273 274/* 275 * Message format for use in obtaining information about multicast addresses 276 * from the routing socket 277 */ 278struct ifma_msghdr { 279 u_short ifmam_msglen; /* to skip over non-understood messages */ --- 74 unchanged lines hidden (view full) --- 354 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \ 355 (ifr).ifr_addr.sa_len) : sizeof(struct ifreq)) 356 357struct ifaliasreq { 358 char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 359 struct sockaddr ifra_addr; 360 struct sockaddr ifra_broadaddr; 361 struct sockaddr ifra_mask; |
362 int ifra_vhid; |
|
360}; 361 362struct ifmediareq { 363 char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 364 int ifm_current; /* current media options */ 365 int ifm_mask; /* don't care mask */ 366 int ifm_status; /* media status */ 367 int ifm_active; /* active options */ --- 112 unchanged lines hidden --- | 363}; 364 365struct ifmediareq { 366 char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */ 367 int ifm_current; /* current media options */ 368 int ifm_mask; /* don't care mask */ 369 int ifm_status; /* media status */ 370 int ifm_active; /* active options */ --- 112 unchanged lines hidden --- |