|
struct libiscsi_context * | libiscsi_init (void) |
| Initalize libiscsi. More...
|
|
void | libiscsi_cleanup (struct libiscsi_context *context) |
| Cleanup libiscsi used resource. More...
|
|
int | libiscsi_discover_sendtargets (struct libiscsi_context *context, const char *address, int port, const struct libiscsi_auth_info *auth_info, int *nr_found, struct libiscsi_node **found_nodes) |
| Discover iSCSI nodes using sendtargets and add them to the node db. More...
|
|
int | libiscsi_discover_firmware (struct libiscsi_context *context, int *nr_found, struct libiscsi_node **found_nodes) |
| Read iSCSI node info from firmware and add them to the node db. More...
|
|
int | libiscsi_verify_auth_info (struct libiscsi_context *context, const struct libiscsi_auth_info *auth_info) |
| Check validity of the given authentication info. More...
|
|
int | libiscsi_node_set_auth (struct libiscsi_context *context, const struct libiscsi_node *node, const struct libiscsi_auth_info *auth_info) |
| Set the authentication info for the given node. More...
|
|
int | libiscsi_node_get_auth (struct libiscsi_context *context, const struct libiscsi_node *node, struct libiscsi_auth_info *auth_info) |
| Get the authentication info for the given node. More...
|
|
int | login_helper (void *data, node_rec_t *rec) |
|
int | libiscsi_node_login (struct libiscsi_context *context, const struct libiscsi_node *node) |
| Login to an iSCSI node. More...
|
|
int | libiscsi_node_logout (struct libiscsi_context *context, const struct libiscsi_node *node) |
| Logout of an iSCSI node. More...
|
|
int | libiscsi_node_set_parameter (struct libiscsi_context *context, const struct libiscsi_node *node, const char *parameter, const char *value) |
| Set an iSCSI parameter for the given node. More...
|
|
int | libiscsi_node_get_parameter (struct libiscsi_context *context, const struct libiscsi_node *node, const char *parameter, char *value) |
| Get the value of an iSCSI parameter for the given node. More...
|
|
const char * | libiscsi_get_error_string (struct libiscsi_context *context) |
| Get human readable string describing the last libiscsi error. More...
|
|
int | libiscsi_get_firmware_network_config (struct libiscsi_network_config *config) |
| Get network configuration information from iscsi firmware. More...
|
|
int | libiscsi_get_firmware_initiator_name (char *initiatorname) |
| Get the initiator name (iqn) from the iscsi firmware. More...
|
|
This function discovers iSCSI nodes using firmware (ppc or ibft). Any found nodes are added to the local iSCSI node database and are returned in a dynamically allocated array.
Note that unlike sendtargets discovery, this function will also read authentication info and store that in the database too.
Note this function currently is a stub which will always return -EINVAL (IOW it is not yet implemented)
- Parameters
-
context | libiscsi context to operate on. |
nr_found | The number of found nodes will be returned through this pointer if not NULL. |
found_nodes | The address of the dynamically allocated array of found nodes will be returned through this pointer if not NULL. The caller must free this array using free(). |
- Returns
- 0 on success, otherwise a standard error code (from errno.h).
This function connects to the given address and port and then tries to discover iSCSI nodes using the sendtargets protocol. Any found nodes are added to the local iSCSI node database and are returned in a dynamically allocated array.
Note that the (optional) authentication info is for authenticating the discovery, and is not for the found nodes! If the connection(s) to the node(s) need authentication too, you can set the username / password for those (which can be different!) using the libiscsi_node_set_auth() function.
- Parameters
-
context | libiscsi context to operate on. |
address | Hostname or IP-address to connect to. |
port | Port to connect to, or 0 for the default port. |
auth_info | Authentication information, or NULL. |
nr_found | The number of found nodes will be returned through this pointer if not NULL. |
found_nodes | The address of the dynamically allocated array of found nodes will be returned through this pointer if not NULL. The caller must free this array using free(). |
- Returns
- 0 on success, otherwise a standard error code (from errno.h).
This function sets the authentication information for the node described by the given node record. This will overwrite any existing authentication information.
This is the way to specify authentication information for nodes found through sendtargets discovery.
Note: 1) This is a convience wrapper around libiscsi_node_set_parameter(), setting the node.session.auth.* parameters. 2) For nodes found through firmware discovery the authentication information has already been set from the firmware. 3) auth_info may be NULL in which case any existing authinfo will be cleared.
- Parameters
-
context | libiscsi context to operate on. |
node | iSCSI node to set auth information of |
auth_info | Authentication information, or NULL. |
- Returns
- 0 on success, otherwise a standard error code (from errno.h).