diff options
author | Rahul Gupta <rahulrgupta27@gmail.com> | 2011-08-08 21:46:01 -0500 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2011-08-08 21:49:09 -0500 |
commit | 42a5950919038cac331c7fa69304478bd62bec15 (patch) | |
tree | 9201936ecff4698800bb7eee35a7d96fbe180c12 /usr/session_info.h | |
parent | 77e1ab9f73921171d5f684e0c20836e78957b5af (diff) | |
download | open-iscsi-42a5950919038cac331c7fa69304478bd62bec15.tar.gz |
iscsi tools: Displaying timeout and CHAP in iscisadm info
I have analysed and coded on some part of it on this weekend :-
For timeout and CHAP I have taken following parameters values from /sys
and printed it.
For integers, like timeout:-
while fetching from sysfs_get_str(), I am setting timeouts to -1 for
indicating error and also in qla card's case where chap is not supported
in
/sys,
and then while printing, checking same value by taking its complement.
I found in iscsid.conf file setting timeout value to -1 to huge -ve
value is
valid (as after setting that can restart iscsid successfully) but not
really
sure does user uses it.
I assume user never uses -1 for timeout in iscsid.conf file, so I have
used
it in following code for error purpose:-
Signed-off-by: Rahul Gupta <rahulrgupta27@gmail.com>
iSCSI user space TODO item-2 : Displaying timeout and CHAP.
Diffstat (limited to 'usr/session_info.h')
-rw-r--r-- | usr/session_info.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/usr/session_info.h b/usr/session_info.h index 7a22aee..726aefd 100644 --- a/usr/session_info.h +++ b/usr/session_info.h @@ -9,12 +9,29 @@ struct list; +struct session_timeout { + int abort_tmo; + int lu_reset_tmo; + int recovery_tmo; + int tgt_reset_tmo; +}; + +struct session_CHAP { + char username[AUTH_STR_MAX_LEN]; + char password[AUTH_STR_MAX_LEN]; + char username_in[AUTH_STR_MAX_LEN]; + char password_in[AUTH_STR_MAX_LEN]; +}; + struct session_info { struct list_head list; /* local info */ struct iface_rec iface; int sid; + struct session_timeout tmo; + struct session_CHAP chap; + /* remote info */ char targetname[TARGET_NAME_MAXLEN + 1]; int tpgt; @@ -37,11 +54,14 @@ struct session_link_info { #define SESSION_INFO_ISCSI_STATE 0x4 #define SESSION_INFO_SCSI_DEVS 0x8 #define SESSION_INFO_HOST_DEVS 0x10 +#define SESSION_INFO_ISCSI_TIM 0x20 +#define SESSION_INFO_ISCSI_AUTH 0x40 extern int session_info_create_list(void *data, struct session_info *info); extern void session_info_free_list(struct list_head *list); -extern int session_info_print(int info_level, struct session_info *match_info); +extern int session_info_print(int info_level, struct session_info *match_info, + int do_show); extern void session_info_print_tree(struct list_head *list, char *prefix, - unsigned int flags); + unsigned int flags, int do_show); #endif |