blob: 93bbc1dda1ffdd0c0f3646e18385267c9e8d5fcc [file] [log] [blame] [view]
Alexander Afanasyev357c2052015-08-10 21:26:52 -07001Testing Instructions
2====================
3
4This folder contains several crafted tcpdump traces that can be used to manually check
5correctness of NDN Packet Dissector for Wireshark in several scenarios.
6
7To use the dissector, follow the instructions in
8[dissector's README.md](../../tools/dissect-wireshark/README.md).
9
10`-r <trace-file>` command-line flag can be used to directly open a specific trace file in
11WireShark. For example:
12
13 wireshark -X lua_script:../../tools/dissect-wireshark/ndn.lua -r ipv4-udp-fragmented.pcap
14
15## Test Cases / Trace File Description
16
17### 1. IPv4 UDP
18
19Trace file: `ipv4-udp-fragmented.pcap`
20
21Trace summary: several IPv4 UDP packets, carrying NDN interests and data packets. One
22datagram is fragmented into several IPv4 packets.
23
24Expected result of the dissection:
25
26- NDN interests are dissected from packets 1, 2, 3, and 8.
27- NDN data packet is dissected from defragmented packets 4, 5, 6, and 7.
28
29### 2. IPv6 UDP
30
31Trace file: `ipv6-udp-fragmented.pcap`
32
33Trace summary: several IPv6 UDP packets, carrying NDN interests and data packets. One
34datagram is fragmented into several IPv6 packets.
35
36Expected result of the dissection:
37
38- NDN interests are dissected from packets 1, and 2.
39- NDN data packet is dissected from defragmented packets 3, 4, 5, and 6.
40
41### 3. IPv4 TCP
42
43#### 3.1. De-segmentation and dissection
44
45 Trace file: `ipv4-tcp-segmented.pcap`
46
47 Trace summary: several IPv4 TCP packets, carrying NDN interest and a data packets. The data
48 packet spans several TCP segments.
49
50 Expected result of the dissection:
51 - interest packet is properly dissected from packet 2.
52 - data packet is properly dissected after de-segmentation of payloads in packets 4, 5, 6, and 7.
53
54#### 3.2. Dissection of TCP segments containing multiple NDN packets
55
56 Trace file: `ipv4-tcp-multi-ndn-packets-in-segment.pcap`
57
58 Trace summary: Several IPv4 TCP packets, payload of one containing several NDN interests.
59
60 Expected result of the dissection:
61 - a single interest packet is dissected from packet 1.
62 - four interest packets are dissected from packet 3.
63
64### 4. IPv6 TCP
65
66Trace file: `ipv6-tcp-segmented.pcap`
67
68Trace summary: several IPv6 TCP packets, carrying an NDN data packet that spans several
69TCP segments.
70
71Expected result of the dissection:
72- data packet is properly dissected after de-segmentation of payloads in packets 2, 3, 4, and 5.
73
74### 5. IPv4 TCP/WebSocket
75
76Trace file: `ipv4-websocket-segmented.pcap`
77
78Trace summary: Partial capture of a live IPv4 WebSocket session with a single NDN interest
79retrieving large (~5k) NDN data packet.
80
81Expected result of the dissection:
82- interest packet is dissected after a partial reconstruction of WebSocket session at
83 packet 16.
84- data packet is properly dissected after a partial reconstruction of WebSocket
85 conversation at packet 22.
86
87### 6. IPv6 TCP/WebSocket
88
89Trace file: `ipv6-websocket-segmented.pcap`
90
91Trace summary: Partial capture of a live IPv6 WebSocket session with a single NDN interest
92retrieving large (~5k) NDN data packet.
93
94Expected result of the dissection:
95- interest packet is dissected after a partial reconstruction of WebSocket session at
96 packet 6.
97- data packet is properly dissected after a partial reconstruction of WebSocket
98 conversation at packet 12.
Alexander Afanasyev7f43c532015-08-12 15:28:51 -070099
100### 7. Ethernet
101
102Trace file: `ethernet.pcap`
103
104Trace summary: Short capture, containing an NDN interest multicasted directly in Ethernet frame.
105
106Expected result of the dissection:
107- interest packet is dissected from packet 6.
Junxiao Shie65c6d72016-07-24 21:53:19 +0000108
109### 8. tvb Overflow
110
111Trace file: `bug3603.pcap`
112
113Trace summary: A Data whose payload could be read as incomplete TLV and may cause tvb overflow
114if parser does not check packet length.
115
116Expected result of the dissection:
117- data packet is dissected at packet 12 without Lua error.