idm_transport.h revision 30e7468f8f41aa30ada067b2c1d5d284046514da
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _IDM_TRANSPORT_H_
#define _IDM_TRANSPORT_H_
#ifdef __cplusplus
extern "C" {
#endif
#define IDM_TRANSPORT_PATHLEN 0x40
/* Note, this is tied to iSER currently */
#define IDM_TRANSPORT_HEADER_LENGTH 0x20
/*
* idm_transport_type_t
* An enumerated list of the transports available to iSER.
* Note that new transports should be added to the enum prior to NUM_TYPES.
*/
typedef enum {
/*
* idm_transport_caps_t
* Encodes a set of attributes describing an IDM transport's capabilities.
* JB - do we need this?
*/
typedef struct idm_transport_caps_s {
/*
* Transport routine definitions for idm_transport_ops_t below
*/
/* Send_Control - transmit a Control-type PDU */
/*
* Target transport data primitives, caller (IDM) holds idt->idt_mutex,
* and the transport should release the mutex before returning.
*/
/* Initiator transport data handlers */
/* Target transport Data-out handler */
/* Transport-specific resource allocation and free */
typedef idm_status_t (transport_tgt_enable_datamover_op_t)(struct
idm_conn_s *ic);
typedef idm_status_t (transport_ini_enable_datamover_op_t)(struct
idm_conn_s *ic);
/* Task resource cleanup */
/* Negotiate key value pairs */
typedef kv_status_t (transport_negotiate_key_values_op_t)(struct
/* Activate the negotiated key value pairs */
/* Transport capability probe */
struct idm_transport_caps_s *caps);
/* Transport buffer services */
/* Transport target context and service management services */
/* Transport target connection establishment */
/* Transport initiator context and connection management services */
struct idm_conn_s *ic);
/*
* idm_transport_ops_t
* Encodes a set of vectors into an IDM transport driver that implement the
* transport-specific Datamover operations for IDM usage. These routines are
* invoked by the IDM layer to execute the transport-specific implementations
* of the DataMover primitives and supporting routines.
*/
typedef struct idm_transport_ops_s {
/*
* idm_transport_t encodes all of the data related to an IDM transport
* type. In addition to type and capabilities, it also stores a pointer
* to the connection and transport operation implementations, and also
* it stores the LDI handle.
*/
typedef struct idm_transport_s {
char *it_device_path;
/*
* idm_transport_attr_t encodes details of a transport driver seeking
* registration with the IDM kernel module.
*/
typedef struct idm_transport_attr_s {
/* IDM transport API */
void
void
#ifdef __cplusplus
}
#endif
#endif /* _IDM_TRANSPORT_H_ */