net-test: packetdrill: print the name and contents of TCP options, not numerical kind
Currently, when packetdrill notices that an outbound TCP option does
not have the expected value, the error message is confusing.
For example, for the following line in a packetdrill script:
+.000 > S. 0:0(0) ack 1 <mss 1000,nop,nop,sackOK,nop,wscale 8>
... the error message might be:
error handling packet: bad value outbound TCP option 2
This is unclear. It's unclear whether "2" here means option #2 in the
list of options (here a "nop"), or the option with the "kind" of "2"
(here "mss"). It turns out packetdrill meant option "kind" of "2". But
most people do not have option kind code points memorized, so this is
unclear.
This commit changes packetdrill to print the name and contents of TCP
options, not numerical kind. So the error message in the case above
now looks like:
error handling packet: bad value in outbound TCP option (kind=2): expected: mss 1000 actual: mss 1460
Signed-off-by: Neal Cardwell <ncar...@google.com>
Change-Id: I0375ba54ab3d0696df3682950f84084a309676ad