Commit graph

3101 commits

Author SHA1 Message Date
Martin Mathieson
def43c8061 DO-IRP: some minor changes 2023-08-14 13:59:18 +00:00
Guy Harris
a03041e601 Don't assign a struct timeval to the time stamp in a pcap_pkthdr.
The time stamp in a pcap_pkthdr may not have the same type as a struct
timeval.
2023-08-11 19:35:17 -07:00
Martin Mathieson
8db2a5cf50 add_bitmask() - only warn when bitmask set has bits not set in root hf mask 2023-08-10 21:35:04 +00:00
Martin Mathieson
85da4edcd0 Look into more inconsistent add_bitmask() calls 2023-08-09 11:56:05 +00:00
Anders Broman
df59bfff2e Convert asn2ws to generate C99 types 2023-08-08 19:09:02 +00:00
Martin Mathieson
9dbc72dd5b Spellchecking: doing check new generated C files 2023-08-07 18:36:01 +01:00
Guy Harris
f9846ecb7c macos-setup.sh, WSDG: Qt 6 builds must be done manually on macOS.
Update macos-setup.sh to attempt to install Qt 6.2.4; that won't work,
but at least it means it doesn't install Qt 5, which is no longer used
as the default Qt version for builds.

Have macos-setup.sh not say you're ready to build Wireshark if Qt hasn't
been installed; if QT_VERSION was set but Qt wasn't installed, point to
the Wireshark Develper's Guide for instructions on how to download and
install it.

Have the Wireshark Developer's Guide give instructions on how to
download and install Qt 6, derived from the instructions for Windows but
modified for installing 6.2.4 on macOS.
2023-08-07 01:10:31 -07:00
João Valverde
341c03713f manuf: Move private declarations out of header 2023-07-28 21:07:44 +00:00
João Valverde
7f06df2d0c Add tshark -G services 2023-07-27 18:09:27 +01:00
João Valverde
734a675938 Add description to IANA services table 2023-07-27 15:40:29 +01:00
João Valverde
a3142d25bf Add tshark -G enterprises 2023-07-27 15:40:25 +01:00
João Valverde
b4a421cf82 Replace "manuf" files with static arrays
To reduce startup external file parsing replce the manuf file with
static arrays compiled into the binary.

Add 3 tables for MA-L, MA-M and MA-S. Add a fourth table to direct
a 24-bit MAC prefix (OUI) to one of these tables.

Adapt the make-manuf.py script to generate the static C data
instead of the text file.

The arrays are sorted and a binary search is performed to map
an OUI (24bit/28bit/36bit) to a short and long name.
2023-07-25 16:23:26 +00:00
Martin Mathieson
2d0a07116e make_enterprises: some minor changes 2023-07-23 00:16:26 +00:00
Martin Mathieson
535f8f7534 Improve check for add_bitmask consistency, and fix up some issues 2023-07-21 20:54:51 +00:00
Gerald Combs
1dfdb211b7 Tools: Move malloc debugging to a separate file
Set our various malloc debugging environment variables in a separate
`debug-alloc.env` file and document it in the Developer's Guide.
2023-07-21 16:33:58 +00:00
Guy Harris
3a7a3a9e40 rdps: generate big text arrays and one fwrite() call.
Rather than generating a bunch of individual fprintf() calls, one per
line of the preamble and finale, generate two static const char arrays
with the preamble and finale text, and have the routines just write them
out with an fwrite().
2023-07-20 01:27:38 -07:00
Guy Harris
f4e31bda10 rdps: no need to set script_name in start_code().
It's already been set by main().
2023-07-20 00:56:12 -07:00
João Valverde
f588214a58 manuf: Improve name shortening heuristic
Add - and + to punctuation exclusion list.

Do not remove the first word as a general term. When an exclusion
term is used as the first word usually it is noa only legalese and
should not be rejected. The exception is "The".
2023-07-10 15:24:47 +01:00
João Valverde
f44e088329 manuf: Skip some start words in short name
Skip some locations in company names that are just repeated low-value
information. Many different Chinese companies will short to the same
name (Shenzen for example).

This is a heuristic and not 100% reliable but in the vast majority of
cases it cuts down on noise and generates more informative names.
2023-07-10 15:23:23 +01:00
João Valverde
ac57a25ed8 manuf: Increase truncation size to 12
The truncation size of 8 is too short to convey enough information
in many cases. Some experimentation suggests it can be safely
increased for better readability without any other ill effects.

Make a conservative size increase 12. Arguaby it could be larger.
2023-07-10 15:22:36 +01:00
João Valverde
641de5bd0d manuf: Fix indentation
Align the column indentation vertically.
2023-07-10 15:22:05 +01:00
João Valverde
0b5791b08d manuf: Drop Cavebear OUI list
The cavebear OUI list is hopelessly outdated (last updated 1999?)
and our template file mostly contains obsolete or poorly formatted
entries, compared to the official IEEE registry. We should rely on
the official registry, which is the best and most up-to-date source,
despite some minor inconsistencies and glitches.

