/home/aaron/olsrd-current/olsrd/src/core/lq_plugin.c File Reference

#include "lq_plugin.h"
#include "tc_set.h"
#include "link_set.h"
#include "olsr_spf.h"
#include "lq_packet.h"
#include "olsr.h"
#include "olsr_memcookie.h"
#include "common/avl.h"
#include "common/string.h"
#include "olsr_logging.h"
#include "neighbor_table.h"
#include "assert.h"
Include dependency graph for lq_plugin.c:

Go to the source code of this file.

Functions

void init_lq_handler (void)
void deinit_lq_handler (void)
olsr_linkcost olsr_calc_tc_cost (struct tc_edge_entry *tc_edge)
void olsr_serialize_hello_lq_pair (uint8_t **buff, struct link_entry *link)
void olsr_deserialize_hello_lq_pair (const uint8_t **curr, struct lq_hello_neighbor *neigh)
void olsr_serialize_tc_lq (unsigned char **curr, struct link_entry *lnk)
void olsr_deserialize_tc_lq_pair (const uint8_t **curr, struct tc_edge_entry *edge)
void olsr_lq_hello_handler (struct link_entry *entry, bool lost)
static void internal_clear_tc_edge_lq (struct tc_edge_entry *edge)
void olsr_neighbor_cost_may_changed (struct nbr_entry *nbr)
void olsr_memorize_foreign_hello_lq (struct link_entry *local, struct lq_hello_neighbor *foreign)
const char * olsr_get_linkcost_text (olsr_linkcost cost, bool route, char *buffer, size_t bufsize)
const char * olsr_get_linkdata_text (struct link_entry *entry, int idx, char *buffer, size_t bufsize)
const char * olsr_get_linklabel (int idx)
size_t olsr_get_linklabel_maxlength (int idx)
size_t olsr_get_linklabel_count (void)
enum lq_linkdata_quality olsr_get_linkdata_quality (struct link_entry *link, int idx)
struct tc_edge_entryolsr_malloc_tc_edge_entry (void)
struct lq_hello_neighborolsr_malloc_lq_hello_neighbor (void)
struct link_entryolsr_malloc_link_entry (void)
void olsr_free_link_entry (struct link_entry *link)
void olsr_free_lq_hello_neighbor (struct lq_hello_neighbor *neigh)
void olsr_free_tc_edge_entry (struct tc_edge_entry *edge)
uint8_t olsr_get_Hello_MessageId (void)
uint8_t olsr_get_TC_MessageId (void)
size_t olsr_sizeof_HelloLQ (void)
size_t olsr_sizeof_TCLQ (void)

Variables

struct lq_handleractive_lq_handler = NULL
static struct olsr_memcookie_infotc_edge_mem_cookie = NULL
static struct olsr_memcookie_infolq_hello_neighbor_mem_cookie = NULL
static struct olsr_memcookie_infolink_entry_mem_cookie = NULL

Function Documentation

void deinit_lq_handler ( void   ) 

Definition at line 86 of file lq_plugin.c.

References lq_handler::deinitialize.

Referenced by olsr_shutdown().

void init_lq_handler ( void   ) 
static void internal_clear_tc_edge_lq ( struct tc_edge_entry edge  )  [static]
olsr_linkcost olsr_calc_tc_cost ( struct tc_edge_entry tc_edge  ) 

Definition at line 105 of file lq_plugin.c.

References lq_handler::calc_tc_edge_entry_cost.

Referenced by olsr_add_tc_edge_entry(), and olsr_tc_update_edge().

void olsr_deserialize_hello_lq_pair ( const uint8_t **  curr,
struct lq_hello_neighbor neigh 
)
void olsr_deserialize_tc_lq_pair ( const uint8_t **  curr,
struct tc_edge_entry edge 
)

Definition at line 165 of file lq_plugin.c.

References lq_handler::deserialize_tc_lq.

Referenced by olsr_tc_update_edge().

void olsr_free_link_entry ( struct link_entry link  ) 

olsr_free_link_entry

this functions free a link_entry inclusive linkquality data

Parameters:
pointer to link_entry

Definition at line 439 of file lq_plugin.c.

References olsr_memcookie_free().

Referenced by olsr_delete_link_entry().

Here is the call graph for this function:

void olsr_free_lq_hello_neighbor ( struct lq_hello_neighbor neigh  ) 

olsr_free_lq_hello_neighbor

this functions free a lq_hello_neighbor inclusive linkquality data

Parameters:
pointer to lq_hello_neighbor

Definition at line 452 of file lq_plugin.c.

References olsr_memcookie_free().

Referenced by deserialize_hello(), and destroy_lq_hello().

Here is the call graph for this function:

void olsr_free_tc_edge_entry ( struct tc_edge_entry edge  ) 

olsr_free_tc_edge_entry

this functions free a tc_edge_entry inclusive linkquality data

