-
Notifications
You must be signed in to change notification settings - Fork 0
/
bisect.h
97 lines (83 loc) · 2.2 KB
/
bisect.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
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
/*
* Copyright (C) 2009-2012 B.A.T.M.A.N. contributors:
*
* Marek Lindner <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
*
*/
#include "list-batman.h"
#define NAME_LEN 18
#define MAX_LINE 256
#define LOOP_MAGIC_LEN ((2 * NAME_LEN) + (2 * sizeof(int)) - 2)
#define RT_FLAG_ADD 1
#define RT_FLAG_UPDATE 2
#define RT_FLAG_DELETE 3
int bisect(int argc, char **argv);
struct bat_node {
char name[NAME_LEN];
struct list_head_first orig_event_list;
struct list_head_first rt_table_list;
char loop_magic[LOOP_MAGIC_LEN];
char loop_magic2[LOOP_MAGIC_LEN];
};
struct orig_event {
struct list_head list;
struct bat_node *orig_node;
struct list_head_first event_list;
struct list_head_first rt_hist_list;
};
struct rt_table {
struct list_head list;
int num_entries;
struct rt_entry *entries;
struct rt_hist *rt_hist;
};
struct rt_hist {
struct list_head list;
struct rt_table *rt_table;
struct rt_hist *prev_rt_hist;
struct seqno_event *seqno_event;
struct bat_node *next_hop;
char flags;
char loop_magic[LOOP_MAGIC_LEN];
};
struct rt_entry {
char orig[NAME_LEN];
struct bat_node *next_hop;
char flags;
};
struct seqno_event {
struct list_head list;
struct bat_node *orig;
struct bat_node *neigh;
struct bat_node *prev_sender;
long long seqno;
int tq;
int ttl;
struct rt_hist *rt_hist;
};
struct seqno_trace_neigh {
struct bat_node *bat_node;
struct seqno_event *seqno_event;
int num_neighbors;
struct seqno_trace_neigh **seqno_trace_neigh;
};
struct seqno_trace {
struct list_head list;
long long seqno;
char print;
struct seqno_trace_neigh seqno_trace_neigh;
};