/*
* 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.
*/
#ifndef _SYS_VNIC_H
#define _SYS_VNIC_H
#include <sys/ethernet.h>
#include <sys/mac_flow.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Extended diagnostic codes that can be returned by the various
*/
typedef enum {
/*
* 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.
*
* - VNIC_MAC_ADDR_TYPE_PRIMARY: this is a VNIC based VLAN. The
* address for this is the address of the primary MAC client.
*
*/
typedef enum {
#pragma pack(4)
#endif
/*
* Force creation of VLAN based VNIC without checking if the
* undelying MAC supports the margin size.
*/
typedef struct vnic_ioc_create {
int vc_mac_slot;
int vc_af;
typedef struct vnic_ioc_delete {
typedef struct vnic_info {
int vn_af;
} vnic_info_t;
typedef struct vnic_ioc_info {
typedef struct vnic_ioc_modify {
int vm_mac_slot;
#pragma pack()
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VNIC_H */