akmhoque | 29c1db5 | 2012-09-07 14:47:43 -0500 | [diff] [blame^] | 1 | #ifndef _NLSR_ROUTE_H_ |
| 2 | #define _NLSR_ROUTE_H_ |
| 3 | |
| 4 | #define EMPTY_PARENT -12345 |
| 5 | #define INF_DISTANCE 2147483647 |
| 6 | |
| 7 | struct map_entry |
| 8 | { |
| 9 | char *router; |
| 10 | int mapping; |
| 11 | }; |
| 12 | |
| 13 | int route_calculate(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags); |
| 14 | void make_map(void); |
| 15 | void add_map_entry(char *router); |
| 16 | void add_adj_data_to_map(char *orig_router, char *body, int no_link); |
| 17 | void print_map(void); |
| 18 | void assign_mapping_number(void); |
| 19 | void make_adj_matrix(int **adj_matrix,int map_element); |
| 20 | void init_adj_matrix(int **adj_matrix,int map_element); |
| 21 | void print_adj_matrix(int **adj_matrix, int map_element); |
| 22 | int get_mapping_no(char *router); |
| 23 | void calculate_path(int **adj_matrix, long int *parent, long int V, long int S); |
| 24 | void sort_queue_by_distance(long int *Q,long int *dist,long int start,long int element); |
| 25 | int is_not_explored(long int *Q, long int u,long int start, long int element); |
| 26 | void print_path(long int *parent, long int dest); |
| 27 | void print_all_path_from_source(long int *parent,long int source); |
| 28 | |
| 29 | #endif |