0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __LOWCOMMS_DOT_H__
0013 #define __LOWCOMMS_DOT_H__
0014
0015 #include "dlm_internal.h"
0016
0017 #define DLM_MIDCOMMS_OPT_LEN sizeof(struct dlm_opts)
0018 #define DLM_MAX_APP_BUFSIZE (DLM_MAX_SOCKET_BUFSIZE - \
0019 DLM_MIDCOMMS_OPT_LEN)
0020
0021 #define CONN_HASH_SIZE 32
0022
0023
0024
0025
0026
0027 static inline int nodeid_hash(int nodeid)
0028 {
0029 return nodeid & (CONN_HASH_SIZE-1);
0030 }
0031
0032
0033 extern int dlm_allow_conn;
0034
0035 int dlm_lowcomms_start(void);
0036 void dlm_lowcomms_shutdown(void);
0037 void dlm_lowcomms_stop(void);
0038 void dlm_lowcomms_exit(void);
0039 int dlm_lowcomms_close(int nodeid);
0040 struct dlm_msg *dlm_lowcomms_new_msg(int nodeid, int len, gfp_t allocation,
0041 char **ppc, void (*cb)(void *data),
0042 void *data);
0043 void dlm_lowcomms_commit_msg(struct dlm_msg *msg);
0044 void dlm_lowcomms_put_msg(struct dlm_msg *msg);
0045 int dlm_lowcomms_resend_msg(struct dlm_msg *msg);
0046 int dlm_lowcomms_connect_node(int nodeid);
0047 int dlm_lowcomms_nodes_set_mark(int nodeid, unsigned int mark);
0048 int dlm_lowcomms_addr(int nodeid, struct sockaddr_storage *addr, int len);
0049 void dlm_midcomms_receive_done(int nodeid);
0050 struct kmem_cache *dlm_lowcomms_writequeue_cache_create(void);
0051 struct kmem_cache *dlm_lowcomms_msg_cache_create(void);
0052
0053 #endif
0054