akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 1 | #ifndef _NLSR_NPT_H_ |
| 2 | #define _NLSR_NPT_H_ |
| 3 | |
| 4 | #define NO_FACE -12345 |
| 5 | #define ZERO_FACE 0 |
| 6 | |
| 7 | struct npt_entry |
| 8 | { |
| 9 | char *orig_router; |
| 10 | struct hashtb *name_list; |
| 11 | //int next_hop_face; |
| 12 | struct hashtb *face_list; |
| 13 | }; |
| 14 | |
| 15 | struct name_list_entry |
| 16 | { |
| 17 | char *name; |
| 18 | }; |
| 19 | |
| 20 | |
| 21 | int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs); |
| 22 | int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix); |
| 23 | void print_npt(void); |
| 24 | void delete_orig_router_from_npt(char *orig_router); |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 25 | void update_npt_with_new_route(void); |
| 26 | void destroy_all_face_by_nlsr(void); |
| 27 | void sort_faces_by_distance(int *faces,int *route_costs,int start,int element); |
| 28 | void update_ccnd_fib_for_orig_router(char *orig_router); |
| 29 | void get_all_faces_for_orig_router_from_npt(char *orig_router, int *faces, int *route_costs, int num_faces); |
| 30 | |
| 31 | #endif |