-
Improvement
-
Resolution: Fixed
-
Normal
-
s14
-
None
When testing out the new validation of the pcap schema, I modified the icmp input file so the version was 1.4 instead of 2.4. The parse failed as expected, but this is the output:
[error] Parse Error: Assertion failed. PCAP version must be 2.4
Parsed value was: <PCAPHeader>...</PCAPHeader>
....
from Steve:
the assert is on the header, not the version major/minor elements. It
might not be a bad idea to show one depth deeper into the infoset for
the 'Parsed value was' thing. However, this would show the entire header
and be a bit too verbose, which wouldn't be too useful. To get around
that we could add a sequence, so the schema would be something like:
<PCAPHeader>
...
<Version>
<Major>1</Major>
<Minor>4</Minor>
</Version>
...
</PCAPHeader>
Then put the assert on the Version element. Changing the schema to
output that, plus going one layer deeper on the parsed value would give
something like:
Parsed value was: <Version><Major>1</Major><Minor>4</Minor></Version>