summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2012-03-06 05:08:36 -0600
committerMike Christie <michaelc@cs.wisc.edu>2012-03-06 05:08:36 -0600
commitde3e77f4c432198502696790ff444d5b33f9d8ab (patch)
tree8b4c15483467a44f3212a5a3bd5da7fbb26e8d6a /include
parent2e342633db5ac211947ffad1d8da718f6f065d3e (diff)
downloadopen-iscsi-de3e77f4c432198502696790ff444d5b33f9d8ab.tar.gz
iscsi tools: added ping support
From: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Added ping support for network connection diagnostics. [cleaned up output by Mike Christie] Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Diffstat (limited to 'include')
-rw-r--r--include/iscsi_err.h2
-rw-r--r--include/iscsi_if.h21
2 files changed, 21 insertions, 2 deletions
diff --git a/include/iscsi_err.h b/include/iscsi_err.h
index d1d94b5..e038f1c 100644
--- a/include/iscsi_err.h
+++ b/include/iscsi_err.h
@@ -58,6 +58,8 @@ enum {
ISCSI_ERR_ISNS_QUERY = 25,
/* iSNS registration/deregistration failed */
ISCSI_ERR_ISNS_REG_FAILED = 26,
+ /* operation not supported */
+ ISCSI_ERR_OP_NOT_SUPP = 27,
/* Always last. Indicates end of error code space */
ISCSI_MAX_ERR_VAL,
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 540cd8d..26182aa 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -65,8 +65,9 @@ enum iscsi_uevent_e {
ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20,
ISCSI_UEVENT_SET_IFACE_PARAMS = UEVENT_BASE + 21,
+ ISCSI_UEVENT_PING = UEVENT_BASE + 22,
- ISCSI_UEVENT_MAX = ISCSI_UEVENT_SET_IFACE_PARAMS,
+ ISCSI_UEVENT_MAX = ISCSI_UEVENT_PING,
/* up events */
ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
@@ -80,8 +81,9 @@ enum iscsi_uevent_e {
ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8,
ISCSI_KEVENT_CONN_LOGIN_STATE = KEVENT_BASE + 9,
ISCSI_KEVENT_HOST_EVENT = KEVENT_BASE + 10,
+ ISCSI_KEVENT_PING_COMP = KEVENT_BASE + 11,
- ISCSI_KEVENT_MAX = ISCSI_KEVENT_HOST_EVENT,
+ ISCSI_KEVENT_MAX = ISCSI_KEVENT_PING_COMP,
};
enum iscsi_tgt_dscvr {
@@ -195,6 +197,14 @@ struct iscsi_uevent {
uint32_t host_no;
uint32_t count;
} set_iface_params;
+ struct msg_iscsi_ping {
+ uint32_t host_no;
+ uint32_t iface_num;
+ uint32_t iface_type;
+ uint32_t payload_size;
+ uint32_t pid; /* unique ping id associated
+ with each ping request */
+ } iscsi_ping;
} u;
union {
/* messages k -> u */
@@ -244,6 +254,13 @@ struct iscsi_uevent {
uint32_t data_size;
enum iscsi_host_event_code code;
} host_event;
+ struct msg_ping_comp {
+ uint32_t host_no;
+ uint32_t status;
+ uint32_t pid; /* unique ping id associated
+ with each ping request */
+ uint32_t data_size;
+ } ping_comp;
} r;
} __attribute__ ((aligned (sizeof(uint64_t))));