Testing Instructions

This folder contains several crafted tcpdump traces that can be used to manually check correctness of NDN Packet Dissector for Wireshark in several scenarios.

To use the dissector, follow the instructions in dissector's README.md.

-r <trace-file> command-line flag can be used to directly open a specific trace file in WireShark. For example:

wireshark -X lua_script:../../tools/dissect-wireshark/ndn.lua -r ipv4-udp-fragmented.pcap

Test Cases / Trace File Description

1. IPv4 UDP

Trace file: ipv4-udp-fragmented.pcap

Trace summary: several IPv4 UDP packets, carrying NDN interests and data packets. One datagram is fragmented into several IPv4 packets.

Expected result of the dissection:

  • NDN interests are dissected from packets 1, 2, 3, and 8.
  • NDN data packet is dissected from defragmented packets 4, 5, 6, and 7.

2. IPv6 UDP

Trace file: ipv6-udp-fragmented.pcap

Trace summary: several IPv6 UDP packets, carrying NDN interests and data packets. One datagram is fragmented into several IPv6 packets.

Expected result of the dissection:

  • NDN interests are dissected from packets 1, and 2.
  • NDN data packet is dissected from defragmented packets 3, 4, 5, and 6.

3. IPv4 TCP

3.1. De-segmentation and dissection

Trace file: ipv4-tcp-segmented.pcap

Trace summary: several IPv4 TCP packets, carrying NDN interest and a data packets. The data packet spans several TCP segments.

Expected result of the dissection:

  • interest packet is properly dissected from packet 2.
  • data packet is properly dissected after de-segmentation of payloads in packets 4, 5, 6, and 7.

3.2. Dissection of TCP segments containing multiple NDN packets

Trace file: ipv4-tcp-multi-ndn-packets-in-segment.pcap

Trace summary: Several IPv4 TCP packets, payload of one containing several NDN interests.

Expected result of the dissection:

  • a single interest packet is dissected from packet 1.
  • four interest packets are dissected from packet 3.

4. IPv6 TCP

Trace file: ipv6-tcp-segmented.pcap

Trace summary: several IPv6 TCP packets, carrying an NDN data packet that spans several TCP segments.

Expected result of the dissection:

  • data packet is properly dissected after de-segmentation of payloads in packets 2, 3, 4, and 5.

5. IPv4 TCP/WebSocket

Trace file: ipv4-websocket-segmented.pcap

Trace summary: Partial capture of a live IPv4 WebSocket session with a single NDN interest retrieving large (~5k) NDN data packet.

Expected result of the dissection:

  • interest packet is dissected after a partial reconstruction of WebSocket session at packet 16.
  • data packet is properly dissected after a partial reconstruction of WebSocket conversation at packet 22.

6. IPv6 TCP/WebSocket

Trace file: ipv6-websocket-segmented.pcap

Trace summary: Partial capture of a live IPv6 WebSocket session with a single NDN interest retrieving large (~5k) NDN data packet.

Expected result of the dissection:

  • interest packet is dissected after a partial reconstruction of WebSocket session at packet 6.
  • data packet is properly dissected after a partial reconstruction of WebSocket conversation at packet 12.

7. Ethernet

Trace file: ethernet.pcap

Trace summary: Short capture, containing an NDN interest multicasted directly in Ethernet frame.

Expected result of the dissection:

  • interest packet is dissected from packet 6.

8. tvb Overflow

Trace file: bug3603.pcap

Trace summary: A Data whose payload could be read as incomplete TLV and may cause tvb overflow if parser does not check packet length.

Expected result of the dissection:

  • data packet is dissected at packet 12 without Lua error.

9. NDNLPv2 Basic

Trace file: ndnlpv2.pcap

Trace summary: Short capture, containing NDN interest that was NACKed with the reason "NoRoute"

Expected result of the dissection:

  • interest packet is dissected from packet 1
  • from packet 2, an NDNLPv2 packet is dissected which includes a NACK with the code "NoRoute" and a fragment that includes an interest packet

10. NDNLPv2 Extended

Trace file: ndnlpv2-more.pcap

Trace summary: Short capture of randomly generated NDNLPv2 packets (see https://gist.github.com/cawka/fcdde58cc4dc94d789025ab8300076dc) with multiple fields set to various values. Given the random generation, some fields are semantically meaningless.

Expected results of the dissection:

  • 10 NDN (NDNLPv2) packets extracted from the reassembled TCP stream
  • the dissection results include Fragment (Interest/Data), Sequence (number), FragIndex (number), FragCount (number), Nack (various reasons), NextHopFaceId, IncomingFaceId, CachingPolicy, and unknown fields

11. NDN Packet Format v0.3

Trace file: packet03.pcap

Trace summary: Hand-crafted packets in NDN Packet Format v0.3 (xxd -p -r < packet03.hex > packet03.pcap). All packets are valid and do not contain unrecognized TLV elements.

Expected results of the dissection:

  • Packet 1 is recognized as "Interest" type, and has "CanBePrefix: Yes", "MustBeFresh: Yes", "HopLimit: 214", and "Parameters" field.
  • Packet 3 is recognized as "Data" type.