aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 13:57:24 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-02 15:37:19 -0400
commit2223696192c687f2853e42b7c1e0d3ef002081fd (patch)
tree9eef082af7f3286781134226bfc98ec401d41e79 /include/scsi
parent4e7aba73f9f6e9fe6d3fa10d3fd63cd4882ba3d0 (diff)
[SCSI] iscsi class, qla4xxx, iscsi_tcp: export local address
This patch exports the local address for the session. For qla4xxx this is the ip of the hba's port. For software this is the src addr of the socket. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/iscsi_if.h2
-rw-r--r--include/scsi/libiscsi.h8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 81a542506dfe..642998069e00 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -271,11 +271,13 @@ enum iscsi_param {
271enum iscsi_host_param { 271enum iscsi_host_param {
272 ISCSI_HOST_PARAM_HWADDRESS, 272 ISCSI_HOST_PARAM_HWADDRESS,
273 ISCSI_HOST_PARAM_INITIATOR_NAME, 273 ISCSI_HOST_PARAM_INITIATOR_NAME,
274 ISCSI_HOST_PARAM_IPADDRESS,
274 ISCSI_HOST_PARAM_MAX, 275 ISCSI_HOST_PARAM_MAX,
275}; 276};
276 277
277#define ISCSI_HOST_HWADDRESS (1 << ISCSI_HOST_PARAM_HWADDRESS) 278#define ISCSI_HOST_HWADDRESS (1 << ISCSI_HOST_PARAM_HWADDRESS)
278#define ISCSI_HOST_INITIATOR_NAME (1 << ISCSI_HOST_PARAM_INITIATOR_NAME) 279#define ISCSI_HOST_INITIATOR_NAME (1 << ISCSI_HOST_PARAM_INITIATOR_NAME)
280#define ISCSI_HOST_IPADDRESS (1 << ISCSI_HOST_PARAM_IPADDRESS)
279 281
280#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) 282#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle)
281#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) 283#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr)
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 2f303a3b270e..eea33f7b1544 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -72,6 +72,8 @@ struct iscsi_nopin;
72#define ISCSI_AGE_SHIFT 28 72#define ISCSI_AGE_SHIFT 28
73#define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT) 73#define ISCSI_AGE_MASK (0xf << ISCSI_AGE_SHIFT)
74 74
75#define ISCSI_ADDRESS_BUF_LEN 64
76
75struct iscsi_mgmt_task { 77struct iscsi_mgmt_task {
76 /* 78 /*
77 * Becuae LLDs allocate their hdr differently, this is a pointer to 79 * Becuae LLDs allocate their hdr differently, this is a pointer to
@@ -174,6 +176,12 @@ struct iscsi_conn {
174 /* values userspace uses to id a conn */ 176 /* values userspace uses to id a conn */
175 int persistent_port; 177 int persistent_port;
176 char *persistent_address; 178 char *persistent_address;
179 /* remote portal currently connected to */
180 int portal_port;
181 char portal_address[ISCSI_ADDRESS_BUF_LEN];
182 /* local address */
183 int local_port;
184 char local_address[ISCSI_ADDRESS_BUF_LEN];
177 185
178 /* MIB-statistics */ 186 /* MIB-statistics */
179 uint64_t txdata_octets; 187 uint64_t txdata_octets;