lib_table.h File Reference

Local Information Base interface for NHDP. More...

Detailed Description

#include "kernel_types.h"
#include "rfc5444/rfc5444_writer.h"
#include "nhdp_address.h"
+ Include dependency graph for lib_table.h:

Go to the source code of this file.

Data Structures

struct  lib_entry
 Local Interface Set entry (local interface tuple) More...
typedef struct lib_entry lib_entry_t
 Local Interface Set entry (local interface tuple)
int lib_add_if_addr (kernel_pid_t if_pid, nhdp_addr_t *addr)
 Add an interface to the Local Information Base. More...
void lib_rem_if (kernel_pid_t if_pid)
 Remove a given interface's Local Information Base entry. More...
void lib_fill_wr_addresses (kernel_pid_t if_pid, struct rfc5444_writer *wr)
 Add addresses to the currently constructed HELLO message. More...
uint8_t lib_is_reg_addr (kernel_pid_t if_pid, nhdp_addr_t *addr)
 Check whether a given NHDP address is used as a local address. More...

Function Documentation

◆ lib_add_if_addr()

int lib_add_if_addr ( kernel_pid_t  if_pid,
nhdp_addr_t addr 

This function can also be used to add an additional address to an existing LIB tuple.

[in]if_pidPID of the interface
[in]addrThe (additional) NHDP address to register for the interface
0 on success
-1 on error

◆ lib_fill_wr_addresses()

void lib_fill_wr_addresses ( kernel_pid_t  if_pid,
struct rfc5444_writer *  wr 
Must not be called from outside the NHDP writer's message creation process.
[in]if_pidPID of the interface the message is constructed for
[in]wrThe NHDP writer used for message construction

◆ lib_is_reg_addr()

uint8_t lib_is_reg_addr ( kernel_pid_t  if_pid,
nhdp_addr_t addr 
[in]if_pidPID of the interface to check for
[in]addrPointer to the NHDP address that has to be checked
1 if the given address is assigned to the given interface
2 if the given address is assigned to any other local interface
0 otherwise

◆ lib_rem_if()

void lib_rem_if ( kernel_pid_t  if_pid)
[in]if_pidPID of the interface that should be removed