/home/aaron/olsrd-current/olsrd/src/core/tc_set.h File Reference

#include "defs.h"
#include "common/avl.h"
#include "common/list.h"
#include "olsr_protocol.h"
#include "lq_packet.h"
#include "olsr_timer.h"
#include "olsr_socket.h"
#include "olsr_memcookie.h"
#include "duplicate_set.h"
Include dependency graph for tc_set.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tc_edge_entry
struct  tc_entry

Defines

#define OLSR_TC_EDGE_GC_TIME   (2*1000)
#define OLSR_TC_EDGE_GC_JITTER   5
#define OLSR_TC_VTIME_JITTER   5
#define OLSR_FOR_ALL_TC_ENTRIES(tc, iterator)   avl_for_each_element_safe(&tc_tree, tc, vertex_node, iterator)
#define OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge, iterator)   avl_for_each_element_safe(&tc->edge_tree, tc_edge, edge_node, iterator)
#define OLSR_FOR_ALL_PREFIX_ENTRIES(tc, rtp, iterator)   avl_for_each_element_safe(&tc->prefix_tree, rtp, rtp_prefix_tree_node, iterator)

Functions

struct avl_tree EXPORT (tc_tree)
struct olsr_memcookie_infoEXPORT (tc_mem_cookie)
void olsr_init_tc (void)
void olsr_change_myself_tc (void)
void olsr_print_tc_table (void)
void olsr_time_out_tc_set (void)
void olsr_input_tc (struct olsr_message *, struct interface *, union olsr_ip_addr *, enum duplicate_status)
struct tc_entry *EXPORT() olsr_lookup_tc_entry (const union olsr_ip_addr *)
struct tc_entry *EXPORT() olsr_locate_tc_entry (const union olsr_ip_addr *)
struct tc_edge_entry *EXPORT() olsr_lookup_tc_edge (struct tc_entry *, const union olsr_ip_addr *)
struct tc_edge_entryolsr_add_tc_edge_entry (struct tc_entry *, const union olsr_ip_addr *, uint16_t)
void olsr_delete_tc_entry (struct tc_entry *)
void olsr_delete_tc_edge_entry (struct tc_edge_entry *)
bool olsr_calc_tc_edge_entry_etx (struct tc_edge_entry *)
void olsr_set_tc_edge_timer (struct tc_edge_entry *, unsigned int)
void olsr_delete_all_tc_entries (void)
uint32_t EXPORT() getRelevantTcCount (void)
uint16_t EXPORT() get_local_ansn_number (void)
void increase_local_ansn_number (void)
void olsr_output_lq_tc (void *ifp)

Variables

struct tc_entrytc_myself

Define Documentation

#define OLSR_FOR_ALL_PREFIX_ENTRIES ( tc,
rtp,
iterator   )     avl_for_each_element_safe(&tc->prefix_tree, rtp, rtp_prefix_tree_node, iterator)

Definition at line 114 of file tc_set.h.

Referenced by olsr_calculate_routing_table(), and olsr_delete_tc_entry().

#define OLSR_FOR_ALL_TC_EDGE_ENTRIES ( tc,
tc_edge,
iterator   )     avl_for_each_element_safe(&tc->edge_tree, tc_edge, edge_node, iterator)
#define OLSR_FOR_ALL_TC_ENTRIES ( tc,
iterator   )     avl_for_each_element_safe(&tc_tree, tc, vertex_node, iterator)
#define OLSR_TC_EDGE_GC_JITTER   5

Definition at line 100 of file tc_set.h.

Referenced by olsr_input_tc().

#define OLSR_TC_EDGE_GC_TIME   (2*1000)

Definition at line 99 of file tc_set.h.

Referenced by olsr_input_tc().

#define OLSR_TC_VTIME_JITTER   5

Definition at line 102 of file tc_set.h.

Referenced by olsr_input_tc().


Function Documentation

struct olsr_memcookie_info* EXPORT ( tc_mem_cookie   )  [read]
struct avl_tree EXPORT ( tc_tree   )  [read]
uint16_t EXPORT() get_local_ansn_number ( void   ) 

Definition at line 940 of file tc_set.c.

References local_ansn_number.

Referenced by olsr_output_lq_tc_internal().

uint32_t EXPORT() getRelevantTcCount ( void   ) 

Definition at line 878 of file tc_set.c.

References relevantTcCount.

void increase_local_ansn_number ( void   ) 

Definition at line 945 of file tc_set.c.

References local_ansn_number.

Referenced by olsr_process_changes().

struct tc_edge_entry* olsr_add_tc_edge_entry ( struct tc_entry tc,
const union olsr_ip_addr addr,
uint16_t  ansn 
) [read]
bool olsr_calc_tc_edge_entry_etx ( struct tc_edge_entry  ) 
void olsr_change_myself_tc ( void   ) 

