Eliminate proto_tree_add_text from some dissectors.

Change-Id: I066b70cfd58f5fb3ffbcb2e238416747d9e7dd57
Reviewed-on: https://code.wireshark.org/review/10269
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2015-08-25 20:58:09 -04:00 committed by Anders Broman
parent 2ed634dfb9
commit 30c2f23f05
3 changed files with 169 additions and 115 deletions

View File

@ -582,6 +582,19 @@ static int hf_dcerpc_fragment_count = -1;
static int hf_dcerpc_reassembled_in = -1;
static int hf_dcerpc_reassembled_length = -1;
static int hf_dcerpc_unknown_if_id = -1;
/* Generated from convert_proto_tree_add_text.pl */
static int hf_dcerpc_duplicate_ptr = -1;
static int hf_dcerpc_encrypted_stub_data = -1;
static int hf_dcerpc_decrypted_stub_data = -1;
static int hf_dcerpc_stub_data = -1;
static int hf_dcerpc_auth_padding = -1;
static int hf_dcerpc_auth_verifier = -1;
static int hf_dcerpc_auth_credentials = -1;
static int hf_dcerpc_fault_stub_data = -1;
static int hf_dcerpc_fragment_data = -1;
static int hf_dcerpc_cmd_client_ipv4 = -1;
static int hf_dcerpc_cmd_client_ipv6 = -1;
static int hf_dcerpc_authentication_verifier = -1;
static gint ett_dcerpc = -1;
static gint ett_dcerpc_cn_flags = -1;
@ -611,6 +624,10 @@ static expert_field ei_dcerpc_cn_ctx_id_no_bind = EI_INIT;
static expert_field ei_dcerpc_bind_not_acknowledged = EI_INIT;
static expert_field ei_dcerpc_verifier_unavailable = EI_INIT;
static expert_field ei_dcerpc_invalid_pdu_authentication_attempt = EI_INIT;
/* Generated from convert_proto_tree_add_text.pl */
static expert_field ei_dcerpc_long_frame = EI_INIT;
static expert_field ei_dcerpc_cn_rts_command = EI_INIT;
static GSList *decode_dcerpc_bindings = NULL;
/*
@ -2697,9 +2714,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo,
/* we have seen this pointer before */
if (idx >= 0) {
proto_tree_add_text(tree, tvb, offset-pointer_size,
pointer_size,
"(duplicate PTR) %s",text);
proto_tree_add_string(tree, hf_dcerpc_duplicate_ptr, tvb, offset-pointer_size, pointer_size, text);
goto after_ref_id;
}
@ -2830,9 +2845,7 @@ dissect_ndr_pointer_cb(tvbuff_t *tvb, gint offset, packet_info *pinfo,
/* we have seen this pointer before */
if (idx >= 0) {
proto_tree_add_text(tree, tvb, offset-pointer_size,
pointer_size,
"(duplicate PTR) %s",text);
proto_tree_add_string(tree, hf_dcerpc_duplicate_ptr, tvb, offset-pointer_size, pointer_size, text);
goto after_ref_id;
}
@ -2934,28 +2947,18 @@ show_stub_data(tvbuff_t *tvb, gint offset, proto_tree *dcerpc_tree,
if ((auth_info != NULL) &&
(auth_info->auth_level == DCE_C_AUTHN_LEVEL_PKT_PRIVACY)) {
if (is_encrypted) {
proto_tree_add_text(dcerpc_tree, tvb, offset, length,
"Encrypted stub data (%d byte%s)",
length, plurality(length, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_encrypted_stub_data, tvb, offset, length, ENC_NA);
/* is the padding is still inside the encrypted blob, don't display it explicit */
auth_pad_len = 0;
} else {
proto_tree_add_text(dcerpc_tree, tvb, offset, plain_length,
"Decrypted stub data (%d byte%s)",
plain_length, plurality(plain_length, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_decrypted_stub_data, tvb, offset, plain_length, ENC_NA);
}
} else {
proto_tree_add_text(dcerpc_tree, tvb, offset, plain_length,
"Stub data (%d byte%s)", plain_length,
plurality(plain_length, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_stub_data, tvb, offset, plain_length, ENC_NA);
}
/* If there is auth padding at the end of the stub, display it */
if (auth_pad_len != 0) {
proto_tree_add_text(dcerpc_tree, tvb, auth_pad_offset,
auth_pad_len,
"Auth Padding (%u byte%s)",
auth_pad_len,
plurality(auth_pad_len, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_auth_padding, tvb, auth_pad_offset, auth_pad_len, ENC_NA);
}
}
}
@ -3152,11 +3155,7 @@ dcerpc_try_handoff(packet_info *pinfo, proto_tree *tree,
data in the tvb, make a note of it. */
remaining = tvb_reported_length_remaining(stub_tvb, offset);
if (remaining > 0) {
proto_tree_add_text(sub_tree, stub_tvb, offset,
remaining,
"[Long frame (%d byte%s)]",
remaining,
plurality(remaining, "", "s"));
proto_tree_add_expert(sub_tree, pinfo, &ei_dcerpc_long_frame, stub_tvb, offset, remaining);
col_append_fstr(pinfo->cinfo, COL_INFO,
"[Long frame (%d byte%s)]",
remaining,
@ -3180,11 +3179,7 @@ dcerpc_try_handoff(packet_info *pinfo, proto_tree *tree,
/* If there is auth padding at the end of the stub, display it */
if (auth_pad_len != 0) {
proto_tree_add_text(sub_tree, decrypted_tvb, auth_pad_offset,
auth_pad_len,
"Auth Padding (%u byte%s)",
auth_pad_len,
plurality(auth_pad_len, "", "s"));
proto_tree_add_item(sub_tree, hf_dcerpc_auth_padding, decrypted_tvb, auth_pad_offset, auth_pad_len, ENC_NA);
}
pinfo->current_proto = saved_proto;
@ -3237,8 +3232,7 @@ dissect_dcerpc_verifier(tvbuff_t *tvb, packet_info *pinfo,
show_exception(auth_tvb, pinfo, dcerpc_tree, EXCEPT_CODE, GET_MESSAGE);
} ENDTRY;
} else {
proto_tree_add_text(dcerpc_tree, auth_tvb, 0, hdr->auth_len,
"Auth Verifier");
proto_tree_add_item(dcerpc_tree, hf_dcerpc_auth_verifier, auth_tvb, 0, hdr->auth_len, ENC_NA);
}
}
@ -3327,8 +3321,7 @@ dissect_dcerpc_cn_auth(tvbuff_t *tvb, int stub_offset, packet_info *pinfo,
dissect_auth_verf(auth_tvb, pinfo, dcerpc_tree, auth_fns,
hdr, auth_info);
else
proto_tree_add_text(dcerpc_tree, tvb, offset, hdr->auth_len,
"Auth Credentials");
proto_tree_add_item(dcerpc_tree, hf_dcerpc_auth_credentials, tvb, offset, hdr->auth_len, ENC_NA);
}
/* Compute the size of the auth block. Note that this should not
@ -3799,12 +3792,7 @@ dissect_dcerpc_cn_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (result) {
if (dcerpc_tree)
proto_tree_add_text(
dcerpc_tree, payload_tvb, 0, -1,
"Encrypted stub data (%d byte%s)",
tvb_reported_length(payload_tvb),
plurality(tvb_reported_length(payload_tvb), "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_encrypted_stub_data, payload_tvb, 0, -1, ENC_NA);
add_new_data_source(
pinfo, result, "Decrypted stub data");
@ -4419,23 +4407,13 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo,
* It should probably get passed the status code
* as well, as that might be protocol-specific.
*/
if (dcerpc_tree) {
if (stub_length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fault stub data (%d byte%s)",
stub_length,
plurality(stub_length, "", "s"));
}
if (stub_length > 0) {
proto_tree_add_item(dcerpc_tree, hf_dcerpc_fault_stub_data, tvb, offset, stub_length, ENC_NA);
}
} else {
/* PDU is fragmented and this isn't the first fragment */
if (dcerpc_tree) {
if (stub_length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fragment data (%d byte%s)",
stub_length,
plurality(stub_length, "", "s"));
}
if (stub_length > 0) {
proto_tree_add_item(dcerpc_tree, hf_dcerpc_fragment_data, tvb, offset, stub_length, ENC_NA);
}
}
} else {
@ -4445,10 +4423,7 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo,
third means we can attempt reassembly. */
if (dcerpc_tree) {
if (length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fragment data (%d byte%s)",
stub_length,
plurality(stub_length, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_fragment_data, tvb, offset, stub_length, ENC_NA);
}
}
if (hdr->flags&PFC_FIRST_FRAG) { /* FIRST fragment */
@ -4491,10 +4466,7 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo,
*/
if (dcerpc_tree) {
if (length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fault stub data (%d byte%s)",
stub_length,
plurality(stub_length, "", "s"));
proto_tree_add_item(dcerpc_tree, hf_dcerpc_stub_data, tvb, offset, stub_length, ENC_NA);
}
}
}
@ -4605,13 +4577,13 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo,
switch (addrtype) {
case RTS_IPV4: {
const guint32 addr4 = tvb_get_ipv4(tvb, offset);
proto_tree_add_text(cn_rts_command_tree, tvb, offset, 4, "%s", get_hostname(addr4));
proto_tree_add_ipv4_format_value(cn_rts_command_tree, hf_dcerpc_cmd_client_ipv4, tvb, offset, 4, addr4, "%s", get_hostname(addr4));
offset += 4;
} break;
case RTS_IPV6: {
struct e_in6_addr addr6;
tvb_get_ipv6(tvb, offset, &addr6);
proto_tree_add_text(cn_rts_command_tree, tvb, offset, 16, "%s", get_hostname6(&addr6));
proto_tree_add_ipv6_format_value(cn_rts_command_tree, hf_dcerpc_cmd_client_ipv6, tvb, offset, 16, (const guint8 *)&addr6, "%s", get_hostname6(&addr6));
offset += 16;
} break;
}
@ -4629,7 +4601,7 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo,
offset = dissect_dcerpc_uint32(tvb, offset, pinfo, cn_rts_command_tree, hdr->drep, hf_dcerpc_cn_rts_command_pingtrafficsentnotify, NULL);
break;
default:
proto_tree_add_text(cn_rts_command_tree, tvb, offset, 0, "unknown RTS command number");
expert_add_info(pinfo, tf, &ei_dcerpc_cn_rts_command);
break;
}
}
@ -5352,7 +5324,7 @@ dissect_dcerpc_dg_auth(tvbuff_t *tvb, int offset, proto_tree *dcerpc_tree,
break;
default:
proto_tree_add_text(dcerpc_tree, tvb, offset, -1, "Authentication verifier");
proto_tree_add_item(dcerpc_tree, hf_dcerpc_authentication_verifier, tvb, offset, -1, ENC_NA);
break;
}
}
@ -5522,13 +5494,8 @@ dissect_dcerpc_dg_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
next_tvb, hdr->drep, di, NULL);
} else {
/* PDU is fragmented and this isn't the first fragment */
if (dcerpc_tree) {
if (length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fragment data (%d byte%s)",
stub_length,
plurality(stub_length, "", "s"));
}
if (length > 0) {
proto_tree_add_item(dcerpc_tree, hf_dcerpc_fragment_data, tvb, offset, stub_length, ENC_NA);
}
}
} else {
@ -5536,12 +5503,8 @@ dissect_dcerpc_dg_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
we have all the data in the fragment; the first two
of those mean we should attempt reassembly, and the
third means we can attempt reassembly. */
if (dcerpc_tree) {
if (length > 0) {
proto_tree_add_text(dcerpc_tree, tvb, offset, stub_length,
"Fragment data (%d byte%s)", stub_length,
plurality(stub_length, "", "s"));
}
if (length > 0) {
proto_tree_add_item(dcerpc_tree, hf_dcerpc_fragment_data, tvb, offset, stub_length, ENC_NA);
}
fd_head = fragment_add_seq(&dcerpc_cl_reassembly_table,
@ -6460,6 +6423,19 @@ proto_register_dcerpc(void)
{"Forward Destination", "dcerpc.cn_rts_command.forwarddestination", FT_UINT32, BASE_DEC, VALS(rts_forward_destination_vals), 0x0, NULL, HFILL }},
{ &hf_dcerpc_cn_rts_command_pingtrafficsentnotify,
{"Ping Traffic Sent Notify", "dcerpc.cn_rts_command.pingtrafficsentnotify", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_dcerpc_duplicate_ptr, { "duplicate PTR", "dcerpc.duplicate_ptr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_encrypted_stub_data, { "Encrypted stub data", "dcerpc.encrypted_stub_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_decrypted_stub_data, { "Decrypted stub data", "dcerpc.decrypted_stub_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_stub_data, { "Stub data", "dcerpc.stub_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_auth_padding, { "Auth Padding", "dcerpc.auth_padding", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_auth_verifier, { "Auth Verifier", "dcerpc.auth_verifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_auth_credentials, { "Auth Credentials", "dcerpc.auth_credentials", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_fault_stub_data, { "Fault stub data", "dcerpc.fault_stub_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_fragment_data, { "Fragment data", "dcerpc.fragment_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_cmd_client_ipv4, { "RTS Client address", "dcerpc.cmd_client_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_cmd_client_ipv6, { "RTS Client address", "dcerpc.cmd_client_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_dcerpc_authentication_verifier, { "Authentication verifier", "dcerpc.authentication_verifier", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
};
static gint *ett[] = {
&ett_dcerpc,
@ -6492,6 +6468,9 @@ proto_register_dcerpc(void)
{ &ei_dcerpc_bind_not_acknowledged, { "dcerpc.bind_not_acknowledged", PI_SEQUENCE, PI_WARN, "Bind not acknowledged", EXPFILL }},
{ &ei_dcerpc_verifier_unavailable, { "dcerpc.verifier_unavailable", PI_UNDECODED, PI_WARN, NULL, EXPFILL }},
{ &ei_dcerpc_invalid_pdu_authentication_attempt, { "dcerpc.invalid_pdu_authentication_attempt", PI_UNDECODED, PI_WARN, NULL, EXPFILL }},
/* Generated from convert_proto_tree_add_text.pl */
{ &ei_dcerpc_long_frame, { "dcerpc.long_frame", PI_PROTOCOL, PI_WARN, "Long frame", EXPFILL }},
{ &ei_dcerpc_cn_rts_command, { "dcerpc.cn_rts_command.unknown", PI_PROTOCOL, PI_WARN, "unknown RTS command number", EXPFILL }},
};
/* Decode As handling */

View File

@ -381,6 +381,17 @@ static int hf_isis_lsp_area_address = -1;
static int hf_isis_lsp_clv_nlpid = -1;
static int hf_isis_lsp_ip_authentication = -1;
static int hf_isis_lsp_authentication = -1;
static int hf_isis_lsp_area_address_str = -1;
static int hf_isis_lsp_is_virtual = -1;
static int hf_isis_lsp_group = -1;
static int hf_isis_lsp_default = -1;
static int hf_isis_lsp_default_support = -1;
static int hf_isis_lsp_delay = -1;
static int hf_isis_lsp_delay_support = -1;
static int hf_isis_lsp_expense = -1;
static int hf_isis_lsp_expense_support = -1;
static int hf_isis_lsp_error = -1;
static int hf_isis_lsp_error_support = -1;
static gint ett_isis_lsp = -1;
static gint ett_isis_lsp_info = -1;
@ -451,7 +462,7 @@ static expert_field ei_isis_lsp_subtlv = EI_INIT;
static expert_field ei_isis_lsp_authentication = EI_INIT;
static expert_field ei_isis_lsp_clv_mt = EI_INIT;
static expert_field ei_isis_lsp_malformed_subtlv = EI_INIT;
static expert_field ei_isis_lsp_reserved_not_zero = EI_INIT;
static const value_string isis_lsp_istype_vals[] = {
{ ISIS_LSP_TYPE_UNUSED0, "Unused 0x0 (invalid)"},
@ -592,27 +603,29 @@ dissect_lsp_mt_id(tvbuff_t *tvb, proto_tree *tree, int offset)
* proto_tree * : protocol display tree to fill out. May be NULL
* int : offset into packet data where we are.
* guint8 : value of the metric.
* char * : string giving type of the metric.
* int : hf of the metric.
* int : hf_support of the metric.
* int : force supported. True is the supported bit MUST be zero.
*
* Output:
* void, but we will add to proto tree if !NULL.
*/
static void
dissect_metric(tvbuff_t *tvb, proto_tree *tree, int offset, guint8 value,
const char *pstr, int force_supported )
dissect_metric(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, guint8 value,
int hf, int hf_support, int force_supported )
{
int s;
if ( !tree ) return;
proto_item *item, *support_item;
s = ISIS_LSP_CLV_METRIC_SUPPORTED(value);
proto_tree_add_text(tree, tvb, offset, 1,
"%s Metric: %s%s %s%d:%d", pstr,
s ? "Not supported" : "Supported",
(s && force_supported) ? "(but is required to be)":"",
ISIS_LSP_CLV_METRIC_RESERVED(value) ? "(reserved bit != 0)":"",
ISIS_LSP_CLV_METRIC_VALUE(value), value );
item = proto_tree_add_uint(tree, hf, tvb, offset, 1, value);
support_item = proto_tree_add_uint(tree, hf_support, tvb, offset, 1, value);
if (s && force_supported)
proto_item_append_text(support_item, " (but is required to be)");
if (ISIS_LSP_CLV_METRIC_RESERVED(value))
expert_add_info(pinfo, item, &ei_isis_lsp_reserved_not_zero);
}
/*
@ -1471,7 +1484,7 @@ dissect_lsp_ipv6_reachability_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree
}
len += 1 + subclvs_len;
} else {
proto_tree_add_text (subtree, tvb, offset+4, len, "no sub-TLVs present");
proto_tree_add_uint_format(subtree, hf_isis_lsp_ext_ip_reachability_subclvs_len, tvb, offset, len, 0, "no sub-TLVs present");
}
offset += len;
length -= len;
@ -1735,8 +1748,7 @@ dissect_isis_lsp_clv_mt_cap_spb_instance(tvbuff_t *tvb, packet_info *pinfo,
/*************************/
if (sublen != (num_trees * VLAN_ID_TUPLE_LEN)) {
proto_tree_add_text( subtree, tvb, subofs, 0,
"SubTLV length doesn't match number of trees");
proto_tree_add_expert_format( subtree, pinfo, &ei_isis_lsp_short_packet, tvb, subofs, 0, "SubTLV length doesn't match number of trees");
return;
}
while (sublen > 0 && num_trees > 0) {
@ -2220,8 +2232,7 @@ dissect_lsp_eis_neighbors_clv_inner(tvbuff_t *tvb, packet_info *pinfo, proto_tre
if ( tree ) {
if ( show_virtual ) {
/* virtual path flag */
proto_tree_add_text ( tree, tvb, offset, 1,
tvb_get_guint8(tvb, offset) ? "IsVirtual" : "IsNotVirtual" );
proto_tree_add_item( tree, hf_isis_lsp_is_virtual, tvb, offset, 1, ENC_NA);
} else {
proto_tree_add_item(tree, hf_isis_lsp_eis_neighbors_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
@ -2378,7 +2389,7 @@ dissect_subclv_admin_group (tvbuff_t *tvb, proto_tree *tree, int offset) {
mask = 1;
for (i = 0 ; i < 32 ; i++) {
if ( (clv_value & mask) != 0 ) {
proto_tree_add_text (ntree, tvb, offset, 4, "group %d", i);
proto_tree_add_uint_format(ntree, hf_isis_lsp_group, tvb, offset, 4, clv_value & mask, "group %d", i);
}
mask <<= 1;
}
@ -3026,14 +3037,14 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *
return;
}
if ( tree ) {
dissect_metric (tvb, tree, offset,
tvb_get_guint8(tvb, offset), "Default", TRUE );
dissect_metric (tvb, tree, offset+1,
tvb_get_guint8(tvb, offset+1), "Delay", FALSE );
dissect_metric (tvb, tree, offset+2,
tvb_get_guint8(tvb, offset+2), "Expense", FALSE );
dissect_metric (tvb, tree, offset+3,
tvb_get_guint8(tvb, offset+3), "Error", FALSE );
dissect_metric (tvb, pinfo, tree, offset,
tvb_get_guint8(tvb, offset), hf_isis_lsp_default, hf_isis_lsp_default_support, TRUE );
dissect_metric (tvb, pinfo, tree, offset+1,
tvb_get_guint8(tvb, offset+1), hf_isis_lsp_delay, hf_isis_lsp_delay_support, FALSE );
dissect_metric (tvb, pinfo, tree, offset+2,
tvb_get_guint8(tvb, offset+2), hf_isis_lsp_expense, hf_isis_lsp_expense_support, FALSE );
dissect_metric (tvb, pinfo, tree, offset+3,
tvb_get_guint8(tvb, offset+3), hf_isis_lsp_error, hf_isis_lsp_error_support, FALSE );
}
offset += 4;
length -= 4;
@ -3057,10 +3068,8 @@ dissect_lsp_prefix_neighbors_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *
*/
sbuf = print_area( tvb, offset+1, mylen );
/* and spit it out */
if ( tree ) {
proto_tree_add_text ( tree, tvb, offset, mylen + 1,
"Area address (%d): %s", mylen, sbuf );
}
proto_tree_add_string( tree, hf_isis_lsp_area_address_str, tvb, offset, mylen + 1, sbuf);
offset += mylen + 1;
length -= mylen; /* length already adjusted for len fld*/
}
@ -4771,6 +4780,61 @@ proto_register_isis_lsp(void)
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_area_address_str,
{ "Area address", "isis.lsp.area_address_str",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_is_virtual,
{ "IsVirtual", "isis.lsp.is_virtual",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_group,
{ "Group", "isis.lsp.group",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_default,
{ "Default", "isis.lsp.default",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_default_support,
{ "Default", "isis.lsp.default_support",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_isis_lsp_delay,
{ "Delay", "isis.lsp.delay",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_delay_support,
{ "Delay", "isis.lsp.delay_support",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_isis_lsp_expense,
{ "Expense", "isis.lsp.expense",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_expense_support,
{ "Expense", "isis.lsp.expense_support",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
{ &hf_isis_lsp_error,
{ "Error", "isis.lsp.error",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_error_support,
{ "Error", "isis.lsp.error_support",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
NULL, HFILL }
},
};
static gint *ett[] = {
&ett_isis_lsp,
@ -4844,6 +4908,7 @@ proto_register_isis_lsp(void)
{ &ei_isis_lsp_authentication, { "isis.lsp.authentication.unknown", PI_PROTOCOL, PI_WARN, "Unknown authentication type", EXPFILL }},
{ &ei_isis_lsp_clv_mt, { "isis.lsp.clv_mt.malformed", PI_MALFORMED, PI_ERROR, "malformed MT-ID", EXPFILL }},
{ &ei_isis_lsp_malformed_subtlv, { "isis.lsp.subtlv.malformed", PI_MALFORMED, PI_ERROR, "malformed SubTLV", EXPFILL }},
{ &ei_isis_lsp_reserved_not_zero, { "isis.lsp.reserved_not_zero", PI_PROTOCOL, PI_WARN, "Reserve bit not 0", EXPFILL }},
};
expert_module_t* expert_isis_lsp;

View File

@ -2816,6 +2816,7 @@ static int hf_ansi_isup_cause_indicator = -1;
static int hf_isup_suspend_resume_indicator = -1;
static int hf_isup_range_indicator = -1;
static int hf_isup_bitbucket = -1;
static int hf_isup_cgs_message_type = -1;
static int hf_isup_mtc_blocking_state1 = -1;
@ -2944,6 +2945,7 @@ static int hf_late_cut_trough_cap_ind = -1;
static int hf_bat_ase_signal = -1;
static int hf_bat_ase_duration = -1;
static int hf_bat_ase_bearer_redir_ind = -1;
static int hf_bat_ase_default = -1;
static int hf_BAT_ASE_Comp_Report_Reason = -1;
static int hf_BAT_ASE_Comp_Report_ident = -1;
static int hf_BAT_ASE_Comp_Report_diagnostic = -1;
@ -3930,9 +3932,8 @@ dissect_isup_range_and_status_parameter(tvbuff_t *parameter_tvb, packet_info *pi
if (actual_status_length > 0) {
range_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb, offset, -1, ett_isup_range, NULL, "Status subfield");
if (range<9) {
proto_tree_add_text(range_tree, parameter_tvb , offset, 1, "Bit %u %s bit 1",
range,
decode_bits_in_field(8-range, range, tvb_get_guint8(parameter_tvb, offset)));
proto_tree_add_uint_bits_format_value(range_tree, hf_isup_bitbucket, parameter_tvb, (offset*8)+(8-range), range,
tvb_get_guint8(parameter_tvb, offset), "%u bit 1", range);
}
} else {
expert_add_info(pinfo, parameter_item, &ei_isup_status_subfield_not_present);
@ -4669,7 +4670,7 @@ dissect_codec(tvbuff_t *parameter_tvb, proto_tree *bat_ase_element_tree, gint le
static void
dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, gint offset)
{
gint length = tvb_reported_length_remaining(parameter_tvb, offset), list_end;
gint list_end;
tvbuff_t *next_tvb;
proto_tree *bat_ase_tree, *bat_ase_element_tree, *bat_ase_iwfa_tree;
proto_item *bat_ase_element_item, *bat_ase_iwfa_item;
@ -4689,7 +4690,6 @@ dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, pa
bat_ase_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb, offset, -1, ett_bat_ase, NULL,
"Bearer Association Transport (BAT) Application Service Element (ASE) Encapsulated Application Information:");
proto_tree_add_text(bat_ase_tree, parameter_tvb, offset, -1, "BAT ASE Encapsulated Application Information, (%u byte%s length)", length, plurality(length, "", "s"));
while (tvb_reported_length_remaining(parameter_tvb, offset) > 0) {
element_no = element_no + 1;
identifier = tvb_get_guint8(parameter_tvb, offset);
@ -4936,7 +4936,7 @@ dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, pa
offset = offset + content_len;
break;
default :
proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, content_len , "Default ?, (%u byte%s length)", (content_len), plurality(content_len, "", "s"));
proto_tree_add_item(bat_ase_element_tree, hf_bat_ase_default, parameter_tvb, offset, content_len, ENC_NA);
offset = offset + content_len;
}
}
@ -11318,6 +11318,11 @@ proto_register_isup(void)
FT_UINT8, BASE_DEC, NULL , 0x0,
NULL, HFILL }},
{ &hf_isup_bitbucket,
{ "Bit", "isup.bitbucket",
FT_UINT8, BASE_DEC, NULL , 0x0,
NULL, HFILL }},
{ &hf_isup_cgs_message_type,
{ "Circuit group supervision message type", "isup.cgs_message_type",
FT_UINT8, BASE_DEC, VALS(isup_cgs_message_type_value), BA_8BIT_MASK,
@ -11843,6 +11848,11 @@ proto_register_isup(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_bat_ase_default,
{ "Default", "bat_ase.default",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{ &hf_bat_ase_bearer_redir_ind,
{ "Redirection Indicator", "bat_ase.bearer_redir_ind",
FT_UINT8, BASE_HEX|BASE_EXT_STRING, &Bearer_Redirection_Indicator_vals_ext, 0x0,