diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2012-03-06 21:49:18 -0600 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2012-03-06 21:49:18 -0600 |
commit | f8c493b661a39b061f50d0ac1682a5c33170084c (patch) | |
tree | c7067460280cb06f3233df785774c68e573f7059 /include | |
parent | f9f627fbf0fc96545931ae65aa2b6214841bfd4e (diff) | |
download | open-iscsi-f8c493b661a39b061f50d0ac1682a5c33170084c.tar.gz |
iscsiadm: print ping status string
When a ping fails print more useful info.
Diffstat (limited to 'include')
-rw-r--r-- | include/iscsi_if.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/iscsi_if.h b/include/iscsi_if.h index ce9ba15..dad9fd8 100644 --- a/include/iscsi_if.h +++ b/include/iscsi_if.h @@ -270,7 +270,8 @@ struct iscsi_uevent { } host_event; struct msg_ping_comp { uint32_t host_no; - uint32_t status; + uint32_t status; /* enum + * iscsi_ping_status_code */ uint32_t pid; /* unique ping id associated with each ping request */ uint32_t data_size; @@ -515,6 +516,20 @@ enum iscsi_host_param { #define ISCSI_HOST_NETDEV_NAME (1ULL << ISCSI_HOST_PARAM_NETDEV_NAME) #define ISCSI_HOST_IPADDRESS (1ULL << ISCSI_HOST_PARAM_IPADDRESS) +/* iSCSI PING status/error code */ +enum iscsi_ping_status_code { + ISCSI_PING_SUCCESS = 0, + ISCSI_PING_FW_DISABLED = 0x1, + ISCSI_PING_IPADDR_INVALID = 0x2, + ISCSI_PING_LINKLOCAL_IPV6_ADDR_INVALID = 0x3, + ISCSI_PING_TIMEOUT = 0x4, + ISCSI_PING_INVALID_DEST_ADDR = 0x5, + ISCSI_PING_OVERSIZE_PACKET = 0x6, + ISCSI_PING_ICMP_ERROR = 0x7, + ISCSI_PING_MAX_REQ_EXCEEDED = 0x8, + ISCSI_PING_NO_ARP_RECEIVED = 0x9, +}; + #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |