#ifndef _SYS_OVERLAY_H
#define _SYS_OVERLAY_H
#include <sys/param.h>
#include <sys/dld_ioc.h>
#include <sys/mac.h>
#include <sys/overlay_common.h>
#ifdef __cplusplus
extern "C" {
#endif
#define OVERLAY_IOC_CREATE OVERLAYIOC(1)
#define OVERLAY_IOC_DELETE OVERLAYIOC(2)
#define OVERLAY_IOC_PROPINFO OVERLAYIOC(3)
#define OVERLAY_IOC_GETPROP OVERLAYIOC(4)
#define OVERLAY_IOC_SETPROP OVERLAYIOC(5)
#define OVERLAY_IOC_NPROPS OVERLAYIOC(6)
#define OVERLAY_IOC_ACTIVATE OVERLAYIOC(7)
#define OVERLAY_IOC_STATUS OVERLAYIOC(8)
typedef struct overlay_ioc_create {
datalink_id_t oic_linkid;
uint32_t oic_filler;
uint64_t oic_vnetid;
char oic_encap[MAXLINKNAMELEN];
} overlay_ioc_create_t;
typedef struct overlay_ioc_activate {
datalink_id_t oia_linkid;
} overlay_ioc_activate_t;
typedef struct overlay_ioc_delete {
datalink_id_t oid_linkid;
} overlay_ioc_delete_t;
typedef struct overlay_ioc_nprops {
datalink_id_t oipn_linkid;
int32_t oipn_nprops;
} overlay_ioc_nprops_t;
typedef struct overlay_ioc_propinfo {
datalink_id_t oipi_linkid;
int32_t oipi_id;
char oipi_name[OVERLAY_PROP_NAMELEN];
uint_t oipi_type;
uint_t oipi_prot;
uint8_t oipi_default[OVERLAY_PROP_SIZEMAX];
uint32_t oipi_defsize;
uint32_t oipi_posssize;
uint8_t oipi_poss[OVERLAY_PROP_SIZEMAX];
} overlay_ioc_propinfo_t;
typedef struct overlay_ioc_prop {
datalink_id_t oip_linkid;
int32_t oip_id;
char oip_name[OVERLAY_PROP_NAMELEN];
uint8_t oip_value[OVERLAY_PROP_SIZEMAX];
uint32_t oip_size;
} overlay_ioc_prop_t;
typedef enum overlay_status {
OVERLAY_I_OK = 0x00,
OVERLAY_I_DEGRADED = 0x01
} overlay_status_t;
typedef struct overlay_ioc_status {
datalink_id_t ois_linkid;
uint_t ois_status;
char ois_message[OVERLAY_STATUS_BUFLEN];
} overlay_ioc_status_t;
#ifdef __cplusplus
}
#endif
#endif