17836SJohn.Forte@Sun.COM /* 27836SJohn.Forte@Sun.COM * CDDL HEADER START 37836SJohn.Forte@Sun.COM * 47836SJohn.Forte@Sun.COM * The contents of this file are subject to the terms of the 57836SJohn.Forte@Sun.COM * Common Development and Distribution License (the "License"). 67836SJohn.Forte@Sun.COM * You may not use this file except in compliance with the License. 77836SJohn.Forte@Sun.COM * 87836SJohn.Forte@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97836SJohn.Forte@Sun.COM * or http://www.opensolaris.org/os/licensing. 107836SJohn.Forte@Sun.COM * See the License for the specific language governing permissions 117836SJohn.Forte@Sun.COM * and limitations under the License. 127836SJohn.Forte@Sun.COM * 137836SJohn.Forte@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 147836SJohn.Forte@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157836SJohn.Forte@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 167836SJohn.Forte@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 177836SJohn.Forte@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 187836SJohn.Forte@Sun.COM * 197836SJohn.Forte@Sun.COM * CDDL HEADER END 207836SJohn.Forte@Sun.COM */ 217836SJohn.Forte@Sun.COM /* 229201SJack.Meng@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237836SJohn.Forte@Sun.COM * Use is subject to license terms. 247836SJohn.Forte@Sun.COM */ 257836SJohn.Forte@Sun.COM 267836SJohn.Forte@Sun.COM #ifndef _PERSISTENT_H 277836SJohn.Forte@Sun.COM #define _PERSISTENT_H 287836SJohn.Forte@Sun.COM 297836SJohn.Forte@Sun.COM #ifdef __cplusplus 307836SJohn.Forte@Sun.COM extern "C" { 317836SJohn.Forte@Sun.COM #endif 327836SJohn.Forte@Sun.COM 337836SJohn.Forte@Sun.COM 347836SJohn.Forte@Sun.COM #include <iscsi.h> 357836SJohn.Forte@Sun.COM 367836SJohn.Forte@Sun.COM /* 377836SJohn.Forte@Sun.COM * Data Structures 387836SJohn.Forte@Sun.COM */ 397836SJohn.Forte@Sun.COM 407836SJohn.Forte@Sun.COM typedef struct persistent_param { 417836SJohn.Forte@Sun.COM uint32_t p_bitmap; /* parameter override bitmap */ 427836SJohn.Forte@Sun.COM iscsi_login_params_t p_params; 437836SJohn.Forte@Sun.COM } persistent_param_t; 447836SJohn.Forte@Sun.COM 45*10156SZhang.Yi@Sun.COM typedef struct persistent_tunable_param { 46*10156SZhang.Yi@Sun.COM uint32_t p_bitmap; /* parameter override bitmap */ 47*10156SZhang.Yi@Sun.COM iscsi_tunable_params_t p_params; 48*10156SZhang.Yi@Sun.COM } persistent_tunable_param_t; 497836SJohn.Forte@Sun.COM 507836SJohn.Forte@Sun.COM /* 517836SJohn.Forte@Sun.COM * Function Prototypes 527836SJohn.Forte@Sun.COM */ 539201SJack.Meng@Sun.COM void persistent_init(); 549201SJack.Meng@Sun.COM boolean_t persistent_load(); 557836SJohn.Forte@Sun.COM void persistent_fini(void); 567836SJohn.Forte@Sun.COM boolean_t persistent_disc_meth_set(iSCSIDiscoveryMethod_t method); 577836SJohn.Forte@Sun.COM iSCSIDiscoveryMethod_t persistent_disc_meth_get(void); 587836SJohn.Forte@Sun.COM boolean_t persistent_disc_meth_clear(iSCSIDiscoveryMethod_t method); 597836SJohn.Forte@Sun.COM boolean_t persistent_initiator_name_set(char *p); 607836SJohn.Forte@Sun.COM boolean_t persistent_initiator_name_get(char *p, int size); 617836SJohn.Forte@Sun.COM boolean_t persistent_alias_name_set(char *p); 627836SJohn.Forte@Sun.COM boolean_t persistent_alias_name_get(char *p, int size); 637836SJohn.Forte@Sun.COM boolean_t persistent_static_addr_set(char *node, entry_t *e); 647836SJohn.Forte@Sun.COM boolean_t persistent_static_addr_next(void **v, char *node, entry_t *e); 657836SJohn.Forte@Sun.COM boolean_t persistent_static_addr_clear(uint32_t oid); 667836SJohn.Forte@Sun.COM void persistent_static_addr_lock(void); 677836SJohn.Forte@Sun.COM void persistent_static_addr_unlock(void); 687836SJohn.Forte@Sun.COM boolean_t persistent_isns_addr_set(entry_t *e); 697836SJohn.Forte@Sun.COM boolean_t persistent_isns_addr_next(void **v, entry_t *e); 707836SJohn.Forte@Sun.COM boolean_t persistent_isns_addr_clear(entry_t *e); 717836SJohn.Forte@Sun.COM void persistent_isns_addr_lock(void); 727836SJohn.Forte@Sun.COM void persistent_isns_addr_unlock(void); 737836SJohn.Forte@Sun.COM boolean_t persistent_disc_addr_set(entry_t *e); 747836SJohn.Forte@Sun.COM boolean_t persistent_disc_addr_next(void **v, entry_t *e); 757836SJohn.Forte@Sun.COM boolean_t persistent_disc_addr_clear(entry_t *e); 767836SJohn.Forte@Sun.COM void persistent_disc_addr_lock(void); 777836SJohn.Forte@Sun.COM void persistent_disc_addr_unlock(void); 787836SJohn.Forte@Sun.COM boolean_t persistent_param_set(char *node, persistent_param_t *param); 797836SJohn.Forte@Sun.COM boolean_t persistent_param_get(char *node, persistent_param_t *param); 807836SJohn.Forte@Sun.COM boolean_t persistent_param_next(void **v, char *node, 817836SJohn.Forte@Sun.COM persistent_param_t *param); 827836SJohn.Forte@Sun.COM boolean_t persistent_param_clear(char *node); 837836SJohn.Forte@Sun.COM void persistent_param_lock(void); 847836SJohn.Forte@Sun.COM void persistent_param_unlock(void); 857836SJohn.Forte@Sun.COM boolean_t persistent_chap_set(char *node, iscsi_chap_props_t *chap); 867836SJohn.Forte@Sun.COM boolean_t persistent_chap_get(char *node, iscsi_chap_props_t *chap); 877836SJohn.Forte@Sun.COM boolean_t persistent_chap_next(void **v, char *node, 887836SJohn.Forte@Sun.COM iscsi_chap_props_t *chap); 897836SJohn.Forte@Sun.COM boolean_t persistent_chap_clear(char *node); 907836SJohn.Forte@Sun.COM void persistent_chap_lock(void); 917836SJohn.Forte@Sun.COM void persistent_chap_unlock(void); 927836SJohn.Forte@Sun.COM boolean_t persistent_radius_set(iscsi_radius_props_t *radius); 937836SJohn.Forte@Sun.COM iscsi_nvfile_status_t persistent_radius_get(iscsi_radius_props_t *radius); 947836SJohn.Forte@Sun.COM boolean_t persistent_auth_set(char *node, iscsi_auth_props_t *auth); 957836SJohn.Forte@Sun.COM boolean_t persistent_auth_get(char *node, iscsi_auth_props_t *auth); 967836SJohn.Forte@Sun.COM boolean_t persistent_auth_next(void **v, char *node, 977836SJohn.Forte@Sun.COM iscsi_auth_props_t *auth); 987836SJohn.Forte@Sun.COM boolean_t persistent_auth_clear(char *node); 997836SJohn.Forte@Sun.COM void persistent_auth_lock(void); 1007836SJohn.Forte@Sun.COM void persistent_auth_unlock(void); 1017836SJohn.Forte@Sun.COM void persistent_dump_data(void); 1027836SJohn.Forte@Sun.COM boolean_t persistent_set_config_session(char *node, 1037836SJohn.Forte@Sun.COM iscsi_config_sess_t *ics); 1047836SJohn.Forte@Sun.COM boolean_t persistent_get_config_session(char *node, 1057836SJohn.Forte@Sun.COM iscsi_config_sess_t *ics); 106*10156SZhang.Yi@Sun.COM boolean_t persistent_get_tunable_param(char *node, 107*10156SZhang.Yi@Sun.COM persistent_tunable_param_t *tpsg); 108*10156SZhang.Yi@Sun.COM boolean_t persistent_set_tunable_param(char *node, 109*10156SZhang.Yi@Sun.COM persistent_tunable_param_t *tpss); 1107836SJohn.Forte@Sun.COM 1117836SJohn.Forte@Sun.COM #ifdef __cplusplus 1127836SJohn.Forte@Sun.COM } 1137836SJohn.Forte@Sun.COM #endif 1147836SJohn.Forte@Sun.COM 1157836SJohn.Forte@Sun.COM #endif /* _PERSISTENT_H */ 116