#include <net/lacp.h>
+#pragma pack(4)
+
#define IF_BOND_OP_ADD_INTERFACE 1
#define IF_BOND_OP_REMOVE_INTERFACE 2
#define IF_BOND_OP_GET_STATUS 3
#define IF_BOND_OP_SET_VERBOSE 4
+#define IF_BOND_OP_SET_MODE 5
+
+#define IF_BOND_MODE_LACP 0
+#define IF_BOND_MODE_STATIC 1
struct if_bond_partner_state {
lacp_system ibps_system;
int ibsr_total; /* returned number of struct if_bond_status's */
int ibsr_count; /* number that will fit in ibsr_buffer */
union { /* buffer to hold if_bond_status's */
- char * ibsru_buffer32;
+ void * ibsru_buffer;
u_int64_t ibsru_buffer64;
} ibsr_ibsru;
lacp_key ibsr_key; /* returned */
- u_int16_t ibsr_reserved0; /* for future use */
+ u_int8_t ibsr_mode; /* returned (IF_BOND_MODE_{LACP, STATIC}) */
+ u_int8_t ibsr_reserved0; /* for future use */
u_int32_t ibsr_reserved[3];/* for future use */
};
-
-#if defined(__LP64__)
-#define ibsr_buffer ibsr_ibsru.ibsru_buffer64
-#else
-#define ibsr_buffer ibsr_ibsru.ibsru_buffer32
-#endif
+#define ibsr_buffer ibsr_ibsru.ibsru_buffer
struct if_bond_req {
u_int32_t ibr_op; /* operation */
} ibr_ibru;
};
-#ifdef KERNEL_PRIVATE
-int bond_family_init(void);
-#endif KERNEL_PRIVATE
+#pragma pack()
+
+#include <net/if_bond_internal.h>
#endif /* _NET_IF_BOND_VAR_H_ */