akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 1 | #ifndef _NLSR_ADL_H_ |
| 2 | #define _NLSR_ADL_H_ |
| 3 | |
| 4 | #define NBR_DOWN 0 |
| 5 | #define NBR_ACTIVE 1 |
| 6 | |
| 7 | struct ndn_neighbor |
| 8 | { |
| 9 | struct name_prefix *neighbor; |
| 10 | int face; |
| 11 | int status; |
| 12 | char * last_lsdb_version; |
| 13 | char * last_info_version; |
| 14 | int info_interest_timed_out; |
| 15 | int lsdb_interest_timed_out; |
| 16 | int lsdb_random_time_component; |
| 17 | long int lsdb_synch_interval; |
| 18 | long int last_lsdb_requested; |
| 19 | int is_lsdb_send_interest_scheduled; |
| 20 | int metric; |
| 21 | }; |
| 22 | |
| 23 | void add_nbr_to_adl(struct name_prefix *new_nbr,int face); |
| 24 | void delete_nbr_from_adl(struct name_prefix *nbr); |
| 25 | void print_adjacent(struct ndn_neighbor *nbr); |
| 26 | void print_adjacent_from_adl(void); |
| 27 | int get_adjacent_status(struct name_prefix *nbr); |
| 28 | int get_timed_out_number(struct name_prefix *nbr); |
| 29 | int get_lsdb_interest_timed_out_number(struct name_prefix *nbr); |
| 30 | void update_adjacent_timed_out_to_adl(struct name_prefix *nbr, int increment); |
| 31 | void update_adjacent_timed_out_zero_to_adl(struct name_prefix *nbr); |
| 32 | void update_lsdb_interest_timed_out_to_adl(struct name_prefix *nbr, int increment); |
| 33 | void update_lsdb_interest_timed_out_zero_to_adl(struct name_prefix *nbr); |
| 34 | void update_adjacent_status_to_adl(struct name_prefix *nbr, int status); |
| 35 | void update_lsdb_synch_interval_to_adl(struct name_prefix *nbr, long int interval); |
| 36 | int no_active_nbr(void); |
| 37 | int is_adj_lsa_build(void); |
| 38 | void get_active_nbr_adj_data(struct ccn_charbuf *c); |
| 39 | long int get_nbr_time_diff_lsdb_req(char *nbr); |
| 40 | long int get_nbr_last_lsdb_requested(char *nbr); |
| 41 | long int get_nbr_last_lsdb_requested(char *nbr); |
| 42 | long int get_lsdb_synch_interval(char *nbr); |
| 43 | int get_nbr_random_time_component(char *nbr); |
| 44 | char * get_nbr_lsdb_version(char *nbr); |
| 45 | void update_adjacent_last_lsdb_requested_to_adl(char *nbr, long int timestamp); |
| 46 | void set_is_lsdb_send_interest_scheduled_to_zero(char *nbr); |
| 47 | void update_adjacent_lsdb_version_to_adl(struct name_prefix *nbr, char *version); |
| 48 | void adjust_adjacent_last_lsdb_requested_to_adl(char *nbr, long int sec); |
| 49 | int get_next_hop_face_from_adl(char *nbr); |
| 50 | int is_neighbor(char *nbr); |
| 51 | #endif |