Page 1 of 1

parse nested TLV structure

Posted: Tue Mar 01, 2016 3:33 am
by lefibr
I need to parse nested TLV structure. Is there anyone that know how to parse nested TLV?

Re: parse nested TLV structure

Posted: Wed Mar 09, 2016 2:26 am
by lefibr
Is there anybody know this? Pls help.

Re: parse nested TLV structure

Posted: Wed Mar 09, 2016 2:29 am
by mabel
If your parsed tag has bit 5 set (0x20) the tag is constructed, call your parsing routine recursively on the tag contents.
If tag has bit 5 clear, then contents is raw data.

And also maybe this link is helpful to you.
https://github.com/a2800276/tlv/blob/ma ... /parser.rb