blob: ec243e92300551a74bbe0e8f13212964a5d81f05 [file] [log] [blame]
akmhoque29c1db52012-09-07 14:47:43 -05001#ifndef _NLSR_ROUTE_H_
2#define _NLSR_ROUTE_H_
3
4#define EMPTY_PARENT -12345
5#define INF_DISTANCE 2147483647
6
akmhoque3560cb62012-09-09 10:52:30 -05007#define NO_NEXT_HOP -4321
8
akmhoque29c1db52012-09-07 14:47:43 -05009struct map_entry
10{
11 char *router;
12 int mapping;
13};
14
akmhoque3560cb62012-09-09 10:52:30 -050015
16struct routing_table_entry
17{
18 char *dest_router;
19 int next_hop_face;
20}
21;
22
akmhoque29c1db52012-09-07 14:47:43 -050023int route_calculate(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
24void make_map(void);
25void add_map_entry(char *router);
26void add_adj_data_to_map(char *orig_router, char *body, int no_link);
27void print_map(void);
28void assign_mapping_number(void);
29void make_adj_matrix(int **adj_matrix,int map_element);
30void init_adj_matrix(int **adj_matrix,int map_element);
31void print_adj_matrix(int **adj_matrix, int map_element);
32int get_mapping_no(char *router);
33void calculate_path(int **adj_matrix, long int *parent, long int V, long int S);
34void sort_queue_by_distance(long int *Q,long int *dist,long int start,long int element);
35int is_not_explored(long int *Q, long int u,long int start, long int element);
36void print_path(long int *parent, long int dest);
37void print_all_path_from_source(long int *parent,long int source);
38
akmhoque3560cb62012-09-09 10:52:30 -050039/* Routing Table Relates function */
40
41int get_next_hop(char *dest_router);
42void add_next_hop_router(char *dest_router);
43void add_next_hop_from_lsa_adj_body(char *body, int no_link);
44void print_routing_table(void);
45void do_old_routing_table_updates();
46
akmhoque29c1db52012-09-07 14:47:43 -050047#endif