blob: c1915791e6456ad034f6d7d95f04d01137d6ee42 [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
5
6struct npt_entry
7{
akmhoque810a5b52012-09-09 16:53:14 -05008 char *orig_router;
9 struct hashtb *name_list;
akmhoquede61ba92012-09-20 22:19:12 -050010 //int next_hop_face;
11 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);
24//void update_npt_with_new_route(char * orig_router,int next_hop_face);
akmhoque3cced642012-09-24 16:20:20 -050025void update_npt_with_new_route(void);
akmhoquefbfd0982012-09-09 20:59:03 -050026void destroy_all_face_by_nlsr(void);
akmhoque3cced642012-09-24 16:20:20 -050027void sort_faces_by_distance(int *faces,int *route_costs,int start,int element);
28void update_ccnd_fib_for_orig_router(char *orig_router);
29void 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 -050030
31#endif