blob: 8d54828db74468eba815ea3f7052ec988ca89f13 [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 struct hashtb *face_list;
akmhoque3560cb62012-09-09 10:52:30 -050012};
13
akmhoque810a5b52012-09-09 16:53:14 -050014struct name_list_entry
akmhoque3560cb62012-09-09 10:52:30 -050015{
akmhoque810a5b52012-09-09 16:53:14 -050016 char *name;
akmhoque3560cb62012-09-09 10:52:30 -050017};
18
19
akmhoquede61ba92012-09-20 22:19:12 -050020int add_npt_entry(char *orig_router, char *name_prefix, int num_face, int *faces, int *route_costs);
akmhoque3cced642012-09-24 16:20:20 -050021int delete_npt_entry_by_router_and_name_prefix(char *orig_router, char *name_prefix);
akmhoque3560cb62012-09-09 10:52:30 -050022void print_npt(void);
akmhoquede61ba92012-09-20 22:19:12 -050023void delete_orig_router_from_npt(char *orig_router);
akmhoque3cced642012-09-24 16:20:20 -050024void update_npt_with_new_route(void);
akmhoquefbfd0982012-09-09 20:59:03 -050025void destroy_all_face_by_nlsr(void);
akmhoque3cced642012-09-24 16:20:20 -050026void sort_faces_by_distance(int *faces,int *route_costs,int start,int element);
27void update_ccnd_fib_for_orig_router(char *orig_router);
28void 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 -050029
30#endif