blob: ecb6bda768b14d041ed7175288e10a954956299a [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);
akmhoque54a14f42013-02-24 06:16:20 -060029void destroy_name_list(struct hashtb *name_list);
30void destroy_face_list(struct hashtb *face_list);
31void destroy_npt(void);
akmhoque3560cb62012-09-09 10:52:30 -050032
33#endif