#include <stdio.h>#include "tc_set.h"#include "link_set.h"#include "olsr_spf.h"#include "lq_packet.h"#include "olsr.h"#include "olsr_logging.h"#include "lq_plugin_etx_float.h"#include "olsr_types.h"#include "lq_plugin.h"#include "plugin.h"

Go to the source code of this file.
| #define LQ_FLOAT_DEFAULT_AGING 0.05 |
Definition at line 57 of file lq_plugin_etx_float.c.
| #define LQ_FLOAT_QUICKSTART_AGING 0.25 |
Definition at line 58 of file lq_plugin_etx_float.c.
Referenced by lq_etxfloat_hello_handler().
| #define LQ_PLUGIN_LC_MULTIPLIER 1024 |
Definition at line 55 of file lq_plugin_etx_float.c.
Referenced by lq_etxfloat_calc_linkcost(), and lq_etxfloat_print_cost().
| #define LQ_QUICKSTART_STEPS 12 |
Definition at line 59 of file lq_plugin_etx_float.c.
Referenced by lq_etxfloat_hello_handler(), and lq_etxfpm_hello_handler().
| #define PLUGIN_AUTHOR "Henning Rogge and others" |
Definition at line 53 of file lq_plugin_etx_float.c.
| #define PLUGIN_DESCR "Floating point based ETX metric with exponential aging" |
Definition at line 52 of file lq_plugin_etx_float.c.
| static olsr_linkcost lq_etxfloat_calc_link_entry_cost | ( | struct link_entry * | link | ) | [static] |
Definition at line 181 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, and lq_etxfloat_calc_linkcost().

| static olsr_linkcost lq_etxfloat_calc_linkcost | ( | struct lq_etxfloat_linkquality * | lq | ) | [static] |
Definition at line 162 of file lq_plugin_etx_float.c.
References LINK_COST_BROKEN, LQ_PLUGIN_LC_MULTIPLIER, MINIMAL_USEFUL_LQ, lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.
Referenced by lq_etxfloat_calc_link_entry_cost(), lq_etxfloat_calc_lq_hello_neighbor_cost(), lq_etxfloat_calc_tc_edge_entry_cost(), and lq_etxfloat_hello_handler().
| static olsr_linkcost lq_etxfloat_calc_lq_hello_neighbor_cost | ( | struct lq_hello_neighbor * | neigh | ) | [static] |
Definition at line 189 of file lq_plugin_etx_float.c.
References lq_etxfloat_lq_hello_neighbor::lq, and lq_etxfloat_calc_linkcost().

| static olsr_linkcost lq_etxfloat_calc_tc_edge_entry_cost | ( | struct tc_edge_entry * | edge | ) | [static] |
Definition at line 197 of file lq_plugin_etx_float.c.
References lq_etxfloat_tc_edge::lq, and lq_etxfloat_calc_linkcost().

| static void lq_etxfloat_copy_link_entry_lq_into_tc_edge_entry | ( | struct tc_edge_entry * | target, | |
| struct link_entry * | source | |||
| ) | [static] |
Definition at line 240 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, and lq_etxfloat_tc_edge::lq.
| static void lq_etxfloat_deserialize_hello_lq | ( | uint8_t const ** | curr, | |
| struct lq_hello_neighbor * | lq | |||
| ) | [static] |
Definition at line 271 of file lq_plugin_etx_float.c.
References lq_etxfloat_lq_hello_neighbor::lq, pkt_get_u8(), pkt_ignore_u16(), lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.

| static void lq_etxfloat_deserialize_tc_lq | ( | uint8_t const ** | curr, | |
| struct tc_edge_entry * | lq | |||
| ) | [static] |
Definition at line 286 of file lq_plugin_etx_float.c.
References lq_etxfloat_tc_edge::lq, pkt_get_u8(), pkt_ignore_u16(), lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.

