/*
* 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.
*
* xnb.h - definitions for Xen dom0 network driver
*/
#ifndef _SYS_XNB_H
#define _SYS_XNB_H
#include <sys/ethernet.h>
#include <sys/hypervisor.h>
#include <sys/sysmacros.h>
#ifdef __cplusplus
extern "C" {
#endif
/* DEBUG flags */
/*
* The xnb module provides core inter-domain network protocol functionality.
* It is connected to the rest of Solaris in two ways:
* - as a GLDv3 driver (with xnbu),
* - as a GLDv3 consumer (with xnbo).
*
* The different modes of operation are termed "flavours" and each
* instance of an xnb based driver operates in one and only one mode.
* The common xnb driver exports a set of functions to these drivers
* (declarations at the foot of this file) and calls back into the
* drivers via the xnb_flavour_t structure.
*/
typedef struct xnb_flavour {
typedef struct xnb_txbuf {
unsigned int xt_flags;
} xnb_txbuf_t;
/* Per network-interface-controller driver private structure */
struct xnb {
/* most interesting stuff first to assist debugging */
void *xnb_flavour_data;
int xnb_be_status;
int xnb_fe_status;
void *xnb_rx_ring_addr;
void *xnb_tx_ring_addr;
};
extern void xnb_detach(dev_info_t *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_XNB_H */