summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormnc <mnc@d7303112-9cec-0310-bdd2-e83a94d6c2b6>2006-07-10 22:53:48 +0000
committermnc <mnc@d7303112-9cec-0310-bdd2-e83a94d6c2b6>2006-07-10 22:53:48 +0000
commit64b1be0714f7c0693520b604817ad80c7186b6e4 (patch)
tree590a94e1c2f714a3c69418ae42385a5fbf4ca746 /include
parent3ac21c44179f5e530eabfc9c595a015907b3f283 (diff)
downloadopen-iscsi-64b1be0714f7c0693520b604817ad80c7186b6e4.tar.gz
Add target discovery event. We may have a setup where the iscsi traffic is on a different netowrk than the other network traffic. In this case we will want to do discovery though the iscsi card. This patch adds a event to the transport class that can be used by hw iscsi cards that support this.
git-svn-id: svn://svn.berlios.de/open-iscsi@622 d7303112-9cec-0310-bdd2-e83a94d6c2b6
Diffstat (limited to 'include')
-rw-r--r--include/iscsi_if.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 428e62b..df7753e 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -47,12 +47,20 @@ enum iscsi_uevent_e {
ISCSI_UEVENT_TRANSPORT_EP_POLL = UEVENT_BASE + 13,
ISCSI_UEVENT_TRANSPORT_EP_DISCONNECT = UEVENT_BASE + 14,
+ ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15,
+
/* up events */
ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
ISCSI_KEVENT_CONN_ERROR = KEVENT_BASE + 2,
ISCSI_KEVENT_IF_ERROR = KEVENT_BASE + 3,
};
+enum iscsi_tgt_dscvr {
+ ISCSI_TGT_DSCVR_SEND_TARGETS = 1,
+ ISCSI_TGT_DSCVR_ISNS = 2,
+ ISCSI_TGT_DSCVR_SLP = 3,
+};
+
struct iscsi_uevent {
uint32_t type; /* k/u events type */
uint32_t iferror; /* carries interface or resource errors */
@@ -116,6 +124,17 @@ struct iscsi_uevent {
struct msg_transport_disconnect {
uint64_t ep_handle;
} ep_disconnect;
+ struct msg_tgt_dscvr {
+ enum iscsi_tgt_dscvr type;
+ uint32_t host_no;
+ /*
+ * enable = 1 to establish a new connection
+ * with the server. enable = 0 to disconnect
+ * from the server. Used primarily to switch
+ * from one iSNS server to another.
+ */
+ uint32_t enable;
+ } tgt_dscvr;
} u;
union {
/* messages k -> u */
@@ -141,6 +160,24 @@ struct iscsi_uevent {
struct msg_transport_connect_ret {
uint64_t handle;
} ep_connect_ret;
+ struct msg_tgt_dscvr_ret {
+ /*
+ * session/connection pair used to reference
+ * the connection to server
+ */
+ uint32_t sid;
+ uint32_t cid;
+ union {
+ struct isns {
+ /* port # for conn to iSNS server */
+ uint16_t isns_port;
+ /* listening port to receive SCNs */
+ uint16_t scn_port;
+ /* listening port to receive ESIs */
+ uint16_t esi_port;
+ } isns_attrib;
+ } u;
+ } tgt_dscvr_ret;
} r;
} __attribute__ ((aligned (sizeof(uint64_t))));