vnic_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_VNIC_IMPL_H
#define _SYS_VNIC_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*vnic_rx_fn_t)(void *, void *, mblk_t *);
typedef struct vnic_flow_fn_info_s {
void *ff_arg1;
void *ff_arg2;
typedef struct vnic_flow_s {
void *vf_cookie;
struct vnic_flow_s *vf_next;
} vnic_flow_t;
typedef struct vnic_flow_tab_s {
typedef struct vnic_mac_s {
const mac_txinfo_t *va_txinfo;
struct vnic_bcast_grp_s *va_bcast_grp;
struct vnic_s *va_promisc;
} vnic_mac_t;
typedef struct vnic_s {
vn_started : 1,
vn_promisc : 1,
vn_bcast_grp : 1,
vn_multi_mac : 1,
vn_promisc_mac : 1,
vn_pad_to_bit_31 : 27;
int vn_slot_id;
struct vnic_s *vn_promisc_next;
} vnic_t;
#define VNIC_FLOW_REFHOLD(flow) { \
}
#define VNIC_FLOW_REFRELE(flow) { \
} \
}
extern int vnic_dev_delete(datalink_id_t);
typedef int (*vnic_info_new_vnic_fn_t)(void *, datalink_id_t,
extern void vnic_dev_init(void);
extern void vnic_dev_fini(void);
extern uint_t vnic_dev_count(void);
extern dev_info_t *vnic_get_dip(void);
extern void vnic_bcast_init(void);
extern void vnic_bcast_fini(void);
extern void vnic_bcast_send(void *, void *, mblk_t *);
extern void vnic_classifier_init(void);
extern void vnic_classifier_fini(void);
boolean_t, int);
extern void vnic_classifier_flow_destroy(vnic_flow_t *);
void *, void *);
void *, void *);
extern void vnic_classifier_flow_tab_fini(vnic_mac_t *);
extern void *vnic_classifier_get_client_cookie(vnic_flow_t *);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VNIC_IMPL_H */