akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 1 | #ifndef _NLSR_NPT_H_ |
| 2 | #define _NLSR_NPT_H_ |
| 3 | |
| 4 | #define NO_FACE -12345 |
akmhoque | a30cb77 | 2012-10-07 09:50:34 -0500 | [diff] [blame^] | 5 | #define ZERO_FACE 0 |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 6 | |
| 7 | struct npt_entry |
| 8 | { |
akmhoque | 810a5b5 | 2012-09-09 16:53:14 -0500 | [diff] [blame] | 9 | char *orig_router; |
| 10 | struct hashtb *name_list; |
akmhoque | de61ba9 | 2012-09-20 22:19:12 -0500 | [diff] [blame] | 11 | //int next_hop_face; |
| 12 | struct hashtb *face_list; |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 13 | }; |
| 14 | |
akmhoque | 810a5b5 | 2012-09-09 16:53:14 -0500 | [diff] [blame] | 15 | struct name_list_entry |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 16 | { |
akmhoque | 810a5b5 | 2012-09-09 16:53:14 -0500 | [diff] [blame] | 17 | char *name; |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | |
akmhoque | de61ba9 | 2012-09-20 22:19:12 -0500 | [diff] [blame] | 21 | int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs); |
akmhoque | 3cced64 | 2012-09-24 16:20:20 -0500 | [diff] [blame] | 22 | int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix); |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 23 | void print_npt(void); |
akmhoque | de61ba9 | 2012-09-20 22:19:12 -0500 | [diff] [blame] | 24 | void delete_orig_router_from_npt(char *orig_router); |
| 25 | //void update_npt_with_new_route(char * orig_router,int next_hop_face); |
akmhoque | 3cced64 | 2012-09-24 16:20:20 -0500 | [diff] [blame] | 26 | void update_npt_with_new_route(void); |
akmhoque | fbfd098 | 2012-09-09 20:59:03 -0500 | [diff] [blame] | 27 | void destroy_all_face_by_nlsr(void); |
akmhoque | 3cced64 | 2012-09-24 16:20:20 -0500 | [diff] [blame] | 28 | void sort_faces_by_distance(int *faces,int *route_costs,int start,int element); |
| 29 | void update_ccnd_fib_for_orig_router(char *orig_router); |
| 30 | void get_all_faces_for_orig_router_from_npt(char *orig_router, int *faces, int *route_costs, int num_faces); |
akmhoque | 3560cb6 | 2012-09-09 10:52:30 -0500 | [diff] [blame] | 31 | |
| 32 | #endif |