pcapng: show some fields in decimal, not hexadecimal.

The interface ID is just an ordinal; there's no reason to show it as hex
(we don't show it as hex if we're treating a pcapng file as a capture
rather than a file to be dissected).

The packet drops count is just a count, so, again, there's no reason to
show it as hex.

The hash algorithms numbers are given in decimal in the pcapng spec, so
display it as decimal.

Change-Id: I93fd50e7243a5b012bd29324f7116e634aca62af
Reviewed-on: https://code.wireshark.org/review/37072
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
This commit is contained in:
Guy Harris 2020-05-03 11:56:44 -07:00 committed by Guy Harris
parent 0b1e27ec77
commit 90fdb71bf6
1 changed files with 9 additions and 9 deletions

View File

@ -517,11 +517,11 @@ static const value_string timestamp_resolution_base_vals[] = {
};
static const value_string packet_hash_algorithm_vals[] = {
{ 0x00, "2's complement" },
{ 0x01, "XOR" },
{ 0x02, "CRC32" },
{ 0x03, "MD5" },
{ 0x04, "SHA1" },
{ 0, "2's complement" },
{ 1, "XOR" },
{ 2, "CRC32" },
{ 3, "MD5" },
{ 4, "SHA1" },
{ 0, NULL }
};
@ -1979,7 +1979,7 @@ proto_register_pcapng(void)
},
{ &hf_pcapng_option_data_packet_hash_algorithm,
{ "Hash Algorithm", "pcapng.options.option.data.packet.hash.algorithm",
FT_UINT8, BASE_HEX, VALS(packet_hash_algorithm_vals), 0x00,
FT_UINT8, BASE_DEC, VALS(packet_hash_algorithm_vals), 0x00,
NULL, HFILL }
},
{ &hf_pcapng_option_data_packet_hash_data,
@ -2134,12 +2134,12 @@ proto_register_pcapng(void)
},
{ &hf_pcapng_packet_block_interface_id,
{ "Interface", "pcapng.packet.interface_id",
FT_UINT16, BASE_HEX, NULL, 0x00,
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_pcapng_packet_block_drops_count,
{ "Drops Count", "pcapng.packet.drops_count",
FT_UINT16, BASE_HEX, NULL, 0x00,
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_pcapng_captured_length,
@ -2164,7 +2164,7 @@ proto_register_pcapng(void)
},
{ &hf_pcapng_interface_id,
{ "Interface", "pcapng.interface_id",
FT_UINT16, BASE_HEX, NULL, 0x00,
FT_UINT16, BASE_DEC, NULL, 0x00,
NULL, HFILL }
},
{ &hf_pcapng_timestamp_high,