Address more warnings from check_typed_item_calls.py

This commit is contained in:
Martin Mathieson 2023-03-12 22:39:24 +00:00 committed by Martin Mathieson
parent 512a1ca2b3
commit 1a29060159
37 changed files with 174 additions and 139 deletions

View File

@ -1893,7 +1893,7 @@ dissect_acdr_mii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
private_data.mii_header_exist = acdr_data->medium_mii; private_data.mii_header_exist = acdr_data->medium_mii;
} }
packet_item = proto_tree_add_item(tree, proto_ac5xmii, tvb, 0, -1, FALSE); packet_item = proto_tree_add_item(tree, proto_ac5xmii, tvb, 0, -1, ENC_NA);
packet_tree = proto_item_add_subtree(packet_item, ett_ac5x_mii_packet); packet_tree = proto_item_add_subtree(packet_item, ett_ac5x_mii_packet);
col_clear(pinfo->cinfo, COL_INFO); col_clear(pinfo->cinfo, COL_INFO);

View File

@ -2405,10 +2405,15 @@ static int dissect_aim_generic_ext_status_repl(tvbuff_t *tvb, packet_info *pinfo
{ {
guint8 length; guint8 length;
int offset = 0; int offset = 0;
proto_tree_add_item(gen_tree, hf_generic_ext_status_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(gen_tree, hf_generic_ext_status_type, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(gen_tree, hf_generic_ext_status_flags, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; offset += 2;
proto_tree_add_item(gen_tree, hf_generic_ext_status_length, tvb, offset, 1, ENC_BIG_ENDIAN); length = tvb_get_guint8(tvb, offset); offset += 1; proto_tree_add_item(gen_tree, hf_generic_ext_status_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(gen_tree, hf_generic_ext_status_data, tvb, offset, length, ENC_NA); offset += 1; offset += 1;
proto_tree_add_item(gen_tree, hf_generic_ext_status_length, tvb, offset, 1, ENC_BIG_ENDIAN);
length = tvb_get_guint8(tvb, offset);
offset += 1;
proto_tree_add_item(gen_tree, hf_generic_ext_status_data, tvb, offset, length, ENC_NA);
offset += 1;
return offset; return offset;
} }

View File

@ -497,7 +497,7 @@ dissect_amp_as_subtree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
if ( (ariFlags & 0x0F) != 0x03 ) if ( (ariFlags & 0x0F) != 0x03 )
{ {
// ARI is NOT Literal // ARI is NOT Literal
proto_tree_add_item(amp_report_tree, hf_amp_report_bytestring, tvb, offset+1, (int) tmpObj3.uint-1, 0x00); proto_tree_add_item(amp_report_tree, hf_amp_report_bytestring, tvb, offset+1, (int) tmpObj3.uint-1, ENC_NA);
} }
old_offset = offset; old_offset = offset;
offset += (int) tmpObj3.uint; offset += (int) tmpObj3.uint;

View File

@ -4351,25 +4351,25 @@ dissect_r3_upstreammfgfield_cpuregisters (tvbuff_t *tvb, guint32 start_offset, g
cr_tree = proto_tree_add_subtree(tree, tvb, start_offset, -1, ett_r3cpuregisters, NULL, "CPU Registers"); cr_tree = proto_tree_add_subtree(tree, tvb, start_offset, -1, ett_r3cpuregisters, NULL, "CPU Registers");
tmp_tree [ 0] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_intcon, tvb, 0, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 0] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_intcon, tvb, 0, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 1] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_intcon2, tvb, 1, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 1] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_intcon2, tvb, 1, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 2] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_intcon3, tvb, 2, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 2] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_intcon3, tvb, 2, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 3] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pir1, tvb, 3, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 3] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pir1, tvb, 3, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 4] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pir2, tvb, 4, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 4] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pir2, tvb, 4, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 5] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pir3, tvb, 5, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 5] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pir3, tvb, 5, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 6] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pie1, tvb, 6, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 6] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pie1, tvb, 6, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 7] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pie2, tvb, 7, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 7] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pie2, tvb, 7, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 8] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_pie3, tvb, 8, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 8] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_pie3, tvb, 8, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [ 9] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_ipr1, tvb, 9, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [ 9] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_ipr1, tvb, 9, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [10] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_ipr2, tvb, 10, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [10] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_ipr2, tvb, 10, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [11] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_ipr3, tvb, 11, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [11] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_ipr3, tvb, 11, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [12] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_rcon, tvb, 12, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [12] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_rcon, tvb, 12, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [13] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_osccon, tvb, 13, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [13] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_osccon, tvb, 13, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [14] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_rcsta, tvb, 14, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [14] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_rcsta, tvb, 14, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [15] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_txsta, tvb, 15, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [15] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_txsta, tvb, 15, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [16] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_rcsta2, tvb, 16, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [16] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_rcsta2, tvb, 16, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [17] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_txsta2, tvb, 17, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [17] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_txsta2, tvb, 17, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
tmp_tree [18] = proto_item_add_subtree (proto_tree_add_item (cr_tree, hf_r3_cpuregisters_wdtcon, tvb, 18, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister); tmp_tree [18] = proto_item_add_subtree (proto_tree_add_item(cr_tree, hf_r3_cpuregisters_wdtcon, tvb, 18, 1, ENC_LITTLE_ENDIAN), ett_r3cpuregister);
proto_tree_add_item (tmp_tree [ 0], hf_r3_cpuregisters_intcon_rbif, tvb, 0, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item (tmp_tree [ 0], hf_r3_cpuregisters_intcon_rbif, tvb, 0, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item (tmp_tree [ 0], hf_r3_cpuregisters_intcon_int0if, tvb, 0, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item (tmp_tree [ 0], hf_r3_cpuregisters_intcon_int0if, tvb, 0, 1, ENC_LITTLE_ENDIAN);

View File

@ -827,8 +827,9 @@ proto_item * proto_tree_add_cbor_eid(proto_tree *tree, int hfindex, int hfindex_
return item_eid; return item_eid;
} }
static void proto_tree_add_dtn_time(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, gint *offset, bp_dtn_time_t *out) { static void dissect_dtn_time(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, gint *offset, bp_dtn_time_t *out)
proto_item *item_time = proto_tree_add_item(tree, hfindex, tvb, *offset, -1, 0); {
proto_item *item_time = proto_tree_add_item(tree, hfindex, tvb, *offset, -1, ENC_NA);
proto_tree *tree_time = proto_item_add_subtree(item_time, ett_time); proto_tree *tree_time = proto_item_add_subtree(item_time, ett_time);
const gint offset_start = *offset; const gint offset_start = *offset;
@ -875,8 +876,9 @@ static void proto_tree_add_dtn_time(proto_tree *tree, int hfindex, packet_info *
* @param[in,out] offset Starting offset within @c tvb. * @param[in,out] offset Starting offset within @c tvb.
* @param[out] ts If non-null, the timestamp to write to. * @param[out] ts If non-null, the timestamp to write to.
*/ */
static void proto_tree_add_cbor_timestamp(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, gint *offset, bp_creation_ts_t *ts) { static void dissect_cbor_timestamp(proto_tree *tree, int hfindex, packet_info *pinfo, tvbuff_t *tvb, gint *offset, bp_creation_ts_t *ts)
proto_item *item_ts = proto_tree_add_item(tree, hfindex, tvb, *offset, -1, 0); {
proto_item *item_ts = proto_tree_add_item(tree, hfindex, tvb, *offset, -1, ENC_NA);
proto_tree *tree_ts = proto_item_add_subtree(item_ts, ett_create_ts); proto_tree *tree_ts = proto_item_add_subtree(item_ts, ett_create_ts);
wscbor_chunk_t *chunk_ts = wscbor_chunk_read(wmem_packet_scope(), tvb, offset); wscbor_chunk_t *chunk_ts = wscbor_chunk_read(wmem_packet_scope(), tvb, offset);
@ -884,7 +886,7 @@ static void proto_tree_add_cbor_timestamp(proto_tree *tree, int hfindex, packet_
wscbor_chunk_mark_errors(pinfo, item_ts, chunk_ts); wscbor_chunk_mark_errors(pinfo, item_ts, chunk_ts);
if (!wscbor_skip_if_errors(wmem_packet_scope(), tvb, offset, chunk_ts)) { if (!wscbor_skip_if_errors(wmem_packet_scope(), tvb, offset, chunk_ts)) {
bp_dtn_time_t abstime; bp_dtn_time_t abstime;
proto_tree_add_dtn_time(tree_ts, hf_create_ts_time, pinfo, tvb, offset, &abstime); dissect_dtn_time(tree_ts, hf_create_ts_time, pinfo, tvb, offset, &abstime);
wscbor_chunk_t *chunk = wscbor_chunk_read(wmem_packet_scope(), tvb, offset); wscbor_chunk_t *chunk = wscbor_chunk_read(wmem_packet_scope(), tvb, offset);
const guint64 *seqno = wscbor_require_uint64(wmem_file_scope(), chunk); const guint64 *seqno = wscbor_require_uint64(wmem_file_scope(), chunk);
@ -906,7 +908,8 @@ static void proto_tree_add_cbor_timestamp(proto_tree *tree, int hfindex, packet_
* @param[in,out] item_type The item associated with the type field. * @param[in,out] item_type The item associated with the type field.
* @param[in,out] item_parent The parent item to label. * @param[in,out] item_parent The parent item to label.
*/ */
static void label_type_field(const guint64 *type_code, dissector_handle_t type_dissect, proto_item *item_type, proto_item *item_parent) { static void label_type_field(const guint64 *type_code, dissector_handle_t type_dissect, proto_item *item_type, proto_item *item_parent)
{
if (!item_type || !item_parent) { if (!item_type || !item_parent) {
return; return;
} }
@ -1060,7 +1063,7 @@ static gint dissect_block_primary(tvbuff_t *tvb, packet_info *pinfo, proto_tree
field_ix++; field_ix++;
// Complex type // Complex type
proto_tree_add_cbor_timestamp(tree_block, hf_primary_create_ts, pinfo, tvb, &offset, &(block->ts)); dissect_cbor_timestamp(tree_block, hf_primary_create_ts, pinfo, tvb, &offset, &(block->ts));
field_ix++; field_ix++;
chunk = wscbor_chunk_read(wmem_packet_scope(), tvb, &offset); chunk = wscbor_chunk_read(wmem_packet_scope(), tvb, &offset);
@ -1666,8 +1669,9 @@ static int dissect_bp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
return offset; return offset;
} }
static gboolean proto_tree_add_status_assertion(proto_tree *tree, int hfassert, packet_info *pinfo, tvbuff_t *tvb, gint *offset) { static gboolean dissect_status_assertion(proto_tree *tree, int hfassert, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
proto_item *item_assert = proto_tree_add_item(tree, hfassert, tvb, *offset, -1, 0); {
proto_item *item_assert = proto_tree_add_item(tree, hfassert, tvb, *offset, -1, ENC_NA);
gboolean result = FALSE; gboolean result = FALSE;
@ -1686,7 +1690,7 @@ static gboolean proto_tree_add_status_assertion(proto_tree *tree, int hfassert,
if (chunk_assert->head_value > 1) { if (chunk_assert->head_value > 1) {
bp_dtn_time_t abstime; bp_dtn_time_t abstime;
proto_tree_add_dtn_time(tree_assert, hf_status_assert_time, pinfo, tvb, offset, &abstime); dissect_dtn_time(tree_assert, hf_status_assert_time, pinfo, tvb, offset, &abstime);
} }
} }
@ -1767,10 +1771,10 @@ static int dissect_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (!wscbor_skip_if_errors(wmem_packet_scope(), tvb, &offset, chunk_info)) { if (!wscbor_skip_if_errors(wmem_packet_scope(), tvb, &offset, chunk_info)) {
proto_tree *tree_info = proto_item_add_subtree(item_info, ett_status_info); proto_tree *tree_info = proto_item_add_subtree(item_info, ett_status_info);
status_received = proto_tree_add_status_assertion(tree_info, hf_status_rep_received, pinfo, tvb, &offset); status_received = dissect_status_assertion(tree_info, hf_status_rep_received, pinfo, tvb, &offset);
status_forwarded = proto_tree_add_status_assertion(tree_info, hf_status_rep_forwarded, pinfo, tvb, &offset); status_forwarded = dissect_status_assertion(tree_info, hf_status_rep_forwarded, pinfo, tvb, &offset);
status_delivered = proto_tree_add_status_assertion(tree_info, hf_status_rep_delivered, pinfo, tvb, &offset); status_delivered = dissect_status_assertion(tree_info, hf_status_rep_delivered, pinfo, tvb, &offset);
status_deleted = proto_tree_add_status_assertion(tree_info, hf_status_rep_deleted, pinfo, tvb, &offset); status_deleted = dissect_status_assertion(tree_info, hf_status_rep_deleted, pinfo, tvb, &offset);
} }
proto_item_set_len(item_info, offset - chunk_info->start); proto_item_set_len(item_info, offset - chunk_info->start);
@ -1787,7 +1791,7 @@ static int dissect_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
status_field_ix++; status_field_ix++;
bp_creation_ts_t subj_ts; bp_creation_ts_t subj_ts;
proto_tree_add_cbor_timestamp(tree_status, hf_status_rep_subj_ts, pinfo, tvb, &offset, &subj_ts); dissect_cbor_timestamp(tree_status, hf_status_rep_subj_ts, pinfo, tvb, &offset, &subj_ts);
status_field_ix++; status_field_ix++;
bp_bundle_ident_t *subj = bp_bundle_ident_new(wmem_file_scope(), subj_eid, &subj_ts, NULL, NULL); bp_bundle_ident_t *subj = bp_bundle_ident_new(wmem_file_scope(), subj_eid, &subj_ts, NULL, NULL);

View File

@ -1575,49 +1575,49 @@ proto_register_cast(void)
{ &hf_cast_partyPIRestrictionBits_CallingPartyName, { &hf_cast_partyPIRestrictionBits_CallingPartyName,
{ "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName", { "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x01, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_CallingPartyNumber, { &hf_cast_partyPIRestrictionBits_CallingPartyNumber,
{ "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber", { "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x02, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_CalledPartyName, { &hf_cast_partyPIRestrictionBits_CalledPartyName,
{ "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName", { "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x04, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_CalledPartyNumber, { &hf_cast_partyPIRestrictionBits_CalledPartyNumber,
{ "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber", { "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x08, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000008,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName, { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName,
{ "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName", { "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000010,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber, { &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber,
{ "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber", { "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000020,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyName, { &hf_cast_partyPIRestrictionBits_LastRedirectPartyName,
{ "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName", { "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000040,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber, { &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber,
{ "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber", { "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80, FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000080,
NULL, HFILL } NULL, HFILL }
}, },

View File

@ -1078,7 +1078,7 @@ proto_register_cp2179(void)
{ &hf_cp2179_rtu_address, { &hf_cp2179_rtu_address,
{ "RTU Address", "cp2179.RTUAddress", { "RTU Address", "cp2179.RTUAddress",
FT_UINT16, BASE_DEC, FT_UINT16, BASE_DEC,
NULL, 0x7FF, NULL, 0x07FF,
NULL, HFILL } NULL, HFILL }
}, },

View File

@ -1829,57 +1829,57 @@ void dcerpc_smb_init(int proto_dcerpc)
{ &hf_nt_acb_disabled, { &hf_nt_acb_disabled,
{ "Account disabled", "dcerpc.nt.acb.disabled", FT_BOOLEAN, 32, { "Account disabled", "dcerpc.nt.acb.disabled", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_disabled), 0x0001, TFS(&tfs_nt_acb_disabled), 0x00000001,
"If this account is enabled or disabled", HFILL }}, "If this account is enabled or disabled", HFILL }},
{ &hf_nt_acb_homedirreq, { &hf_nt_acb_homedirreq,
{ "Home dir required", "dcerpc.nt.acb.homedirreq", FT_BOOLEAN, 32, { "Home dir required", "dcerpc.nt.acb.homedirreq", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_homedirreq), 0x0002, TFS(&tfs_nt_acb_homedirreq), 0x00000002,
"Is homedirs required for this account?", HFILL }}, "Is homedirs required for this account?", HFILL }},
{ &hf_nt_acb_pwnotreq, { &hf_nt_acb_pwnotreq,
{ "Password required", "dcerpc.nt.acb.pwnotreq", FT_BOOLEAN, 32, { "Password required", "dcerpc.nt.acb.pwnotreq", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_pwnotreq), 0x0004, TFS(&tfs_nt_acb_pwnotreq), 0x00000004,
"If a password is required for this account?", HFILL }}, "If a password is required for this account?", HFILL }},
{ &hf_nt_acb_tempdup, { &hf_nt_acb_tempdup,
{ "Temporary duplicate account", "dcerpc.nt.acb.tempdup", FT_BOOLEAN, 32, { "Temporary duplicate account", "dcerpc.nt.acb.tempdup", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_tempdup), 0x0008, TFS(&tfs_nt_acb_tempdup), 0x00000008,
"If this is a temporary duplicate account", HFILL }}, "If this is a temporary duplicate account", HFILL }},
{ &hf_nt_acb_normal, { &hf_nt_acb_normal,
{ "Normal user account", "dcerpc.nt.acb.normal", FT_BOOLEAN, 32, { "Normal user account", "dcerpc.nt.acb.normal", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_normal), 0x0010, TFS(&tfs_nt_acb_normal), 0x00000010,
"If this is a normal user account", HFILL }}, "If this is a normal user account", HFILL }},
{ &hf_nt_acb_mns, { &hf_nt_acb_mns,
{ "MNS logon user account", "dcerpc.nt.acb.mns", FT_BOOLEAN, 32, { "MNS logon user account", "dcerpc.nt.acb.mns", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_mns), 0x0020, TFS(&tfs_nt_acb_mns), 0x00000020,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_nt_acb_domtrust, { &hf_nt_acb_domtrust,
{ "Interdomain trust account", "dcerpc.nt.acb.domtrust", FT_BOOLEAN, 32, { "Interdomain trust account", "dcerpc.nt.acb.domtrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_domtrust), 0x0040, TFS(&tfs_nt_acb_domtrust), 0x00000040,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_nt_acb_wstrust, { &hf_nt_acb_wstrust,
{ "Workstation trust account", "dcerpc.nt.acb.wstrust", FT_BOOLEAN, 32, { "Workstation trust account", "dcerpc.nt.acb.wstrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_wstrust), 0x0080, TFS(&tfs_nt_acb_wstrust), 0x00000080,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_nt_acb_svrtrust, { &hf_nt_acb_svrtrust,
{ "Server trust account", "dcerpc.nt.acb.svrtrust", FT_BOOLEAN, 32, { "Server trust account", "dcerpc.nt.acb.svrtrust", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_svrtrust), 0x0100, TFS(&tfs_nt_acb_svrtrust), 0x00000100,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_nt_acb_pwnoexp, { &hf_nt_acb_pwnoexp,
{ "Password expires", "dcerpc.nt.acb.pwnoexp", FT_BOOLEAN, 32, { "Password expires", "dcerpc.nt.acb.pwnoexp", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_pwnoexp), 0x0200, TFS(&tfs_nt_acb_pwnoexp), 0x00000200,
"If this account expires or not", HFILL }}, "If this account expires or not", HFILL }},
{ &hf_nt_acb_autolock, { &hf_nt_acb_autolock,
{ "Account is autolocked", "dcerpc.nt.acb.autolock", FT_BOOLEAN, 32, { "Account is autolocked", "dcerpc.nt.acb.autolock", FT_BOOLEAN, 32,
TFS(&tfs_nt_acb_autolock), 0x0400, TFS(&tfs_nt_acb_autolock), 0x00000400,
"If this account has been autolocked", HFILL }}, "If this account has been autolocked", HFILL }},
{ &hf_nt_error, { &hf_nt_error,

View File

@ -6812,9 +6812,9 @@ proto_register_dcerpc(void)
{ &hf_dcerpc_cn_bind_trans_btfn, /* [MS-RPCE] 2.2.2.14 */ { &hf_dcerpc_cn_bind_trans_btfn, /* [MS-RPCE] 2.2.2.14 */
{"Bind Time Features", "dcerpc.cn_bind_trans_btfn", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }}, {"Bind Time Features", "dcerpc.cn_bind_trans_btfn", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
{ &hf_dcerpc_cn_bind_trans_btfn_01, { &hf_dcerpc_cn_bind_trans_btfn_01,
{ "Security Context Multiplexing Supported", "dcerpc.cn_bind_trans_btfn.01", FT_BOOLEAN, 16, NULL, 0x01, NULL, HFILL }}, { "Security Context Multiplexing Supported", "dcerpc.cn_bind_trans_btfn.01", FT_BOOLEAN, 16, NULL, 0x0001, NULL, HFILL }},
{ &hf_dcerpc_cn_bind_trans_btfn_02, { &hf_dcerpc_cn_bind_trans_btfn_02,
{ "Keep Connection On Orphan Supported", "dcerpc.cn_bind_trans_btfn.02", FT_BOOLEAN, 16, NULL, 0x02, NULL, HFILL }}, { "Keep Connection On Orphan Supported", "dcerpc.cn_bind_trans_btfn.02", FT_BOOLEAN, 16, NULL, 0x0002, NULL, HFILL }},
{ &hf_dcerpc_cn_alloc_hint, { &hf_dcerpc_cn_alloc_hint,
{ "Alloc hint", "dcerpc.cn_alloc_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { "Alloc hint", "dcerpc.cn_alloc_hint", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_cn_sec_addr_len, { &hf_dcerpc_cn_sec_addr_len,

View File

@ -1258,7 +1258,7 @@ proto_register_dec_rt(void)
NULL, HFILL }}, NULL, HFILL }},
{ &hf_dec_rt_segnum, { &hf_dec_rt_segnum,
{ "Message number", "dec_dna.nsp.segnum", { "Message number", "dec_dna.nsp.segnum",
FT_UINT16, BASE_DEC, NULL, 0xfff, FT_UINT16, BASE_DEC, NULL, 0x0fff,
"Segment number", HFILL }}, "Segment number", HFILL }},
{ &hf_dec_rt_delay, { &hf_dec_rt_delay,
{ "Delayed ACK allowed", "dec_dna.nsp.delay", { "Delayed ACK allowed", "dec_dna.nsp.delay",

View File

@ -9591,7 +9591,7 @@ proto_register_dhcp(void)
"Option 123: Altitude type", HFILL }}, "Option 123: Altitude type", HFILL }},
{ &hf_dhcp_option_rfc3825_map_datum, { &hf_dhcp_option_rfc3825_map_datum,
{ "Map Datum", "dhcp.option.cl_dss_id.option", { "Map Datum", "dhcp.option.rfc3825.map_datum",
FT_UINT8, BASE_DEC, VALS(map_datum_type_values), 0x0, FT_UINT8, BASE_DEC, VALS(map_datum_type_values), 0x0,
"Option 123: Map Datum", HFILL }}, "Option 123: Map Datum", HFILL }},

View File

@ -4169,7 +4169,7 @@ proto_register_diameter_3gpp(void)
}, },
{ &hf_diameter_3gpp_qos_signalling_ind, { &hf_diameter_3gpp_qos_signalling_ind,
{ "Signalling indication", "diameter.3gpp.qos.signalling_ind", { "Signalling indication", "diameter.3gpp.qos.signalling_ind",
FT_BOOLEAN, SEP_DOT, TFS(&diameter_3gpp_qos_signalling_ind_value), 0x10, FT_BOOLEAN, 8, TFS(&diameter_3gpp_qos_signalling_ind_value), 0x10,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_diameter_3gpp_qos_max_bitrate_downl_ext, { &hf_diameter_3gpp_qos_max_bitrate_downl_ext,
@ -4194,7 +4194,7 @@ proto_register_diameter_3gpp(void)
}, },
{ &hf_diameter_3gpp_qos_pre_emption_vulnerability, { &hf_diameter_3gpp_qos_pre_emption_vulnerability,
{ "Pre-emption vulnerability", "diameter.3gpp.qos.pre_emption_vulnerability", { "Pre-emption vulnerability", "diameter.3gpp.qos.pre_emption_vulnerability",
FT_BOOLEAN, SEP_DOT, TFS(&tfs_set_notset), 0x01, FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_diameter_3gpp_qos_priority_level, { &hf_diameter_3gpp_qos_priority_level,
@ -4204,7 +4204,7 @@ proto_register_diameter_3gpp(void)
}, },
{ &hf_diameter_3gpp_qos_pre_emption_capability, { &hf_diameter_3gpp_qos_pre_emption_capability,
{ "Pre-emption capability", "diameter.3gpp.qos.pre_emption_capability", { "Pre-emption capability", "diameter.3gpp.qos.pre_emption_capability",
FT_BOOLEAN, SEP_DOT, TFS(&tfs_set_notset), 0x40, FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x40,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_diameter_3gpp_ulr_flags, { &hf_diameter_3gpp_ulr_flags,

View File

@ -3492,7 +3492,7 @@ void proto_register_dvb_s2_table(void)
}, },
{&hf_dvb_s2_tdt_hour, { {&hf_dvb_s2_tdt_hour, {
"Hour", "dvb-s2_table.hour", "Hour", "dvb-s2_table.hour",
FT_UINT8, BASE_HEX, NULL, 0x0, FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL} NULL, HFILL}
}, },
{&hf_dvb_s2_tdt_minute, { {&hf_dvb_s2_tdt_minute, {

View File

@ -1410,7 +1410,7 @@ dissect_cat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_delivery_erroneous_sdus, tvb, pos+14, 1, ENC_BIG_ENDIAN); proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_delivery_erroneous_sdus, tvb, pos+14, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_transfer_delay, tvb, pos+15, 1, ENC_BIG_ENDIAN); proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_transfer_delay, tvb, pos+15, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_traffic_handling_prio, tvb, pos+16, 1, ENC_BIG_ENDIAN); proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_traffic_handling_prio, tvb, pos+16, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_pdp_type, tvb, pos+1, 17, ENC_BIG_ENDIAN); proto_tree_add_item(elem_tree, hf_ctlv_bearer_utran_pdp_type, tvb, pos+1, 1, ENC_BIG_ENDIAN);
break; break;
case 0x0a: case 0x0a:
break; break;

View File

@ -2103,7 +2103,7 @@ proto_register_fcels (void)
{"Vendor Unique", "fcels.rjt.vnduniq", FT_UINT8, BASE_HEX, NULL, {"Vendor Unique", "fcels.rjt.vnduniq", FT_UINT8, BASE_HEX, NULL,
0x0, NULL, HFILL}}, 0x0, NULL, HFILL}},
{ &hf_fcels_b2b, { &hf_fcels_b2b,
{"B2B Credit", "fcels.logi.b2b", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, {"B2B Credit", "fcels.logi.b2b", FT_UINT16, BASE_DEC, NULL, 0x0, NULL,
HFILL}}, HFILL}},
{ &hf_fcels_cmnfeatures, { &hf_fcels_cmnfeatures,
{"Common Svc Parameters", "fcels.logi.cmnfeatures", FT_UINT16, BASE_HEX, NULL, {"Common Svc Parameters", "fcels.logi.cmnfeatures", FT_UINT16, BASE_HEX, NULL,
@ -2121,7 +2121,7 @@ proto_register_fcels (void)
{"Relative Offset By Info Cat", "fcels.logi.reloff", FT_UINT16, BASE_DEC, {"Relative Offset By Info Cat", "fcels.logi.reloff", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL}}, NULL, 0x0, NULL, HFILL}},
{ &hf_fcels_edtov, { &hf_fcels_edtov,
{"E_D_TOV", "fcels.edtov", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, {"E_D_TOV", "fcels.edtov", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{ &hf_fcels_npname, { &hf_fcels_npname,
{"N_Port Port_Name", "fcels.npname", FT_FCWWN, BASE_NONE, NULL, 0x0, {"N_Port Port_Name", "fcels.npname", FT_FCWWN, BASE_NONE, NULL, 0x0,
NULL, HFILL}}, NULL, HFILL}},
@ -2155,13 +2155,13 @@ proto_register_fcels (void)
{"Class Recv Size", "fcels.logi.clsrcvsize", FT_UINT16, BASE_DEC, NULL, {"Class Recv Size", "fcels.logi.clsrcvsize", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL}}, 0x0, NULL, HFILL}},
{ &hf_fcels_conseq, { &hf_fcels_conseq,
{"Total Concurrent Seq", "fcels.logi.totconseq", FT_UINT8, BASE_DEC, NULL, {"Total Concurrent Seq", "fcels.logi.totconseq", FT_UINT16, BASE_DEC, NULL,
0x0, NULL, HFILL}}, 0x0, NULL, HFILL}},
{ &hf_fcels_e2e, { &hf_fcels_e2e,
{"End2End Credit", "fcels.logi.e2e", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, {"End2End Credit", "fcels.logi.e2e", FT_UINT16, BASE_DEC, NULL, 0x0, NULL,
HFILL}}, HFILL}},
{ &hf_fcels_openseq, { &hf_fcels_openseq,
{"Open Seq Per Exchg", "fcels.logi.openseq", FT_UINT8, BASE_DEC, NULL, 0x0, {"Open Seq Per Exchg", "fcels.logi.openseq", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}}, NULL, HFILL}},
{ &hf_fcels_nportid, { &hf_fcels_nportid,
{"Originator S_ID", "fcels.portid", FT_BYTES, SEP_DOT, NULL, 0x0, {"Originator S_ID", "fcels.portid", FT_BYTES, SEP_DOT, NULL, 0x0,

View File

@ -1023,7 +1023,7 @@ static int dissect_gdt(tvbuff_t *tvb,
/* create the gdt protocol tree */ /* create the gdt protocol tree */
if (tree) { if (tree) {
gdt_item = proto_tree_add_item(tree, proto_gdt, tvb, 0, -1, FALSE); gdt_item = proto_tree_add_item(tree, proto_gdt, tvb, 0, -1, ENC_NA);
gdt_tree = proto_item_add_subtree(gdt_item, ett_gdt); gdt_tree = proto_item_add_subtree(gdt_item, ett_gdt);
dissect_GDTMessage_PDU(tvb, pinfo, gdt_tree, 0); dissect_GDTMessage_PDU(tvb, pinfo, gdt_tree, 0);
} }

View File

@ -48157,7 +48157,7 @@ proto_register_ieee80211(void)
{&hf_ieee80211_qbss_adc, {&hf_ieee80211_qbss_adc,
{"Available Admission Capacity", "wlan.qbss.adc", {"Available Admission Capacity", "wlan.qbss.adc",
FT_UINT8, BASE_DEC, NULL, 0, FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }}, NULL, HFILL }},
{&hf_ieee80211_qbss2_cu, {&hf_ieee80211_qbss2_cu,

View File

@ -240,7 +240,7 @@ dissect_ippusb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if (is_http_header(first_linelen, first_line) && last == TAG_END_OF_ATTRIBUTES && status_code != PRINT_JOB && status_code != SEND_DOCUMENT) { if (is_http_header(first_linelen, first_line) && last == TAG_END_OF_ATTRIBUTES && status_code != PRINT_JOB && status_code != SEND_DOCUMENT) {
/* An indiviual ippusb packet with http header */ /* An indiviual ippusb packet with http header */
proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, 0); proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, ENC_NA);
if (ippusb_last_pdu >= 0 && !pinfo->fd->visited) { if (ippusb_last_pdu >= 0 && !pinfo->fd->visited) {
ippusb_last_pdu = -1; ippusb_last_pdu = -1;
@ -257,7 +257,7 @@ dissect_ippusb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
gboolean save_fragmented = pinfo->fragmented; gboolean save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE; pinfo->fragmented = TRUE;
proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, 0); proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, ENC_NA);
if (is_http_header(first_linelen, first_line)) { if (is_http_header(first_linelen, first_line)) {
/* The start of a new packet that will need to be reassembled */ /* The start of a new packet that will need to be reassembled */
@ -355,7 +355,7 @@ dissect_ippusb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
if (current_msp && !current_msp->finished && current_msp->nxtpdu == 0) { if (current_msp && !current_msp->finished && current_msp->nxtpdu == 0) {
/* This is a packet that was not completed and assembly will be attempted */ /* This is a packet that was not completed and assembly will be attempted */
proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, 0); proto_tree_add_item(tree, proto_ippusb, tvb, offset, -1, ENC_NA);
fragment_head *head; fragment_head *head;
if (!current_msp->reassembled) { if (!current_msp->reassembled) {

View File

@ -2868,7 +2868,7 @@ proto_register_iscsi(void)
}, },
{ &hf_iscsi_ISID_Qualifier, { &hf_iscsi_ISID_Qualifier,
{ "ISID_Qualifier", "iscsi.isid.qualifier", { "ISID_Qualifier", "iscsi.isid.qualifier",
FT_UINT8, BASE_HEX, NULL, 0, FT_UINT16, BASE_HEX, NULL, 0,
"Initiator part of session identifier - qualifier", HFILL } "Initiator part of session identifier - qualifier", HFILL }
}, },
/* #else */ /* #else */

View File

@ -5030,7 +5030,7 @@ proto_register_isobus_vt(void)
}, },
{ &hf_isobus_vt_changelineattributes_lineart, { &hf_isobus_vt_changelineattributes_lineart,
{ "Line Art", "isobus.vt.change_line_attributes.line_art", { "Line Art", "isobus.vt.change_line_attributes.line_art",
FT_UINT8, BASE_DEC, NULL, 0x0, FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_isobus_vt_changelineattributes_errorcodes, { &hf_isobus_vt_changelineattributes_errorcodes,

View File

@ -557,7 +557,7 @@ dissect_log3gpp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data
col_clear(pinfo->cinfo, COL_INFO); col_clear(pinfo->cinfo, COL_INFO);
/* Create root (protocol) tree. */ /* Create root (protocol) tree. */
ti = proto_tree_add_item(tree, proto_log3gpp, tvb, offset, -1, FALSE); ti = proto_tree_add_item(tree, proto_log3gpp, tvb, offset, -1, ENC_NA);
prot3gpp_tree = proto_item_add_subtree(ti, ett_log3gpp); prot3gpp_tree = proto_item_add_subtree(ti, ett_log3gpp);
/*********************************************************************/ /*********************************************************************/

View File

@ -1518,8 +1518,7 @@ dissect_execute_cdb_reply(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset=dissect_error(tvb, offset, pinfo, tree, seq); offset=dissect_error(tvb, offset, pinfo, tree, seq);
/* status */ /* status */
proto_tree_add_item(tree, hf_ndmp_execute_cdb_status, tvb, offset, 4, ENC_BIG_ENDIAN); proto_tree_add_item_ret_uint(tree, hf_ndmp_execute_cdb_status, tvb, offset, 4, ENC_BIG_ENDIAN, &status);
status=tvb_get_ntohl(tvb, offset);
if(ndmp_conv_data->task && ndmp_conv_data->task->itlq){ if(ndmp_conv_data->task && ndmp_conv_data->task->itlq){
dissect_scsi_rsp(tvb, pinfo, top_tree, ndmp_conv_data->task->itlq, get_itl_nexus(pinfo, FALSE), (guint8)status); dissect_scsi_rsp(tvb, pinfo, top_tree, ndmp_conv_data->task->itlq, get_itl_nexus(pinfo, FALSE), (guint8)status);
} }
@ -3742,7 +3741,7 @@ proto_register_ndmp(void)
#endif #endif
{ &hf_ndmp_execute_cdb_status, { { &hf_ndmp_execute_cdb_status, {
"Status", "ndmp.execute_cdb.status", FT_UINT8, BASE_DEC, "Status", "ndmp.execute_cdb.status", FT_UINT32, BASE_DEC,
VALS(scsi_status_val), 0, "SCSI status", HFILL }}, VALS(scsi_status_val), 0, "SCSI status", HFILL }},
{ &hf_ndmp_execute_cdb_dataout_len, { { &hf_ndmp_execute_cdb_dataout_len, {

View File

@ -1443,7 +1443,7 @@ proto_register_netlink_route(void)
}, },
{ &hf_netlink_route_ifla_carrier, { &hf_netlink_route_ifla_carrier,
{ "Carrier", "netlink-route.ifla_carrier", { "Carrier", "netlink-route.ifla_carrier",
FT_BOOLEAN, 32, TFS(&tfs_restricted_not_restricted), 0x01, FT_BOOLEAN, 32, TFS(&tfs_restricted_not_restricted), 0x00000001,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_netlink_route_ifla_qdisc, { &hf_netlink_route_ifla_qdisc,

View File

@ -3943,7 +3943,7 @@ proto_register_omron_fins(void)
{ &hf_omron_block_record_no_of_total_words, { &hf_omron_block_record_no_of_total_words,
{ "No. of total words", "omron.block_record.no_of_total_words", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { "No. of total words", "omron.block_record.no_of_total_words", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_omron_status_flags, { &hf_omron_status_flags,
{ "Status flags", "omron.status_flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { "Status flags", "omron.status_flags", FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_omron_status_flags_slave_master, { &hf_omron_status_flags_slave_master,
{ "Status Type", "omron.status_flags.slave_master", FT_BOOLEAN, 8, TFS(&boolean_status_flags_slave_master), 0x80, NULL, HFILL }}, { "Status Type", "omron.status_flags.slave_master", FT_BOOLEAN, 8, TFS(&boolean_status_flags_slave_master), 0x80, NULL, HFILL }},
{ &hf_omron_status_flags_data_link, { &hf_omron_status_flags_data_link,

View File

@ -345,7 +345,7 @@ proto_register_opus(void)
&opus_codec_toc_config_request_vals_ext, 0xF8, "Opus TOC config", &opus_codec_toc_config_request_vals_ext, 0xF8, "Opus TOC config",
HFILL}}, HFILL}},
{&hf_opus_toc_s, {&hf_opus_toc_s,
{"TOC.S bit", "opus.TOC.s", FT_BOOLEAN, SEP_DOT, TFS(&toc_s_bit_vals), {"TOC.S bit", "opus.TOC.s", FT_BOOLEAN, 8, TFS(&toc_s_bit_vals),
0x04, NULL, HFILL}}, 0x04, NULL, HFILL}},
{&hf_opus_toc_c, {&hf_opus_toc_c,
{"TOC.C bits", "opus.TOC.c", FT_UINT8, BASE_DEC | BASE_EXT_STRING, {"TOC.C bits", "opus.TOC.c", FT_UINT8, BASE_DEC | BASE_EXT_STRING,
@ -354,10 +354,10 @@ proto_register_opus(void)
{"Frame Count.m", "opus.FC.m", FT_UINT8, BASE_DEC, NULL, 0x3F, {"Frame Count.m", "opus.FC.m", FT_UINT8, BASE_DEC, NULL, 0x3F,
"Frame Count", HFILL}}, "Frame Count", HFILL}},
{&hf_opus_frame_count_p, {&hf_opus_frame_count_p,
{"Frame Count.p bit", "opus.FC.p", FT_BOOLEAN, SEP_DOT, {"Frame Count.p bit", "opus.FC.p", FT_BOOLEAN, 8,
TFS(&fc_p_bit_vals), 0x40, NULL, HFILL}}, TFS(&fc_p_bit_vals), 0x40, NULL, HFILL}},
{&hf_opus_frame_count_v, {&hf_opus_frame_count_v,
{"Frame Count.v bit", "opus.FC.v", FT_BOOLEAN, SEP_DOT, {"Frame Count.v bit", "opus.FC.v", FT_BOOLEAN, 8,
TFS(&fc_v_bit_vals), 0x80, NULL, HFILL}}, TFS(&fc_v_bit_vals), 0x80, NULL, HFILL}},
{&hf_opus_frame_size, {&hf_opus_frame_size,
{"Frame Size", "opus.frame_size", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, {"Frame Size", "opus.frame_size", FT_BYTES, BASE_NONE, NULL, 0x0, NULL,

View File

@ -7217,7 +7217,7 @@ proto_register_s7comm (void)
{ "Address", "s7comm.param.item.address", FT_UINT24, BASE_HEX, NULL, 0x0, { "Address", "s7comm.param.item.address", FT_UINT24, BASE_HEX, NULL, 0x0,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_s7comm_item_address_byte, { &hf_s7comm_item_address_byte,
{ "Byte Address", "s7comm.param.item.address.byte", FT_UINT24, BASE_DEC, NULL, 0x7fff8, { "Byte Address", "s7comm.param.item.address.byte", FT_UINT24, BASE_DEC, NULL, 0x07fff8,
NULL, HFILL }}, NULL, HFILL }},
{ &hf_s7comm_item_address_bit, { &hf_s7comm_item_address_bit,
{ "Bit Address", "s7comm.param.item.address.bit", FT_UINT24, BASE_DEC, NULL, 0x000007, { "Bit Address", "s7comm.param.item.address.bit", FT_UINT24, BASE_DEC, NULL, 0x000007,

View File

@ -6940,7 +6940,7 @@ proto_register_scsi(void)
{"PC Flags", "scsi.log.pc.flags", FT_UINT8, BASE_HEX, NULL, 0, {"PC Flags", "scsi.log.pc.flags", FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL}}, NULL, HFILL}},
{ &hf_scsi_log_parameter_ptr, { &hf_scsi_log_parameter_ptr,
{"Parameter Pointer", "scsi.log.param_ptr", FT_UINT8, BASE_HEX, NULL, {"Parameter Pointer", "scsi.log.param_ptr", FT_UINT16, BASE_HEX, NULL,
0, NULL, HFILL}}, 0, NULL, HFILL}},
{ &hf_scsi_log_page_length, { &hf_scsi_log_page_length,
{"Page Length", "scsi.log.page_length", FT_UINT16, BASE_DEC, NULL, 0, {"Page Length", "scsi.log.page_length", FT_UINT16, BASE_DEC, NULL, 0,

View File

@ -2776,7 +2776,7 @@ proto_register_selfm(void)
{ &hf_selfm_fmconfig_ai_sf_type, { &hf_selfm_fmconfig_ai_sf_type,
{ "Analog Channel Scale Factor Type", "selfm.fmconfig.ai_sf_type", FT_UINT8, BASE_DEC, VALS(selfm_fmconfig_ai_sftype_vals), 0x0, NULL, HFILL }}, { "Analog Channel Scale Factor Type", "selfm.fmconfig.ai_sf_type", FT_UINT8, BASE_DEC, VALS(selfm_fmconfig_ai_sftype_vals), 0x0, NULL, HFILL }},
{ &hf_selfm_fmconfig_ai_sf_ofs, { &hf_selfm_fmconfig_ai_sf_ofs,
{ "Analog Channel Scale Factor Offset", "selfm.fmconfig.ai_sf_ofs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { "Analog Channel Scale Factor Offset", "selfm.fmconfig.ai_sf_ofs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_selfm_fmconfig_cblk_rot, { &hf_selfm_fmconfig_cblk_rot,
{ "Rotation", "selfm.fmconfig.cblk_rot", FT_UINT8, BASE_HEX, VALS(selfm_fmconfig_cblk_rot_vals), 0x01, NULL, HFILL }}, { "Rotation", "selfm.fmconfig.cblk_rot", FT_UINT8, BASE_HEX, VALS(selfm_fmconfig_cblk_rot_vals), 0x01, NULL, HFILL }},
{ &hf_selfm_fmconfig_cblk_vconn, { &hf_selfm_fmconfig_cblk_vconn,

View File

@ -672,7 +672,7 @@ proto_register_slimp3(void)
NULL, HFILL }}, NULL, HFILL }},
/* Generated from convert_proto_tree_add_text.pl */ /* Generated from convert_proto_tree_add_text.pl */
{ &hf_slimp3_display_delay, { "Delay", "slimp3.display_delay", FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0, NULL, HFILL }}, { &hf_slimp3_display_delay, { "Delay", "slimp3.display_delay", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0, NULL, HFILL }},
{ &hf_slimp3_display_string, { "String", "slimp3.display_string", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_slimp3_display_string, { "String", "slimp3.display_string", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_slimp3_display_command, { "Command", "slimp3.display_command", FT_UINT8, BASE_DEC, VALS(slimp3_display_commands), 0x0, NULL, HFILL }}, { &hf_slimp3_display_command, { "Command", "slimp3.display_command", FT_UINT8, BASE_DEC, VALS(slimp3_display_commands), 0x0, NULL, HFILL }},
{ &hf_slimp3_display_unknown, { "Unknown", "slimp3.display_unknown", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_slimp3_display_unknown, { "Unknown", "slimp3.display_unknown", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},

View File

@ -1277,7 +1277,7 @@ dissect_solaredge_recursive(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
switch (header.command_type) { switch (header.command_type) {
case SOLAREDGE_COMMAND_MISC_ENCRYPTED: case SOLAREDGE_COMMAND_MISC_ENCRYPTED:
proto_tree_add_item(solaredge_header_tree, hf_solaredge_payload_type, tvb, current_offset, header.length, BASE_NONE); proto_tree_add_item(solaredge_header_tree, hf_solaredge_payload_type, tvb, current_offset, header.length, ENC_NA);
conv_data = (t_solaredge_conversion_data *)conversation_get_proto_data(conv, proto_solaredge); conv_data = (t_solaredge_conversion_data *)conversation_get_proto_data(conv, proto_solaredge);
if ((conv_data != NULL) && (conv_data->session_key_found == TRUE)) { if ((conv_data != NULL) && (conv_data->session_key_found == TRUE)) {
guint8 *decrypted_buffer = (guint8*)wmem_alloc(pinfo->pool, header.length); guint8 *decrypted_buffer = (guint8*)wmem_alloc(pinfo->pool, header.length);
@ -1296,7 +1296,7 @@ dissect_solaredge_recursive(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
dissect_solaredge_devicedata(tvb, pinfo, solaredge_payload_tree, current_offset, header.length); dissect_solaredge_devicedata(tvb, pinfo, solaredge_payload_tree, current_offset, header.length);
break; break;
case SOLAREDGE_COMMAND_SERVER_SET_KEY: case SOLAREDGE_COMMAND_SERVER_SET_KEY:
proto_tree_add_item(solaredge_header_tree, hf_solaredge_session_key_type, tvb, current_offset, header.length, BASE_NONE); proto_tree_add_item(solaredge_header_tree, hf_solaredge_session_key_type, tvb, current_offset, header.length, ENC_NA);
if (!gcry_cipher_open(&cipher_hd_system, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_ECB, 0)) { if (!gcry_cipher_open(&cipher_hd_system, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_ECB, 0)) {
/* Load the system key to generate session key */ /* Load the system key to generate session key */
system_key = g_byte_array_new(); system_key = g_byte_array_new();

View File

@ -7531,7 +7531,7 @@ proto_register_tn3270(void)
{ &hf_tn3270_resbytes, { &hf_tn3270_resbytes,
{ "Flags (Reserved)", { "Flags (Reserved)",
"tn3270.resbytes", "tn3270.resbytes",
FT_UINT8, BASE_HEX, NULL, 0x0, FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL } NULL, HFILL }
}, },
{ &hf_tn3270_res_twobytes, { &hf_tn3270_res_twobytes,

View File

@ -5929,7 +5929,7 @@ static int dissect_wassp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
save_fragmented = pinfo->fragmented; save_fragmented = pinfo->fragmented;
ti = proto_tree_add_item(tree, proto_wassp, tvb, offset, -1, FALSE); ti = proto_tree_add_item(tree, proto_wassp, tvb, offset, -1, ENC_NA);
wassp_tree = proto_item_add_subtree(ti, ett_wassp); wassp_tree = proto_item_add_subtree(ti, ett_wassp);
if (ru_msg_type == WASSP_RU_Discov) /* UDP port = 13907, ap discover tlv, decode AP discover header */ if (ru_msg_type == WASSP_RU_Discov) /* UDP port = 13907, ap discover tlv, decode AP discover header */

View File

@ -8615,7 +8615,7 @@ dissect_z3950(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME); col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
/* create the z3950 protocol tree */ /* create the z3950 protocol tree */
z3950_item = proto_tree_add_item(tree, proto_z3950, tvb, 0, -1, FALSE); z3950_item = proto_tree_add_item(tree, proto_z3950, tvb, 0, -1, ENC_NA);
z3950_tree = proto_item_add_subtree(z3950_item, ett_z3950); z3950_tree = proto_item_add_subtree(z3950_item, ett_z3950);
return dissect_z3950_PDU(FALSE, tvb, offset, &asn1_ctx, z3950_tree, -1); return dissect_z3950_PDU(FALSE, tvb, offset, &asn1_ctx, z3950_tree, -1);

View File

@ -5328,7 +5328,7 @@ dissect_zcl_rssi_location_rssi_response(tvbuff_t *tvb, proto_tree *tree, guint *
*offset += 1; *offset += 1;
/* Retrieve "Number RSSI Measurements" field */ /* Retrieve "Number RSSI Measurements" field */
proto_tree_add_item(tree, hf_zbee_zcl_rssi_location_number_rssi_meas, tvb, *offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(tree, hf_zbee_zcl_rssi_location_number_rssi_meas, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
*offset += 1; *offset += 1;
} /*dissect_zcl_rssi_location_rssi_response*/ } /*dissect_zcl_rssi_location_rssi_response*/
@ -6484,16 +6484,16 @@ proto_register_zbee_zcl_analog_output_basic(void)
{ &hf_zbee_zcl_analog_output_basic_attr_id, { &hf_zbee_zcl_analog_output_basic_attr_id,
{ "Attribute", "zbee_zcl_general.analog_output_basic.attr_id", FT_UINT16, BASE_HEX, VALS(zbee_zcl_analog_output_basic_attr_names), { "Attribute", "zbee_zcl_general.analog_output_basic.attr_id", FT_UINT16, BASE_HEX, VALS(zbee_zcl_analog_output_basic_attr_names),
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_reliability, { &hf_zbee_zcl_analog_output_basic_reliability,
{ "Reliability", "zbee_zcl_general.analog_output_basic.attr.reliability", FT_UINT8, BASE_HEX, VALS(zbee_zcl_reliability_names), { "Reliability", "zbee_zcl_general.analog_output_basic.attr.reliability", FT_UINT8, BASE_HEX, VALS(zbee_zcl_reliability_names),
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
/* start Status Flags fields */ /* start Status Flags fields */
{ &hf_zbee_zcl_analog_output_basic_status_flags, { &hf_zbee_zcl_analog_output_basic_status_flags,
{ "Status Flags", "zbee_zcl_general.analog_output_basic.attr.status", FT_UINT8, BASE_HEX, NULL, { "Status Flags", "zbee_zcl_general.analog_output_basic.attr.status", FT_UINT8, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_status_in_alarm, { &hf_zbee_zcl_analog_output_basic_status_in_alarm,
{ "In Alarm Status", "zbee_zcl_general.analog_output_basic.attr.status.in_alarm", FT_BOOLEAN, 8, TFS(&tfs_true_false), { "In Alarm Status", "zbee_zcl_general.analog_output_basic.attr.status.in_alarm", FT_BOOLEAN, 8, TFS(&tfs_true_false),
@ -6514,19 +6514,19 @@ proto_register_zbee_zcl_analog_output_basic(void)
{ &hf_zbee_zcl_analog_output_basic_priority_array_bool, { &hf_zbee_zcl_analog_output_basic_priority_array_bool,
{ "Valid/Invalid", "zbee_zcl_general.analog_output_basic.attr.priority_array.bool", FT_BOOLEAN, 8, TFS(&tfs_invalid_valid), { "Valid/Invalid", "zbee_zcl_general.analog_output_basic.attr.priority_array.bool", FT_BOOLEAN, 8, TFS(&tfs_invalid_valid),
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_priority_array_sing_prec, { &hf_zbee_zcl_analog_output_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.analog_output_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.analog_output_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_priority_array, { &hf_zbee_zcl_analog_output_basic_priority_array,
{ "Priority Array", "zbee_zcl_general.analog_output_basic.priority_array", FT_NONE, BASE_NONE, NULL, { "Priority Array", "zbee_zcl_general.analog_output_basic.priority_array", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } }, 0x0, NULL, HFILL } },
{ &hf_zbee_zcl_analog_output_basic_structure, { &hf_zbee_zcl_analog_output_basic_structure,
{ "Structure", "zbee_zcl_general.analog_output_basic.structure", FT_NONE, BASE_NONE, NULL, { "Structure", "zbee_zcl_general.analog_output_basic.structure", FT_NONE, BASE_NONE, NULL,
0x00, NULL, HFILL } } 0x0, NULL, HFILL } }
}; };
/* ZCL Analog Output Basic subtrees */ /* ZCL Analog Output Basic subtrees */
@ -6800,7 +6800,7 @@ proto_register_zbee_zcl_analog_value_basic(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_value_basic_priority_array_sing_prec, { &hf_zbee_zcl_analog_value_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.analog_value_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.analog_value_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_analog_value_basic_priority_array, { &hf_zbee_zcl_analog_value_basic_priority_array,
@ -7361,7 +7361,7 @@ proto_register_zbee_zcl_binary_output_basic(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_output_basic_priority_array_sing_prec, { &hf_zbee_zcl_binary_output_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.binary_output_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.binary_output_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_output_basic_priority_array, { &hf_zbee_zcl_binary_output_basic_priority_array,
@ -7650,7 +7650,7 @@ proto_register_zbee_zcl_binary_value_basic(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_value_basic_priority_array_sing_prec, { &hf_zbee_zcl_binary_value_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.binary_value_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.binary_value_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_binary_value_basic_priority_array, { &hf_zbee_zcl_binary_value_basic_priority_array,
@ -8173,7 +8173,7 @@ proto_register_zbee_zcl_multistate_output_basic(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_output_basic_priority_array_sing_prec, { &hf_zbee_zcl_multistate_output_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.multistate_output_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.multistate_output_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } } , 0x00, NULL, HFILL } } ,
{ &hf_zbee_zcl_multistate_output_basic_priority_array, { &hf_zbee_zcl_multistate_output_basic_priority_array,
@ -8463,7 +8463,7 @@ proto_register_zbee_zcl_multistate_value_basic(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_value_basic_priority_array_sing_prec, { &hf_zbee_zcl_multistate_value_basic_priority_array_sing_prec,
{ "Priority Value", "zbee_zcl_general.multistate_value_basic.attr.priority_array.sing_prec", FT_UINT16, BASE_HEX, NULL, { "Priority Value", "zbee_zcl_general.multistate_value_basic.attr.priority_array.sing_prec", FT_UINT32, BASE_HEX, NULL,
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_multistate_value_basic_priority_array, { &hf_zbee_zcl_multistate_value_basic_priority_array,
@ -9473,8 +9473,6 @@ dissect_zcl_part_multiack(tvbuff_t *tvb, proto_tree *tree, guint *offset)
guint tvb_len = tvb_reported_length(tvb); guint tvb_len = tvb_reported_length(tvb);
guint i = 0; guint i = 0;
guint8 options; guint8 options;
guint16 first_frame_id;
guint16 nack_id;
static int * const ack_opts[] = { static int * const ack_opts[] = {
&hf_zbee_zcl_part_ack_opt_nack_id_len, &hf_zbee_zcl_part_ack_opt_nack_id_len,
@ -9491,14 +9489,12 @@ dissect_zcl_part_multiack(tvbuff_t *tvb, proto_tree *tree, guint *offset)
if ((options & ZBEE_ZCL_PART_ACK_OPT_NACK_LEN) == 0) if ((options & ZBEE_ZCL_PART_ACK_OPT_NACK_LEN) == 0)
{ {
/* 1-byte length */ /* 1-byte length */
first_frame_id = (guint16)tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_part_first_frame_id, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_zbee_zcl_part_first_frame_id, tvb, *offset, 1, (first_frame_id & 0xFF));
*offset += 1; *offset += 1;
} }
else { else {
/* 2-bytes length */ /* 2-bytes length */
first_frame_id = tvb_get_letohs(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_part_first_frame_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_zbee_zcl_part_first_frame_id, tvb, *offset, 2, first_frame_id);
*offset += 2; *offset += 2;
} }
@ -9508,14 +9504,12 @@ dissect_zcl_part_multiack(tvbuff_t *tvb, proto_tree *tree, guint *offset)
if ((options & ZBEE_ZCL_PART_ACK_OPT_NACK_LEN) == 0) if ((options & ZBEE_ZCL_PART_ACK_OPT_NACK_LEN) == 0)
{ {
/* 1-byte length */ /* 1-byte length */
nack_id = (guint16)tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_part_nack_id, tvb, *offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_zbee_zcl_part_nack_id, tvb, *offset, 1, (nack_id & 0xFF));
*offset += 1; *offset += 1;
} }
else { else {
/* 2-bytes length */ /* 2-bytes length */
nack_id = tvb_get_letohs(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_part_nack_id, tvb, *offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(tree, hf_zbee_zcl_part_nack_id, tvb, *offset, 2, nack_id);
*offset += 2; *offset += 2;
} }
@ -9630,7 +9624,7 @@ void proto_register_zbee_zcl_part(void)
{ &hf_zbee_zcl_part_nack_id, { &hf_zbee_zcl_part_nack_id,
{ "Nack Id", "zbee_zcl_general.part.nack_id", FT_UINT16, BASE_DEC, NULL, { "Nack Id", "zbee_zcl_general.part.nack_id", FT_UINT16, BASE_DEC, NULL,
0x00, NULL, HFILL } } 0x0, NULL, HFILL } }
}; };
@ -16502,7 +16496,7 @@ proto_register_zbee_zcl_touchlink(void)
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_touchlink_profile_id, { &hf_zbee_zcl_touchlink_profile_id,
{ "Profile ID", "zbee_zcl_general.touchlink.profile_id", FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(zbee_aps_apid_names), { "Profile ID", "zbee_zcl_general.touchlink.profile_id", FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(zbee_aps_apid_names),
0x00, NULL, HFILL } }, 0x00, NULL, HFILL } },
{ &hf_zbee_zcl_touchlink_device_id, { &hf_zbee_zcl_touchlink_device_id,

View File

@ -1160,7 +1160,7 @@ dissect_zbncp_dump_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
zbncp_dump_info_tree = proto_tree_add_subtree(tree, tvb, 0, ZBNCP_DUMP_INFO_SIZE, ett_zbncp_dump, NULL, "ZBNCP Dump"); zbncp_dump_info_tree = proto_tree_add_subtree(tree, tvb, 0, ZBNCP_DUMP_INFO_SIZE, ett_zbncp_dump, NULL, "ZBNCP Dump");
proto_tree_add_item(zbncp_dump_info_tree, hf_zbncp_dump_preambule, tvb, 0, ZBNCP_DUMP_INFO_SIGN_SIZE, (ENC_ASCII | ENC_NA)); proto_tree_add_item(zbncp_dump_info_tree, hf_zbncp_dump_preambule, tvb, 0, ZBNCP_DUMP_INFO_SIGN_SIZE, ENC_ASCII|ENC_NA);
offset = ZBNCP_DUMP_INFO_SIGN_SIZE; offset = ZBNCP_DUMP_INFO_SIGN_SIZE;
proto_tree_add_item(zbncp_dump_info_tree, hf_zbncp_dump_version, tvb, offset, 1, ENC_NA); proto_tree_add_item(zbncp_dump_info_tree, hf_zbncp_dump_version, tvb, offset, 1, ENC_NA);

View File

@ -8,6 +8,8 @@
* Copyright 1998 Gerald Combs * Copyright 1998 Gerald Combs
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
*
* https://download.beckhoff.com/download/document/io/ethercat-development-products/ethercat_esc_datasheet_sec1_technology_2i3.pdf
*/ */
/* Include files */ /* Include files */
@ -3095,11 +3097,11 @@ void proto_register_ecat(void)
{"EEPROM Data 3 (0x50e)", "ecat.reg.data3", {"EEPROM Data 3 (0x50e)", "ecat.reg.data3",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
}, },
{ &hf_ecat_reg_mio_ctrlstat, { &hf_ecat_reg_mio_ctrlstat,
{"Phy MIO Ctrl/Status (0x510)", "ecat.reg.mio.ctrlstat", {"Phy MIO Ctrl/Status (0x510)", "ecat.reg.mio.ctrlstat",
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
}, },
/* TODO: check these masks (ecat_esc_reg_510) against spec. /* TODO: check these masks (ecat_esc_reg_510) against spec.
* In particular hf_ecat_reg_mio_ctrlstat_offsphy is non-contiguous and overlaps wracc1 */ * In particular hf_ecat_reg_mio_ctrlstat_offsphy is non-contiguous and overlaps wracc1 */
{ &hf_ecat_reg_mio_ctrlstat_wracc1, { &hf_ecat_reg_mio_ctrlstat_wracc1,

View File

@ -172,20 +172,20 @@ class APICheck:
class ProtoTreeAddItemCheck(APICheck): class ProtoTreeAddItemCheck(APICheck):
def __init__(self, ptv=None): def __init__(self, ptv=None):
# RE will capture whole call. N.B. only looking at calls with literal numerical length field. # RE will capture whole call.
if not ptv: if not ptv:
# proto_item * # proto_item *
# proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb, # proto_tree_add_item(proto_tree *tree, int hfindex, tvbuff_t *tvb,
# const gint start, gint length, const guint encoding) # const gint start, gint length, const guint encoding)
self.fun_name = 'proto_tree_add_item' self.fun_name = 'proto_tree_add_item'
self.p = re.compile('[^\n]*' + self.fun_name + '\s*\(\s*[a-zA-Z0-9_]+,\s*([a-zA-Z0-9_]+),\s*[a-zA-Z0-9_]+,\s*[a-zA-Z0-9_]+,\s*([0-9]+),\s*([a-zA-Z0-9_]+)') self.p = re.compile('[^\n]*' + self.fun_name + '\s*\(\s*[a-zA-Z0-9_]+?,\s*([a-zA-Z0-9_]+?),\s*[a-zA-Z0-9_\+\s]+?,\s*[^,.]+?,\s*(.+),\s*([^,.]+?)\);')
else: else:
# proto_item * # proto_item *
# ptvcursor_add(ptvcursor_t *ptvc, int hfindex, gint length, # ptvcursor_add(ptvcursor_t *ptvc, int hfindex, gint length,
# const guint encoding) # const guint encoding)
self.fun_name = 'ptvcursor_add' self.fun_name = 'ptvcursor_add'
self.p = re.compile('[^\n]*' + self.fun_name + '\s*\([a-zA-Z0-9_]+,\s*([a-zA-Z0-9_]+),\s*([a-zA-Z_0-9]+),\s*([a-zA-Z0-9_\-\>]+)') self.p = re.compile('[^\n]*' + self.fun_name + '\s*\([^,.]+?,\s*([^,.]+?),\s*([^,.]+?),\s*([a-zA-Z0-9_\-\>]+)')
self.lengths = {} self.lengths = {}
@ -221,22 +221,43 @@ class ProtoTreeAddItemCheck(APICheck):
# Want to check this, and next few lines # Want to check this, and next few lines
to_check = lines[line_number-1] + '\n' to_check = lines[line_number-1] + '\n'
# Nothing to check if function name isn't in it # Nothing to check if function name isn't in it
if to_check.find(self.fun_name) != -1: fun_idx = to_check.find(self.fun_name)
if fun_idx != -1:
# Ok, add the next file lines before trying RE # Ok, add the next file lines before trying RE
for i in range(1, 5): for i in range(1, 5):
if to_check.find(';') != -1: if to_check.find(';') != -1:
break break
elif line_number+i < total_lines: elif line_number+i < total_lines:
to_check += (lines[line_number-1+i] + '\n') to_check += (lines[line_number-1+i] + '\n')
# Lose anything before function call itself.
to_check = to_check[fun_idx:]
m = self.p.search(to_check) m = self.p.search(to_check)
if m: if m:
# Throw out if parens not matched
if m.group(0).count('(') != m.group(0).count(')'):
continue
enc = m.group(3) enc = m.group(3)
hf_name = m.group(1) hf_name = m.group(1)
if not enc.startswith('ENC_'): if not enc.startswith('ENC_'):
if not enc in { 'encoding', 'enc', 'client_is_le', 'cigi_byte_order', 'endian', 'endianess', 'machine_encoding', 'byte_order', 'bLittleEndian', if not enc in { 'encoding', 'enc', 'client_is_le', 'cigi_byte_order', 'endian', 'endianess', 'machine_encoding', 'byte_order', 'bLittleEndian',
'p_mq_parm', 'iEnc', 'strid_enc', 'iCod', 'nl_data', 'argp', 'gquic_info', 'writer_encoding', 'p_mq_parm->mq_str_enc', 'p_mq_parm->mq_int_enc',
'tds_get_int2_encoding', 'tds_get_int4_encoding', 'info', 'iEnc', 'strid_enc', 'iCod', 'nl_data->encoding',
'DREP_ENC_INTEGER' }: 'argp->info->encoding', 'gquic_info->encoding', 'writer_encoding',
'tds_get_int2_encoding(tds_info)',
'tds_get_int4_encoding(tds_info)',
'tds_get_char_encoding(tds_info)',
'info->encoding',
'item->encoding',
'DREP_ENC_INTEGER(drep)', 'string_encoding', 'item',
'dvb_enc_to_item_enc(encoding)',
'packet->enc',
'IS_EBCDIC(uCCS) ? ENC_EBCDIC : ENC_ASCII',
'DREP_ENC_INTEGER(hdr->drep)',
'dhcp_uuid_endian',
'payload_le',
'local_encoding',
'big_endian' }:
global warnings_found global warnings_found
print('Warning:', self.file + ':' + str(line_number), print('Warning:', self.file + ':' + str(line_number),
@ -290,7 +311,8 @@ known_non_contiguous_fields = { 'wlan.fixed.capabilities.cfpoll.sta',
'tds.done.status', # covers all bits in bitset 'tds.done.status', # covers all bits in bitset
'hf_iax2_video_csub', # RFC 5456, table 8.7 'hf_iax2_video_csub', # RFC 5456, table 8.7
'iax2.video.subclass', 'iax2.video.subclass',
'dnp3.al.ana.int' 'dnp3.al.ana.int',
'pwcesopsn.cw.lm'
} }
################################################################################################## ##################################################################################################
@ -408,7 +430,8 @@ def is_ignored_consecutive_filter(filter):
re.compile(r'^gryphon.usdt.stmin_active'), re.compile(r'^gryphon.usdt.stmin_active'),
re.compile(r'^dnp3.al.anaout.int'), re.compile(r'^dnp3.al.anaout.int'),
re.compile(r'^dnp3.al.ana.int'), re.compile(r'^dnp3.al.ana.int'),
re.compile(r'^dnp3.al.cnt') re.compile(r'^dnp3.al.cnt'),
re.compile(r'^bthfp.chld.mode')
] ]
for patt in ignore_patterns: for patt in ignore_patterns:
@ -516,9 +539,9 @@ class Item:
return return
# Do see non-contiguous bits often for these.. # Do see non-contiguous bits often for these..
if name_has_one_of(self.hf, ['reserved', 'unknown', 'unused']): if name_has_one_of(self.hf, ['reserved', 'unknown', 'unused', 'spare']):
return return
if name_has_one_of(self.label, ['reserved', 'unknown', 'unused']): if name_has_one_of(self.label, ['reserved', 'unknown', 'unused', 'spare']):
return return
@ -573,7 +596,7 @@ class Item:
return 8 # i.e. 1 byte return 8 # i.e. 1 byte
elif self.type_modifier == 'BASE_NONE': elif self.type_modifier == 'BASE_NONE':
return 8 return 8
elif self.type_modifier == 'SEP_DOT': # from proto.h elif self.type_modifier == 'SEP_DOT': # from proto.h, only meant for FT_BYTES
return 64 return 64
else: else:
try: try:
@ -1008,11 +1031,19 @@ parser.add_argument('--missing-items', action='store_true',
help='when set, look for used items that were never registered') help='when set, look for used items that were never registered')
parser.add_argument('--check-bitmask-fields', action='store_true', parser.add_argument('--check-bitmask-fields', action='store_true',
help='when set, attempt to check arrays of hf items passed to add_bitmask() calls') help='when set, attempt to check arrays of hf items passed to add_bitmask() calls')
parser.add_argument('--all-checks', action='store_true',
help='when set, apply all checks to selected files')
args = parser.parse_args() args = parser.parse_args()
# Turn all checks on.
if args.all_checks:
args.mask = True
args.mask_exact_width = True
args.consecutive = True
args.check_bitmask_fields = True
# Get files from wherever command-line args indicate. # Get files from wherever command-line args indicate.
files = [] files = []