From 2e342633db5ac211947ffad1d8da718f6f065d3e Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 5 Mar 2012 16:46:07 -0600 Subject: iscsi tools: update iscsi_if.h for host event Patch from: Vikas Chaudhary [added code to print link up/down message by Mike Christie] Signed-off-by: Vikas Chaudhary --- include/iscsi_if.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/iscsi_if.h b/include/iscsi_if.h index 28447df..540cd8d 100644 --- a/include/iscsi_if.h +++ b/include/iscsi_if.h @@ -79,8 +79,9 @@ enum iscsi_uevent_e { ISCSI_KEVENT_PATH_REQ = KEVENT_BASE + 7, ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8, ISCSI_KEVENT_CONN_LOGIN_STATE = KEVENT_BASE + 9, + ISCSI_KEVENT_HOST_EVENT = KEVENT_BASE + 10, - ISCSI_KEVENT_MAX = ISCSI_KEVENT_CONN_LOGIN_STATE, + ISCSI_KEVENT_MAX = ISCSI_KEVENT_HOST_EVENT, }; enum iscsi_tgt_dscvr { @@ -89,6 +90,13 @@ enum iscsi_tgt_dscvr { ISCSI_TGT_DSCVR_SLP = 3, }; +enum iscsi_host_event_code { + ISCSI_EVENT_LINKUP = 1, + ISCSI_EVENT_LINKDOWN, + /* must always be last */ + ISCSI_EVENT_MAX, +}; + struct iscsi_uevent { uint32_t type; /* k/u events type */ uint32_t iferror; /* carries interface or resource errors */ @@ -231,6 +239,11 @@ struct iscsi_uevent { struct msg_notify_if_down { uint32_t host_no; } notify_if_down; + struct msg_host_event { + uint32_t host_no; + uint32_t data_size; + enum iscsi_host_event_code code; + } host_event; } r; } __attribute__ ((aligned (sizeof(uint64_t)))); -- cgit v1.2.1