The main ip address has changed. Do the needful.

check if a main ip change destroyed our TC entries

Definition at line 164 of file tc_set.c.

References tc_entry::addr, changes_topology, nbr_entry::nbr_addr, tc_edge_entry::neighbor, olsr_add_tc_edge_entry(), olsr_add_tc_entry(), olsr_cnf, olsr_delete_tc_edge_entry(), olsr_delete_tc_entry(), OLSR_FOR_ALL_NBR_ENTRIES, olsr_ipcmp(), olsr_config::router_id, and nbr_entry::tc_edge.

Referenced by add_interface(), and olsr_calculate_routing_table().

Here is the call graph for this function:

void olsr_delete_all_tc_entries ( void   ) 
void olsr_delete_tc_edge_entry ( struct tc_edge_entry tc_edge  ) 

Delete a TC edge entry.

Parameters:
tc the TC entry
tc_edge the TC edge entry
Returns:
true if the tc entry was deleted, false otherwise

Definition at line 460 of file tc_set.c.

References changes_topology, tc_edge_entry::edge_inv, internal_delete_tc_edge_entry(), LOG_TC, tc_edge_entry::neighbor, OLSR_DEBUG, olsr_tc_edge_to_string(), olsr_timer_set(), tc_edge_entry::tc, tc_entry::validity_timer, tc_entry::virtual, and tc_edge_entry::virtual.

Referenced by delete_outdated_tc_edges(), olsr_change_myself_tc(), olsr_delete_nbr_entry(), olsr_delete_revoked_tc_edges(), and olsr_delete_tc_entry().

Here is the call graph for this function:

void olsr_delete_tc_entry ( struct tc_entry tc  ) 
void olsr_init_tc ( void   ) 

Initialize the topology set

Definition at line 141 of file tc_set.c.

References avl_comp_default, avl_init(), local_ansn_number, LOG_TC, olsr_expire_tc_edge_gc(), olsr_expire_tc_entry(), OLSR_INFO, olsr_memcookie_add(), olsr_timer_add(), random(), and tc_tree.

Referenced by main().

Here is the call graph for this function:

void olsr_input_tc ( struct olsr_message ,
struct interface ,
union olsr_ip_addr ,
enum  duplicate_status 
)
struct tc_entry* EXPORT() olsr_locate_tc_entry ( const union olsr_ip_addr  )  [read]

Definition at line 290 of file tc_set.c.

References olsr_add_tc_entry(), and olsr_lookup_tc_entry().

Referenced by olsr_input_hna(), olsr_input_mid(), olsr_insert_mid_entry(), olsr_insert_routing_table(), and olsr_update_hna_entry().

Here is the call graph for this function:

struct tc_edge_entry* EXPORT() olsr_lookup_tc_edge ( struct tc_entry tc,
const union olsr_ip_addr edge_addr 
) [read]

Lookup an edge hanging off a TC entry.

Parameters:
entry the entry to check
dst_addr the destination address to check for
Returns:
a pointer to the tc_edge found - or NULL

Definition at line 645 of file tc_set.c.

References avl_find_element, tc_edge_entry::edge_node, and tc_entry::edge_tree.

Referenced by FindNeighbors(), olsr_add_nbr_entry(), olsr_add_tc_edge_entry(), and olsr_tc_update_edge().

struct tc_entry* EXPORT() olsr_lookup_tc_entry ( const union olsr_ip_addr adr  )  [read]

Look up a entry from the TC tree based on address

Parameters:
adr the address to look for
Returns:
the entry found or NULL

Definition at line 278 of file tc_set.c.

References avl_find_element, tc_tree, and tc_entry::vertex_node.

Referenced by FindNeighbors(), olsr_add_tc_edge_entry(), olsr_delete_routing_table(), olsr_flush_tc_duplicates(), olsr_input_tc(), olsr_locate_tc_entry(), and write_hosts_file().

void olsr_output_lq_tc ( void *  ifp  ) 

Definition at line 1089 of file tc_set.c.

References olsr_output_lq_tc_internal().

Referenced by main().

Here is the call graph for this function:

void olsr_print_tc_table ( void   ) 
void olsr_set_tc_edge_timer ( struct tc_edge_entry ,
unsigned  int 
)
void olsr_time_out_tc_set ( void   ) 

Variable Documentation

Definition at line 66 of file tc_set.c.

Referenced by olsr_add_nbr_entry(), and olsr_calculate_routing_table().

Generated on Tue Jun 18 06:00:06 2013 for olsrd by  doxygen 1.6.3