/*
* 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 captures the MAC client API definitions. It can be
* included from any MAC clients.
*/
#ifndef _SYS_MAC_CLIENT_H
#define _SYS_MAC_CLIENT_H
#include <sys/mac_flow.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* MAC client interface.
*/
typedef enum {
} mac_diag_t;
/*
* These are used when MAC clients what to specify tx and rx rings
* properties. MAC_RXRINGS_NONE/MAC_TXRINGS_NONE mean that we should
* not reserve any rings while MAC_RXRINGS_DONTCARE/MAC_TXRINGS_DONTCARE
* mean that the system can decide if it wants to reserve rings or
* not.
*/
#define MAC_RXRINGS_NONE 0
typedef enum {
/* flags passed to mac_unicast_add() */
/* flags passed to mac_client_open */
/* flags passed to mac_client_close */
/* flags passed to mac_promisc_add() */
/* flags passed to mac_tx() */
uint16_t);
extern void mac_rx_clear(mac_client_handle_t);
extern void mac_secondary_cleanup(mac_client_handle_t);
extern void mac_promisc_remove(mac_promisc_handle_t);
extern void mac_notify_remove_wait(mac_handle_t);
extern int mac_rename_primary(mac_handle_t, const char *);
extern char *mac_client_name(mac_client_handle_t);
extern int mac_open(const char *, mac_handle_t *);
extern void mac_close(mac_handle_t);
mac_diag_t *);
extern int mac_addr_factory_reserve(mac_client_handle_t, int *);
char *, boolean_t *);
mac_tx_notify_t, void *);
extern int mac_client_set_resources(mac_client_handle_t,
extern void mac_client_get_resources(mac_client_handle_t,
extern void mac_client_get_eff_resources(mac_client_handle_t,
/* bridging-related interfaces */
extern int mac_share_capable(mac_handle_t);
extern void mac_share_unbind(mac_client_handle_t);
extern void mac_client_set_rings(mac_client_handle_t, int, int);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MAC_CLIENT_H */