defines.h 737 Bytes
Newer Older
1
2
3
#ifndef PRRT_DEFINES_H
#define PRRT_DEFINES_H

4
5
6
7
#if defined __arm__
#   define __builtin_ia32_rdtsc() (0)
#endif

8
#ifndef MAX
9
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
10
11
12
#endif

#ifndef MIN
13
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
14
#endif
15
16
17
18
19

#define PRRT_MAX_RECEIVER_COUNT 255

#define MAX_PAYLOAD_LENGTH 65528 // maximum UDP packet length (2^16 - 8)

20
21
#define SEQNO_SPACE UINT16_MAX // 2**16 as seqno is uint16_t

22
23
#define TIMESTAMP_SPACE UINT32_MAX

24
25
#define GF_BITS 8

26
27
#define K_START 4
#define N_START 7
28
29
#define N_P_START 1

30
31
#define RRT_ALPHA 0.125

32
33
#define MIN_RTT 300

Andreas Schmidt's avatar
Andreas Schmidt committed
34
35
36
37
38
// Uncomment the line below if you are compiling on Windows.
// #define WINDOWS
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
39

40
#endif //PRRT_DEFINES_H