#include "olsr_types.h"#include "olsr_protocol.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 |
| uint16_t EXPORT() get_msg_seqno | ( | void | ) |
Get and increment the message sequence number
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().

| 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
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().

| void EXPORT() olsr_exit | ( | int | val | ) |
Termination function to be called whenever a error occures that requires the daemon to terminate
| val | the exit code for OLSR |
Definition at line 257 of file olsr.c.
References olsr_config::exit_value, olsr_cnf, os_exit(), STATE_INIT, and STATE_SHUTDOWN.
Referenced by add_interface(), init_lq_handler(), init_zebra(), main(), my_realloc(), olsr_clock_init(), olsr_clock_update(), olsr_com_init(), olsr_com_openport(), olsr_malloc(), olsr_parse_cfg(), olsr_plugins_enable(), olsr_plugins_init(), olsrd_plugin_init(), os_getsocket4(), os_getsocket6(), os_init_interface(), parse_cfg_debug(), parse_cfg_hna(), parse_cfg_interface(), parse_cfg_loadplugin(), parse_cfg_log(), parse_cfg_option(), remove_interface(), secure_plugin_init(), zebra_connect(), zebra_disable_redistribute(), zebra_parse(), zebra_parse_route(), and zebra_redistribute().

| 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().

| 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.
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().

| uint8_t* EXPORT() olsr_put_msg_hdr | ( | uint8_t ** | curr, | |
| struct olsr_message * | msg | |||
| ) |
Shared code to write the message header
Definition at line 155 of file olsr.c.
References olsr_message::hopcnt, olsr_message::originator, pkt_put_ipaddress(), pkt_put_reltime(), pkt_put_u16(), pkt_put_u8(), olsr_message::seqno, olsr_message::size, olsr_message::ttl, olsr_message::type, and olsr_message::vtime.
Referenced by generate_hello(), generate_mid(), olsr_forward_message(), olsr_mdns_gen(), olsr_namesvc_gen(), and olsr_obamp_gen().

| 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().

| 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().

| bool changes_force |
Definition at line 78 of file olsr.c.
Referenced by olsr_process_changes().
| bool changes_hna |
Definition at line 77 of file olsr.c.
Referenced by olsr_delete_routing_table(), olsr_insert_routing_table(), olsr_process_changes(), and olsr_update_hna_entry().
| bool changes_neighborhood |
Definition at line 76 of file olsr.c.
Referenced by add_link_entry(), hello_tap(), olsr_delete_link_entry(), olsr_delete_nbr2_entry(), olsr_delete_nbr_entry(), olsr_expire_link_sym_timer(), olsr_flush_nbr2_duplicates(), olsr_neighbor_cost_may_changed(), olsr_process_changes(), olsr_update_mid_entry(), olsr_update_nbr_status(), and process_message_neighbors().
| bool changes_topology |
Definition at line 75 of file olsr.c.
Referenced by delete_outdated_tc_edges(), hello_tap(), olsr_change_myself_tc(), olsr_delete_nbr_entry(), olsr_delete_revoked_tc_edges(), olsr_delete_tc_edge_entry(), olsr_expire_tc_edge_gc(), olsr_expire_tc_entry(), olsr_input_tc(), olsr_neighbor_cost_may_changed(), olsr_process_changes(), olsr_update_mid_entry(), and olsr_update_nbr_status().
1.6.3