vnic_impl.h revision a776d98e5f349dbb7f5a47eca48f50e6117adcb7
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2014 Joyent, Inc. All rights reserved.
*/
#ifndef _SYS_VNIC_IMPL_H
#define _SYS_VNIC_IMPL_H
#include <sys/mac_provider.h>
#include <sys/mac_client.h>
#include <sys/mac_client_priv.h>
#include <sys/mac_flow.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct vnic_s {
vn_enabled : 1,
vn_pad_to_bit_31 : 31;
/* The primary handle is always the first element in the array */
int vn_slot_id;
int vn_af;
} vnic_t;
#define vn_mch vn_mc_handles[0]
#define vn_muh vn_mu_handles[0]
extern void vnic_dev_init(void);
extern void vnic_dev_fini(void);
extern uint_t vnic_dev_count(void);
extern dev_info_t *vnic_get_dip(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VNIC_IMPL_H */