SOCKET add option to bind to connection to interface(s)

This commit is contained in:
Peter Lieven
2012-11-06 14:53:55 +01:00
parent 0d8819e68f
commit 6cad82532a
6 changed files with 57 additions and 0 deletions

View File

@@ -68,6 +68,7 @@ struct iscsi_context {
char connected_portal[MAX_STRING_SIZE+1];
char portal[MAX_STRING_SIZE+1];
char alias[MAX_STRING_SIZE+1];
char bind_interfaces[MAX_STRING_SIZE+1];
char user[MAX_STRING_SIZE+1];
char passwd[MAX_STRING_SIZE+1];
@@ -102,6 +103,7 @@ struct iscsi_context {
int login_attempts;
int is_loggedin;
int is_reconnecting;
int bind_interface_cnt;
int chap_a;
int chap_i;

View File

@@ -1028,6 +1028,13 @@ iscsi_set_tcp_keepintvl(struct iscsi_context *iscsi, int value);
EXTERN void
iscsi_set_tcp_syncnt(struct iscsi_context *iscsi, int value);
/*
* This function is to set the interface that outbound connections for this socket are bound to.
* You max specify more than one interface here separated by comma.
*/
EXTERN void
iscsi_set_bind_interfaces(struct iscsi_context *iscsi, char * interfaces);
#ifdef __cplusplus
}
#endif