X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/ff6e181ae92fc6f1e89841290f461d1f2f9badd9..d190cdc3f5544636abb56dc1874be391d3e1b148:/bsd/net/if_bond_var.h diff --git a/bsd/net/if_bond_var.h b/bsd/net/if_bond_var.h index 07b0eb379..f92a3f24c 100644 --- a/bsd/net/if_bond_var.h +++ b/bsd/net/if_bond_var.h @@ -1,14 +1,19 @@ /* * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER @@ -18,7 +23,7 @@ * Please see the License for the specific language governing rights and * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #ifndef _NET_IF_BOND_VAR_H_ @@ -28,10 +33,16 @@ #include +#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; @@ -63,19 +74,15 @@ struct if_bond_status_req { 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 */ @@ -86,8 +93,8 @@ struct if_bond_req { } ibr_ibru; }; -#ifdef KERNEL_PRIVATE -int bond_family_init(void); -#endif KERNEL_PRIVATE +#pragma pack() + +#include #endif /* _NET_IF_BOND_VAR_H_ */