cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

pktdump doesn't work with ccnb packets #325

Closed s3lph closed 5 years ago

s3lph commented 5 years ago

Description

pktdump doesn't work with ccnb packets. It terminates prematurely on the first tag.

Steps to reproduce the issue

./ccn-lite-mkC -s ccnb /foo/bar <<<test | ./ccn-lite-pktdump

Expected results

# ccn-lite-pktdump, parsing 26 bytes
#     auto-detected CCNB format
#
0000  04 82  -- <contentobj>
0002    f2  -- <name>
0003      fa  -- <component>
0004        9d  -- <data (3 bytes)>
0005          66 6f 6f                                               |foo|
0008      00  -- </component>
0009      fa  -- <component>
000a        9d  -- <data (3 bytes)>
000b          62 61 72                                               |bar|
000e      00  -- </component>
000f    00  -- </name>
0010    01 9a  -- <content>
0012      ad  -- <data (5 bytes)>
0013        74 65 73 74 0a                                           |test.|
0018    00  -- </content>
0019  00  -- </contentobj>
001a  pkt.end

Actual results

# ccn-lite-pktdump, parsing 26 bytes
#     auto-detected CCNB format
#
0000  04 82 0002  pkt.end

Versions

Current master (6d5438003d385fb2bfcec01fc1d014fe96522aed).