Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /******************************************************************************
0003 *******************************************************************************
0004 **
0005 **  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
0006 **  Copyright (C) 2004-2011 Red Hat, Inc.  All rights reserved.
0007 **
0008 **
0009 *******************************************************************************
0010 ******************************************************************************/
0011 
0012 #ifndef __CONFIG_DOT_H__
0013 #define __CONFIG_DOT_H__
0014 
0015 #define DLM_MAX_SOCKET_BUFSIZE  4096
0016 
0017 struct dlm_config_node {
0018     int nodeid;
0019     int weight;
0020     int new;
0021     uint32_t comm_seq;
0022 };
0023 
0024 #define DLM_MAX_ADDR_COUNT 3
0025 
0026 #define DLM_PROTO_TCP   0
0027 #define DLM_PROTO_SCTP  1
0028 
0029 struct dlm_config_info {
0030     int ci_tcp_port;
0031     int ci_buffer_size;
0032     int ci_rsbtbl_size;
0033     int ci_recover_timer;
0034     int ci_toss_secs;
0035     int ci_scan_secs;
0036     int ci_log_debug;
0037     int ci_log_info;
0038     int ci_protocol;
0039     int ci_mark;
0040 #ifdef CONFIG_DLM_DEPRECATED_API
0041     int ci_timewarn_cs;
0042 #endif
0043     int ci_new_rsb_count;
0044     int ci_recover_callbacks;
0045     char ci_cluster_name[DLM_LOCKSPACE_LEN];
0046 };
0047 
0048 extern struct dlm_config_info dlm_config;
0049 
0050 int dlm_config_init(void);
0051 void dlm_config_exit(void);
0052 int dlm_config_nodes(char *lsname, struct dlm_config_node **nodes_out,
0053              int *count_out);
0054 int dlm_comm_seq(int nodeid, uint32_t *seq);
0055 int dlm_our_nodeid(void);
0056 int dlm_our_addr(struct sockaddr_storage *addr, int num);
0057 
0058 #endif              /* __CONFIG_DOT_H__ */
0059