Commit Graph

85797 Commits

Author SHA1 Message Date
Chuck Craft 1e6f26adb6 wslua: init.lua - superuser logic; typeof() call on non-table
obj.__typeof exists only for "table" objects (see c4f1777a)
2022-11-10 07:32:30 -06:00
Chuck Craft b032a40fd9 IEEE 802.11: random addresses in conversations and endpoints
https://ask.wireshark.org/question/29235/
MAC addresses shown in WLAN statistics do not appear in the capture!

Initialize the address types then check if set when tapping.
2022-11-10 12:22:31 +00:00
Cody Planteen c34223ad62 VRT: add context packet support to VITA 49 dissector
Add complete decoding of CIF0 context packet fields per ANSI/VITA 49.2-2017
standard. Includes framework for future CIF1-CIF3 support with partial
implementation of CIF1.
2022-11-10 06:38:22 +00:00
John Thacker f9a5bf5805 WASSP: Don't add a NULL to a column
The result of try_val_to_str can be NULL, don't add a null address
to a column. Ensure that an appropriate unknown string is added
instead.

Fix #18613
2022-11-09 20:38:45 -05:00
Huang Qiangxiong 99e93e24b8 Protobuf: fix the bug about string format
Support string format like:
- 'a single quote string contains "a double quote string"'
- "a double quote string contains 'a single quote string'"

close #18599
2022-11-09 16:11:22 +00:00
Pascal Quantin 2a0061e445 EVS: improve info column display 2022-11-09 16:46:24 +01:00
Pascal Quantin 1196f214aa EVS: add an option to force decoding as Header-Full format only
Closes #18498
2022-11-09 16:12:17 +01:00
Alexis La Goutte 7f2006e744 ieee80211: Use FT_STRING for HS 2.0 OSU NAI
Fix 18610
2022-11-09 11:41:21 +00:00
Chuck Craft 085cbd27e1 pcapng: ws_debug - display option code in decimal 2022-11-08 22:15:44 -06:00
Gerald Combs 85357ae721 Fix more unused variables and enable unused-but-set-variable errors.
Add -Werror=unused-but-set-variable to our default compiler flags and fix

```
epan/dissectors/packet-dcerpc-frsrpc.c:709:10: error: variable 'nb_chunk' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 nb_chunk = 0;
                ^
```

```
epan/dissectors/packet-dcom-oxid.c:175:13: error: variable 'u32ItemIdx' set but not used [-Werror,-Wunused-but-set-variable]
    guint32 u32ItemIdx;
            ^
```

```
epan/dissectors/packet-l2tp.c:1775:104: error: parameter 'ccid' set but not used [-Werror,-Wunused-but-set-parameter]
static int dissect_l2tp_ericsson_avps(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 ccid)
                                                                                                       ^
```

```
epan/dissectors/packet-ldp.c:1922:19: error: variable 'ix' set but not used [-Werror,-Wunused-but-set-variable]
    guint8        ix;
                  ^
```

```
epan/dissectors/packet-nas_5gs.c:4757:14: error: variable 'curr_len' set but not used [-Werror,-Wunused-but-set-variable]
    guint i, curr_len;
             ^
```

```
epan/dissectors/packet-per.c:1769:6: error: variable 'extension_addition_entries' set but not used [-Werror,-Wunused-but-set-variable]
        int extension_addition_entries;
            ^
```

```
epan/dissectors/packet-rtitcp.c:618:11: error: variable 'messages_count' set but not used [-Werror,-Wunused-but-set-variable]
    guint messages_count, offset;
          ^
```

```
epan/dissectors/packet-tcp.c:2130:9: error: variable 'ackcount' set but not used [-Werror,-Wunused-but-set-variable]
    int ackcount;
        ^
epan/dissectors/packet-tcp.c:3317:12: error: variable 'nbOptionsChanged' set but not used [-Werror,-Wunused-but-set-variable]
    guint8 nbOptionsChanged = 0;
           ^
```

```
epan/dissectors/packet-zbee-zcl-se.c:11802:15: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
    for (gint i = 0; tvb_reported_length_remaining(tvb, *offset) >= 5; i++) {
              ^
```

