#include <net/if_private.h>
net/if_private.h
macroIFEF_AUTOCONFIGURING
extended flags definitions: (all bits reserved for internal/future use)
#define IFEF_AUTOCONFIGURING 0x00000001
allow BOOTP/DHCP replies to enter
macroIFEF_PROBE_CONNECTIVITY
#define IFEF_PROBE_CONNECTIVITY 0x00000008
Probe connections going over this interface
macroIS_INTF_CLAT46
#define IS_INTF_CLAT46(ifp) ((ifp) != NULL && ((ifp)->if_eflags & IFEF_CLAT46))
macroINTF_ADJUST_MTU_FOR_CLAT46
#define INTF_ADJUST_MTU_FOR_CLAT46(intf) (IS_INTF_CLAT46((intf)) || IS_INTF_CLAT46((intf)->if_delegated.ifp))
macroIFEF_NOAUTOIPV6LL
XXX IFEF_NOAUTOIPV6LL is deprecated and should be done away with.
Configd pretty much manages the interface configuration.
Rather than looking at the flag we check if a specific LLA
has to be configured or the IID has to be generated by kernel.
#define IFEF_NOAUTOIPV6LL 0x00002000
Need explicit IPv6 LL address
macroIFEF_SERVICE_TRIGGERED
#define IFEF_SERVICE_TRIGGERED IFEF_LOCALNET_PRIVATE
macroIFEF_UNUSED1
#define IFEF_UNUSED1 0x01000000
macroIFEF_UNUSED2
#define IFEF_UNUSED2 0x02000000
enum(anonymous)
Link Quality Metrics
IFNET_LQM_THRESH_OFF Metric is not available; device is off.
IFNET_LQM_THRESH_UNKNOWN Metric is not (yet) known.
IFNET_LQM_THRESH_BAD Link quality is considered bad by driver.
IFNET_LQM_THRESH_POOR Link quality is considered poor by driver.
IFNET_LQM_THRESH_GOOD Link quality is considered good by driver.
| IFNET_LQM_THRESH_OFF | -2 | |
| IFNET_LQM_THRESH_UNKNOWN | -1 | |
| IFNET_LQM_THRESH_ABORT | 10 | |
| IFNET_LQM_THRESH_MINIMALLY_VIABLE | 20 | |
| IFNET_LQM_THRESH_POOR | 50 | |
| IFNET_LQM_THRESH_GOOD | 100 |
macroIFNET_LQM_THRESH_BAD
#define IFNET_LQM_THRESH_BAD IFNET_LQM_THRESH_ABORT
structkev_dl_link_quality_metric_data
DLIL KEV_DL_LINK_QUALITY_METRIC_CHANGED structure
| struct net_event_data | link_data | |
| int | link_quality_metric |
macroIF_DESCSIZE
#define IF_DESCSIZE 128
structif_descreq
Structure for SIOC[SG]IFDESC
| char[16] | ifdr_name | interface name |
| u_int32_t | ifdr_len | up to IF_DESCSIZE |
| u_int8_t[128] | ifdr_desc | opaque data |
macroIFNET_SCHED_MODEL_LIST
#define IFNET_SCHED_MODEL_LIST X(IFNET_SCHED_MODEL_NORMAL, 0x00000000, normal) X(IFNET_SCHED_MODEL_DRIVER_MANAGED, 0x00000001, driver managed) X(IFNET_SCHED_MODEL_FQ_CODEL, 0x00000002, fq_codel) X(IFNET_SCHED_MODEL_FQ_CODEL_DM, 0x00000004, fq_codel DM) X(IFNET_SCHED_MODEL_FQ_CODEL_NEW, 0x00000008, fq_codel_new) X(IFNET_SCHED_MODEL_FQ_CODEL_NEW_DM, 0x00000010, fq_codel_new DM)
enum(anonymous)
| IFNET_SCHED_MODEL_NORMAL | 0 | |
| IFNET_SCHED_MODEL_DRIVER_MANAGED | 1 | |
| IFNET_SCHED_MODEL_FQ_CODEL | 2 | |
| IFNET_SCHED_MODEL_FQ_CODEL_DM | 4 | |
| IFNET_SCHED_MODEL_FQ_CODEL_NEW | 8 | |
| IFNET_SCHED_MODEL_FQ_CODEL_NEW_DM | 16 |
macroX
#define X(name, value, ...) name = value,
macroIFNET_SCHED_DRIVER_MANGED_MODELS
#define IFNET_SCHED_DRIVER_MANGED_MODELS (IFNET_SCHED_MODEL_DRIVER_MANAGED | IFNET_SCHED_MODEL_FQ_CODEL_DM | IFNET_SCHED_MODEL_FQ_CODEL_NEW_DM)
macroIFNET_SCHED_VALID_MODELS
#define IFNET_SCHED_VALID_MODELS (IFNET_SCHED_MODEL_NORMAL | IFNET_SCHED_MODEL_DRIVER_MANAGED | IFNET_SCHED_MODEL_FQ_CODEL | IFNET_SCHED_MODEL_FQ_CODEL_DM | IFNET_SCHED_MODEL_FQ_CODEL_NEW | IFNET_SCHED_MODEL_FQ_CODEL_NEW_DM)
macroIFNET_MODEL_IS_VALID
#define IFNET_MODEL_IS_VALID(_model) (((_model == IFNET_SCHED_MODEL_NORMAL) || ((_model) & IFNET_SCHED_VALID_MODELS)) && ((_model) & (_model - 1)) == 0)
structif_linkparamsreq
Structure for SIOCGIFLINKPARAMS
| char[16] | iflpr_name | interface name |
| u_int32_t | iflpr_flags | |
| u_int32_t | iflpr_output_sched | |
| u_int64_t | iflpr_output_tbr_rate | |
| u_int32_t | iflpr_output_tbr_percent | |
| u_int64_t | iflpr_input_tbr_rate | |
| struct if_bandwidths | iflpr_output_bw | |
| struct if_bandwidths | iflpr_input_bw | |
| struct if_latencies | iflpr_output_lt | |
| struct if_latencies | iflpr_input_lt | |
| struct if_netem_params | iflpr_input_netem | |
| struct if_netem_params | iflpr_output_netem |
structif_qstatsreq
Structure for SIOCGIFQUEUESTATS
| char[16] | ifqr_name | interface name |
| u_int32_t | ifqr_grp_idx | |
| u_int32_t | ifqr_slot | |
| void * | ifqr_buf | |
| int | ifqr_len |
enum(anonymous)
Node Proximity Metrics
| IFNET_NPM_THRESH_UNKNOWN | -1 | |
| IFNET_NPM_THRESH_NEAR | 30 | |
| IFNET_NPM_THRESH_GENERAL | 70 | |
| IFNET_NPM_THRESH_FAR | 100 |
enum(anonymous)
Received Signal Strength Indication [special values]
IFNET_RSSI_UNKNOWN Metric is not (yet) known.
| IFNET_RSSI_UNKNOWN | -2147483648 | INT32_MIN |
structkev_dl_node_presence
DLIL KEV_DL_NODE_PRESENCE/KEV_DL_NODE_ABSENCE event structures
| struct net_event_data | link_data | |
| struct sockaddr_in6 | sin6_node_address | |
| struct sockaddr_dl | sdl_node_address | |
| int32_t | rssi | |
| int | link_quality_metric | |
| int | node_proximity_metric | |
| u_int8_t[48] | node_service_info |
structkev_dl_node_absence
| struct net_event_data | link_data | |
| struct sockaddr_in6 | sin6_node_address | |
| struct sockaddr_dl | sdl_node_address |
structif_throttlereq
Structure for SIOC[SG]IFTHROTTLE
| char[16] | ifthr_name | interface name |
| u_int32_t | ifthr_level |
enum(anonymous)
Interface throttling levels
IFNET_THROTTLE_OFF The default throttling level (no throttling.)
All service class queues operate normally according to the
standard packet scheduler configuration.
IFNET_THROTTLE_OPPORTUNISTIC One or more service class queues that
are responsible for managing "opportunistic" traffics are
suspended. Packets enqueued on those queues will be dropped
and a flow advisory error will be generated to the data
source. Existing packets in the queues will stay enqueued
until the interface is no longer throttled, or until they
are explicitly flushed.
| IFNET_THROTTLE_OFF | 0 | |
| IFNET_THROTTLE_OPPORTUNISTIC | 1 |
structif_agentidreq
Structure for SIOC[A/D]IFAGENTID
| char[16] | ifar_name | interface name |
| uuid_t | ifar_uuid | agent UUID to add or delete |
structif_agentidsreq
Structure for SIOCGIFAGENTIDS
| char[16] | ifar_name | interface name |
| u_int32_t | ifar_count | number of agent UUIDs |
| uuid_t * | ifar_uuids | array of agent UUIDs |
structif_nexusreq
Structure for SIOCGIFNEXUS
| char[16] | ifnr_name | interface name |
| uint64_t | ifnr_flags | unused, must be zero |
| uuid_t | ifnr_netif | netif nexus instance UUID |
| uuid_t | ifnr_flowswitch | flowswitch nexus UUID |
| uint64_t[5] | ifnr_reserved |
structkev_dl_issues
DLIL KEV_DL_ISSUES event structure
| struct net_event_data | link_data | |
| u_int8_t[20] | modid | |
| u_int64_t | timestamp | |
| u_int8_t[12] | info |
structkev_dl_rrc_state
DLIL KEV_DL_RRC_STATE_CHANGED structure
| struct net_event_data | link_data | |
| u_int32_t | rrc_state |
structkev_dl_low_power_mode
| struct net_event_data | link_data | |
| int | low_power_event |
structif_nsreq
Structure for SIOC[S/G]IFNETSIGNATURE
| char[16] | ifnsr_name | |
| u_int8_t | ifnsr_family | address family |
| u_int8_t | ifnsr_len | data length |
| u_int16_t | ifnsr_flags | for future |
| u_int8_t[20] | ifnsr_data |
structif_netidreq
Structure for SIOCSIFNETWORKID
| char[16] | ifnetid_name | |
| u_int8_t | ifnetid_len | |
| u_int8_t[32] | ifnetid |
macroNAT64_PREFIX_LEN_32
#define NAT64_PREFIX_LEN_32 4
macroNAT64_PREFIX_LEN_40
#define NAT64_PREFIX_LEN_40 5
macroNAT64_PREFIX_LEN_48
#define NAT64_PREFIX_LEN_48 6
macroNAT64_PREFIX_LEN_56
#define NAT64_PREFIX_LEN_56 7
macroNAT64_PREFIX_LEN_64
#define NAT64_PREFIX_LEN_64 8
macroNAT64_PREFIX_LEN_96
#define NAT64_PREFIX_LEN_96 12
macroNAT64_PREFIX_LEN_MAX
#define NAT64_PREFIX_LEN_MAX NAT64_PREFIX_LEN_96
macroNAT64_MAX_NUM_PREFIXES
#define NAT64_MAX_NUM_PREFIXES 4
structipv6_prefix
| struct in6_addr | ipv6_prefix | |
| uint32_t | prefix_len |
structif_ipv6_address
| struct in6_addr | v6_address | |
| uint32_t | v6_prefixlen |
structif_nat64req
Structure for SIOC[S/G]IFNAT64PREFIX
| char[16] | ifnat64_name | |
| struct ipv6_prefix[4] | ifnat64_prefixes |
structif_clat46req
Structure for SIOCGIFCLAT46ADDR
| char[16] | ifclat46_name | |
| struct if_ipv6_address | ifclat46_addr |
structif_order
Structure for SIOC[S/G]IFORDER
When setting, ifo_count is the number of u_int32_t interface indices
in the ifo_ordered_indices array.
When getting, if ifo_count is 0, the length of the ordered list will
be returned. If the ifo_count is non-0, it is the number of u_int32_t
interface indices allocated. Upon return, ifo_count will contain the number
of indices copied into the array.
| u_int32_t | ifo_count | |
| u_int32_t | ifo_reserved | |
| mach_vm_address_t | ifo_ordered_indices | array of u_int32_t |
structif_tdmreq
Struct for traffic class to DSCP mapping
| char[16] | iftdm_name | |
| u_int32_t | iftdm_len | byte length of the table |
| struct netsvctype_dscp_map * | iftdm_table |
structif_protolistreq
Structure for SIOCGIFPROTOLIST.
| char[16] | ifpl_name | |
| u_int32_t | ifpl_count | |
| u_int32_t | ifpl_reserved | must be zero |
| u_int32_t * | ifpl_list |
macroINTCOPROC_RESTRICTED_ENTITLEMENT
Entitlement to send/receive data on an INTCOPROC interface
#define INTCOPROC_RESTRICTED_ENTITLEMENT "com.apple.private.network.intcoproc.restricted"
macroINTCOPROC_RESTRICTED_ENTITLEMENT_DEVELOPMENT
#define INTCOPROC_RESTRICTED_ENTITLEMENT_DEVELOPMENT "com.apple.private.network.intcoproc.restricted.development"
macroMANAGEMENT_DATA_ENTITLEMENT
Entitlement to send/receive data on a management interface
#define MANAGEMENT_DATA_ENTITLEMENT "com.apple.private.network.management.data"
macroMANAGEMENT_DATA_ENTITLEMENT_DEVELOPMENT
#define MANAGEMENT_DATA_ENTITLEMENT_DEVELOPMENT "com.apple.private.network.management.data.development"
macroMANAGEMENT_CONTROL_ENTITLEMENT
Entitlement to make change to a management interface
#define MANAGEMENT_CONTROL_ENTITLEMENT "com.apple.private.network.management.control"
macroULTRA_CONSTRAINED_ENTITLEMENT
Entitlement to allow socket access on ultra-constrained interfaces
#define ULTRA_CONSTRAINED_ENTITLEMENT "com.apple.private.network.ultraconstrained"