| static int lq_etxfloat_enable | ( | void | ) | [static] |
Definition at line 156 of file lq_plugin_etx_float.c.
References active_lq_handler.
Referenced by OLSR_PLUGIN6().
| static int lq_etxfloat_get_linkentry_data | ( | struct link_entry * | link, | |
| int | idx | |||
| ) | [static] |
Definition at line 300 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.
| static void lq_etxfloat_hello_handler | ( | struct link_entry * | link, | |
| bool | loss | |||
| ) | [static] |
Definition at line 205 of file lq_plugin_etx_float.c.
References link_entry::linkcost, link_entry::loss_link_multiplier, lq_etxfloat_link_entry::lq, lq_etxfloat_calc_linkcost(), LQ_FLOAT_QUICKSTART_AGING, LQ_QUICKSTART_STEPS, link_entry::neighbor, olsr_neighbor_cost_may_changed(), lq_etxfloat_link_entry::quickstart, and lq_etxfloat_linkquality::valueLq.

| static void lq_etxfloat_memorize_foreign_hello | ( | struct link_entry * | target, | |
| struct lq_hello_neighbor * | source | |||
| ) | [static] |
Definition at line 226 of file lq_plugin_etx_float.c.
References lq_etxfloat_lq_hello_neighbor::lq, lq_etxfloat_link_entry::lq, lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.
| static const char * lq_etxfloat_print_cost | ( | olsr_linkcost | cost, | |
| char * | buffer, | |||
| size_t | bufsize | |||
| ) | [static] |
Definition at line 317 of file lq_plugin_etx_float.c.
References LQ_PLUGIN_LC_MULTIPLIER.
| static const char * lq_etxfloat_print_link_entry_lq | ( | struct link_entry * | entry, | |
| int | index, | |||
| char * | buffer, | |||
| size_t | bufsize | |||
| ) | [static] |
Definition at line 308 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.
| static void lq_etxfloat_serialize_hello_lq | ( | uint8_t ** | curr, | |
| struct link_entry * | link | |||
| ) | [static] |
Definition at line 249 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, pkt_put_u8(), lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.

| static void lq_etxfloat_serialize_tc_lq | ( | uint8_t ** | curr, | |
| struct link_entry * | link | |||
| ) | [static] |
Definition at line 260 of file lq_plugin_etx_float.c.
References lq_etxfloat_link_entry::lq, pkt_put_u8(), lq_etxfloat_linkquality::valueLq, and lq_etxfloat_linkquality::valueNlq.

| OLSR_PLUGIN6 | ( | plugin_parameters | ) |
Definition at line 136 of file lq_plugin_etx_float.c.
References lq_etxfloat_enable(), PLUGIN_AUTHOR, PLUGIN_DESCR, and PLUGIN_TYPE_LQ.

| static int set_plugin_float | ( | const char * | value, | |
| void * | data, | |||
| set_plugin_parameter_addon addon | __attribute__(unused) | |||
| ) | [static] |
Definition at line 144 of file lq_plugin_etx_float.c.
References LOG_LQ_PLUGINS, and OLSR_INFO.
| static int set_plugin_float | ( | const char * | , | |
| void * | , | |||
| set_plugin_parameter_addon | ||||
| ) | [static] |
float lq_aging = LQ_FLOAT_DEFAULT_AGING [static] |
Definition at line 130 of file lq_plugin_etx_float.c.
| struct lq_handler lq_etxfloat_handler |
Definition at line 89 of file lq_plugin_etx_float.c.
| struct lq_linkdata_type lq_etxfloat_linktypes[] |
{
{ "ETX", 5, 1000, 1000*2, 1000*4, INT32_MAX },
{ "LQ", 5, 255, 240, 192, 0 },
{ "NLQ", 5, 255, 240, 192, 0 }
}
Definition at line 83 of file lq_plugin_etx_float.c.
struct olsrd_plugin_parameters plugin_parameters[] [static] |
{
{.name = "LinkQualityAging",.set_plugin_parameter = &set_plugin_float,.data = &lq_aging},
}
Definition at line 132 of file lq_plugin_etx_float.c.
1.6.3