The friendly Operating System for the Internet of Things
nhdp_writer.h File Reference

Writer interface for message generation in NHDP. More...

Detailed Description

#include "rfc5444/rfc5444_iana.h"
#include "rfc5444/rfc5444_writer.h"
#include "nhdp.h"
+ Include dependency graph for nhdp_writer.h:

Go to the source code of this file.

Functions

void nhdp_writer_init (void)
 Set up the NHDP writer. More...
 
void nhdp_writer_cleanup (void)
 Clean up the NHDP writer.
 
void nhdp_writer_register_if (struct rfc5444_writer_target *new_if)
 Register a new target interface in the writer. More...
 
void nhdp_writer_send_hello (nhdp_if_entry_t *if_entry)
 Construct and send a HELLO message using the given interface. More...
 
void nhdp_writer_add_addr (struct rfc5444_writer *wr, nhdp_addr_t *addr, enum rfc5444_addrtlv_iana type, uint8_t value, uint16_t metric_in, uint16_t metric_out)
 Add a NHDP address to the currently constructed message. More...
 

Function Documentation

void nhdp_writer_add_addr ( struct rfc5444_writer *  wr,
nhdp_addr_t addr,
enum rfc5444_addrtlv_iana  type,
uint8_t  value,
uint16_t  metric_in,
uint16_t  metric_out 
)
Note
Must not be called from outside the NHDP writer's message creation process.
Parameters
[in]wrPointer to the current NHDP writer used for message creation
[in]addrPointer to a NHDP address to add to the HELLO message
[in]typeTLV type for the address
[in]valueTLV value for the address
[in]metric_inEncoded incoming link metric value
[in]metric_outEncoded outgoing link metric value
void nhdp_writer_init ( void  )

Sets the writer's buffers, initializes the writer and registers HELLO messages as new message type.

void nhdp_writer_register_if ( struct rfc5444_writer_target *  new_if)
Parameters
[in]new_ifPointer to the writer target of the NHDP interface entry
void nhdp_writer_send_hello ( nhdp_if_entry_t if_entry)
Parameters
[in]if_entryPointer to NHDP interface entry the message must be created for