dissect-wireshark: improve NDNLPv2 support

* Support 8-octet NonNegativeInteger.
* Recognize PitToken.
* Recognize CongestionMark.
* Recognize Ack.
* Recognize TxSequence.

refs #4463

Change-Id: I3b003400726df975d067ff46a5ebe645ea774b8b
diff --git a/tests/dissect-wireshark/README.md b/tests/dissect-wireshark/README.md
index afc497b..cf43e61 100644
--- a/tests/dissect-wireshark/README.md
+++ b/tests/dissect-wireshark/README.md
@@ -116,18 +116,28 @@
 Expected result of the dissection:
 - data packet is dissected at packet 12 without Lua error.
 
-### 9. NDNLPv2 Basic
+### 9. NDNLPv2
 
 Trace file: `ndnlpv2.pcap`
 
-Trace summary: Short capture, containing NDN interest that was NACKed with the reason "NoRoute"
+Trace summary: Handcrafted NDNLPv2 packets.
+(`xxd -p -r < ndnlpv2.hex > ndnlpv2.pcap`).
 
-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
+Expected result of the dissection: 12 "Ethernet (NDN)" frames.
+1.  LpPacket contains 12 unrecognized fields. The 10th and 12th fields are labelled "ignored".
+2.  No special requirements.
+3.  "Sequence: 12732154106453800448". "FragIndex: 0". "FragCount: 2". Fragment exists.
+4.  "Sequence: 12732154106453800449". "FragIndex: 1". "FragCount: 2". Fragment exists.
+5.  "NackReason: Congestion".
+6.  "NackReason: Duplicate".
+7.  "NackReason: NoRoute".
+8.  "NackReason: 1".
+9.  Nack exists, but NackReason does not exist.
+10. "PitToken: 15047039637272254167".
+11. "CongestionMark: 1". "TxSequence: 16204482402681480935".
+12. There are eight Ack fields. First is "Ack: 16204482402681480704". Eighth is "Ack: 16204482402681480711".
 
-### 10. NDNLPv2 Extended
+### 10. NDNLPv2 (random)
 
 Trace file: `ndnlpv2-more.pcap`
 
@@ -145,7 +155,7 @@
 
 Trace file: `packet03.pcap`
 
-Trace summary: Hand-crafted packets in NDN Packet Format v0.3
+Trace summary: Handcrafted 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.
 
@@ -159,7 +169,7 @@
 
 Trace file: `nameuri.pcap`
 
-Trace summary: Hand-crafted packet for testing URI encoding in Name and FinalBlockId
+Trace summary: Handcrafted packet for testing URI encoding in Name and FinalBlockId
 (`xxd -p -r < nameuri.hex > nameuri.pcap`).
 
 Expected results of the dissection:
diff --git a/tests/dissect-wireshark/ndnlpv2.hex b/tests/dissect-wireshark/ndnlpv2.hex
new file mode 100644
index 0000000..ee192bd
--- /dev/null
+++ b/tests/dissect-wireshark/ndnlpv2.hex
@@ -0,0 +1,218 @@
+A1B2C3D4
+00020004
+00000000
+00000000
+00010000
+00000001
+
+# packet 1
+00000000
+00000000
+00000030
+00000030
+
+01005E0017AA
+000000000000
+8624
+
+## LpPacket with unrecognized headers
+6420
+5500
+5600
+5700
+5800
+5900
+6000
+6100
+6300
+FD032400
+FD032500
+FD032600
+FD032700
+
+# packet 2
+00000000
+00000000
+00000029
+00000029
+
+01005E0017AA
+000000000000
+8624
+
+## LpPacket with reordered headers
+6419
+530102
+5108B0B1B2B3B4B5B600
+5007 050B0703080141
+520100
+
+# packet 3
+00000000
+00000000
+00000029
+00000029
+
+01005E0017AA
+000000000000
+8624
+
+## first half of fragmented Interest
+6419
+5108B0B1B2B3B4B5B600
+520100
+530102
+5007
+050B0703080141
+
+# packet 4
+00000000
+00000000
+00000028
+00000028
+
+01005E0017AA
+000000000000
+8624
+
+## second half of fragmented Interest
+6418
+5108B0B1B2B3B4B5B601
+520101
+530102
+5006
+0A04A0A1A2A3
+
+# packet 5
+00000000
+00000000
+00000028
+00000028
+
+01005E0017AA
+000000000000
+8624
+
+## Nack~Congestion
+6418
+FD032005 FD03210132
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 6
+00000000
+00000000
+00000028
+00000028
+
+01005E0017AA
+000000000000
+8624
+
+## Nack~Duplicate
+6418
+FD032005 FD03210164
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 7
+00000000
+00000000
+00000028
+00000028
+
+01005E0017AA
+000000000000
+8624
+
+## Nack~NoRoute
+6418
+FD032005 FD03210196
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 8
+00000000
+00000000
+00000028
+00000028
+
+01005E0017AA
+000000000000
+8624
+
+## Nack unrecognized reason
+6418
+FD032005 FD03210101
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 9
+00000000
+00000000
+00000023
+00000023
+
+01005E0017AA
+000000000000
+8624
+
+## Nack no reason
+6413
+FD032000
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 10
+00000000
+00000000
+00000029
+00000029
+
+01005E0017AA
+000000000000
+8624
+
+## Interest with PIT token
+6419
+6208D0D1D2D3D4D5D6D7
+500D
+050B07030801410A04A0A1A2A3
+
+# packet 11
+00000000
+00000000
+0000004E
+0000004E
+
+01005E0017AA
+000000000000
+8624
+
+## Data with CongestionMark=1 and TxSequence
+643E
+FD03400101
+FD034808E0E1E2E3E4E5E6E7
+502B
+0629 0700 16031B0100 1720612A79399E60304A9F701C1ECAC7956BF2F1B046E6C6F0D6C29B3FE3A29BAD76
+
+# packet 12
+00000000
+00000000
+00000070
+00000070
+
+01005E0017AA
+000000000000
+8624
+
+## IDLE packet with Acks
+6460
+FD034408E0E1E2E3E4E5E600
+FD034408E0E1E2E3E4E5E601
+FD034408E0E1E2E3E4E5E602
+FD034408E0E1E2E3E4E5E603
+FD034408E0E1E2E3E4E5E604
+FD034408E0E1E2E3E4E5E605
+FD034408E0E1E2E3E4E5E606
+FD034408E0E1E2E3E4E5E607
diff --git a/tests/dissect-wireshark/ndnlpv2.pcap b/tests/dissect-wireshark/ndnlpv2.pcap
index 66ca127..697d742 100644
--- a/tests/dissect-wireshark/ndnlpv2.pcap
+++ b/tests/dissect-wireshark/ndnlpv2.pcap
Binary files differ