```
ui/iface_lists.c:142:23: error: variable 'linktype_count' set but not used [-Werror,-Wunused-but-set-variable]
    gint              linktype_count;
                      ^
```

```
ui/voip_calls.c:456:15: error: variable 'item_num' set but not used [-Werror,-Wunused-but-set-variable]
    guint     item_num;
              ^
```

```
file.c:572:17: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
        guint32 count             = 0;
                ^
```

```
file.c:3667:24: warning: cast from 'const unsigned char *' to 'unsigned char *' drops const qualifier [-Wcast-qual]
        pd = (guint8 *)ws_mempbrk_exec(pd, buf_end - pd, pattern, &c_char);
                       ^
```

```
ui/qt/io_graph_dialog.cpp:1932:60: error: variable 'mavg_right' set but not used [-Werror,-Wunused-but-set-variable]
    unsigned int mavg_in_average_count = 0, mavg_left = 0, mavg_right = 0;
                                                           ^
```

```
ui/qt/stats_tree_dialog.cpp:166:9: error: variable 'node_count' set but not used [-Werror,-Wunused-but-set-variable]
    int node_count = 0;
        ^
```

```
ui/qt/models/profile_model.cpp:1142:13: error: variable 'entryCount' set but not used [-Werror,-Wunused-but-set-variable]
        int entryCount = 0;
            ^
```
2022-11-08 13:49:44 -08:00
Gerald Combs b662f565f0 STP: Remove an unused variable.
Fix

```
epan/dissectors/packet-bpdu.c:327:36: error: variable 'msti' set but not used [-Werror,-Wunused-but-set-variable]
  int   total_msti_length, offset, msti, msti_format;
                                   ^
```
2022-11-08 08:54:16 -08:00
John Thacker 526ccef5f4 per: Implement UTF8String properly
UTF8String is not a known-multiplier character string, since the
characters are variable width. That means that a size constraint
in characters doesn't correspond to a fixed number of octets, and
thus that constraints are never PER-visible. (X.691 27.6) That
includes size constraints, extensions, permitted alphabets, etc.
The length determinant is thus the unconstrained type, and always
at least an entire octet instead of ever taking up a smaller
number of bits.

Extract the string as UTF-8 after aligning as necessary, which
will deal with illegal encodings.

Fix #18600.
2022-11-08 07:05:42 -05:00
Dario Lombardo c2b59567d3 tshark: update man to explain why some fields are skipped in elastic-mapping. 2022-11-08 06:24:50 +00:00
Gerald Combs fd92228e54 capture: Remove an unused variable.
Fix

```
capture/ws80211_utils.c:328:6: error: variable 'bandidx' set but not used [-Werror,-Wunused-but-set-variable]
        int bandidx = 1;
            ^
```
2022-11-07 11:24:27 -08:00
John Thacker 3ec1e6ca59 afs: Validate vectorized strings
The RXStringV type has one character (octet) stored per 32
bit word. There's no real indication of the string encoding
(possibly locale dependent, maybe ASCII or UTF-8.) Validate
it as UTF-8 for now, to produce good UTF-8 and handle the latter
two cases.

Fix #18583.
2022-11-07 09:36:52 +00:00
Peter Wu df478a365d dfilter: treat carriage returns as whitespace
Fixes #18595
2022-11-07 01:00:50 +00:00
Stig Bjørlykke 16afad10fb Qt: Fix a deprecated warning
warning: 'parentWidget' is deprecated: Use parent() with qobject_cast()
instead [-Wdeprecated-declarations]
2022-11-06 22:33:25 +00:00
John Thacker f4965d5dec wmem: Make wmem_strbuf_utf8_validate endpptr param optional
Often we don't care about the last valid character, just if
the buffer is valid.
2022-11-06 21:11:36 +00:00
Gerald Combs 0928a25d1f GitLab CI: Switch to clang 15. 2022-11-06 10:33:09 -08:00
Gerald Combs 0bfe5bed72 [Automatic update for 2022-11-06]
Update manuf, services enterprise numbers, translations, and other items.
2022-11-06 17:57:36 +00:00
Pascal Quantin a1feafad6c IPv6: fix embedded IPv4 address dissection when using Well-Known Prefix
See https://www.wireshark.org/lists/wireshark-dev/202211/msg00000.html
2022-11-06 16:57:59 +01:00
Martin Gallo 0562fe46f6 SAPIGS: Added SAP IGS as main dissector 2022-11-06 14:27:25 +00:00
John Thacker 23f54390f1 hl7: Validate encoding
Translate the raw strings from the struct from ASCII before adding
to the columns.

