Some code fixes done to multicast service classes.
[tourist.git] / Constants.h.in
bloba5ff25279bc0bcc78d63987c56a402f06e59fe77
1 #ifndef CONSTANTS_H_INCLUDED
2 #define CONSTATNS_H_INCLUDED
4 /* This file is configured by the Tourist build system (CMAKE) */
6 typedef unsigned int elem_t;
8 /**
9 Internal variable as used by the Id class to create the arry
10 of the size ID_SIZE for holding UUID of the Tourist's Node
12 #define ID_SIZE 4
14 #define SIZEOF_UNSIGNED_INT 4
16 #define MAX_LEVEL 32
18 #define PREFIX_BIT (INT_MAX+1)
20 #define MAX_NODE_LEVEL 3
22 #define MIN_KNOWN 4
24 //Node tables.
26 //Don't start these values from 0, 0 indicats no table.
27 #define PREFIX 1
28 #define SUFFIX 2
29 #define BACKUP 3
30 #define RANDOM 4
32 //Transport Constants
33 #define TCP 1
34 #define RUDP 2
35 #define TCP_PORT 3045
36 #define RUDP_PORT 4045
37 #define HTTP_PORT 8085
40 //Node query types
41 #define HIGHER_LEVELS 1
42 #define EQUAL_LEVELS 2
43 #define LOWER_LEVELS 4
44 #define FIND_ALL 8
45 #define FIND_PREFIXES 16
46 #define FIND_SUFFIXES 32
47 #define ONE_LEVEL_LOWER 64
48 #define FIND_RANDOM 64
50 //Event Types
51 #define EVENT_PREFIX_JOIN 1
52 #define EVENT_PREFIX_DISCONNECT 2
53 #define EVENT_PREFIX_LEVEL_UP 3
54 #define EVENT_PREFIX_LEVEL_DOWN 4
55 #define EVENT_SUFFIX_JOIN 5
56 #define EVENT_SUFFIX_DISCONNECT 6
57 #define EVENT_SUFFIX_LEVEL_UP 7
58 #define EVENT_SUFFIX_LEVEL_DOWN 8
59 #define TYPE_PREFIX 9
60 #define TYPE_SUFFIX 10
62 // Path to the configuration file containing different customization
63 // parameters for this node.
64 #define CONFIG_FILE_PATH "./node.properties"
65 // Specify path to the logging properties file
66 #define LOG_FILE_PATH "./logger.properties"
68 //Message Types
69 #define HESSIAN 1
71 #define NULL_ID "00000000000000000000000000000000"
73 #endif