iscsi_door.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISCSI_DOOR_H
#define _ISCSI_DOOR_H
#ifdef __cplusplus
extern "C" {
#endif
#define ISCSI_DOOR_REQ_SIGNATURE 0x53435349
#define ISCSI_DOOR_REQ_VERSION_1 1
#define ISCSI_DOOR_MAX_DATA_SIZE 8192
#define ISCSI_DOOR_GETIPNODEBYNAME_REQ 0x0000
#define ISCSI_DOOR_GETIPNODEBYNAME_CNF 0x4000
#define ISCSI_DOOR_ERROR_IND 0x8000
#define ISCSI_DOOR_STATUS_SUCCESS 0x00000000
#define ISCSI_DOOR_STATUS_REQ_LENGTH 0x00000001
#define ISCSI_DOOR_STATUS_REQ_FORMAT 0x00000002
#define ISCSI_DOOR_STATUS_REQ_INVALID 0x00000003
#define ISCSI_DOOR_STATUS_REQ_VERSION 0x00000004
#define ISCSI_DOOR_STATUS_MORE 0x00000005
typedef struct _iscsi_door_msg_hdr {
typedef struct _getipnodebyname_req {
typedef struct _getipnodebyname_cnf {
typedef union _iscsi_door_req {
typedef union _iscsi_door_cnf {
typedef union _iscsi_door_ind {
typedef union _iscsi_door_msg {
#ifdef _KERNEL
/* Defines copied from netdb.h */
struct hostent {
char *h_name; /* official name of host */
char **h_aliases; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
char **h_addr_list; /* list of addresses from name server */
};
iscsi_door_ini(void);
iscsi_door_term(void);
int did
);
void
);
struct hostent *
const char *name,
int af,
int flags,
int *error_num
);
#else /* !_KERNEL */
#define kfreehostent freehostent
#define kgetipnodebyname getipnodebyname
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _ISCSI_DOOR_H */