+#pragma pack(4)
+
+/*
+ ifkpi: interface kpi ioctl
+ Used with SIOCSIFKPI and SIOCGIFKPI.
+
+ ifk_module_id - From in the kernel, a value from kev_vendor_code_find. From
+ user space, a value from SIOCGKEVVENDOR ioctl on a kernel event socket.
+ ifk_type - The type. Types are specific to each module id.
+ ifk_data - The data. ifk_ptr may be a 64bit pointer for 64 bit processes.
+
+ Copying data between user space and kernel space is done using copyin
+ and copyout. A process may be running in 64bit mode. In such a case,
+ the pointer will be a 64bit pointer, not a 32bit pointer. The following
+ sample is a safe way to copy the data in to the kernel from either a
+ 32bit or 64bit process:
+
+ user_addr_t tmp_ptr;
+ if (IS_64BIT_PROCESS(current_proc())) {
+ tmp_ptr = CAST_USER_ADDR_T(ifkpi.ifk_data.ifk_ptr64);
+ }
+ else {
+ tmp_ptr = CAST_USER_ADDR_T(ifkpi.ifk_data.ifk_ptr);
+ }
+ error = copyin(tmp_ptr, allocated_dst_buffer, size of allocated_dst_buffer);
+ */
+
+struct ifkpi {
+ unsigned int ifk_module_id;
+ unsigned int ifk_type;
+ union {
+ void *ifk_ptr;
+ int ifk_value;
+#ifdef KERNEL
+ u_int64_t ifk_ptr64;
+#endif /* KERNEL */
+ } ifk_data;
+};
+
+/* Wake capabilities of a interface */
+#define IF_WAKE_ON_MAGIC_PACKET 0x01
+#ifdef KERNEL_PRIVATE
+#define IF_WAKE_VALID_FLAGS IF_WAKE_ON_MAGIC_PACKET
+#endif /* KERNEL_PRIVATE */
+
+
+#pragma pack()
+