Doing a blocking read from a pipe on Windows is done in several places,
using similar sequences of code; put that sequence into a subroutine,
with the parts that differ in arguments to the routine.
Add some comments, and update some comments, to better clarify what the
code is doing in various places.
In the switch statement that tests the first 4 bytes read from a pipe or
socket, call pcap_pipe_open_live() at the end of all of the cases where
the file appears to be a pcap file; that makes the handling of pcap
files look a bit more like the handling of pcapng files.
Improve script by ignoring common contractions, dealing with
e.g. \n within strings, and finding multiple concatenated words even
when no camelCase is used.
Also includes some actual spelling fixes.
Fix dissecting of packets received on LE Coded PHY. These packets
will include the extra field "coding indicator" after the access
address.
The assignment of phy in the common bluetooth context was missing,
leading to this field being left out and the offset being wrong.
Don't call the columnString() and discard the result in order to force
colorization; instead, add a separate method to force colorization and
use that.
This avoids the need to choose a column; we were using 1 as the column
number, but column numbers are zero-origin, so that's column 2, which
isn't guaranteed to exist (a crash ensued if it didn't).
Support the GSM 7 bit alphabet. This should be unpacked, according
to the spec and references online. Similarly, the IA5/ASCII support
should also be unpacked. GSM 7 Packed is supported as an option for
encoding 0, as reports of a small number of servers behaving that way
exist. Provide the byte representation for when encoding is performed
(but hidden), so that filters doesn't change depending on the preference
and encoding, and are backwards compatible with pre 3.2.0. Fixes#17015
Set the FI_BITS_OFFSET and FI_BITS_SIZE flags appropriately on [u]int[64]
(and thus chars and booleans) where the bitmask is passed in on the
header_field_info. Also set the flags on bitmask items by ORing the bitmasks
from the constituent fields. These flags are only used right now in the
packet diagram.
This makes the packet diagram display those types of fields correctly without
having to use proto_item_set_bits_offset_len(), so long as the bitmask is
correct and the field width of the type matches the octet length. (If it
doesn't match, that's a dissector bug.)
split bit items are a more complicated case and still not handled correctly.
In order to avoid Bison's compatibility problem (like
https://code.wireshark.org/review/#/c/33771/),
the *.proto file parser is rewritten with lemon. (rename
protobuf_lang.y.in to protobuf_lang_parser.lemon)
Also improved the mechanism of recording line number of
message, field, and enum names.
Check if profile specific file exists for ethers, ipxnets and enterprises.tsv
before falling back to personal configuration file.
Fixes: wireshark/wireshark#16878
The dissector puts wmem_allocated memory into pinfo->private_table.
This table gets created with free functions (g_free) that collide
with wmem allocations. No need to have free functions.
The canonical location for the usb.ids file is
http://www.linux-usb.org/usb.ids. Unfortunately that site isn't
accessible over HTTPS so we were using https://usb-ids.gowdy.us/usb.ids
instead. *That* site is down, so switch to the Linux USB project's
SourceForge repository URL, which appears to house the assets for
www.linux-usb.org, including the usb.ids file.
reported by check_typed_proto_items.py
packet-capwap.c:1810 proto_tree_add_item called for hf_capwap_fortinet_mesh_eth_bridge_enable - item type is FT_UINT32 but call has len 1
packet-capwap.c:3015 proto_tree_add_item called for hf_capwap_control_header_msg_type_enterprise_nbr - item type is FT_UINT32 but call has len 3
reported by check_typed_proto_items.py
packet-dns.c:1688 proto_tree_add_item called for hf_dns_rr_len - item type is FT_UINT32 but call has len 2
packet-dns.c:1719 proto_tree_add_item called for hf_dns_rr_len - item type is FT_UINT32 but call has len 2
packet-dns.c:2493 proto_tree_add_item called for hf_dns_px_preference - item type is FT_UINT8 but call has len 2
reported by check_typed_proto_items.py
packet-couchbase.c:1403 proto_tree_add_item called for hf_extras_nmeta - item type is FT_UINT32 but call has len 2
packet-couchbase.c:1405 proto_tree_add_item called for hf_extras_nru - item type is FT_UINT16 but call has len 1
packet-couchbase.c:1426 proto_tree_add_item called for hf_extras_nmeta - item type is FT_UINT32 but call has len 2
packet-couchbase.c:1453 proto_tree_add_item called for hf_extras_nmeta - item type is FT_UINT32 but call has len 2
packet-couchbase.c:1471 proto_tree_add_item called for hf_extras_nmeta - item type is FT_UINT32 but call has len 2
packet-couchbase.c:1522 proto_tree_add_item called for hf_extras_nru - item type is FT_UINT16 but call has len 1
reported by check_typed_proto_items.py
packet-cdp.c:298 proto_tree_add_item called for hf_cdp_ttl - item type is FT_UINT16 but call has len 1
packet-cdp.c:1225 proto_tree_add_item called for hf_cdp_nrgyz_tlvtype - item type is FT_UINT16 but call has len 4
reported by check_typed_proto_items.py
packet-bluecom.c:435 proto_tree_add_item called for hf_bcp_hdr_cmd - item type is FT_UINT32 but call has len 1
packet-bluecom.c:441 proto_tree_add_item called for hf_bcp_hdr_len - item type is FT_UINT8 but call has len 2