-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathroot.h
29 lines (23 loc) · 792 Bytes
/
root.h
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
#ifndef _ROOT_STORAGE_0_ROOT_H_
#define _ROOT_STORAGE_0_ROOT_H_
#include <inttypes.h>
// Idea
// * measure missed packets via sequence number
// * do not use root_id, but only for debugging
// * use latency to replace hop_count?
typedef struct {
// Tree identifier. It is not used for root selection!
uint32_t tree_id;
uint16_t hop_count;
uint8_t bandwidth; // interface type enum value
uint16_t root_seq_num;
uint64_t root_recv_time;
uint64_t root_send_time; //needed?
uint32_t parent_id; // for debugging
uint16_t root_next_send_ms; // next send (or earlier?)
uint64_t store_send_time; // needed?
uint32_t store_send_counter;
uint64_t time_created; // or use neighbor creation time?
} Root;
// TODO: move root handlers function here
#endif