unsigned int ksnc_closing:1; /* being shut down */
unsigned int ksnc_flip:1; /* flip or not, only for V2.x */
unsigned int ksnc_zc_capable:1; /* enable to ZC */
- struct ksock_proto *ksnc_proto; /* protocol for the connection */
+ const struct ksock_proto *ksnc_proto; /* protocol for the connection */
/* READER */
int ksnp_error; /* errno on closing last conn */
__u64 ksnp_zc_next_cookie;/* ZC completion cookie */
__u64 ksnp_incarnation; /* latest known peer_ni incarnation */
- struct ksock_proto *ksnp_proto; /* latest known peer_ni protocol */
+ const struct ksock_proto *ksnp_proto; /* latest known protocol */
struct list_head ksnp_conns; /* all active connections */
struct list_head ksnp_routes; /* routes */
struct list_head ksnp_tx_queue; /* waiting packets */
* return MATCH_MAY : can be backup */
};
-extern struct ksock_proto ksocknal_protocol_v1x;
-extern struct ksock_proto ksocknal_protocol_v2x;
-extern struct ksock_proto ksocknal_protocol_v3x;
+extern const struct ksock_proto ksocknal_protocol_v1x;
+extern const struct ksock_proto ksocknal_protocol_v2x;
+extern const struct ksock_proto ksocknal_protocol_v3x;
#define KSOCK_PROTO_V1_MAJOR LNET_PROTO_TCP_VERSION_MAJOR
#define KSOCK_PROTO_V1_MINOR LNET_PROTO_TCP_VERSION_MINOR
EXIT;
}
-static struct ksock_proto *
-ksocknal_parse_proto_version (struct ksock_hello_msg *hello)
+static const struct ksock_proto *
+ksocknal_parse_proto_version(struct ksock_hello_msg *hello)
{
__u32 version = 0;
int timeout;
int proto_match;
int rc;
- struct ksock_proto *proto;
+ const struct ksock_proto *proto;
struct lnet_process_id recv_id;
/* socket type set on active connections - not set on passive */
return; /* Do nothing */
}
-struct ksock_proto ksocknal_protocol_v1x =
+const struct ksock_proto ksocknal_protocol_v1x =
{
.pro_version = KSOCK_PROTO_V1,
.pro_send_hello = ksocknal_send_hello_v1,
.pro_match_tx = ksocknal_match_tx
};
-struct ksock_proto ksocknal_protocol_v2x =
+const struct ksock_proto ksocknal_protocol_v2x =
{
.pro_version = KSOCK_PROTO_V2,
.pro_send_hello = ksocknal_send_hello_v2,
.pro_match_tx = ksocknal_match_tx
};
-struct ksock_proto ksocknal_protocol_v3x =
+const struct ksock_proto ksocknal_protocol_v3x =
{
.pro_version = KSOCK_PROTO_V3,
.pro_send_hello = ksocknal_send_hello_v2,