Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreadman committed Feb 26, 2025
2 parents 9e9f36d + 5e40fea commit 4a33de9
Show file tree
Hide file tree
Showing 21 changed files with 571 additions and 44 deletions.
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Irene Rüngeler <[email protected]> ruengeler <[email protected]>
Ishaan Gandhi <[email protected]> ishaangandhi <[email protected]>
Ismael Mendez Matamoros <[email protected]> ismaelrti <[email protected]>
Jaap Keuter <[email protected]> Jaap Keuter <[email protected]>
Jaap Keuter <[email protected]> Jaap Keuter <[email protected]>
Jaime Caamaño Ruiz <[email protected]> Jaime Caamaño Ruiz <[email protected]>
Jakub Rotkiewicz <[email protected]> Jakub Rotkiewicz <[email protected]>
Jakub Zawadzki <[email protected]> <[email protected]>
Expand Down
42 changes: 37 additions & 5 deletions doc/README.stats_tree
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ extern tap_packet_status
udp_term_stats_tree_packet(stats_tree *st, /* st as it was passed to us */
packet_info *pinfo, /* we'll fetch the addresses from here */
epan_dissect_t *edt _U_, /* unused */
const void *p) /* we'll use this to fetch the ports */
const void *p, /* we'll use this to fetch the ports */
tap_flags_t flags _U_) /* unused */
{
static uint8_t str[128];
e_udphdr* udphdr = (e_udphdr*) p;
Expand All @@ -97,7 +98,7 @@ WS_DLL_PUBLIC_DEF void plugin_register_tap_listener(void) {

stats_tree_register_plugin("udp", /* the proto we are going to "tap" */
"udp_terms", /* the abbreviation for this tree (to be used as -z udp_terms,tree) */
st_str_udp_term, /* the name of the menu and window (use "/" for sub menus)*/
st_str_udp_term, /* the name of the menu and window (use "//" for sub menus)*/
0, /* tap listener flags for per-packet callback */
udp_term_stats_tree_packet, /* the per packet callback */
udp_term_stats_tree_init, /* the init callback */
Expand All @@ -122,8 +123,37 @@ stats_tree_set_group(st_config, stat_group);
changes the menu statistics group for a stats tree

stats_tree_parent_id_by_name( st, parent_name)
returns the id of a candidate parent node given its name

returns the id of a candidate parent node given its name

flags
is a bitmask set of flags for the tap listener. Generic tap system flags
(TL_*) described in README.tapping can be used, along with stat tree specific
flags that control the default sorting, six for choosing the column and one
for the order:

ST_SORT_COL_NAME
Sort nodes by node names
ST_SORT_COL_COUNT
Sort nodes by node count
ST_SORT_COL_AVG
Sort nodes by node average
ST_SORT_COL_MIN
Sort nodes by minimum node value
ST_SORT_COL_MAX
Sort nodes by maximum node value
ST_SORT_COL_BURSTRATE
Sort nodes by burst rate

ST_FLG_SORT_DESC
Sort nodes in descending order using the chosen column
The default if only a column is given is to use ascending
order

The sort column flags need to be left shifted by ST_FLG_SRTCOL_SHIFT when
registering. If no sort columns flags are given, values from the preferences
(found in the "Statistics" module) are used for both column and order. The
default preferences are to sort in descending order of node count, i.e.,
(ST_SORT_COL_COUNT << ST_FLG_SRTCOL_SHIFT) | ST_FLG_SORT_DESC

Node functions
==============
Expand Down Expand Up @@ -214,7 +244,9 @@ stat_node_clear_flags functions. Currently these flags are defined:
ST_FLG_DEF_NOEXPAND: By default the top-level nodes in a tree are
automatically expanded in the GUI. Setting this flag on
such a node prevents the node from automatically
expanding.
expanding. (However, if there are fewer than some fixed
total number of nodes, currently 100, in the tree, then
all the nodes will be expanded anyway.)
ST_FLG_SORT_TOP: Nodes with this flag is sorted separately from nodes
without this flag (in effect partitioning tree into a top
and bottom half. Each half is sorted normally. Top always
Expand Down
6 changes: 6 additions & 0 deletions doc/Wireshark_Release_Notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ The following features are either new or have been significantly updated since v
* Lua now has a `Conversation` object, which exposes conversations and conversation
data to Lua. Resolves wsbuglink:15396[]

* Supports "Copy in HTML" format via main menu, context menu and keyboard
shortcut. It also provides an option (via knobs in preferences) to copy plain
text with aligned columns along with an ability to select a copy format to be
used when copied via keyboard shortcut.

=== Removed Features and Support

Wireshark no longer supports AirPcap and WinPcap.
Expand All @@ -176,6 +181,7 @@ Wireshark no longer supports AirPcap and WinPcap.
--
Lenbrook Service Discovery Protocol (LSDP)
Network Time Security Key Establishment Protocol (NTS-KE)
Private Line Emulation (PLE)
Roughtime (Roughtime)
SBAS L5 messages
Universal Measurement and Calibration Protocol (XCP)
Expand Down
2 changes: 1 addition & 1 deletion doc/wsug_src/wsug_io.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Offsets are followed by one or more spaces or tabs separating them from the
bytes. Offsets optionally can be followed by a single colon after the digits.
Offsets can be between 3 and 8 digits; hexadecimal base (radix) is assumed by
default, but they can also be in octal or decimal. If offsets are in hex,
they can be preceeded by `0x` or `0X`. Each packet must begin with offset zero,
they can be preceded by `0x` or `0X`. Each packet must begin with offset zero,
and an offset zero indicates the beginning of a new packet. Offset values must
be correct; an unexpected value causes the current packet to be aborted and the
next packet start awaited. There is also a single packet mode with no offsets.
Expand Down
1 change: 1 addition & 0 deletions epan/dissectors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,7 @@ set(DISSECTOR_SRC
${CMAKE_CURRENT_SOURCE_DIR}/packet-pktc.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-pktgen.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-pldm.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-ple.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-pmproxy.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-pnrp.c
${CMAKE_CURRENT_SOURCE_DIR}/packet-pop.c
Expand Down
187 changes: 176 additions & 11 deletions epan/dissectors/packet-bthci_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,18 @@ static int hf_bthci_cmd_override_config_main_mode_steps;
static int hf_bthci_cmd_override_config_channel_list;
static int hf_bthci_cmd_cs_override_param_length;
static int hf_bthci_cmd_cs_override_param_data;
static int hf_bthci_cmd_override_param_channel_length;
static int hf_bthci_cmd_override_param_channels;
static int hf_bthci_cmd_override_param_main_mode_steps;
static int hf_bthci_cmd_override_param_tpm_tone_ext;
static int hf_bthci_cmd_override_param_tone_antenna_permutation;
static int hf_bthci_cmd_override_param_cs_sync_aa_initiator;
static int hf_bthci_cmd_override_param_cs_sync_aa_reflector;
static int hf_bthci_cmd_override_param_ss_marker_1_position;
static int hf_bthci_cmd_override_param_ss_marker_2_position;
static int hf_bthci_cmd_override_param_ss_marker_value;
static int hf_bthci_cmd_override_param_cs_sync_payload_pattern;
static int hf_bthci_cmd_override_param_cs_sync_user_payload;
static int hf_bthci_cmd_adv_monitoring_enable;
static int hf_bthci_cmd_adv_decision_flags;
static int hf_bthci_cmd_adv_decision_flags_resolvable_tag;
Expand Down Expand Up @@ -1233,6 +1245,7 @@ static int ett_cs_capability;
static int ett_cs_times;
static int ett_adv_test_flags;
static int ett_override_config;
static int ett_override_params;
static int ett_spacing_types;

static int proto_btcommon;
Expand Down Expand Up @@ -3155,6 +3168,45 @@ static const value_string cmd_snr_control_vals[] = {
{0, NULL }
};

static const value_string cmd_tone_ext_vals[] = {
{ 0x00, "No tone extension present" },
{ 0x01, "Tone extension present for initiator" },
{ 0x02, "Tone extension present for reflector" },
{ 0x03, "Tone extension present for both" },
{ 0x04, "Loop through all valid tone extension patterns" },
{0, NULL }
};

static const value_string cmd_tone_antenna_permutation_vals[] = {
{ 0xff, "Loop through all valid indices starting from the lowest" },
{0, NULL }
};

static const value_string cmd_ss_marker_2_position_vals[] = {
{ 0xff, "Sounding sequence or second marker is not present" },
{0, NULL }
};

static const value_string cmd_ss_marker_value_vals[] = {
{ 0x00, "Use pattern '0011'" },
{ 0x01, "Use pattern '1100'" },
{ 0x02, "Loop through pattern '0011' and '1100'" },
{0, NULL }
};

static const value_string cmd_cs_sync_payload_pattern_vals[] = {
{ 0x00, "PRBS9 sequence" },
{ 0x01, "Repeated '11110000' sequence" },
{ 0x02, "Repeated '10101010' sequence" },
{ 0x03, "PRBS15 sequence" },
{ 0x04, "Repeated '11111111' sequence" },
{ 0x05, "Repeated '00000000' sequence" },
{ 0x06, "Repeated '00001111' sequence" },
{ 0x07, "Repeated '01010101' sequence" },
{ 0x80, "Use CS_SYNC_User_Payload" },
{0, NULL }
};

static const value_string cs_sync_antenna_special[] = {
{0xfe, "Repetitive order, 1 to 4"},
{0xff, "Host has no recommendation"},
Expand Down Expand Up @@ -6439,6 +6491,7 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
case 0x0095: /* LE CS Test */
{
uint8_t role, rtt_type, length;
uint16_t override_config;
proto_tree_add_item(tree, hf_bthci_cmd_main_mode_type, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item(tree, hf_bthci_cmd_sub_mode_type, tvb, offset, 1, ENC_NA);
Expand Down Expand Up @@ -6487,13 +6540,64 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
offset+=2;
proto_tree_add_item(tree, hf_bthci_cmd_channel_map_repetition, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_override_config, ett_override_config, hfx_bthci_cmd_override_config, ENC_NA);
proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_cmd_cs_override_config, ett_override_config, hfx_bthci_cmd_override_config, ENC_LITTLE_ENDIAN);
override_config = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item(tree, hf_bthci_cmd_cs_override_param_length, tvb, offset, 1, ENC_NA);
length = tvb_get_uint8(tvb, offset);
offset++;
proto_tree_add_item(tree, hf_bthci_cmd_cs_override_param_data, tvb, offset, length, ENC_NA);
offset+=length;
sub_tree = proto_tree_add_subtree(tree, tvb, offset, length, ett_override_params, NULL, "Override Parameter Data");
if (override_config & (1 << 0)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_channel_length, tvb, offset, 1, ENC_NA);
length = tvb_get_uint8(tvb, offset);
offset++;
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_channels, tvb, offset, length, ENC_NA);
offset += length;
}
else {
proto_tree_add_item(sub_tree, hf_bthci_cmd_channel_map, tvb, offset, 10, ENC_NA);
offset += 10;
proto_tree_add_item(sub_tree, hf_bthci_cmd_channel_selection_type, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item(sub_tree, hf_bthci_cmd_ch3c_shape, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item(sub_tree, hf_bthci_cmd_ch3c_jump, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 2)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_main_mode_steps, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 3)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_tpm_tone_ext, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 4)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_tone_antenna_permutation, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 5)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_cs_sync_aa_initiator, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_cs_sync_aa_reflector, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
}
if (override_config & (1 << 6)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_ss_marker_1_position, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_ss_marker_2_position, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 7)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_ss_marker_value, tvb, offset, 1, ENC_NA);
offset++;
}
if (override_config & (1 << 8)) {
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_cs_sync_payload_pattern, tvb, offset, 1, ENC_NA);
offset++;
proto_tree_add_item(sub_tree, hf_bthci_cmd_override_param_cs_sync_user_payload, tvb, offset, 16, ENC_NA);
offset += 16;
}
if (!pinfo->fd->visited) {
/* store CS role and RTT type configuration for later dissection of CS results */
wmem_tree_key_t key[6];
Expand Down Expand Up @@ -9732,12 +9836,12 @@ proto_register_bthci_cmd(void)
},
{ &hf_bthci_cmd_nadm_sounding_capability_supported,
{ "Phase-based NADM Metric", "bthci_cmd.optional_nadm_sounding_capability.supported",
FT_BOOLEAN, 16, NULL, 0x01,
FT_BOOLEAN, 16, NULL, 0x0001,
NULL, HFILL }
},
{ &hf_bthci_cmd_nadm_sounding_capability_reserved,
{ "Reserved", "bthci_cmd.optional_nadm_sounding_capability.reserved",
FT_UINT16, BASE_HEX, NULL, 0xfe,
FT_UINT16, BASE_HEX, NULL, 0x00fe,
NULL, HFILL }
},
{ &hf_bthci_cmd_nadm_random_capability,
Expand All @@ -9747,12 +9851,12 @@ proto_register_bthci_cmd(void)
},
{ &hf_bthci_cmd_nadm_random_capability_supported,
{ "Phase-based NADM Metric", "bthci_cmd.optional_nadm_random_capability.supported",
FT_BOOLEAN, 16, NULL, 0x01,
FT_BOOLEAN, 16, NULL, 0x0001,
NULL, HFILL }
},
{ &hf_bthci_cmd_nadm_random_capability_reserved,
{ "Reserved", "bthci_cmd.optional_nadm_random_capability.reserved",
FT_UINT16, BASE_HEX, NULL, 0xfe,
FT_UINT16, BASE_HEX, NULL, 0x00fe,
NULL, HFILL }
},
{ &hf_bthci_cmd_cs_sync_phys_supported,
Expand Down Expand Up @@ -9782,22 +9886,22 @@ proto_register_bthci_cmd(void)
},
{ &hf_bthci_cmd_cs_subfeatures_companion_signal,
{ "Companion Signal", "bthci_cmd.optional_cs_subfeatures.companion_signal",
FT_BOOLEAN, 16, NULL, 0x01,
FT_BOOLEAN, 16, NULL, 0x0001,
NULL, HFILL }
},
{ &hf_bthci_cmd_cs_subfeatures_freq_actuation_error,
{ "Zero Freq. Actuation Error Relative to Mode-0 Tx in Reflector", "bthci_cmd.optional_cs_subfeatures.freq_actuation_error",
FT_BOOLEAN, 16, NULL, 0x02,
FT_BOOLEAN, 16, NULL, 0x0002,
NULL, HFILL }
},
{ &hf_bthci_cmd_cs_subfeatures_channel_selection_3c,
{ "Channel Selection Algorithm #3c", "bthci_cmd.optional_cs_subfeatures.channel_selection_3c",
FT_BOOLEAN, 16, NULL, 0x04,
FT_BOOLEAN, 16, NULL, 0x0004,
NULL, HFILL }
},
{ &hf_bthci_cmd_cs_subfeatures_pbr_from_rtt,
{ "Phase-based Ranging from RTT sounding sequence", "bthci_cmd.optional_cs_subfeatures.pbr_from_rtt",
FT_BOOLEAN, 16, NULL, 0x08,
FT_BOOLEAN, 16, NULL, 0x0008,
NULL, HFILL }
},
{ &hf_bthci_cmd_cs_subfeatures_reserved,
Expand Down Expand Up @@ -10250,6 +10354,66 @@ proto_register_bthci_cmd(void)
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_channel_length,
{ "Channel Length", "bthci_cmd.override_param_channel_length",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_channels,
{ "Channels", "bthci_cmd.override_param_channels",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_main_mode_steps,
{ "Main Mode Steps", "bthci_cmd.override_param_main_mode_steps",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_tpm_tone_ext,
{ "Tone Extension", "bthci_cmd.override_param_tpm_tone_ext",
FT_UINT8, BASE_DEC, VALS(cmd_tone_ext_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_tone_antenna_permutation,
{ "Tone Antenna Permutation", "bthci_cmd.override_param_tone_antenna_permutation",
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(cmd_tone_antenna_permutation_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_cs_sync_aa_initiator,
{ "CS SYNC AA Initiator", "bthci_cmd.override_param_cs_sync_aa_initiator",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_cs_sync_aa_reflector,
{ "CS SYNC AA Reflector", "bthci_cmd.override_param_cs_sync_aa_reflector",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_ss_marker_1_position,
{ "SS Marker 1 Position", "bthci_cmd.override_param_ss_marker_1_position",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_ss_marker_2_position,
{ "SS Marker 2 Position", "bthci_cmd.override_param_ss_marker_2_position",
FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(cmd_ss_marker_2_position_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_ss_marker_value,
{ "SS Marker Value", "bthci_cmd.override_param_ss_marker_value",
FT_UINT8, BASE_DEC, VALS(cmd_ss_marker_value_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_cs_sync_payload_pattern,
{ "CS SYNC Payload Pattern", "bthci_cmd.override_param_cs_sync_payload_pattern",
FT_UINT8, BASE_DEC, VALS(cmd_cs_sync_payload_pattern_vals), 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_override_param_cs_sync_user_payload,
{ "CS SYNC User Payload", "bthci_cmd.override_param_cs_sync_user_payload",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_bthci_cmd_adv_monitoring_enable,
{ "Advertiser Monitoring Enable", "bthci_cmd.adv_monitoring_enable",
FT_UINT8, BASE_HEX, VALS(cmd_boolean), 0x0,
Expand Down Expand Up @@ -10900,6 +11064,7 @@ proto_register_bthci_cmd(void)
&ett_cs_times,
&ett_adv_test_flags,
&ett_override_config,
&ett_override_params,
&ett_spacing_types
};

Expand Down
Loading

0 comments on commit 4a33de9

Please sign in to comment.