xnf.h revision 64c5e63c84c5665dcd9fdd6e0852f65f4e4023f1
/*
* 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 _SYS_XNF_H
#define _SYS_XNF_H
#ifdef __cplusplus
extern "C" {
#endif
#define XNF_MAX_RXDESCS 256
#define MCAST_HASHBITS 256
extern int xnf_diagnose; /* Available for use any time. */
/* Flags to set in the global xnf_diagnose */
#define XNF_DIAG_RX 0x01
#define XNF_DIAG_TX 0x02
#define XNF_DIAG_STATS 0x04
#define XNF_DIAG_RX_BUFS 0x08
/* DEBUG flags */
#define XNF_DEBUG_DDI 0x01
#define XNF_DEBUG_TRACE 0x02
#define XNF_DEBUG_SEND 0x04
#define XNF_DEBUG_INT 0x08
#define XNF_DESC_ALIGN 8
struct xnf_buffer_desc {
};
/* Various information about each transmit packet */
struct tx_pktinfo {
};
/* Per network-interface-controller driver private structure */
typedef struct xnf {
/* most interesting stuff first to assist debugging */
int xnf_tx_descs_free;
int xnf_rx_descs_free; /* count of free rx bufs */
int xnf_n_tx; /* No. xmit descriptors */
int xnf_n_rx; /* No. recv descriptors */
int xnf_n_rx_bufs; /* No. recv DMA buffers */
unsigned char xnf_mac_addr[ETHERADDRL];
int xnf_max_rx_bufs;
int xnf_rx_buffer_count;
int xnf_tx_buffer_count;
struct xnf_buffer_desc *xnf_free_list;
struct xnf_buffer_desc *xnf_tx_free_list;
int xnf_tx_pkt_id_list;
/* free list of avail pkt ids */
} xnf_t;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_XNF_H */