/*
* 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_PPPT_IC_IF_H
#define _SYS_PPPT_IC_IF_H
#include <sys/stmf_defines.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* ALUA messaging and interconnect API.
*/
/*
* Message type.
*/
typedef enum {
/*
* Message id: uniquely identifies a message.
* This need not be a sequence number since we don't depend on
* messages being delivered in sequence.
*/
/*
* IC message. This is a container for the various specific message types.
*
* Note that the message contains a pointer to an nvlist. This pointer
* is valid only in the case of messages which are unmarshaled from
* nvlists. In that case, it's important to retain a pointer to the nvlist,
* since the message and the nvlist share data in the case of strings
* and array elements, and data in the message may be invalid if used
* after the nvlist is freed.
*/
typedef struct stmf_ic_msg {
/*
* Register port message.
*/
typedef struct {
/* opaque callback data */
/*
* Deregister port message.
*/
typedef struct {
/* opaque callback data */
/*
* Register/deregister lun message.
*/
typedef struct {
char *icrl_lu_provider_name;
/* opaque callback data */
/*
* SCSI cmd msg.
*/
typedef struct {
/*
* fields from scsi_task_t
*/
/*
* SCSI data message.
*/
typedef struct {
/*
* SCSI data xfer done msg
*/
typedef struct {
/*
* SCSI status msg.
*/
typedef struct {
/*
* Ready to transfer (r2t) msg.
*/
typedef struct {
/*
* Status message: sent in response to messages other than SCSI messages.
*/
typedef struct {
/*
*/
typedef struct {
/*
*/
typedef struct {
typedef enum {
STMF_IC_MSG_SUCCESS = 0,
/*
* Function prototypes.
*
* Note: Functions which are exported to other modules must have a function
* typedef and a prototype; the function type definition is used by
* the other module to import the symbol using ddi_modsym().
*/
/* Allocate a register port message */
typedef
/* Allocate a deregister port message */
typedef
/* Allocate a register lun message */
typedef
char *lu_provider_name,
char *lu_provider_name,
/* Allocate a lun active message */
typedef
char *lu_provider_name,
char *lu_provider_name,
/* Allocate a deregister lun message */
typedef
char *lu_provider_name,
char *lu_provider_name,
/* Allocate a scsi cmd message */
typedef
/* Allocate a scsi data message */
typedef
/* Allocate a scsi transfer done message */
typedef
/* Allocate a scsi status message */
/* Allocate a scsi ready to transfer (r2t) message */
/* Allocate a status message */
/* Allocate a session create message */
typedef
/* Allocate a session destroy message */
typedef
/* Allocate an echo request message */
/* Allocate an echo reply message */
/*
* Free a msg.
*/
/*
* Send a message out over the interconnect, in the process marshalling
* the arguments.
*
* After being sent, the message is freed by tx_msg().
*/
/*
* This is a low-level upcall which is called when a message has
* been received on the interconnect.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PPPT_IC_IF_H */