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

#include "tc_set.h"
#include "link_set.h"
#include "neighbor_table.h"
#include "olsr_spf.h"
#include "lq_packet.h"
#include "common/avl.h"
Include dependency graph for lq_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lq_linkdata_type
struct  lq_handler

Defines

#define LINK_COST_BROKEN   (0x00ffffff)
#define ROUTE_COST_BROKEN   (0xffffffff)
#define ZERO_ROUTE_COST   0
#define MINIMAL_USEFUL_LQ   0.1
#define LQ_PLUGIN_RELEVANT_COSTCHANGE   16
#define LQTEXT_MAXLENGTH   32

Enumerations

enum  lq_linkdata_quality {
  LQ_QUALITY_BEST, LQ_QUALITY_GOOD, LQ_QUALITY_AVERAGE, LQ_QUALITY_BAD,
  LQ_QUALITY_WORST
}

Functions

void init_lq_handler (void)
void deinit_lq_handler (void)
olsr_linkcost olsr_calc_tc_cost (struct tc_edge_entry *)
void olsr_serialize_hello_lq_pair (uint8_t **, struct link_entry *)
void olsr_deserialize_hello_lq_pair (const uint8_t **, struct lq_hello_neighbor *)
void olsr_serialize_tc_lq (uint8_t **curr, struct link_entry *lnk)
void olsr_deserialize_tc_lq_pair (const uint8_t **, struct tc_edge_entry *)
void olsr_lq_hello_handler (struct link_entry *, bool)
void olsr_memorize_foreign_hello_lq (struct link_entry *, struct lq_hello_neighbor *)
const char *EXPORT() olsr_get_linkcost_text (olsr_linkcost, bool, char *, size_t)
const char *EXPORT() olsr_get_linkdata_text (struct link_entry *, int, char *, size_t)
const char *EXPORT() olsr_get_linklabel (int)
size_t EXPORT() olsr_get_linklabel_maxlength (int)
size_t EXPORT() olsr_get_linklabel_count (void)
enum lq_linkdata_quality EXPORT() olsr_get_linkdata_quality (struct link_entry *, int)
void EXPORT() olsr_neighbor_cost_may_changed (struct nbr_entry *)
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 *)
void olsr_free_lq_hello_neighbor (struct lq_hello_neighbor *)
void olsr_free_tc_edge_entry (struct tc_edge_entry *)
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)
struct lq_handlerEXPORT (active_lq_handler)

Define Documentation

#define LINK_COST_BROKEN   (0x00ffffff)
#define LQ_PLUGIN_RELEVANT_COSTCHANGE   16

Definition at line 57 of file lq_plugin.h.

#define LQTEXT_MAXLENGTH   32
#define MINIMAL_USEFUL_LQ   0.1
#define ROUTE_COST_BROKEN   (0xffffffff)
#define ZERO_ROUTE_COST   0

Definition at line 54 of file lq_plugin.h.

Referenced by olsr_calculate_routing_table().


Enumeration Type Documentation

Enumerator:
LQ_QUALITY_BEST 
LQ_QUALITY_GOOD 
LQ_QUALITY_AVERAGE 
LQ_QUALITY_BAD 
LQ_QUALITY_WORST 

Definition at line 67 of file lq_plugin.h.


Function Documentation

void deinit_lq_handler ( void   ) 

Definition at line 86 of file lq_plugin.c.

References lq_handler::deinitialize.

Referenced by olsr_shutdown().

struct lq_handler* EXPORT ( active_lq_handler   )  [read]
void init_lq_handler ( void   ) 
olsr_linkcost olsr_calc_tc_cost ( struct tc_edge_entry  ) 

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 **  ,
struct lq_hello_neighbor  
)
void olsr_deserialize_tc_lq_pair ( const uint8_t **  ,
struct tc_edge_entry  
)

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* EXPORT() olsr_get_linkcost_text ( olsr_linkcost  ,
bool  ,
char *  ,
size_t   
)
enum lq_linkdata_quality EXPORT() olsr_get_linkdata_quality ( struct link_entry ,
int   
)
const char* EXPORT() olsr_get_linkdata_text ( struct link_entry ,
int  ,
char *  ,
size_t   
)

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* EXPORT() olsr_get_linklabel ( int   ) 
size_t EXPORT() olsr_get_linklabel_count ( void   ) 
size_t EXPORT() olsr_get_linklabel_maxlength ( int   ) 
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 ,
bool   
)

Definition at line 181 of file lq_plugin.c.

References lq_handler::hello_handler.

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 ,
struct lq_hello_neighbor  
)

Definition at line 236 of file lq_plugin.c.

References lq_handler::memorize_foreign_hello.

Referenced by hello_tap().

void EXPORT() olsr_neighbor_cost_may_changed ( struct nbr_entry  ) 
void olsr_serialize_hello_lq_pair ( uint8_t **  ,
struct link_entry  
)

Definition at line 120 of file lq_plugin.c.

References lq_handler::serialize_hello_lq.

Referenced by generate_hello().

void olsr_serialize_tc_lq ( uint8_t **  curr,
struct link_entry lnk 
)
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().

Generated on Thu May 16 06:00:06 2013 for olsrd by  doxygen 1.6.3