Thread (10 messages) 10 messages, 4 authors, 2012-05-18

Question about tlv message support

From: NorthPole <hidden>
Date: 2012-05-18 14:47:39

Hi all,
Now that I found some time to post

I just wanted to thank you all for the help, your posts helped a lot :-)

On Tue, Apr 17, 2012 at 12:34 PM, Javier Martinez Canillas
[off-list ref] wrote:
On Tue, Apr 17, 2012 at 2:36 AM, NorthPole [off-list ref] wrote:
quoted
@JAYESH TANK
thank you very much :-) that was a very good starting poind :D


@Javier
you are right, so here is something more specific

I want to add a framework for tlv message construction and parsing in
a wireless mesh routing protocol so as it can have the advantages of
the tlv way of communication (one of which is backwards compatibility)

afaik tlvs are used in many places in the kernel and as Jayesh stated
there are no ready made apis.
So if I want to do that I have to copy someone else's code and modify
it accordingly
Hi,

Netlink has some sort of TLV:

nla_put_string(), nla_put_u32(), nla_put_u8(), etc.

But use a socket buffer (struct sk_buff) to store this data. Since you
will use to store and retrieve this info for a networking protocol
(mesh routing), it probably makes sense to reuse Netlink functions.

Take a look to: include/net/netlink.h

Hope it helps,

--
Javier Mart?nez Canillas
(+34) 682 39 81 69
Barcelona, Spain
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help