1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
6 * #defines shared between socknal implementation and utilities
8 #ifndef __LNET_LNET_SOCKLND_H__
9 #define __LNET_LNET_SOCKLND_H__
11 #include <lnet/types.h>
12 #include <lnet/lib-types.h>
14 #define SOCKLND_CONN_NONE (-1)
15 #define SOCKLND_CONN_ANY 0
16 #define SOCKLND_CONN_CONTROL 1
17 #define SOCKLND_CONN_BULK_IN 2
18 #define SOCKLND_CONN_BULK_OUT 3
19 #define SOCKLND_CONN_NTYPES 4
22 __u32 kshm_magic; /* magic number of socklnd message */
23 __u32 kshm_version; /* version of socklnd message */
24 lnet_nid_t kshm_src_nid; /* sender's nid */
25 lnet_nid_t kshm_dst_nid; /* destination nid */
26 lnet_pid_t kshm_src_pid; /* sender's pid */
27 lnet_pid_t kshm_dst_pid; /* destination pid */
28 __u64 kshm_src_incarnation; /* sender's incarnation */
29 __u64 kshm_dst_incarnation; /* destination's incarnation */
30 __u32 kshm_ctype; /* connection type */
31 __u32 kshm_nips; /* # IP addrs */
32 __u32 kshm_ips[0]; /* IP addrs */
33 } WIRE_ATTR ksock_hello_msg_t;
36 lnet_hdr_t ksnm_hdr; /* lnet hdr */
37 char ksnm_payload[0];/* lnet payload */
38 } WIRE_ATTR ksock_lnet_msg_t;
41 __u32 ksm_type; /* type of socklnd message */
42 __u32 ksm_csum; /* checksum if != 0 */
43 __u64 ksm_zc_req_cookie; /* ack required if != 0 */
44 __u64 ksm_zc_ack_cookie; /* ack if != 0 */
46 ksock_lnet_msg_t lnetmsg; /* lnet message, it's empty if it's NOOP */
48 } WIRE_ATTR ksock_msg_t;
50 #define KSOCK_MSG_NOOP 0xc0 /* ksm_u empty */
51 #define KSOCK_MSG_LNET 0xc1 /* lnet msg */