mac_client_priv.h revision 1a41ca239310955ae95b2569b707432432a58580
/*
* 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.
* Copyright 2013 Joyent, Inc. All rights reserved.
*/
/*
* This file contains *private* MAC API definitions. This header file
* should only be included by kernel components which are part of the
* GLDv3 stack (dld, dls, aggr, softmac).
*/
#ifndef _SYS_MAC_CLIENT_PRIV_H
#define _SYS_MAC_CLIENT_PRIV_H
#include <sys/mac_flow.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#ifdef DEBUG
#else
#define MAC_PERIM_HELD(mph)
#endif
void *);
extern void mac_rx_bypass_enable(mac_client_handle_t);
extern void mac_rx_bypass_disable(mac_client_handle_t);
extern int mac_start(mac_handle_t);
extern void mac_stop(mac_handle_t);
extern void *mac_driver(mac_handle_t);
size_t);
extern void mac_resource_set_common(mac_client_handle_t,
mac_resource_restart_t, mac_resource_bind_t, void *);
extern int mac_perim_enter_by_macname(const char *, mac_perim_handle_t *);
extern void mac_perim_exit(mac_perim_handle_t);
extern void mac_client_poll_enable(mac_client_handle_t);
extern void mac_client_poll_disable(mac_client_handle_t);
/*
* Flow-related APIs for MAC clients.
*/
extern void mac_link_init_flows(mac_client_handle_t);
extern void mac_link_release_flows(mac_client_handle_t);
extern int mac_link_flow_remove(char *);
extern int mac_link_flow_modify(char *, mac_resource_props_t *);
typedef struct {
char fi_flow_name[MAXFLOWNAMELEN];
extern int mac_link_flow_walk(datalink_id_t,
int (*)(mac_flowinfo_t *, void *), void *);
extern int mac_link_flow_info(char *, mac_flowinfo_t *);
extern void mac_rx_client_quiesce(mac_client_handle_t);
extern void mac_rx_client_restart(mac_client_handle_t);
extern void mac_tx_client_quiesce(mac_client_handle_t);
extern void mac_tx_client_condemn(mac_client_handle_t);
extern void mac_tx_client_restart(mac_client_handle_t);
extern void mac_hwring_teardown(mac_ring_handle_t);
extern int mac_hwring_disable_intr(mac_ring_handle_t);
extern int mac_hwring_enable_intr(mac_ring_handle_t);
extern int mac_hwring_start(mac_ring_handle_t);
extern void mac_hwring_stop(mac_ring_handle_t);
mac_ring_handle_t, mblk_t *);
extern int mac_mark_exclusive(mac_handle_t);
extern void mac_unmark_exclusive(mac_handle_t);
extern void *mac_get_devinfo(mac_handle_t);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MAC_CLIENT_PRIV_H */