iscsit_isns.h revision bdbe8dc662f9700c12eafcbcceb5c724615278cf
/*
* 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 _ISNS_CLIENT_H_
#define _ISNS_CLIENT_H_
#include <iscsit.h>
/*
* List of iSNS servers with which we register.
*/
typedef struct {
int svr_retry_count;
struct sockaddr_storage svr_sa;
/*
* Type of registration to perform (deregister, register, update)
*/
typedef enum {
/*
* This structure is used to keep state with regard to the RX threads used
* for ESI.
*/
typedef struct {
/*
* Portal list - both default portals from idm_get_ipaddr and portals
* defined in target port groups.
*/
typedef struct isns_portal_s {
struct sockaddr_storage portal_addr;
typedef struct isns_tpgt_addr_s {
struct sockaddr_storage portal_addr;
typedef struct isns_tpgt_s {
} isns_tpgt_t;
typedef struct isns_target_info_s {
char ti_tgt_name[MAX_ISCSI_NODENAMELEN];
/* Contents of isns_target_list and svr->svr_target_list */
typedef struct isns_target_s {
/*
* If no ESI request is received within this number of intervals, we'll
* try to re-register with the server.
*/
#define MAX_ESI_INTERVALS 3
/*
* Interval to ask the server to send us ESI probes, in seconds.
*/
#define ISNS_DEFAULT_ESI_INTERVAL 20
/*
* Registration Period (when not using ESI), in seconds. (15 min)
*/
#define ISNS_DEFAULT_REGISTRATION_PERIOD 900
/*
* Initial delay before sending first DevAttrReg message.
*/
#define ISNS_INITIAL_DELAY 5
void iscsit_isns_fini();
#endif /* _ISNS_CLIENT_H_ */