fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
1a1a84a324206b6b1f5f704ab166c4ebf78aed76Peter Dunlap * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _ISCSIADM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _ISCSIADM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
1a1a84a324206b6b1f5f704ab166c4ebf78aed76Peter Dunlap#include <sys/iscsi_protocol.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/scsi/adapters/iscsi_if.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <ima.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <cmdparse.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ADD SUBCOMMAND(0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LIST SUBCOMMAND(1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MODIFY SUBCOMMAND(2)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define REMOVE SUBCOMMAND(3)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TARGET OBJECT(0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NODE OBJECT(1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define INITIATOR OBJECT(2)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define STATIC_CONFIG OBJECT(3)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DISCOVERY_ADDRESS OBJECT(4)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DISCOVERY OBJECT(5)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define TARGET_PARAM OBJECT(6)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ISNS_SERVER_ADDRESS OBJECT(7)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DATA_SEQ_IN_ORDER 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEFAULT_TIME_2_RETAIN 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DEFAULT_TIME_2_WAIT 0x03
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FIRST_BURST_LENGTH 0x04
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IMMEDIATE_DATA 0x05
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define INITIAL_R2T 0x06
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_BURST_LENGTH 0x07
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DATA_PDU_IN_ORDER 0x08
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_OUTSTANDING_R2T 0x09
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_RECV_DATA_SEG_LEN 0x0a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define HEADER_DIGEST 0x0b
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DATA_DIGEST 0x0c
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_CONNECTIONS 0x0d
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ERROR_RECOVERY_LEVEL 0x0e
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China#define RECV_LOGIN_RSP_TIMEOUT 0x0f
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China#define CONN_LOGIN_MAX 0x10
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China#define POLLING_LOGIN_DELAY 0x11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define AUTH_NAME 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define AUTH_PASSWORD 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ISCSIADM_ARG_ENABLE "enable"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ISCSIADM_ARG_DISABLE "disable"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This object type is not defined by IMA.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_OBJECT_TYPE_CONN 13 /* Currently not defined in IMA */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_NODE_ALIAS_LEN 256
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAKE_IMA_ERROR(x) ((IMA_STATUS)(IMA_STATUS_ERROR | (x)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_SYSTEM_ERROR(status) (((IMA_STATUS)(status) & \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (IMA_STATUS)SUN_IMA_ERROR_SYSTEM_ERROR) == 0x8FFF0000 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ? IMA_TRUE : IMA_FALSE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_GET_SYSTEM_ERROR(x) (((IMA_STATUS)(x) & 0x0000FFFF))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_ERROR_SYSTEM_ERROR MAKE_IMA_ERROR(0x0fff0000)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _parameterTbl {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *name;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int val;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} parameterTbl_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The following interfaces are not defined in IMA 1.1. Some of them
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * are requirement candidates for the next IMA release.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_MAX_DIGEST_ALGORITHMS 2 /* NONE and CRC 32 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_IP_ADDRESS_PORT_LEN 256
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_MAX_RADIUS_SECRET_LEN 128
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Currently not defined in IMA_TARGET_DISCOVERY_METHOD enum */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define IMA_TARGET_DISCOVERY_METHOD_UNKNOWN 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef enum
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DIGEST_NONE = 0,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DIGEST_CRC32 = 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_DIGEST_ALGORITHM;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_DIGEST_ALGORITHM_VALUE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT defaultAlgorithmCount;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DIGEST_ALGORITHM defaultAlgorithms[SUN_IMA_MAX_DIGEST_ALGORITHMS];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL currentValid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT currentAlgorithmCount;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DIGEST_ALGORITHM currentAlgorithms[SUN_IMA_MAX_DIGEST_ALGORITHMS];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL negotiatedValid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT negotiatedAlgorithmCount;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DIGEST_ALGORITHM
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte negotiatedAlgorithms[SUN_IMA_MAX_DIGEST_ALGORITHMS];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_DIGEST_ALGORITHM_VALUE;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_DISC_ADDR_PROP_LIST
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT discAddrCount;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_DISCOVERY_ADDRESS_PROPERTIES props[1];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_DISC_ADDR_PROP_LIST;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_RADIUS_CONFIG
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char hostnameIpAddress[SUN_IMA_IP_ADDRESS_PORT_LEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL isIpv6;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT16 port;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL sharedSecretValid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT sharedSecretLength;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BYTE sharedSecret[SUN_IMA_MAX_RADIUS_SECRET_LEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_RADIUS_CONFIG;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_DISC_ADDRESS_KEY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_NODE_NAME name;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_ADDRESS_KEY address;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT16 tpgt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_DISC_ADDRESS_KEY;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT keyCount;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_DISC_ADDRESS_KEY keys[1];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_DISC_ADDRESS_KEY_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_TARGET_ADDRESS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_TARGET_ADDRESS imaStruct;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL defaultTpgt; /* If true, tpgt becomes irrelvant */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT16 tpgt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_TARGET_ADDRESS;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_STATIC_DISCOVERY_TARGET
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_NODE_NAME targetName;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_TARGET_ADDRESS targetAddress;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_STATIC_DISCOVERY_TARGET;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_STATIC_DISCOVERY_TARGET_PROPERTIES
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_OID associatedNodeOid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_OID associatedLhbaOid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_STATIC_DISCOVERY_TARGET staticTarget;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_STATIC_DISCOVERY_TARGET_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_CONN_PROPERTIES {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 connectionID;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_ADDRESS_KEY local;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_ADDRESS_KEY peer;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL valuesValid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 defaultTime2Retain;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 defaultTime2Wait;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 errorRecoveryLevel;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 firstBurstLength;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 maxBurstLength;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 maxConnections;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 maxOutstandingR2T;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT32 maxRecvDataSegmentLength;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL dataPduInOrder;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL dataSequenceInOrder;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL immediateData;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL initialR2T;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT headerDigest;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT dataDigest;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_CONN_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_LU_VENDOR_ID_LEN ISCSI_INQ_VID_BUF_LEN
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SUN_IMA_LU_PRODUCT_ID_LEN ISCSI_INQ_PID_BUF_LEN
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_LU_PROPERTIES
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_LU_PROPERTIES imaProps;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_CHAR vendorId[SUN_IMA_LU_VENDOR_ID_LEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_CHAR productId[SUN_IMA_LU_PRODUCT_ID_LEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_LU_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_TARGET_PROPERTIES
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_TARGET_PROPERTIES imaProps;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL defaultTpgtConf; /* If true, tpgtConf is irrelevant */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT16 tpgtConf;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL defaultTpgtNego; /* If true, tpgtNego is not connected */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT16 tpgtNego;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BYTE isid[ISCSI_ISID_LEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_TARGET_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_CONFIG_SESSIONS {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* True if sessions are bound to an interface */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_BOOL bound; /* OUT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Memory allocated from caller. In addition
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * on a Set this is the number of configured
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * sessions.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT in; /* IN */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Number of Configured sessions on Get */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_UINT out; /* OUT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_ADDRESS_KEY bindings[1]; /* IN/OUT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_CONFIG_SESSIONS;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _SUN_IMA_STATIC_TARGET_PROPERTIES
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte{
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_OID associatedNodeOid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte IMA_OID associatedLhbaOid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SUN_IMA_STATIC_DISCOVERY_TARGET staticTarget;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} SUN_IMA_STATIC_TARGET_PROPERTIES;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _ISCSIADM_H */