-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRIPAlgorithm.h
More file actions
executable file
·51 lines (42 loc) · 931 Bytes
/
Copy pathRIPAlgorithm.h
File metadata and controls
executable file
·51 lines (42 loc) · 931 Bytes
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
#include "common_include.h"
#include "table.h"
#include "mip_protocol.h"
#include "GUIRouter.h"
/*
return whether or not the table was update if it wasnt then stop the
thread that keeps sending out the 30 second packets
*/
typedef int NWK_ID; /* network id in the packet */
typedef int RTR_ID; /* src router id in the packet */
typedef int DST_NO; /* distance to router in pkt */
int RTALGO_updateNeighbourStatus
(
PACKET_size_t PKT,
RoutingTableOBJ* RT
);
BOOLEAN RTALGO_updateTable
(
PACKET_size_t PKT,
RoutingTableOBJ* RT,
int ThisRouterId
);
BOOLEAN RTALGO_addIntoRoutingTable
(
PACKET_size_t PKT,
RoutingTableOBJ* RT
);
BOOLEAN RTALGO_doesExist
(
PACKET_size_t PKT,
RoutingTableOBJ* RT
);
BOOLEAN RTALGO_isNextHopeFieldSame
(
PACKET_size_t PKT,
RoutingTableOBJ* RT
);
BOOLEAN RTALGO_isNewDistanceShorter
(
PACKET_size_t PKT,
RoutingTableOBJ* RT
);