#include <net/if_var.h>
net/if_var.h
macroAPPLE_IF_FAM_LOOPBACK
#define APPLE_IF_FAM_LOOPBACK 1
macroAPPLE_IF_FAM_ETHERNET
#define APPLE_IF_FAM_ETHERNET 2
macroAPPLE_IF_FAM_SLIP
#define APPLE_IF_FAM_SLIP 3
macroAPPLE_IF_FAM_TUN
#define APPLE_IF_FAM_TUN 4
macroAPPLE_IF_FAM_VLAN
#define APPLE_IF_FAM_VLAN 5
macroAPPLE_IF_FAM_PPP
#define APPLE_IF_FAM_PPP 6
macroAPPLE_IF_FAM_PVC
#define APPLE_IF_FAM_PVC 7
macroAPPLE_IF_FAM_DISC
#define APPLE_IF_FAM_DISC 8
macroAPPLE_IF_FAM_MDECAP
#define APPLE_IF_FAM_MDECAP 9
macroAPPLE_IF_FAM_GIF
#define APPLE_IF_FAM_GIF 10
macroAPPLE_IF_FAM_STF
#define APPLE_IF_FAM_STF 12
macroAPPLE_IF_FAM_FIREWIRE
#define APPLE_IF_FAM_FIREWIRE 13
macroAPPLE_IF_FAM_BOND
#define APPLE_IF_FAM_BOND 14
macroAPPLE_IF_FAM_CELLULAR
#define APPLE_IF_FAM_CELLULAR 15
macroAPPLE_IF_FAM_UTUN
#define APPLE_IF_FAM_UTUN 17
macroAPPLE_IF_FAM_IPSEC
#define APPLE_IF_FAM_IPSEC 18
macroIF_MINMTU
72 was chosen below because it is the size of a TCP/IP
header (40) + the minimum mss (32).
#define IF_MINMTU 72
macroIF_MAXMTU
#define IF_MAXMTU 65535
macroIFNAMSIZ
#define IFNAMSIZ 16
structnet_event_data
| u_int32_t | if_family | |
| u_int32_t | if_unit | |
| char[16] | if_name |
macroIF_DATA_TIMEVAL
#define IF_DATA_TIMEVAL timeval32
structif_data
Structure describing information about an interface
which may be of interest to management entities.
| u_char | ifi_type | generic interface information ethernet, tokenring, etc |
| u_char | ifi_typelen | Length of frame type id |
| u_char | ifi_physical | e.g., AUI, Thinnet, 10base-T, etc |
| u_char | ifi_addrlen | media address length |
| u_char | ifi_hdrlen | media header length |
| u_char | ifi_recvquota | polling quota for receive intrs |
| u_char | ifi_xmitquota | polling quota for xmit intrs |
| u_char | ifi_unused1 | for future use |
| u_int32_t | ifi_mtu | maximum transmission unit |
| u_int32_t | ifi_metric | routing metric (external only) |
| u_int32_t | ifi_baudrate | linespeed |
| u_int32_t | ifi_ipackets | volatile statistics packets received on interface |
| u_int32_t | ifi_ierrors | input errors on interface |
| u_int32_t | ifi_opackets | packets sent on interface |
| u_int32_t | ifi_oerrors | output errors on interface |
| u_int32_t | ifi_collisions | collisions on csma interfaces |
| u_int32_t | ifi_ibytes | total number of octets received |
| u_int32_t | ifi_obytes | total number of octets sent |
| u_int32_t | ifi_imcasts | packets received via multicast |
| u_int32_t | ifi_omcasts | packets sent via multicast |
| u_int32_t | ifi_iqdrops | dropped on input, this interface |
| u_int32_t | ifi_noproto | destined for unsupported protocol |
| u_int32_t | ifi_recvtiming | usec spent receiving when timing |
| u_int32_t | ifi_xmittiming | usec spent xmitting when timing |
| struct timeval32 | ifi_lastchange | time of last administrative change |
| u_int32_t | ifi_unused2 | used to be the default_proto |
| u_int32_t | ifi_hwassist | HW offload capabilities |
| u_int32_t | ifi_reserved1 | for future use |
| u_int32_t | ifi_reserved2 | for future use |
structif_data64
Structure describing information about an interface
which may be of interest to management entities.
| u_char | ifi_type | generic interface information ethernet, tokenring, etc |
| u_char | ifi_typelen | Length of frame type id |
| u_char | ifi_physical | e.g., AUI, Thinnet, 10base-T, etc |
| u_char | ifi_addrlen | media address length |
| u_char | ifi_hdrlen | media header length |
| u_char | ifi_recvquota | polling quota for receive intrs |
| u_char | ifi_xmitquota | polling quota for xmit intrs |
| u_char | ifi_unused1 | for future use |
| u_int32_t | ifi_mtu | maximum transmission unit |
| u_int32_t | ifi_metric | routing metric (external only) |
| u_int64_t | ifi_baudrate | linespeed |
| u_int64_t | ifi_ipackets | volatile statistics packets received on interface |
| u_int64_t | ifi_ierrors | input errors on interface |
| u_int64_t | ifi_opackets | packets sent on interface |
| u_int64_t | ifi_oerrors | output errors on interface |
| u_int64_t | ifi_collisions | collisions on csma interfaces |
| u_int64_t | ifi_ibytes | total number of octets received |
| u_int64_t | ifi_obytes | total number of octets sent |
| u_int64_t | ifi_imcasts | packets received via multicast |
| u_int64_t | ifi_omcasts | packets sent via multicast |
| u_int64_t | ifi_iqdrops | dropped on input, this interface |
| u_int64_t | ifi_noproto | destined for unsupported protocol |
| u_int32_t | ifi_recvtiming | usec spent receiving when timing |
| u_int32_t | ifi_xmittiming | usec spent xmitting when timing |
| struct timeval32 | ifi_lastchange | time of last administrative change |
structifqueue
Structure defining a queue for a network interface.
| void * | ifq_head | |
| void * | ifq_tail | |
| int | ifq_len | |
| int | ifq_maxlen | |
| int | ifq_drops |