iib_table.h

Interface Information Base interface for NHDP.

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
struct iib_link_set_entry iib_link_set_entry_t

Link Set entry (link tuple)

struct iib_two_hop_set_entry iib_two_hop_set_entry_t

2-Hop Set entry (2-Hop tuple)

struct iib_base_entry iib_base_entry_t

Link set for a registered interface.

int iib_register_if(kernel_types.h::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

pid:PID of the interface

Return values

  • 0 on success
  • -1 on error
iib_table.h::iib_link_set_entry_t * iib_process_hello(kernel_types.h::kernel_pid_t if_pid, nib_table.h::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

if_pid:PID of the interface the message was received on
nb_elt:Pointer to the Neighbor Tuple for the message originator
validity_time:Validity time in milliseconds for the originator’s information
is_sym_nb:Flag whether the link to the originator is symmetric
is_lost:Flag whether the originator marked this link as lost

Return values

  • Pointer to the new or updated Link Tuple
  • NULL on error
void iib_fill_wr_addresses(kernel_types.h::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

if_pid:PID of the interface the message is constructed for
wr:The NHDP writer used for message construction

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

now:Pointer to current time timex representation

void iib_propagate_nb_entry_change(nib_table.h::nib_entry_t * old_entry, nib_table.h::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

old_entry:Pointer to the old corresponding Neighbor Tuple
new_entry:Pointer to the new corresponding Neighbor Tuple

void iib_process_metric_msg(iib_table.h::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

ls_entry:Pointer to the Link Tuple that needs to be updated
int_time:Interval time in milliseconds for the originator’s HELLO

void iib_process_metric_pckt(iib_table.h::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

ls_entry:Pointer to the Link Tuple that needs to be updated
metric_out:Metric value for outgoing link direction
seq_no:The sequence number from the received packet

void iib_process_metric_refresh(void)

Update metric values for the chosen NHDP metric for all Link Tuples.

struct iib_link_set_entry

Link Set entry (link tuple)

nhdp_address.h::nhdp_addr_entry_t * address_list_head

Pointer to head of this tuple’s addresses.

timex_t heard_time

Time at which entry leaves heard status.

timex_t sym_time

Time at which entry leaves symmetry status.

uint8_t pending

Flag whether link is pending.

uint8_t lost

Flag whether link is lost.

timex_t exp_time

Time at which entry expires.

nib_table.h::nib_entry_t * nb_elt

Pointer to corresponding nb tuple.

iib_table.h::iib_link_tuple_status_t last_status

Last processed status of link tuple.

uint32_t metric_in

Metric value for incoming link.

uint32_t metric_out

Metric value for outgoing link.

struct iib_link_set_entry * next

Pointer to next list entry.

struct iib_two_hop_set_entry

2-Hop Set entry (2-Hop tuple)

iib_table.h::iib_link_set_entry_t * ls_elt

Pointer to corresponding link tuple.

nhdp_address.h::nhdp_addr_t * th_nb_addr

Address of symmetric 2-hop neighbor.

timex_t exp_time

Time at which entry expires.

uint32_t metric_in

Metric value for incoming link.

uint32_t metric_out

Metric value for outgoing link.

struct iib_two_hop_set_entry * next

Pointer to next list entry.

struct iib_base_entry

Link set for a registered interface.

kernel_types.h::kernel_pid_t if_pid

PID of the interface.

iib_table.h::iib_link_set_entry_t * link_set_head

Pointer to this if’s link tuples.

iib_table.h::iib_two_hop_set_entry_t * two_hop_set_head

Pointer to this if’s 2-hop tuples.

struct iib_base_entry * next

Pointer to next list entry.