Index: /trunk/src/VBox/Devices/Network/solaris/libdladm.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/libdladm.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/libdladm.h	(revision 5585)
@@ -0,0 +1,91 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _LIBDLADM_H
+#define	_LIBDLADM_H
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+/*
+ * This file includes structures, macros and common routines shared by all
+ * data-link administration, and routines which do not directly administrate
+ * links. For example, dladm_status2str().
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#define	DLADM_STRSIZE		256
+#define	DLADM_OPT_TEMP		0x00000001
+#define	DLADM_OPT_CREATE	0x00000002
+#define	DLADM_OPT_PERSIST	0x00000004
+
+typedef enum {
+	DLADM_STATUS_OK = 0,
+	DLADM_STATUS_BADARG,
+	DLADM_STATUS_FAILED,
+	DLADM_STATUS_TOOSMALL,
+	DLADM_STATUS_NOTSUP,
+	DLADM_STATUS_NOTFOUND,
+	DLADM_STATUS_BADVAL,
+	DLADM_STATUS_NOMEM,
+	DLADM_STATUS_EXIST,
+	DLADM_STATUS_LINKINVAL,
+	DLADM_STATUS_PROPRDONLY,
+	DLADM_STATUS_BADVALCNT,
+	DLADM_STATUS_DBNOTFOUND,
+	DLADM_STATUS_DENIED,
+	DLADM_STATUS_IOERR,
+	DLADM_STATUS_TEMPONLY,
+	DLADM_STATUS_TIMEDOUT,
+	DLADM_STATUS_ISCONN,
+	DLADM_STATUS_NOTCONN,
+	DLADM_STATUS_REPOSITORYINVAL,
+	DLADM_STATUS_MACADDRINVAL,
+	DLADM_STATUS_KEYINVAL,
+	DLADM_STATUS_INVALIDID,
+	DLADM_STATUS_INVALIDMACADDRLEN,
+	DLADM_STATUS_INVALIDMACADDRTYPE,
+	DLADM_STATUS_AUTOIDNOTEMP,
+	DLADM_STATUS_AUTOIDNOAVAILABLEID,
+	DLADM_STATUS_BUSY
+} dladm_status_t;
+
+typedef enum {
+	DLADM_PROP_VAL_CURRENT = 1,
+	DLADM_PROP_VAL_DEFAULT,
+	DLADM_PROP_VAL_MODIFIABLE,
+	DLADM_PROP_VAL_PERSISTENT
+} dladm_prop_type_t;
+
+extern const char	*dladm_status2str(dladm_status_t, char *);
+extern dladm_status_t	dladm_set_rootdir(const char *);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _LIBDLADM_H */
Index: /trunk/src/VBox/Devices/Network/solaris/libdlvnic.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/libdlvnic.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/libdlvnic.h	(revision 5585)
@@ -0,0 +1,73 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _LIBDLVNIC_H
+#define	_LIBDLVNIC_H
+
+#pragma ident	"%Z%%M%	%I%	%E% SMI"
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <libdladm.h>
+#include <sys/vnic.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+typedef struct dladm_vnic_attr_sys {
+	uint_t			va_vnic_id;
+	char			va_dev_name[MAXNAMELEN + 1];
+	vnic_mac_addr_type_t    va_mac_addr_type;
+	uchar_t			va_mac_addr[ETHERADDRL];
+	uint_t			va_mac_len;
+} dladm_vnic_attr_sys_t;
+
+/*
+ * General operations flags.
+ */
+#define	DLADM_VNIC_OPT_TEMP	0x00000001
+#define	DLADM_VNIC_OPT_AUTOID	0x00000002
+
+/*
+ * Modification flags for dladm_vnic_modify().
+ */
+#define	DLADM_VNIC_MODIFY_ADDR		0x01
+
+extern dladm_status_t dladm_vnic_create(uint_t, char *, vnic_mac_addr_type_t,
+    uchar_t *, int, uint_t *, uint32_t);
+extern dladm_status_t dladm_vnic_modify(uint_t, uint32_t, vnic_mac_addr_type_t,
+    uint_t, uchar_t *, uint32_t);
+extern dladm_status_t dladm_vnic_delete(uint_t, uint32_t);
+extern dladm_status_t dladm_vnic_walk_sys(
+	dladm_status_t (*)(void *, dladm_vnic_attr_sys_t *), void *);
+extern boolean_t dladm_vnic_mac_addr_str_to_type(const char *,
+    vnic_mac_addr_type_t *);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _LIBDLVNIC_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/flow.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/flow.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/flow.h	(revision 5585)
@@ -0,0 +1,142 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_INET_FLOW_H
+#define	_INET_FLOW_H
+
+#pragma ident	"@(#)flow.h	1.11	06/12/06 SMI"
+
+/*
+ * Main structure describing a flow of packets, for classification use
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <netinet/in.h>		/* for IPPROTO_* constants */
+#include <sys/ethernet.h>
+
+/* Bit-mask for the selectors carried in the flow descriptor */
+typedef	uint64_t	flow_mask_t;
+
+/*
+ * The values are defined such that less specific IP flows are numerically
+ * smaller than more specific IP flows. This makes comparison easier.
+ * In particular
+ *	FLOW_IP_LOCAL < FLOW_IP_PROTOCOL < FLOW_TRANSPORT_LOCAL.
+ *	FLOW_IP_LOCAL < FLOW_IP_PROTOCOL < FLOW_TRANSPORT_REMOTE.
+ */
+#define	FLOW_ETHER_DHOST	0x00000001	/* Destination MAC addr */
+#define	FLOW_ETHER_SHOST	0x00000002	/* Source MAC address */
+#define	FLOW_ETHER_TPID		0x00000004	/* For VLAN TAG */
+#define	FLOW_ETHER_TCI		0x00000008	/* Ditto */
+#define	FLOW_ETHER_TYPE		0x00000010	/* payload protocol type */
+#define	FLOW_IP_VERSION		0x00000020	/* V4 or V6 */
+#define	FLOW_IP_REMOTE		0x00000040
+#define	FLOW_IP_LOCAL		0x00000080
+#define	FLOW_IP_PROTOCOL	0x00000100	/* Upper Later transport type */
+#define	FLOW_ULP_PORT_REMOTE	0x00000200	/* Upper Layer Transport */
+#define	FLOW_ULP_PORT_LOCAL	0x00000400	/* port numbers */
+#define	FLOW_SAP		0x00000800	/* SAP value */
+
+#define	FLOW_TRANSPORT_LOCAL	(FLOW_IP_PROTOCOL | FLOW_ULP_PORT_LOCAL)
+#define	FLOW_TRANSPORT_REMOTE	(FLOW_IP_PROTOCOL | FLOW_ULP_PORT_REMOTE)
+
+#define	FLOW_LESS_SPECIFIC	-1
+#define	FLOW_EQUAL		0
+#define	FLOW_MORE_SPECIFIC	1
+
+#define	FLOW_IP_COMPARE(flmask1,  flmask2)		\
+	(((flmask1) == (flmask2)) ? FLOW_EQUAL : 	\
+	((flmask1 < flmask2) ? FLOW_LESS_SPECIFIC : FLOW_MORE_SPECIFIC))
+
+/* Define additional flow description criteria here */
+
+
+typedef struct flow_desc_s {
+	flow_mask_t			fd_mask;
+	struct ether_vlan_header	fd_mac;
+	char				fd_ipversion;
+	char				fd_protocol;
+	in6_addr_t			fd_remoteaddr;
+	in6_addr_t			fd_localaddr;
+	in_port_t			fd_remoteport;
+	in_port_t			fd_localport;
+	uint32_t			fd_sap;
+	char				fd_pad[4];	/* 64-bit alignment */
+} flow_desc_t;
+
+/* Bit-mask for the network resource control types types */
+typedef	uint64_t	net_service_type_t;
+
+#define	NET_BANDWIDTH_SHARE	0x00000001
+#define	NET_BANDWIDTH_LIMIT	0x00000002
+#define	NET_BANDWIDTH_GUARANTEE	0x00000004
+#define	NET_FLOW_PRIORITY	0x00000008
+
+/* Define additional resource controls */
+
+typedef	struct net_resource_ctl_s {
+	net_service_type_t	nr_mask;
+	uint32_t		nr_bw_shares;	/* bandwidh shares */
+	uint32_t		nr_bw_limit;	/* bandwidh limit in Kbps */
+	uint32_t		nr_bw_guarantee; /* bandwidh gua'tee in Kbps */
+	uint32_t		nr_flow_priority; /* relative flow priority */
+	boolean_t		nr_hw_classifier; /* assign h/w classifier */
+	char			nr_pad[4];	/* 64-bit alignment */
+} net_resource_ctl_t;
+
+typedef struct flow_stats_s {
+	uint64_t	fs_rbytes;
+	uint64_t	fs_ipackets;
+	uint64_t	fs_ierrors;
+	uint64_t	fs_obytes;
+	uint64_t	fs_opackets;
+	uint64_t	fs_oerrors;
+} flow_stats_t;
+
+typedef struct net_bind_cpus_s {
+	uint32_t	nbc_ncpus;
+	uint32_t	nbc_cpus[128];
+	char		nbc_pad[4];
+} net_bind_cpu_t;
+
+typedef enum {
+	FLOW_STAT_RBYTES,
+	FLOW_STAT_IPACKETS,
+	FLOW_STAT_IERRORS,
+	FLOW_STAT_OBYTES,
+	FLOW_STAT_OPACKETS,
+	FLOW_STAT_OERRORS
+} flow_stat_t;
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _INET_FLOW_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/mac.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/mac.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/mac.h	(revision 5585)
@@ -0,0 +1,646 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_MAC_H
+#define	_SYS_MAC_H
+
+#pragma ident	"@(#)mac.h	1.21	06/12/06 SMI"
+
+#include <sys/ddi.h>
+#include <sys/sunddi.h>
+#include <sys/stream.h>
+#include <sys/flow.h>
+
+#ifdef	_KERNEL
+#include <sys/flow_impl.h>
+#endif
+
+/*
+ * MAC Services Module
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/*
+ * MAC Information (text emitted by modinfo(1m))
+ */
+#define	MAC_INFO	"MAC Services v1.21"
+
+/*
+ * MAC version identifier.  This is used by mac_alloc() mac_register() to
+ * verify that incompatible drivers don't register.
+ */
+#define	MAC_VERSION	0x1
+
+/*
+ * MAC-Type version identifier.  This is used by mactype_alloc() and
+ * mactype_register() to verify that incompatible MAC-Type plugins don't
+ * register.
+ */
+#define	MACTYPE_VERSION	0x1
+
+/*
+ * Statistics
+ */
+
+#define	XCVR_UNDEFINED		0
+#define	XCVR_NONE		1
+#define	XCVR_10			2
+#define	XCVR_100T4		3
+#define	XCVR_100X		4
+#define	XCVR_100T2		5
+#define	XCVR_1000X		6
+#define	XCVR_1000T		7
+
+typedef enum {
+	LINK_STATE_UNKNOWN = -1,
+	LINK_STATE_DOWN,
+	LINK_STATE_UP
+} link_state_t;
+
+typedef enum {
+	LINK_DUPLEX_UNKNOWN = 0,
+	LINK_DUPLEX_HALF,
+	LINK_DUPLEX_FULL
+} link_duplex_t;
+
+/*
+ * Maximum MAC address length
+ */
+#define	MAXMACADDRLEN	20
+
+#ifdef	_KERNEL
+
+typedef struct mac_stat_info_s {
+	uint_t		msi_stat;
+	char		*msi_name;
+	uint_t		msi_type;	/* as defined in kstat_named_init(9F) */
+	uint64_t	msi_default;
+} mac_stat_info_t;
+
+/*
+ * There are three ranges of statistics values.  0 to 1 - MAC_STAT_MIN are
+ * interface statistics maintained by the mac module.  MAC_STAT_MIN to 1 -
+ * MACTYPE_STAT_MIN are common MAC statistics defined by the mac module and
+ * maintained by each driver.  MACTYPE_STAT_MIN and above are statistics
+ * defined by MAC-Type plugins and maintained by each driver.
+ */
+#define	MAC_STAT_MIN		1000
+#define	MACTYPE_STAT_MIN	2000
+
+#define	IS_MAC_STAT(stat)	\
+	(stat >= MAC_STAT_MIN && stat < MACTYPE_STAT_MIN)
+#define	IS_MACTYPE_STAT(stat)	(stat >= MACTYPE_STAT_MIN)
+
+enum mac_driver_stat {
+	/* MIB-II stats (RFC 1213 and RFC 1573) */
+	MAC_STAT_IFSPEED = MAC_STAT_MIN,
+	MAC_STAT_MULTIRCV,
+	MAC_STAT_BRDCSTRCV,
+	MAC_STAT_MULTIXMT,
+	MAC_STAT_BRDCSTXMT,
+	MAC_STAT_NORCVBUF,
+	MAC_STAT_IERRORS,
+	MAC_STAT_UNKNOWNS,
+	MAC_STAT_NOXMTBUF,
+	MAC_STAT_OERRORS,
+	MAC_STAT_COLLISIONS,
+	MAC_STAT_RBYTES,
+	MAC_STAT_IPACKETS,
+	MAC_STAT_OBYTES,
+	MAC_STAT_OPACKETS
+};
+
+#define	MAC_NSTAT	(MAC_STAT_OPACKETS - MAC_STAT_IFSPEED + 1)
+
+#define	MAC_STAT_ISACOUNTER(_stat) (		\
+	    (_stat) == MAC_STAT_MULTIRCV ||	\
+	    (_stat) == MAC_STAT_BRDCSTRCV ||	\
+	    (_stat) == MAC_STAT_MULTIXMT ||	\
+	    (_stat) == MAC_STAT_BRDCSTXMT ||	\
+	    (_stat) == MAC_STAT_NORCVBUF ||	\
+	    (_stat) == MAC_STAT_IERRORS ||	\
+	    (_stat) == MAC_STAT_UNKNOWNS ||	\
+	    (_stat) == MAC_STAT_NOXMTBUF ||	\
+	    (_stat) == MAC_STAT_OERRORS ||	\
+	    (_stat) == MAC_STAT_COLLISIONS ||	\
+	    (_stat) == MAC_STAT_RBYTES ||	\
+	    (_stat) == MAC_STAT_IPACKETS ||	\
+	    (_stat) == MAC_STAT_OBYTES ||	\
+	    (_stat) == MAC_STAT_OPACKETS)
+
+/*
+ * Immutable information. (This may not be modified after registration).
+ */
+typedef struct mac_info_s {
+	uint_t		mi_media;
+	uint_t		mi_sdu_min;
+	uint_t		mi_sdu_max;
+	uint_t		mi_addr_length;
+	uint8_t		*mi_unicst_addr;
+	uint8_t		*mi_brdcst_addr;
+} mac_info_t;
+
+/*
+ * MAC layer capabilities.  These capabilities are handled by the drivers'
+ * mc_capab_get() callbacks.  Some capabilities require the driver to fill
+ * in a given data structure, and others are simply boolean capabilities.
+ * Note that capability values must be powers of 2 so that consumers and
+ * providers of this interface can keep track of which capabilities they
+ * care about by keeping a bitfield of these things around somewhere.
+ */
+typedef enum {
+	MAC_CAPAB_HCKSUM	= 0x01,	/* data is a uint32_t for the txflags */
+	MAC_CAPAB_POLL		= 0x02,	/* boolean only, no data */
+	MAC_CAPAB_MULTIADDRESS	= 0x04,	/* data is multiaddress_capab_t */
+	MAC_CAPAB_RX_CLASSIFY	= 0x08	/* data is mac_rx_classify_t */
+
+	/* add new capabilities here */
+} mac_capab_t;
+
+typedef int mac_addr_slot_t;
+
+/* mma_flags values */
+#define	MMAC_SLOT_USED		0x1   /* address slot used */
+#define	MMAC_SLOT_UNUSED	0x2   /* free address slot */
+#define	MMAC_VENDOR_ADDR	0x4   /* address returned is vendor supplied */
+
+typedef struct mac_multi_address_s {
+	mac_addr_slot_t	mma_slot;	/* slot for add/remove/get/set */
+	uint_t		mma_addrlen;
+	uint8_t		mma_addr[MAXMACADDRLEN];
+	uint_t		mma_flags;
+} mac_multi_addr_t;
+
+typedef int	(*maddr_reserve_t)(void *, mac_multi_addr_t *);
+typedef int	(*maddr_add_t)(void *, mac_multi_addr_t *);
+typedef int	(*maddr_remove_t)(void *, mac_addr_slot_t);
+typedef int	(*maddr_modify_t)(void *, mac_multi_addr_t *);
+typedef int	(*maddr_get_t)(void *, mac_multi_addr_t *);
+
+/* maddr_flag values */
+#define	MADDR_VENDOR_ADDR	0x01	/* addr returned is vendor supplied */
+
+/* multiple mac address: add/remove/set/get mac address */
+typedef struct multiaddress_capab_s {
+	int		maddr_naddr;	/* total addresses */
+	int		maddr_naddrfree;	/* free address slots */
+	uint_t		maddr_flag;	/* MADDR_VENDOR_ADDR bit can be set */
+	/* driver entry points */
+	void		*maddr_handle;	/* cookie to be used for the calls */
+	maddr_reserve_t	maddr_reserve;	/* reserve a factory address */
+	maddr_add_t	maddr_add;	/* add a new unicst address */
+	maddr_remove_t	maddr_remove;	/* remove an added address */
+	maddr_modify_t	maddr_modify;	/* modify an added address */
+	maddr_get_t	maddr_get;	/* get address from specified slot */
+} multiaddress_capab_t;
+
+/*
+ * MAC driver entry point types.
+ */
+typedef int		(*mac_getstat_t)(void *, uint_t, uint64_t *);
+typedef	int		(*mac_start_t)(void *);
+typedef void		(*mac_stop_t)(void *);
+typedef int		(*mac_setpromisc_t)(void *, boolean_t);
+typedef int		(*mac_multicst_t)(void *, boolean_t, const uint8_t *);
+typedef int		(*mac_unicst_t)(void *, const uint8_t *);
+typedef void		(*mac_ioctl_t)(void *, queue_t *, mblk_t *);
+typedef void		(*mac_resources_t)(void *);
+typedef mblk_t		*(*mac_tx_t)(void *, mblk_t *);
+typedef	boolean_t	(*mac_getcapab_t)(void *, mac_capab_t, void *);
+
+/*
+ * Drivers must set all of these callbacks except for mc_resources,
+ * mc_ioctl, and mc_getcapab, which are optional.  If any of these optional
+ * callbacks are set, their appropriate flags must be set in mc_callbacks.
+ * Any future additions to this list must also be accompanied by an
+ * associated mc_callbacks flag so that the framework can grow without
+ * affecting the binary compatibility of the interface.
+ */
+typedef struct mac_callbacks_s {
+	uint_t		mc_callbacks;	/* Denotes which callbacks are set */
+	mac_getstat_t	mc_getstat;	/* Get the value of a statistic */
+	mac_start_t	mc_start;	/* Start the device */
+	mac_stop_t	mc_stop;	/* Stop the device */
+	mac_setpromisc_t mc_setpromisc;	/* Enable or disable promiscuous mode */
+	mac_multicst_t	mc_multicst;	/* Enable or disable a multicast addr */
+	mac_unicst_t	mc_unicst;	/* Set the unicast MAC address */
+	mac_tx_t	mc_tx;		/* Transmit a packet */
+	mac_resources_t	mc_resources;	/* Get the device resources */
+	mac_ioctl_t	mc_ioctl;	/* Process an unknown ioctl */
+	mac_getcapab_t	mc_getcapab;	/* Get capability information */
+} mac_callbacks_t;
+
+
+/* MAC classification capabilities */
+
+typedef	enum {
+	MAC_HW_CLASSIFIER,
+	MAC_SW_CLASSIFIER,
+	MAC_NO_CLASSIFIER
+} mac_classify_status_t;
+
+typedef void		(*mac_rx_func_t)(void *, mac_resource_handle_t,
+			    mblk_t *);
+
+typedef int		(*mac_rx_classify_add_t)(void *, mac_resource_handle_t,
+			    flow_desc_t *, mac_rx_func_t, void *,
+			    mac_resource_handle_t, mac_rule_handle_t *);
+
+typedef int		(*mac_rx_classify_remove_t)(void *,
+			    mac_resource_handle_t, mac_rule_handle_t);
+
+typedef void		(*mac_rx_classify_update_t)(void *, mac_rx_func_t,
+			    void *, mac_resource_handle_t);
+
+typedef struct mac_rx_classify_s {
+	flow_mask_t			mrc_flow_classes;
+	mac_rx_classify_add_t		mrc_addrulefn;  /* adding a rule */
+	mac_rx_classify_remove_t	mrc_remrulefn;	/* removing a rule */
+	mac_rx_classify_update_t	mrc_updatefn;	/* Updating a ring */
+} mac_rx_classify_t;
+
+/*
+ * Flags for mc_callbacks.  Requiring drivers to set the flags associated
+ * with optional callbacks initialized in the structure allows the mac
+ * module to add optional callbacks in the future without requiring drivers
+ * to recompile.
+ */
+#define	MC_RESOURCES	0x001
+#define	MC_IOCTL	0x002
+#define	MC_GETCAPAB	0x004
+
+typedef struct mac_register_s {
+	uint_t		m_version;	/* set by mac_alloc() */
+	const char	*m_type_ident;
+	void		*m_driver;	/* Driver private data */
+	dev_info_t	*m_dip;
+	uint_t		m_instance;
+	uint8_t		*m_src_addr;
+	uint8_t		*m_dst_addr;
+	mac_callbacks_t	*m_callbacks;
+	uint_t		m_min_sdu;
+	uint_t		m_max_sdu;
+	void		*m_pdata;
+	size_t		m_pdata_size;
+} mac_register_t;
+
+/*
+ * MAC interface callback types.
+ */
+typedef enum {
+	MAC_NOTE_LINK,
+	MAC_NOTE_PROMISC,
+	MAC_NOTE_UNICST,
+	MAC_NOTE_TX,
+	MAC_NOTE_RESOURCE,
+	MAC_NOTE_DEVPROMISC,
+	MAC_NOTE_FASTPATH_FLUSH,
+	MAC_NOTE_VNIC,
+	MAC_NNOTE	/* must be the last entry */
+} mac_notify_type_t;
+
+typedef void		(*mac_notify_t)(void *, mac_notify_type_t);
+typedef void		(*mac_rx_t)(void *, mac_resource_handle_t, mblk_t *);
+typedef void		(*mac_txloop_t)(void *, mblk_t *);
+typedef void		(*mac_blank_t)(void *, time_t, uint_t, int);
+typedef	mblk_t		*(*mac_receive_t)(void *, int);
+
+/*
+ * MAC promiscuous types
+ */
+typedef enum {
+	MAC_PROMISC = 0x01,		/* MAC instance is promiscuous */
+	MAC_DEVPROMISC = 0x02		/* Device is promiscuous */
+} mac_promisc_type_t;
+
+/*
+ * MAC resource types
+ */
+typedef enum {
+	MAC_RX_FIFO = 1
+} mac_resource_type_t;
+
+typedef struct mac_rx_fifo_s {
+	mac_resource_type_t	mrf_type;	/* MAC_RX_FIFO */
+	mac_blank_t		mrf_blank;
+	mac_receive_t		mrf_receive;
+	void			*mrf_arg;
+	time_t			mrf_normal_blank_time;
+	uint_t			mrf_normal_pkt_count;
+	uint32_t		mrf_bw_limit;
+	uint32_t		mrf_bw_guarantee;
+	uint32_t		mrf_bw_shares;
+	uint32_t		mrf_flow_priority;
+	uint32_t		mrf_bw_control_type;
+
+	/*
+	 * The CPU this flow is to be processed on. With intrd and future
+	 * things, we should know which CPU the flow needs to be processed
+	 * and get a squeue assigned on that CPU.
+	 */
+	uint_t			mrf_cpu_id;
+	flow_desc_t		mrf_flow_desc;	/* Flow desc for this ring */
+} mac_rx_fifo_t;
+
+typedef struct mac_txinfo_s {
+	mac_tx_t		mt_fn;
+	void			*mt_arg;
+} mac_txinfo_t;
+
+typedef union mac_resource_u {
+	mac_resource_type_t	mr_type;
+	mac_rx_fifo_t		mr_fifo;
+} mac_resource_t;
+
+typedef mac_resource_handle_t	(*mac_resource_add_t)(void *, mac_resource_t *);
+typedef int			(*mac_resource_bind_t)(void *,
+    mac_resource_handle_t, processorid_t);
+
+typedef enum {
+	MAC_ADDRTYPE_UNICAST,
+	MAC_ADDRTYPE_MULTICAST,
+	MAC_ADDRTYPE_BROADCAST
+} mac_addrtype_t;
+
+typedef struct mac_header_info_s {
+	size_t		mhi_hdrsize;
+	size_t		mhi_pktsize;
+	const uint8_t	*mhi_daddr;
+	const uint8_t	*mhi_saddr;
+	uint32_t	mhi_origsap;
+	uint32_t	mhi_bindsap;
+	mac_addrtype_t	mhi_dsttype;
+} mac_header_info_t;
+
+/*
+ * MAC-Type plugin interfaces
+ */
+
+typedef int		(*mtops_addr_verify_t)(const void *, void *);
+typedef boolean_t	(*mtops_sap_verify_t)(uint32_t, uint32_t *, void *);
+typedef mblk_t		*(*mtops_header_t)(const void *, const void *,
+    uint32_t, void *, mblk_t *, size_t);
+typedef int		(*mtops_header_info_t)(mblk_t *, void *,
+    mac_header_info_t *);
+typedef boolean_t	(*mtops_pdata_verify_t)(void *, size_t);
+typedef	mblk_t		*(*mtops_header_modify_t)(mblk_t *, void *);
+
+typedef struct mactype_ops_s {
+	uint_t			mtops_ops;
+	/*
+	 * mtops_unicst_verify() returns 0 if the given address is a valid
+	 * unicast address, or a non-zero errno otherwise.
+	 */
+	mtops_addr_verify_t	mtops_unicst_verify;
+	/*
+	 * mtops_multicst_verify() returns 0 if the given address is a
+	 * valid multicast address, or a non-zero errno otherwise.  If the
+	 * media doesn't support multicast, ENOTSUP should be returned (for
+	 * example).
+	 */
+	mtops_addr_verify_t	mtops_multicst_verify;
+	/*
+	 * mtops_sap_verify() returns B_TRUE if the given SAP is a valid
+	 * SAP value, or B_FALSE otherwise.
+	 */
+	mtops_sap_verify_t	mtops_sap_verify;
+	/*
+	 * mtops_header() is used to allocate and construct a MAC header.
+	 */
+	mtops_header_t		mtops_header;
+	/*
+	 * mtops_header_info() is used to gather information on a given MAC
+	 * header.
+	 */
+	mtops_header_info_t	mtops_header_info;
+	/*
+	 * mtops_pdata_verify() is used to verify the validity of MAC
+	 * plugin data.  It is called by mac_register() if the driver has
+	 * supplied MAC plugin data, and also by mac_pdata_update() when
+	 * drivers update the data.
+	 */
+	mtops_pdata_verify_t	mtops_pdata_verify;
+	/*
+	 * mtops_header_cook() is an optional callback that converts (or
+	 * "cooks") the given raw header (as sent by a raw DLPI consumer)
+	 * into one that is appropriate to send down to the MAC driver.
+	 * Following the example above, an Ethernet header sent down by a
+	 * DLPI consumer would be converted to whatever header the MAC
+	 * driver expects.
+	 */
+	mtops_header_modify_t	mtops_header_cook;
+	/*
+	 * mtops_header_uncook() is an optional callback that does the
+	 * opposite of mtops_header_cook().  It "uncooks" a given MAC
+	 * header (as received from the driver) for consumption by raw DLPI
+	 * consumers.  For example, for a non-Ethernet plugin that wants
+	 * raw DLPI consumers to be fooled into thinking that the device
+	 * provides Ethernet access, this callback would modify the given
+	 * mblk_t such that the MAC header is converted to an Ethernet
+	 * header.
+	 */
+	mtops_header_modify_t	mtops_header_uncook;
+} mactype_ops_t;
+
+/*
+ * mtops_ops exists for the plugin to enumerate the optional callback
+ * entrypoints it has defined.  This allows the mac module to define
+ * additional plugin entrypoints in mactype_ops_t without breaking backward
+ * compatibility with old plugins.
+ */
+#define	MTOPS_PDATA_VERIFY	0x001
+#define	MTOPS_HEADER_COOK	0x002
+#define	MTOPS_HEADER_UNCOOK	0x004
+
+typedef struct mactype_register_s {
+	uint_t		mtr_version;	/* set by mactype_alloc() */
+	const char	*mtr_ident;
+	mactype_ops_t	*mtr_ops;
+	uint_t		mtr_mactype;
+	uint_t		mtr_addrlen;
+	uint8_t		*mtr_brdcst_addr;
+	mac_stat_info_t	*mtr_stats;
+	size_t		mtr_statcount;
+} mactype_register_t;
+
+/*
+ * MAC classification
+ */
+
+typedef	struct mac_rxclassify_fn_t {
+	mac_rx_classify_t	mcf_classify;	/* classif'n capabilities */
+	void			*mcf_arg;	/* rule add func first arg */
+} mac_rxclassify_fn_t;
+
+#define	mcf_flow_classes	mcf_classify.mrc_flow_classes
+#define	mcf_addrulefn		mcf_classify.mrc_addrulefn
+#define	mcf_remrulefn		mcf_classify.mrc_remrulefn
+#define	mcf_updatefn		mcf_classify.mrc_updatefn
+
+/*
+ * Structure describing the receive ring. It has:
+ * . the type of classification to dispatch traffic for this ring,
+ * . the driver's ring mac_resource_t with the driver's ring handle and its
+ *   polling/blanking access functions.
+ * . handle to the stack's ring's client (e.g ill_ring)
+ * . pointer to the flow entry controlling this ring.
+ * XXX This needs REHHOLD()'ing.
+ */
+struct mac_rx_ring_desc_s {
+	mac_classify_status_t	mrd_classify_type;
+	mac_resource_t		mrd_driver_rx;
+	mac_resource_handle_t	mrd_client_handle;
+	flow_entry_t		*mrd_flow_entry;
+	void			*mrd_sringp;
+};
+
+/*
+ * Client interface functions.
+ */
+extern int			mac_open(const char *, uint_t, mac_handle_t *);
+extern void			mac_close(mac_handle_t);
+extern const mac_info_t		*mac_info(mac_handle_t);
+extern processorid_t		mac_intr_cpuid(mac_handle_t);
+extern boolean_t		mac_info_get(const char *, mac_info_t *);
+extern uint64_t			mac_stat_get(mac_handle_t, uint_t);
+extern int			mac_start(mac_handle_t);
+extern void			mac_stop(mac_handle_t);
+extern int			mac_promisc_set(mac_handle_t, boolean_t,
+    mac_promisc_type_t);
+extern boolean_t		mac_promisc_get(mac_handle_t,
+    mac_promisc_type_t);
+extern int 			mac_multicst_add(mac_handle_t, const uint8_t *);
+extern int 			mac_multicst_remove(mac_handle_t,
+    const uint8_t *);
+extern boolean_t		mac_unicst_verify(mac_handle_t,
+    const uint8_t *, uint_t);
+extern int			mac_unicst_set(mac_handle_t, const uint8_t *);
+extern void			mac_unicst_get(mac_handle_t, uint8_t *);
+extern void			mac_dest_get(mac_handle_t, uint8_t *);
+extern void			mac_resources(mac_handle_t);
+extern void			mac_ioctl(mac_handle_t, queue_t *, mblk_t *);
+extern const mac_txinfo_t	*mac_tx_get(mac_handle_t);
+extern const mac_txinfo_t	*mac_vnic_tx_get(mac_handle_t);
+extern link_state_t		mac_link_get(mac_handle_t);
+extern mac_notify_handle_t	mac_notify_add(mac_handle_t, mac_notify_t,
+    void *);
+extern void			mac_notify_remove(mac_handle_t,
+    mac_notify_handle_t);
+extern void			mac_notify(mac_handle_t);
+extern mac_rx_handle_t		mac_rx_add(mac_handle_t, mac_rx_t, void *);
+extern mac_rx_handle_t		mac_active_rx_add(mac_handle_t, mac_rx_t,
+    void *);
+extern void			mac_rx_remove(mac_handle_t, mac_rx_handle_t,
+    boolean_t);
+extern void			mac_rx_remove_wait(mac_handle_t);
+extern mblk_t			*mac_txloop(void *, mblk_t *);
+extern mac_txloop_handle_t	mac_txloop_add(mac_handle_t, mac_txloop_t,
+    void *);
+extern void			mac_txloop_remove(mac_handle_t,
+    mac_txloop_handle_t);
+extern boolean_t		mac_active_set(mac_handle_t);
+extern boolean_t		mac_active_shareable_set(mac_handle_t);
+extern void			mac_active_clear(mac_handle_t);
+extern void			mac_active_rx(void *, mac_resource_handle_t,
+    mblk_t *);
+extern boolean_t		mac_vnic_set(mac_handle_t, mac_txinfo_t *,
+    mac_getcapab_t, void *);
+extern void			mac_vnic_clear(mac_handle_t);
+extern void			mac_resource_set(mac_handle_t,
+    mac_resource_add_t, mac_resource_bind_t, void *);
+extern void			mac_get_cpus(mac_handle_t, net_bind_cpu_t *);
+extern void			mac_set_cpus(mac_handle_t, net_bind_cpu_t *);
+mac_rx_ring_desc_t		*mac_get_ring_desc(mac_handle_t);
+extern dev_info_t		*mac_devinfo_get(mac_handle_t);
+extern boolean_t		mac_capab_get(mac_handle_t, mac_capab_t,
+    void *);
+extern boolean_t		mac_vnic_capab_get(mac_handle_t, mac_capab_t,
+    void *);
+extern boolean_t		mac_sap_verify(mac_handle_t, uint32_t,
+    uint32_t *);
+extern mblk_t			*mac_header(mac_handle_t, const uint8_t *,
+    uint32_t, mblk_t *, size_t);
+extern int			mac_header_info(mac_handle_t, mblk_t *,
+    mac_header_info_t *);
+extern mblk_t			*mac_header_cook(mac_handle_t, mblk_t *);
+extern mblk_t			*mac_header_uncook(mac_handle_t, mblk_t *);
+
+/*
+ * Driver interface functions.
+ */
+extern mac_register_t		*mac_alloc(uint_t);
+extern void			mac_free(mac_register_t *);
+extern int			mac_register(mac_register_t *, mac_handle_t *);
+extern int  			mac_unregister(mac_handle_t);
+extern int  			mac_disable(mac_handle_t);
+extern void 			mac_rx(mac_handle_t, mac_resource_handle_t,
+    mblk_t *);
+extern void 			mac_rx_default(mac_handle_t,
+    mac_resource_handle_t, mblk_t *, boolean_t);
+extern void 			mac_link_update(mac_handle_t, link_state_t);
+extern void 			mac_unicst_update(mac_handle_t,
+    const uint8_t *);
+extern void			mac_tx_update(mac_handle_t);
+extern void			mac_resource_update(mac_handle_t);
+extern mac_resource_handle_t	mac_client_resource_add(mac_handle_t,
+    mac_resource_t *);
+extern mac_resource_handle_t	mac_resource_add(mac_handle_t,
+    mac_resource_t *);
+extern int			mac_resource_bind(mac_handle_t,
+    mac_resource_handle_t, processorid_t);
+extern int			mac_pdata_update(mac_handle_t, void *,
+    size_t);
+extern void			mac_multicst_refresh(mac_handle_t,
+    mac_multicst_t, void *, boolean_t);
+extern void			mac_unicst_refresh(mac_handle_t, mac_unicst_t,
+    void *);
+extern void			mac_promisc_refresh(mac_handle_t,
+    mac_setpromisc_t, void *);
+extern void			mac_init_ops(struct dev_ops *, const char *);
+extern void			mac_fini_ops(struct dev_ops *);
+extern mactype_register_t	*mactype_alloc(uint_t);
+extern void			mactype_free(mactype_register_t *);
+extern int			mactype_register(mactype_register_t *);
+extern int			mactype_unregister(const char *);
+extern mac_classify_status_t	mac_rx_classify_flow_add(mac_handle_t,
+    flow_entry_t *, boolean_t, mac_rx_func_t, void *,
+    mac_resource_handle_t, net_bind_cpu_t *);
+
+extern int			mac_rx_classify_flow_rem(mac_handle_t,
+    flow_entry_t *);
+extern int			mac_rx_classify_flow_update(mac_handle_t,
+    flow_entry_t *, mac_rx_func_t, void *, mac_resource_handle_t, boolean_t);
+
+#endif	/* _KERNEL */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _SYS_MAC_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/mac_ether.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/mac_ether.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/mac_ether.h	(revision 5585)
@@ -0,0 +1,157 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_MAC_ETHER_H
+#define	_SYS_MAC_ETHER_H
+
+#pragma ident	"@(#)mac_ether.h	1.1	06/06/29 SMI"
+
+/*
+ * Ethernet MAC Plugin
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#ifdef	_KERNEL
+
+#define	MAC_PLUGIN_IDENT_ETHER	"mac_ether"
+
+enum ether_stat {
+	/* RFC 1643 stats */
+	ETHER_STAT_ALIGN_ERRORS = MACTYPE_STAT_MIN,
+	ETHER_STAT_FCS_ERRORS,
+	ETHER_STAT_FIRST_COLLISIONS,
+	ETHER_STAT_MULTI_COLLISIONS,
+	ETHER_STAT_SQE_ERRORS,
+	ETHER_STAT_DEFER_XMTS,
+	ETHER_STAT_TX_LATE_COLLISIONS,
+	ETHER_STAT_EX_COLLISIONS,
+	ETHER_STAT_MACXMT_ERRORS,
+	ETHER_STAT_CARRIER_ERRORS,
+	ETHER_STAT_TOOLONG_ERRORS,
+	ETHER_STAT_MACRCV_ERRORS,
+
+	/* MII/GMII stats */
+	ETHER_STAT_XCVR_ADDR,
+	ETHER_STAT_XCVR_ID,
+	ETHER_STAT_XCVR_INUSE,
+	ETHER_STAT_CAP_1000FDX,
+	ETHER_STAT_CAP_1000HDX,
+	ETHER_STAT_CAP_100FDX,
+	ETHER_STAT_CAP_100HDX,
+	ETHER_STAT_CAP_10FDX,
+	ETHER_STAT_CAP_10HDX,
+	ETHER_STAT_CAP_ASMPAUSE,
+	ETHER_STAT_CAP_PAUSE,
+	ETHER_STAT_CAP_AUTONEG,
+	ETHER_STAT_ADV_CAP_1000FDX,
+	ETHER_STAT_ADV_CAP_1000HDX,
+	ETHER_STAT_ADV_CAP_100FDX,
+	ETHER_STAT_ADV_CAP_100HDX,
+	ETHER_STAT_ADV_CAP_10FDX,
+	ETHER_STAT_ADV_CAP_10HDX,
+	ETHER_STAT_ADV_CAP_ASMPAUSE,
+	ETHER_STAT_ADV_CAP_PAUSE,
+	ETHER_STAT_ADV_CAP_AUTONEG,
+	ETHER_STAT_LP_CAP_1000FDX,
+	ETHER_STAT_LP_CAP_1000HDX,
+	ETHER_STAT_LP_CAP_100FDX,
+	ETHER_STAT_LP_CAP_100HDX,
+	ETHER_STAT_LP_CAP_10FDX,
+	ETHER_STAT_LP_CAP_10HDX,
+	ETHER_STAT_LP_CAP_ASMPAUSE,
+	ETHER_STAT_LP_CAP_PAUSE,
+	ETHER_STAT_LP_CAP_AUTONEG,
+	ETHER_STAT_LINK_ASMPAUSE,
+	ETHER_STAT_LINK_PAUSE,
+	ETHER_STAT_LINK_AUTONEG,
+	ETHER_STAT_LINK_DUPLEX
+};
+
+#define	ETHER_NSTAT	(ETHER_STAT_LINK_DUPLEX - ETHER_STAT_ALIGN_ERRORS + 1)
+
+#define	ETHER_STAT_ISACOUNTER(_ether_stat)				\
+	    ((_ether_stat) == ETHER_STAT_ALIGN_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_FCS_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_FIRST_COLLISIONS ||		\
+		(_ether_stat) == ETHER_STAT_MULTI_COLLISIONS ||		\
+		(_ether_stat) == ETHER_STAT_SQE_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_DEFER_XMTS ||		\
+		(_ether_stat) == ETHER_STAT_TX_LATE_COLLISIONS ||	\
+		(_ether_stat) == ETHER_STAT_EX_COLLISIONS ||		\
+		(_ether_stat) == ETHER_STAT_MACXMT_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_CARRIER_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_TOOLONG_ERRORS ||		\
+		(_ether_stat) == ETHER_STAT_MACRCV_ERRORS)
+
+/*
+ * Some drivers have a need to determine if a particular stat is a MII/GMII
+ * physical layer 802.3 stat.
+ */
+#define	ETHER_STAT_ISMII(_ether_stat)					\
+	((_ether_stat) == ETHER_STAT_XCVR_ADDR ||			\
+	    (_ether_stat) == ETHER_STAT_XCVR_ID ||			\
+	    (_ether_stat) == ETHER_STAT_XCVR_INUSE ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_1000FDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_1000HDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_100FDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_100HDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_10FDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_10HDX ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_ASMPAUSE ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_PAUSE ||			\
+	    (_ether_stat) == ETHER_STAT_CAP_AUTONEG ||			\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_1000FDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_1000HDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_100FDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_100HDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_10FDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_10HDX ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_ASMPAUSE ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_PAUSE ||		\
+	    (_ether_stat) == ETHER_STAT_ADV_CAP_AUTONEG ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_1000FDX ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_1000HDX ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_100FDX ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_100HDX ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_10FDX ||			\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_10HDX ||			\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_ASMPAUSE ||		\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_PAUSE ||			\
+	    (_ether_stat) == ETHER_STAT_LP_CAP_AUTONEG ||		\
+	    (_ether_stat) == ETHER_STAT_LINK_ASMPAUSE ||		\
+	    (_ether_stat) == ETHER_STAT_LINK_PAUSE ||			\
+	    (_ether_stat) == ETHER_STAT_LINK_AUTONEG ||			\
+	    (_ether_stat) == ETHER_STAT_LINK_DUPLEX)
+
+#endif	/* _KERNEL */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _SYS_MAC_ETHER_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/mac_impl.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/mac_impl.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/mac_impl.h	(revision 5585)
@@ -0,0 +1,265 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_MAC_IMPL_H
+#define	_SYS_MAC_IMPL_H
+
+#pragma ident	"@(#)mac_impl.h	1.21	06/11/22 SMI"
+
+#include <sys/mac.h>
+#include <net/if.h>
+#include <sys/flow_impl.h>
+#include <sys/mac_soft_ring.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/*
+ * Statistics maintained internally by the mac module.
+ */
+enum mac_mod_stat {
+	MAC_STAT_LINK_STATE,
+	MAC_STAT_LINK_UP,
+	MAC_STAT_PROMISC
+};
+
+/* Generic linked chain type */
+typedef	struct mac_chain_s {
+	struct mac_chain_s	*next;
+	void			*item;
+} mac_chain_t;
+
+typedef struct mac_multicst_addr_s	mac_multicst_addr_t;
+
+struct mac_multicst_addr_s {
+	mac_multicst_addr_t	*mma_nextp;
+	uint_t			mma_ref;
+	uint8_t			mma_addr[MAXMACADDRLEN];
+};
+
+typedef struct mac_notify_fn_s		mac_notify_fn_t;
+
+struct mac_notify_fn_s {
+	mac_notify_fn_t		*mnf_nextp;
+	mac_notify_t		mnf_fn;
+	void			*mnf_arg;
+};
+
+typedef struct mac_rx_fn_s		mac_rx_fn_t;
+
+struct mac_rx_fn_s {
+	mac_rx_fn_t		*mrf_nextp;
+	mac_rx_t		mrf_fn;
+	void			*mrf_arg;
+	boolean_t		mrf_inuse;
+	boolean_t		mrf_active;
+};
+
+typedef struct mac_txloop_fn_s		mac_txloop_fn_t;
+
+struct mac_txloop_fn_s {
+	mac_txloop_fn_t		*mtf_nextp;
+	mac_txloop_t		mtf_fn;
+	void			*mtf_arg;
+};
+
+typedef struct mactype_s {
+	const char	*mt_ident;
+	uint32_t	mt_ref;
+	uint_t		mt_type;
+	size_t		mt_addr_length;
+	uint8_t		*mt_brdcst_addr;
+	mactype_ops_t	mt_ops;
+	mac_stat_info_t	*mt_stats;	/* array of mac_stat_info_t elements */
+	size_t		mt_statcount;	/* number of elements in mt_stats */
+} mactype_t;
+
+typedef void	(*mac_ring_remove_func_t)(void *, void *);
+typedef int	(*mac_ring_bind_func_t)(void *, void *, processorid_t);
+typedef int	(*mac_ring_modify_func_t)(void *, void *, mac_resource_t *);
+
+#define	MAC_VNIC_TXINFO_REFHOLD(mvt) {				\
+	mutex_enter(&(mvt)->mv_lock);				\
+	(mvt)->mv_refs++;					\
+	mutex_exit(&(mvt)->mv_lock);				\
+}
+
+#define	MAC_VNIC_TXINFO_REFRELE(mvt) {				\
+	mutex_enter(&(mvt)->mv_lock);				\
+	if (--(mvt)->mv_refs == 0 && (mvt)->mv_clearing) {	\
+	    (mvt)->mv_clearing = B_FALSE;			\
+	    cv_signal(&(mvt)->mv_cv);				\
+	}							\
+	mutex_exit(&(mvt)->mv_lock);				\
+}
+
+typedef struct mac_vnic_tx_s {
+	mac_txinfo_t	mv_txinfo;	/* provided by VNIC */
+	uint32_t	mv_refs;
+	kmutex_t	mv_lock;
+	kcondvar_t	mv_cv;
+	boolean_t	mv_clearing;
+} mac_vnic_tx_t;
+
+/*
+ * Each registered MAC is associated with a mac_t structure.
+ */
+struct mac_impl_s {
+	char			mi_name[LIFNAMSIZ];
+	const char		*mi_drvname;
+	uint_t			mi_instance;
+	void			*mi_driver;	/* Driver private data */
+	mac_info_t		mi_info;
+	mactype_t		*mi_type;
+	void			*mi_pdata;
+	size_t			mi_pdata_size;
+	mac_callbacks_t		*mi_callbacks;
+	dev_info_t		*mi_dip;
+	uint32_t		mi_ref;
+	boolean_t		mi_disabled;
+	uint_t			mi_active;
+	link_state_t		mi_linkstate;
+	uint_t			mi_promisc;
+	uint_t			mi_devpromisc;
+	uint8_t			mi_addr[MAXMACADDRLEN];
+	uint8_t			mi_dstaddr[MAXMACADDRLEN];
+	mac_multicst_addr_t	*mi_mmap;
+
+	/*
+	 * These two locks are used for shortlived, non-performance
+	 * critical operations.
+	 */
+	kmutex_t		mi_lock;
+	krwlock_t		mi_rw_lock;
+
+	krwlock_t		mi_notify_lock;
+	mac_notify_fn_t		*mi_mnfp;
+	uint32_t		mi_notify_ref;
+	kcondvar_t		mi_notify_cv;
+	krwlock_t		mi_rx_lock;
+	kcondvar_t		mi_rx_cv;
+	mac_rx_fn_t		*mi_mrfp;
+	uint32_t		mi_rx_ref;
+	uint32_t		mi_rx_removed;
+	krwlock_t		mi_tx_lock;
+	mac_txloop_fn_t		*mi_mtfp;
+	mac_resource_add_t	mi_resource_add;
+	mac_resource_bind_t	mi_resource_bind;
+	void			*mi_resource_arg;
+
+	/* soft ring stuff */
+	mac_resource_add_t	mi_ring_add;
+	mac_ring_remove_func_t	mi_ring_remove;
+	mac_ring_bind_func_t	mi_ring_bind;
+	mac_ring_modify_func_t	mi_ring_modify;
+	mac_soft_ring_t		**mi_soft_ring_list;
+	uint_t			mi_soft_ring_list_size;
+	uint_t			mi_soft_ring_size;
+	kcondvar_t		mi_soft_ring_cv;
+	boolean_t		mi_soft_ring_deleting;
+	uint32_t		mi_fanout_ref;
+
+	/*
+	 * place to store the argument to
+	 * mi_ring_add and mi_ring_remove
+	 */
+	void			*mi_soft_ring_arg1;
+
+	/*
+	 * mi_rx_rings is the chain of available receive rings from the
+	 * MAC provider.
+	 * mi_rx_rings_inuse are the rings being used for a flow/VNIC
+	 * mi_rx_soft_rings are the software ring descriptor chain.
+	 */
+	mac_chain_t		*mi_rx_rings;
+	mac_chain_t		*mi_rx_rings_inuse;
+	mac_chain_t		*mi_rx_soft_rings;
+
+	/*
+	 * This MAC's table of sub-flows
+	 */
+	flow_tab_t		*mi_flow_tab;
+	mac_rxclassify_fn_t	mi_mcfp;
+
+	/*
+	 * and the multiple MAC addresses
+	 */
+	multiaddress_capab_t	mi_mmcp;
+
+	kstat_t			*mi_ksp;
+	uint_t			mi_kstat_count;
+	boolean_t		mi_activelink;
+	mac_rx_fn_t		*mi_active_mrfp;
+	mac_txinfo_t		mi_txinfo;
+	mac_txinfo_t		mi_txloopinfo;
+
+	/*
+	 * VNIC support
+	 */
+	boolean_t		mi_shareable;
+	boolean_t		mi_vnic_present;
+	mac_vnic_tx_t		*mi_vnic_tx;
+	mac_txinfo_t		mi_vnic_txinfo;
+	mac_txinfo_t		mi_vnic_txloopinfo;
+	mac_getcapab_t		mi_vnic_getcapab_fn;
+	void			*mi_vnic_getcapab_arg;
+	net_bind_cpu_t		mi_bind_cpu;
+};
+
+#define	mi_getstat	mi_callbacks->mc_getstat
+#define	mi_start	mi_callbacks->mc_start
+#define	mi_stop		mi_callbacks->mc_stop
+#define	mi_setpromisc	mi_callbacks->mc_setpromisc
+#define	mi_multicst	mi_callbacks->mc_multicst
+#define	mi_unicst	mi_callbacks->mc_unicst
+#define	mi_resources	mi_callbacks->mc_resources
+#define	mi_tx		mi_callbacks->mc_tx
+#define	mi_ioctl	mi_callbacks->mc_ioctl
+#define	mi_getcapab	mi_callbacks->mc_getcapab
+
+typedef struct mac_notify_task_arg {
+	mac_impl_t		*mnt_mip;
+	mac_notify_type_t	mnt_type;
+} mac_notify_task_arg_t;
+
+#define	MRD_DRIVER_RX_HANDLE(mrd) ((mrd)->mrd_driver_rx).mr_fifo.mrf_arg
+
+extern void	mac_init(void);
+extern int	mac_fini(void);
+
+extern void	mac_stat_create(mac_impl_t *);
+extern void	mac_stat_destroy(mac_impl_t *);
+extern uint64_t	mac_stat_default(mac_impl_t *, uint_t);
+extern void	mac_create_soft_ring_kstats(mac_impl_t *, int32_t);
+
+extern boolean_t mac_enqueue(mac_chain_t **head, void *item);
+extern void mac_dequeue(mac_chain_t **head, void *item);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _SYS_MAC_IMPL_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/mac_soft_ring.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/mac_soft_ring.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/mac_soft_ring.h	(revision 5585)
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DLS_SOFT_RING_H
+#define	_SYS_DLS_SOFT_RING_H
+
+#pragma ident	"@(#)mac_soft_ring.h	1.6	06/11/20 SMI"
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <sys/cpuvar.h>
+#include <sys/processor.h>
+#include <sys/stream.h>
+#include <sys/squeue.h>
+#include <sys/dlpi.h>
+
+#define	S_RING_NAMELEN 64
+
+typedef void (*s_ring_proc_t)(void *, void *, mblk_t *);
+
+typedef struct mac_soft_ring_s {
+	/* Keep the most used members 64bytes cache aligned */
+	kmutex_t	s_ring_lock;	/* lock before using any member */
+	uint16_t	s_ring_type;	/* processing model of the sq */
+	uint16_t	s_ring_state;	/* state flags and message count */
+	int		s_ring_count;	/* # of mblocks in mac_soft_ring */
+	mblk_t		*s_ring_first;	/* first mblk chain or NULL */
+	mblk_t		*s_ring_last;	/* last mblk chain or NULL */
+	s_ring_proc_t	s_ring_rx_func;
+	void		*s_ring_rx_arg1;
+	void		*s_ring_rx_arg2;
+	s_ring_proc_t	s_ring_rx_saved_func;
+	void		*s_ring_rx_saved_arg1;
+	void		*s_ring_rx_saved_arg2;
+	clock_t		s_ring_awaken;	/* time async thread was awakened */
+
+	kthread_t	*s_ring_run;	/* Current thread processing sq */
+	processorid_t	s_ring_bind;	/* processor to bind to */
+	kcondvar_t	s_ring_async;	/* async thread blocks on */
+	clock_t		s_ring_wait;	/* lbolts to wait after a fill() */
+	timeout_id_t	s_ring_tid;	/* timer id of pending timeout() */
+	kthread_t	*s_ring_worker;	/* kernel thread id */
+	char		s_ring_name[S_RING_NAMELEN + 1];
+	uint32_t	s_ring_total_inpkt;
+	uint32_t	s_ring_drops;
+	void		*s_ring_mip;
+	kstat_t		*s_ring_ksp;
+} mac_soft_ring_t;
+
+/*
+ * type flags - combination allowed to process and drain the queue
+ */
+#define	S_RING_WORKER_ONLY  	0x0001	/* Worker thread only */
+#define	S_RING_ANY		0x0002	/* Any thread can process the queue */
+
+/*
+ * State flags.
+ */
+#define	S_RING_PROC	0x0001	/* being processed */
+#define	S_RING_BOUND	0x0004	/* Worker thread is bound to a cpu */
+#define	S_RING_DESTROY	0x0008	/* Ring is being destroyed */
+#define	S_RING_DEAD	0x0010	/* Worker thread is no more */
+#define	S_RING_SQUEUE	0x0020	/* This soft ring has a matching squeue */
+#define	S_RING_BLANK	0x0040	/* soft ring has been put into polling mode */
+
+/*
+ * arguments for processors to bind to
+ */
+#define	S_RING_BIND_NONE	-1
+
+/*
+ * Structure for dls statistics
+ */
+struct dls_kstats {
+	kstat_named_t	dlss_soft_ring_pkt_drop;
+};
+
+extern struct dls_kstats dls_kstat;
+
+#define	DLS_BUMP_STAT(x, y)	(dls_kstat.x.value.ui32 += y)
+
+extern void mac_soft_ring_init(void);
+extern void mac_soft_ring_finish(void);
+extern void mac_soft_ring_nosqueue(void *);
+extern void mac_soft_ring_fanout_disable(mac_handle_t);
+void mac_soft_ring_resource_set(mac_handle_t, dl_capab_dls_t *);
+extern boolean_t mac_soft_ring_fanout_enable(mac_handle_t);
+extern int mac_soft_ring_fanout_modify(mac_handle_t);
+extern mblk_t *mac_ether_soft_ring_fanout(mac_handle_t,
+    mac_resource_handle_t, mblk_t *);
+extern mac_soft_ring_t *mac_soft_ring_create(char *, clock_t, uint_t, pri_t,
+    mac_handle_t);
+extern cpu_t *mac_soft_ring_bind(mac_soft_ring_t *, processorid_t);
+extern void mac_soft_ring_process(mac_handle_t, mac_soft_ring_t *, mblk_t *);
+extern void mac_soft_ring_blank(void *, time_t, uint_t, int);
+extern mblk_t *mac_soft_ring_poll(mac_soft_ring_t *, int);
+extern void mac_soft_ring_destroy(mac_soft_ring_t *);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _SYS_DLS_SOFT_RING_H */
Index: /trunk/src/VBox/Devices/Network/solaris/sys/vnic.h
===================================================================
--- /trunk/src/VBox/Devices/Network/solaris/sys/vnic.h	(revision 5585)
+++ /trunk/src/VBox/Devices/Network/solaris/sys/vnic.h	(revision 5585)
@@ -0,0 +1,183 @@
+/*
+ * 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
+ * or http://www.opensolaris.org/os/licensing.
+ * 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 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_VNIC_H
+#define	_SYS_VNIC_H
+
+#pragma ident	"@(#)vnic.h	1.17	06/12/06 SMI"
+
+#include <sys/types.h>
+#include <sys/ethernet.h>
+#include <sys/param.h>
+#include <sys/mac.h>
+#include <sys/flow.h>
+#include <inet/ip.h>
+#include <inet/ip6.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* control interface name */
+#define	VNIC_CTL_NODE_NAME	"ctl"
+#define	VNIC_CTL_NODE_MINOR	1		/* control interface minor */
+
+#define	VNIC_IOC(x)	(('v' << 24) | ('n' << 16) | ('i' << 8) | (x))
+
+/*
+ * Allowed VNIC MAC address types.
+ *
+ * - VNIC_MAC_ADDR_TYPE_FIXED, VNIC_MAC_ADDR_TYPE_RANDOM:
+ *   The MAC address is specified by value by the caller, which
+ *   itself can obtain it from the user directly,
+ *   or pick it in a random fashion. Which method is used by the
+ *   caller is irrelevant to the VNIC driver. However two different
+ *   types are provided so that the information can be made available
+ *   back to user-space when listing the kernel defined VNICs.
+ *
+ *   When a VNIC is created, the address in passed through the
+ *   vc_mac_addr and vc_mac_len fields of the vnic_ioc_create_t
+ *   structure.
+ *
+ * - VNIC_MAC_ADDR_TYPE_FACTORY: the MAC address is obtained from
+ *   one of the MAC factory MAC addresses of the underyling NIC.
+ *
+ * - VNIC_MAC_ADDR_TYPE_AUTO: the VNIC driver attempts to
+ *   obtain the address from one of the factory MAC addresses of
+ *   the underlying NIC. If none is available, the specified
+ *   MAC address value is used.
+ */
+
+typedef enum {
+	VNIC_MAC_ADDR_TYPE_FIXED,
+	VNIC_MAC_ADDR_TYPE_RANDOM,
+	VNIC_MAC_ADDR_TYPE_FACTORY,
+	VNIC_MAC_ADDR_TYPE_AUTO
+} vnic_mac_addr_type_t;
+
+#define	VNIC_IOC_CREATE		VNIC_IOC(1)
+
+typedef struct vnic_ioc_create {
+	uint_t		vc_vnic_id;
+	uchar_t		vc_dev_name[MAXNAMELEN];
+	vnic_mac_addr_type_t vc_mac_addr_type;
+	uint_t		vc_mac_len;
+	uchar_t		vc_mac_addr[MAXMACADDRLEN];
+	char		vc_pad[4];
+	uint_t		vc_mac_slot;
+	net_resource_ctl_t vc_resource_ctl;
+	net_bind_cpu_t	vc_bind_cpu;
+} vnic_ioc_create_t;
+
+#ifdef _SYSCALL32
+
+typedef struct vnic_ioc_create32 {
+	uint32_t	vc_vnic_id;
+	uchar_t		vc_dev_name[MAXNAMELEN];
+	vnic_mac_addr_type_t vc_mac_addr_type;
+	uint32_t	vc_mac_len;
+	uchar_t		vc_mac_addr[MAXMACADDRLEN];
+	char		vc_pad[4];
+	uint32_t	vc_mac_slot;
+	net_resource_ctl_t vc_resource_ctl;
+	net_bind_cpu_t	vc_bind_cpu;
+} vnic_ioc_create32_t;
+
+#endif /* _SYSCALL32 */
+
+#define	VNIC_IOC_DELETE		VNIC_IOC(2)
+
+typedef struct vnic_ioc_delete {
+	uint_t		vd_vnic_id;
+} vnic_ioc_delete_t;
+
+#ifdef _SYSCALL32
+
+typedef struct vnic_ioc_delete32 {
+	uint32_t	vd_vnic_id;
+} vnic_ioc_delete32_t;
+
+#endif /* _SYSCALL32 */
+
+#define	VNIC_IOC_INFO		VNIC_IOC(3)
+
+typedef struct vnic_ioc_info_vnic {
+	uint32_t	vn_vnic_id;
+	uchar_t		vn_mac_addr[MAXMACADDRLEN];
+	char		vn_dev_name[MAXNAMELEN];
+	flow_desc_t	vn_flow_desc;
+	net_resource_ctl_t	vn_resource_ctl;
+} vnic_ioc_info_vnic_t;
+
+typedef struct vnic_ioc_info {
+	uint_t		vi_nvnics;
+	uint_t		vi_vnic_id;	/* 0 returns all */
+	char		vi_dev_name[MAXNAMELEN];
+} vnic_ioc_info_t;
+
+#ifdef _SYSCALL32
+
+typedef struct vnic_ioc_info32 {
+	uint32_t	vi_nvnics;
+	uint32_t	vi_vnic_id;	/* 0 returns all */
+	char		vi_dev_name[MAXNAMELEN];
+} vnic_ioc_info32_t;
+
+#endif /* _SYSCALL32 */
+
+#define	VNIC_IOC_MODIFY		VNIC_IOC(4)
+
+#define	VNIC_IOC_MODIFY_ADDR		0x01
+#define	VNIC_IOC_MODIFY_RESOURCE_CTL	0x02
+
+typedef struct vnic_ioc_modify {
+	uint_t		vm_vnic_id;
+	uint_t		vm_modify_mask;
+	uint_t		vm_mac_len;
+	uint_t		vm_mac_slot;
+	uchar_t		vm_mac_addr[MAXMACADDRLEN];
+	vnic_mac_addr_type_t vm_mac_addr_type;
+	net_resource_ctl_t vm_resource_ctl;
+} vnic_ioc_modify_t;
+
+#ifdef _SYSCALL32
+
+typedef struct vnic_ioc_modify32 {
+	uint32_t	vm_vnic_id;
+	uint32_t	vm_modify_mask;
+	uint32_t	vm_mac_len;
+	uint32_t	vm_mac_slot;
+	uchar_t		vm_mac_addr[MAXMACADDRLEN];
+	vnic_mac_addr_type_t vm_mac_addr_type;
+	net_resource_ctl_t vm_resource_ctl;
+} vnic_ioc_modify32_t;
+
+#endif /* _SYSCALL32 */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _SYS_VNIC_H */
