summaryrefslogtreecommitdiffstats
path: root/src/clientconfig.h
blob: 77252a45741fd6a3674f77b5a45401205558062d (plain) (blame)
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
#ifndef _CLIENTCONFIG_H_
#define _CLIENTCONFIG_H_

// Which is the minimum protocol version the client expects from the server
#define MIN_SUPPORTED_SERVER 2

// in seconds if not stated otherwise (MS = milliseconds)
#define SOCKET_TIMEOUT_CLIENT_DATA 2
#define SOCKET_TIMEOUT_CLIENT_DISCOVERY 1

#define RTT_THRESHOLD_FACTOR(us) (((us) * 2) / 3) // 2/3 = current to best must be 33% worse
#define RTT_ABSOLUTE_THRESHOLD (80000) // Or 80ms worse
#define RTT_UNREACHABLE 0x7FFFFFFul // Use this value for timeout/unreachable as RTT. Don't set too high or you might get overflows. 0x7FFFFFF = 134 seconds
#define RTT_UNKNOWN (RTT_UNREACHABLE / 2)
// This must be a power of two:
#define RTT_BLOCK_SIZE 4096
// Size of the RTT test block 256k
#define RTT_TEST_BLOCK_SIZE 262144

#define STARTUP_MODE_DURATION 30
// Interval of several repeating tasks (in seconds)
#define TIMER_INTERVAL_PROBE_STARTUP 4
#define TIMER_INTERVAL_PROBE_NORMAL 22
#define TIMER_INTERVAL_PROBE_PANIC 2
#define TIMER_INTERVAL_KEEPALIVE_PACKET 6

// Expect a keepalive response every X seconds
#define SOCKET_KEEPALIVE_TIMEOUT 8

// Number of unsuccessful alt_server probes before read errors are reported to the block layer
// (ALL servers will be probed this many times)
// Set to 0 to disable
#define PROBE_COUNT_TIMEOUT 0

// ++ Kernel module ++
#define DEFAULT_READ_AHEAD_KB 512
#define NUMBER_DEVICES 8

#endif