[Olsr-dev] rfc5444_reader documentation

Henning Rogge (spam-protected)
Mon Jul 8 07:41:05 CEST 2013


On 07/06/2013 07:39 PM, Benjamin Valentin wrote:
> Hi,
> I'm trying to understand how to use rfc5444_reader, but
> docs/rfc5444/rfc5444_reader.txt isn't all that helpful - in particular
> how the .type attribute of rfc5444_reader_tlvblock_consumer_entry is
> used.
> (The callback only is called for packages/messages/addresses with that
> msg_type specified in rfc5444_writer_content_provider?)
> Unfortunately the example example/example_reader.c mentioned doesn't
> exist and was last seen in [1], but uses functions that don't exist
> anymore in oonf_api.

Hi,

thank you for your interest in the RFC5444 library. During the 
implementation of the NHDP and OLSRv2 protocol I fixed a number of bugs 
and tried to simplify the API structure a bit, so the documentation file 
is a little bit outdated.

I will look through it this week and try to adapt it to the current 
codebase.

----

the rfc5444_reader_tlvblock_context is a datastructure all reader 
callbacks get to tell them about the context of their TLV(s).

The 'type' attribute is normally not relevant to the callback, because 
most callbacks are only called for ONE specific context level (packet 
level, message level or address level).

The packet level context fields are always set, they provide the content 
of the RFC5444 packet header.

Message level context fields are set for message and address level 
callbacks to provide the content of the RFC5444 message header.

Finally, the address level context fields in the struct are only 
available for address callbacks, they contain the address the TLV(s) of 
the callback belong to.

Henning Rogge


-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20130708/ab055179/attachment.bin>


More information about the Olsr-dev mailing list