iscsit_isns.h revision a6d42e7d71324c5193c3b94d57d96ba2925d52e1
/*
* 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 _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. There must always be a 1:1 correspondence between the entries
* in this list and the entries in the portal_list.
*/
struct isns_portal_list_s;
typedef struct {
struct isns_portal_list_s *esi_portal;
/*
* Portal list - comprised of "default" portals (i.e. idm_get_ipaddr) and
* portals that are part of target portal groups.
*/
typedef struct isns_portal_list_s {
struct sockaddr_storage portal_addr;
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
void iscsit_isns_fini();
#endif /* _ISNS_CLIENT_H_ */