iscsiadm: Correctly check for invalid hostno and flashnode index

In host mode, correctly compare for invalid hostno and flashnode index.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Print additional session info for flashnode session

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
flashnode: Add support to set ISCSI_FLASHNODE_CHAP_OUT_IDX param

Add support to set the chap_out_idx session param of flashnode
entry.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsiadm: Use '-x' option instead of '-v' to specify chap_tbl_idx

Make appropriate changes to use -x option for chap_tbl_idx cmdline
param. This is done because -v option is used along with -n option
to get the name/value pair.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsiadm: Man page changes to use -x option for chap_tbl_idx

Changes in iscsiadm man page to use -x option instead of -v option
for chap_tbl_idx cmdline param.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
README changes to use long option --index instead of --flashnode_idx

This change supports use of -x option instead of -v option for
chap_tbl_idx cmdline param.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsiadm: Add support to set CHAP entry using host chap mode

Provide support to add and update CHAP entry using chap submode of
iscsiadm host mode.
Both, new and update, iscsiadm operations perform the same function.
Currently only one entry can be added or updated at a time.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Correctly get username_in and password_in flashnode params

Fix to correctly read username_in and password_in sysfs params for
flashnode session.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
README changes for adding support to set CHAP entry

README changes for the support added to set CHAP entry using chap
submode of iscsiadm host mode.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Setup iface conf file with all iface attrs exported in sysfs

Currently, iface conf file does not get populated with all the iface
attrs that are exported in corresponding sysfs entry.
This patch allows to setup conf file with all iface attrs in sysfs.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi_if.h: Remove numbers used for network parameter settings

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi_if.h: Additional parameters for network param settings

Added support to display and update additional network parameters
through iscsiadm

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Use macro to set IPv4/IPv6 IP addresses

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Use single function to enable/disable network parameters

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Use single function to set integer network parameters

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Ignore network parameter if not enabled/disabled

If iface does not contain network parameter or incorrect value is set,
do not send that network parameter value to driver.

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Additional parameters for network settings

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: iface params should be updated for node_rec as well.

While updating iface params, the changes should get applied to the
node records as well.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Let default type of iface be ipv4

While using iface name to determine its type if the name does not
contain iface type then assume it be to of type ipv4 by default.

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>
iscsi tools: Show iface params based on iface type

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Lee Duncan <lduncan@suse.com>