Fix #18598
2022-11-06 06:23:45 -05:00
John Thacker 9a3d091933 mmse: Handle encoding
Use tvb_get_stringz_enc with ENC_ASCII instead of tvb_strsize
and tvb_memdup. Note that, in MMS encoding at least,
OMA-TS-MMS-CONF says that Text-string (where encoding is
not specified) is always US-ASCII.

For Encoded-string-values, get and process the MIBEnum charset,
at least when it's an integer (which OMA-TS-MMS-CONF says it
must be.)

Fix #18575
2022-11-06 05:29:56 -05:00
Martin Mathieson b860351e7f Packet List: preserve horizontal scroll extent for PgUp/PgDn 2022-11-05 21:56:19 +00:00
Michael Tuexen bcbd6c3974 sctp: add support for Zero Checksum Acceptable parameter 2022-11-05 20:27:36 +00:00
John Thacker d2f7b8907c wbxml: Fix encoding
Whenever a string is inline or retrieved from the string table,
it needs to use the document encoding. Not tvb_format_text
(which always assumes UTF-8, though that is the default for WBXML
if we don't know otherwise), and *definitely* not tvb_get_ptr.

Replace a bunch of calls of tvb_strsize and tvb_format_text
(and one tvb_get_ptr) with tvb_get_stringz_enc with the
document encoding, which is now stored in packet level proto
data. (There should be a fallback to parsing it from the
Content-Type string, if the calling dissector provides it.)

Fix #18573
2022-11-05 15:02:16 +00:00
Martin Mathieson 07627f0230 E2AP: peek at RAN function name using tvb_get_stringz_enc 2022-11-05 12:27:44 +00:00
Pascal Quantin ae3f4832c5 Windows: install etwdump extcap utility by default
Now that Microsoft own documentation references this utility,
it probably makes sense to activate it by default
2022-11-04 23:30:56 +00:00
John Thacker f47f114bb2 skinny: Check encoding
The displayLabel type in SCCP (skinny) is ASCII where certain
bytes are replaced with common phrases from a codebook. When
displaying the replaced string, remember to replace the non
ASCII characters with REPLACMENT CHARACTERS.

Fix #18592
2022-11-03 21:36:15 -04:00
John Thacker 73c291029d skinny: Resync xml code with dissector, regenerate
Make changes to packet-skinny.c.in and SkinnyProtocolOptimized.xml
that incorporate changes from 67f05835ca
and 8efad466c4 made to the dissector
manually and regenerate. Also fix a case where a comment mixed
tabs and spaces, which caused the python conversion tool to complain.
2022-11-03 20:55:05 -04:00
John Thacker 8c585cc228 skinny: Convert parse_xml2skinny_dissector.py to Py3
Convert parse_xml2skinny_dissector.py to Python 3.
This is mostly the output of running 2to3, but some of the
uses of dict.keys() were left as is instead of being converted
to lists, since only membership was tested.

The dissector still needs to be regenerated, which will happen
in a next commit, so that this change can be easily backported.
2022-11-03 20:28:19 -04:00
Uli Heilmeier d1e3ef36c5 WSUG: consistent spelling of acknowledgment
Use "acknowledgment" as we have it in the TCP dissector.
2022-11-03 18:37:32 +00:00
Gerald Combs 5084857eed WSUG: Document the layer operator.
Copy over the "layer operator" section from the wireshark-filter man
page.

Fix the "at operator" level in the wireshark-filter man page.
2022-11-03 14:23:12 +00:00
Pascal Quantin 1505fa1b4b addr_resolv: define default port values for DNS resolution UAT
This ensures forward compatibility when using Wireshark 4.x or later
(see #18214)
2022-11-03 12:19:00 +00:00
John Thacker 5fa07d18ec xcsl: Check encoding of characters
Separate the tokens in xcsl using tvb_ws_mempbrk_pattern_guint8
instead of the dissector doing it manually.
Retrieve the ASCII token strings with tvb_get_string_enc to do
conversion to UTF-8.

Fix #18587
2022-11-03 07:19:46 -04:00
Martin Mathieson 49d21db1a7 DBUS: Make a function static 2022-11-03 11:17:56 +00:00
Pascal Quantin 798c1a8e6d EVS: fix frame format detection heuristics
As stated in 3GPP 26.445 chapter A.2.2.1.4.2, RTP padding must be taken
into account to discrimate between Header-Full format and Compact format

Closes #18498
2022-11-03 10:23:40 +00:00
John Thacker df4a0f289c alljoyn: Use a FT_CHAR and value_string for the type id
The type id is a natural FT_CHAR, which is much easier than
using a custom formatting function. This also avoids creating
bogus UTF-8

Fix #18582.
2022-11-02 21:44:36 -04:00
John Thacker 3e0ee841b1 epan: Simplify construct_match_selected_string
Since fvalue_to_string_repr does take the field base
as a parameter and that affects the representation,
an existing comment is no longer true, and we can
get rid of a large amount of duplicative special
handling for integer-based types.
2022-11-02 18:16:59 -04:00
Martin Mathieson 3ac86775dc Fix some spelling errors 2022-11-02 20:54:24 +00:00
John Thacker e449b560c0 epan: Properly generate filter expressions for custom columns
Properly generate filter expressions for custom columns by
using proto_construct_match_selected_string on each value and
then joining them together later instead of trying to split
the column expression value.

This ensures that escaping is done properly for display filter
strings, that commas internal to field values are not confused
with commas between occurrences, that for multifield columns
we can distinguish which field each value matches, etc.

It's not entirely clear whether AND or OR logic is appropriate
for multiple occurrences; currently OR is used.

Bump glib requirement to 2.54 for g_ptr_array_find_with_equal_func
(this doesn't drop support for any major distribution that already
meets our other library requirements, like Qt.)

Fix #18001.
2022-11-02 19:46:11 +00:00
Martin Mathieson c6a0b9b64a E2AP: Add some missing IEs 2022-11-02 16:56:12 +00:00
Emmanuel Grumbach 9339b357ea ieee80211: add a dissector for the protected EHT EML OP MODE notif
This an action frame to update the EMLSR / EMLMR mode.
This adds partial support for this frame.
It is fairly hairy to parse it because of its variable format, so for
now, just parse the EMLSR part and leave the EMLMR part for later.
2022-11-02 14:24:18 +00:00
Pau Espin 12a5c10664 gsm_osmux: Fix AMR_SID frame type payload size
According to TS 26.101, AMR_SID payload is 39 bits.
Hence, (39+7)/8 = 5, rounding to octet boundaries.

This fixes incorrect dissecting of Osmux frames containing AMR_SID
payloads.
2022-11-02 11:40:37 +01:00
Pascal Quantin a1c55f2356 GOOSE: add back goose.floating_point filter
Let's add it as a hidden filter for IEEE 754 single precision floating point

Closes #18491
2022-11-01 19:25:02 +00:00
Roland Knall fd7716542c Qt: Move generic methods to utils
Move the utils for checking for the last used directory and storing
it out of ProfileDialog, as they are not Profiles specific
2022-11-01 18:12:07 +00:00
Chuck Craft 91c0669fb7 Qt: KeyboardInputInterval - allow more relaxed typing for keyboardSearch
Gtk popped up a search box when typing in the tree view.
Most places in Qt, a Search: field was added to the dialog.
Looks possible to buffer keystrokes and do a string search in Qt.

Default value is 400ms (even on Windows). Average typing speed of
200 cpm = 300ms per character = too close to 400ms when searching
the protocol name in Preferences -> Protocols.
2022-11-01 17:39:16 +00:00
Chuck Craft 0bfa32ee6c wsdg: order Lua sections as a user may require them
Roughly follows order in previous chapter of examples.
2022-11-01 17:33:12 +00:00
David Perry 636c2d21ac Allow user-defined labels for Bluetooth UUIDs 2022-11-01 17:30:32 +00:00