nhdp_writer.h

Writer interface for message generation in NHDP.

void nhdp_writer_init(void)

Set up the NHDP writer.

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

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.

Parameters

new_if:Pointer to the writer target of the NHDP interface entry

void nhdp_writer_send_hello(nhdp_if_entry_t * if_entry)

Construct and send a HELLO message using the given interface.

Parameters

if_entry:Pointer to NHDP interface entry the message must be created for

void nhdp_writer_add_addr(struct rfc5444_writer * wr, nhdp_address.h::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.

Note

Must not be called from outside the NHDP writer’s message creation process.

Parameters

wr:Pointer to the current NHDP writer used for message creation
addr:Pointer to a NHDP address to add to the HELLO message
type:TLV type for the address
value:TLV value for the address
metric_in:Encoded incoming link metric value
metric_out:Encoded outgoing link metric value