iib_table.h File Reference

Interface Information Base interface for NHDP. More...

Detailed Description

Interface Information Base interface for NHDP.

Author
Fabian Nack nack@.nosp@m.inf..nosp@m.fu-be.nosp@m.rlin.nosp@m..de

Definition in file iib_table.h.

#include "timex.h"
#include "kernel_types.h"
#include "nib_table.h"
#include "nhdp_address.h"
#include "nhdp_metric.h"
+ Include dependency graph for iib_table.h:

Go to the source code of this file.

Data Structures

struct  iib_link_set_entry
 Link Set entry (link tuple) More...
 
struct  iib_two_hop_set_entry
 2-Hop Set entry (2-Hop tuple) More...
 
struct  iib_base_entry
 Link set for a registered interface. More...
 
enum  iib_link_tuple_status_t {
  IIB_LT_STATUS_PENDING, IIB_LT_STATUS_LOST, IIB_LT_STATUS_HEARD, IIB_LT_STATUS_SYM,
  IIB_LT_STATUS_UNKNOWN
}
 Possible L_STATUS values of a link tuple.
 
typedef struct iib_link_set_entry iib_link_set_entry_t
 Link Set entry (link tuple)
 
typedef struct iib_two_hop_set_entry iib_two_hop_set_entry_t
 2-Hop Set entry (2-Hop tuple)
 
typedef struct iib_base_entry iib_base_entry_t
 Link set for a registered interface.
 
int iib_register_if (kernel_pid_t pid)
 Register a new interface in the IIB. More...
 
iib_link_set_entry_tiib_process_hello (kernel_pid_t if_pid, nib_entry_t *nb_elt, uint64_t validity_time, uint8_t is_sym_nb, uint8_t is_lost)
 Process a received HELLO message in the IIB. More...
 
void iib_fill_wr_addresses (kernel_pid_t if_pid, struct rfc5444_writer *wr)
 Add addresses to the currently constructed HELLO message. More...
 
void iib_update_lt_status (timex_t *now)
 Update L_STATUS of all existing Link Tuples. More...
 
void iib_propagate_nb_entry_change (nib_entry_t *old_entry, nib_entry_t *new_entry)
 Exchange the corresponding Neighbor Tuple of existing Link Tuples. More...
 
void iib_process_metric_msg (iib_link_set_entry_t *ls_entry, uint64_t int_time)
 Process steps for the chosen NHDP metric for a message. More...
 
void iib_process_metric_pckt (iib_link_set_entry_t *ls_entry, uint32_t metric_out, uint16_t seq_no)
 Process steps for the chosen NHDP metric for a packet. More...
 
void iib_process_metric_refresh (void)
 Update metric values for the chosen NHDP metric for all Link Tuples.
 

Function Documentation

◆ iib_fill_wr_addresses()

void iib_fill_wr_addresses ( kernel_pid_t  if_pid,
struct rfc5444_writer *  wr 
)

Add addresses to the currently constructed HELLO message.

Note
Must not be called from outside the NHDP writer's message creation process.
Parameters
[in]if_pidPID of the interface the message is constructed for
[in]wrThe NHDP writer used for message construction

◆ iib_process_hello()

iib_link_set_entry_t* iib_process_hello ( kernel_pid_t  if_pid,
nib_entry_t nb_elt,
uint64_t  validity_time,
uint8_t  is_sym_nb,
uint8_t  is_lost 
)

Process a received HELLO message in the IIB.

Note
Must not be called from outside the NHDP reader's message processing.
Parameters
[in]if_pidPID of the interface the message was received on
[in]nb_eltPointer to the Neighbor Tuple for the message originator
[in]validity_timeValidity time in milliseconds for the originator's information
[in]is_sym_nbFlag whether the link to the originator is symmetric
[in]is_lostFlag whether the originator marked this link as lost
Returns
Pointer to the new or updated Link Tuple
NULL on error

◆ iib_process_metric_msg()

void iib_process_metric_msg ( iib_link_set_entry_t ls_entry,
uint64_t  int_time 
)

Process steps for the chosen NHDP metric for a message.

Note
Must not be called from outside the NHDP reader's message processing.
Parameters
[in]ls_entryPointer to the Link Tuple that needs to be updated
[in]int_timeInterval time in milliseconds for the originator's HELLO

◆ iib_process_metric_pckt()

void iib_process_metric_pckt ( iib_link_set_entry_t ls_entry,
uint32_t  metric_out,
uint16_t  seq_no 
)

Process steps for the chosen NHDP metric for a packet.

Note
Must not be called from outside the NHDP reader's packet processing.
Parameters
[in]ls_entryPointer to the Link Tuple that needs to be updated
[in]metric_outMetric value for outgoing link direction
[in]seq_noThe sequence number from the received packet

◆ iib_propagate_nb_entry_change()

void iib_propagate_nb_entry_change ( nib_entry_t old_entry,
nib_entry_t new_entry 
)

Exchange the corresponding Neighbor Tuple of existing Link Tuples.

This function exchanges the corresponding Neighbor Tuple of every Link Tuple that was assigned to old_entry. Primarily used on Neighbor Tuple deletion of old_entry.

Parameters
[in]old_entryPointer to the old corresponding Neighbor Tuple
[in]new_entryPointer to the new corresponding Neighbor Tuple

◆ iib_register_if()

int iib_register_if ( kernel_pid_t  pid)

Register a new interface in the IIB.

This function creates a new empty Link Set and a new empty 2-Hop Set for the given interface.

Parameters
[in]pidPID of the interface
Returns
0 on success
-1 on error

◆ iib_update_lt_status()

void iib_update_lt_status ( timex_t now)

Update L_STATUS of all existing Link Tuples.

Note
If a status change appears the steps described in section 13 of RFC 6130 are executed.
Parameters
[in]nowPointer to current time timex representation