mac_impl.h revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
/*
* 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_MAC_IMPL_H
#define _SYS_MAC_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct mac_multicst_addr_s mac_multicst_addr_t;
struct mac_multicst_addr_s {
};
typedef struct mac_margin_req_s mac_margin_req_t;
struct mac_margin_req_s {
};
typedef struct mac_notify_fn_s mac_notify_fn_t;
struct mac_notify_fn_s {
void *mnf_arg;
};
typedef struct mac_rx_fn_s mac_rx_fn_t;
struct mac_rx_fn_s {
void *mrf_arg;
};
typedef struct mac_txloop_fn_s mac_txloop_fn_t;
struct mac_txloop_fn_s {
void *mtf_arg;
};
typedef struct mactype_s {
const char *mt_ident;
} mactype_t;
#define MAC_VNIC_TXINFO_REFHOLD(mvt) { \
}
#define MAC_VNIC_TXINFO_REFRELE(mvt) { \
} \
}
typedef struct mac_vnic_tx_s {
/*
* Each registered MAC is associated with a mac_t structure.
*/
typedef struct mac_impl_s {
/*
* The following fields are set in mac_register() and will not be
* changed until mac_unregister(). No lock is needed to access them.
*/
void *mi_driver; /* Driver private data */
void *mi_pdata;
void *mi_resource_add_arg;
/* for removal */
void *mi_vnic_getcapab_arg;
/*
* List of margin value requests added by mac clients. This list is
* sorted: the first one has the greatest value.
*/
} mac_impl_t;
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 *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MAC_IMPL_H */