vnet.h revision 678453a8ed49104d8adad58f3ba591bdc39883e8
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _VNET_H
#define _VNET_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/vnet_res.h>
#include <sys/vnet_mailbox.h>
#define VNET_SUCCESS (0) /* successful return */
#define IS_BROADCAST(ehp) \
#define IS_MULTICAST(ehp) \
/*
* A vnet resource structure.
*/
typedef struct vnet_res {
} vnet_res_t;
#define VNET_DDS_TASK_ADD_SHARE 0x01
#define VNET_DDS_TASK_DEL_SHARE 0x02
#define VNET_DDS_TASK_REL_SHARE 0x04
/* An instance specific DDS structure */
typedef struct vnet_dds_info {
#define VNET_NFDB_HASH 64
/* rwlock macros */
/*
* vnet instance state information
*/
typedef struct vnet {
int instance; /* instance # */
void *vgenhdl; /* Handle for vgen */
} vnet_t;
#define VNET_STARTED 0x01
#ifdef DEBUG
/*
* debug levels:
* DBG_LEVEL2: Info messages
* DBG_LEVEL3: Warning messages
* DBG_LEVEL4: Error messages
*/
DBG_ERR = 0x08 };
#define DBG1(...) do { \
if ((vnet_dbglevel & DBG_LEVEL1) != 0) { \
} \
#define DBG2(...) do { \
if ((vnet_dbglevel & DBG_LEVEL2) != 0) { \
} \
#define DWARN(...) do { \
if ((vnet_dbglevel & DBG_WARN) != 0) { \
} \
#define DERR(...) do { \
if ((vnet_dbglevel & DBG_ERR) != 0) { \
} \
#else
#define DBG1(...) if (0) do { } while (0)
#define DBG2(...) if (0) do { } while (0)
#define DWARN(...) if (0) do { } while (0)
#define DERR(...) if (0) do { } while (0)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _VNET_H */