#include "common/avl.h"#include "avl_olsr_comp.h"#include "duplicate_set.h"#include "defs.h"#include "olsr_types.h"#include "olsr_cfg.h"#include <string.h>#include "olsr_clock.h"#include "ipcalc.h"#include "olsr.h"#include "olsr_protocol.h"#include "duplicate_set.h"#include "common/common_types.h"#include "common/list.h"#include "olsr_logging.h"#include <stdlib.h>

Go to the source code of this file.
Functions | |
| int | olsr_seqno_diff (uint16_t reference, uint16_t other) |
| static struct dup_entry * | olsr_create_duplicate_entry (union olsr_ip_addr *ip, uint16_t seqnr) |
| static void | olsr_delete_duplicate_entry (struct dup_entry *entry) |
| static void | olsr_expire_duplicate_entry (void *context) |
| void | olsr_init_duplicate_set (void) |
| void | olsr_flush_duplicate_entries (void) |
| bool | olsr_is_duplicate_message (struct olsr_message *m, bool forwarding, enum duplicate_status *status) |
| void | olsr_print_duplicate_table (void) |
Variables | |
| struct avl_tree forward_set | processing_set |
| static struct olsr_timer_info * | duplicate_timer_info = NULL |
| static struct olsr_memcookie_info * | duplicate_mem_cookie = NULL |
| static struct dup_entry* olsr_create_duplicate_entry | ( | union olsr_ip_addr * | ip, | |
| uint16_t | seqnr | |||
| ) | [static, read] |
Definition at line 79 of file duplicate_set.c.
References dup_entry::array, dup_entry::avl, dup_entry::ip, olsr_config::ip_version, avl_node::key, olsr_cnf, olsr_memcookie_malloc(), dup_entry::seqnr, dup_entry::too_low_counter, olsr_ip_addr::v4, and olsr_ip_addr::v6.
Referenced by olsr_is_duplicate_message().

| static void olsr_delete_duplicate_entry | ( | struct dup_entry * | entry | ) | [static] |
Definition at line 95 of file duplicate_set.c.
References dup_entry::avl, avl_delete(), olsr_memcookie_free(), olsr_timer_stop(), dup_entry::tree, and dup_entry::validity_timer.
Referenced by olsr_expire_duplicate_entry(), and olsr_flush_duplicate_entries().

| static void olsr_expire_duplicate_entry | ( | void * | context | ) | [static] |
Definition at line 105 of file duplicate_set.c.
References olsr_delete_duplicate_entry(), and dup_entry::validity_timer.
Referenced by olsr_init_duplicate_set().

| void olsr_flush_duplicate_entries | ( | void | ) |
Clean up the house. Called during shutdown.
Definition at line 134 of file duplicate_set.c.
References olsr_delete_duplicate_entry(), OLSR_FOR_ALL_FORWARD_DUP_ENTRIES, and OLSR_FOR_ALL_PROCESS_DUP_ENTRIES.
Referenced by olsr_shutdown().

| void olsr_init_duplicate_set | ( | void | ) |
Definition at line 114 of file duplicate_set.c.
References avl_comp_default, avl_init(), LOG_DUPLICATE_SET, olsr_expire_duplicate_entry(), OLSR_INFO, olsr_memcookie_add(), olsr_timer_add(), and processing_set.
Referenced by main().

| bool olsr_is_duplicate_message | ( | struct olsr_message * | m, | |
| bool | forwarding, | |||
| enum duplicate_status * | status | |||
| ) |
Definition at line 147 of file duplicate_set.c.
References dup_entry::array, dup_entry::avl, avl_find(), avl_insert(), DUPLICATE_CLEANUP_INTERVAL, DUPLICATE_CLEANUP_JITTER, DUPLICATE_OLSR_MESSAGE, LOG_DUPLICATE_SET, NEW_OLSR_MESSAGE, OLD_OLSR_MESSAGE, olsr_create_duplicate_entry(), OLSR_DEBUG, olsr_ip_to_string(), olsr_seqno_diff(), olsr_timer_change(), olsr_timer_start(), olsr_message::originator, processing_set, RESET_SEQNO_OLSR_MESSAGE, olsr_message::seqno, dup_entry::seqnr, dup_entry::too_low_counter, TOO_OLD_OLSR_MESSAGE, dup_entry::tree, and dup_entry::validity_timer.
Referenced by olsr_forward_message(), and parse_packet().

| void olsr_print_duplicate_table | ( | void | ) |
Definition at line 239 of file duplicate_set.c.
References dup_entry::array, dup_entry::avl, olsr_config::ip_version, avl_node::key, LOG_DUPLICATE_SET, olsr_clock_getWallclockString(), olsr_clock_toClockString(), olsr_cnf, OLSR_FOR_ALL_FORWARD_DUP_ENTRIES, OLSR_FOR_ALL_PROCESS_DUP_ENTRIES, OLSR_INFO, OLSR_INFO_NH, olsr_ip_to_string(), olsr_timer_entry::timer_clock, and dup_entry::validity_timer.
Referenced by olsr_process_changes().

| int olsr_seqno_diff | ( | uint16_t | reference, | |
| uint16_t | other | |||
| ) |
Definition at line 63 of file duplicate_set.c.
Referenced by olsr_input_hna(), olsr_input_mid(), olsr_input_tc(), and olsr_is_duplicate_message().
struct olsr_memcookie_info* duplicate_mem_cookie = NULL [static] |
Definition at line 60 of file duplicate_set.c.
struct olsr_timer_info* duplicate_timer_info = NULL [static] |
Definition at line 59 of file duplicate_set.c.
| struct avl_tree forward_set processing_set |
Definition at line 56 of file duplicate_set.c.
Referenced by olsr_init_duplicate_set(), and olsr_is_duplicate_message().
1.6.3