blob: 0e7884b10db43836e2cbbe427277e9a02ddc6074 [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
7struct map_entry
8{
9 char *router;
10 int mapping;
11};
12
13int route_calculate(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
14void make_map(void);
15void add_map_entry(char *router);
16void add_adj_data_to_map(char *orig_router, char *body, int no_link);
17void print_map(void);
18void assign_mapping_number(void);
19void make_adj_matrix(int **adj_matrix,int map_element);
20void init_adj_matrix(int **adj_matrix,int map_element);
21void print_adj_matrix(int **adj_matrix, int map_element);
22int get_mapping_no(char *router);
23void calculate_path(int **adj_matrix, long int *parent, long int V, long int S);
24void sort_queue_by_distance(long int *Q,long int *dist,long int start,long int element);
25int is_not_explored(long int *Q, long int u,long int start, long int element);
26void print_path(long int *parent, long int dest);
27void print_all_path_from_source(long int *parent,long int source);
28
29#endif