blob: 587c8be5cb979d2193fb981339d05b918bdc6f6b [file] [log] [blame]
akmhoque3560cb62012-09-09 10:52:30 -05001#ifndef _NLSR_NPT_H_
2#define _NLSR_NPT_H_
3
4#define NO_FACE -12345
akmhoquea30cb772012-10-07 09:50:34 -05005#define ZERO_FACE 0
akmhoque3560cb62012-09-09 10:52:30 -05006
7struct npt_entry
8{
akmhoque810a5b52012-09-09 16:53:14 -05009 char *orig_router;
10 struct hashtb *name_list;
akmhoquede61ba92012-09-20 22:19:12 -050011 //int next_hop_face;
12 struct hashtb *face_list;
akmhoque3560cb62012-09-09 10:52:30 -050013};
14
akmhoque810a5b52012-09-09 16:53:14 -050015struct name_list_entry
akmhoque3560cb62012-09-09 10:52:30 -050016{
akmhoque810a5b52012-09-09 16:53:14 -050017 char *name;
akmhoque3560cb62012-09-09 10:52:30 -050018};
19
20
akmhoquede61ba92012-09-20 22:19:12 -050021int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs);
akmhoque3cced642012-09-24 16:20:20 -050022int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix);
akmhoque3560cb62012-09-09 10:52:30 -050023void print_npt(void);
akmhoquede61ba92012-09-20 22:19:12 -050024void delete_orig_router_from_npt(char *orig_router);
25//void update_npt_with_new_route(char * orig_router,int next_hop_face);
akmhoque3cced642012-09-24 16:20:20 -050026void update_npt_with_new_route(void);
akmhoquefbfd0982012-09-09 20:59:03 -050027void destroy_all_face_by_nlsr(void);
akmhoque3cced642012-09-24 16:20:20 -050028void sort_faces_by_distance(int *faces,int *route_costs,int start,int element);
29void update_ccnd_fib_for_orig_router(char *orig_router);
30void get_all_faces_for_orig_router_from_npt(char *orig_router, int *faces, int *route_costs, int num_faces);
akmhoque3560cb62012-09-09 10:52:30 -050031
32#endif