1 /*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11
12 /*
13 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
14 */
15
16 #ifndef _KRRP_H
17 #define _KRRP_H
18
19 #include <sys/types.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #define KRRP_DRIVER "krrp"
26 #define KRRP_DEVICE "/dev/krrp"
27 #define KRRP_KSTAT_ID_STRING_LENGTH 17
28 #define KRRP_MIN_PORT 1000
29 #define KRRP_MAX_PORT 65535
30 #define KRRP_MIN_SESS_PDU_DBLK_DATA_SZ 1 * 1024
31 #define KRRP_MAX_SESS_PDU_DBLK_DATA_SZ 128 * 1024
32
33 /* Min and Max values of the number of snapshots kept for CDP-replications */
34 #define KRRP_MIN_KEEP_SNAPS 1
35 #define KRRP_MAX_KEEP_SNAPS 32
36
37 /* Min and Max values of timeout for connect() call */
38 #define KRRP_MIN_CONN_TIMEOUT 5
39 #define KRRP_MAX_CONN_TIMEOUT 120
40
41 /* Min value of Connection Throughput */
42 #define KRRP_MIN_CONN_THROTTLE 1 * 1000 * 1000
43
44 /* Min value of Memory Limit in MB */
45 #define KRRP_MIN_MAXMEM 100
46
47 /* The maximum length of auth digest */
48 #define KRRP_AUTH_DIGEST_MAX_LEN 256
49
50 typedef enum {
51 KRRP_SVC_CFG_TYPE_UNKNOWN,
52 KRRP_SVC_CFG_TYPE_SERVER
53 } krrp_cfg_type_t;
54
55 #ifdef __cplusplus
56 }
57 #endif
58
59 #endif /* _KRRP_H */