/*
* 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
*/
/*
*/
#ifndef _SYS_VDP_H
#define _SYS_VDP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <syslog.h>
#include <libdlpi.h>
#include <ecp.h>
#include <sys/mac_flow.h>
/*
* VDP TLV Types
*/
typedef enum vdp_tlv_type_s {
VDP_TLV_NONE = 0,
/*
* VDP VSIID formats
*/
typedef enum vdp_tlv_vsiid_fmt_s {
/*
* VDP Filter Info Formats
*/
typedef enum vdp_tlv_fltr_fmt_s {
/* assumes a pointer to a 3-byte array */
#define vdp_ntoh24(p) \
*((uint8_t *)((p)+2)))
/* assumes a pointer to a 3 byte array, and an integer value */
#define vdp_hton24(p, v) {\
p[0] = (((v) >> 16) & 0xFF); \
p[1] = (((v) >> 8) & 0xFF); \
p[2] = ((v) & 0xFF); \
}
/* Oracle OUI subtype */
/* VDP Stats */
typedef struct vdp_stat_s {
} vdp_stat_t;
/* VDP timers */
typedef struct vdp_timers_s {
} vdp_timers_t;
/* VDP args passed via door */
typedef struct vdpt_arg_s {
int vdpt_version;
/*
* The following are used by VDP_ADD_PROFILE.
*/
/*
* Currently only one entry is supported
*/
} vdpt_arg_t;
typedef struct vdp_link_info_s {
/*
* information returned for a profile
*/
/* VDP instance Information */
typedef struct vdpd_vdpinfo_t {
int vi_ver;
int vi_vsitypevers;
/* ECP information for VDP instances */
typedef struct vdpd_ecpinfo_s {
int ve_ver;
extern void vdp_init(int);
extern int vdp_tlv_del(vdpt_arg_t *);
extern int vdp_tlv_fini();
extern char *vdp_tlv_type_to_str(int);
extern char *vdp_vsiid_fmt_to_str(int);
extern char *vdp_tlv_fltr_fmt_to_str(int);
extern void vdp_reason2str(uint8_t, char *, int);
extern char *vdp_vsimgr_encoding(uint8_t);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_VDP_H */