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

#include "olsr_types.h"
#include "olsr_protocol.h"
Include dependency graph for olsr.h:

Go to the source code of this file.

Functions

void olsr_process_changes (void)
void init_msg_seqno (void)
uint16_t EXPORT() get_msg_seqno (void)
uint8_t *EXPORT() olsr_put_msg_hdr (uint8_t **curr, struct olsr_message *msg)
void olsr_init_willingness (void)
void olsr_calculate_willingness (void)
void EXPORT() olsr_exit (int)
void *EXPORT() olsr_malloc (size_t, const char *)
char *EXPORT() olsr_strdup (const char *s)
char *EXPORT() olsr_strndup (const char *s, size_t n)

Variables

bool changes_topology
bool changes_neighborhood
bool changes_hna
bool changes_force

Function Documentation

uint16_t EXPORT() get_msg_seqno ( void   ) 

Get and increment the message sequence number

Returns:
the seqno

Definition at line 98 of file olsr.c.

References message_seqno.

Referenced by add_signature(), generate_hello(), generate_hna(), generate_mid(), olsr_mdns_gen(), olsr_namesvc_gen(), olsr_obamp_gen(), olsr_output_lq_tc_internal(), send_challenge(), send_cres(), send_rres(), single_hna(), and spread_host().

void init_msg_seqno ( void   ) 

Initialize the message sequence number as a random value

Definition at line 86 of file olsr.c.

References LOG_MAIN, message_seqno, OLSR_DEBUG, and random().

Referenced by main().

Here is the call graph for this function:

void olsr_calculate_willingness ( void   ) 

Calculate this nodes willingness to act as a MPR based on either a fixed value or the power status of the node using APM

Returns:
a 8bit value from 0-7 representing the willingness

Definition at line 212 of file olsr.c.

References olsr_apm_info::ac_line_status, olsr_apm_info::battery_percentage, LOG_MAIN, OLSR_AC_POWERED, olsr_clock_to_string(), olsr_cnf, OLSR_INFO, OLSR_WARN, os_apm_printinfo(), os_apm_read(), WILL_DEFAULT, olsr_config::will_int, olsr_config::willingness, and olsr_config::willingness_auto.

Referenced by main(), and olsr_update_willingness().

Here is the call graph for this function:

void EXPORT() olsr_exit ( int  val  ) 
void olsr_init_willingness ( void   ) 

Definition at line 188 of file olsr.c.

References LOG_MAIN, olsr_cnf, OLSR_INFO, olsr_timer_add(), olsr_timer_start(), olsr_update_willingness(), olsr_config::will_int, and olsr_config::willingness_auto.

Referenced by main().

Here is the call graph for this function:

void* EXPORT() olsr_malloc ( size_t  ,
const char *   
)
void olsr_process_changes ( void   ) 

Process changes in neighborhood or/and topology. Re-calculates the neighborhood/topology if there are any updates - then calls the right functions to update the routing table.

Returns:
0

Definition at line 111 of file olsr.c.

References changes_force, changes_hna, changes_neighborhood, changes_topology, olsr_config::clear_screen, get_olsrd_builddate(), get_olsrd_version(), increase_local_ansn_number(), isatty(), LOG_MAIN, olsr_config::log_target_stderr, olsr_calculate_lq_mpr(), olsr_calculate_routing_table(), olsr_cnf, OLSR_DEBUG, olsr_print_duplicate_table(), olsr_print_hna_set(), olsr_print_link_set(), olsr_print_mid_set(), olsr_print_neighbor_table(), olsr_print_tc_table(), and os_clear_console().

Referenced by hello_tap(), and main().

Here is the call graph for this function:

uint8_t* EXPORT() olsr_put_msg_hdr ( uint8_t **  curr,
struct olsr_message msg 
)
char* EXPORT() olsr_strdup ( const char *  s  ) 

Definition at line 299 of file olsr.c.

References olsr_malloc().

Referenced by add_to_ping_list(), olsr_memcookie_add(), olsr_parse_cfg(), parse_cfg_loadplugin(), queue_if(), and read_cfg().

Here is the call graph for this function:

char* EXPORT() olsr_strndup ( const char *  s,
size_t  n 
)

Definition at line 310 of file olsr.c.

References olsr_malloc().

Referenced by add_name_to_list(), allowed_hostname_or_ip_in_service(), and parse_tok().

Here is the call graph for this function:


Variable Documentation

Definition at line 78 of file olsr.c.

Referenced by olsr_process_changes().

Generated on Wed Jun 19 06:00:05 2013 for olsrd by  doxygen 1.6.3