/home/aaron/olsrd-current/olsrd/lib/lq_etx_float/src/lq_plugin_etx_float.c File Reference

#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"
Include dependency graph for lq_plugin_etx_float.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PLUGIN_DESCR   "Floating point based ETX metric with exponential aging"
#define PLUGIN_AUTHOR   "Henning Rogge and others"
#define LQ_PLUGIN_LC_MULTIPLIER   1024
#define LQ_FLOAT_DEFAULT_AGING   0.05
#define LQ_FLOAT_QUICKSTART_AGING   0.25
#define LQ_QUICKSTART_STEPS   12

Functions

static int set_plugin_float (const char *, void *, set_plugin_parameter_addon)
static int lq_etxfloat_enable (void)
static olsr_linkcost lq_etxfloat_calc_link_entry_cost (struct link_entry *)
static olsr_linkcost lq_etxfloat_calc_lq_hello_neighbor_cost (struct lq_hello_neighbor *)
static olsr_linkcost lq_etxfloat_calc_tc_edge_entry_cost (struct tc_edge_entry *)
static void lq_etxfloat_hello_handler (struct link_entry *, bool)
static void lq_etxfloat_memorize_foreign_hello (struct link_entry *, struct lq_hello_neighbor *)
static void lq_etxfloat_copy_link_entry_lq_into_tc_edge_entry (struct tc_edge_entry *target, struct link_entry *source)
static void lq_etxfloat_serialize_hello_lq (uint8_t **curr, struct link_entry *link)
static void lq_etxfloat_serialize_tc_lq (uint8_t **curr, struct link_entry *link)
static void lq_etxfloat_deserialize_hello_lq (uint8_t const **curr, struct lq_hello_neighbor *lq)
static void lq_etxfloat_deserialize_tc_lq (uint8_t const **curr, struct tc_edge_entry *lq)
static int lq_etxfloat_get_linkentry_data (struct link_entry *, int)
static const char * lq_etxfloat_print_cost (olsr_linkcost cost, char *buffer, size_t bufsize)
static const char * lq_etxfloat_print_link_entry_lq (struct link_entry *entry, int index, char *buffer, size_t bufsize)
 OLSR_PLUGIN6 (plugin_parameters)
static int set_plugin_float (const char *value, void *data, set_plugin_parameter_addon addon __attribute__((unused)))
static olsr_linkcost lq_etxfloat_calc_linkcost (struct lq_etxfloat_linkquality *lq)

Variables

struct lq_linkdata_type lq_etxfloat_linktypes []
struct lq_handler lq_etxfloat_handler
static float lq_aging = LQ_FLOAT_DEFAULT_AGING
static struct
olsrd_plugin_parameters 
plugin_parameters []

Define Documentation

#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.


Function Documentation

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

Here is the call graph for this function:

static olsr_linkcost lq_etxfloat_calc_linkcost ( struct lq_etxfloat_linkquality lq  )  [static]
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().

Here is the call graph for this function:

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

Here is the call graph for this function:

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]
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.

Here is the call graph for this function:

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]
static void lq_etxfloat_hello_handler ( struct link_entry link,
bool  loss 
) [static]
static void lq_etxfloat_memorize_foreign_hello ( struct link_entry target,
struct lq_hello_neighbor source 
) [static]
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]
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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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]

Variable Documentation

float lq_aging = LQ_FLOAT_DEFAULT_AGING [static]

Definition at line 130 of file lq_plugin_etx_float.c.

Definition at line 89 of file lq_plugin_etx_float.c.

Initial value:
 {
  { "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.

Initial value:
 {
  {.name = "LinkQualityAging",.set_plugin_parameter = &set_plugin_float,.data = &lq_aging},
}

Definition at line 132 of file lq_plugin_etx_float.c.

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