#ifndef _FC_TYPES_H
#define _FC_TYPES_H
#include <sys/types.h>
#include <sys/param.h>
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
#error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
#endif
#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/cmn_err.h>
#include <sys/debug.h>
#include <sys/devops.h>
#include <sys/callb.h>
#include <sys/disp.h>
#include <sys/taskq.h>
#endif
#ifndef _SYS_SCSI_SCSI_TYPES_H
typedef void *opaque_t;
#endif
#define EC_SUNFC "EC_sunfc"
#define ESC_SUNFC_PORT_ATTACH "ESC_sunfc_port_attach"
#define ESC_SUNFC_PORT_DETACH "ESC_sunfc_port_detach"
#define ESC_SUNFC_PORT_ONLINE "ESC_sunfc_port_online"
#define ESC_SUNFC_PORT_OFFLINE "ESC_sunfc_port_offline"
#define ESC_SUNFC_PORT_RSCN "ESC_sunfc_port_rscn"
#define ESC_SUNFC_TARGET_ADD "ESC_sunfc_target_add"
#define ESC_SUNFC_TARGET_REMOVE "ESC_sunfc_target_remove"
#define ESC_SUNFC_DEVICE_ONLINE "ESC_sunfc_device_online"
#define ESC_SUNFC_DEVICE_OFFLINE "ESC_sunfc_device_offline"
typedef uint64_t fc_hba_state_change_t;
typedef struct port_id {
#if defined(_BIT_FIELDS_LTOH)
uint32_t port_id : 24,
priv_lilp_posit : 8;
#else
uint32_t priv_lilp_posit : 8,
port_id : 24;
#endif
} fc_portid_t;
typedef struct hard_addr {
#if defined(_BIT_FIELDS_LTOH)
uint32_t hard_addr : 24,
rsvd : 8;
#else
uint32_t rsvd : 8,
hard_addr : 24;
#endif
} fc_hardaddr_t;
typedef struct port_type {
#if defined(_BIT_FIELDS_LTOH)
uint32_t rsvd : 24,
port_type : 8;
#else
uint32_t port_type : 8,
rsvd : 24;
#endif
} fc_porttype_t;
typedef enum fc_reset_action {
FC_RESET_RETURN_NONE,
FC_RESET_RETURN_ALL,
FC_RESET_RETURN_OUTSTANDING
} fc_reset_action_t;
typedef enum fc_dma_behavior {
FC_ALLOW_STREAMING,
FC_NO_STREAMING
} fc_dma_behavior_t;
typedef enum fc_fcp_dma {
FC_DVMA_SPACE,
FC_NO_DVMA_SPACE
} fc_fcp_dma_t;
typedef struct fc_ulp_rscn_info {
uint32_t ulp_rscn_count;
} fc_ulp_rscn_info_t;
#define FC_INVALID_RSCN_COUNT ((uint32_t)0)
#ifdef _KERNEL
#include <sys/fibre-channel/impl/fcph.h>
#include <sys/fibre-channel/fc_appif.h>
#include <sys/fibre-channel/impl/fc_linkapp.h>
#include <sys/fibre-channel/impl/fcgs2.h>
#include <sys/fibre-channel/impl/fc_fla.h>
#include <sys/fibre-channel/impl/fcal.h>
#include <sys/fibre-channel/impl/fctl.h>
#include <sys/fibre-channel/impl/fc_error.h>
#include <sys/fibre-channel/fcio.h>
#include <sys/fibre-channel/ulp/fcp.h>
#include <sys/fibre-channel/ulp/fcp_util.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
#include <sys/stat.h>
#include <sys/sunndi.h>
#include <sys/devctl.h>
#endif
#ifdef __cplusplus
}
#endif
#endif