Remove the template file and use the IEEE registry exclusively.
2023-07-10 15:17:55 +01:00
Martin Mathieson
4f7fc21708 check_typed_item_calls: fix some minor issues 2023-07-10 12:18:00 +00:00
João Valverde
75a778e893 Replace services file with static array
To speed up start-up we no longer read the services file
from an external resource. Instead it is compiled statically
into the binary in a sorted array.

The personal services file is still parsed and loaded at startup,
if it exists, to allow users to add custom entries and override
global entries.

For historical reasons the port list is mostly composed of
the same entry for TCP and UDP. To avoid a lot of duplication
we add an extra TCP+UDP table and do two lookups for TCP or
UDP, one in the TCP+UDP table and the other in the TCP/UDP table.

Because the services name space is pretty sparse, with lots of
holes, we also use a binary search instead of a linear array
with aprox. 49000 entries, where most would be empty.
2023-07-08 23:06:49 +01:00
Gerald Combs
ca762ad5eb Convert Skinny to C99 types
Convert the Skinny dissector and its generator to C99 types.
2023-07-06 14:18:56 +00:00
João Valverde
1af406d6bb Rename enterprises files
Rename generator script and C source file to be more descriptive
and less unwieldly respectively.
2023-07-06 09:46:23 +00:00
João Valverde
f47ce6e761 Remove no longer used enterprises.tsv file
Follow-up to 44258d5bed.
2023-07-06 09:46:23 +00:00
Martin Mathieson
dd9dfff118 Fix some spelling errors 2023-07-05 14:46:14 +01:00
Martin Mathieson
44258d5bed Speed up handling of global enterprises.tsv 2023-07-05 12:09:54 +00:00
Martin Mathieson
90702f185c Skinny: Regenerate dissector from packet-skinny.c.in 2023-06-30 17:25:52 +00:00
Gerald Combs
2aa34278ef Convert the NCP dissector and generator to C99 types 2023-06-27 18:32:09 +00:00
Martin Mathieson
db0f56f025 More checking labels vs filter 2023-06-26 20:37:06 +00:00
João Valverde
38a5b44d61 dflter: Fix semantics of fvalue length
Do not mix wire size, a protocol property, with fvalue
length, a property of certain types of objects (sequences).

Rename ftype_length() to ftype_wire_size(). Do not return
wire_size with fvalue_length() (use ftype_wire_size()
instead).

Make the semantic check reject taking the len() of objects
that are not arrays or lists. If the (fixed) len() of a number
is somehow useful we can add a different function for that.
2023-06-26 00:46:18 +00:00
Gerald Combs
4f03eacadd Tools: Fix make-pci-ids.py
Make sure our generated output includes stddef.h.

[skip ci]
2023-06-25 13:02:25 -07:00
Zoran Bošnjak
d123e97ab7 asterix: adjust for extended/repetitive upstream change 2023-06-25 15:52:53 +00:00
Stig Bjørlykke
f11450a587 tools: Relax dup filter check for stat
Add a dup allowed check for "stat.stat_*" and "stat.state" to allow
packet-stat.c to pass the checks.
2023-06-22 13:18:40 +02:00
Gerald Combs
dafd334270 Tools: Switch make-reg.py to standard C types 2023-06-18 21:48:13 +00:00
Gerald Combs
6b219e0f20 Tools: Add gu?long to convert-glib-types.py
Convert occurrences of gu?char and gu?long in capture/.
2023-06-18 21:44:30 +00:00
Gerald Combs
1bd1d2ee04 Tools: Switch make-regs.py to C99 types 2023-06-18 21:44:30 +00:00
Gerald Combs
32c0a69a9b Convert TLS CT log updates to C99 types 2023-06-18 18:13:22 +00:00
Gerald Combs
2f763fe702 Convert the ASTERIX dissector and updates to C99 types 2023-06-18 18:01:53 +00:00
Gerald Combs
c6ded71ac4 Convert pci-ids.[ch] to C99 2023-06-18 10:32:09 -07:00
Gerald Combs
a265aa4bc2 Convert writecap to C99 types
Convert writecap to C99 types. Add maximum and minimum values to
convert-glib-types.py.

Ping #19116
2023-06-16 15:34:44 +00:00
Martin Mathieson
011b9e906e Set more full mask fields to 0x0 2023-06-15 23:41:26 +01:00
Gerald Combs
567a9e1a47 Tools: GLib-to-C99 file handling improvements
Handle failures to open and read files.
2023-06-16 00:07:17 +00:00
Gerald Combs
86f51d0999 Tools: GLib-to-C99 padding improvements 2023-06-15 21:12:03 +00:00
Gerald Combs
978f62a805 Convert our extcaps to C99 types
Convert our extcaps to C99 types. Try to preserve padding in
convert-glib-types.py and add globbing support on Windows.

Ping #19116
2023-06-15 01:14:59 +00:00
Martin Mathieson
c2571c7ed9 Add a check for all-set masks and fix some instances 2023-06-15 01:14:36 +00:00
Uli Heilmeier
dc2eb69d3e make-version: fix argparse config
Fixes: #19134
2023-06-14 06:49:02 +00:00
Gerald Combs
591f89d785 Add a script to convert GLib types to their C equivalents
Convert wsutil/802_11-utils.[ch] as a test.

Update some of our documentation.

Ping #19116
2023-06-12 17:32:56 +00:00