blob: 7933e6d05f47e1155d9f3e02d30590624f77eac1 [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.
Zipeng Wang574eeb02016-10-05 21:46:02 -0700118
119### 9. NDNLPv2 Basic
120
121Trace file: `ndnlpv2.pcap`
122
123Trace summary: Short capture, containing NDN interest that was NACKed with the reason "NoRoute"
124
125Expected result of the dissection:
126- interest packet is dissected from packet 1
127- from packet 2, an NDNLPv2 packet is dissected which includes a NACK with the code "NoRoute" and
128 a fragment that includes an interest packet
129
130### 10. NDNLPv2 Extended
131
132Trace file: `ndnlpv2-more.pcap`
133
134Trace summary: Short capture of randomly generated NDNLPv2 packets (see
135https://gist.github.com/cawka/fcdde58cc4dc94d789025ab8300076dc) with multiple fields set to various
136values. Given the random generation, some fields are semantically meaningless.
137
138Expected results of the dissection:
139- 10 NDN (NDNLPv2) packets extracted from the reassembled TCP stream
140- the dissection results include Fragment (Interest/Data), Sequence (number), FragIndex (number),
141 FragCount (number), Nack (various reasons), NextHopFaceId, IncomingFaceId, CachingPolicy, and
142 unknown fields
Junxiao Shiac4b5462018-04-17 02:26:17 +0000143
144### 11. NDN Packet Format v0.3
145
146Trace file: `packet03.pcap`
147
148Trace summary: Hand-crafted packets in NDN Packet Format v0.3
149(`xxd -p -r < packet03.hex > packet03.pcap`).
150All packets are valid and do not contain unrecognized TLV elements.
151
152Expected results of the dissection:
153- Packet 1 is recognized as "Interest" type, and has "CanBePrefix: Yes", "MustBeFresh: Yes",
154 "HopLimit: 214", and "Parameters" field.
155- Packet 3 is recognized as "Data" type.