|
|
786c6d |
From 66d9f120e26d49329667e4b9f5a84076c4f66a6e Mon Sep 17 00:00:00 2001
|
|
|
786c6d |
From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
|
|
|
786c6d |
Date: Fri, 18 Oct 2013 09:29:24 -0400
|
|
|
786c6d |
Subject: [PATCH] iscsi tools: Additional parameters for network settings
|
|
|
786c6d |
|
|
|
786c6d |
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
|
|
|
786c6d |
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
|
|
|
786c6d |
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
|
|
|
786c6d |
---
|
|
|
786c6d |
usr/config.h | 50 +++-
|
|
|
786c6d |
usr/idbm.c | 76 +++++
|
|
|
786c6d |
usr/idbm_fields.h | 49 ++++
|
|
|
786c6d |
usr/iface.c | 847 ++++++++++++++++++++++++++++++++++++++++++++++++------
|
|
|
786c6d |
usr/iscsi_sysfs.c | 200 +++++++++++++
|
|
|
786c6d |
5 files changed, 1132 insertions(+), 90 deletions(-)
|
|
|
786c6d |
|
|
|
786c6d |
diff --git a/usr/config.h b/usr/config.h
|
|
|
786c6d |
index d457bdd..fd31a54 100644
|
|
|
786c6d |
--- a/usr/config.h
|
|
|
786c6d |
+++ b/usr/config.h
|
|
|
786c6d |
@@ -232,11 +232,59 @@ typedef struct iface_rec {
|
|
|
786c6d |
* 1 = enable */
|
|
|
786c6d |
uint16_t mtu;
|
|
|
786c6d |
uint16_t port;
|
|
|
786c6d |
+ char delayed_ack[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char nagle[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char tcp_wsf_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ uint8_t tcp_wsf;
|
|
|
786c6d |
+ uint8_t tcp_timer_scale;
|
|
|
786c6d |
+ char tcp_timestamp[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_dns[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_slp_da[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char tos_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ uint8_t tos;
|
|
|
786c6d |
+ char gratuitous_arp[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_alt_client_id_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_alt_client_id[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_req_vendor_id_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_vendor_id_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_vendor_id[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char dhcp_learn_iqn[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char fragmentation[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char incoming_forwarding[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ uint8_t ttl;
|
|
|
786c6d |
+ char gratuitous_neighbor_adv[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char redirect[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char mld[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ uint32_t flow_label;
|
|
|
786c6d |
+ uint32_t traffic_class;
|
|
|
786c6d |
+ uint8_t hop_limit;
|
|
|
786c6d |
+ uint32_t nd_reachable_tmo;
|
|
|
786c6d |
+ uint32_t nd_rexmit_time;
|
|
|
786c6d |
+ uint32_t nd_stale_tmo;
|
|
|
786c6d |
+ uint8_t dup_addr_detect_cnt;
|
|
|
786c6d |
+ uint32_t router_adv_link_mtu;
|
|
|
786c6d |
+ uint16_t def_task_mgmt_tmo;
|
|
|
786c6d |
+ char header_digest[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char data_digest[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char immediate_data[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char initial_r2t[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char data_seq_inorder[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char data_pdu_inorder[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ uint8_t erl;
|
|
|
786c6d |
+ uint32_t max_recv_dlength;
|
|
|
786c6d |
+ uint32_t first_burst_len;
|
|
|
786c6d |
+ uint16_t max_out_r2t;
|
|
|
786c6d |
+ uint32_t max_burst_len;
|
|
|
786c6d |
+ char chap_auth[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char bidi_chap[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char strict_login_comp[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char discovery_auth[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
+ char discovery_logout[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
char port_state[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
char port_speed[ISCSI_MAX_STR_LEN];
|
|
|
786c6d |
/*
|
|
|
786c6d |
* TODO: we may have to make this bigger and interconnect
|
|
|
786c6d |
- * specific for infinniband
|
|
|
786c6d |
+ * specific for infiniband
|
|
|
786c6d |
*/
|
|
|
786c6d |
char hwaddress[ISCSI_HWADDRESS_BUF_SIZE];
|
|
|
786c6d |
char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN];
|
|
|
786c6d |
diff --git a/usr/idbm.c b/usr/idbm.c
|
|
|
786c6d |
index 6b6f57c..4428ebe 100644
|
|
|
786c6d |
--- a/usr/idbm.c
|
|
|
786c6d |
+++ b/usr/idbm.c
|
|
|
786c6d |
@@ -454,6 +454,82 @@ void idbm_recinfo_iface(iface_rec_t *r, recinfo_t *ri)
|
|
|
786c6d |
__recinfo_int(IFACE_NUM, ri, r, iface_num, IDBM_SHOW, num, 1);
|
|
|
786c6d |
__recinfo_uint16(IFACE_MTU, ri, r, mtu, IDBM_SHOW, num, 1);
|
|
|
786c6d |
__recinfo_uint16(IFACE_PORT, ri, r, port, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_ALT_CID, ri, r, dhcp_alt_client_id_state,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_ALT_CID_STR, ri, r, dhcp_alt_client_id,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_DNS, ri, r, dhcp_dns, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_LEARN_IQN, ri, r, dhcp_learn_iqn, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_REQ_VID, ri, r, dhcp_req_vendor_id_state,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_VID, ri, r, dhcp_vendor_id_state, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_VID_STR, ri, r, dhcp_vendor_id, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DHCP_SLP_DA, ri, r, dhcp_slp_da, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_FRAGMENTATION, ri, r, fragmentation, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_GRAT_ARP, ri, r, gratuitous_arp, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_IN_FORWARD, ri, r, incoming_forwarding, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_TOS_STATE, ri, r, tos_state, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_TOS, ri, r, tos, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_TTL, ri, r, ttl, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_DUP_ADDR_DETECT_CNT, ri, r, dup_addr_detect_cnt,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_FLOW_LABEL, ri, r, flow_label, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_GRAT_NEIGHBOR_ADV, ri, r, gratuitous_neighbor_adv,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_HOP_LIMIT, ri, r, hop_limit, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_MLD, ri, r, mld, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_ND_REACHABLE_TMO, ri, r, nd_reachable_tmo,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_ND_REXMIT_TIME, ri, r, nd_rexmit_time, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_ND_STALE_TMO, ri, r, nd_stale_tmo, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_RTR_ADV_LINK_MTU, ri, r, router_adv_link_mtu,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_TRAFFIC_CLASS, ri, r, traffic_class, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DELAYED_ACK, ri, r, delayed_ack, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_TCP_NAGLE, ri, r, nagle, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_TCP_WSF_STATE, ri, r, tcp_wsf_state, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_TCP_WSF, ri, r, tcp_wsf, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_TCP_TIMER_SCALE, ri, r, tcp_timer_scale,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_TCP_TIMESTAMP, ri, r, tcp_timestamp, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_REDIRECT, ri, r, redirect, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint16(IFACE_DEF_TMF_TMO, ri, r, def_task_mgmt_tmo, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_HDRDGST, ri, r, header_digest, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DATADGST, ri, r, data_digest, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_IMM_DATA, ri, r, immediate_data, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_INITIAL_R2T, ri, r, initial_r2t, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DSEQ_INORDER, ri, r, data_seq_inorder, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DPDU_INORDER, ri, r, data_pdu_inorder, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_uint8(IFACE_ERL, ri, r, erl, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_MAX_RECV_DLEN, ri, r, max_recv_dlength,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_FIRST_BURST, ri, r, first_burst_len, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_uint16(IFACE_MAX_R2T, ri, r, max_out_r2t, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_uint32(IFACE_MAX_BURST, ri, r, max_burst_len, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_CHAP_AUTH, ri, r, chap_auth, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_BIDI_CHAP, ri, r, bidi_chap, IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_STRICT_LOGIN_COMP, ri, r, strict_login_comp,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DISCOVERY_AUTH, ri, r, discovery_auth, IDBM_SHOW,
|
|
|
786c6d |
+ num, 1);
|
|
|
786c6d |
+ __recinfo_str(IFACE_DISCOVERY_LOGOUT, ri, r, discovery_logout,
|
|
|
786c6d |
+ IDBM_SHOW, num, 1);
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
void idbm_recinfo_host_chap(struct iscsi_chap_rec *r, recinfo_t *ri)
|
|
|
786c6d |
diff --git a/usr/idbm_fields.h b/usr/idbm_fields.h
|
|
|
786c6d |
index 179dda8..5790a03 100644
|
|
|
786c6d |
--- a/usr/idbm_fields.h
|
|
|
786c6d |
+++ b/usr/idbm_fields.h
|
|
|
786c6d |
@@ -89,6 +89,55 @@
|
|
|
786c6d |
#define IFACE_NUM "iface.iface_num"
|
|
|
786c6d |
#define IFACE_MTU "iface.mtu"
|
|
|
786c6d |
#define IFACE_PORT "iface.port"
|
|
|
786c6d |
+#define IFACE_DELAYED_ACK "iface.delayed_ack"
|
|
|
786c6d |
+#define IFACE_TCP_NAGLE "iface.tcp_nagle"
|
|
|
786c6d |
+#define IFACE_TCP_WSF_STATE "iface.tcp_wsf_state"
|
|
|
786c6d |
+#define IFACE_TCP_WSF "iface.tcp_wsf"
|
|
|
786c6d |
+#define IFACE_TCP_TIMER_SCALE "iface.tcp_timer_scale"
|
|
|
786c6d |
+#define IFACE_TCP_TIMESTAMP "iface.tcp_timestamp"
|
|
|
786c6d |
+#define IFACE_DHCP_DNS "iface.dhcp_dns"
|
|
|
786c6d |
+#define IFACE_DHCP_SLP_DA "iface.dhcp_slp_da"
|
|
|
786c6d |
+#define IFACE_TOS_STATE "iface.tos_state"
|
|
|
786c6d |
+#define IFACE_TOS "iface.tos"
|
|
|
786c6d |
+#define IFACE_GRAT_ARP "iface.gratuitous_arp"
|
|
|
786c6d |
+#define IFACE_DHCP_ALT_CID "iface.dhcp_alt_client_id_state"
|
|
|
786c6d |
+#define IFACE_DHCP_ALT_CID_STR "iface.dhcp_alt_client_id"
|
|
|
786c6d |
+#define IFACE_DHCP_REQ_VID "iface.dhcp_req_vendor_id_state"
|
|
|
786c6d |
+#define IFACE_DHCP_VID "iface.dhcp_vendor_id_state"
|
|
|
786c6d |
+#define IFACE_DHCP_VID_STR "iface.dhcp_vendor_id"
|
|
|
786c6d |
+#define IFACE_DHCP_LEARN_IQN "iface.dhcp_learn_iqn"
|
|
|
786c6d |
+#define IFACE_FRAGMENTATION "iface.fragmentation"
|
|
|
786c6d |
+#define IFACE_IN_FORWARD "iface.incoming_forwarding"
|
|
|
786c6d |
+#define IFACE_TTL "iface.ttl"
|
|
|
786c6d |
+#define IFACE_GRAT_NEIGHBOR_ADV "iface.gratuitous_neighbor_adv"
|
|
|
786c6d |
+#define IFACE_REDIRECT "iface.redirect"
|
|
|
786c6d |
+#define IFACE_IGNORE_ICMP_ECHO_REQ "iface.ignore_icmp_echo_request"
|
|
|
786c6d |
+#define IFACE_MLD "iface.mld"
|
|
|
786c6d |
+#define IFACE_FLOW_LABEL "iface.flow_label"
|
|
|
786c6d |
+#define IFACE_TRAFFIC_CLASS "iface.traffic_class"
|
|
|
786c6d |
+#define IFACE_HOP_LIMIT "iface.hop_limit"
|
|
|
786c6d |
+#define IFACE_ND_REACHABLE_TMO "iface.nd_reachable_tmo"
|
|
|
786c6d |
+#define IFACE_ND_REXMIT_TIME "iface.nd_rexmit_time"
|
|
|
786c6d |
+#define IFACE_ND_STALE_TMO "iface.nd_stale_tmo"
|
|
|
786c6d |
+#define IFACE_DUP_ADDR_DETECT_CNT "iface.dup_addr_detect_cnt"
|
|
|
786c6d |
+#define IFACE_RTR_ADV_LINK_MTU "iface.router_adv_link_mtu"
|
|
|
786c6d |
+#define IFACE_DEF_TMF_TMO "iface.def_task_mgmt_timeout"
|
|
|
786c6d |
+#define IFACE_HDRDGST "iface.header_digest"
|
|
|
786c6d |
+#define IFACE_DATADGST "iface.data_digest"
|
|
|
786c6d |
+#define IFACE_IMM_DATA "iface.immediate_data"
|
|
|
786c6d |
+#define IFACE_INITIAL_R2T "iface.initial_r2t"
|
|
|
786c6d |
+#define IFACE_DSEQ_INORDER "iface.data_seq_inorder"
|
|
|
786c6d |
+#define IFACE_DPDU_INORDER "iface.data_pdu_inorder"
|
|
|
786c6d |
+#define IFACE_ERL "iface.erl"
|
|
|
786c6d |
+#define IFACE_MAX_RECV_DLEN "iface.max_receive_data_len"
|
|
|
786c6d |
+#define IFACE_FIRST_BURST "iface.first_burst_len"
|
|
|
786c6d |
+#define IFACE_MAX_R2T "iface.max_outstanding_r2t"
|
|
|
786c6d |
+#define IFACE_MAX_BURST "iface.max_burst_len"
|
|
|
786c6d |
+#define IFACE_CHAP_AUTH "iface.chap_auth"
|
|
|
786c6d |
+#define IFACE_BIDI_CHAP "iface.bidi_chap"
|
|
|
786c6d |
+#define IFACE_STRICT_LOGIN_COMP "iface.strict_login_compliance"
|
|
|
786c6d |
+#define IFACE_DISCOVERY_AUTH "iface.discovery_auth"
|
|
|
786c6d |
+#define IFACE_DISCOVERY_LOGOUT "iface.discovery_logout"
|
|
|
786c6d |
|
|
|
786c6d |
/* discovery fields */
|
|
|
786c6d |
#define DISC_STARTUP "discovery.startup"
|
|
|
786c6d |
diff --git a/usr/iface.c b/usr/iface.c
|
|
|
786c6d |
index 55b0dd4..87ac875 100644
|
|
|
786c6d |
--- a/usr/iface.c
|
|
|
786c6d |
+++ b/usr/iface.c
|
|
|
786c6d |
@@ -601,6 +601,105 @@ void iface_copy(struct iface_rec *dst, struct iface_rec *src)
|
|
|
786c6d |
dst->mtu = src->mtu;
|
|
|
786c6d |
if (src->port)
|
|
|
786c6d |
dst->port = src->port;
|
|
|
786c6d |
+ if (strlen(src->delayed_ack))
|
|
|
786c6d |
+ strcpy(dst->delayed_ack, src->delayed_ack);
|
|
|
786c6d |
+ if (strlen(src->nagle))
|
|
|
786c6d |
+ strcpy(dst->nagle, src->nagle);
|
|
|
786c6d |
+ if (strlen(src->tcp_wsf_state))
|
|
|
786c6d |
+ strcpy(dst->tcp_wsf_state, src->tcp_wsf_state);
|
|
|
786c6d |
+ if (src->tcp_wsf)
|
|
|
786c6d |
+ dst->tcp_wsf = src->tcp_wsf;
|
|
|
786c6d |
+ if (src->tcp_timer_scale)
|
|
|
786c6d |
+ dst->tcp_timer_scale = src->tcp_timer_scale;
|
|
|
786c6d |
+ if (strlen(src->tcp_timestamp))
|
|
|
786c6d |
+ strcpy(dst->tcp_timestamp, src->tcp_timestamp);
|
|
|
786c6d |
+ if (strlen(src->dhcp_dns))
|
|
|
786c6d |
+ strcpy(dst->dhcp_dns, src->dhcp_dns);
|
|
|
786c6d |
+ if (strlen(src->dhcp_slp_da))
|
|
|
786c6d |
+ strcpy(dst->dhcp_slp_da, src->dhcp_slp_da);
|
|
|
786c6d |
+ if (strlen(src->tos_state))
|
|
|
786c6d |
+ strcpy(dst->tos_state, src->tos_state);
|
|
|
786c6d |
+ if (src->tos)
|
|
|
786c6d |
+ dst->tos = src->tos;
|
|
|
786c6d |
+ if (strlen(src->gratuitous_arp))
|
|
|
786c6d |
+ strcpy(dst->gratuitous_arp, src->gratuitous_arp);
|
|
|
786c6d |
+ if (strlen(src->dhcp_alt_client_id_state))
|
|
|
786c6d |
+ strcpy(dst->dhcp_alt_client_id_state,
|
|
|
786c6d |
+ src->dhcp_alt_client_id_state);
|
|
|
786c6d |
+ if (strlen(src->dhcp_alt_client_id))
|
|
|
786c6d |
+ strcpy(dst->dhcp_alt_client_id, src->dhcp_alt_client_id);
|
|
|
786c6d |
+ if (strlen(src->dhcp_req_vendor_id_state))
|
|
|
786c6d |
+ strcpy(dst->dhcp_req_vendor_id_state,
|
|
|
786c6d |
+ src->dhcp_req_vendor_id_state);
|
|
|
786c6d |
+ if (strlen(src->dhcp_vendor_id_state))
|
|
|
786c6d |
+ strcpy(dst->dhcp_vendor_id_state, src->dhcp_vendor_id_state);
|
|
|
786c6d |
+ if (strlen(src->dhcp_vendor_id))
|
|
|
786c6d |
+ strcpy(dst->dhcp_vendor_id, src->dhcp_vendor_id);
|
|
|
786c6d |
+ if (strlen(src->dhcp_learn_iqn))
|
|
|
786c6d |
+ strcpy(dst->dhcp_learn_iqn, src->dhcp_learn_iqn);
|
|
|
786c6d |
+ if (strlen(src->fragmentation))
|
|
|
786c6d |
+ strcpy(dst->fragmentation, src->fragmentation);
|
|
|
786c6d |
+ if (strlen(src->incoming_forwarding))
|
|
|
786c6d |
+ strcpy(dst->incoming_forwarding, src->incoming_forwarding);
|
|
|
786c6d |
+ if (src->ttl)
|
|
|
786c6d |
+ dst->ttl = src->ttl;
|
|
|
786c6d |
+ if (strlen(src->gratuitous_neighbor_adv))
|
|
|
786c6d |
+ strcpy(dst->gratuitous_neighbor_adv,
|
|
|
786c6d |
+ src->gratuitous_neighbor_adv);
|
|
|
786c6d |
+ if (strlen(src->redirect))
|
|
|
786c6d |
+ strcpy(dst->redirect, src->redirect);
|
|
|
786c6d |
+ if (strlen(src->mld))
|
|
|
786c6d |
+ strcpy(dst->mld, src->mld);
|
|
|
786c6d |
+ if (src->flow_label)
|
|
|
786c6d |
+ dst->flow_label = src->flow_label;
|
|
|
786c6d |
+ if (src->traffic_class)
|
|
|
786c6d |
+ dst->traffic_class = src->traffic_class;
|
|
|
786c6d |
+ if (src->hop_limit)
|
|
|
786c6d |
+ dst->hop_limit = src->hop_limit;
|
|
|
786c6d |
+ if (src->nd_reachable_tmo)
|
|
|
786c6d |
+ dst->nd_reachable_tmo = src->nd_reachable_tmo;
|
|
|
786c6d |
+ if (src->nd_rexmit_time)
|
|
|
786c6d |
+ dst->nd_rexmit_time = src->nd_rexmit_time;
|
|
|
786c6d |
+ if (src->nd_stale_tmo)
|
|
|
786c6d |
+ dst->nd_stale_tmo = src->nd_stale_tmo;
|
|
|
786c6d |
+ if (src->dup_addr_detect_cnt)
|
|
|
786c6d |
+ dst->dup_addr_detect_cnt = src->dup_addr_detect_cnt;
|
|
|
786c6d |
+ if (src->router_adv_link_mtu)
|
|
|
786c6d |
+ dst->router_adv_link_mtu = src->router_adv_link_mtu;
|
|
|
786c6d |
+ if (src->def_task_mgmt_tmo)
|
|
|
786c6d |
+ dst->def_task_mgmt_tmo = src->def_task_mgmt_tmo;
|
|
|
786c6d |
+ if (strlen(src->header_digest))
|
|
|
786c6d |
+ strcpy(dst->header_digest, src->header_digest);
|
|
|
786c6d |
+ if (strlen(src->data_digest))
|
|
|
786c6d |
+ strcpy(dst->data_digest, src->data_digest);
|
|
|
786c6d |
+ if (strlen(src->immediate_data))
|
|
|
786c6d |
+ strcpy(dst->immediate_data, src->immediate_data);
|
|
|
786c6d |
+ if (strlen(src->initial_r2t))
|
|
|
786c6d |
+ strcpy(dst->initial_r2t, src->initial_r2t);
|
|
|
786c6d |
+ if (strlen(src->data_seq_inorder))
|
|
|
786c6d |
+ strcpy(dst->data_seq_inorder, src->data_seq_inorder);
|
|
|
786c6d |
+ if (strlen(src->data_pdu_inorder))
|
|
|
786c6d |
+ strcpy(dst->data_pdu_inorder, src->data_pdu_inorder);
|
|
|
786c6d |
+ if (src->erl)
|
|
|
786c6d |
+ dst->erl = src->erl;
|
|
|
786c6d |
+ if (src->max_recv_dlength)
|
|
|
786c6d |
+ dst->max_recv_dlength = src->max_recv_dlength;
|
|
|
786c6d |
+ if (src->first_burst_len)
|
|
|
786c6d |
+ dst->first_burst_len = src->first_burst_len;
|
|
|
786c6d |
+ if (src->max_out_r2t)
|
|
|
786c6d |
+ dst->max_out_r2t = src->max_out_r2t;
|
|
|
786c6d |
+ if (src->max_burst_len)
|
|
|
786c6d |
+ dst->max_burst_len = src->max_burst_len;
|
|
|
786c6d |
+ if (strlen(src->chap_auth))
|
|
|
786c6d |
+ strcpy(dst->chap_auth, src->chap_auth);
|
|
|
786c6d |
+ if (strlen(src->bidi_chap))
|
|
|
786c6d |
+ strcpy(dst->bidi_chap, src->bidi_chap);
|
|
|
786c6d |
+ if (strlen(src->strict_login_comp))
|
|
|
786c6d |
+ strcpy(dst->strict_login_comp, src->strict_login_comp);
|
|
|
786c6d |
+ if (strlen(src->discovery_auth))
|
|
|
786c6d |
+ strcpy(dst->discovery_auth, src->discovery_auth);
|
|
|
786c6d |
+ if (strlen(src->discovery_logout))
|
|
|
786c6d |
+ strcpy(dst->discovery_logout, src->discovery_logout);
|
|
|
786c6d |
if (strlen(src->hwaddress))
|
|
|
786c6d |
strcpy(dst->hwaddress, src->hwaddress);
|
|
|
786c6d |
if (strlen(src->transport_name))
|
|
|
786c6d |
@@ -1026,6 +1125,79 @@ struct iface_param_count {
|
|
|
786c6d |
int count;
|
|
|
786c6d |
};
|
|
|
786c6d |
|
|
|
786c6d |
+#define IFACE_NET_PARAM_EN_CNT(param_val, cnt) { \
|
|
|
786c6d |
+ if (!strcmp(param_val, "disable") || \
|
|
|
786c6d |
+ !strcmp(param_val, "enable")) \
|
|
|
786c6d |
+ (*cnt)++; \
|
|
|
786c6d |
+}
|
|
|
786c6d |
+
|
|
|
786c6d |
+/**
|
|
|
786c6d |
+ * iface_get_common_param_count - Gets common parameters count for given iface
|
|
|
786c6d |
+ * @iface: iface to setup
|
|
|
786c6d |
+ * @count: number of parameters to set
|
|
|
786c6d |
+ */
|
|
|
786c6d |
+static void iface_get_common_param_count(struct iface_rec *iface, int *count)
|
|
|
786c6d |
+{
|
|
|
786c6d |
+ if (strcmp(iface->vlan_state, "disable")) {
|
|
|
786c6d |
+ /* vlan_state enabled */
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->vlan_id)
|
|
|
786c6d |
+ /* For vlan value */
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
+ /* vlan_state disabled */
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+ }
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->mtu)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->port)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->delayed_ack, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->nagle, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->tcp_wsf_state, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->tcp_timestamp, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->redirect, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->header_digest, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->data_digest, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->immediate_data, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->initial_r2t, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->data_seq_inorder, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->data_pdu_inorder, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->chap_auth, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->bidi_chap, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->strict_login_comp, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->discovery_auth, count);
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->discovery_logout, count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->tcp_wsf)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->tcp_timer_scale)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->def_task_mgmt_tmo)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->erl)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->max_recv_dlength)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->first_burst_len)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->max_burst_len)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->max_out_r2t)
|
|
|
786c6d |
+ (*count)++;
|
|
|
786c6d |
+}
|
|
|
786c6d |
+
|
|
|
786c6d |
/**
|
|
|
786c6d |
* __iface_get_param_count - Gets netconfig parameter count for given iface
|
|
|
786c6d |
* @data: iface_param_count structure
|
|
|
786c6d |
@@ -1044,10 +1216,10 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
|
|
786c6d |
if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
|
|
786c6d |
|
|
|
786c6d |
if (strcmp(iface->state, "disable")) {
|
|
|
786c6d |
- if (strstr(iface->bootproto, "dhcp"))
|
|
|
786c6d |
+ if (strstr(iface->bootproto, "dhcp")) {
|
|
|
786c6d |
/* DHCP enabled */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
- else {
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
/* DHCP disabled */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
@@ -1062,12 +1234,13 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
|
|
786c6d |
if (strstr(iface->gateway, "."))
|
|
|
786c6d |
/* User configured Gateway */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
- } else
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
/*
|
|
|
786c6d |
* IPv4 Address not valid, decrement
|
|
|
786c6d |
* count of DHCP
|
|
|
786c6d |
*/
|
|
|
786c6d |
count--;
|
|
|
786c6d |
+ }
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
/*
|
|
|
786c6d |
@@ -1078,37 +1251,68 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
|
|
786c6d |
/* iface state */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (strcmp(iface->vlan_state, "disable")) {
|
|
|
786c6d |
- /* vlan_state enabled */
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->dhcp_dns,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->dhcp_slp_da,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->tos_state,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->gratuitous_arp,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(
|
|
|
786c6d |
+ iface->dhcp_alt_client_id_state,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->dhcp_alt_client_id[0])
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->vlan_id)
|
|
|
786c6d |
- /* For vlan value */
|
|
|
786c6d |
- count++;
|
|
|
786c6d |
- } else
|
|
|
786c6d |
- /* vlan_state disabled */
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(
|
|
|
786c6d |
+ iface->dhcp_req_vendor_id_state,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(
|
|
|
786c6d |
+ iface->dhcp_vendor_id_state,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->dhcp_vendor_id[0])
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->mtu)
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->dhcp_learn_iqn,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->fragmentation,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(
|
|
|
786c6d |
+ iface->incoming_forwarding,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->tos)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->port)
|
|
|
786c6d |
+ if (iface->ttl)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ iface_get_common_param_count(iface, &count);
|
|
|
786c6d |
}
|
|
|
786c6d |
- } else
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
/* IPv4 is disabled, iface state */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
-
|
|
|
786c6d |
+ }
|
|
|
786c6d |
} else if (iptype == ISCSI_IFACE_TYPE_IPV6) {
|
|
|
786c6d |
|
|
|
786c6d |
if (strcmp(iface->state, "disable")) {
|
|
|
786c6d |
|
|
|
786c6d |
/* IPv6 Address */
|
|
|
786c6d |
if (strstr(iface->ipv6_autocfg, "nd") ||
|
|
|
786c6d |
- strstr(iface->ipv6_autocfg, "dhcpv6"))
|
|
|
786c6d |
+ strstr(iface->ipv6_autocfg, "dhcpv6")) {
|
|
|
786c6d |
/* Autocfg enabled */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
- else {
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
/* Autocfg disabled */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
@@ -1169,26 +1373,42 @@ static int __iface_get_param_count(void *data, struct iface_rec *iface)
|
|
|
786c6d |
/* iface state */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (strcmp(iface->vlan_state, "disable")) {
|
|
|
786c6d |
- /* vlan_state enabled */
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(
|
|
|
786c6d |
+ iface->gratuitous_neighbor_adv,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_NET_PARAM_EN_CNT(iface->mld, &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->flow_label)
|
|
|
786c6d |
+ count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->traffic_class)
|
|
|
786c6d |
+ count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->hop_limit)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->vlan_id)
|
|
|
786c6d |
- /* For vlan value */
|
|
|
786c6d |
- count++;
|
|
|
786c6d |
- } else
|
|
|
786c6d |
- /* vlan_state disabled */
|
|
|
786c6d |
+ if (iface->nd_reachable_tmo)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->mtu)
|
|
|
786c6d |
+ if (iface->nd_rexmit_time)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
|
|
|
786c6d |
- if (iface->port)
|
|
|
786c6d |
+ if (iface->nd_stale_tmo)
|
|
|
786c6d |
count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->dup_addr_detect_cnt)
|
|
|
786c6d |
+ count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (iface->router_adv_link_mtu)
|
|
|
786c6d |
+ count++;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ iface_get_common_param_count(iface, &count);
|
|
|
786c6d |
}
|
|
|
786c6d |
- } else
|
|
|
786c6d |
+ } else {
|
|
|
786c6d |
/* IPv6 is disabled, iface state */
|
|
|
786c6d |
count++;
|
|
|
786c6d |
+ }
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
iface_params->count += count;
|
|
|
786c6d |
@@ -1578,6 +1798,44 @@ free:
|
|
|
786c6d |
} \
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
+/* write string parameter value */
|
|
|
786c6d |
+static int iface_fill_str_param_val(struct iovec *iov, uint32_t iface_num,
|
|
|
786c6d |
+ uint8_t iface_type, uint16_t param,
|
|
|
786c6d |
+ uint32_t param_len, char *param_val)
|
|
|
786c6d |
+{
|
|
|
786c6d |
+ int len;
|
|
|
786c6d |
+ struct iscsi_iface_param_info *net_param;
|
|
|
786c6d |
+ struct nlattr *attr;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (!param_val[0])
|
|
|
786c6d |
+ return 1;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ len = sizeof(struct iscsi_iface_param_info) + param_len;
|
|
|
786c6d |
+ iov->iov_base = iscsi_nla_alloc(param, len);
|
|
|
786c6d |
+ if (!(iov->iov_base))
|
|
|
786c6d |
+ return 1;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ attr = iov->iov_base;
|
|
|
786c6d |
+ iov->iov_len = NLA_ALIGN(attr->nla_len);
|
|
|
786c6d |
+ net_param = (struct iscsi_iface_param_info *)ISCSI_NLA_DATA(attr);
|
|
|
786c6d |
+ net_param->iface_num = iface_num;
|
|
|
786c6d |
+ net_param->len = param_len;
|
|
|
786c6d |
+ net_param->param = param;
|
|
|
786c6d |
+ net_param->iface_type = iface_type;
|
|
|
786c6d |
+ net_param->param_type = ISCSI_NET_PARAM;
|
|
|
786c6d |
+ memcpy(net_param->value, param_val, param_len);
|
|
|
786c6d |
+ return 0;
|
|
|
786c6d |
+}
|
|
|
786c6d |
+
|
|
|
786c6d |
+#define IFACE_SET_NET_PARAM_STRVAL(iov, inum, itype, param, plen, \
|
|
|
786c6d |
+ ival, gcnt, lcnt) { \
|
|
|
786c6d |
+ if (!iface_fill_str_param_val(iov, inum, itype, param, plen, \
|
|
|
786c6d |
+ ival)) { \
|
|
|
786c6d |
+ (*gcnt)++; \
|
|
|
786c6d |
+ (*lcnt)++; \
|
|
|
786c6d |
+ } \
|
|
|
786c6d |
+}
|
|
|
786c6d |
+
|
|
|
786c6d |
struct iface_net_config {
|
|
|
786c6d |
struct iface_rec *primary;
|
|
|
786c6d |
struct iovec *iovs;
|
|
|
786c6d |
@@ -1597,8 +1855,12 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
|
|
|
786c6d |
/* start at 2, because 0 is for nlmsghdr and 1 for event */
|
|
|
786c6d |
iov = net_config->iovs + 2;
|
|
|
786c6d |
|
|
|
786c6d |
+ if (!iface->port)
|
|
|
786c6d |
+ iface->port = 3260;
|
|
|
786c6d |
+
|
|
|
786c6d |
iptype = iface_get_iptype(iface);
|
|
|
786c6d |
- if (iptype == ISCSI_IFACE_TYPE_IPV4) {
|
|
|
786c6d |
+ switch (iptype) {
|
|
|
786c6d |
+ case ISCSI_IFACE_TYPE_IPV4:
|
|
|
786c6d |
if (!strcmp(iface->state, "disable")) {
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
@@ -1652,53 +1914,136 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
|
|
|
786c6d |
*/
|
|
|
786c6d |
if (count) {
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_dns,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_slp_da,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_TOS_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->tos_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
- ISCSI_NET_PARAM_IFACE_ENABLE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_TOS,
|
|
|
786c6d |
ISCSI_NET_PARAM,
|
|
|
786c6d |
- iface->state,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->tos,
|
|
|
786c6d |
&net_config->count,
|
|
|
786c6d |
&count);
|
|
|
786c6d |
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
- ISCSI_NET_PARAM_VLAN_ENABLED,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN,
|
|
|
786c6d |
ISCSI_NET_PARAM,
|
|
|
786c6d |
- iface->vlan_state,
|
|
|
786c6d |
+ iface->gratuitous_arp,
|
|
|
786c6d |
&net_config->count,
|
|
|
786c6d |
&count);
|
|
|
786c6d |
|
|
|
786c6d |
- if (strcmp(iface->vlan_state, "disable") &&
|
|
|
786c6d |
- iface->vlan_id) {
|
|
|
786c6d |
- if (!iface_fill_vlan_id(&iov[net_config->count],
|
|
|
786c6d |
- iface, ISCSI_IFACE_TYPE_IPV4)) {
|
|
|
786c6d |
- net_config->count++;
|
|
|
786c6d |
- count++;
|
|
|
786c6d |
- }
|
|
|
786c6d |
- }
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_alt_client_id_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
|
|
|
786c6d |
- IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
- iface->iface_num,
|
|
|
786c6d |
- ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
- ISCSI_NET_PARAM_MTU,
|
|
|
786c6d |
- ISCSI_NET_PARAM,
|
|
|
786c6d |
- 2,
|
|
|
786c6d |
- iface->mtu,
|
|
|
786c6d |
- &net_config->count,
|
|
|
786c6d |
- &count);
|
|
|
786c6d |
+ IFACE_SET_NET_PARAM_STRVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID,
|
|
|
786c6d |
+ strlen(iface->dhcp_alt_client_id),
|
|
|
786c6d |
+ iface->dhcp_alt_client_id,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_req_vendor_id_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_vendor_id_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_NET_PARAM_STRVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID,
|
|
|
786c6d |
+ strlen(iface->dhcp_vendor_id),
|
|
|
786c6d |
+ iface->dhcp_vendor_id,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->dhcp_learn_iqn,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_FRAGMENT_DISABLE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->fragmentation,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->incoming_forwarding,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
|
|
|
786c6d |
IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
ISCSI_IFACE_TYPE_IPV4,
|
|
|
786c6d |
- ISCSI_NET_PARAM_PORT,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV4_TTL,
|
|
|
786c6d |
ISCSI_NET_PARAM,
|
|
|
786c6d |
- 2,
|
|
|
786c6d |
- iface->port,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->ttl,
|
|
|
786c6d |
&net_config->count,
|
|
|
786c6d |
&count);
|
|
|
786c6d |
}
|
|
|
786c6d |
- } else if (iptype == ISCSI_IFACE_TYPE_IPV6) {
|
|
|
786c6d |
+ break;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ case ISCSI_IFACE_TYPE_IPV6:
|
|
|
786c6d |
if (!strcmp(iface->state, "disable")) {
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
@@ -1786,53 +2131,377 @@ static int __iface_build_net_config(void *data, struct iface_rec *iface)
|
|
|
786c6d |
*/
|
|
|
786c6d |
if (count) {
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
- iface->iface_num,
|
|
|
786c6d |
- ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
- ISCSI_NET_PARAM_IFACE_ENABLE,
|
|
|
786c6d |
- ISCSI_NET_PARAM,
|
|
|
786c6d |
- iface->state,
|
|
|
786c6d |
- &net_config->count,
|
|
|
786c6d |
- &count);
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->gratuitous_neighbor_adv,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
|
|
|
786c6d |
IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
iface->iface_num,
|
|
|
786c6d |
ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
- ISCSI_NET_PARAM_VLAN_ENABLED,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_MLD_EN,
|
|
|
786c6d |
ISCSI_NET_PARAM,
|
|
|
786c6d |
- iface->vlan_state,
|
|
|
786c6d |
+ iface->mld,
|
|
|
786c6d |
&net_config->count,
|
|
|
786c6d |
&count);
|
|
|
786c6d |
|
|
|
786c6d |
- if (strcmp(iface->vlan_state, "disable") &&
|
|
|
786c6d |
- iface->vlan_id) {
|
|
|
786c6d |
- if (!iface_fill_vlan_id(&iov[net_config->count],
|
|
|
786c6d |
- iface,
|
|
|
786c6d |
- ISCSI_IFACE_TYPE_IPV6)) {
|
|
|
786c6d |
- net_config->count++;
|
|
|
786c6d |
- count++;
|
|
|
786c6d |
- }
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_FLOW_LABEL,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->flow_label,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->traffic_class,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_HOP_LIMIT,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->hop_limit,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->nd_reachable_tmo,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->nd_rexmit_time,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_ND_STALE_TMO,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->nd_stale_tmo,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_DUP_ADDR_DETECT_CNT,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->dup_addr_detect_cnt,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->router_adv_link_mtu,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+ }
|
|
|
786c6d |
+ break;
|
|
|
786c6d |
+ }
|
|
|
786c6d |
+
|
|
|
786c6d |
+ /* Fill parameters common to IPv4 and IPv6 ifaces */
|
|
|
786c6d |
+ if (count) {
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_IFACE_ENABLE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_VLAN_ENABLED,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->vlan_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (strcmp(iface->vlan_state, "disable") && iface->vlan_id) {
|
|
|
786c6d |
+ if (!iface_fill_vlan_id(&iov[net_config->count], iface,
|
|
|
786c6d |
+ iptype)) {
|
|
|
786c6d |
+ net_config->count++;
|
|
|
786c6d |
+ count++;
|
|
|
786c6d |
}
|
|
|
786c6d |
-
|
|
|
786c6d |
- IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
- iface->iface_num,
|
|
|
786c6d |
- ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
- ISCSI_NET_PARAM_MTU,
|
|
|
786c6d |
- ISCSI_NET_PARAM,
|
|
|
786c6d |
- 2,
|
|
|
786c6d |
- iface->mtu,
|
|
|
786c6d |
- &net_config->count,
|
|
|
786c6d |
- &count);
|
|
|
786c6d |
-
|
|
|
786c6d |
- IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
- iface->iface_num,
|
|
|
786c6d |
- ISCSI_IFACE_TYPE_IPV6,
|
|
|
786c6d |
- ISCSI_NET_PARAM_PORT,
|
|
|
786c6d |
- ISCSI_NET_PARAM,
|
|
|
786c6d |
- 2,
|
|
|
786c6d |
- iface->port,
|
|
|
786c6d |
- &net_config->count,
|
|
|
786c6d |
- &count);
|
|
|
786c6d |
}
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_MTU,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 2,
|
|
|
786c6d |
+ iface->mtu,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_PORT,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 2,
|
|
|
786c6d |
+ iface->port,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_DELAYED_ACK_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->delayed_ack,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_TCP_NAGLE_DISABLE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->nagle,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_TCP_WSF_DISABLE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->tcp_wsf_state,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_TCP_WSF,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->tcp_wsf,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_TCP_TIMER_SCALE,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->tcp_timer_scale,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_TCP_TIMESTAMP_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->tcp_timestamp,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_NET_PARAM_REDIRECT_EN,
|
|
|
786c6d |
+ ISCSI_NET_PARAM,
|
|
|
786c6d |
+ iface->redirect,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_DEF_TASKMGMT_TMO,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 2,
|
|
|
786c6d |
+ iface->def_task_mgmt_tmo,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_HDRDGST_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->header_digest,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_DATADGST_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->data_digest,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_IMM_DATA_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->immediate_data,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_INITIAL_R2T_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->initial_r2t,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_DATASEQ_INORDER_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->data_seq_inorder,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_PDU_INORDER_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->data_pdu_inorder,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_ERL,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 1,
|
|
|
786c6d |
+ iface->erl,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_MAX_RECV_DLENGTH,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->max_recv_dlength,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_FIRST_BURST,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->first_burst_len,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_MAX_R2T,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 2,
|
|
|
786c6d |
+ iface->max_out_r2t,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_INTVAL(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_MAX_BURST,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ 4,
|
|
|
786c6d |
+ iface->max_burst_len,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_CHAP_AUTH_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->chap_auth,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_BIDI_CHAP_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->bidi_chap,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_STRICT_LOGIN_COMP_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->strict_login_comp,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_DISCOVERY_AUTH_OPTIONAL,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->discovery_auth,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
+
|
|
|
786c6d |
+ IFACE_SET_PARAM_STATE(&iov[net_config->count],
|
|
|
786c6d |
+ iface->iface_num,
|
|
|
786c6d |
+ iptype,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM_DISCOVERY_LOGOUT_EN,
|
|
|
786c6d |
+ ISCSI_IFACE_PARAM,
|
|
|
786c6d |
+ iface->discovery_logout,
|
|
|
786c6d |
+ &net_config->count,
|
|
|
786c6d |
+ &count);
|
|
|
786c6d |
}
|
|
|
786c6d |
return 0;
|
|
|
786c6d |
}
|
|
|
786c6d |
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c
|
|
|
786c6d |
index 04c3673..c916ed8 100644
|
|
|
786c6d |
--- a/usr/iscsi_sysfs.c
|
|
|
786c6d |
+++ b/usr/iscsi_sysfs.c
|
|
|
786c6d |
@@ -856,6 +856,71 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
|
|
786c6d |
|
|
|
786c6d |
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "subnet",
|
|
|
786c6d |
iface->subnet_mask, sizeof(iface->subnet_mask));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_alt_client_id_en",
|
|
|
786c6d |
+ iface->dhcp_alt_client_id_state,
|
|
|
786c6d |
+ sizeof(iface->dhcp_alt_client_id_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_alt_client_id",
|
|
|
786c6d |
+ iface->dhcp_alt_client_id,
|
|
|
786c6d |
+ sizeof(iface->dhcp_alt_client_id));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_dns_address_en",
|
|
|
786c6d |
+ iface->dhcp_dns, sizeof(iface->dhcp_dns));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_learn_iqn_en",
|
|
|
786c6d |
+ iface->dhcp_learn_iqn,
|
|
|
786c6d |
+ sizeof(iface->dhcp_learn_iqn));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_req_vendor_id_en",
|
|
|
786c6d |
+ iface->dhcp_req_vendor_id_state,
|
|
|
786c6d |
+ sizeof(iface->dhcp_req_vendor_id_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_use_vendor_id_en",
|
|
|
786c6d |
+ iface->dhcp_vendor_id_state,
|
|
|
786c6d |
+ sizeof(iface->dhcp_vendor_id_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_vendor_id",
|
|
|
786c6d |
+ iface->dhcp_vendor_id,
|
|
|
786c6d |
+ sizeof(iface->dhcp_vendor_id));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dhcp_slp_da_info_en",
|
|
|
786c6d |
+ iface->dhcp_slp_da, sizeof(iface->dhcp_slp_da));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "fragment_disable",
|
|
|
786c6d |
+ iface->fragmentation,
|
|
|
786c6d |
+ sizeof(iface->fragmentation));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "grat_arp_en",
|
|
|
786c6d |
+ iface->gratuitous_arp,
|
|
|
786c6d |
+ sizeof(iface->gratuitous_arp));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "incoming_forwarding_en",
|
|
|
786c6d |
+ iface->incoming_forwarding,
|
|
|
786c6d |
+ sizeof(iface->incoming_forwarding));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "tos_en",
|
|
|
786c6d |
+ iface->tos_state, sizeof(iface->tos_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "tos", &iface->tos))
|
|
|
786c6d |
+ iface->tos = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "ttl", &iface->ttl))
|
|
|
786c6d |
+ iface->ttl = 0;
|
|
|
786c6d |
} else {
|
|
|
786c6d |
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
"ipaddr_autocfg",
|
|
|
786c6d |
@@ -872,6 +937,53 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
|
|
786c6d |
sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_addr",
|
|
|
786c6d |
iface->ipv6_router,
|
|
|
786c6d |
sizeof(iface->ipv6_router));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "router_state",
|
|
|
786c6d |
+ iface->router_autocfg,
|
|
|
786c6d |
+ sizeof(iface->router_autocfg));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "dup_addr_detect_cnt",
|
|
|
786c6d |
+ &iface->dup_addr_detect_cnt))
|
|
|
786c6d |
+ iface->dup_addr_detect_cnt = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "flow_label", &iface->flow_label))
|
|
|
786c6d |
+ iface->flow_label = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "grat_neighbor_adv_en",
|
|
|
786c6d |
+ iface->gratuitous_neighbor_adv,
|
|
|
786c6d |
+ sizeof(iface->gratuitous_neighbor_adv));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "hop_limit", &iface->hop_limit))
|
|
|
786c6d |
+ iface->hop_limit = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "mld_en",
|
|
|
786c6d |
+ iface->mld, sizeof(iface->mld));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "nd_reachable_tmo",
|
|
|
786c6d |
+ &iface->nd_reachable_tmo))
|
|
|
786c6d |
+ iface->nd_reachable_tmo = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "nd_rexmit_time", &iface->nd_rexmit_time))
|
|
|
786c6d |
+ iface->nd_rexmit_time = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "nd_stale_tmo", &iface->nd_stale_tmo))
|
|
|
786c6d |
+ iface->nd_stale_tmo = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "router_adv_link_mtu",
|
|
|
786c6d |
+ &iface->router_adv_link_mtu))
|
|
|
786c6d |
+ iface->router_adv_link_mtu = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "traffic_class", &iface->traffic_class))
|
|
|
786c6d |
+ iface->traffic_class = 0;
|
|
|
786c6d |
}
|
|
|
786c6d |
|
|
|
786c6d |
if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS, "port",
|
|
|
786c6d |
@@ -888,6 +1000,94 @@ static int iscsi_sysfs_read_iface(struct iface_rec *iface, int host_no,
|
|
|
786c6d |
&iface->vlan_priority))
|
|
|
786c6d |
iface->vlan_priority = UINT8_MAX;
|
|
|
786c6d |
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "vlan_enabled",
|
|
|
786c6d |
+ iface->vlan_state, sizeof(iface->vlan_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "enabled",
|
|
|
786c6d |
+ iface->state, sizeof(iface->state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "delayed_ack_en",
|
|
|
786c6d |
+ iface->delayed_ack, sizeof(iface->delayed_ack));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_nagle_disable",
|
|
|
786c6d |
+ iface->nagle, sizeof(iface->nagle));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_wsf_disable",
|
|
|
786c6d |
+ iface->tcp_wsf_state, sizeof(iface->tcp_wsf_state));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_wsf",
|
|
|
786c6d |
+ &iface->tcp_wsf))
|
|
|
786c6d |
+ iface->tcp_wsf = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "tcp_timer_scale", &iface->tcp_timer_scale))
|
|
|
786c6d |
+ iface->tcp_timer_scale = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "tcp_timestamp_en",
|
|
|
786c6d |
+ iface->tcp_timestamp, sizeof(iface->tcp_timestamp));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "redirect_en",
|
|
|
786c6d |
+ iface->redirect, sizeof(iface->redirect));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "def_taskmgmt_tmo", &iface->def_task_mgmt_tmo))
|
|
|
786c6d |
+ iface->def_task_mgmt_tmo = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "header_digest",
|
|
|
786c6d |
+ iface->header_digest, sizeof(iface->header_digest));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_digest",
|
|
|
786c6d |
+ iface->data_digest, sizeof(iface->data_digest));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "immediate_data",
|
|
|
786c6d |
+ iface->immediate_data, sizeof(iface->immediate_data));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "initial_r2t",
|
|
|
786c6d |
+ iface->initial_r2t, sizeof(iface->initial_r2t));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_seq_in_order",
|
|
|
786c6d |
+ iface->data_seq_inorder, sizeof(iface->data_seq_inorder));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "data_pdu_in_order",
|
|
|
786c6d |
+ iface->data_pdu_inorder, sizeof(iface->data_pdu_inorder));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint8(iface_kern_id, ISCSI_IFACE_SUBSYS, "erl",
|
|
|
786c6d |
+ &iface->erl))
|
|
|
786c6d |
+ iface->erl = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "max_recv_dlength", &iface->max_recv_dlength))
|
|
|
786c6d |
+ iface->max_recv_dlength = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "first_burst_len", &iface->first_burst_len))
|
|
|
786c6d |
+ iface->first_burst_len = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint16(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "max_outstanding_r2t", &iface->max_out_r2t))
|
|
|
786c6d |
+ iface->max_out_r2t = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ if (sysfs_get_uint(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "max_burst_len", &iface->max_burst_len))
|
|
|
786c6d |
+ iface->max_burst_len = 0;
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "chap_auth",
|
|
|
786c6d |
+ iface->chap_auth, sizeof(iface->chap_auth));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "bidi_chap",
|
|
|
786c6d |
+ iface->bidi_chap, sizeof(iface->bidi_chap));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "strict_login_comp_en",
|
|
|
786c6d |
+ iface->strict_login_comp,
|
|
|
786c6d |
+ sizeof(iface->strict_login_comp));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS,
|
|
|
786c6d |
+ "discovery_auth_optional",
|
|
|
786c6d |
+ iface->discovery_auth, sizeof(iface->discovery_auth));
|
|
|
786c6d |
+
|
|
|
786c6d |
+ sysfs_get_str(iface_kern_id, ISCSI_IFACE_SUBSYS, "discovery_logout",
|
|
|
786c6d |
+ iface->discovery_logout, sizeof(iface->discovery_logout));
|
|
|
786c6d |
+
|
|
|
786c6d |
if (sscanf(iface_kern_id, "ipv%d-iface-%u-%u", &iface_type,
|
|
|
786c6d |
&tmp_host_no, &iface_num) == 3)
|
|
|
786c6d |
iface->iface_num = iface_num;
|
|
|
786c6d |
--
|
|
|
786c6d |
1.8.3.1
|
|
|
786c6d |
|