summaryrefslogtreecommitdiff
path: root/src/lib/config.h.in
blob: 38d6f768ee757156b1deebb1d77aaf9ab65d2753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
 * Ouroboros - Copyright (C) 2016 - 2026
 *
 * Ouroboros library configuration
 *
 *    Dimitri Staessens <dimitri@ouroboros.rocks>
 *    Sander Vrijders   <sander@ouroboros.rocks>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., http://www.fsf.org/about/contact/.
 */

#ifndef MILLION
#define MILLION  1000000LL
#endif

#ifndef BILLION
#define BILLION  1000000000LL
#endif

#cmakedefine HAVE_SYS_RANDOM
#cmakedefine HAVE_EXPLICIT_BZERO
#cmakedefine HAVE_LIBGCRYPT
#cmakedefine HAVE_OPENSSL
#ifdef HAVE_OPENSSL
#cmakedefine HAVE_ML
#cmakedefine HAVE_SLH
#cmakedefine HAVE_OPENSSL_4_1
#define HAVE_ENCRYPTION
#define SECMEM_MINSIZE           @SECMEM_MINSIZE@
#endif
#define PROC_SECMEM_MAX          @PROC_SECMEM_MAX@

#define SYS_MAX_FLOWS            @SYS_MAX_FLOWS@

#cmakedefine                     QOS_DISABLE_CRC
#cmakedefine                     HAVE_OPENSSL_RNG
#cmakedefine                     HAVE_PCLMUL
#cmakedefine                     HAVE_PMULL

#define SHM_LOCKFILE_NAME        "@SHM_LOCKFILE_NAME@"
#define SSM_RBUFF_TXQ_DELAY       @SSM_RBUFF_TXQ_DELAY@ /* ms */
#define FLOW_ALLOC_TIMEOUT        @FLOW_ALLOC_TIMEOUT@

#define TPM_DEBUG_REPORT_INTERVAL @TPM_DEBUG_REPORT_INTERVAL@
#define TPM_DEBUG_ABORT_TIMEOUT   @TPM_DEBUG_ABORT_TIMEOUT@

#if defined(__linux__) || (defined(__MACH__) && !defined(__APPLE__))
/* Avoid a bug in robust mutex implementation of glibc 2.25 */
    #include <features.h>
    #if !defined(__GLIBC__) || !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 25)
    #cmakedefine HAVE_ROBUST_MUTEX
    #endif
#else
#cmakedefine HAVE_ROBUST_MUTEX
#endif

#cmakedefine HAVE_FUSE
#ifdef HAVE_FUSE
#define FUSE_PREFIX         "@FUSE_PREFIX@"
#cmakedefine PROC_FLOW_STATS
#endif

#cmakedefine HAVE_LIBURCU

#cmakedefine FRCT_DEBUG_STDOUT

#define PTHREAD_COND_CLOCK  @PTHREAD_COND_CLOCK@

#define PROC_MAX_FLOWS      @PROC_MAX_FLOWS@
#define PROC_RES_FDS        @PROC_RES_FDS@
#define PROC_MAX_FQUEUES    @PROC_MAX_FQUEUES@

/* Flow endpoints */
#define POA_MGMT_FRAME_SIZE  @POA_MGMT_FRAME_SIZE@
#define POA_MGMT_SND_TIMEO   @POA_MGMT_SND_TIMEO@
#define POA_MAX_POAS         @POA_MAX_POAS@
#define POA_UDP_MPL          @POA_UDP_MPL@
#define POA_UDP4_MTU         @POA_UDP4_MTU@
#define POA_UDP6_MTU         @POA_UDP6_MTU@
#define POA_UDP_RD_BUF       @POA_UDP_RD_BUF@
#cmakedefine                HAVE_ETH
#cmakedefine                HAVE_RAW_SOCKETS
#cmakedefine                HAVE_BPF
#cmakedefine                HAVE_NETMAP
#cmakedefine                POA_ETH_QDISC_BYPASS
#define POA_ETH_MPL          @POA_ETH_MPL@
#define POA_ETH_SNDBUF       @POA_ETH_SNDBUF@
#define POA_ETH_RCVBUF       @POA_ETH_RCVBUF@
#define POA_ETH_LO_MTU       @POA_ETH_LO_MTU@
#define POA_ETH_RD_BUF       @POA_ETH_RD_BUF@

/* Default Delta-t parameters */
#cmakedefine                FRCT_LINUX_RTT_ESTIMATOR
#define DELT_A              (@DELTA_T_ACK@)                  /* ms */
#define DELT_R              (@DELTA_T_RTX@)                  /* ms */

#define RQ_SIZE             (@FRCT_REORDER_QUEUE_SIZE@)
#define START_WINDOW        (@FRCT_START_WINDOW@)
#define RTO_MIN             (@FRCT_RTO_MIN@ * 1000)
#define RTO_DIV             (@FRCT_RTO_INC_FACTOR@)
#define MDEV_MUL            (@FRCT_RTO_MDEV_MULTIPLIER@)

#define TICTIME             (@FRCT_TICK_TIME@ * 1000)        /* ns */

/* Retransmission tuning */
#define RXMQ_RES            (@RXM_MIN_RESOLUTION@)           /* 2^N ns */
#define RXMQ_BUMP           (@RXM_WHEEL_MULTIPLIER@)
#define RXMQ_LVLS           (@RXM_WHEEL_LEVELS@)
#define RXMQ_SLOTS          (@RXM_WHEEL_SLOTS_PER_LEVEL@)

#define ACKQ_SLOTS          (@ACK_WHEEL_SLOTS@)
#define ACKQ_RES            (@ACK_WHEEL_RESOLUTION@)         /* 2^N ns */

#define KEY_LEAF_BITS       (@KEY_LEAF_BITS@)       /* pkts/leaf-key = 2^n */
#define KEY_NODE_BITS       (@KEY_NODE_BITS@)       /* leaf-keys/node = 2^n */
#define KEY_NODE_COUNT      (@KEY_NODE_COUNT@)      /* node keys/batch N */
#define KEY_REKEY_WATERMARK (@KEY_REKEY_WATERMARK@) /* node-keys-left trig */
#define KEY_REPLAY_WINDOW   (@KEY_REPLAY_WINDOW@)   /* rx replay win pkts */
#define FLOW_WM_CHECK       (1u << @KEY_REKEY_WM_CHECK_BITS@) /* wm chk/n wr */