Parameters:
pointer to tc_edge_entry

Definition at line 465 of file lq_plugin.c.

References olsr_memcookie_free().

Referenced by internal_delete_tc_edge_entry().

Here is the call graph for this function:

uint8_t olsr_get_Hello_MessageId ( void   ) 

olsr_get_Hello_MessageId

Returns:
olsr id of hello message

Definition at line 476 of file lq_plugin.c.

References lq_handler::messageid_hello.

Referenced by generate_hello(), and olsr_init_package_process().

const char* olsr_get_linkcost_text ( olsr_linkcost  cost,
bool  route,
char *  buffer,
size_t  bufsize 
)
enum lq_linkdata_quality olsr_get_linkdata_quality ( struct link_entry link,
int  idx 
)
const char* olsr_get_linkdata_text ( struct link_entry entry,
int  idx,
char *  buffer,
size_t  bufsize 
)

Definition at line 284 of file lq_plugin.c.

References link_entry::linkcost, olsr_get_linkcost_text(), and lq_handler::print_link_entry_lq.

Referenced by build_neigh_body(), olsr_print_link_set(), and txtinfo_link().

Here is the call graph for this function:

const char* olsr_get_linklabel ( int  idx  ) 
size_t olsr_get_linklabel_count ( void   ) 
size_t olsr_get_linklabel_maxlength ( int  idx  ) 
uint8_t olsr_get_TC_MessageId ( void   ) 

olsr_get_TC_MessageId

Returns:
olsr id of tc message

Definition at line 487 of file lq_plugin.c.

References lq_handler::messageid_tc.

Referenced by olsr_init_package_process(), olsr_input_tc(), and olsr_output_lq_tc_internal().

void olsr_lq_hello_handler ( struct link_entry entry,
bool  lost 
)

Definition at line 181 of file lq_plugin.c.

References lq_handler::hello_handler.

Referenced by olsr_expire_link_loss_timer(), and olsr_update_packet_loss().

struct link_entry* olsr_malloc_link_entry ( void   )  [read]

Definition at line 421 of file lq_plugin.c.

References lq_handler::clear_link_entry, and olsr_memcookie_malloc().

Referenced by add_link_entry().

Here is the call graph for this function:

struct lq_hello_neighbor* olsr_malloc_lq_hello_neighbor ( void   )  [read]

Definition at line 402 of file lq_plugin.c.

References lq_handler::clear_lq_hello_neighbor, and olsr_memcookie_malloc().

Referenced by deserialize_hello().

Here is the call graph for this function:

struct tc_edge_entry* olsr_malloc_tc_edge_entry ( void   )  [read]

Definition at line 383 of file lq_plugin.c.

References lq_handler::clear_tc_edge_entry, and olsr_memcookie_malloc().

Referenced by olsr_add_tc_edge_entry().

Here is the call graph for this function:

void olsr_memorize_foreign_hello_lq ( struct link_entry local,
struct lq_hello_neighbor foreign 
)

Definition at line 236 of file lq_plugin.c.

References lq_handler::memorize_foreign_hello.

Referenced by hello_tap().

void olsr_neighbor_cost_may_changed ( struct nbr_entry nbr  ) 
void olsr_serialize_hello_lq_pair ( uint8_t **  buff,
struct link_entry link 
)

Definition at line 120 of file lq_plugin.c.

References lq_handler::serialize_hello_lq.

Referenced by generate_hello().

void olsr_serialize_tc_lq ( unsigned char **  curr,
struct link_entry lnk 
)

Definition at line 151 of file lq_plugin.c.

References lq_handler::serialize_tc_lq.

Referenced by olsr_output_lq_tc_internal().

size_t olsr_sizeof_HelloLQ ( void   ) 

olsr_sizeof_HelloLQ

Returns:
number of bytes necessary to store HelloLQ data

Definition at line 498 of file lq_plugin.c.

References lq_handler::serialized_lqhello_size.

Referenced by deserialize_hello().

size_t olsr_sizeof_TCLQ ( void   ) 

olsr_sizeof_TCLQ

Returns:
number of bytes necessary to store TCLQ data

Definition at line 508 of file lq_plugin.c.

References lq_handler::serialized_lqtc_size.

Referenced by olsr_input_tc(), and olsr_output_lq_tc_internal().


Variable Documentation

struct lq_handler* active_lq_handler = NULL

Definition at line 56 of file lq_plugin.c.

Referenced by lq_etxff_enable(), lq_etxfloat_enable(), lq_etxfpm_enable(), and lq_rfc_enable().

struct olsr_memcookie_info* link_entry_mem_cookie = NULL [static]

Definition at line 60 of file lq_plugin.c.

Definition at line 59 of file lq_plugin.c.

struct olsr_memcookie_info* tc_edge_mem_cookie = NULL [static]

Definition at line 58 of file lq_plugin.c.

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