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/*
4246c8e92ef9ad6ada2b992b7af02832ff071bf7Jack Meng * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _PERSISTENT_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _PERSISTENT_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <iscsi.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Data Structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct persistent_param {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t p_bitmap; /* parameter override bitmap */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte iscsi_login_params_t p_params;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} persistent_param_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinatypedef struct persistent_tunable_param {
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China uint32_t p_bitmap; /* parameter override bitmap */
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China iscsi_tunable_params_t p_params;
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China} persistent_tunable_param_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Function Prototypes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
4246c8e92ef9ad6ada2b992b7af02832ff071bf7Jack Mengvoid persistent_init();
4246c8e92ef9ad6ada2b992b7af02832ff071bf7Jack Mengboolean_t persistent_load();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_fini(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_disc_meth_set(iSCSIDiscoveryMethod_t method);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteiSCSIDiscoveryMethod_t persistent_disc_meth_get(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_disc_meth_clear(iSCSIDiscoveryMethod_t method);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_initiator_name_set(char *p);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_initiator_name_get(char *p, int size);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_alias_name_set(char *p);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_alias_name_get(char *p, int size);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_static_addr_set(char *node, entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_static_addr_next(void **v, char *node, entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_static_addr_clear(uint32_t oid);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_static_addr_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_static_addr_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_isns_addr_set(entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_isns_addr_next(void **v, entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_isns_addr_clear(entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_isns_addr_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_isns_addr_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_disc_addr_set(entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_disc_addr_next(void **v, entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_disc_addr_clear(entry_t *e);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_disc_addr_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_disc_addr_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_param_set(char *node, persistent_param_t *param);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_param_get(char *node, persistent_param_t *param);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_param_next(void **v, char *node,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte persistent_param_t *param);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_param_clear(char *node);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_param_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_param_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_chap_set(char *node, iscsi_chap_props_t *chap);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_chap_get(char *node, iscsi_chap_props_t *chap);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_chap_next(void **v, char *node,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte iscsi_chap_props_t *chap);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_chap_clear(char *node);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_chap_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_chap_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_radius_set(iscsi_radius_props_t *radius);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteiscsi_nvfile_status_t persistent_radius_get(iscsi_radius_props_t *radius);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_auth_set(char *node, iscsi_auth_props_t *auth);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_auth_get(char *node, iscsi_auth_props_t *auth);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_auth_next(void **v, char *node,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte iscsi_auth_props_t *auth);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_auth_clear(char *node);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_auth_lock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_auth_unlock(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid persistent_dump_data(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_set_config_session(char *node,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte iscsi_config_sess_t *ics);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t persistent_get_config_session(char *node,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte iscsi_config_sess_t *ics);
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinaboolean_t persistent_get_tunable_param(char *node,
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China persistent_tunable_param_t *tpsg);
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing Chinaboolean_t persistent_set_tunable_param(char *node,
aff4bce51ecc47df7e5a6351b7cee6bc20408c63yi zhang - Sun Microsystems - Beijing China persistent_tunable_param_t *tpss);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _PERSISTENT_H */