Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit bcfc80d79cb96386d0db400718a90e83abd32b8c Author: Spyros Gasteratos spyrosgaster@gmail.com Date: Sat Apr 14 22:18:24 2012 +0000
doc: batman-adv/TVLV
bcfc80d79cb96386d0db400718a90e83abd32b8c batman-adv/TVLV.textile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/batman-adv/TVLV.textile b/batman-adv/TVLV.textile index d75656aa..74d0b54c 100644 --- a/batman-adv/TVLV.textile +++ b/batman-adv/TVLV.textile @@ -20,39 +20,41 @@ There are many ways to encode such an element.Each providing different pros/cons
First one is BER: This wiki entry describes it pretty godd for a quick overview (and the accompanying paper more thoroughly) - [[http://en.wikipedia.org/wiki/Basic_Encoding_Rules]] +"Ber":http://en.wikipedia.org/wiki/Basic_Encoding_Rules +(Basic Encoding Rules)
-Second is DER:[[http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules]] +Second is "DER":http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules +(Distinguished Encoding Rules) it is more restrictive than the first one
-Third PER:[[http://en.wikipedia.org/wiki/Packed_Encoding_Rules]] +Third "PER":http://en.wikipedia.org/wiki/Packed_Encoding_Rules +(Packed Encoding Rules) defines some more fields
-Finally there is Cer:[[http://en.wikipedia.org/wiki/Canonical_Encoding_Rules]] +Finally there is "Cer":http://en.wikipedia.org/wiki/Canonical_Encoding_Rules
-[[http://en.wikipedia.org/wiki/ASN.1]] +They are all part of the "Abstract Notation 1"http://en.wikipedia.org/wiki/ASN.1
-For the record there is already a tlv message parser -[[http://tlve.sourceforge.net/]] +For the record there is already a tlv message parser "Tlve"http://tlve.sourceforge.net/ (the following is an example of ber parsing) - -[[http://tlve.sourceforge.net/examples/ber.rc]] +"link":http://tlve.sourceforge.net/examples/ber.rc
We can use either one of the above to encode the tlvs or create our own but I think one of the above is more than adequate
- +*+//Update//+* The kernel uses many tlv-like structs (they're all part of netlink.h) -http://lxr.linux.no/#linux+v3.3.2/include/linux/netlink.h +"netlink.h":http://lxr.linux.no/#linux+v3.3.2/include/linux/netlink.h
there are some which could be very helpful actually
BUT there exists something even better :-) our favorite kernel already provides capabilities to create and parse tlvs transparently -http://lxr.linux.no/#linux+v3.3.2/include/net/netlink.h +"/net/netlink":http://lxr.linux.no/#linux+v3.3.2/include/net/netlink.h
(it's actually a very rich api providing even fucntions to nest a tlv message inside another tlv message)
+ It is importand that everyone shares his opinion on this because once implemented most of the current functionality should be encoded using tlvs and one of the above methods. \ No newline at end of file