- int ifcr_total; /* total cloners (out) */
- int ifcr_count; /* room for this many in user buffer */
- union {
- u_int64_t ifcru_buffer64;
- char * ifcru_buffer32;
- } ifcr_ifcru;
-};
-#endif KERNEL_PRIVATE
-
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_DEBUG 0x4 /* turn on debugging */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
-#define IFF_NOTRAILERS 0x20 /* obsolete: avoid use of trailers */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no address resolution protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
-#define IFF_OACTIVE 0x400 /* transmission in progress */
-#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
-#define IFF_LINK0 0x1000 /* per link layer defined bit */
-#define IFF_LINK1 0x2000 /* per link layer defined bit */
-#define IFF_LINK2 0x4000 /* per link layer defined bit */
-#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
-#define IFF_MULTICAST 0x8000 /* supports multicast */
+ int ifcr_total; /* total cloners (out) */
+ int ifcr_count; /* room for this many in user buffer */
+ user64_addr_t ifcru_buffer __attribute__((aligned(8)));
+};
+
+struct if_clonereq32 {
+ int ifcr_total; /* total cloners (out) */
+ int ifcr_count; /* room for this many in user buffer */
+ user32_addr_t ifcru_buffer;
+};
+#endif /* KERNEL_PRIVATE */
+
+#define IFF_UP 0x1 /* interface is up */
+#define IFF_BROADCAST 0x2 /* broadcast address valid */
+#define IFF_DEBUG 0x4 /* turn on debugging */
+#define IFF_LOOPBACK 0x8 /* is a loopback net */
+#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
+#define IFF_NOTRAILERS 0x20 /* obsolete: avoid use of trailers */
+#define IFF_RUNNING 0x40 /* resources allocated */
+#define IFF_NOARP 0x80 /* no address resolution protocol */
+#define IFF_PROMISC 0x100 /* receive all packets */
+#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
+#define IFF_OACTIVE 0x400 /* transmission in progress */
+#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
+#define IFF_LINK0 0x1000 /* per link layer defined bit */
+#define IFF_LINK1 0x2000 /* per link layer defined bit */
+#define IFF_LINK2 0x4000 /* per link layer defined bit */
+#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
+#define IFF_MULTICAST 0x8000 /* supports multicast */
+
+#ifdef PRIVATE
+/* extended flags definitions: (all bits reserved for internal/future use) */
+#define IFEF_AUTOCONFIGURING 0x00000001 /* allow BOOTP/DHCP replies to enter */
+#define IFEF_ENQUEUE_MULTI 0x00000002 /* enqueue multiple packets at once */
+#define IFEF_DELAY_START 0x00000004 /* delay start callback */
+#define IFEF_PROBE_CONNECTIVITY 0x00000008 /* Probe connections going over this interface */
+#define IFEF_QOSMARKING_CAPABLE 0x00000010 /* XXX Obsolete, to be removed */
+#define IFEF_IPV6_DISABLED 0x00000020 /* coupled to ND6_IFF_IFDISABLED */
+#define IFEF_ACCEPT_RTADV 0x00000040 /* accepts IPv6 RA on the interface */
+#define IFEF_TXSTART 0x00000080 /* has start callback */
+#define IFEF_RXPOLL 0x00000100 /* supports opportunistic input poll */
+#define IFEF_VLAN 0x00000200 /* interface has one or more vlans */
+#define IFEF_BOND 0x00000400 /* interface is part of bond */
+#define IFEF_ARPLL 0x00000800 /* ARP for IPv4LL addresses */
+#define IFEF_CLAT46 0x00001000 /* CLAT46 RFC 6877 */
+
+#define IS_INTF_CLAT46(ifp) ((ifp) != NULL && ((ifp)->if_eflags & IFEF_CLAT46))
+#define INTF_ADJUST_MTU_FOR_CLAT46(intf) \
+ (IS_INTF_CLAT46((intf)) || \
+ IS_INTF_CLAT46((intf)->if_delegated.ifp)) \
+
+/*
+ * 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 */
+#define IFEF_EXPENSIVE 0x00004000 /* Data access has a cost */
+#define IFEF_IPV4_ROUTER 0x00008000 /* interior when in IPv4 router mode */
+#define IFEF_IPV6_ROUTER 0x00010000 /* interior when in IPv6 router mode */
+#define IFEF_LOCALNET_PRIVATE 0x00020000 /* local private network */
+#define IFEF_SERVICE_TRIGGERED IFEF_LOCALNET_PRIVATE
+#define IFEF_IPV6_ND6ALT 0x00040000 /* alternative. KPI for ND6 */
+#define IFEF_RESTRICTED_RECV 0x00080000 /* interface restricts inbound pkts */
+#define IFEF_AWDL 0x00100000 /* Apple Wireless Direct Link */
+#define IFEF_NOACKPRI 0x00200000 /* No TCP ACK prioritization */
+#define IFEF_AWDL_RESTRICTED 0x00400000 /* Restricted AWDL mode */
+#define IFEF_2KCL 0x00800000 /* prefers 2K cluster (socket based tunnel) */
+#define IFEF_ECN_ENABLE 0x01000000 /* use ECN for TCP connections on the interface */
+#define IFEF_ECN_DISABLE 0x02000000 /* do not use ECN for TCP connections on the interface */
+#define IFEF_SKYWALK_NATIVE 0x04000000 /* Native Skywalk support */
+#define IFEF_3CA 0x08000000 /* Capable of 3CA */
+#define IFEF_SENDLIST 0x10000000 /* Supports tx packet lists */
+#define IFEF_DIRECTLINK 0x20000000 /* point-to-point topology */
+#define IFEF_QOSMARKING_ENABLED 0x40000000 /* OoS marking is enabled */
+#define IFEF_UPDOWNCHANGE 0x80000000 /* up/down state is changing */
+
+#ifdef XNU_KERNEL_PRIVATE
+/*
+ * Extra flags
+ */
+#define IFXF_WAKE_ON_MAGIC_PACKET 0x00000001 /* wake on magic packet */
+#define IFXF_TIMESTAMP_ENABLED 0x00000002 /* time stamping enabled */
+#define IFXF_NX_NOAUTO 0x00000004 /* no auto config nexus */
+#define IFXF_MULTISTACK_BPF_TAP 0x00000008 /* multistack bpf tap */
+#define IFXF_LOW_INTERNET_UL 0x00000010 /* Uplink Low Internet is confirmed */
+#define IFXF_LOW_INTERNET_DL 0x00000020 /* Downlink Low Internet is confirmed */
+#define IFXF_ALLOC_KPI 0x00000040 /* Allocated via the ifnet_alloc KPI */
+#define IFXF_LOW_POWER 0x00000080 /* Low Power Mode */
+
+/*
+ * Current requirements for an AWDL interface. Setting/clearing IFEF_AWDL
+ * will also trigger the setting/clearing of the rest of the flags. Once
+ * IFEF_AWDL is set, the rest of flags cannot be cleared, by definition.
+ */
+#define IFEF_AWDL_MASK \
+ (IFEF_LOCALNET_PRIVATE | IFEF_IPV6_ND6ALT | IFEF_RESTRICTED_RECV | \
+ IFEF_AWDL)
+#endif /* XNU_KERNEL_PRIVATE */
+#endif /* PRIVATE */