From 9e3f9b449f5c25ad7266bdef972212e9f29114f7 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 9 Sep 2013 00:44:09 +0000 Subject: expert_add_info_format_text -> expert_add_info_format svn path=/trunk/; revision=51852 --- epan/dissectors/packet-6lowpan.c | 4 +- epan/dissectors/packet-afp.c | 8 +- epan/dissectors/packet-amqp.c | 36 +++--- epan/dissectors/packet-arp.c | 4 +- epan/dissectors/packet-assa_r3.c | 46 ++++---- epan/dissectors/packet-bacapp.c | 4 +- epan/dissectors/packet-banana.c | 10 +- epan/dissectors/packet-ber.c | 54 ++++----- epan/dissectors/packet-bfcp.c | 2 +- epan/dissectors/packet-bfd.c | 2 +- epan/dissectors/packet-bgp.c | 20 ++-- epan/dissectors/packet-bootp.c | 136 +++++++++++----------- epan/dissectors/packet-bthcrp.c | 6 +- epan/dissectors/packet-btl2cap.c | 6 +- epan/dissectors/packet-btmcap.c | 4 +- epan/dissectors/packet-btobex.c | 8 +- epan/dissectors/packet-btrfcomm.c | 2 +- epan/dissectors/packet-btsap.c | 2 +- epan/dissectors/packet-capwap.c | 2 +- epan/dissectors/packet-catapult-dct2000.c | 2 +- epan/dissectors/packet-clnp.c | 16 +-- epan/dissectors/packet-cnip.c | 2 +- epan/dissectors/packet-coap.c | 10 +- epan/dissectors/packet-collectd.c | 18 +-- epan/dissectors/packet-cops.c | 4 +- epan/dissectors/packet-ctdb.c | 2 +- epan/dissectors/packet-dbus.c | 2 +- epan/dissectors/packet-dccp.c | 34 +++--- epan/dissectors/packet-dcerpc-epm.c | 2 +- epan/dissectors/packet-dcerpc.c | 12 +- epan/dissectors/packet-dcm.c | 8 +- epan/dissectors/packet-dcom.c | 6 +- epan/dissectors/packet-dhcp-failover.c | 38 +++--- epan/dissectors/packet-dhcpv6.c | 128 ++++++++++----------- epan/dissectors/packet-diameter.c | 14 +-- epan/dissectors/packet-dlsw.c | 2 +- epan/dissectors/packet-dmp.c | 8 +- epan/dissectors/packet-dns.c | 6 +- epan/dissectors/packet-drda.c | 2 +- epan/dissectors/packet-dtls.c | 2 +- epan/dissectors/packet-dtn.c | 54 ++++----- epan/dissectors/packet-dvbci.c | 6 +- epan/dissectors/packet-eigrp.c | 14 +-- epan/dissectors/packet-eiss.c | 4 +- epan/dissectors/packet-erf.c | 18 +-- epan/dissectors/packet-eth.c | 2 +- epan/dissectors/packet-etv.c | 6 +- epan/dissectors/packet-fc.c | 2 +- epan/dissectors/packet-fcels.c | 4 +- epan/dissectors/packet-fcoe.c | 2 +- epan/dissectors/packet-fcoib.c | 2 +- epan/dissectors/packet-forces.c | 16 +-- epan/dissectors/packet-frame.c | 4 +- epan/dissectors/packet-giop.c | 28 ++--- epan/dissectors/packet-glbp.c | 6 +- epan/dissectors/packet-gmhdr.c | 10 +- epan/dissectors/packet-gtp.c | 6 +- epan/dissectors/packet-h450-ros.c | 6 +- epan/dissectors/packet-hpfeeds.c | 2 +- epan/dissectors/packet-hpsw.c | 28 ++--- epan/dissectors/packet-http.c | 2 +- epan/dissectors/packet-iax2.c | 6 +- epan/dissectors/packet-icep.c | 26 ++--- epan/dissectors/packet-icmpv6.c | 10 +- epan/dissectors/packet-icq.c | 4 +- epan/dissectors/packet-iec104.c | 2 +- epan/dissectors/packet-ieee80211-radiotap.c | 2 +- epan/dissectors/packet-ieee80211.c | 172 ++++++++++++++-------------- epan/dissectors/packet-ieee802154.c | 14 +-- epan/dissectors/packet-ip.c | 4 +- epan/dissectors/packet-ipv6.c | 14 +-- epan/dissectors/packet-ipxwan.c | 16 +-- epan/dissectors/packet-ixiatrailer.c | 2 +- epan/dissectors/packet-kerberos.c | 2 +- epan/dissectors/packet-lapd.c | 2 +- epan/dissectors/packet-ldap.c | 4 +- epan/dissectors/packet-lisp.c | 24 ++-- epan/dissectors/packet-llrp.c | 14 +-- epan/dissectors/packet-lmp.c | 6 +- epan/dissectors/packet-lon.c | 8 +- epan/dissectors/packet-lte-rrc.c | 8 +- epan/dissectors/packet-ltp.c | 4 +- epan/dissectors/packet-m2pa.c | 2 +- epan/dissectors/packet-mac-lte.c | 90 +++++++-------- epan/dissectors/packet-mbtcp.c | 2 +- epan/dissectors/packet-megaco.c | 26 ++--- epan/dissectors/packet-memcache.c | 18 +-- epan/dissectors/packet-meta.c | 2 +- epan/dissectors/packet-miop.c | 2 +- epan/dissectors/packet-moldudp.c | 4 +- epan/dissectors/packet-moldudp64.c | 4 +- epan/dissectors/packet-mongo.c | 6 +- epan/dissectors/packet-mp2t.c | 4 +- epan/dissectors/packet-mpeg-dsmcc.c | 10 +- epan/dissectors/packet-mpls-echo.c | 54 ++++----- epan/dissectors/packet-mysql.c | 4 +- epan/dissectors/packet-nat-pmp.c | 6 +- epan/dissectors/packet-ncp-nmas.c | 6 +- epan/dissectors/packet-ncp-sss.c | 2 +- epan/dissectors/packet-ncp.c | 10 +- epan/dissectors/packet-ncp2222.inc | 30 ++--- epan/dissectors/packet-ndps.c | 8 +- epan/dissectors/packet-netflow.c | 10 +- epan/dissectors/packet-nfs.c | 2 +- epan/dissectors/packet-nhrp.c | 4 +- epan/dissectors/packet-ntlmssp.c | 4 +- epan/dissectors/packet-omron-fins.c | 10 +- epan/dissectors/packet-opensafety.c | 6 +- epan/dissectors/packet-openwire.c | 6 +- epan/dissectors/packet-ositp.c | 8 +- epan/dissectors/packet-p_mul.c | 6 +- epan/dissectors/packet-pcep.c | 52 ++++----- epan/dissectors/packet-pdcp-lte.c | 14 +-- epan/dissectors/packet-per.c | 12 +- epan/dissectors/packet-pflog.c | 2 +- epan/dissectors/packet-pppoe.c | 12 +- epan/dissectors/packet-pw-atm.c | 44 +++---- epan/dissectors/packet-pw-cesopsn.c | 14 +-- epan/dissectors/packet-pw-fr.c | 10 +- epan/dissectors/packet-pw-satop.c | 10 +- epan/dissectors/packet-q932-ros.c | 6 +- epan/dissectors/packet-reload.c | 96 ++++++++-------- epan/dissectors/packet-rlc-lte.c | 42 +++---- epan/dissectors/packet-rlc.c | 2 +- epan/dissectors/packet-rohc.c | 2 +- epan/dissectors/packet-roofnet.c | 2 +- epan/dissectors/packet-rpcap.c | 4 +- epan/dissectors/packet-rtcp.c | 14 +-- epan/dissectors/packet-rtps.c | 56 ++++----- epan/dissectors/packet-sap.c | 2 +- epan/dissectors/packet-sasp.c | 4 +- epan/dissectors/packet-sctp.c | 6 +- epan/dissectors/packet-sigcomp.c | 2 +- epan/dissectors/packet-sip.c | 2 +- epan/dissectors/packet-slowprotocols.c | 18 +-- epan/dissectors/packet-sml.c | 66 +++++------ epan/dissectors/packet-snmp.c | 2 +- epan/dissectors/packet-srvloc.c | 20 ++-- epan/dissectors/packet-ssh.c | 2 +- epan/dissectors/packet-ssl.c | 6 +- epan/dissectors/packet-tacacs.c | 2 +- epan/dissectors/packet-tcp.c | 8 +- epan/dissectors/packet-tds.c | 12 +- epan/dissectors/packet-telnet.c | 32 +++--- epan/dissectors/packet-tnef.c | 2 +- epan/dissectors/packet-trmac.c | 40 +++---- epan/dissectors/packet-udp.c | 10 +- epan/dissectors/packet-umts_fp.c | 10 +- epan/dissectors/packet-umts_mac.c | 18 +-- epan/dissectors/packet-usb-video.c | 2 +- epan/dissectors/packet-user_encap.c | 4 +- epan/dissectors/packet-vnc.c | 8 +- epan/dissectors/packet-vrrp.c | 2 +- epan/dissectors/packet-vtp.c | 20 ++-- epan/dissectors/packet-wccp.c | 32 +++--- epan/dissectors/packet-wcp.c | 6 +- epan/dissectors/packet-websocket.c | 2 +- epan/dissectors/packet-wifi-display.c | 10 +- epan/dissectors/packet-wifi-p2p.c | 28 ++--- epan/dissectors/packet-wps.c | 52 ++++----- epan/dissectors/packet-xmcp.c | 20 ++-- epan/dissectors/packet-xmpp-core.c | 6 +- epan/dissectors/packet-xmpp-utils.c | 10 +- epan/dissectors/packet-xmpp.c | 2 +- epan/dissectors/packet-xtp.c | 4 +- 165 files changed, 1226 insertions(+), 1226 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c index c42e49e508..020cdbdf73 100644 --- a/epan/dissectors/packet-6lowpan.c +++ b/epan/dissectors/packet-6lowpan.c @@ -2297,7 +2297,7 @@ dissect_6lowpan_frag_first(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, else if (tvb_get_bits8(frag_tvb, 0, LOWPAN_PATTERN_HC1_BITS) == LOWPAN_PATTERN_HC1) { /* Check if the datagram size is sane. */ if (dgram_size < (gint)sizeof(struct ip6_hdr)) { - expert_add_info_format_text(pinfo, length_item, &ei_6lowpan_bad_ipv6_header_length, + expert_add_info_format(pinfo, length_item, &ei_6lowpan_bad_ipv6_header_length, "Length is less than IPv6 header length %u", (guint)sizeof(struct ip6_hdr)); } frag_tvb = dissect_6lowpan_hc1(frag_tvb, pinfo, tree, dgram_size, siid, diid); @@ -2305,7 +2305,7 @@ dissect_6lowpan_frag_first(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, else if (tvb_get_bits8(frag_tvb, 0, LOWPAN_PATTERN_IPHC_BITS) == LOWPAN_PATTERN_IPHC) { /* Check if the datagram size is sane. */ if (dgram_size < (gint)sizeof(struct ip6_hdr)) { - expert_add_info_format_text(pinfo, length_item, &ei_6lowpan_bad_ipv6_header_length, + expert_add_info_format(pinfo, length_item, &ei_6lowpan_bad_ipv6_header_length, "Length is less than IPv6 header length %u", (guint)sizeof(struct ip6_hdr)); } frag_tvb = dissect_6lowpan_iphc(frag_tvb, pinfo, tree, dgram_size, siid, diid); diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c index 255b313ec3..610933101c 100644 --- a/epan/dissectors/packet-afp.c +++ b/epan/dissectors/packet-afp.c @@ -4066,7 +4066,7 @@ spotlight_date(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, offset += 8; if (count > SUBQ_SAFETY_LIM) { - expert_add_info_format_text(pinfo, tree, &ei_afp_subquery_count_over_safety_limit, + expert_add_info_format(pinfo, tree, &ei_afp_subquery_count_over_safety_limit, "Subquery count (%d) > safety limit (%d)", count, SUBQ_SAFETY_LIM); return -1; } @@ -4297,12 +4297,12 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree subquery_count = (gint)(query_data64 >> 32); if (subquery_count > count) { item_query = proto_tree_add_text(tree, tvb, offset, query_length, "null"); - expert_add_info_format_text(pinfo, item_query, &ei_afp_subquery_count_over_query_count, + expert_add_info_format(pinfo, item_query, &ei_afp_subquery_count_over_query_count, "Subquery count (%d) > query count (%d)", subquery_count, count); count = 0; } else if (subquery_count > 20) { item_query = proto_tree_add_text(tree, tvb, offset, query_length, "null"); - expert_add_info_format_text(pinfo, item_query, &ei_afp_abnormal_num_subqueries, + expert_add_info_format(pinfo, item_query, &ei_afp_abnormal_num_subqueries, "Abnormal number of subqueries (%d)", subquery_count); count -= subquery_count; } else { @@ -4689,7 +4689,7 @@ decode_kauth_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse offset += 4; if (entries > AFP_MAX_ACL_ENTRIES) { - expert_add_info_format_text(pinfo, item, &ei_afp_too_many_acl_entries, "Too many ACL entries (%u). Stopping dissection.", entries); + expert_add_info_format(pinfo, item, &ei_afp_too_many_acl_entries, "Too many ACL entries (%u). Stopping dissection.", entries); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c index 6911a17c82..f6c1e00ea0 100644 --- a/epan/dissectors/packet-amqp.c +++ b/epan/dissectors/packet-amqp.c @@ -1829,7 +1829,7 @@ dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Minimal frame size is 8 bytes - smaller frames are malformed */ if (tvb_reported_length (tvb) < 8) { - expert_add_info_format_text(pinfo, NULL, &ei_amqp_bad_length, "Require frame at least 8 bytes long"); + expert_add_info_format(pinfo, NULL, &ei_amqp_bad_length, "Require frame at least 8 bytes long"); return; } @@ -3080,7 +3080,7 @@ dissect_amqp_0_10_execution(tvbuff_t *tvb, proto_tree_add_item(args_tree, class_hf, tvb, offset, 1, ENC_BIG_ENDIAN); else - expert_add_info_format_text(pinfo, args_tree, &ei_amqp_invalid_class_code, "Invalid class code %x", amqp_class); + expert_add_info_format(pinfo, args_tree, &ei_amqp_invalid_class_code, "Invalid class code %x", amqp_class); AMQP_INCREMENT(offset, 1, length); } if (flag1 & 0x10) { @@ -5671,7 +5671,7 @@ dissect_amqp_0_10_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, length); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_command_class, "Unknown command/control class %d", tvb_get_guint8(tvb, offset + 0)); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_command_class, "Unknown command/control class %d", tvb_get_guint8(tvb, offset + 0)); } break; @@ -5701,7 +5701,7 @@ dissect_amqp_0_10_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %d", frame_type); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %d", frame_type); } } @@ -5822,7 +5822,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_connection_method, "Unknown connection method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_connection_method, "Unknown connection method %u", method_id); } break; case AMQP_0_9_CLASS_CHANNEL: @@ -5879,7 +5879,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_channel_method, "Unknown channel method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_channel_method, "Unknown channel method %u", method_id); } break; case AMQP_0_9_CLASS_ACCESS: @@ -5905,7 +5905,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_fence(pinfo->cinfo, COL_INFO); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_access_method, "Unknown access method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_access_method, "Unknown access method %u", method_id); } break; case AMQP_0_9_CLASS_EXCHANGE: @@ -5944,7 +5944,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_exchange_method, "Unknown exchange method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_exchange_method, "Unknown exchange method %u", method_id); } break; case AMQP_0_9_CLASS_QUEUE: @@ -6000,7 +6000,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_queue_method, "Unknown queue method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_queue_method, "Unknown queue method %u", method_id); } break; case AMQP_0_9_CLASS_BASIC: @@ -6077,7 +6077,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_basic_method, "Unknown basic method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_basic_method, "Unknown basic method %u", method_id); } break; case AMQP_0_9_CLASS_FILE: @@ -6150,7 +6150,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_file_method, "Unknown file method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_file_method, "Unknown file method %u", method_id); } break; case AMQP_0_9_CLASS_STREAM: @@ -6203,7 +6203,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_stream_method, "Unknown stream method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_stream_method, "Unknown stream method %u", method_id); } break; case AMQP_0_9_CLASS_TX: @@ -6244,7 +6244,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_tx_method, "Unknown tx method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_tx_method, "Unknown tx method %u", method_id); } break; case AMQP_0_9_CLASS_DTX: @@ -6277,7 +6277,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 11, args_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_dtx_method, "Unknown dtx method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_dtx_method, "Unknown dtx method %u", method_id); } break; case AMQP_0_9_CLASS_TUNNEL: @@ -6296,11 +6296,11 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_fence(pinfo->cinfo, COL_INFO); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_tunnel_method, "Unknown tunnel method %u", method_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_tunnel_method, "Unknown tunnel method %u", method_id); } break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_method_class, "Unknown method class %u", class_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_method_class, "Unknown method class %u", class_id); } break; case AMQP_0_9_FRAME_TYPE_CONTENT_HEADER: @@ -6334,7 +6334,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo, 21, prop_tree); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_header_class, "Unknown header class %u", class_id); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_header_class, "Unknown header class %u", class_id); } col_append_str(pinfo->cinfo, COL_INFO, "Content-Header "); col_set_fence(pinfo->cinfo, COL_INFO); @@ -6346,7 +6346,7 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_fence(pinfo->cinfo, COL_INFO); break; default: - expert_add_info_format_text(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %u", frame_type); + expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_frame_type, "Unknown frame type %u", frame_type); } } diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index 08fae761c9..ea36ae81e5 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -707,7 +707,7 @@ check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tree, ti = proto_tree_add_uint(duplicate_tree, hf_arp_duplicate_ip_address_earlier_frame, tvb, 0, 0, result->frame_num); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, + expert_add_info_format(pinfo, ti, &ei_seq_arp_dup_ip, "Duplicate IP address configured (%s)", arpproaddr_to_str((guint8*)&ip, 4, ETHERTYPE_IP)); @@ -814,7 +814,7 @@ check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) global_arp_detect_request_storm_packets, global_arp_detect_request_storm_period); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, + expert_add_info_format(pinfo, ti, &ei_seq_arp_storm, "ARP packet storm detected (%u packets in < %u ms)", global_arp_detect_request_storm_packets, diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c index 9f5a69a738..777781d30a 100644 --- a/epan/dissectors/packet-assa_r3.c +++ b/epan/dissectors/packet-assa_r3.c @@ -3551,7 +3551,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, if (fieldLength < 2) { dataLength = 0; - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed length value -- all fields are at least 2 octets."); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed length value -- all fields are at least 2 octets."); } offset += 2; @@ -3608,7 +3608,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, { if (dataLength != 9) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed event log field -- expected 9 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed event log field -- expected 9 octets"); } else { @@ -3637,7 +3637,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, { if (dataLength != 8) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed date/time field -- expected 8 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed date/time field -- expected 8 octets"); } else { @@ -3669,7 +3669,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, if (dataLength != 49) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed declined log field -- expected 49 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed declined log field -- expected 49 octets"); } else { @@ -3707,7 +3707,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, { if (dataLength != 3) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed expiration field -- expected 3 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed expiration field -- expected 3 octets"); } else { @@ -3732,7 +3732,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, { if (dataLength != 4) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed timezone field -- expected 4 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed timezone field -- expected 4 octets"); } else { @@ -3758,7 +3758,7 @@ dissect_r3_upstreamfields (tvbuff_t *tvb, guint32 start_offset, guint32 length, { if (dataLength != 9) { - expert_add_info_format_text(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed alarm log field -- expected 9 octets"); + expert_add_info_format(pinfo, upstreamfield_length, &ei_r3_malformed_length, "Malformed alarm log field -- expected 9 octets"); } else { @@ -3847,7 +3847,7 @@ dissect_r3_upstreamcommand_dumpeventlog (tvbuff_t *tvb, guint32 start_offset, gu if (length != 11) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Malformed event log record -- expected 10 octets"); + expert_add_info_format(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Malformed event log record -- expected 10 octets"); } else { @@ -3927,7 +3927,7 @@ dissect_r3_upstreamcommand_queryconfig (tvbuff_t *tvb, guint32 start_offset, gui pi = proto_tree_add_item (upstreamfield_tree, hf_r3_configitemlength, tvb, offset + 0, 1, ENC_LITTLE_ENDIAN); if (item_length == 0) { - expert_add_info_format_text(pinfo, pi, &ei_r3_malformed_length, "Invalid item length"); + expert_add_info_format(pinfo, pi, &ei_r3_malformed_length, "Invalid item length"); return; } @@ -4177,7 +4177,7 @@ dissect_r3_upstreammfgfield_iopins (tvbuff_t *tvb, guint32 start_offset, guint32 len = MAX(0, tvb_length_remaining(tvb, start_offset)); if (len % 3 != 0) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "IOPINS data length not modulo 3 == 0"); + expert_add_info_format(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "IOPINS data length not modulo 3 == 0"); } else { @@ -4746,7 +4746,7 @@ dissect_r3_upstreammfgfield_dumpm41t81 (tvbuff_t *tvb, guint32 start_offset, gui if (tvb_length_remaining (tvb, 0) != 20) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Length of M41T81 RTC register dump not 20 octets"); + expert_add_info_format(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Length of M41T81 RTC register dump not 20 octets"); } else { @@ -4865,7 +4865,7 @@ dissect_r3_upstreammfgfield_checksumresults (tvbuff_t *tvb, guint32 start_offset len = MAX(0, tvb_length_remaining(tvb, 0)); if (len % 3 != 0) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Checksum results data length not modulo 3 == 0"); + expert_add_info_format(pinfo, proto_tree_get_parent (tree), &ei_r3_malformed_length, "Checksum results data length not modulo 3 == 0"); } else { @@ -5223,7 +5223,7 @@ dissect_r3_cmd_setconfig (tvbuff_t *tvb, guint32 start_offset, guint32 length _U sc_item = proto_tree_add_item (sc_tree, hf_r3_configitemlength, payload_tvb, offset + 0, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item (sc_tree, hf_r3_configitem, payload_tvb, offset + 1, 1, ENC_LITTLE_ENDIAN); if (item_length == 0) { - expert_add_info_format_text(pinfo, sc_item, &ei_r3_malformed_length, "Invalid item length"); + expert_add_info_format(pinfo, sc_item, &ei_r3_malformed_length, "Invalid item length"); return; } @@ -5327,7 +5327,7 @@ dissect_r3_cmd_manageuser (tvbuff_t *tvb, guint32 start_offset, guint32 length _ if (paramLength < 2) { dataLength = 0; - expert_add_info_format_text(pinfo, len_field, &ei_r3_malformed_length, "Malformed length value -- all fields are at least 2 octets."); + expert_add_info_format(pinfo, len_field, &ei_r3_malformed_length, "Malformed length value -- all fields are at least 2 octets."); } offset += 2; @@ -5345,7 +5345,7 @@ dissect_r3_cmd_manageuser (tvbuff_t *tvb, guint32 start_offset, guint32 length _ case ADDUSERPARAMTYPE_EXCEPTIONGROUP : if (dataLength != 1) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed field -- expected 1 octet"); + expert_add_info_format(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed field -- expected 1 octet"); } else proto_tree_add_item (mu_tree, hf_r3_adduserparamtypearray [paramType], payload_tvb, offset, dataLength, ENC_LITTLE_ENDIAN); @@ -5354,7 +5354,7 @@ dissect_r3_cmd_manageuser (tvbuff_t *tvb, guint32 start_offset, guint32 length _ case ADDUSERPARAMTYPE_USERNO : if (dataLength != 2) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed field -- expected 2 octets"); + expert_add_info_format(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed field -- expected 2 octets"); } else proto_tree_add_item (mu_tree, hf_r3_adduserparamtypearray [paramType], payload_tvb, offset, dataLength, ENC_LITTLE_ENDIAN); @@ -5369,7 +5369,7 @@ dissect_r3_cmd_manageuser (tvbuff_t *tvb, guint32 start_offset, guint32 length _ { if (dataLength != 3) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed expiration field -- expected 3 octets"); + expert_add_info_format(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed expiration field -- expected 3 octets"); } else { @@ -5397,7 +5397,7 @@ dissect_r3_cmd_manageuser (tvbuff_t *tvb, guint32 start_offset, guint32 length _ { if (dataLength != 4) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed timezone field -- expected 4 octets"); + expert_add_info_format(pinfo, proto_tree_get_parent (mu_tree), &ei_r3_malformed_length, "Malformed timezone field -- expected 4 octets"); } else { @@ -5713,7 +5713,7 @@ dissect_r3_cmd_alarmconfigure (tvbuff_t *tvb, guint32 start_offset, guint32 leng alarm_len = tvb_get_guint8 (payload_tvb, offset + 0); pi = proto_tree_add_item (alarmcfg_tree, hf_r3_alarm_length, payload_tvb, offset + 0, 1, ENC_LITTLE_ENDIAN); if (alarm_len == 0) { - expert_add_info_format_text (pinfo, pi, &ei_r3_malformed_length, + expert_add_info_format (pinfo, pi, &ei_r3_malformed_length, "Alarm length equal to 0. Payload could be partially decoded"); break; } @@ -6296,7 +6296,7 @@ dissect_r3_cmdmfg_forceoptions (tvbuff_t *tvb, guint32 start_offset, guint32 len case 4 : proto_tree_add_item (force_tree, hf_r3_forceoptions_state_32, tvb, start_offset + i + 2, 4, ENC_LITTLE_ENDIAN); break; default : - expert_add_info_format_text(pinfo, force_item_item, &ei_r3_malformed_length, "Invalid length for Forceoptions State entry"); + expert_add_info_format(pinfo, force_item_item, &ei_r3_malformed_length, "Invalid length for Forceoptions State entry"); return; /* quit */ break; } @@ -6470,7 +6470,7 @@ dissect_r3_cmdmfg_peekpoke (tvbuff_t *tvb, guint32 start_offset, guint32 length break; default : - expert_add_info_format_text(pinfo, peekpoke_op_item, &ei_r3_peekpoke_operation, "Unknown Mfg peekpoke operation value"); + expert_add_info_format(pinfo, peekpoke_op_item, &ei_r3_peekpoke_operation, "Unknown Mfg peekpoke operation value"); return; /* quit */ } } @@ -6619,7 +6619,7 @@ dissect_r3_command (tvbuff_t *tvb, guint32 start_offset, guint32 length, packet_ if (cmd >= CMDMFG_LAST) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (cmd_tree), &ei_r3_unknown_command_value, "Unknown manufacturing command value"); + expert_add_info_format(pinfo, proto_tree_get_parent (cmd_tree), &ei_r3_unknown_command_value, "Unknown manufacturing command value"); } else if (r3commandmfg_dissect [cmd]) (*r3commandmfg_dissect [cmd]) (tvb, start_offset, length, pinfo, cmd_tree); @@ -6685,7 +6685,7 @@ dissect_r3_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *r3_tree) octConsumed = dissect_r3_command (tvb, offset, 0, pinfo, payload_tree); if(octConsumed == 0) { - expert_add_info_format_text(pinfo, proto_tree_get_parent (payload_tree), &ei_r3_malformed_length, + expert_add_info_format(pinfo, proto_tree_get_parent (payload_tree), &ei_r3_malformed_length, "Command length equal to 0. Payload could be partially decoded"); offset = tvb_reported_length (tvb) - 3; /* just do CRC stuff ?? */ break; diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c index 6e413ac2a9..ab46a920c4 100644 --- a/epan/dissectors/packet-bacapp.c +++ b/epan/dissectors/packet-bacapp.c @@ -5128,7 +5128,7 @@ fTagHeaderTree (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } /* if (tree) */ if (*lvt > tvb_length(tvb)) { - expert_add_info_format_text(pinfo, ti, &ei_bacapp_bad_length, + expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length, "LVT length too long: %d > %d", *lvt, tvb_length(tvb)); *lvt = 1; @@ -5225,7 +5225,7 @@ fDevice_Instance (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off ti = proto_tree_add_item(tree, hf, tvb, offset+tag_len, safe_lvt, ENC_BIG_ENDIAN); if (lvt != safe_lvt) - expert_add_info_format_text(pinfo, ti, &ei_bacapp_bad_length, + expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length, "This field claims to be an impossible %u bytes, while the max is %u", lvt, safe_lvt); subtree = proto_item_add_subtree(ti, ett_bacapp_tag); diff --git a/epan/dissectors/packet-banana.c b/epan/dissectors/packet-banana.c index 5eff7cad4c..f59262f494 100644 --- a/epan/dissectors/packet-banana.c +++ b/epan/dissectors/packet-banana.c @@ -149,7 +149,7 @@ dissect_banana_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int if (is_element(byte)) { break; } else { - expert_add_info_format_text(pinfo, NULL, &ei_banana_unknown_type, "Unknown type %u", byte); + expert_add_info_format(pinfo, NULL, &ei_banana_unknown_type, "Unknown type %u", byte); } } else { val_len++; @@ -164,7 +164,7 @@ dissect_banana_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int switch (byte) { case BE_LIST: if (val > MAX_ELEMENT_VAL) { - expert_add_info_format_text(pinfo, NULL, &ei_banana_length_too_long, "List length %" G_GINT64_MODIFIER "d longer than we can handle", val); + expert_add_info_format(pinfo, NULL, &ei_banana_length_too_long, "List length %" G_GINT64_MODIFIER "d longer than we can handle", val); } ti = proto_tree_add_uint_format_value(tree, hf_banana_list, tvb, start_offset, offset - start_offset - 1, (guint32) val, "(%d items)", (gint) val); list_tree = proto_item_add_subtree(ti, ett_list); @@ -178,20 +178,20 @@ dissect_banana_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int break; case BE_INT: if (val > MAX_ELEMENT_VAL) { - expert_add_info_format_text(pinfo, NULL, &ei_banana_value_too_large, "Integer value %" G_GINT64_MODIFIER "d too large", val); + expert_add_info_format(pinfo, NULL, &ei_banana_value_too_large, "Integer value %" G_GINT64_MODIFIER "d too large", val); } proto_tree_add_uint(tree, hf_banana_int, tvb, start_offset, offset - start_offset, (guint32) val); break; case BE_STRING: if (val > MAX_ELEMENT_VAL) { - expert_add_info_format_text(pinfo, NULL, &ei_banana_length_too_long, "String length %" G_GINT64_MODIFIER "d longer than we can handle", val); + expert_add_info_format(pinfo, NULL, &ei_banana_length_too_long, "String length %" G_GINT64_MODIFIER "d longer than we can handle", val); } proto_tree_add_item(tree, hf_banana_string, tvb, offset, (guint32) val, ENC_ASCII|ENC_NA); offset += (gint) val; break; case BE_NEG_INT: if (val > MAX_ELEMENT_VAL) { - expert_add_info_format_text(pinfo, NULL, &ei_banana_value_too_large, "Integer value -%" G_GINT64_MODIFIER "d too large", val); + expert_add_info_format(pinfo, NULL, &ei_banana_value_too_large, "Integer value -%" G_GINT64_MODIFIER "d too large", val); } proto_tree_add_int(tree, hf_banana_neg_int, tvb, start_offset, offset - start_offset, (gint32) val * -1); break; diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index dcd54b1efb..39b05c6470 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -502,12 +502,12 @@ static void ber_check_length (guint32 length, gint32 min_len, gint32 max_len, asn1_ctx_t *actx, proto_item *item, gboolean bit) { if ((min_len != -1) && (length < (guint32)min_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_string, "Size constraint: %sstring too short: %d (%d .. %d)", bit ? "bit " : "", length, min_len, max_len); } else if ((max_len != -1) && (length > (guint32)max_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_string, "Size constraint: %sstring too long: %d (%d .. %d)", bit ? "bit " : "", length, min_len, max_len); @@ -518,12 +518,12 @@ static void ber_check_value64 (gint64 value, gint64 min_len, gint64 max_len, asn1_ctx_t *actx, proto_item *item) { if ((min_len != -1) && (value < min_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_value, "Size constraint: value too small: %" G_GINT64_MODIFIER "d (%" G_GINT64_MODIFIER "d .. %" G_GINT64_MODIFIER "d)", value, min_len, max_len); } else if ((max_len != -1) && (value > max_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_value, "Size constraint: value too big: %" G_GINT64_MODIFIER "d (%" G_GINT64_MODIFIER "d .. %" G_GINT64_MODIFIER "d)", value, min_len, max_len); @@ -534,12 +534,12 @@ static void ber_check_value (guint32 value, gint32 min_len, gint32 max_len, asn1_ctx_t *actx, proto_item *item) { if ((min_len != -1) && (value < (guint32)min_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_value, "Size constraint: value too small: %d (%d .. %d)", value, min_len, max_len); } else if ((max_len != -1) && (value > (guint32)max_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_value, "Size constraint: value too big: %d (%d .. %d)", value, min_len, max_len); @@ -550,12 +550,12 @@ static void ber_check_items (int cnt, gint32 min_len, gint32 max_len, asn1_ctx_t *actx, proto_item *item) { if ((min_len != -1) && (cnt < min_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_items, "Size constraint: too few items: %d (%d .. %d)", cnt, min_len, max_len); } else if ((max_len != -1) && (cnt > max_len)) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_size_constraint_items, "Size constraint: too many items: %d (%d .. %d)", cnt, min_len, max_len); @@ -641,7 +641,7 @@ ber_add_bad_length_error(packet_info *pinfo, proto_tree *tree, tree, hf_ber_error, tvb, start, length, "illegal_length", "%s: length of item (%d) is not valid", name, length); - expert_add_info_format_text( + expert_add_info_format( pinfo, ti, &ei_ber_error_length, "Length of item (%d) is not valid", length); return ti; @@ -1755,7 +1755,7 @@ printf("INTEGERnew dissect_ber_integer(%s) entered implicit_tag:%d \n", name, im tree, hf_ber_error, tvb, offset-len, len, "invalid length", "BER Error: Can't handle integer length: %u", len); - expert_add_info_format_text(actx->pinfo, pi, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, pi, &ei_ber_error_length, "BER Error: Illegal integer length: %u", len); } else { header_field_info* hfi; @@ -1785,7 +1785,7 @@ printf("INTEGERnew dissect_ber_integer(%s) entered implicit_tag:%d \n", name, im } if (used_too_many_bytes) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, actx->created_item, &ei_ber_value_too_many_bytes, "Value is encoded with too many bytes(9 leading zero or one bits), hf_abbr: %s", hfi->abbrev); @@ -2269,7 +2269,7 @@ printf("SEQUENCE dissect_ber_sequence(%s) subdissector ate %d bytes\n", name, co tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "BER Error: Sequence ate %d too many bytes", offset - end_offset); - expert_add_info_format_text(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in Sequence"); } if (ind) { @@ -2628,7 +2628,7 @@ printf("SEQUENCE dissect_ber_old_sequence(%s) subdissector ate %d bytes\n", name tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "BER Error: Sequence ate %d too many bytes", offset - end_offset); - expert_add_info_format_text(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in Sequence"); } if (ind) { @@ -2907,7 +2907,7 @@ printf("SET dissect_ber_set(%s) calling subdissector\n", name); tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "BER Error: SET ate %d too many bytes", offset - end_offset); - expert_add_info_format_text(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in SET"); } @@ -3181,7 +3181,7 @@ printf("SET dissect_old_ber_set(%s) calling subdissector\n", name); tree, hf_ber_error, tvb, offset-2, 2, "illegal_length", "BER Error: SET ate %d too many bytes", offset - end_offset); - expert_add_info_format_text(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: too many bytes in SET"); } @@ -4000,11 +4000,11 @@ printf("SQ OF dissect_ber_sq_of(%s) entered\n", name); classx, pcx ? ber_pc_codes_short.true_string : ber_pc_codes_short.false_string, tagx); if (type == BER_UNI_TAG_SEQUENCE) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, causex, &ei_ber_expected_set, "BER Error: Set Of expected"); } else { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, causex, &ei_ber_expected_sequence, "BER Error: Sequence Of expected"); } @@ -4119,7 +4119,7 @@ printf("SQ OF dissect_ber_sq_of(%s) entered\n", name); "BER Error: Wrong field in SQ OF(tag %u expected %u)", tag, seq->tag); - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, cause, &ei_ber_sequence_field_wrong, "BER Error: Wrong field in Sequence Of"); if (decode_unexpected) { @@ -4171,7 +4171,7 @@ printf("SQ OF dissect_ber_sq_of(%s) entered\n", name); "BER Error: %s Of ate %d too many bytes", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence", offset - end_offset); - expert_add_info_format_text(actx->pinfo, causex, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, "BER Error:too many byte in %s", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence"); } @@ -4241,11 +4241,11 @@ printf("SQ OF dissect_ber_old_sq_of(%s) entered\n", name); pcx ? ber_pc_codes_short.true_string : ber_pc_codes_short.false_string, tagx); if (type == BER_UNI_TAG_SEQUENCE) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, causex, &ei_ber_expected_set, "BER Error: Set Of expected"); } else { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, causex, &ei_ber_expected_sequence, "BER Error: Sequence Of expected"); } @@ -4354,7 +4354,7 @@ printf("SQ OF dissect_ber_old_sq_of(%s) entered\n", name); cause = proto_tree_add_string_format( tree, hf_ber_error, tvb, offset, len, "wrong_field", "BER Error: Wrong field in SQ OF"); - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, cause, &ei_ber_sequence_field_wrong, "BER Error: Wrong field in Sequence Of"); if (decode_unexpected) { @@ -4402,7 +4402,7 @@ printf("SQ OF dissect_ber_old_sq_of(%s) entered\n", name); "BER Error: %s Of ate %d too many bytes", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence", offset-end_offset); - expert_add_info_format_text(actx->pinfo, causex, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, causex, &ei_ber_error_length, "BER Error:too many byte in %s", (type == BER_UNI_TAG_SEQUENCE) ? "Set" : "Sequence"); } @@ -4494,7 +4494,7 @@ dissect_ber_GeneralizedTime(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree tree, hf_ber_error, tvb, offset, len, "illegal_length", "BER Error: GeneralizedTime invalid length: %u", len); - expert_add_info_format_text(actx->pinfo, cause, &ei_ber_error_length, + expert_add_info_format(actx->pinfo, cause, &ei_ber_error_length, "BER Error: GeneralizedTime invalid length"); if (decode_unexpected) { proto_tree *unknown_tree = proto_item_add_subtree(cause, ett_ber_unknown); @@ -4786,7 +4786,7 @@ dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto /* padding */ proto_item *pad_item = proto_tree_add_item(parent_tree, hf_ber_bitstring_padding, tvb, offset, 1, ENC_BIG_ENDIAN); if (pad > 7) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, pad_item, &ei_ber_illegal_padding, "Illegal padding (0 .. 7): %d", pad); } @@ -4849,7 +4849,7 @@ dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto for (byteno = 0; byteno < len; byteno++) { if (bitstring[byteno]) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_bits_unknown, "Unknown bit(s): 0x%s", bytes_to_str(bitstring, len)); break; @@ -4860,7 +4860,7 @@ dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, proto if ((pad > 0) && (pad < 8) && (len > 0)) { guint8 bits_in_pad = tvb_get_guint8(tvb, offset + len - 1) & (0xFF >> (8-pad)); if (bits_in_pad) { - expert_add_info_format_text( + expert_add_info_format( actx->pinfo, item, &ei_ber_bits_set_padded, "Bits set in padded area: 0x%02x", bits_in_pad); } diff --git a/epan/dissectors/packet-bfcp.c b/epan/dissectors/packet-bfcp.c index 3eaf4dfa86..78399a893f 100644 --- a/epan/dissectors/packet-bfcp.c +++ b/epan/dissectors/packet-bfcp.c @@ -378,7 +378,7 @@ dissect_bfcp_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int break; } if (length < (offset - attr_start_offset)){ - expert_add_info_format_text(pinfo, item, &ei_bfcp_attribute_length_too_small, + expert_add_info_format(pinfo, item, &ei_bfcp_attribute_length_too_small, "Attribute length is too small (%d bytes)", length); break; } diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c index 79c4e6177d..9dda1b2ea0 100644 --- a/epan/dissectors/packet-bfd.c +++ b/epan/dissectors/packet-bfd.c @@ -362,7 +362,7 @@ dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Length of authentication is invalid (%d)", auth_len); proto_item_append_text(auth_item, ": Invalid Authentication Section"); } - expert_add_info_format_text(pinfo, ti, &ei_bfd_auth_len_invalid, + expert_add_info_format(pinfo, ti, &ei_bfd_auth_len_invalid, "Length of authentication section is invalid for Authentication Type: %s", val_to_str(auth_type, bfd_control_auth_type_values, "Unknown Authentication Type (%d)") ); } diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index 0817f7523e..67226bfe61 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -2776,14 +2776,14 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, switch (ctype) { case BGP_CAPABILITY_RESERVED: if (clen != 0) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u wrong, must be = 0", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u wrong, must be = 0", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); } offset += clen; break; case BGP_CAPABILITY_MULTIPROTOCOL: if (clen != 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); offset += clen; } @@ -2804,7 +2804,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, break; case BGP_CAPABILITY_GRACEFUL_RESTART: if ((clen < 6) && (clen != 2)) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u too short, must be greater than 6", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u too short, must be greater than 6", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); offset += clen; } @@ -2846,7 +2846,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, break; case BGP_CAPABILITY_4_OCTET_AS_NUMBER: if (clen != 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); offset += clen; } @@ -2867,7 +2867,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, break; case BGP_CAPABILITY_ADDITIONAL_PATHS: if (clen != 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u is wrong, must be = 4", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); offset += clen; } @@ -2891,7 +2891,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, case BGP_CAPABILITY_ROUTE_REFRESH_CISCO: case BGP_CAPABILITY_ROUTE_REFRESH: if (clen != 0) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u wrong, must be = 0", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u wrong, must be = 0", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); } offset += clen; @@ -2899,7 +2899,7 @@ dissect_bgp_capability_item(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, case BGP_CAPABILITY_ORF_CISCO: case BGP_CAPABILITY_COOPERATIVE_ROUTE_FILTERING: if (clen < 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u too short, must be greater than 6", clen); + expert_add_info_format(pinfo, ti_len, &ei_bgp_cap_len_bad, "Capability length %u too short, must be greater than 6", clen); proto_tree_add_item(cap_tree, hf_bgp_cap_unknown, tvb, offset, clen, ENC_NA); offset += clen; } @@ -4131,7 +4131,7 @@ dissect_bgp_notification(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo) break; default: ti = proto_tree_add_item(tree, hf_bgp_notify_minor_unknown, tvb, offset, 1, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_bgp_notify_minor_unknown, "Unknown notification error (%d)",major_error); + expert_add_info_format(pinfo, ti, &ei_bgp_notify_minor_unknown, "Unknown notification error (%d)",major_error); break; } offset += 1; @@ -4217,7 +4217,7 @@ example 2 p += 2; if (orftype != BGP_ORF_PREFIX_CISCO) { - expert_add_info_format_text(pinfo, ti1, &ei_bgp_route_refresh_orf_type_unknown, "ORFEntry-Unknown (type %u)", orftype); + expert_add_info_format(pinfo, ti1, &ei_bgp_route_refresh_orf_type_unknown, "ORFEntry-Unknown (type %u)", orftype); p += orflen; continue; } @@ -4329,7 +4329,7 @@ dissect_bgp_pdu(tvbuff_t *volatile tvb, packet_info *pinfo, proto_tree *tree, } if (bgp_len < BGP_HEADER_SIZE || bgp_len > BGP_MAX_PACKET_SIZE) { - expert_add_info_format_text(pinfo, ti_len, &ei_bgp_length_invalid, "Length is invalid %u", bgp_len); + expert_add_info_format(pinfo, ti_len, &ei_bgp_length_invalid, "Length is invalid %u", bgp_len); return; } diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 2137b6f17b..f8702f7819 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -1277,7 +1277,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case ipv4: if (total_len != 4) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); break; } @@ -1291,7 +1291,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case ipv4_list: for (i = offset, left = total_len; left > 0; i += 4, left -= 4) { if (left < 4) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); break; } @@ -1314,7 +1314,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_boolean: if (total_len != 1) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 1"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 1"); break; } @@ -1327,7 +1327,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_u_byte: if (total_len != 1) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 1"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 1"); break; } @@ -1340,7 +1340,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_u_short: if (total_len != 2) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 2"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 2"); break; } @@ -1353,7 +1353,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_u_le_short: if (total_len != 2) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 2"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 2"); break; } @@ -1367,7 +1367,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_u_short_list: for (i = offset, left = total_len; left > 0; i += 2, left -= 2) { if (left < 2) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 2"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "Option length isn't a multiple of 2"); break; } @@ -1381,7 +1381,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case val_u_long: if (total_len != 4) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); break; } @@ -1394,7 +1394,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case time_in_s_secs: if (total_len != 4) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); break; } @@ -1411,7 +1411,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, case time_in_u_secs: if (total_len != 4) { - expert_add_info_format_text(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, item, &ei_bootp_bad_length, "length isn't 4"); break; } @@ -1616,7 +1616,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, for (i = optoff, optleft = optlen; optleft > 0; i += 8, optleft -= 8) { if (optleft < 8) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8"); break; } @@ -1629,7 +1629,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, for (i = optoff, optleft = optlen; optleft > 0; i += 8, optleft -= 8) { if (optleft < 8) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 8"); break; } @@ -1682,7 +1682,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 52: /* Option Overload */ if (optlen < 1) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1"); break; } @@ -1893,7 +1893,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, proto_item *vtix; proto_tree *o77_v_tree; if (optlen < 2) { - expert_add_info_format_text(pinfo, v_tree, &ei_bootp_bad_length, "length isn't >= 2"); + expert_add_info_format(pinfo, v_tree, &ei_bootp_bad_length, "length isn't >= 2"); break; } optleft = optlen; @@ -1908,7 +1908,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, tvb, optoff + i, 1, ENC_BIG_ENDIAN); if (byte == 0) { - expert_add_info_format_text(pinfo, vtix, &ei_bootp_bad_length, "UC_Len_%u isn't >= 1 (UC_Len_%u = 0)", user_class_instance_index, user_class_instance_index); + expert_add_info_format(pinfo, vtix, &ei_bootp_bad_length, "UC_Len_%u isn't >= 1 (UC_Len_%u = 0)", user_class_instance_index, user_class_instance_index); break; } optleft -= byte + 1; @@ -1971,7 +1971,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 78: /* SLP Directory Agent Option RFC2610 Added by Greg Morris (gmorris@novell.com)*/ if (optlen < 1) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 1"); break; } optleft = optlen; @@ -1988,7 +1988,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, } for (i = optoff; optleft > 0; i += 4, optleft -= 4) { if (optleft < 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); break; } @@ -2006,7 +2006,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 81: /* Client Fully Qualified Domain Name */ if (optlen < 3) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3"); break; } fqdn_flags = tvb_get_guint8(tvb, optoff); @@ -2048,7 +2048,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, for (i = optoff, optleft = optlen; optleft > 0; i += 4, optleft -= 4) { if (optleft < 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); break; } @@ -2075,7 +2075,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 90: /* DHCP Authentication */ case 210: /* Was this used for authentication at one time? */ if (optlen < 11) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 11"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 11"); break; } optleft = optlen; @@ -2128,7 +2128,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, break; } else { if (optlen < 31) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 31"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 31"); break; } @@ -2197,9 +2197,9 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 117: /* The Name Service Search Option for DHCP (RFC 2937) */ if (optlen < 2) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 2"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 2"); } else if (optlen & 1) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length (%u) isn't even number", optlen); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length (%u) isn't even number", optlen); } else { guint16 ns; for (i = 0, ns = tvb_get_ntohs(tvb, optoff); i < optlen; i += 2, ns = tvb_get_ntohs(tvb, optoff + i)) { @@ -2220,7 +2220,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, proto_tree_add_string(v_tree, hf_bootp_option_dhcp_name_service_search_option, tvb, optoff + i, 2, "Network Information Service+ Servers Option (65)"); break; default: - expert_add_info_format_text(pinfo, vti, &ei_bootp_option_dhcp_name_service_invalid, + expert_add_info_format(pinfo, vti, &ei_bootp_option_dhcp_name_service_invalid, "Invalid Name Service (%u). RFC 2937 defines only 0, 6, 41, 44, and 65 as possible values.", ns); break; } @@ -2319,7 +2319,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case RFC_3361_ENC_FQDN: { unsigned int consumedx = 0; if (tvb_length(rfc3396_sip_server.tvb_composite) < 3) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite)); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 3 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite)); break; } @@ -2341,15 +2341,15 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, } case RFC_3361_ENC_IPADDR: if (tvb_length(rfc3396_sip_server.tvb_composite) < 5) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite)); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5 (len = %u)", tvb_length(rfc3396_sip_server.tvb_composite)); break; } /* x % 2^n == x & (2^n - 1) note : (assuming x is a positive integer) */ if ((tvb_length(rfc3396_sip_server.tvb_composite) - 1) & 3) { if (rfc3396_sip_server.total_number_of_block == 1) - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_length(rfc3396_sip_server.tvb_composite)); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u).", tvb_length(rfc3396_sip_server.tvb_composite)); else - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't a multiple of 4 plus 1 (len = %u). For your information with RFC 3396, the length is the length sum of all options 120 into this BOOTP packet.", tvb_length(rfc3396_sip_server.tvb_composite)); break; @@ -2377,7 +2377,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, } break; default: - expert_add_info_format_text(pinfo, vti, &ei_bootp_option_sip_server_address_encoding, "RFC 3361 defines only 0 and 1 for Encoding byte (Encoding = %u).", enc); + expert_add_info_format(pinfo, vti, &ei_bootp_option_sip_server_address_encoding, "RFC 3361 defines only 0 and 1 for Encoding byte (Encoding = %u).", enc); break; } } @@ -2389,14 +2389,14 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, optend = optoff + optlen; /* minimum length is 5 bytes */ if (optlen < 5) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't >= 5"); break; } while (optoff < optend) { mask_width = tvb_get_guint8(tvb, optoff); /* mask_width <= 32 */ if (mask_width > 32) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_option_classless_static_route, "Mask width (%d) > 32", mask_width); + expert_add_info_format(pinfo, vti, &ei_bootp_option_classless_static_route, "Mask width (%d) > 32", mask_width); break; } significant_octets = (mask_width + 7) / 8; @@ -2406,7 +2406,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, optoff++; /* significant octets + router(4) */ if (optend < optoff + significant_octets + 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Remaining length (%d) < %d bytes", optend - optoff, significant_octets + 4); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Remaining length (%d) < %d bytes", optend - optoff, significant_octets + 4); break; } if(mask_width == 0) @@ -2471,7 +2471,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, proto_tree_add_item(v_tree, hf_bootp_option_cl_dss_id, tvb, optoff+2+2+s_len, s_len, ENC_ASCII|ENC_NA); } } else { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Invalid length of DHCP option!"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Invalid length of DHCP option!"); } break; @@ -2489,7 +2489,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, while (optleft > 0) { if (optleft < 5) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length < 5"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length < 5"); break; } @@ -2521,7 +2521,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, while (optleft > 0) { if (optleft < 5) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length < 5"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length < 5"); break; } @@ -2539,7 +2539,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 3561: /* ADSL Forum */ s_end = optoff + s_option_len; if ( s_end > optend ) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); + expert_add_info_format(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); break; } @@ -2553,7 +2553,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, case 4491: /* CableLab */ s_end = optoff + s_option_len; if ( s_end > optend ) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); + expert_add_info_format(pinfo, vti, &ei_bootp_option125_enterprise_malformed, "no room left in option for enterprise %u data", enterprise); break; } @@ -2589,7 +2589,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, optoff += 22; for (i = optoff, optleft = optlen - 22; optleft > 0; i += 4, optleft -= 4) { if (optleft < 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "Option length isn't a multiple of 4"); break; } @@ -2712,7 +2712,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -2727,7 +2727,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v subopt_end = suboptoff+subopt_len; if (subopt_end > optend) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_missing_subopt_value, + expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -2780,7 +2780,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v tvb_get_guint8(tvb, suboptoff), tvb_get_guint8(tvb, suboptoff+1)); suboptoff+=2; } else { - expert_add_info_format_text(pinfo, vti, &ei_bootp_option82_vi_cl_tag_unknown, "Unknown tag %d (%d bytes)", tag, tag_len); + expert_add_info_format(pinfo, vti, &ei_bootp_option82_vi_cl_tag_unknown, "Unknown tag %d (%d bytes)", tag, tag_len); suboptoff += tag_len; } } else { @@ -2789,7 +2789,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v break; default: - expert_add_info_format_text(pinfo, vti, &ei_bootp_suboption_invalid, "Invalid suboption %d (%d bytes)", vs_opt, vs_len); + expert_add_info_format(pinfo, vti, &ei_bootp_suboption_invalid, "Invalid suboption %d (%d bytes)", vs_opt, vs_len); suboptoff += vs_len; break; } @@ -2803,7 +2803,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v break; case 151: if (subopt_len != 7) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 7"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 7"); break; } proto_tree_add_item(o82_v_tree, hf_bootp_option82_vrf_name_vpn_id_oui, tvb, suboptoff, 3, ENC_BIG_ENDIAN); @@ -2820,7 +2820,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v else { if (bootp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[idx].info.ftype, suboptoff, subopt_len, o82_opt[idx].info.phf, &default_hfs) == 0) { - expert_add_info_format_text(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); + expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); } } } @@ -2909,7 +2909,7 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -2931,7 +2931,7 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t /* I may need to decode that properly one day */ proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_option43_pxeclient_boot_item, tvb, suboptoff, subopt_len, ENC_NA); } else if ((subopt < 1) || (subopt >= array_length(o43pxeclient_opt))) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_suboption_invalid, "Unknown suboption %d (%d bytes)", subopt, subopt_len); + expert_add_info_format(pinfo, vti, &ei_bootp_suboption_invalid, "Unknown suboption %d (%d bytes)", subopt, subopt_len); } else if (o43pxeclient_opt[subopt].ftype == special) { /* I may need to decode that properly one day */ if (o43pxeclient_opt[subopt].phf != NULL) @@ -2942,7 +2942,7 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t if (bootp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype, suboptoff, subopt_len, o43pxeclient_opt[subopt].phf, &default_hfs) == 0) { - expert_add_info_format_text(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); + expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); } } @@ -3211,7 +3211,7 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -3226,7 +3226,7 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_missing_subopt_value, + expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -3245,12 +3245,12 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } else if (subopt_len == 6) { proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_cl_oui_string, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA); } else { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 3 or 6"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 3 or 6"); } break; case 31: /* MTA MAC address */ if (subopt_len != 6) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 6"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 6"); break; } @@ -3266,7 +3266,7 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t else { if (bootp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype, suboptoff, subopt_len, o43cablelabs_opt[subopt].phf, &default_hfs) == 0) { - expert_add_info_format_text(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); + expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); } } @@ -3314,7 +3314,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre } if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -3329,7 +3329,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_missing_subopt_value, + expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -3338,7 +3338,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre { case 58: /* 0x3A - Alcatel-Lucent AVA VLAN Id */ if (subopt_len != 2) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 2"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 2"); return (optend); } @@ -3346,7 +3346,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre break; case 64: /* 0x40 - Alcatel-Lucent TFTP1 */ if (subopt_len != 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 4"); return (optend); } @@ -3354,7 +3354,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre break; case 65: /* 0x41 - Alcatel-Lucent TFTP2 */ if (subopt_len != 4) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 4"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 4"); return (optend); } @@ -3362,7 +3362,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre break; case 66: /* 0x42 - Alcatel-Lucent APPLICATION TYPE */ if (subopt_len != 1) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 1"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 1"); return (optend); } proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_app_type, tvb, suboptoff, 1, ENC_BIG_ENDIAN); @@ -3371,7 +3371,7 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre proto_tree_add_item(o43alcatel_v_tree, hf_bootp_option43_alcatel_sip_url, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA); break; default: - expert_add_info_format_text(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); + expert_add_info_format(pinfo, vti, &hf_bootp_subopt_unknown_type, "ERROR, please report: Unknown subopt type handler %d", subopt); return optend; } @@ -3436,7 +3436,7 @@ dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -3460,7 +3460,7 @@ dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v { case presence: if (subopt_len != 0) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_bad_length, "length isn't 0"); + expert_add_info_format(pinfo, vti, &ei_bootp_bad_length, "length isn't 0"); } break; default: @@ -3525,7 +3525,7 @@ dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -3540,7 +3540,7 @@ dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_missing_subopt_value, + expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -3618,7 +3618,7 @@ dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_ suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -3633,7 +3633,7 @@ dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_ suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format_text(pinfo, vti, &ei_bootp_missing_subopt_value, + expert_add_info_format(pinfo, vti, &ei_bootp_missing_subopt_value, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -4717,7 +4717,7 @@ dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_ suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -4868,7 +4868,7 @@ dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format_text(pinfo, v_ti, &ei_bootp_missing_subopt_length, + expert_add_info_format(pinfo, v_ti, &ei_bootp_missing_subopt_length, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -5177,7 +5177,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (secs > 0 && secs <= 0xff) { ti = proto_tree_add_uint_format_value(bp_tree, hf_bootp_secs, tvb, 8, 2, secs, "%u", secs); - expert_add_info_format_text(pinfo, ti, &ei_bootp_secs_le, "Seconds elapsed appears to be encoded as little-endian"); + expert_add_info_format(pinfo, ti, &ei_bootp_secs_le, "Seconds elapsed appears to be encoded as little-endian"); } else { proto_tree_add_item(bp_tree, hf_bootp_secs, tvb, 8, 2, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-bthcrp.c b/epan/dissectors/packet-bthcrp.c index 1a901dbe81..91ad17ea13 100644 --- a/epan/dissectors/packet-bthcrp.c +++ b/epan/dissectors/packet-bthcrp.c @@ -147,15 +147,15 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += 2; if (!is_client_message && parameter_length < 2) { - expert_add_info_format_text(pinfo, pitem, &ei_bthcrp_control_parameter_length, + expert_add_info_format(pinfo, pitem, &ei_bthcrp_control_parameter_length, "Parameter length is shorter than 2 in response"); } if (parameter_length < tvb_length_remaining(tvb, offset)) { - expert_add_info_format_text(pinfo, pitem, &ei_bthcrp_control_parameter_length, + expert_add_info_format(pinfo, pitem, &ei_bthcrp_control_parameter_length, "Parameter length is shorter than payload length"); } else if (parameter_length > tvb_length_remaining(tvb, offset)) { - expert_add_info_format_text(pinfo, pitem, &ei_bthcrp_control_parameter_length, + expert_add_info_format(pinfo, pitem, &ei_bthcrp_control_parameter_length, "Parameter length is larger than payload length"); } diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index 375d8ad3af..ce0a2a19ed 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -1409,7 +1409,7 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree /* Detect malformed data */ if (length <= 6) { - expert_add_info_format_text(pinfo, pi, &ei_btl2cap_sdulength_bad, + expert_add_info_format(pinfo, pi, &ei_btl2cap_sdulength_bad, "SDU length too short: %u", length); THROW(ReportedBoundsError); } @@ -1418,7 +1418,7 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree if (sdulen < length) { sdulen = length; - expert_add_info_format_text(pinfo, pi, &ei_btl2cap_sdulength_bad, + expert_add_info_format(pinfo, pi, &ei_btl2cap_sdulength_bad, "SDU length less than length of first packet (%u < %u)", sdulen, length); } @@ -1442,7 +1442,7 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree } } else { if (length <= 4) { - expert_add_info_format_text(pinfo, btl2cap_tree, &ei_btl2cap_length_bad, + expert_add_info_format(pinfo, btl2cap_tree, &ei_btl2cap_length_bad, "Control / FCS length too short: %u", length); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-btmcap.c b/epan/dissectors/packet-btmcap.c index 0ac41ab95d..cea4f4fb72 100644 --- a/epan/dissectors/packet-btmcap.c +++ b/epan/dissectors/packet-btmcap.c @@ -296,12 +296,12 @@ dissect_btmcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if ((op_code == 0x03 || op_code == 0x05 || op_code == 0x07) && tvb_length_remaining(tvb, offset)) { - expert_add_info_format_text(pinfo, pitem, &ei_btmcap_response_parameters_bad, + expert_add_info_format(pinfo, pitem, &ei_btmcap_response_parameters_bad, "The Response Parameters for MD_RECONNECT_MDL_RSP shall have length zero."); } else if (tvb_length_remaining(tvb, offset)) { pitem = proto_tree_add_item(main_tree, hf_btmcap_response_parameters, tvb, offset, -1, ENC_NA); if (response_code != 0x00) { - expert_add_info_format_text(pinfo, pitem, &ei_btmcap_response_parameters_bad, + expert_add_info_format(pinfo, pitem, &ei_btmcap_response_parameters_bad, "When the Response Code is not Success, the Response Parameters shall have length zero."); } offset += tvb_length_remaining(tvb, offset); diff --git a/epan/dissectors/packet-btobex.c b/epan/dissectors/packet-btobex.c index c3e3fd3d70..aeebc72200 100644 --- a/epan/dissectors/packet-btobex.c +++ b/epan/dissectors/packet-btobex.c @@ -683,7 +683,7 @@ dissect_bpp_application_parameters(tvbuff_t *tvb, packet_info *pinfo, if (parameter_length != 4) { proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_application_parameter_length_bad, + expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be 4, but there is %i", parameter_length); } else switch (parameter_id) { case 0x01: @@ -738,7 +738,7 @@ dissect_bip_application_parameters(tvbuff_t *tvb, packet_info *pinfo, if (parameter_id < (sizeof(required_length_map)/sizeof(gint)) && required_length_map[parameter_id] != parameter_length) { proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_application_parameter_length_bad, + expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be %i, but there is %i", required_length_map[parameter_id], parameter_length); } else switch (parameter_id) { @@ -813,7 +813,7 @@ dissect_pbap_application_parameters(tvbuff_t *tvb, packet_info *pinfo, required_length_map[parameter_id] != -1 && required_length_map[parameter_id] != parameter_length) { proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_application_parameter_length_bad, + expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be %i, but there is %i", required_length_map[parameter_id], parameter_length); } else switch (parameter_id) { @@ -918,7 +918,7 @@ dissect_map_application_parameters(tvbuff_t *tvb, packet_info *pinfo, required_length_map[parameter_id] != -1 && required_length_map[parameter_id] != parameter_length) { proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_application_parameter_length_bad, + expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be %i, but there is %i", required_length_map[parameter_id], parameter_length); } else switch (parameter_id) { diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index fe0ce75be7..f4c6a70380 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -681,7 +681,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset = get_le_multi_byte_value(tvb, offset, ctrl_tree, &length, hf_mcc_len); if (length > (guint32) tvb_length_remaining(tvb, offset)) { - expert_add_info_format_text(pinfo, ctrl_tree, &ei_btrfcomm_mcc_length_bad, "Huge MCC length: %u", length); + expert_add_info_format(pinfo, ctrl_tree, &ei_btrfcomm_mcc_length_bad, "Huge MCC length: %u", length); return; } diff --git a/epan/dissectors/packet-btsap.c b/epan/dissectors/packet-btsap.c index d6bc537cf9..28ba849a3b 100644 --- a/epan/dissectors/packet-btsap.c +++ b/epan/dissectors/packet-btsap.c @@ -364,7 +364,7 @@ dissect_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, if (length != parameter_length || padding_length != parameter_padding_length) { /* Malformed frame */ - expert_add_info_format_text(pinfo, pitem, &ei_btsap_parameter_error, + expert_add_info_format(pinfo, pitem, &ei_btsap_parameter_error, "Parameter Length does not meet content length"); } diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c index dcee1551ea..8e956bb3b4 100644 --- a/epan/dissectors/packet-capwap.c +++ b/epan/dissectors/packet-capwap.c @@ -1329,7 +1329,7 @@ dissect_capwap_header(tvbuff_t *tvb, proto_tree *capwap_control_tree, guint offs } if ((plen != hlen) && global_capwap_draft_8_cisco == 0) { - expert_add_info_format_text(pinfo, ti_len, &ei_capwap_header_length_bad, "Wrong calculate length (%d) =! header length (%d) ! (May be try to use Cisco Wireless Controller Support Preference ?)", plen, hlen); + expert_add_info_format(pinfo, ti_len, &ei_capwap_header_length_bad, "Wrong calculate length (%d) =! header length (%d) ! (May be try to use Cisco Wireless Controller Support Preference ?)", plen, hlen); } return hlen; } diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index ed8adb3fdb..13da2b1561 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -2482,7 +2482,7 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *error_ti = proto_tree_add_item(dct2000_tree, hf_catapult_dct2000_error_comment, tvb, offset, -1, ENC_NA); PROTO_ITEM_SET_GENERATED(error_ti); - expert_add_info_format_text(pinfo, string_ti, &ei_catapult_dct2000_error_comment_expert, + expert_add_info_format(pinfo, string_ti, &ei_catapult_dct2000_error_comment_expert, "%s", string); } diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c index a216a506d6..ade326d76b 100644 --- a/epan/dissectors/packet-clnp.c +++ b/epan/dissectors/packet-clnp.c @@ -272,7 +272,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (cnf_hdr_len < FIXED_PART_LEN) { /* Header length is less than the length of the fixed part of the header. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < minimum length %u", FIXED_PART_LEN); return; @@ -320,7 +320,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) segment_length); if (segment_length < cnf_hdr_len) { /* Segment length is less than the header length. */ - expert_add_info_format_text(pinfo, ti_pdu_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_pdu_len, &ei_clnp_length, "PDU length < header length %u", cnf_hdr_len); return; } @@ -371,7 +371,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (opt_len < 1) { /* Header length is less than the minimum value in CLNP, including the destination address length. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < %u", FIXED_PART_LEN + 1); return; @@ -388,7 +388,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Header length is less than the minimum value, including the destination address length and the destination address. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < %u", FIXED_PART_LEN + 1 + dst_len); return; @@ -408,7 +408,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Header length is less than the minimum value, including the destination address length, the destination address, and the source address length. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < %u", FIXED_PART_LEN + 1 + dst_len + 1); return; @@ -426,7 +426,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) including the destination address length, the destination address, the source address length, and the source address. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < %u", FIXED_PART_LEN + 1 + dst_len + 1 + src_len); return; @@ -451,7 +451,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) including the destination address length, the destination address, the source address length, the source address, and the segmentation part. */ - expert_add_info_format_text(pinfo, ti_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_len, &ei_clnp_length, "Header length value < %u", FIXED_PART_LEN + 1 + dst_len + 1 + SEGMENTATION_PART_LEN); return; @@ -470,7 +470,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) total_length); if (total_length < segment_length) { /* Reassembled length is less than the length of this segment. */ - expert_add_info_format_text(pinfo, ti_tot_len, &ei_clnp_length, + expert_add_info_format(pinfo, ti_tot_len, &ei_clnp_length, "Total length < segment length %u", segment_length); return; } diff --git a/epan/dissectors/packet-cnip.c b/epan/dissectors/packet-cnip.c index 0133f4d72e..4bcebbde61 100644 --- a/epan/dissectors/packet-cnip.c +++ b/epan/dissectors/packet-cnip.c @@ -148,7 +148,7 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return; } else { - expert_add_info_format_text(pinfo, cnip_tree, &ei_cnip_type_unknown, + expert_add_info_format(pinfo, cnip_tree, &ei_cnip_type_unknown, "This dissector doesn't yet decode packets of type %s (0x%x)", val_to_str_const(type, type_tuple, "Unknown"), type); } diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index e19c23a652..13299463ba 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -285,12 +285,12 @@ coap_opt_check(packet_info *pinfo, proto_tree *subtree, guint opt_num, gint opt_ break; } if (i == (int)(array_length(coi))) { - expert_add_info_format_text(pinfo, subtree, &ei_coap_invalid_option_number, + expert_add_info_format(pinfo, subtree, &ei_coap_invalid_option_number, "Invalid Option Number %d", opt_num); return -1; } if (opt_length < coi[i].min || opt_length > coi[i].max) { - expert_add_info_format_text(pinfo, subtree, &ei_coap_invalid_option_range, + expert_add_info_format(pinfo, subtree, &ei_coap_invalid_option_range, "Invalid Option Range: %d (%d < x < %d)", opt_length, coi[i].min, coi[i].max); } @@ -578,7 +578,7 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr opt_delta += opt_delta_ext; break; case 0xf0: - expert_add_info_format_text(pinfo, coap_tree, &ei_coap_option_length_bad, + expert_add_info_format(pinfo, coap_tree, &ei_coap_option_length_bad, "end-of-options marker found, but option length isn't 15"); return -1; default: @@ -622,7 +622,7 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr opt_length += opt_length_ext; break; case 0x0f: - expert_add_info_format_text(pinfo, coap_tree, &ei_coap_option_length_bad, + expert_add_info_format(pinfo, coap_tree, &ei_coap_option_length_bad, "end-of-options marker found, but option delta isn't 15"); return -1; default: @@ -630,7 +630,7 @@ dissect_coap_options_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *coap_tr break; } if (offset + opt_length > coap_length) { - expert_add_info_format_text(pinfo, coap_tree, &ei_coap_option_length_bad, + expert_add_info_format(pinfo, coap_tree, &ei_coap_option_length_bad, "option longer than the package"); return -1; } diff --git a/epan/dissectors/packet-collectd.c b/epan/dissectors/packet-collectd.c index 8f178c75f5..2d5889f511 100644 --- a/epan/dissectors/packet-collectd.c +++ b/epan/dissectors/packet-collectd.c @@ -386,7 +386,7 @@ dissect_collectd_string (tvbuff_t *tvb, packet_info *pinfo, gint type_hf, "collectd %s segment: Length = %i ", val_to_str_const (type, part_names, "UNKNOWN"), length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "String part with invalid part length: " "Part is longer than rest of package."); return (-1); @@ -464,7 +464,7 @@ dissect_collectd_integer (tvbuff_t *tvb, packet_info *pinfo, gint type_hf, type); pi = proto_tree_add_uint (pt, hf_collectd_length, tvb, offset + 2, 2, length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Invalid length field for an integer part."); return (-1); @@ -713,7 +713,7 @@ dissect_collectd_part_values (tvbuff_t *tvb, packet_info *pinfo, gint offset, proto_tree_add_uint (pt, hf_collectd_type, tvb, offset, 2, type); pi = proto_tree_add_uint (pt, hf_collectd_length, tvb, offset + 2, 2, length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Invalid length field for a values part."); return (-1); @@ -804,7 +804,7 @@ dissect_collectd_signature (tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_uint (pt, hf_collectd_type, tvb, offset, 2, type); pi = proto_tree_add_uint (pt, hf_collectd_length, tvb, offset + 2, 2, length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Invalid length field for a signature part."); return (-1); @@ -872,7 +872,7 @@ dissect_collectd_encrypted (tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_uint (pt, hf_collectd_type, tvb, offset, 2, type); pi = proto_tree_add_uint (pt, hf_collectd_length, tvb, offset + 2, 2, length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Invalid length field for an encryption part."); return (-1); @@ -891,7 +891,7 @@ dissect_collectd_encrypted (tvbuff_t *tvb, packet_info *pinfo, offset + 2, 2, length); pi = proto_tree_add_uint (pt, hf_collectd_data_username_len, tvb, offset + 4, 2, length); - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Invalid username length field for an encryption part."); return (-1); @@ -1097,11 +1097,11 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset + 2, 2, part_length); if (part_length < 4) - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Bad part length: Is %i, expected at least 4", part_length); else - expert_add_info_format_text(pinfo, pi, &ei_collectd_invalid_length, + expert_add_info_format(pinfo, pi, &ei_collectd_invalid_length, "Bad part length: Larger than remaining packet size."); pkt_errors++; @@ -1336,7 +1336,7 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item (pt, hf_collectd_data, tvb, offset + 4, part_length - 4, ENC_NA); - expert_add_info_format_text(pinfo, pi, &ei_collectd_type, + expert_add_info_format(pinfo, pi, &ei_collectd_type, "Unknown part type %#x. Cannot decode data.", part_type); } diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index c00f0399de..a85585542c 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -1205,7 +1205,7 @@ static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code if (object_len < COPS_OBJECT_HDR_SIZE) { /* Bogus! */ ti = proto_tree_add_uint(tree, hf_cops_obj_len, tvb, offset, 2, object_len); - expert_add_info_format_text(pinfo, ti, &ei_cops_bad_cops_object_length, + expert_add_info_format(pinfo, ti, &ei_cops_bad_cops_object_length, "Bad COPS object length: %u, should be at least %u", object_len, COPS_OBJECT_HDR_SIZE); return -1; @@ -1260,7 +1260,7 @@ static void dissect_cops_pr_objects(tvbuff_t *tvb, packet_info *pinfo, guint32 o if (object_len < COPS_OBJECT_HDR_SIZE) { /* Bogus! */ ti = proto_tree_add_uint(cops_pr_tree, hf_cops_obj_len, tvb, offset, 2, object_len); - expert_add_info_format_text(pinfo, ti, &ei_cops_bad_cops_pr_object_length, + expert_add_info_format(pinfo, ti, &ei_cops_bad_cops_pr_object_length, "Bad COPS-PR object length: %u, should be at least %u", object_len, COPS_OBJECT_HDR_SIZE); return; diff --git a/epan/dissectors/packet-ctdb.c b/epan/dissectors/packet-ctdb.c index b88f81324a..cbadabc6be 100644 --- a/epan/dissectors/packet-ctdb.c +++ b/epan/dissectors/packet-ctdb.c @@ -297,7 +297,7 @@ static int dissect_control_get_nodemap_reply(packet_info *pinfo, proto_tree *tre offset+=4; if (num_nodes > CTDB_MAX_NODES) { - expert_add_info_format_text(pinfo, item, &ei_ctdb_too_many_nodes, "Too many nodes (%u). Stopping dissection.", num_nodes); + expert_add_info_format(pinfo, item, &ei_ctdb_too_many_nodes, "Too many nodes (%u). Stopping dissection.", num_nodes); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-dbus.c b/epan/dissectors/packet-dbus.c index 621fd6b32d..ae268e0add 100644 --- a/epan/dissectors/packet-dbus.c +++ b/epan/dissectors/packet-dbus.c @@ -231,7 +231,7 @@ dissect_dbus_sig(tvbuff_t *tvb, dbus_info_t *dinfo, proto_tree *tree, int offset ti = proto_tree_add_boolean_format(tree, hfi_dbus_value_bool.id, tvb, org_offset, offset - org_offset, val, "BOOLEAN: %s", val ? "True" : "False"); if (val != 0 && val != 1) { - expert_add_info_format_text(dinfo->pinfo, ti, &ei_dbus_value_bool_invalid, "Invalid boolean value (must be 0 or 1 is: %u)", val); + expert_add_info_format(dinfo->pinfo, ti, &ei_dbus_value_bool_invalid, "Invalid boolean value (must be 0 or 1 is: %u)", val); return -1; } ret->uint = val; diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 6eff1bd0c2..7fbe6424f6 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -412,7 +412,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, option_len = tvb_get_guint8(tvb, offset + 1); if (option_len < 2) { - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Option length incorrect, must be >= 2"); return; } @@ -456,7 +456,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, break; case 37: if (option_len > 8) - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "NDP Count too long (max 6 bytes)"); else proto_tree_add_text(dccp_options_tree, tvb, offset, option_len, @@ -495,7 +495,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, offset + 2, 4, tvb_get_ntohl(tvb, offset + 2)); else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Timestamp too long [%u != 6]", option_len); break; case 42: @@ -518,7 +518,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, tvb, offset + 6, 4, tvb_get_ntohl(tvb, offset + 6)); } else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Wrong Timestamp Echo length"); break; case 43: @@ -531,7 +531,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, tvb, offset + 2, 4, tvb_get_ntohl(tvb, offset + 2)); else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Wrong Elapsed Time length"); break; case 44: @@ -540,7 +540,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, tvb, offset + 2, 4, tvb_get_ntohl(tvb, offset + 2)); } else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Wrong Data checksum length"); break; case 192: /* RFC 4342, 8.5 */ @@ -559,7 +559,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, option_len, "CCID3 Loss Event Rate: %u", p); } else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Wrong CCID3 Loss Event Rate length"); break; case 193: /* RFC 4342, 8.6 */ @@ -576,7 +576,7 @@ dissect_options(tvbuff_t *tvb, packet_info *pinfo _U_, "CCID3 Receive Rate: %u bytes/sec", tvb_get_ntohl(tvb, offset + 2)); else - expert_add_info_format_text(pinfo, option_item, &ei_dccp_option_len_bad, + expert_add_info_format(pinfo, option_item, &ei_dccp_option_len_bad, "Wrong CCID3 Receive Rate length"); break; default: @@ -807,7 +807,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ if (dccph->x) { if (advertised_dccp_header_len < DCCP_GEN_HDR_LEN_X) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u)", advertised_dccp_header_len, DCCP_GEN_HDR_LEN_X); return tvb_length(tvb); @@ -825,7 +825,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ offset += 6; } else { if (advertised_dccp_header_len < DCCP_GEN_HDR_LEN_NO_X) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u)", advertised_dccp_header_len, DCCP_GEN_HDR_LEN_NO_X); return tvb_length(tvb); @@ -848,7 +848,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ case 0x0: /* DCCP-Request */ case 0xA: /* DCCP-Listen */ if (advertised_dccp_header_len < offset + 4) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for %s", advertised_dccp_header_len, offset + 4, val_to_str(dccph->type, dccp_packet_type_vals, "Unknown (%u)")); @@ -864,7 +864,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ break; case 0x1: /* DCCP-Response */ if (advertised_dccp_header_len < offset + 12) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for Response", advertised_dccp_header_len, offset + 12); return tvb_length(tvb); @@ -904,7 +904,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ case 0x4: /* DCCP-DataAck */ if (dccph->x) { if (advertised_dccp_header_len < offset + 8) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for %s", advertised_dccp_header_len, offset + 8, val_to_str(dccph->type, dccp_packet_type_vals, "Unknown (%u)")); @@ -929,7 +929,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ offset += 8; /* move offset past the Ack Number Subheader */ } else { if (advertised_dccp_header_len < offset + 4) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for %s", advertised_dccp_header_len, offset + 4, val_to_str(dccph->type, dccp_packet_type_vals, "Unknown (%u)")); @@ -955,7 +955,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ break; case 0x7: /* DCCP-Reset */ if (advertised_dccp_header_len < offset + 4) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for Reset", advertised_dccp_header_len, offset + 4); return tvb_length(tvb); @@ -1006,7 +1006,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ case 0x8: /* DCCP-Sync */ case 0x9: /* DCCP-SyncAck */ if (advertised_dccp_header_len < offset + 8) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is smaller than the minimum (%u) for %s", advertised_dccp_header_len, offset + 8, val_to_str(dccph->type, dccp_packet_type_vals, "Unknown (%u)")); @@ -1039,7 +1039,7 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ * DCCP header to the start of its application data area, in 32-bit words. */ if (advertised_dccp_header_len > DCCP_HDR_LEN_MAX) { - expert_add_info_format_text(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, + expert_add_info_format(pinfo, offset_item, &ei_dccp_advertised_header_length_bad, "Advertised header length (%u) is larger than the maximum (%u)", advertised_dccp_header_len, DCCP_HDR_LEN_MAX); return tvb_length(tvb); diff --git a/epan/dissectors/packet-dcerpc-epm.c b/epan/dissectors/packet-dcerpc-epm.c index e77e83e2ed..26e1810cb3 100644 --- a/epan/dissectors/packet-dcerpc-epm.c +++ b/epan/dissectors/packet-dcerpc-epm.c @@ -459,7 +459,7 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset, default: if(len){ - expert_add_info_format_text(pinfo, pi, &ei_epm_proto_undecoded, "RightHandSide not decoded yet for proto_id 0x%x", + expert_add_info_format(pinfo, pi, &ei_epm_proto_undecoded, "RightHandSide not decoded yet for proto_id 0x%x", proto_id); } } diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 59fe500ebd..46332c74a1 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -3395,7 +3395,7 @@ dissect_dcerpc_cn_stub(tvbuff_t *tvb, int offset, packet_info *pinfo, pinfo, tree, dcerpc_tree, payload_tvb, decrypted_tvb, hdr->drep, di, auth_info); - expert_add_info_format_text(pinfo, NULL, &ei_dcerpc_fragment, "%s fragment", fragment_type(hdr->flags)); + expert_add_info_format(pinfo, NULL, &ei_dcerpc_fragment, "%s fragment", fragment_type(hdr->flags)); pinfo->fragmented = save_fragmented; return; @@ -3475,7 +3475,7 @@ end_cn_stub: pinfo->fragmented = FALSE; - expert_add_info_format_text(pinfo, frag_tree_item, &ei_dcerpc_fragment_reassembled, "%s fragment, reassembled", fragment_type(hdr->flags)); + expert_add_info_format(pinfo, frag_tree_item, &ei_dcerpc_fragment_reassembled, "%s fragment, reassembled", fragment_type(hdr->flags)); dcerpc_try_handoff(pinfo, tree, dcerpc_tree, next_tvb, next_tvb, hdr->drep, di, auth_info); @@ -3495,12 +3495,12 @@ end_cn_stub: } col_append_fstr(pinfo->cinfo, COL_INFO, " [DCE/RPC %s fragment, reas: #%u]", fragment_type(hdr->flags), fd_head->reassembled_in); - expert_add_info_format_text(pinfo, NULL, &ei_dcerpc_fragment_reassembled, "%s fragment, reassembled in #%u", fragment_type(hdr->flags), fd_head->reassembled_in); + expert_add_info_format(pinfo, NULL, &ei_dcerpc_fragment_reassembled, "%s fragment, reassembled in #%u", fragment_type(hdr->flags), fd_head->reassembled_in); } } else { /* Reassembly not complete - some fragments are missing. Just show the stub data. */ - expert_add_info_format_text(pinfo, NULL, &ei_dcerpc_fragment, "%s fragment", fragment_type(hdr->flags)); + expert_add_info_format(pinfo, NULL, &ei_dcerpc_fragment, "%s fragment", fragment_type(hdr->flags)); if (decrypted_tvb) { show_stub_data(decrypted_tvb, 0, tree, auth_info, FALSE); @@ -3904,7 +3904,7 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo, pi = proto_tree_add_item(dcerpc_tree, hf_dcerpc_cn_status, tvb, offset, 4, DREP_ENC_INTEGER(hdr->drep)); offset+=4; - expert_add_info_format_text(pinfo, pi, &ei_dcerpc_cn_status, "Fault: %s", val_to_str(status, reject_status_vals, "Unknown (0x%08x)")); + expert_add_info_format(pinfo, pi, &ei_dcerpc_cn_status, "Fault: %s", val_to_str(status, reject_status_vals, "Unknown (0x%08x)")); /* save context ID for use with dcerpc_add_conv_to_bind_table() */ pinfo->dcectxid = ctx_id; @@ -4548,7 +4548,7 @@ dissect_dcerpc_cn(tvbuff_t *tvb, int offset, packet_info *pinfo, #if 0 /* XXX - too much "output noise", removed for now */ if (hdr.ptype == PDU_BIND || hdr.ptype == PDU_ALTER || hdr.ptype == PDU_BIND_ACK || hdr.ptype == PDU_ALTER_ACK) - expert_add_info_format_text(pinfo, tf, &ei_dcerpc_context_change, "Context change: %s", val_to_str(hdr.ptype, pckt_vals, "(0x%x)")); + expert_add_info_format(pinfo, tf, &ei_dcerpc_context_change, "Context change: %s", val_to_str(hdr.ptype, pckt_vals, "(0x%x)")); #endif if (hdr.ptype == PDU_BIND_NAK) expert_add_info(pinfo, tf, &ei_dcerpc_bind_not_acknowledged); diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c index 7b73acbc3d..614e8ece25 100644 --- a/epan/dissectors/packet-dcm.c +++ b/epan/dissectors/packet-dcm.c @@ -6804,15 +6804,15 @@ dissect_dcm_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset += 4; if (pdv_len + 4 > pdu_len) { - expert_add_info_format_text(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (too large)"); + expert_add_info_format(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (too large)"); return endpos; } else if (pdv_len <= 2) { - expert_add_info_format_text(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (too small)"); + expert_add_info_format(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (too small)"); return endpos; } else if (((pdv_len >> 1) << 1) != pdv_len) { - expert_add_info_format_text(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (not even)"); + expert_add_info_format(pinfo, pdvlen_item, &ei_dcm_pdv_len, "Invalid PDV length (not even)"); return endpos; } @@ -6973,7 +6973,7 @@ dissect_dcm_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean i old_pdu_start = pdu_start; pdu_start = pdu_start + pdu_len + 6; if (pdu_start <= old_pdu_start) { - expert_add_info_format_text(pinfo, NULL, &ei_dcm_invalid_pdu_length, "Invalid PDU length (%u)", pdu_len); + expert_add_info_format(pinfo, NULL, &ei_dcm_invalid_pdu_length, "Invalid PDU length (%u)", pdu_len); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index 20bdefb53d..a0c7325a85 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -1093,7 +1093,7 @@ dissect_dcom_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo, /* expert info only if severity is set */ /* XXX - move this to the callers of this function, to provide a more detailed error output */ if(u32HResult & 0x80000000) { - expert_add_info_format_text(pinfo, item, &ei_dcom_hresult_expert, "Hresult: %s", + expert_add_info_format(pinfo, item, &ei_dcom_hresult_expert, "Hresult: %s", val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%x)")); } if (pu32HResult) @@ -1127,7 +1127,7 @@ dissect_dcom_indexed_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo, /* expert info only if severity flag is set */ /* XXX - move this to the callers of this function, to provide a more detailed error output */ if(u32HResult & 0x80000000) { - expert_add_info_format_text(pinfo, item, &ei_dcom_hresult_expert, "Hresult: %s", + expert_add_info_format(pinfo, item, &ei_dcom_hresult_expert, "Hresult: %s", val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%x)")); } if (pu32HResult) @@ -1825,7 +1825,7 @@ dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo, first_ip = curr_ip; } else { if(first_ip != curr_ip) { - expert_add_info_format_text(pinfo, pi, &ei_dcom_dualstringarray_mult_ip, + expert_add_info_format(pinfo, pi, &ei_dcom_dualstringarray_mult_ip, "DUALSTRINGARRAY: multiple IP's %s %s", ip_to_str( (guint8 *) &first_ip), ip_to_str( (guint8 *) &curr_ip)); } diff --git a/epan/dissectors/packet-dhcp-failover.c b/epan/dissectors/packet-dhcp-failover.c index e19fcf131f..a32b8edae2 100644 --- a/epan/dissectors/packet-dhcp-failover.c +++ b/epan/dissectors/packet-dhcp-failover.c @@ -528,7 +528,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_ASSIGNED_IP_ADDRESS: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "assigned ip address is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "assigned ip address is not 4 bytes long"); break; } proto_item_append_text(oi, ", %s ", tvb_ip_to_str(tvb, offset)); @@ -540,7 +540,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_SENDING_SERVER_IP_ADDRESS: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "sending server ip address is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "sending server ip address is not 4 bytes long"); break; } @@ -553,7 +553,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_ADDRESSES_TRANSFERED: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "addresses transferred is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "addresses transferred is not 4 bytes long"); break; } @@ -578,7 +578,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_CLIENT_HARDWARE_ADDRESS: if (option_length < 2) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "hardware address is too short"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "hardware address is too short"); break; } htype = tvb_get_guint8(tvb, offset); @@ -601,7 +601,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_REJECT_REASON: if (option_length != 1) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Reject reason is not 1 byte long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Reject reason is not 1 byte long"); break; } reject_reason = tvb_get_guint8(tvb, offset); @@ -623,7 +623,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_MCLT: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "MCLT is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "MCLT is not 4 bytes long"); break; } mclt = tvb_get_ntohl(tvb, offset); @@ -644,7 +644,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_LEASE_EXPIRATION_TIME: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Lease expiration time is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Lease expiration time is not 4 bytes long"); break; } lease_expiration_time = @@ -665,7 +665,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_POTENTIAL_EXPIRATION_TIME: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Potential expiration time is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Potential expiration time is not 4 bytes long"); break; } potential_expiration_time = @@ -687,7 +687,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_GRACE_EXPIRATION_TIME: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Grace expiration time is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Grace expiration time is not 4 bytes long"); break; } grace_expiration_time = @@ -709,7 +709,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_CLIENT_LAST_TRANSACTION_TIME: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Last transaction time is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Last transaction time is not 4 bytes long"); break; } client_last_transaction_time = @@ -730,7 +730,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_START_TIME_OF_STATE: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Start time of state is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Start time of state is not 4 bytes long"); break; } start_time_of_state = @@ -751,7 +751,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_SERVERSTATE: if (option_length != 1) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "server status is not 1 byte long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "server status is not 1 byte long"); break; } server_state = tvb_get_guint8(tvb, offset); @@ -768,7 +768,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_SERVERFLAG: if (option_length != 1) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Serverflag is not 1 byte long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Serverflag is not 1 byte long"); break; } serverflag = tvb_get_guint8(tvb, offset); @@ -786,7 +786,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_MAX_UNACKED_BNDUPD: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Max unacked BNDUPD is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Max unacked BNDUPD is not 4 bytes long"); break; } max_unacked_bndupd = tvb_get_ntohl(tvb, offset); @@ -799,7 +799,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_RECEIVE_TIMER: if (option_length != 4) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Receive timer is not 4 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Receive timer is not 4 bytes long"); break; } receive_timer = tvb_get_ntohl(tvb, offset); @@ -821,7 +821,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_MESSAGE_DIGEST: if (option_length < 2) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Message digest is too short"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Message digest is too short"); break; } @@ -832,7 +832,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_append_text(oi, ", HMAC-MD5"); } else { proto_item_append_text(oi, ", type not allowed"); - expert_add_info_format_text(pinfo, ti, &ei_dhcpfo_message_digest_type_not_allowed, "Message digest type: %u, not allowed", message_digest_type); + expert_add_info_format(pinfo, ti, &ei_dhcpfo_message_digest_type_not_allowed, "Message digest type: %u, not allowed", message_digest_type); } proto_tree_add_item(option_tree, @@ -842,7 +842,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_PROTOCOL_VERSION: if (option_length != 1) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "Protocol version is not 1 byte long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "Protocol version is not 1 byte long"); break; } proto_item_append_text(oi, ", version: %u", tvb_get_guint8(tvb, offset)); @@ -851,7 +851,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case DHCP_FO_PD_TLS_REQUEST: if (option_length != 2) { - expert_add_info_format_text(pinfo, oi, &ei_dhcpfo_bad_length, "TLS request is not 2 bytes long"); + expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "TLS request is not 2 bytes long"); break; } tls_request = tvb_get_ntohs(tvb, offset); diff --git a/epan/dissectors/packet-dhcpv6.c b/epan/dissectors/packet-dhcpv6.c index 29df290035..060a0baaa8 100644 --- a/epan/dissectors/packet-dhcpv6.c +++ b/epan/dissectors/packet-dhcpv6.c @@ -726,7 +726,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in /* There must be at least five octets left to be a valid sub element */ if (optend <= 0) { - expert_add_info_format_text(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt); + expert_add_info_format(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt); return (optend); } /* g_print("dissect packetcable ccc option subopt_len=%d optend=%d\n\n", subopt_len, optend); */ @@ -740,7 +740,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_pri_dhcp, tvb, suboptoff, 4, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; @@ -750,7 +750,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_sec_dhcp, tvb, suboptoff, 4, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; @@ -769,11 +769,11 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_prov_srv_ipv4, tvb, suboptoff+1, 4, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_invalid_type, "Invalid type: %u (%u byte%s)", + expert_add_info_format(pinfo, vti, &ei_dhcpv6_invalid_type, "Invalid type: %u (%u byte%s)", type, subopt_len, plurality(subopt_len, "", "s")); } suboptoff += subopt_len; @@ -785,7 +785,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_as_krb_max_retry_count, tvb, suboptoff+8, 4, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -796,7 +796,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_ap_krb_max_retry_count, tvb, suboptoff+8, 4, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -835,7 +835,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in ti = proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_krb_realm, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA); if (kr_fail_flag) - expert_add_info_format_text(pinfo, ti, &ei_dhcpv6_invalid_byte, "Invalid at byte=%d", kr_pos); + expert_add_info_format(pinfo, ti, &ei_dhcpv6_invalid_byte, "Invalid at byte=%d", kr_pos); } suboptoff += subopt_len; break; @@ -845,7 +845,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_tgt_flag_fetch, tvb, suboptoff, 1, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -856,7 +856,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in expert_add_info(pinfo, ti, &ei_dhcpv6_invalid_time_value); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -866,7 +866,7 @@ dissect_packetcable_ccc_option(proto_tree *v_tree, proto_item *v_item, packet_in proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_sec_tcm_provisioning_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN); proto_tree_add_item(pkt_s_tree, hf_packetcable_ccc_sec_tcm_call_manager_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -903,7 +903,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ /* There must be at least five octets left to be a valid sub element */ if (optend <= 0) { - expert_add_info_format_text(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt); + expert_add_info_format(pinfo, v_item, &ei_dhcpv6_no_suboption_len, "Sub element %d: no room left in option for suboption length", subopt); return (optend); } @@ -915,7 +915,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ if (subopt_len < 35) { proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_pri_dss, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -923,7 +923,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ if (subopt_len < 35) { proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_dss, tvb, suboptoff, subopt_len, ENC_ASCII|ENC_NA); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -957,7 +957,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ } } } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_invalid_type, "Invalid type: %u (%u byte%s)", + expert_add_info_format(pinfo, vti, &ei_dhcpv6_invalid_type, "Invalid type: %u (%u byte%s)", type, subopt_len, plurality(subopt_len, "", "s")); } suboptoff += subopt_len; @@ -1017,7 +1017,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ } } if (kr_fail_flag) - expert_add_info_format_text(pinfo, pi_tmp, &ei_dhcpv6_invalid_byte, "Invalid at byte=%d", kr_pos); + expert_add_info_format(pinfo, pi_tmp, &ei_dhcpv6_invalid_byte, "Invalid at byte=%d", kr_pos); } suboptoff += subopt_len; break; @@ -1027,7 +1027,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_tgt_flag_fetch, tvb, suboptoff, 1, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -1038,7 +1038,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ expert_add_info(pinfo, ti, &ei_dhcpv6_invalid_time_value); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -1048,7 +1048,7 @@ dissect_packetcable_cccV6_option(proto_tree *v_tree, proto_item *v_item, packet_ proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_tcm_provisioning_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN); proto_tree_add_item(pkt_s_tree, hf_packetcable_cccV6_sec_tcm_call_manager_server, tvb, suboptoff, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); + expert_add_info_format(pinfo, vti, &ei_dhcpv6_bogus_length, "Bogus length: %d", subopt_len); } suboptoff += subopt_len; break; @@ -1130,7 +1130,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i } else if (tlv_len == 6) { proto_item_append_text(ti, "\"%s\"", tvb_format_stringzpad(tvb, sub_off, tlv_len)); } else { - expert_add_info_format_text(pinfo, ti, &ei_dhcpv6_bogus_length, "Suboption %d: suboption length isn't 3 or 6", type); + expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Suboption %d: suboption length isn't 3 or 6", type); } break; case CL_OPTION_ORO : @@ -1164,7 +1164,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i opt_len = tlv_len; field_len = tlv_len; if (tlv_len != 6) { - expert_add_info_format_text(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len); + expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len); } else { proto_item_append_text(ti, "%s", @@ -1277,7 +1277,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i case CL_CM_MAC_ADDR : opt_len = tlv_len; if (tlv_len != 6) { - expert_add_info_format_text(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len); + expert_add_info_format(pinfo, ti, &ei_dhcpv6_bogus_length, "Bogus length: %d", tlv_len); } else { /*proto_item_append_text(ti, "CM MAC Address Option = %s", */ @@ -1333,7 +1333,7 @@ dissect_cablelabs_specific_opts(proto_tree *v_tree, proto_item *v_item, packet_i } } else { - expert_add_info_format_text(pinfo, v_item, &ei_dhcpv6_bogus_length, "Bogus length: %d", len); + expert_add_info_format(pinfo, v_item, &ei_dhcpv6_bogus_length, "Bogus length: %d", len); } } @@ -1449,7 +1449,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, case OPTION_SERVERID: case OPTION_RELAYID: if (optlen < 2) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); break; } proto_tree_add_item(subtree, hf_duid_bytes, tvb, off, optlen, ENC_NA); @@ -1461,7 +1461,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, nstime_t llt_time; if (optlen < 8) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); break; } proto_tree_add_item(subtree, hf_duidllt_hwtype, tvb, off + 2, 2, ENC_BIG_ENDIAN); @@ -1480,7 +1480,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case DUID_EN: if (optlen < 6) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); break; } proto_tree_add_item(subtree, hf_duiden_enterprise, tvb, off + 2, 4, ENC_BIG_ENDIAN); @@ -1491,7 +1491,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, case DUID_LL: case DUID_LL_OLD: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DUID: malformed option"); break; } proto_tree_add_item(subtree, hf_duidll_hwtype, tvb, off + 2, 2, ENC_BIG_ENDIAN); @@ -1505,7 +1505,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_NTP_SERVER: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "NTP Server: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NTP Server: malformed option"); break; } while (optlen > temp_optlen) { @@ -1536,9 +1536,9 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, case OPTION_IA_PD: if (optlen < 12) { if (opttype == OPTION_IA_NA) - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_NA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_NA: malformed option"); else - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_PD: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_PD: malformed option"); break; } proto_tree_add_string(subtree, hf_iaid, tvb, off, @@ -1571,7 +1571,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_IA_TA: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_TA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_TA: malformed option"); break; } proto_tree_add_string(subtree, hf_iata, tvb, off, @@ -1591,7 +1591,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, guint32 preferred_lifetime, valid_lifetime; if (optlen < 24) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_TA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IA_TA: malformed option"); break; } @@ -1636,14 +1636,14 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_PREFERENCE: if (optlen != 1) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "PREFERENCE: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PREFERENCE: malformed option"); break; } proto_tree_add_item(subtree, hf_option_preference, tvb, off, 1, ENC_BIG_ENDIAN); break; case OPTION_ELAPSED_TIME: if (optlen != 2) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "ELAPSED-TIME: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "ELAPSED-TIME: malformed option"); break; } @@ -1653,7 +1653,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_RELAY_MSG: if (optlen == 0) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "RELAY-MSG: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RELAY-MSG: malformed option"); } else { /* here, we should dissect a full DHCP message */ dissect_dhcpv6(tvb, pinfo, subtree, downstream, off, off + optlen); @@ -1661,7 +1661,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_AUTH: if (optlen < 11) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "AUTH: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "AUTH: malformed option"); break; } @@ -1674,7 +1674,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_UNICAST: if (optlen != 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "UNICAST: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "UNICAST: malformed option"); break; } proto_tree_add_item(subtree, hf_opt_unicast, tvb, off, 16, ENC_NA); @@ -1686,7 +1686,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_VENDOR_CLASS: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_CLASS: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_CLASS: malformed option"); break; } proto_tree_add_item(subtree, hf_vendorclass_enterprise, tvb, off, 4, ENC_BIG_ENDIAN); @@ -1695,7 +1695,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_VENDOR_OPTS: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_OPTS: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "VENDOR_OPTS: malformed option"); break; } @@ -1726,7 +1726,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, gint namelen; if (optlen == 0) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "INTERFACE_ID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "INTERFACE_ID: malformed option"); break; } @@ -1745,7 +1745,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_RECONF_MSG: if (optlen != 1) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_MSG: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_MSG: malformed option"); break; } @@ -1753,7 +1753,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_RECONF_ACCEPT: if (optlen) - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_ACCEPT: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "RECONF_ACCEPT: malformed option"); break; case OPTION_SIP_SERVER_D: if (optlen > 0) { @@ -1763,7 +1763,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_SIP_SERVER_A: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "SIP servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SIP servers address: malformed option"); break; } @@ -1772,7 +1772,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_DNS_SERVERS: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "DNS servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "DNS servers address: malformed option"); break; } @@ -1789,7 +1789,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_NIS_SERVERS: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "NIS servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NIS servers address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1797,7 +1797,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_NISP_SERVERS: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "NISP servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NISP servers address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1817,7 +1817,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_SNTP_SERVERS: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "SNTP servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SNTP servers address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1826,7 +1826,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_LIFETIME: if (optlen != 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "LIFETIME: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LIFETIME: malformed option"); break; } proto_tree_add_item(subtree, hf_opt_lifetime, tvb, off, 4, ENC_BIG_ENDIAN); @@ -1839,7 +1839,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_BCMCS_SERVER_A: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "BCMCS servers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "BCMCS servers address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1847,7 +1847,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_REMOTE_ID: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "REMOTE_ID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "REMOTE_ID: malformed option"); break; } proto_tree_add_item(subtree, hf_remoteid_enterprise, tvb, off, 4, ENC_BIG_ENDIAN); @@ -1856,14 +1856,14 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_SUBSCRIBER_ID: if (optlen == 0) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "SUBSCRIBER_ID: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "SUBSCRIBER_ID: malformed option"); break; } proto_tree_add_item(subtree, hf_subscriber_id, tvb, off, optlen, ENC_ASCII|ENC_NA); break; case OPTION_CLIENT_FQDN: if (optlen < 1) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "FQDN: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "FQDN: malformed option"); } else { /* * +-----+-+-+-+ @@ -1880,7 +1880,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_PANA_AGENT: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "PANA agent address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PANA agent address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1898,7 +1898,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, { guint8 query_type; if (optlen < 17) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ-QUERY: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ-QUERY: malformed option"); break; } query_type = tvb_get_guint8(tvb, off); @@ -1937,7 +1937,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_CLT_TIME: if (optlen != 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "CLT_TIME: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "CLT_TIME: malformed option"); break; } @@ -1945,7 +1945,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_LQ_RELAY_DATA: if (optlen < 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ_RELAY_DATA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ_RELAY_DATA: malformed option"); break; } @@ -1958,7 +1958,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_LQ_CLIENT_LINK: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ client links address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "LQ client links address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1966,7 +1966,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_CAPWAP_AC_V6: if (optlen % 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "CAPWAP Access Controllers address: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "CAPWAP Access Controllers address: malformed option"); break; } for (i = 0; i < optlen; i += 16) @@ -1981,7 +1981,7 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, } case OPTION_IAPREFIX: if (optlen < 25) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "IAPREFIX: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "IAPREFIX: malformed option"); break; } @@ -2013,14 +2013,14 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_MIP6_HA: if (optlen != 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HA: malformed option"); break; } proto_tree_add_item(subtree, hf_mip6_ha, tvb, off, 16, ENC_NA); break; case OPTION_MIP6_HOA: if (optlen != 16) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HOA: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "MIP6_HOA: malformed option"); break; } @@ -2028,14 +2028,14 @@ dhcpv6_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, break; case OPTION_NAI: if (optlen < 4) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "NAI: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "NAI: malformed option"); break; } proto_tree_add_item(subtree, hf_nai, tvb, off, optlen - 2, ENC_ASCII|ENC_NA); break; case OPTION_PD_EXCLUDE: if ((optlen < 2) || (optlen > 17)) { - expert_add_info_format_text(pinfo, option_item, &ei_dhcpv6_malformed_option, "PD_EXCLUDE: malformed option"); + expert_add_info_format(pinfo, option_item, &ei_dhcpv6_malformed_option, "PD_EXCLUDE: malformed option"); break; } proto_tree_add_item(subtree, hf_pd_exclude_pref_len, tvb, off, 1, ENC_BIG_ENDIAN); @@ -2140,7 +2140,7 @@ dissect_dhcpv6_bulk_leasequery_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree (msg_type != LEASEQUERY_REPLY) && (msg_type != LEASEQUERY_DONE) && (msg_type != LEASEQUERY_DATA)) - expert_add_info_format_text(pinfo, ti, &ei_dhcpv6_bulk_leasequery_bad_msg_type, + expert_add_info_format(pinfo, ti, &ei_dhcpv6_bulk_leasequery_bad_msg_type, "Message Type %d not allowed by DHCPv6 Bulk Leasequery", msg_type); offset++; diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index b7285ac6f5..5508fcaf7b 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -684,7 +684,7 @@ address_v16_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) break; default: pi = proto_tree_add_item(pt,t->hf_other,tvb,0,len,ENC_BIG_ENDIAN); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Address Length (%u)", len); break; @@ -733,7 +733,7 @@ integer32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Integer32 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Integer32 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; @@ -759,7 +759,7 @@ integer64_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Integer64 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Integer64 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; @@ -785,7 +785,7 @@ unsigned32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Unsigned32 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Unsigned32 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; @@ -811,7 +811,7 @@ unsigned64_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Unsigned64 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Unsigned64 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; @@ -837,7 +837,7 @@ float32_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Float32 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Float32 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; @@ -863,7 +863,7 @@ float64_avp(diam_ctx_t *c, diam_avp_t *a, tvbuff_t *tvb) pi = proto_tree_add_bytes_format(c->tree, hf_diameter_avp_data_wrong_length, tvb, 0, length, NULL, "Error! Bad Float64 Length"); - expert_add_info_format_text(c->pinfo, pi, &ei_diameter_avp_len, + expert_add_info_format(c->pinfo, pi, &ei_diameter_avp_len, "Bad Float64 Length (%u)", length); PROTO_ITEM_SET_GENERATED(pi); label = NULL; diff --git a/epan/dissectors/packet-dlsw.c b/epan/dissectors/packet-dlsw.c index d07901e348..96c35fc463 100644 --- a/epan/dissectors/packet-dlsw.c +++ b/epan/dissectors/packet-dlsw.c @@ -358,7 +358,7 @@ dissect_dlsw_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(dlsw_header_tree, hf_dlsw_dlc_header_length, tvb, 42, 2, ENC_BIG_ENDIAN); if ( dlchlen > mlen ) { - expert_add_info_format_text(pinfo, ti, &ei_dlsw_dlc_header_length, + expert_add_info_format(pinfo, ti, &ei_dlsw_dlc_header_length, "DLC Header Length = %u (bogus, must be <= message length %u)",dlchlen, mlen) ; return; } diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index 506f303ce7..4a344fc114 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -1569,7 +1569,7 @@ static void dmp_add_seq_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, tvb, 0, 0, dmp.id_val->msg_resend_count); PROTO_ITEM_SET_GENERATED (en); - expert_add_info_format_text(pinfo, en, &ei_analysis_retrans_no, "Retransmission #%d", dmp.id_val->msg_resend_count); + expert_add_info_format(pinfo, en, &ei_analysis_retrans_no, "Retransmission #%d", dmp.id_val->msg_resend_count); if (dmp.msg_type == REPORT) { en = proto_tree_add_uint (analysis_tree, hf_analysis_rep_resend_from, @@ -1641,7 +1641,7 @@ static void dmp_add_seq_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, tvb, 0, 0, dmp.id_val->ack_resend_count); PROTO_ITEM_SET_GENERATED (en); - expert_add_info_format_text(pinfo, en, &ei_analysis_ack_dup_no, "Dup ACK #%d", dmp.id_val->ack_resend_count); + expert_add_info_format(pinfo, en, &ei_analysis_ack_dup_no, "Dup ACK #%d", dmp.id_val->ack_resend_count); en = proto_tree_add_uint (analysis_tree, hf_analysis_ack_resend_from, tvb, 0, 0, dmp.id_val->ack_id); @@ -2636,7 +2636,7 @@ static gint dissect_dmp_ack (tvbuff_t *tvb, packet_info *pinfo, rt = proto_tree_add_item (ack_tree, hf_ack_reason, tvb, offset, 1, ENC_BIG_ENDIAN); if (dmp.ack_reason != 0) { - expert_add_info_format_text(pinfo, rt, &ei_ack_reason, "ACK reason: %s", val_to_str_const (dmp.ack_reason, ack_reason, "Reserved")); + expert_add_info_format(pinfo, rt, &ei_ack_reason, "ACK reason: %s", val_to_str_const (dmp.ack_reason, ack_reason, "Reserved")); } offset += 1; @@ -2805,7 +2805,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo, /* Unsupported DMP Version */ proto_item_append_text (vf, " (unsupported)"); proto_item_append_text (tf, " (unsupported)"); - expert_add_info_format_text(pinfo, vf, &ei_envelope_version_value, "Unsupported DMP Version: %d", dmp.version); + expert_add_info_format(pinfo, vf, &ei_envelope_version_value, "Unsupported DMP Version: %d", dmp.version); return offset; } diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 6d49f00ba8..091f572eab 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -2657,7 +2657,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, } break; case O_CLIENT_SUBNET_EXP: /* draft-vandergaast-edns-client-subnet */ - expert_add_info_format_text(pinfo, rropt, &ei_dns_depr_opc, + expert_add_info_format(pinfo, rropt, &ei_dns_depr_opc, "Deprecated opcode. Client subnet OPT assigned as %d.", O_CLIENT_SUBNET); /* Intentional fall-through */ case O_CLIENT_SUBNET:{ @@ -3339,7 +3339,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, sub_tvb=tvb_new_subset(tvb, cur_offset, tsig_siglen, tsig_siglen); if (!dissector_try_string(dns_tsig_dissector_table, tsig_algname, sub_tvb, pinfo, mac_tree)) { - expert_add_info_format_text(pinfo, mac_item, &ei_dns_tsig_alg, + expert_add_info_format(pinfo, mac_item, &ei_dns_tsig_alg, "No dissector for algorithm:%s", tsig_algname); } @@ -3473,7 +3473,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset, default: - expert_add_info_format_text(pinfo, trr, &ei_dns_undecoded_option, + expert_add_info_format(pinfo, trr, &ei_dns_undecoded_option, "Dissector for DNS Type (%d)" " code not implemented, Contact Wireshark developers" " if you want this supported", dns_type); diff --git a/epan/dissectors/packet-drda.c b/epan/dissectors/packet-drda.c index 8fa0f98cd1..9d666345e6 100644 --- a/epan/dissectors/packet-drda.c +++ b/epan/dissectors/packet-drda.c @@ -701,7 +701,7 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) iCommand = tvb_get_ntohs(tvb, offset + 8); iLength = tvb_get_ntohs(tvb, offset + 0); if (iLength < 10) { - expert_add_info_format_text(pinfo, NULL, &ei_drda_opcode_invalid_length, "Invalid length detected (%u): should be at least 10 bytes long", iLength); + expert_add_info_format(pinfo, NULL, &ei_drda_opcode_invalid_length, "Invalid length detected (%u): should be at least 10 bytes long", iLength); break; } /* iCommandEnd is the length of the packet up to the end of the current command */ diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index 841fb4dbc6..1b46981ae7 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -2246,7 +2246,7 @@ dissect_dtls_hnd_cert_req(tvbuff_t *tvb, subtree = proto_item_add_subtree(ti, ett_dtls_sig_hash_algs); if (sh_alg_length % 2) { - expert_add_info_format_text(pinfo, ti2, &ei_dtls_handshake_sig_hash_alg_len_bad, + expert_add_info_format(pinfo, ti2, &ei_dtls_handshake_sig_hash_alg_len_bad, "Signature Hash Algorithm length (%d) must be a multiple of 2", sh_alg_length); return; diff --git a/epan/dissectors/packet-dtn.c b/epan/dissectors/packet-dtn.c index 7a8336fb3f..2da1437e81 100644 --- a/epan/dissectors/packet-dtn.c +++ b/epan/dissectors/packet-dtn.c @@ -722,7 +722,7 @@ dissect_version_4_primary_header(packet_info *pinfo, proto_tree *primary_tree, t bundle_header_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(primary_tree, hf_bundle_primary_header_len, tvb, offset, sdnv_length, bundle_header_length); if(bundle_header_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "Bundle Header Length Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "Bundle Header Length Error"); return 0; } @@ -797,7 +797,7 @@ dissect_version_4_primary_header(packet_info *pinfo, proto_tree *primary_tree, t dict_data.bundle_header_dict_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(primary_tree, hf_bundle_primary_dictionary_len, tvb, offset, sdnv_length, dict_data.bundle_header_dict_length); if(dict_data.bundle_header_dict_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "Dictionary Header Length Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "Dictionary Header Length Error"); return 0; } offset += sdnv_length; @@ -833,7 +833,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, *pri_hdr_procflags = (guint8) (bundle_processing_control_flags & 0x7f); if (sdnv_length < 1 || sdnv_length > 8) { - expert_add_info_format_text(pinfo, primary_tree, &ei_bundle_control_flags_length, + expert_add_info_format(pinfo, primary_tree, &ei_bundle_control_flags_length, "Wrong bundle control flag length: %d", sdnv_length); return 0; } @@ -888,7 +888,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, bundle_header_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(primary_tree, hf_bundle_primary_header_len, tvb, offset, sdnv_length, bundle_header_length); if(bundle_header_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "Bundle Header Length Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "Bundle Header Length Error"); return 0; } @@ -909,7 +909,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_dest_scheme_offset_i32, tvb, offset, sdnv_length, dict_data.dest_scheme_offset); if((dict_data.dest_scheme_offset < 0) || (dict_data.dest_scheme_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Destination Scheme Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Destination Scheme Offset Error"); } offset += sdnv_length; @@ -919,7 +919,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_dest_ssp_offset_i32, tvb, offset, sdnv_length, dict_data.dest_ssp_offset); if((dict_data.dest_ssp_offset < 0) || (dict_data.dest_ssp_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Destination SSP Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Destination SSP Offset Error"); } offset += sdnv_length; @@ -930,7 +930,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_source_scheme_offset_i32, tvb, offset, sdnv_length, dict_data.source_scheme_offset); if((dict_data.source_scheme_offset < 0) || (dict_data.source_scheme_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Source Scheme Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Source Scheme Offset Error"); } offset += sdnv_length; @@ -940,7 +940,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_source_ssp_offset_i32, tvb, offset, sdnv_length, dict_data.source_ssp_offset); if((dict_data.source_ssp_offset < 0) || (dict_data.source_ssp_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Source SSP Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Source SSP Offset Error"); } offset += sdnv_length; @@ -951,7 +951,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_report_scheme_offset_i32, tvb, offset, sdnv_length, dict_data.report_scheme_offset); if((dict_data.report_scheme_offset < 0) || (dict_data.report_scheme_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Report Scheme Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Report Scheme Offset Error"); } offset += sdnv_length; @@ -961,7 +961,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_report_ssp_offset_i32, tvb, offset, sdnv_length, dict_data.report_ssp_offset); if((dict_data.report_ssp_offset < 0) || (dict_data.report_ssp_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Report SSP Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Report SSP Offset Error"); } offset += sdnv_length; @@ -973,7 +973,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_cust_scheme_offset_i32, tvb, offset, sdnv_length, dict_data.cust_scheme_offset); if((dict_data.cust_scheme_offset < 0) || (dict_data.cust_scheme_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Custodian Scheme Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Custodian Scheme Offset Error"); } offset += sdnv_length; @@ -983,7 +983,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, ti = proto_tree_add_int(primary_tree, hf_bundle_cust_ssp_offset_i32, tvb, offset, sdnv_length, dict_data.cust_ssp_offset); if((dict_data.cust_ssp_offset < 0) || (dict_data.cust_ssp_offset > bundle_header_length)) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Custodian SSP Offset Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Custodian SSP Offset Error"); } offset += sdnv_length; @@ -1019,7 +1019,7 @@ dissect_version_5_and_6_primary_header(packet_info *pinfo, dict_data.bundle_header_dict_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(primary_tree, hf_bundle_primary_dictionary_len, tvb, offset, sdnv_length, dict_data.bundle_header_dict_length); if(dict_data.bundle_header_dict_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "Dictionary Header Length Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "Dictionary Header Length Error"); return 0; } offset += sdnv_length; @@ -1376,14 +1376,14 @@ dissect_admin_record(proto_tree *primary_tree, tvbuff_t *tvb, packet_info *pinfo fill_start = evaluate_sdnv(tvb, offset, &sdnv_length_start); ti = proto_tree_add_int(admin_record_tree, hf_bundle_custody_id_range_start, tvb, offset, sdnv_length_start, fill_start); if (fill_start < 0 || sdnv_length_start < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range start SDNV"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range start SDNV"); return offset; } fill_length = evaluate_sdnv(tvb, offset + sdnv_length_start, &sdnv_length_length); ti = proto_tree_add_int(admin_record_tree, hf_bundle_custody_id_range_end, tvb, offset, sdnv_length_start + sdnv_length_length, fill_start + fill_length - 1); if (fill_length < 0 || sdnv_length_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range length SDNV"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range length SDNV"); return offset; } @@ -1397,14 +1397,14 @@ dissect_admin_record(proto_tree *primary_tree, tvbuff_t *tvb, packet_info *pinfo fill_gap = evaluate_sdnv(tvb, offset, &sdnv_length_gap); ti = proto_tree_add_int(admin_record_tree, hf_bundle_custody_id_range_start, tvb, offset, sdnv_length_gap, fill_gap); if (fill_gap < 0 || sdnv_length_gap < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range gap SDNV"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range gap SDNV"); return offset; } fill_length = evaluate_sdnv(tvb, offset + sdnv_length_gap, &sdnv_length_length); ti = proto_tree_add_int(admin_record_tree, hf_bundle_custody_id_range_end, tvb, offset, sdnv_length_gap + sdnv_length_length, right_edge + fill_gap + fill_length - 1); if (fill_length < 0 || sdnv_length_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range length SDNV"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "ACS: Unable to process CTEB Custody ID Range length SDNV"); return offset; } @@ -1414,7 +1414,7 @@ dissect_admin_record(proto_tree *primary_tree, tvbuff_t *tvb, packet_info *pinfo } if (payload_bytes_processed > payload_length) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "ACS: CTEB Custody ID Range data extends past payload length"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "ACS: CTEB Custody ID Range data extends past payload length"); return offset; } @@ -1495,7 +1495,7 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int block_length = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(block_tree, hf_block_control_block_length, tvb, offset, sdnv_length, block_length); if(block_length < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_offset_error, "Metadata Block Length Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_offset_error, "Metadata Block Length Error"); /* Force quitting */ *lastheader = TRUE; return offset; @@ -1525,10 +1525,10 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int /* check requirements for Block Processing Control Flags */ if ((control_flags & BLOCK_CONTROL_REPLICATE) != 0) { - expert_add_info_format_text(pinfo, block_flag_replicate_item, &ei_bundle_block_control_flags, "ERROR: Replicate must be clear for CTEB"); + expert_add_info_format(pinfo, block_flag_replicate_item, &ei_bundle_block_control_flags, "ERROR: Replicate must be clear for CTEB"); } if ((control_flags & BLOCK_CONTROL_EID_REFERENCE) != 0) { - expert_add_info_format_text(pinfo, block_flag_eid_reference_item, &ei_bundle_block_control_flags, "ERROR: EID-Reference must be clear for CTEB"); + expert_add_info_format(pinfo, block_flag_eid_reference_item, &ei_bundle_block_control_flags, "ERROR: EID-Reference must be clear for CTEB"); } /* there are two elements in a CTEB, first is the custody ID */ @@ -1544,16 +1544,16 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int /* also check if CTEB is valid, i.e. custodians match */ if (bundle_custodian == NULL) { - expert_add_info_format_text(pinfo, ti, &ei_block_control_block_cteb_invalid, + expert_add_info_format(pinfo, ti, &ei_block_control_block_cteb_invalid, "CTEB Is NOT Valid (Bundle Custodian NULL)"); } else if (strlen(cteb_creator_custodian_eid) != strlen(bundle_custodian)) { - expert_add_info_format_text(pinfo, ti, &ei_block_control_block_cteb_invalid, + expert_add_info_format(pinfo, ti, &ei_block_control_block_cteb_invalid, "CTEB Is NOT Valid (Bundle Custodian [%s] != CTEB Custodian [%s])", bundle_custodian, cteb_creator_custodian_eid); } else if (memcmp(cteb_creator_custodian_eid, bundle_custodian, strlen(bundle_custodian)) != 0) { - expert_add_info_format_text(pinfo, ti, &ei_block_control_block_cteb_invalid, + expert_add_info_format(pinfo, ti, &ei_block_control_block_cteb_invalid, "CTEB Is NOT Valid (Bundle Custodian [%s] != CTEB Custodian [%s])", bundle_custodian, cteb_creator_custodian_eid); } @@ -1572,10 +1572,10 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int /* check requirements for Block Processing Control Flags */ if ((control_flags & BLOCK_CONTROL_REPLICATE) == 0) { - expert_add_info_format_text(pinfo, block_flag_replicate_item, &ei_bundle_block_control_flags, "ERROR: Replicate must be set for ECOS"); + expert_add_info_format(pinfo, block_flag_replicate_item, &ei_bundle_block_control_flags, "ERROR: Replicate must be set for ECOS"); } if ((control_flags & BLOCK_CONTROL_EID_REFERENCE) != 0) { - expert_add_info_format_text(pinfo, block_flag_eid_reference_item, &ei_bundle_block_control_flags, "ERROR: EID-Reference must be clear for ECOS"); + expert_add_info_format(pinfo, block_flag_eid_reference_item, &ei_bundle_block_control_flags, "ERROR: EID-Reference must be clear for ECOS"); } /* flags byte */ @@ -1596,7 +1596,7 @@ display_metadata_block(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int flow_label = evaluate_sdnv(tvb, offset, &sdnv_length); ti = proto_tree_add_int(block_tree, hf_ecos_flow_label, tvb, offset, sdnv_length, flow_label); if(flow_label < 0) { - expert_add_info_format_text(pinfo, ti, &ei_bundle_sdnv_length, "ECOS Flow Label Error"); + expert_add_info_format(pinfo, ti, &ei_bundle_sdnv_length, "ECOS Flow Label Error"); /* Force quitting */ *lastheader = TRUE; return offset; diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 01aeb4c4e2..716dadb93b 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -4152,7 +4152,7 @@ dissect_dvbci_tpdu_status(tvbuff_t *tvb, gint offset, pi = proto_tree_add_text(tree, tvb, offset_new, 1, "Transport Connection ID mismatch"); - expert_add_info_format_text(pinfo, pi, &ei_dvbci_t_c_id, "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer", t_c_id, lpdu_tcid); + expert_add_info_format(pinfo, pi, &ei_dvbci_t_c_id, "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer", t_c_id, lpdu_tcid); return -1; } @@ -4253,7 +4253,7 @@ dissect_dvbci_tpdu_hdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * data transmission commands */ if (t_c_id!=lpdu_tcid) { if (tag && (*tag==T_RCV || *tag==T_DATA_MORE || *tag==T_DATA_LAST)) { - expert_add_info_format_text(pinfo, pi, &ei_dvbci_t_c_id, "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer", + expert_add_info_format(pinfo, pi, &ei_dvbci_t_c_id, "Transport Connection ID mismatch, tcid is %d in the transport layer and %d in the link layer", t_c_id, lpdu_tcid); } } @@ -4422,7 +4422,7 @@ dissect_dvbci_buf_neg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if we didn't check the direction, we'd get the error when wireshark runs through the initial CAM packet for the 2nd time */ - expert_add_info_format_text(pinfo, pi, &ei_dvbci_buf_size, "Illegal buffer size command. Host shall not request a buffer size larger than the CAM proposal"); + expert_add_info_format(pinfo, pi, &ei_dvbci_buf_size, "Illegal buffer size command. Host shall not request a buffer size larger than the CAM proposal"); } } else if (direction == DATA_CAM_TO_HOST) { diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c index 8a2cd6508a..d9e2414cfd 100644 --- a/epan/dissectors/packet-eigrp.c +++ b/epan/dissectors/packet-eigrp.c @@ -737,7 +737,7 @@ dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb, switch (auth_type) { case EIGRP_AUTH_TYPE_MD5: if (EIGRP_AUTH_TYPE_MD5_LEN != auth_len) { - expert_add_info_format_text(pinfo, ti_auth_len, &ei_eigrp_auth_len, "Invalid auth len %u", auth_len); + expert_add_info_format(pinfo, ti_auth_len, &ei_eigrp_auth_len, "Invalid auth len %u", auth_len); } else { proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset, EIGRP_AUTH_TYPE_MD5_LEN, ENC_NA); @@ -746,7 +746,7 @@ dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb, case EIGRP_AUTH_TYPE_SHA256: if (EIGRP_AUTH_TYPE_SHA256_LEN != auth_len) { - expert_add_info_format_text(pinfo, ti_auth_len, &ei_eigrp_auth_len, "Invalid auth len %u", auth_len); + expert_add_info_format(pinfo, ti_auth_len, &ei_eigrp_auth_len, "Invalid auth len %u", auth_len); } else { proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset, @@ -757,7 +757,7 @@ dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb, case EIGRP_AUTH_TYPE_NONE: case EIGRP_AUTH_TYPE_TEXT: default: - expert_add_info_format_text(pinfo, ti_auth_type, &ei_eigrp_auth_type, "Invalid auth type %u", auth_type); + expert_add_info_format(pinfo, ti_auth_type, &ei_eigrp_auth_type, "Invalid auth type %u", auth_type); break; } } @@ -1069,7 +1069,7 @@ dissect_eigrp_ipv4_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, if (addr_len < 0) { ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen, tvb, offset, 1, ENC_BIG_ENDIAN); - expert_add_info_format_text(pinfo, ti_prefixlen, &ei_eigrp_prefixlen, "Invalid prefix length %u, must be <= 32", length); + expert_add_info_format(pinfo, ti_prefixlen, &ei_eigrp_prefixlen, "Invalid prefix length %u, must be <= 32", length); addr_len = 4; /* assure we can exit the loop */ } else { @@ -1123,7 +1123,7 @@ dissect_eigrp_ipv6_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, if (addr_len < 0) { ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen, tvb, offset, 1, ENC_BIG_ENDIAN); - expert_add_info_format_text(pinfo, ti_prefixlen, &ei_eigrp_prefixlen, "Invalid prefix length %u, must be <= 128", length); + expert_add_info_format(pinfo, ti_prefixlen, &ei_eigrp_prefixlen, "Invalid prefix length %u, must be <= 128", length); addr_len = 16; /* assure we can exit the loop */ } else { proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen, tvb, offset, 1, @@ -1642,7 +1642,7 @@ dissect_eigrp_general_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb, dissect_eigrp_peer_tidlist(tree, tvb); break; default: - expert_add_info_format_text(pinfo, ti, &ei_eigrp_tlv_type, "Unknown Generic TLV (0x%04x)", tlv); + expert_add_info_format(pinfo, ti, &ei_eigrp_tlv_type, "Unknown Generic TLV (0x%04x)", tlv); break; } } @@ -2557,7 +2557,7 @@ dissect_eigrp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ break; default: - expert_add_info_format_text(pinfo, ti, &ei_eigrp_tlv_type, "Unknown TLV Group (0x%04x)", tlv); + expert_add_info_format(pinfo, ti, &ei_eigrp_tlv_type, "Unknown TLV Group (0x%04x)", tlv); } offset += size; diff --git a/epan/dissectors/packet-eiss.c b/epan/dissectors/packet-eiss.c index bc06ffe116..0073b8528e 100644 --- a/epan/dissectors/packet-eiss.c +++ b/epan/dissectors/packet-eiss.c @@ -298,7 +298,7 @@ dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) msg_error = items[PACKET_MPEG_SECT_PI__RESERVED]; PROTO_ITEM_SET_GENERATED(msg_error); - expert_add_info_format_text(pinfo, msg_error, &ei_eiss_invalid_reserved_bits, "Invalid reserved1 bits (should all be 0)"); + expert_add_info_format(pinfo, msg_error, &ei_eiss_invalid_reserved_bits, "Invalid reserved1 bits (should all be 0)"); } if (1021 < sect_len) { @@ -312,7 +312,7 @@ dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) reserved2 = tvb_get_guint8(tvb, offset); pi = proto_tree_add_item(eiss_tree, hf_eiss_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN); if (0 != reserved2) { - expert_add_info_format_text(pinfo, pi, &ei_eiss_invalid_reserved_bits, "Invalid reserved2 bits (should all be 0)"); + expert_add_info_format(pinfo, pi, &ei_eiss_invalid_reserved_bits, "Invalid reserved2 bits (should all be 0)"); } offset++; diff --git a/epan/dissectors/packet-erf.c b/epan/dissectors/packet-erf.c index 02632b6bb0..3c3ecd4895 100644 --- a/epan/dissectors/packet-erf.c +++ b/epan/dissectors/packet-erf.c @@ -853,27 +853,27 @@ dissect_mc_hdlc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_res2, tvb, 0, 0, mc_hdlc->byte2); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_fcse, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_FCSE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC FCS Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC FCS Error"); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_sre, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_SRE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC Short Record Error, <5 bytes"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC Short Record Error, <5 bytes"); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_lre, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_LRE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC Long Record Error, >2047 bytes"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC Long Record Error, >2047 bytes"); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_afe, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_AFE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC Aborted Frame Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC Aborted Frame Error"); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_oe, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_OE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC Octet Error, the closing flag was not octet aligned after bit unstuffing"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC Octet Error, the closing flag was not octet aligned after bit unstuffing"); pi=proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_lbe, tvb, 0, 0, mc_hdlc->byte3); if (mc_hdlc->byte3 & MC_HDLC_LBE_MASK) - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF MC Lost Byte Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF MC Lost Byte Error"); proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_first, tvb, 0, 0, mc_hdlc->byte3); proto_tree_add_uint(mc_hdlc_tree, hf_erf_mc_hdlc_res3, tvb, 0, 0, mc_hdlc->byte3); @@ -1085,19 +1085,19 @@ dissect_erf_pseudo_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pi=proto_tree_add_uint(flags_tree, hf_erf_flags_trunc, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.flags); if (pinfo->pseudo_header->erf.phdr.flags & ERF_HDR_TRUNC_MASK) { proto_item_append_text(flags_item, "; ERF Truncation Error"); - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF Truncation Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF Truncation Error"); } pi=proto_tree_add_uint(flags_tree, hf_erf_flags_rxe, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.flags); if (pinfo->pseudo_header->erf.phdr.flags & ERF_HDR_RXE_MASK) { proto_item_append_text(flags_item, "; ERF Rx Error"); - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF Rx Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF Rx Error"); } pi=proto_tree_add_uint(flags_tree, hf_erf_flags_dse, tvb, 0, 0, pinfo->pseudo_header->erf.phdr.flags); if (pinfo->pseudo_header->erf.phdr.flags & ERF_HDR_DSE_MASK) { proto_item_append_text(flags_item, "; ERF DS Error"); - expert_add_info_format_text(pinfo, pi, &ei_erf_checksum_error, "ERF DS Error"); + expert_add_info_format(pinfo, pi, &ei_erf_checksum_error, "ERF DS Error"); } proto_item_append_text(flags_item, ")"); diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index e4f72e9c8d..23f5a0cf34 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -336,7 +336,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree_add_item(addr_tree, hf_eth_ig, tvb, 6, 3, ENC_BIG_ENDIAN); ti = proto_tree_add_item(fh_tree, hf_eth_invalid_lentype, tvb, 12, 2, ENC_BIG_ENDIAN); - expert_add_info_format_text(pinfo, ti, &ei_eth_invalid_lentype, + expert_add_info_format(pinfo, ti, &ei_eth_invalid_lentype, "Invalid length/type: 0x%04x (%d)", ehdr->type, ehdr->type); next_tvb = tvb_new_subset_remaining(tvb, 14); call_dissector(data_handle, next_tvb, pinfo, parent_tree); diff --git a/epan/dissectors/packet-etv.c b/epan/dissectors/packet-etv.c index 0cf8a68101..e47bb933a0 100644 --- a/epan/dissectors/packet-etv.c +++ b/epan/dissectors/packet-etv.c @@ -118,12 +118,12 @@ dissect_etv_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int prot proto_item_append_text(ti, " Filter=0x%x", filter_info); pi = proto_tree_add_item(etv_tree, hf_filter_info, tvb, offset, 2, ENC_BIG_ENDIAN); if ((proto_etv_dii == proto) && (0xFBFB != filter_info)) { - expert_add_info_format_text(pinfo, pi, ei_filter_info, + expert_add_info_format(pinfo, pi, ei_filter_info, "Invalid filter_info value (must be 0xFBFB)"); } else if ((proto_etv_ddb == proto) && ((filter_info < 1) || (0xfbef < filter_info))) { - expert_add_info_format_text(pinfo, pi, ei_filter_info, + expert_add_info_format(pinfo, pi, ei_filter_info, "Invalid filter_info value (must be [0x0001-0xFBEF] inclusive)"); } offset += 2; @@ -131,7 +131,7 @@ dissect_etv_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int prot reserved2 = tvb_get_guint8(tvb, offset); pi = proto_tree_add_item(etv_tree, hf_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (0 != reserved2) { - expert_add_info_format_text(pinfo, pi, ei_reserved, + expert_add_info_format(pinfo, pi, ei_reserved, "Invalid reserved2 bits (should all be 0)"); } offset += 1; diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 9145cd4b80..5fd94a19b4 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -1301,7 +1301,7 @@ dissect_fcsof(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { "[error: should be %8.8x]", crc, crc_computed); - expert_add_info_format_text(pinfo, it, &ei_fccrc, + expert_add_info_format(pinfo, it, &ei_fccrc, "Bad FC CRC %8.8x %8.x", crc, crc_computed); } diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c index 4023a50fe7..f901732cae 100644 --- a/epan/dissectors/packet-fcels.c +++ b/epan/dissectors/packet-fcels.c @@ -1864,7 +1864,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Check that the source address is, in fact, an FC address */ if (pinfo->src.type != AT_FC) { - expert_add_info_format_text(pinfo, ti, &ei_fcels_src_unknown, + expert_add_info_format(pinfo, ti, &ei_fcels_src_unknown, "Unknown source address type: %u", pinfo->src.type); return; @@ -1928,7 +1928,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Check that the source address is, in fact, an FC address */ if (pinfo->dst.type != AT_FC) { - expert_add_info_format_text(pinfo, ti, &ei_fcels_dst_unknown, + expert_add_info_format(pinfo, ti, &ei_fcels_dst_unknown, "Unknown destination address type: %u", pinfo->dst.type); return; diff --git a/epan/dissectors/packet-fcoe.c b/epan/dissectors/packet-fcoe.c index 912a588fed..d963a25613 100644 --- a/epan/dissectors/packet-fcoe.c +++ b/epan/dissectors/packet-fcoe.c @@ -223,7 +223,7 @@ dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "CRC: %8.8x " "[error: should be %8.8x]", crc, crc_computed); - expert_add_info_format_text(pinfo, item, &ei_fcoe_crc, + expert_add_info_format(pinfo, item, &ei_fcoe_crc, "Bad FC CRC %8.8x %8.x", crc, crc_computed); } diff --git a/epan/dissectors/packet-fcoib.c b/epan/dissectors/packet-fcoib.c index 8627ac353a..2adf0317fd 100644 --- a/epan/dissectors/packet-fcoib.c +++ b/epan/dissectors/packet-fcoib.c @@ -291,7 +291,7 @@ dissect_fcoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U "CRC: %8.8x " "[error: should be %8.8x]", crc, crc_computed); - expert_add_info_format_text(pinfo, item, &ei_fcoib_crc, + expert_add_info_format(pinfo, item, &ei_fcoib_crc, "Bad FC CRC %8.8x %8.x", crc, crc_computed); } diff --git a/epan/dissectors/packet-forces.c b/epan/dissectors/packet-forces.c index fa9b029905..a652382798 100644 --- a/epan/dissectors/packet-forces.c +++ b/epan/dissectors/packet-forces.c @@ -316,7 +316,7 @@ dissect_path_data_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint tvb, offset+2, 2, ENC_BIG_ENDIAN); if (length_TLV < TLV_TL_LENGTH) { - expert_add_info_format_text(pinfo, ti, &ei_forces_lfbselect_tlv_type_operation_path_length, "Bogus TLV length: %u", length_TLV); + expert_add_info_format(pinfo, ti, &ei_forces_lfbselect_tlv_type_operation_path_length, "Bogus TLV length: %u", length_TLV); break; } proto_item_set_len(ti, length_TLV); @@ -373,7 +373,7 @@ dissect_operation_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint ti = proto_tree_add_item(oper_tree, hf_forces_lfbselect_tlv_type_operation_type, tvb, offset, 2, ENC_BIG_ENDIAN); if (try_val_to_str(type, operation_type_vals) == NULL) - expert_add_info_format_text(pinfo, ti, &ei_forces_lfbselect_tlv_type_operation_type, + expert_add_info_format(pinfo, ti, &ei_forces_lfbselect_tlv_type_operation_type, "Bogus: ForCES Operation TLV (Type:0x%04x) is not supported", type); length = tvb_get_ntohs(tvb, offset+2); @@ -459,11 +459,11 @@ dissect_redirecttlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint of if (tvb_reported_length_remaining(tvb, offset) < length_redirect) { - expert_add_info_format_text(pinfo, ti, &ei_forces_redirect_tlv_redirect_data_tlv_length, "Bogus: Redirect Data TLV length (%u bytes) is wrong", length_redirect); + expert_add_info_format(pinfo, ti, &ei_forces_redirect_tlv_redirect_data_tlv_length, "Bogus: Redirect Data TLV length (%u bytes) is wrong", length_redirect); } else if (length_redirect < TLV_TL_LENGTH + MIN_IP_HEADER_LENGTH) { - expert_add_info_format_text(pinfo, ti, &ei_forces_redirect_tlv_redirect_data_tlv_length, "Bogus: Redirect Data TLV length (%u bytes) not big enough for IP layer", length_redirect); + expert_add_info_format(pinfo, ti, &ei_forces_redirect_tlv_redirect_data_tlv_length, "Bogus: Redirect Data TLV length (%u bytes) not big enough for IP layer", length_redirect); } else { @@ -513,10 +513,10 @@ dissect_forces(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offs ti = proto_tree_add_uint_format( forces_main_header_tree, hf_forces_length, tvb, offset+2, 2, length_count, "Length: %u Bytes", length_count); if (length_count != tvb_reported_length_remaining(tvb, offset)) - expert_add_info_format_text(pinfo, ti, &ei_forces_length, "Bogus: ForCES Header length (%u bytes) is wrong),should be (%u bytes)", + expert_add_info_format(pinfo, ti, &ei_forces_length, "Bogus: ForCES Header length (%u bytes) is wrong),should be (%u bytes)", length_count, tvb_reported_length_remaining(tvb, offset)); if (length_count < 24) - expert_add_info_format_text(pinfo, ti, &ei_forces_length, "Bogus: ForCES Header length (%u bytes) is less than 24bytes)", length_count); + expert_add_info_format(pinfo, ti, &ei_forces_length, "Bogus: ForCES Header length (%u bytes) is less than 24bytes)", length_count); col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %s, Total Length: %u Bytes", val_to_str(message_type, message_type_vals, "Unknown messagetype 0x%x"), length_count); @@ -550,11 +550,11 @@ dissect_forces(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offs ti = proto_tree_add_uint_format(forces_tlv_tree, hf_forces_tlv_length, tvb, offset+2, 2, length_count, "Length: %u Bytes", length_count); if (tvb_reported_length_remaining(tvb, offset) < length_count) - expert_add_info_format_text(pinfo, ti, &ei_forces_tlv_length, "Bogus: Main TLV length (%u bytes) is wrong", length_count); + expert_add_info_format(pinfo, ti, &ei_forces_tlv_length, "Bogus: Main TLV length (%u bytes) is wrong", length_count); if (length_count < TLV_TL_LENGTH) { - expert_add_info_format_text(pinfo, ti, &ei_forces_tlv_length, "Bogus TLV length: %u", length_count); + expert_add_info_format(pinfo, ti, &ei_forces_tlv_length, "Bogus TLV length: %u", length_count); break; } diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index 42f0694fd6..aa8e24394c 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -237,7 +237,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) comment_item = proto_tree_add_string_format(comments_tree, hf_comments_text, tvb, 0, -1, pinfo->pkt_comment, "%s", pinfo->pkt_comment); - expert_add_info_format_text(pinfo, comment_item, &ei_comments_text, + expert_add_info_format(pinfo, comment_item, &ei_comments_text, "%s", pinfo->pkt_comment); @@ -325,7 +325,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) proto_tree_add_time(fh_tree, hf_frame_arrival_time, tvb, 0, 0, &(pinfo->fd->abs_ts)); if(pinfo->fd->abs_ts.nsecs < 0 || pinfo->fd->abs_ts.nsecs >= 1000000000) { - expert_add_info_format_text(pinfo, ti, &ei_arrive_time_out_of_range, + expert_add_info_format(pinfo, ti, &ei_arrive_time_out_of_range, "Arrival Time: Fractional second %09ld is invalid," " the valid range is 0-1000000000", (long) pinfo->fd->abs_ts.nsecs); diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c index 035c8cc292..9ddeff2e4b 100644 --- a/epan/dissectors/packet-giop.c +++ b/epan/dissectors/packet-giop.c @@ -2283,7 +2283,7 @@ static void dissect_data_for_typecode(tvbuff_t *tvb, packet_info *pinfo, proto_t case tk_abstract_interface: break; default: - expert_add_info_format_text(pinfo, item, &ei_giop_unknown_typecode_datatype, "Unknown typecode data type %u", data_type); + expert_add_info_format(pinfo, item, &ei_giop_unknown_typecode_datatype, "Unknown typecode data type %u", data_type); break; } } @@ -3030,7 +3030,7 @@ void get_CDR_fixed(tvbuff_t *tvb, packet_info *pinfo, proto_item *item, gchar ** (*seq)[sindex] = '-'; break; default: - expert_add_info_format_text(pinfo, item, &ei_giop_unknown_sign_value, + expert_add_info_format(pinfo, item, &ei_giop_unknown_sign_value, "Unknown sign value in fixed type %u", sign); (*seq)[sindex] = '*'; /* flag as sign unknown */ break; @@ -3455,7 +3455,7 @@ guint32 get_CDR_typeCode(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, dissect_tk_abstract_interface_params(tvb, tree, offset, stream_is_big_endian, boundary ); break; default: - expert_add_info_format_text(pinfo, ti, &ei_giop_unknown_tckind, "Unknown TCKind %u", val); + expert_add_info_format(pinfo, ti, &ei_giop_unknown_tckind, "Unknown TCKind %u", val); break; } /* val */ @@ -3716,7 +3716,7 @@ dissect_target_address(tvbuff_t * tvb, packet_info *pinfo, int *offset, proto_tr ti = proto_tree_add_uint (tree, hf_giop_target_address_key_addr_len, tvb, *offset -4, 4, len); if (len > (guint32)tvb_reported_length_remaining(tvb, *offset-4)) { - expert_add_info_format_text(pinfo, ti, &ei_giop_length_too_big, "KeyAddr key length bigger than packet size"); + expert_add_info_format(pinfo, ti, &ei_giop_length_too_big, "KeyAddr key length bigger than packet size"); return; } @@ -3813,7 +3813,7 @@ static void decode_UnknownServiceContext(tvbuff_t *tvb, packet_info *pinfo, prot ti = proto_tree_add_uint(tree, hf_giop_context_data_len, tvb, *offset - 4, 4, context_data_len); if (context_data_len > (guint32)tvb_reported_length_remaining(tvb, *offset-4)) { - expert_add_info_format_text(pinfo, ti, &ei_giop_length_too_big, "Context data length bigger than packet size"); + expert_add_info_format(pinfo, ti, &ei_giop_length_too_big, "Context data length bigger than packet size"); return; } @@ -4336,7 +4336,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo, tf = proto_tree_add_uint (request_tree, hf_giop_objekt_key_len, tvb, offset-4, 4, objkey_len); if (objkey_len > (guint32)tvb_reported_length_remaining(tvb, offset-4)) { - expert_add_info_format_text(pinfo, tf, &ei_giop_length_too_big, "Object key length bigger than packet size"); + expert_add_info_format(pinfo, tf, &ei_giop_length_too_big, "Object key length bigger than packet size"); return; } @@ -4363,7 +4363,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo, tf = proto_tree_add_uint (request_tree, hf_giop_req_principal_len, tvb, offset - 4, 4, len); if (len > (guint32)tvb_reported_length_remaining(tvb, offset-4)) { - expert_add_info_format_text(pinfo, tf, &ei_giop_length_too_big, "Requesting Principal length bigger than packet size"); + expert_add_info_format(pinfo, tf, &ei_giop_length_too_big, "Requesting Principal length bigger than packet size"); return; } @@ -4564,7 +4564,7 @@ dissect_giop_locate_request( tvbuff_t * tvb, packet_info * pinfo, proto_tree_add_uint (locate_request_tree, hf_giop_objekt_key_len, tvb, offset-4, 4, len); if (len > (guint32)tvb_reported_length_remaining(tvb, offset-4)) { - expert_add_info_format_text(pinfo, tf, &ei_giop_length_too_big, "Object key length bigger than packet size"); + expert_add_info_format(pinfo, tf, &ei_giop_length_too_big, "Object key length bigger than packet size"); return; } @@ -4710,7 +4710,7 @@ static void dissect_giop_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree col_add_fstr (pinfo->cinfo, COL_INFO, "Version %u.%u", header.GIOP_version.major, header.GIOP_version.minor); - expert_add_info_format_text(pinfo, version_item, &ei_giop_version_not_supported, "Version %u.%u not supported", + expert_add_info_format(pinfo, version_item, &ei_giop_version_not_supported, "Version %u.%u not supported", header.GIOP_version.major, header.GIOP_version.minor); payload_tvb = tvb_new_subset_remaining (tvb, GIOP_HEADER_SIZE); @@ -4756,7 +4756,7 @@ static void dissect_giop_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree ti = proto_tree_add_uint(header_tree, hf_giop_message_size, tvb, 8, 4, message_size); if (message_size > GIOP_MAX_MESSAGE_SIZE) { - expert_add_info_format_text(pinfo, ti, &ei_giop_message_size_too_big, + expert_add_info_format(pinfo, ti, &ei_giop_message_size_too_big, "Message size %u is too big, perhaps it's an endian issue?", message_size); return; } @@ -5551,7 +5551,7 @@ static void decode_TaggedProfile(tvbuff_t *tvb, packet_info *pinfo, proto_tree * default: if (seqlen_pd-1 > (guint32)tvb_reported_length_remaining(tvb, *offset-4)) { - expert_add_info_format_text(pinfo, ti, &ei_giop_length_too_big, "Profile data bigger than packet size"); + expert_add_info_format(pinfo, ti, &ei_giop_length_too_big, "Profile data bigger than packet size"); break; } @@ -5620,7 +5620,7 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre ti = proto_tree_add_uint(tree,hf_giop_sequence_length,tvb, *offset-4,4,seqlen); if (seqlen > (guint32)tvb_reported_length_remaining(tvb, *offset-4)) { - expert_add_info_format_text(pinfo, ti, &ei_giop_length_too_big, "Sequence length bigger than packet size"); + expert_add_info_format(pinfo, ti, &ei_giop_length_too_big, "Sequence length bigger than packet size"); return; } @@ -5689,7 +5689,7 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre ti = proto_tree_add_uint(tree,hf_giop_sequence_length,tvb, *offset-4,4,seqlen1); if (seqlen1 > (guint32)tvb_reported_length_remaining(tvb, *offset-4)) { - expert_add_info_format_text(pinfo, ti, &ei_giop_length_too_big, "Sequence length bigger than packet size"); + expert_add_info_format(pinfo, ti, &ei_giop_length_too_big, "Sequence length bigger than packet size"); return; } @@ -5703,7 +5703,7 @@ static void decode_IIOP_IOR_profile(tvbuff_t *tvb, packet_info *pinfo, proto_tre break; default: - expert_add_info_format_text(pinfo, ti_minor, &ei_giop_invalid_v_minor, "Invalid v_minor value = %u", v_minor); + expert_add_info_format(pinfo, ti_minor, &ei_giop_invalid_v_minor, "Invalid v_minor value = %u", v_minor); break; } diff --git a/epan/dissectors/packet-glbp.c b/epan/dissectors/packet-glbp.c index 570321b6c1..054cdbf795 100644 --- a/epan/dissectors/packet-glbp.c +++ b/epan/dissectors/packet-glbp.c @@ -202,7 +202,7 @@ dissect_glbp_hello(tvbuff_t *tvb, int offset, switch (addrtype) { case 1: if (addrlen != 4) { - expert_add_info_format_text(pinfo, NULL, &ei_glbp_ipv4_wrong_length, + expert_add_info_format(pinfo, NULL, &ei_glbp_ipv4_wrong_length, "Wrong IPv4 address length: %u", addrlen); return offset + addrlen; } @@ -210,7 +210,7 @@ dissect_glbp_hello(tvbuff_t *tvb, int offset, break; case 2: if (addrlen != 16) { - expert_add_info_format_text(pinfo, NULL, &ei_glbp_ipv6_wrong_length, + expert_add_info_format(pinfo, NULL, &ei_glbp_ipv6_wrong_length, "Wrong IPv6 address length: %u", addrlen); return offset + addrlen; } @@ -333,7 +333,7 @@ dissect_glbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) type = tvb_get_guint8(tvb, offset); length = tvb_get_guint8(tvb, offset+1); if (length < 2) { - expert_add_info_format_text(pinfo, NULL, &ei_glbp_tlv_length_too_small, + expert_add_info_format(pinfo, NULL, &ei_glbp_tlv_length_too_small, "Length %u too small", length); return offset; } diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c index e9f78c3a48..028c9074b2 100644 --- a/epan/dissectors/packet-gmhdr.c +++ b/epan/dissectors/packet-gmhdr.c @@ -142,7 +142,7 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui guint32 tv = tvb_get_ntohl(tvb, offset) >> 8; /* Only 24-bit field */ if (fl != 3) { - expert_add_info_format_text(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); + expert_add_info_format(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); break; } ti = proto_tree_add_item(gmhdr_tree, hf_gmhdr_srcport_g, tvb, offset, fl, ENC_BIG_ENDIAN); @@ -160,7 +160,7 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui } case GMHDR_FTYPE_PKTSIZE: if (fl != 2) { - expert_add_info_format_text(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); + expert_add_info_format(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); break; } proto_tree_add_item(gmhdr_tree, hf_gmhdr_pktsize, tvb, offset, fl, ENC_BIG_ENDIAN); @@ -170,7 +170,7 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui case GMHDR_FTYPE_TIMESTAMP_GPS: case GMHDR_FTYPE_TIMESTAMP_1588: if (fl != 8) { - expert_add_info_format_text(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); + expert_add_info_format(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); break; } ti = proto_tree_add_item(gmhdr_tree, hf_gmhdr_timestamp, tvb, offset, fl, ENC_TIME_TIMESPEC|ENC_BIG_ENDIAN); @@ -178,7 +178,7 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui break; case GMHDR_FTYPE_FCS: { if (fl != 4) { - expert_add_info_format_text(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); + expert_add_info_format(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); break; } ti = proto_tree_add_item(gmhdr_tree, hf_gmhdr_origcrc, tvb, offset, 4, ENC_BIG_ENDIAN); @@ -187,7 +187,7 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui } case GMHDR_FTYPE_SRCPORT_H: { if (fl != 4) { - expert_add_info_format_text(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); + expert_add_info_format(pinfo, gmhdr_tree, &ei_gmhdr_field_length_invalid, "Field length %u invalid", fl); break; } ti = proto_tree_add_item(gmhdr_tree, hf_gmhdr_srcport_h, tvb, offset, fl, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index c18c7a8530..67ad238051 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -8065,7 +8065,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) ext_tree = proto_item_add_subtree(tf, ett_gtp_ext_hdr); ext_hdr_len_item = proto_tree_add_item(ext_tree, hf_gtp_ext_hdr_length, tvb, offset,1, ENC_BIG_ENDIAN); if (ext_hdr_length == 0) { - expert_add_info_format_text(pinfo, ext_hdr_len_item, &ei_gtp_ext_length_mal, + expert_add_info_format(pinfo, ext_hdr_len_item, &ei_gtp_ext_length_mal, "Extension header length is zero"); return tvb_length(tvb); } @@ -8102,7 +8102,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) expert_add_info(pinfo, ext_item, &ei_gtp_ext_hdr_pdcpsn); } } else { - expert_add_info_format_text(pinfo, ext_tree, &ei_gtp_ext_length_warn, "The length field for the PDCP SN Extension header should be 1."); + expert_add_info_format(pinfo, ext_tree, &ei_gtp_ext_length_warn, "The length field for the PDCP SN Extension header should be 1."); } break; @@ -8120,7 +8120,7 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item(ext_tree, hf_gtp_ext_hdr_udp_port, tvb, offset, 2, ENC_BIG_ENDIAN); } else { /* Bad length */ - expert_add_info_format_text(pinfo, ext_tree, &ei_gtp_ext_length_warn, "The length field for the UDP Port Extension header should be 1."); + expert_add_info_format(pinfo, ext_tree, &ei_gtp_ext_length_warn, "The length field for the UDP Port Extension header should be 1."); } break; diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index 2115067f0f..d444742b04 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -247,7 +247,7 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, actx->pinfo->private_data = actx->rose_ctx; call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); if (!arg_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } return offset; @@ -331,7 +331,7 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act actx->pinfo->private_data = actx->rose_ctx; call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); if (!res_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } } @@ -400,7 +400,7 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx actx->pinfo->private_data = actx->rose_ctx; call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); if (!err_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } return offset; diff --git a/epan/dissectors/packet-hpfeeds.c b/epan/dissectors/packet-hpfeeds.c index 452f4fdcd8..c238db4a2f 100644 --- a/epan/dissectors/packet-hpfeeds.c +++ b/epan/dissectors/packet-hpfeeds.c @@ -273,7 +273,7 @@ dissect_hpfeeds_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1; if (opcode >= array_length(opcode_vals) - 1) { - expert_add_info_format_text(pinfo, ti, &ei_hpfeeds_opcode_unknown, + expert_add_info_format(pinfo, ti, &ei_hpfeeds_opcode_unknown, "Unknown value %02x for opcode field", opcode); } diff --git a/epan/dissectors/packet-hpsw.c b/epan/dissectors/packet-hpsw.c index ba57fb9aa8..273265a144 100644 --- a/epan/dissectors/packet-hpsw.c +++ b/epan/dissectors/packet-hpsw.c @@ -103,7 +103,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length > 0) { proto_tree_add_item(tree, hf_hpsw_device_name, tvb, offset, length, ENC_NA|ENC_ASCII); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Device Name: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Device Name: Bad length %u", length); } break; @@ -111,7 +111,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length > 0) { proto_tree_add_item(tree, hf_hpsw_device_version, tvb, offset, length, ENC_NA|ENC_ASCII); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Version: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Version: Bad length %u", length); } break; @@ -119,7 +119,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length > 0) { proto_tree_add_item(tree, hf_hpsw_config_name, tvb, offset, length, ENC_NA|ENC_ASCII); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Config Name: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Config Name: Bad length %u", length); } break; @@ -127,7 +127,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 6) { proto_tree_add_item(tree, hf_hpsw_root_mac_addr, tvb, offset, length, ENC_NA); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Root MAC Addr: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Root MAC Addr: Bad length %u", length); } break; @@ -135,7 +135,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 4) { proto_tree_add_item(tree, hf_hpsw_ip_addr, tvb, offset, length, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "IP Addr: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "IP Addr: Bad length %u", length); } break; @@ -143,7 +143,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_hpsw_field_6, tvb, offset, length, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 6: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 6: Bad length %u", length); } break; @@ -151,7 +151,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length > 0) { proto_tree_add_item(tree, hf_hpsw_domain, tvb, offset, length, ENC_NA|ENC_ASCII); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Domain: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Domain: Bad length %u", length); } break; @@ -159,7 +159,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_hpsw_field_8, tvb, offset, length, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 8: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 8: Bad length %u", length); } break; @@ -167,7 +167,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_hpsw_field_9, tvb, offset, length, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 9: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 9: Bad length %u", length); } break; @@ -175,7 +175,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 4) { proto_tree_add_item(tree, hf_hpsw_field_10, tvb, offset, length, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 10: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 10: Bad length %u", length); } break; @@ -189,7 +189,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, offset += 6; } } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Neighbors: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Neighbors: Bad length %u", length); } break; @@ -197,7 +197,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 1) { proto_tree_add_item(tree, hf_hpsw_field_12, tvb, offset, length, ENC_NA); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 12: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Field 12: Bad length %u", length); } break; @@ -206,7 +206,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, proto_tree_add_item(tree, hf_hpsw_device_id, tvb, offset, 6, ENC_NA); proto_tree_add_item(tree, hf_hpsw_device_id_data, tvb, offset+6, length-6, ENC_NA); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Device ID: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Device ID: Bad length %u", length); } break; @@ -214,7 +214,7 @@ dissect_hpsw_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 6) { proto_tree_add_item(tree, hf_hpsw_own_mac_addr, tvb, offset, length, ENC_NA); } else { - expert_add_info_format_text(pinfo, ti, &ei_hpsw_tlvlength_bad, "Own MAC Addr: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_hpsw_tlvlength_bad, "Own MAC Addr: Bad length %u", length); } break; diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 2525abb0b1..e499fab487 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -979,7 +979,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, hdr_item = proto_tree_add_text(http_tree, tvb, offset, next_offset - offset, "%s", text); } - expert_add_info_format_text(pinfo, hdr_item, &ei_http_chat, "%s", text); + expert_add_info_format(pinfo, hdr_item, &ei_http_chat, "%s", text); if (reqresp_dissector) { if (tree) req_tree = proto_item_add_subtree(hdr_item, ett_http_request); else req_tree = NULL; diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index 278e6223fa..05f8168c4f 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -852,7 +852,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * g_debug("++ done"); #endif } else if (!is_reverse_circuit(src_circuit_id, iax_call)) { - expert_add_info_format_text(pinfo, item, &ei_iax_circuit_id_conflict, + expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, "IAX Packet %u from circuit ids %u->%u conflicts with earlier call with circuit ids %u->%u", framenum, src_circuit_id, dst_circuit_id, @@ -868,7 +868,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * reversed = FALSE; if (!is_forward_circuit(src_circuit_id, iax_call)) { - expert_add_info_format_text(pinfo, item, &ei_iax_circuit_id_conflict, + expert_add_info_format(pinfo, item, &ei_iax_circuit_id_conflict, "IAX Packet %u from circuit ids %u->%u conflicts with earlier call with circuit ids %u->%u", framenum, src_circuit_id, dst_circuit_id, @@ -1274,7 +1274,7 @@ static guint32 dissect_ies(tvbuff_t *tvb, packet_info *pinfo, guint32 offset, break; default: - expert_add_info_format_text(pinfo, iax_item, &ei_iax_peer_address_unsupported, + expert_add_info_format(pinfo, iax_item, &ei_iax_peer_address_unsupported, "Not supported in IAX dissector: peer address family of %u", apparent_addr_family); break; } diff --git a/epan/dissectors/packet-icep.c b/epan/dissectors/packet-icep.c index be601dc65e..2846acffd6 100644 --- a/epan/dissectors/packet-icep.c +++ b/epan/dissectors/packet-icep.c @@ -187,7 +187,7 @@ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item /* check for first byte */ if ( !tvb_bytes_exist(tvb, offset, 1) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_string_malformed, "1st byte of Size missing"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "1st byte of Size missing"); col_append_str(pinfo->cinfo, COL_INFO, " (1st byte of Size missing)"); (*consumed) = -1; @@ -204,7 +204,7 @@ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item /* check for next 4 bytes */ if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_string_malformed, "second field of Size missing"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "second field of Size missing"); col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); (*consumed) = -1; @@ -222,7 +222,7 @@ static void dissect_ice_string(packet_info *pinfo, proto_tree *tree, proto_item /* check if the string exists */ if ( !tvb_bytes_exist(tvb, offset, Size) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_string_malformed, "missing or truncated string"); + expert_add_info_format(pinfo, item, &ei_icep_string_malformed, "missing or truncated string"); col_append_str(pinfo->cinfo, COL_INFO, " (missing or truncated string)"); (*consumed) = -1; @@ -358,7 +358,7 @@ static void dissect_ice_context(packet_info *pinfo, proto_tree *tree, proto_item /* check first byte */ if ( !tvb_bytes_exist(tvb, offset, 1) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_context_missing, "context missing"); + expert_add_info_format(pinfo, item, &ei_icep_context_missing, "context missing"); col_append_str(pinfo->cinfo, COL_INFO, " (context missing)"); (*consumed) = -1; @@ -375,7 +375,7 @@ static void dissect_ice_context(packet_info *pinfo, proto_tree *tree, proto_item /* check for next 4 bytes */ if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_context_missing, "second field of Size missing"); + expert_add_info_format(pinfo, item, &ei_icep_context_missing, "second field of Size missing"); col_append_str(pinfo->cinfo, COL_INFO, " (second field of Size missing)"); (*consumed) = -1; @@ -521,7 +521,7 @@ static void dissect_ice_params(packet_info *pinfo, proto_tree *tree, proto_item if ( tvb_data_remained < ( size - ICEP_MIN_PARAMS_SIZE ) ) { - expert_add_info_format_text(pinfo, item, &ei_icep_params_encapsulated, "missing encapsulated data (%d bytes)", size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); + expert_add_info_format(pinfo, item, &ei_icep_params_encapsulated, "missing encapsulated data (%d bytes)", size - ICEP_MIN_PARAMS_SIZE - tvb_data_remained); col_append_fstr(pinfo->cinfo, COL_INFO, " (missing encapsulated data (%d bytes))", @@ -562,7 +562,7 @@ static void dissect_icep_request_common(tvbuff_t *tvb, guint32 offset, /* check common header (i.e. the batch request one)*/ if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_COMMON_REQ_HEADER_SIZE) ) { - expert_add_info_format_text(pinfo, icep_sub_item, &ei_icep_length, "too short header"); + expert_add_info_format(pinfo, icep_sub_item, &ei_icep_length, "too short header"); col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); goto error; @@ -702,7 +702,7 @@ static void dissect_icep_request(tvbuff_t *tvb, guint32 offset, /* check for req id */ if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format_text(pinfo, icep_item, &ei_icep_length, "too short header"); + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); return; } @@ -771,7 +771,7 @@ static void dissect_icep_batch_request(tvbuff_t *tvb, guint32 offset, /* check for first 4 byte */ if ( !tvb_bytes_exist(tvb, offset, 4) ) { - expert_add_info_format_text(pinfo, icep_item, &ei_icep_length, "counter of batch requests missing"); + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "counter of batch requests missing"); col_append_str(pinfo->cinfo, COL_INFO, " (counter of batch requests missing)"); return; } @@ -783,7 +783,7 @@ static void dissect_icep_batch_request(tvbuff_t *tvb, guint32 offset, if ( num_reqs > icep_max_batch_requests ) { - expert_add_info_format_text(pinfo, icep_item, &ei_icep_batch_requests, "too many batch requests (%d)", num_reqs); + expert_add_info_format(pinfo, icep_item, &ei_icep_batch_requests, "too many batch requests (%d)", num_reqs); col_append_fstr(pinfo->cinfo, COL_INFO, " (too many batch requests, %d)", num_reqs); return; @@ -856,7 +856,7 @@ static void dissect_icep_reply(tvbuff_t *tvb, guint32 offset, if ( !tvb_bytes_exist(tvb, offset, ICEP_MIN_REPLY_SIZE) ) { - expert_add_info_format_text(pinfo, icep_item, &ei_icep_length, "too short header"); + expert_add_info_format(pinfo, icep_item, &ei_icep_length, "too short header"); col_append_str(pinfo->cinfo, COL_INFO, " (too short header)"); return; @@ -896,7 +896,7 @@ static void dissect_icep_reply(tvbuff_t *tvb, guint32 offset, /* no */ if ( tvb_data_remained < reported_reply_data ) { - expert_add_info_format_text(pinfo, ti, &ei_icep_reply_data, "Reply Data (missing %d bytes out of %d)", reported_reply_data - tvb_data_remained, reported_reply_data); + expert_add_info_format(pinfo, ti, &ei_icep_reply_data, "Reply Data (missing %d bytes out of %d)", reported_reply_data - tvb_data_remained, reported_reply_data); col_append_fstr(pinfo->cinfo, COL_INFO, " (missing reply data, %d bytes)", @@ -1017,7 +1017,7 @@ static void dissect_icep_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* messages already dissected */ break; default: - expert_add_info_format_text(pinfo, msg_item, &ei_icep_message_type, "Unknown Message Type: 0x%02x", tvb_get_guint8(tvb, 8)); + expert_add_info_format(pinfo, msg_item, &ei_icep_message_type, "Unknown Message Type: 0x%02x", tvb_get_guint8(tvb, 8)); break; } } diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 08361d1c41..93da551eab 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -1326,7 +1326,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree proto_item_append_text(ti_opt_len, " (%i bytes)", opt_len); if(opt_len == 0){ - expert_add_info_format_text(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "Invalid option length (Zero)"); + expert_add_info_format(pinfo, ti_opt_len, &ei_icmpv6_invalid_option_length, "Invalid option length (Zero)"); return opt_offset; } @@ -2202,7 +2202,7 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree break; default : - expert_add_info_format_text(pinfo, ti, &ei_icmpv6_undecoded_option, + expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_option, "Dissector for ICMPv6 Option (%d)" " code not implemented, Contact Wireshark developers" " if you want this supported", opt_type); @@ -2531,7 +2531,7 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree break; } default : - expert_add_info_format_text(pinfo, ti, &ei_icmpv6_undecoded_rpl_option, + expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_rpl_option, "Dissector for ICMPv6 RPL Option" " (%d) code not implemented, Contact" " Wireshark developers if you want this supported", opt_type); @@ -3286,7 +3286,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ hidden_item = proto_tree_add_boolean(icmp6_tree, hf_icmpv6_checksum_bad, tvb, offset, 2, TRUE); PROTO_ITEM_SET_HIDDEN(hidden_item); proto_item_append_text(checksum_item, " [incorrect, should be 0x%04x]", in_cksum_shouldbe(cksum, computed_cksum)); - expert_add_info_format_text(pinfo, checksum_item, &ei_icmpv6_checksum, + expert_add_info_format(pinfo, checksum_item, &ei_icmpv6_checksum, "ICMPv6 Checksum Incorrect, should be 0x%04x", in_cksum_shouldbe(cksum, computed_cksum)); } } @@ -3806,7 +3806,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ break; } default: - expert_add_info_format_text(pinfo, ti, &ei_icmpv6_undecoded_type, + expert_add_info_format(pinfo, ti, &ei_icmpv6_undecoded_type, "Dissector for ICMPv6 Type (%d)" " code not implemented, Contact Wireshark" " developers if you want this supported", icmp6_type); diff --git a/epan/dissectors/packet-icq.c b/epan/dissectors/packet-icq.c index 985cdacff3..af4adabde2 100644 --- a/epan/dissectors/packet-icq.c +++ b/epan/dissectors/packet-icq.c @@ -511,7 +511,7 @@ icqv5_decode_msgType(proto_tree* tree, tvbuff_t *tvb, int offset, int size, case 0xffff: /* Field unknown */ break; default: - expert_add_info_format_text(pinfo, msg_item, &ei_icq_unknown_command, + expert_add_info_format(pinfo, msg_item, &ei_icq_unknown_command, "Unknown msgType: %u (0x%x)", msgType, msgType); break; case MSG_TEXT: @@ -993,7 +993,7 @@ icqv5_srv_meta_user(proto_tree* tree, /* Tree to put the data in */ } default: /* This information is already printed in the tree */ - expert_add_info_format_text(pinfo, ti, &ei_icq_unknown_meta_subcmd, + expert_add_info_format(pinfo, ti, &ei_icq_unknown_meta_subcmd, "Unknown Meta subcmd: 0x%x", subcmd); break; } diff --git a/epan/dissectors/packet-iec104.c b/epan/dissectors/packet-iec104.c index 2bcd45d127..54f78d3ca6 100644 --- a/epan/dissectors/packet-iec104.c +++ b/epan/dissectors/packet-iec104.c @@ -1380,7 +1380,7 @@ static void dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr len = tvb_get_guint8(tvb, Off + 1); if (len < APDU_MIN_LEN) { - expert_add_info_format_text(pinfo, ti, &ei_iec104_apdu_min_len, "APDU less than %d bytes", APDU_MIN_LEN); + expert_add_info_format(pinfo, ti, &ei_iec104_apdu_min_len, "APDU less than %d bytes", APDU_MIN_LEN); ep_strbuf_append_printf(res, " ", len); return; } diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c index bc4de921fe..9851444d20 100644 --- a/epan/dissectors/packet-ieee80211-radiotap.c +++ b/epan/dissectors/packet-ieee80211-radiotap.c @@ -1080,7 +1080,7 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) BIT(IEEE80211_RADIOTAP_VENDOR_NAMESPACE))) == (BIT(IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE) | BIT(IEEE80211_RADIOTAP_VENDOR_NAMESPACE))) { - expert_add_info_format_text(pinfo, pt, &ei_radiotap_present, + expert_add_info_format(pinfo, pt, &ei_radiotap_present, "Both radiotap and vendor namespace specified in bitmask word %u", i); goto malformed; diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index cd4be5aeea..713701e300 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -5015,7 +5015,7 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree, tag_len = tvb_get_guint8(tvb, offset + 1); if (tag_no != TAG_ADVERTISEMENT_PROTOCOL) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_number, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_number, "Unexpected IE %d (expected Advertisement " "Protocol)", tag_no); return 2 + tag_len; @@ -5025,7 +5025,7 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree, if (tag_len < 2) { if (!anqp) item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len); - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Advertisement Protocol: IE must be at least 2 " "octets long"); return 2 + tag_len; @@ -5071,7 +5071,7 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree, offset += 1; left -= 1; if (len > left) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Vendor specific info length error"); return 2 + tag_len; } @@ -5083,7 +5083,7 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree, } if (left) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_extra_data, + expert_add_info_format(pinfo, item, &ei_ieee80211_extra_data, "Unexpected extra data in the end"); } @@ -5099,7 +5099,7 @@ dissect_anqp_query_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset += 2; } if (offset != end) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_ff_anqp_info_length, + expert_add_info_format(pinfo, tree, &ei_ieee80211_ff_anqp_info_length, "Unexpected ANQP Query list format"); } } @@ -5176,7 +5176,7 @@ dissect_anqp_capab_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int } } if (offset != end) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_ff_anqp_info_length, + expert_add_info_format(pinfo, tree, &ei_ieee80211_ff_anqp_info_length, "Unexpected ANQP Capability list format"); } } @@ -5364,7 +5364,7 @@ dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; if (offset + len > end) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len, + expert_add_info_format(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len, "Invalid NAI Realm List"); break; } @@ -5378,7 +5378,7 @@ dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; if (offset + nai_len > f_end) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len, + expert_add_info_format(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len, "Invalid NAI Realm Data"); break; } @@ -5845,7 +5845,7 @@ dissect_anqp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, gb proto_item_append_text(tree, ": ANQP "); proto_item_append_text(tree, request ? "Request" : "Response"); if (tvb_reported_length_remaining(tvb, offset) < 4) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_not_enough_room_for_anqp_header, + expert_add_info_format(pinfo, tree, &ei_ieee80211_not_enough_room_for_anqp_header, "Not enough room for ANQP header"); return; } @@ -7838,7 +7838,7 @@ dissect_qos_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset break; } default: - expert_add_info_format_text(pinfo, qos_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype); + expert_add_info_format(pinfo, qos_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype); break; } @@ -8223,7 +8223,7 @@ dissect_vendor_ie_atheros(proto_item *item _U_, proto_tree *ietree, proto_item *cap_item; if (tag_len <= 3) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len+3); /* Add length of OUI to tag_length */ + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len+3); /* Add length of OUI to tag_length */ return; } proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_type, tvb, offset, 1, ENC_NA); @@ -8558,7 +8558,7 @@ dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int break; } default: - expert_add_info_format_text(pinfo, cap_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype); + expert_add_info_format(pinfo, cap_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype); break; } @@ -8603,7 +8603,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, if (offset + (pcs_count * 4) > tag_end) { - expert_add_info_format_text(pinfo, rsn_pcs_count, &ei_ieee80211_rsn_pcs_count, + expert_add_info_format(pinfo, rsn_pcs_count, &ei_ieee80211_rsn_pcs_count, "Pairwise Cipher Suite Count too large, 4*%u > %d", pcs_count, tag_end - offset); pcs_count = (tag_end - offset) / 4; } @@ -8639,7 +8639,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, if (offset + (akms_count * 4) > tag_end) { - expert_add_info_format_text(pinfo, rsn_akms_count, &ei_ieee80211_rsn_pmkid_count, + expert_add_info_format(pinfo, rsn_akms_count, &ei_ieee80211_rsn_pmkid_count, "Auth Key Management (AKM) Suite Count too large, 4*%u > %d", akms_count, tag_end - offset); akms_count = (tag_end - offset) / 4; } @@ -8686,7 +8686,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, if (offset + (pmkid_count * 16) > tag_end) { - expert_add_info_format_text(pinfo, rsn_pmkid_count, &ei_ieee80211_pmkid_count_too_large, + expert_add_info_format(pinfo, rsn_pmkid_count, &ei_ieee80211_pmkid_count_too_large, "PMKID Count too large, 16*%u > %d", pmkid_count, tag_end - offset); pmkid_count = (tag_end - offset) / 16; } @@ -8729,7 +8729,7 @@ dissect_extended_capabilities_ie(packet_info *pinfo, proto_tree *tree, if (tag_len < 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len); return offset; } proto_item_append_text(ti, " (%u octet%s)", tag_len, plurality(tag_len, "", "s")); @@ -8916,7 +8916,7 @@ dissect_vht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i proto_tree *cap_tree; if (tag_len != 12) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "VHT Capabilities IE length %u wrong, must be = 12", tag_len); return offset; } @@ -8990,7 +8990,7 @@ dissect_vht_operation_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in proto_tree *op_tree, *basic_mcs_tree; if (tag_len != 5) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "VHT Operation IE length %u wrong, must be = 5", tag_len); return offset; } @@ -9030,7 +9030,7 @@ dissect_vht_tx_pwr_envelope(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 i; if (tag_len < 2 && tag_len <= 5) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "VHT TX PWR Envelope IE length %u wrong, must be >= 2 and <= 5", tag_len); return offset; } @@ -9366,7 +9366,7 @@ dissect_timeout_interval(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, in pi = proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_type, tvb, offset, 1, ENC_BIG_ENDIAN); if (tag_len < 5) { - expert_add_info_format_text(pinfo, pi, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, pi, &ei_ieee80211_tag_length, "Timeout Interval content length must be at least " "5 bytes"); return; @@ -9387,7 +9387,7 @@ dissect_ric_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset int offset_r = 0; if (tag_len != 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "RIC Data Length must be 4 bytes"); return 0; } @@ -9442,7 +9442,7 @@ dissect_ric_descriptor(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int guint8 rsrc_type = 0; if (tag_len < 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "RIC Data Length must be at least 1 byte"); return 0; } @@ -9539,7 +9539,7 @@ dissect_ht_info_ie_1_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cap_tree = tree; if (tag_len < 22) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "HT Information IE content length %u wrong, must be at least 22 bytes", tag_len); return offset; } @@ -9623,13 +9623,13 @@ dissect_wapi_param_set(tvbuff_t *tvb, packet_info *pinfo, /*MIN: 2 + (2+4)+ (2+4) + 4 + 2 + 0 (BKID CNT and LIST) =20*/ if (tag_len < 20) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "tag_len is %d, its neither WAPI not BSS-AC-Access-Delay", tag_len); return offset; } if (version != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Version of WAPI protocol is %d, must be = 1", version); return offset; } @@ -9652,7 +9652,7 @@ dissect_wapi_param_set(tvbuff_t *tvb, packet_info *pinfo, } proto_item_append_text(ti, " /"); } else { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of AKM suites is 0, must be min 1"); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of AKM suites is 0, must be min 1"); return offset; } @@ -9674,7 +9674,7 @@ dissect_wapi_param_set(tvbuff_t *tvb, packet_info *pinfo, } proto_item_append_text(ti, " /"); } else { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of Unicast Cipher suites is 0, must be min 1"); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of Unicast Cipher suites is 0, must be min 1"); return offset; } @@ -9752,7 +9752,7 @@ static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if (offset + 1 >= end) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_missing_data, + expert_add_info_format(pinfo, tree, &ei_ieee80211_missing_data, "No TFS Request subelements in TFS Request"); return end; } @@ -9770,7 +9770,7 @@ static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if (offset + len > end) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, tree, &ei_ieee80211_tag_length, "Not enough data for TFS Request subelement"); return end; } @@ -9794,7 +9794,7 @@ static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree, if (offset < end) { proto_tree_add_text(tree, tvb, offset, end - offset, "Unexpected extra data"); - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_extra_data, + expert_add_info_format(pinfo, tree, &ei_ieee80211_extra_data, "Extra data after TFS Subelements"); } @@ -9833,7 +9833,7 @@ static int dissect_tfs_response(packet_info *pinfo, proto_tree *tree, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if (offset + len > end) { - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, tree, &ei_ieee80211_tag_length, "Not enough data for TFS Request subelement"); return end; } @@ -9864,7 +9864,7 @@ static int dissect_tfs_response(packet_info *pinfo, proto_tree *tree, if (offset < end) { proto_tree_add_text(tree, tvb, offset, end - offset, "Unexpected extra data"); - expert_add_info_format_text(pinfo, tree, &ei_ieee80211_extra_data, + expert_add_info_format(pinfo, tree, &ei_ieee80211_extra_data, "Extra data after TFS Status subelements"); } @@ -10013,7 +10013,7 @@ dissect_ap_channel_report(tvbuff_t *tvb, packet_info *pinfo, int tag_end, proto_item *ti) { if (tag_len < 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "AP Channel Report length %u wrong, must be > 1", tag_len); return offset; } @@ -10037,7 +10037,7 @@ dissect_secondary_channel_offset_ie(tvbuff_t *tvb, packet_info *pinfo, { if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Secondary Channel Offset length %u wrong, must be = 1", tag_len); return offset; } @@ -10056,7 +10056,7 @@ dissect_bss_avg_access_delay_ie(tvbuff_t *tvb, packet_info *pinfo, { if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "BSS Average Access Delay length %u wrong, must be = 1", tag_len); return offset; } @@ -10075,7 +10075,7 @@ dissect_antenna_ie(tvbuff_t *tvb, packet_info *pinfo, { if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Antenna length %u wrong, must be = 1", tag_len); return offset; } @@ -10094,7 +10094,7 @@ dissect_rsni_ie(tvbuff_t *tvb, packet_info *pinfo, { if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "RSNI length %u wrong, must be = 1", tag_len); return offset; } @@ -10115,7 +10115,7 @@ dissect_bss_available_admission_capacity_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *btree; guint16 bitmask; if (tag_len < 2) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "BSS Available Admission Capacity length %u wrong, must > = 2", tag_len); return offset; } @@ -10208,7 +10208,7 @@ dissect_bss_ac_access_delay_ie(tvbuff_t *tvb, packet_info *pinfo, { if (tag_len == 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "BSS AC Access Delay length %u wrong, must = 4", tag_len); return offset; } @@ -10240,7 +10240,7 @@ dissect_rm_enabled_capabilities_ie(packet_info *pinfo, proto_tree *tree, if (tag_len != 5) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "RM Enabled Capabilities length %u wrong, must = 4", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "RM Enabled Capabilities length %u wrong, must = 4", tag_len); return offset; } proto_item_append_text(ti, " (%d octets)", tag_len); @@ -10315,7 +10315,7 @@ dissect_ht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in proto_tree *cap_tree; if (tag_len != 26) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "HT Capabilities IE length %u wrong, must be = 26", tag_len); return offset; } @@ -10454,7 +10454,7 @@ dissect_ht_info_ie_1_0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int proto_tree *cap_tree; if (tag_len != 22) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u wrong, must be = 22", tag_len); return offset; } @@ -10716,7 +10716,7 @@ dissect_interworking(packet_info *pinfo, proto_tree *tree, proto_item *item, offset += 1; if ((tvb_reported_length_remaining(tvb, offset) < len) || (len == 0)) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Truncated Interworking element"); return offset; } @@ -10745,7 +10745,7 @@ dissect_interworking(packet_info *pinfo, proto_tree *tree, proto_item *item, } if ((len != 1) && (len != (1 + 2)) && (len != (1 + 6)) && (len != (1 + 2 + 6))) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Invalid Interworking element length"); } @@ -10767,7 +10767,7 @@ dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item, offset++; if (tvb_reported_length_remaining(tvb, offset) < len || len < 16 || len & 1) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_bad_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_bad_length, "Truncated QoS Map Set element"); return 2 + len; } @@ -10783,7 +10783,7 @@ dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item, tvb, offset, 1, ENC_NA); val = tvb_get_guint8(tvb, offset); if (val > 63 && val != 255) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_inv_val, + expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val, "Invalid DSCP Value"); } offset++; @@ -10793,7 +10793,7 @@ dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item, tvb, offset, 1, ENC_NA); val2 = tvb_get_guint8(tvb, offset); if (val2 > 7) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_inv_val, + expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val, "Invalid User Priority"); } offset++; @@ -10812,7 +10812,7 @@ dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item, tvb, offset, 1, ENC_NA); val = tvb_get_guint8(tvb, offset); if (val > 63 && val != 255) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_inv_val, + expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val, "Invalid DSCP Value"); } offset++; @@ -10822,7 +10822,7 @@ dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item, val2 = tvb_get_guint8(tvb, offset); if ((val2 > 63 && val2 != 255) || val2 < val || (val == 255 && val2 != 255) || (val != 255 && val2 == 255)) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_inv_val, + expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val, "Invalid DSCP Value"); } offset++; @@ -10851,7 +10851,7 @@ dissect_roaming_consortium(packet_info *pinfo, proto_tree *tree, end = offset + len; if ((tvb_reported_length_remaining(tvb, offset) < len) || (len < 2)) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Truncated Roaming Consortium element"); return 2 + len; } @@ -10870,7 +10870,7 @@ dissect_roaming_consortium(packet_info *pinfo, proto_tree *tree, offset += 1; if (offset + oi1_len > end) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Truncated Roaming Consortium element"); return 2 + len; } @@ -10881,7 +10881,7 @@ dissect_roaming_consortium(packet_info *pinfo, proto_tree *tree, offset += oi1_len; if (offset + oi2_len > end) { - expert_add_info_format_text(pinfo, item, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length, "Truncated Roaming Consortium element"); return 2 + len; } @@ -10921,7 +10921,7 @@ ieee80211_tag_ssid(packet_info *pinfo, proto_tree *tree, return offset; if (ssid_len > MAX_SSID_LEN) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "SSID length (%u) greater than maximum (%u)", ssid_len, MAX_SSID_LEN); ssid_len = MAX_SSID_LEN; @@ -10972,7 +10972,7 @@ ieee80211_tag_supp_rates(packet_info *pinfo, proto_tree *tree, { /* 7.3.2.2 Supported Rates element (1) */ if (tag_len < 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len); return offset; @@ -11002,7 +11002,7 @@ ieee80211_tag_fh_parameter(packet_info *pinfo, proto_tree *tree, { /* 7.3.2.3 FH Parameter Set element (2) */ if (tag_len < 5) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 5", tag_len); return offset; } @@ -11036,7 +11036,7 @@ ieee80211_tag_ds_parameter(packet_info *pinfo, proto_tree *tree, { /* 7.3.2.4 DS Parameter Set element (3) */ if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u wrong, must be = 1", tag_len); return offset; } @@ -11063,7 +11063,7 @@ ieee80211_tag_cf_parameter(packet_info *pinfo, proto_tree *tree, { /* 7.3.2.5 CF Parameter Set element (4) */ if (tag_len != 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u wrong, must be = 6", tag_len); return offset; } @@ -11105,7 +11105,7 @@ ieee80211_tag_tim(packet_info *pinfo, proto_tree *tree, /* 7.3.2.6 TIM (5) */ if (tag_len < 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 4", tag_len); return offset; } @@ -11147,7 +11147,7 @@ ieee80211_tag_ibss_parameter(packet_info *pinfo, proto_tree *tree, /* 7.3.2.7 IBSS Parameter Set element (6) */ if (tag_len != 2) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u wrong, must be = 2", tag_len); return offset; } @@ -11181,7 +11181,7 @@ ieee80211_tag_country_info(packet_info *pinfo, proto_tree *tree, proto_item *sub_item; if (tag_len < 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len); return offset; } @@ -11267,7 +11267,7 @@ ieee80211_tag_fh_hopping_parameter(packet_info *pinfo, { /* 7.3.2.10 Hopping Pattern Parameters information element (8) */ if (tag_len < 2) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 2", tag_len); return offset; } @@ -11296,7 +11296,7 @@ ieee80211_tag_fh_hopping_table(packet_info *pinfo, proto_tree *tree, { /* 7.3.2.11 Hopping Pattern Table information element (9) */ if (tag_len < 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 4", tag_len); return offset; } @@ -11410,7 +11410,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_QBSS_LOAD: /* 7.3.2.28 BSS Load element (11) */ if ((tag_len < 4) || (tag_len > 5)) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4 or 5", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4 or 5", tag_len); break; } @@ -11441,7 +11441,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_TSPEC: /* 7.3.2.30 TSPEC element (13) */ if (tag_len != 55) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 55", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 55", tag_len); break; } offset += 2; @@ -11499,7 +11499,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_TCLAS: /* 7.3.2.31 TCLAS element (14) */ if (tag_len < 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len); break; } { @@ -11636,7 +11636,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_SCHEDULE: /* 7.3.2.34 Schedule element (15) */ if (tag_len != 14) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 14", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 14", tag_len); break; } offset += 2; @@ -11663,7 +11663,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset { if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); break; } offset += 2; @@ -11679,7 +11679,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset { if (tag_len != 2) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len); break; } offset += 2; @@ -11698,7 +11698,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset { if (tag_len != 0) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 0", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 0", tag_len); break; } offset += 2; @@ -11711,7 +11711,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset { if (tag_len != 2) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len); break; } offset += 2; @@ -11735,7 +11735,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset offset += 2; if (tag_len % 2 == 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u must be even", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u must be even", tag_len); break; } while (offset < tag_end) @@ -11761,7 +11761,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset { if (tag_len != 3) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 3", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 3", tag_len); break; } offset += 2; @@ -11784,7 +11784,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_MEASURE_REQ: /* 7.3.2.21 Measurement Request element (38) with update from 802.11k-2008 */ if (tag_len < 3) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len); break; } { @@ -11970,7 +11970,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_MEASURE_REP: /* 7.3.2.22 Measurement Report element (39) with update from 802.11k-2008 */ if (tag_len < 3) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len); break; } { @@ -12214,7 +12214,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_QUIET: /* 7.3.2.23 Quiet element (40) */ if (tag_len != 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len); break; } offset += 2; @@ -12240,7 +12240,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_IBSS_DFS: /* 7.3.2.24 IBSS DFS element (41) */ if (tag_len < 7) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 7", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 7", tag_len); break; } { @@ -12269,7 +12269,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_ERP_INFO_OLD: if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); break; } { @@ -12291,7 +12291,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_TS_DELAY: /* 7.3.2.32 TS Delay element (43) */ if (tag_len != 4) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4", tag_len); break; } offset += 2; @@ -12304,7 +12304,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_TCLAS_PROCESS: /* 7.3.2.33 TCLAS Processing element (44) */ if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); break; } offset += 2; @@ -12317,7 +12317,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_QOS_CAPABILITY: /* 7.3.2.35 QoS Capability element (46) */ if (tag_len != 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len); break; } { @@ -12331,7 +12331,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_RSN_IE: /* 7.3.2.25 RSN information element (48) */ if (tag_len < 18) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 18", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 18", tag_len); break; } offset += 2; @@ -12342,7 +12342,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_EXT_SUPP_RATES: /* 7.3.2.14 Extended Supported Rates element (50) */ if (tag_len < 1) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len); break; } offset += 2; @@ -12373,7 +12373,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset if (tag_len < 26) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u too short, must be >= 26", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u too short, must be >= 26", tag_len); break; } offset += 2; @@ -12408,7 +12408,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset case TAG_CISCO_VENDOR_SPECIFIC: /* This Cisco proprietary IE seems to mimic 221 */ if (tag_len < 3) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 3", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 3", tag_len); break; } { @@ -12788,7 +12788,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset proto_tree *subtree; if (tag_len != 6) { - expert_add_info_format_text(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len); + expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len); break; } offset += 2; @@ -12993,7 +12993,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset } default: proto_tree_add_item(tree, hf_ieee80211_tag_data, tvb, offset + 1 + 1, tag_len, ENC_NA); - expert_add_info_format_text(pinfo, ti_tag, &ei_ieee80211_tag_data, + expert_add_info_format(pinfo, ti_tag, &ei_ieee80211_tag_data, "Dissector for 802.11 IE Tag" " (%s) code not implemented, Contact" " Wireshark developers if you want this supported", val_to_str_ext(tag_no, diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index 1133cdeb4e..b34fb2f5b7 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -365,7 +365,7 @@ static gboolean ieee802154_extend_auth = TRUE; /* Macro to check addressing, and throw a warning flag if incorrect. */ #define IEEE802154_CMD_ADDR_CHECK(_pinfo_, _item_, _cmdid_, _x_) \ if (!(_x_)) \ - expert_add_info_format_text(_pinfo_, _item_, &ei_ieee802154_invalid_addressing, \ + expert_add_info_format(_pinfo_, _item_, &ei_ieee802154_invalid_addressing, \ "Invalid Addressing for %s", \ val_to_str_const(_cmdid_, ieee802154_cmd_names, "Unknown Command")) @@ -1018,32 +1018,32 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g case DECRYPT_VERSION_UNSUPPORTED: /* We don't support decryption with that version of the protocol */ - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "We don't support decryption with protocol version %u", packet->version); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "We don't support decryption with protocol version %u", packet->version); call_dissector(data_handle, payload_tvb, pinfo, tree); goto dissect_ieee802154_fcs; case DECRYPT_PACKET_TOO_SMALL: - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Packet was too small to include the CRC and MIC"); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Packet was too small to include the CRC and MIC"); call_dissector(data_handle, payload_tvb, pinfo, tree); goto dissect_ieee802154_fcs; case DECRYPT_PACKET_NO_EXT_SRC_ADDR: - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No extended source address - can't decrypt"); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No extended source address - can't decrypt"); call_dissector(data_handle, payload_tvb, pinfo, tree); goto dissect_ieee802154_fcs; case DECRYPT_PACKET_NO_KEY: - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No encryption key set - can't decrypt"); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No encryption key set - can't decrypt"); call_dissector(data_handle, payload_tvb, pinfo, tree); goto dissect_ieee802154_fcs; case DECRYPT_PACKET_DECRYPT_FAILED: - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Decrypt failed"); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Decrypt failed"); call_dissector(data_handle, payload_tvb, pinfo, tree); goto dissect_ieee802154_fcs; case DECRYPT_PACKET_MIC_CHECK_FAILED: - expert_add_info_format_text(pinfo, proto_root, &ei_ieee802154_decrypt_error, "MIC check failed"); + expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "MIC check failed"); /* * Abort only if the payload was encrypted, in which case we * probably didn't decrypt the packet right (eg: wrong key). diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 6321e503ba..f3f3abb854 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -2254,13 +2254,13 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if (is_a_local_network_control_block_addr(dst32)) { ttl = local_network_control_block_addr_valid_ttl(dst32); if (ttl != iph->ip_ttl && ttl != IPLOCAL_NETWRK_CTRL_BLK_ANY_TTL) { - expert_add_info_format_text(pinfo, ttl_item, &ei_ip_ttl_lncb, "\"Time To Live\" != %d for a packet sent to the " + expert_add_info_format(pinfo, ttl_item, &ei_ip_ttl_lncb, "\"Time To Live\" != %d for a packet sent to the " "Local Network Control Block (see RFC 3171)", ttl); } } else if (!is_a_multicast_addr(dst32) && iph->ip_ttl < 5 && (iph->ip_p != IP_PROTO_PIM)) { - expert_add_info_format_text(pinfo, ttl_item, &ei_ip_ttl_too_small, "\"Time To Live\" only %u", iph->ip_ttl); + expert_add_info_format(pinfo, ttl_item, &ei_ip_ttl_too_small, "\"Time To Live\" only %u", iph->ip_ttl); } if (tree) { diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index d98cb4a407..f50be8302c 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -689,14 +689,14 @@ dissect_routing6(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo /* from RFC6554: when CmprI and CmprE are both 0, Pad MUST carry a value of 0 */ if(g_ipv6_rpl_srh_strict_rfc_checking && (cmprI == 0 && cmprE == 0 && pad != 0)){ - expert_add_info_format_text(pinfo, ti, &ei_ipv6_cmpri_cmpre_pad, "When cmprI equals 0 and cmprE equals 0, pad MUST equal 0 but instead was %d", pad); + expert_add_info_format(pinfo, ti, &ei_ipv6_cmpri_cmpre_pad, "When cmprI equals 0 and cmprE equals 0, pad MUST equal 0 but instead was %d", pad); } proto_tree_add_item(rthdr_tree, hf_ipv6_routing_hdr_rpl_reserved, tvb, offset, 4, ENC_BIG_ENDIAN); reserved = tvb_get_bits32(tvb, ((offset + 1) * 8) + 4, 20, ENC_BIG_ENDIAN); if(g_ipv6_rpl_srh_strict_rfc_checking && reserved != 0){ - expert_add_info_format_text(pinfo, ti, &ei_ipv6_routing_hdr_rpl_reserved, "Reserved field must equal 0 but instead was %d", reserved); + expert_add_info_format(pinfo, ti, &ei_ipv6_routing_hdr_rpl_reserved, "Reserved field must equal 0 but instead was %d", reserved); } /* from RFC6554: @@ -707,7 +707,7 @@ dissect_routing6(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo if (segments < 0) { /* This error should always be reported */ - expert_add_info_format_text(pinfo, ti, &ei_ipv6_routing_hdr_rpl_segments_ge0, "Calculated total segments must be greater than or equal to 0, instead was %d", segments); + expert_add_info_format(pinfo, ti, &ei_ipv6_routing_hdr_rpl_segments_ge0, "Calculated total segments must be greater than or equal to 0, instead was %d", segments); } else { offset += 4; @@ -952,7 +952,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c break; case IP6OPT_TEL: if (opt_len != 1) { - expert_add_info_format_text(pinfo, ti_opt_len, &ei_ipv6_opt_tel_invalid_len, + expert_add_info_format(pinfo, ti_opt_len, &ei_ipv6_opt_tel_invalid_len, "Tunnel Encapsulation Limit: Invalid length (%u bytes)", opt_len); } proto_tree_add_item(opt_tree, hf_ipv6_opt_tel, tvb, @@ -961,7 +961,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c break; case IP6OPT_JUMBO: if (opt_len != 4) { - expert_add_info_format_text(pinfo, ti_opt_len, &ei_ipv6_opt_jumbo_invalid_len, + expert_add_info_format(pinfo, ti_opt_len, &ei_ipv6_opt_jumbo_invalid_len, "Jumbo payload: Invalid length (%u bytes)", opt_len); } proto_tree_add_item(opt_tree, hf_ipv6_opt_jumbo, tvb, @@ -971,7 +971,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c case IP6OPT_RTALERT: { if (opt_len != 2) { - expert_add_info_format_text(pinfo, ti_opt_len, &ei_ipv6_opt_rtalert_invalid_len, + expert_add_info_format(pinfo, ti_opt_len, &ei_ipv6_opt_rtalert_invalid_len, "Router alert: Invalid Length (%u bytes)", opt_len + 2); } @@ -982,7 +982,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c } case IP6OPT_HOME_ADDRESS: if (opt_len != 16) { - expert_add_info_format_text(pinfo, ti_opt_len, &ei_ipv6_mipv6_home_address_invalid_len, + expert_add_info_format(pinfo, ti_opt_len, &ei_ipv6_mipv6_home_address_invalid_len, "Home Address: Invalid length (%u bytes)", opt_len); } proto_tree_add_item(opt_tree, hf_ipv6_mipv6_home_address, tvb, diff --git a/epan/dissectors/packet-ipxwan.c b/epan/dissectors/packet-ipxwan.c index 7fd72c8ab9..98df5d5604 100644 --- a/epan/dissectors/packet-ipxwan.c +++ b/epan/dissectors/packet-ipxwan.c @@ -197,7 +197,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_ROUTING_TYPE: if (option_data_len != 1) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 1", option_data_len); } else { proto_tree_add_item(option_tree, @@ -208,7 +208,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_RIP_SAP_INFO_EXCHANGE: if (option_data_len != 54) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 54", option_data_len); } else { wan_link_delay = tvb_get_ntohs(tvb, @@ -229,7 +229,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_NLSP_INFORMATION: if (option_data_len != 8) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 8", option_data_len); } else { delay = tvb_get_ntohl(tvb, offset); @@ -248,7 +248,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_NLSP_RAW_THROUGHPUT_DATA: if (option_data_len != 8) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 8", option_data_len); } else { proto_tree_add_item(option_tree, @@ -265,7 +265,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_EXTENDED_NODE_ID: if (option_data_len != 4) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 4", option_data_len); } else { proto_tree_add_item(option_tree, @@ -276,7 +276,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_NODE_NUMBER: if (option_data_len != 6) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be 6", option_data_len); } else { proto_tree_add_item(option_tree, @@ -287,7 +287,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case OPT_COMPRESSION: if (option_data_len < 1) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be >= 1", option_data_len); } else { compression_type = tvb_get_guint8(tvb, @@ -299,7 +299,7 @@ dissect_ipxwan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case COMP_TYPE_TELEBIT: if (option_data_len < 3) { - expert_add_info_format_text(pinfo, ti, &ei_ipxwan_option_data_len, + expert_add_info_format(pinfo, ti, &ei_ipxwan_option_data_len, "Bogus length: %u, should be >= 3", option_data_len); } else { proto_tree_add_item(option_tree, hf_ipxwan_compression_options, diff --git a/epan/dissectors/packet-ixiatrailer.c b/epan/dissectors/packet-ixiatrailer.c index 9a904475d1..05f5187c3f 100644 --- a/epan/dissectors/packet-ixiatrailer.c +++ b/epan/dissectors/packet-ixiatrailer.c @@ -138,7 +138,7 @@ dissect_ixiatrailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, voi case IXIATRAILER_FTYPE_TIMESTAMP_1588: case IXIATRAILER_FTYPE_TIMESTAMP_HOLDOVER: if (time_length != 8) { - expert_add_info_format_text(pinfo, ti, &ei_ixiatrailer_field_length_invalid, "Field length %u invalid", time_length); + expert_add_info_format(pinfo, ti, &ei_ixiatrailer_field_length_invalid, "Field length %u invalid", time_length); break; } /* Timestamp */ diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 37afadc3c6..6c4a55c2b9 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -586,7 +586,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo, if(ret == 0){ char *user_data; - expert_add_info_format_text(pinfo, NULL, &ei_krb_decrypted_keytype, + expert_add_info_format(pinfo, NULL, &ei_krb_decrypted_keytype, "Decrypted keytype %d in frame %u using %s", ek->keytype, pinfo->fd->num, ek->key_origin); diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index 044f5fdab1..10eed8036a 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -215,7 +215,7 @@ lapd_log_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset proto_item *ti; ti = proto_tree_add_item(tree, proto_lapd, tvb, offset, 1, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_lapd_abort, "%s", msg); + expert_add_info_format(pinfo, ti, &ei_lapd_abort, "%s", msg); } static void diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 620755b11d..d36fd95c30 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -2242,12 +2242,12 @@ dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ attributedesc_string=NULL; if (Filter_length++ > MAX_FILTER_LEN) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_exceeded_filter_length, "Filter length exceeds %u. Giving up.", MAX_FILTER_LEN); + expert_add_info_format(actx->pinfo, tree, &ei_ldap_exceeded_filter_length, "Filter length exceeds %u. Giving up.", MAX_FILTER_LEN); THROW(ReportedBoundsError); } if (Filter_elements++ > MAX_FILTER_ELEMENTS) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_too_many_filter_elements, "Found more than %u filter elements. Giving up.", MAX_FILTER_ELEMENTS); + expert_add_info_format(actx->pinfo, tree, &ei_ldap_too_many_filter_elements, "Found more than %u filter elements. Giving up.", MAX_FILTER_ELEMENTS); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c index ba5a244d6f..e7e3300b52 100644 --- a/epan/dissectors/packet-lisp.c +++ b/epan/dissectors/packet-lisp.c @@ -393,7 +393,7 @@ dissect_lcaf_natt_rloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rloc_str = get_addr_str(tvb, offset, rloc_afi, &addr_len); if (rloc_str == NULL) { - expert_add_info_format_text(pinfo, tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, tree, &ei_lisp_unexpected_field, "Unexpected RLOC AFI (%d), cannot decode", rloc_afi); return offset; } @@ -422,7 +422,7 @@ dissect_lcaf_elp_hop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, hop_str = get_addr_str(tvb, offset, hop_afi, &addr_len); if (hop_str == NULL) { - expert_add_info_format_text(pinfo, tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, tree, &ei_lisp_unexpected_field, "Unexpected reencap hop AFI (%d), cannot decode", hop_afi); return offset; } @@ -493,7 +493,7 @@ dissect_lcaf_afi_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, remaining -= (offset - old_offset); break; default: - expert_add_info_format_text(pinfo, tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, tree, &ei_lisp_unexpected_field, "Unexpected AFI (%d), cannot decode", afi); return -1; } @@ -726,7 +726,7 @@ dissect_lcaf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset) if (lcaf_type < 13) proto_tree_add_expert(tree, pinfo, &ei_lisp_undecoded, tvb, offset, len); else - expert_add_info_format_text(pinfo, tree, &ei_lisp_lcaf_type, + expert_add_info_format(pinfo, tree, &ei_lisp_lcaf_type, "LCAF type %d is not defined in draft-farinacci-lisp-lcaf-%d", lcaf_type, LCAF_DRAFT_VERSION); return offset + len; @@ -801,7 +801,7 @@ dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping locator = get_addr_str(tvb, offset, loc_afi, &addr_len); if (locator == NULL) { - expert_add_info_format_text(pinfo, lisp_mapping_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_mapping_tree, &ei_lisp_unexpected_field, "Unexpected locator AFI (%d), cannot decode", loc_afi); return offset; } @@ -869,7 +869,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, prefix = get_addr_str(tvb, 12, prefix_afi, &addr_len); if (prefix == NULL) { - expert_add_info_format_text(pinfo, lisp_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected EID prefix AFI (%d), cannot decode", prefix_afi); return offset; } @@ -1076,7 +1076,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre offset += addr_len; break; default: - expert_add_info_format_text(pinfo, lisp_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected Source EID AFI (%d), cannot decode", src_eid_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); call_dissector(data_handle, next_tvb, pinfo, lisp_tree); @@ -1109,7 +1109,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre offset += 16; break; default: - expert_add_info_format_text(pinfo, lisp_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected ITR-RLOC-AFI (%d), cannot decode", itr_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); call_dissector(data_handle, next_tvb, pinfo, lisp_tree); @@ -1131,7 +1131,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre prefix = get_addr_str(tvb, offset + 4, prefix_afi, &addr_len); if (prefix == NULL) { - expert_add_info_format_text(pinfo, lisp_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected EID prefix AFI (%d), cannot decode", prefix_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); call_dissector(data_handle, next_tvb, pinfo, lisp_tree); @@ -1655,7 +1655,7 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree) prefix = get_addr_str(tvb, offset, prefix_afi, &addr_len); if (prefix == NULL) { - expert_add_info_format_text(pinfo, lisp_tree, &ei_lisp_unexpected_field, + expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected EID prefix AFI (%d), cannot decode", prefix_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); call_dissector(data_handle, next_tvb, pinfo, lisp_tree); @@ -1674,12 +1674,12 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree) if (!reply) { if (afi != 0) { - expert_add_info_format_text(pinfo, tir, &ei_lisp_expected_field, + expert_add_info_format(pinfo, tir, &ei_lisp_expected_field, "Expecting NULL AFI (0), found %d, incorrect packet!", afi); } } else { if (afi != AFNUM_LCAF) { - expert_add_info_format_text(pinfo, tir, &ei_lisp_expected_field, + expert_add_info_format(pinfo, tir, &ei_lisp_expected_field, "Expecting LCAF AFI (%d), found %d, incorrect packet!", AFNUM_LCAF, afi); } else { diff --git a/epan/dissectors/packet-llrp.c b/epan/dissectors/packet-llrp.c index b471d8d330..aa420e58e0 100644 --- a/epan/dissectors/packet-llrp.c +++ b/epan/dissectors/packet-llrp.c @@ -1387,7 +1387,7 @@ static guint dissect_llrp_utf8_parameter(tvbuff_t * const tvb, packet_info *pinf len = tvb_get_ntohs(tvb, offset); if(tvb_reported_length_remaining(tvb, offset) < len) { - expert_add_info_format_text(pinfo, tree, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, tree, &ei_llrp_invalid_length, "invalid length of string: claimed %u, available %u.", len, tvb_reported_length_remaining(tvb, offset)); return offset + 2; @@ -1437,7 +1437,7 @@ static guint dissect_llrp_item_array(tvbuff_t * const tvb, packet_info *pinfo, offset, 2, ENC_BIG_ENDIAN); offset += 2; if(tvb_reported_length_remaining(tvb, offset) < ((gint)(num*item_size))) { - expert_add_info_format_text(pinfo, tree, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, tree, &ei_llrp_invalid_length, "Array longer than message"); return offset + tvb_reported_length_remaining(tvb, offset); } @@ -1707,7 +1707,7 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ti = proto_tree_add_item(param_tree, hf_llrp_tlv_len, tvb, offset, 2, ENC_BIG_ENDIAN); if (len != real_len) - expert_add_info_format_text(pinfo, ti, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, ti, &ei_llrp_invalid_length, "Invalid length field: claimed %u, should be %u.", len, real_len); offset += 2; @@ -2204,7 +2204,7 @@ dissect_llrp_parameters(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Have we decoded exactly the number of bytes declared in the parameter? */ if(suboffset != param_end) { /* Report problem */ - expert_add_info_format_text(pinfo, param_tree, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, param_tree, &ei_llrp_invalid_length, "Incorrect length of parameter: %u bytes decoded, but %u bytes claimed.", suboffset - offset + 4, real_len); } @@ -2530,7 +2530,7 @@ dissect_llrp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Ignore antenna ID */ proto_item_append_text(antenna_item, " (Ignored)"); /* Tell the user that we are confused */ - expert_add_info_format_text(pinfo, request_item, &ei_llrp_req_conf, + expert_add_info_format(pinfo, request_item, &ei_llrp_req_conf, "Unrecognized configuration request: %u", requested_data); /* Ignore both GPI and GPO ports */ @@ -2587,7 +2587,7 @@ dissect_llrp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if(tvb_reported_length_remaining(tvb, offset) != 0) { /* Report problem */ - expert_add_info_format_text(pinfo, tree, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, tree, &ei_llrp_invalid_length, "Incorrect length of message: %u bytes decoded, but %u bytes available.", offset, tvb_reported_length(tvb)); } @@ -2627,7 +2627,7 @@ dissect_llrp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) len = tvb_get_ntohl(tvb, offset); if (len != tvb_reported_length(tvb)) { - expert_add_info_format_text(pinfo, ti, &ei_llrp_invalid_length, + expert_add_info_format(pinfo, ti, &ei_llrp_invalid_length, "Incorrect length field: claimed %u, but have %u.", len, tvb_reported_length(tvb)); } diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index ea60217f11..be0c1fc52a 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -735,7 +735,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) tvb, offset+3, 1, 1); PROTO_ITEM_SET_HIDDEN(hidden_item); } else { - expert_add_info_format_text(pinfo, msg_item, &ei_lmp_invalid_msg_type, + expert_add_info_format(pinfo, msg_item, &ei_lmp_invalid_msg_type, "Invalid message type: %u", message_type); return tvb_length(tvb); } @@ -754,7 +754,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_item_append_text( ti, " [correct]"); } else { - expert_add_info_format_text(pinfo, ti, &ei_lmp_checksum_incorrect, "[incorrect, should be 0x%04x]", + expert_add_info_format(pinfo, ti, &ei_lmp_checksum_incorrect, "[incorrect, should be 0x%04x]", in_cksum_shouldbe(cksum, computed_cksum)); } } @@ -784,7 +784,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) hf_lmp_filter[lmp_class_to_filter_num(lmp_class)], tvb, offset, obj_length, ENC_NA); /* all possibilities are FT_NONE */ } else { - expert_add_info_format_text(pinfo, hidden_item, &ei_lmp_invalid_class, + expert_add_info_format(pinfo, hidden_item, &ei_lmp_invalid_class, "Invalid class: %u", lmp_class); return tvb_length(tvb); } diff --git a/epan/dissectors/packet-lon.c b/epan/dissectors/packet-lon.c index e9b9109027..ec69bb0031 100644 --- a/epan/dissectors/packet-lon.c +++ b/epan/dissectors/packet-lon.c @@ -363,7 +363,7 @@ dissect_lon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) offset += dissect_apdu(lon_tree, pinfo, tvb, offset); break; default: - expert_add_info_format_text(pinfo, lon_tree, &ei_lon_tpdu_tpdu_type_unknown, "Unexpected TPDU type %i", pdutype); + expert_add_info_format(pinfo, lon_tree, &ei_lon_tpdu_tpdu_type_unknown, "Unexpected TPDU type %i", pdutype); break; } } @@ -405,7 +405,7 @@ dissect_lon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) offset += dissect_apdu(lon_tree, pinfo, tvb, offset); break; default: - expert_add_info_format_text(pinfo, lon_tree, &ei_lon_tpdu_spdu_type_unknown, "Unexpected SPDU type %i", pdutype); + expert_add_info_format(pinfo, lon_tree, &ei_lon_tpdu_spdu_type_unknown, "Unexpected SPDU type %i", pdutype); break; } } @@ -430,7 +430,7 @@ dissect_lon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) offset += 9; break; default: - expert_add_info_format_text(pinfo, lon_tree, &ei_lon_tpdu_authpdu_type_unknown, "Unexpected AuthPDU type %i", pdutype); + expert_add_info_format(pinfo, lon_tree, &ei_lon_tpdu_authpdu_type_unknown, "Unexpected AuthPDU type %i", pdutype); break; } } @@ -503,7 +503,7 @@ dissect_apdu(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, ett_ff, ff_fields, ENC_BIG_ENDIAN); offset++; } else { /* Shouldn't get here */ - expert_add_info_format_text(pinfo, tree, &ei_lon_tpdu_apdu_dest_type, "Malformed APDU destin&type %i", dest_type); + expert_add_info_format(pinfo, tree, &ei_lon_tpdu_apdu_dest_type, "Malformed APDU destin&type %i", dest_type); } next_tvb = tvb_new_subset_remaining(tvb, offset); diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c index 4c3b729af9..c5e1fc7a82 100644 --- a/epan/dissectors/packet-lte-rrc.c +++ b/epan/dissectors/packet-lte-rrc.c @@ -5824,7 +5824,7 @@ dissect_lte_rrc_T_sizeOfRA_PreamblesGroupA(tvbuff_t *tvb _U_, int offset _U_, as ra_value = private_data_get_ra_preambles(actx); if (value > ra_value) { /* Something is wrong if A has more RAPIDs than A & B combined! */ - expert_add_info_format_text(actx->pinfo, actx->created_item, &ei_lte_rrc_too_many_group_a_rapids, + expert_add_info_format(actx->pinfo, actx->created_item, &ei_lte_rrc_too_many_group_a_rapids, "Group A size (%s) > Total RA size (%s)!", val_to_str_const(value, lte_rrc_T_sizeOfRA_PreamblesGroupA_vals, "Unknown"), val_to_str_const(ra_value, lte_rrc_T_numberOfRA_Preambles_vals, "Unknown")); @@ -10800,7 +10800,7 @@ dissect_lte_rrc_T_systemInfoValueTag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx if (p_previous != NULL) { /* Subtract one from stored result to get previous value */ guint32 previous = GPOINTER_TO_UINT(p_previous) - 1; - expert_add_info_format_text(actx->pinfo, actx->created_item, &ei_lte_rrc_si_info_value_changed, + expert_add_info_format(actx->pinfo, actx->created_item, &ei_lte_rrc_si_info_value_changed, "SI Info Value changed (now %u, was %u)", value, previous); } } @@ -27904,12 +27904,12 @@ if(ue_cap_tvb){ subtree2 = proto_item_add_subtree(item, ett_lte_rrc_UE_CapabilityRAT_Container); byte = tvb_get_guint8(ue_cap_tvb, 0); if (byte != 0x33) { - expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_type_value, + expert_add_info_format(actx->pinfo, item, &ei_lte_rrc_unexpected_type_value, "Unexpected type value (found 0x%02X)", byte); } byte = tvb_get_guint8(ue_cap_tvb, 1); if (byte != 0x03) { - expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_length_value, + expert_add_info_format(actx->pinfo, item, &ei_lte_rrc_unexpected_length_value, "Unexpected length value (found %d)", byte); } de_ms_cm_2(ue_cap_tvb, subtree2, actx->pinfo, 2, 3, NULL, 0); diff --git a/epan/dissectors/packet-ltp.c b/epan/dissectors/packet-ltp.c index e9b6c73c70..2416589ffb 100644 --- a/epan/dissectors/packet-ltp.c +++ b/epan/dissectors/packet-ltp.c @@ -440,7 +440,7 @@ dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, rcpt_clm_cnt = evaluate_sdnv(tvb, frame_offset + segment_offset, &rcpt_clm_cnt_size); if (rcpt_clm_cnt < 0){ proto_item_set_end(ltp_rpt_item, tvb, frame_offset + segment_offset); - expert_add_info_format_text(pinfo, ltp_tree, &ei_ltp_neg_reception_claim_count, + expert_add_info_format(pinfo, ltp_tree, &ei_ltp_neg_reception_claim_count, "Negative reception claim count: %d", rcpt_clm_cnt); return 0; } @@ -450,7 +450,7 @@ dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, */ if (rcpt_clm_cnt > tvb_length_remaining(tvb, frame_offset + segment_offset) / 2) { proto_item_set_end(ltp_rpt_item, tvb, frame_offset + segment_offset); - expert_add_info_format_text(pinfo, ltp_tree, &ei_ltp_mal_reception_claim, + expert_add_info_format(pinfo, ltp_tree, &ei_ltp_mal_reception_claim, "Reception claim count impossibly large: %d > %d", rcpt_clm_cnt, tvb_length_remaining(tvb, frame_offset + segment_offset) / 2); return 0; diff --git a/epan/dissectors/packet-m2pa.c b/epan/dissectors/packet-m2pa.c index 240abc6780..a09050d1f5 100644 --- a/epan/dissectors/packet-m2pa.c +++ b/epan/dissectors/packet-m2pa.c @@ -478,7 +478,7 @@ dissect_message_data(tvbuff_t *message_tvb, packet_info *pinfo, proto_item *m2pa proto_item *pi; pi = proto_tree_add_item(m2pa_tree, hf_undecode_data, message_tvb, length, (actual_length - length), ENC_NA); - expert_add_info_format_text(pinfo, pi, &ei_undecode_data, + expert_add_info_format(pinfo, pi, &ei_undecode_data, "There are %d bytes of data which is greater than M2PA's length parameter (%d)", actual_length, length); } diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 6233288fee..f82034ec8d 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -1789,7 +1789,7 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre reserved = (tvb_get_guint8(tvb, offset) & 0x80) >> 7; ti = proto_tree_add_item(rar_body_tree, hf_mac_lte_rar_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, "RAR body Reserved bit not zero (found 0x%x)", reserved); + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "RAR body Reserved bit not zero (found 0x%x)", reserved); } /* Timing Advance */ @@ -1797,10 +1797,10 @@ static gint dissect_rar_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre ti = proto_tree_add_item(rar_body_tree, hf_mac_lte_rar_ta, tvb, offset, 2, ENC_BIG_ENDIAN); if (timing_advance != 0) { if (timing_advance <= 31) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_note, + expert_add_info_format(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_note, "RAR Timing advance not zero (%u)", timing_advance); } else { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_warn, + expert_add_info_format(pinfo, ti, &ei_mac_lte_rar_timing_advance_not_zero_warn, "RAR Timing advance not zero (%u)", timing_advance); } } @@ -1921,7 +1921,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro reserved = (tvb_get_guint8(tvb, offset) & 0x30) >> 4; tii = proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, tii, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, tii, &ei_mac_lte_reserved_not_zero, "RAR header Reserved bits not zero (found 0x%x)", reserved); } @@ -2457,7 +2457,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil } } else { - expert_add_info_format_text(pinfo, retx_ti, &ei_mac_lte_orig_tx_ul_frame_not_found, + expert_add_info_format(pinfo, retx_ti, &ei_mac_lte_orig_tx_ul_frame_not_found, "Original Tx of UL frame not found (UE %u) !!", p_mac_lte_info->ueid); } } @@ -2468,7 +2468,7 @@ static void TrackReportedULHARQResend(packet_info *pinfo, tvbuff_t *tvb, volatil next_ti = proto_tree_add_uint(tree, hf_mac_lte_ul_harq_resend_next_frame, tvb, 0, 0, result->nextFrameNum); - expert_add_info_format_text(pinfo, next_ti, &ei_mac_lte_ul_harq_resend_next_frame, + expert_add_info_format(pinfo, next_ti, &ei_mac_lte_ul_harq_resend_next_frame, "UL MAC PDU (UE %u) needed to be retransmitted", p_mac_lte_info->ueid); PROTO_ITEM_SET_GENERATED(next_ti); @@ -2655,7 +2655,7 @@ static void TrackSRInfo(SREvent event, packet_info *pinfo, proto_tree *tree, /* For an SR frame, there should always be either a PDCCH grant or indication that the SR has failed */ if (event == SR_Request) { - expert_add_info_format_text(pinfo, event_ti, &ei_mac_lte_sr_results_not_grant_or_failure_indication, + expert_add_info_format(pinfo, event_ti, &ei_mac_lte_sr_results_not_grant_or_failure_indication, "UE %u: SR results in neither a grant nor a failure indication", ueid); } @@ -2999,7 +2999,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_sch_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "%cL-SCH header Reserved bits not zero", (p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D'); } @@ -3030,7 +3030,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree dlsch_lcid_vals, "(Unknown LCID)")); if (lcids[number_of_headers] == DRX_COMMAND_LCID) { - expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_dlsch_lcid, + expert_add_info_format(pinfo, lcid_ti, &ei_mac_lte_dlsch_lcid, "DRX command received for UE %u (RNTI %u)", p_mac_lte_info->ueid, p_mac_lte_info->rnti); } @@ -3047,7 +3047,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *after* a data PDU */ if (have_seen_data_header && (lcids[number_of_headers] > 10) && (lcids[number_of_headers] != PADDING_LCID)) { - expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader, + expert_add_info_format(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader, "%cL-SCH Control subheaders should not appear after data subheaders", (p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D'); return; @@ -3190,7 +3190,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* Flag unknown lcid values in expert info */ if (try_val_to_str(lcids[number_of_headers], (direction == DIRECTION_UPLINK) ? ulsch_lcid_vals : dlsch_lcid_vals) == NULL) { - expert_add_info_format_text(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected, + expert_add_info_format(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected, "%cL-SCH: Unexpected LCID received (%u)", (p_mac_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D', lcids[number_of_headers]); @@ -3281,7 +3281,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree tvb, offset, 1, ENC_BIG_ENDIAN); reserved = tvb_get_guint8(tvb, offset) & 0x01; if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "Activation/Deactivation Reserved bit not zero"); } offset++; @@ -3378,7 +3378,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_boolean(cr_tree, hf_mac_lte_control_ue_contention_resolution_msg3_matched, tvb, 0, 0, FALSE); - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_control_ue_contention_resolution_msg3_matched, + expert_add_info_format(pinfo, ti, &ei_mac_lte_control_ue_contention_resolution_msg3_matched, "CR body in Msg4 doesn't match Msg3 CCCH in frame %u", crResult->msg3FrameNum); PROTO_ITEM_SET_GENERATED(ti); @@ -3418,7 +3418,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree expert_add_info(pinfo, ta_value_ti, &ei_mac_lte_control_timing_advance_command_no_correction); } else { - expert_add_info_format_text(pinfo, ta_value_ti, &ei_mac_lte_control_timing_advance_command_correction_needed, + expert_add_info_format(pinfo, ta_value_ti, &ei_mac_lte_control_timing_advance_command_correction_needed, "Timing Advance control element received (%u) %s correction needed", ta_value, (ta_value < 31) ? "-ve" : "+ve"); @@ -3489,7 +3489,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(ephr_tree, hf_mac_lte_control_ext_power_headroom_reserved, tvb, curr_offset, 1, ENC_BIG_ENDIAN); if (scell_bitmap & 0x01) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "Extended Power Headroom Reserved bit not zero"); } curr_offset++; @@ -3517,7 +3517,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree } computed_header_offset++; if ((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) { - expert_add_info_format_text(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid, + expert_add_info_format(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid, "Control Element has an unexpected size (computed=%d, actual=%d)", computed_header_offset + 1 - curr_offset, pdu_lengths[n]); offset += pdu_lengths[n]; @@ -3542,7 +3542,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(ephr_cell_tree, hf_mac_lte_control_ext_power_headroom_reserved2, tvb, curr_offset, 1, ENC_BIG_ENDIAN); if (byte & 0xc0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "Extended Power Headroom Reserved bits not zero (found 0x%x)", (byte & 0xc0) >> 6); } @@ -3554,7 +3554,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree } } else { if ((gint16)(computed_header_offset + 1 - curr_offset) != pdu_lengths[n]) { - expert_add_info_format_text(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid, + expert_add_info_format(pinfo, ephr_ti, &ei_mac_lte_control_element_size_invalid, "Control Element has an unexpected size (computed=%d, actual=%d)", computed_header_offset + 1 - curr_offset, pdu_lengths[n]); offset += pdu_lengths[n]; @@ -3582,7 +3582,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(ephr_cell_tree, hf_mac_lte_control_ext_power_headroom_reserved2, tvb, curr_offset, 1, ENC_BIG_ENDIAN); if (byte & 0xc0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "Extended Power Headroom Reserved bits not zero (found 0x%x)", (byte & 0xc0) >> 6); } @@ -3618,7 +3618,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree ti = proto_tree_add_item(phr_tree, hf_mac_lte_control_power_headroom_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "Power Headroom Reserved bits not zero (found 0x%x)", reserved); } @@ -3676,7 +3676,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree tvb, offset, 1, ENC_BIG_ENDIAN); offset++; if (buffer_size >= global_mac_lte_bsr_warn_threshold) { - expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, + expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, "UE %u - BSR for LCG %u exceeds threshold: %u (%s)", p_mac_lte_info->ueid, lcgid, @@ -3725,7 +3725,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree tvb, offset, 1, ENC_BIG_ENDIAN); buffer_size[0] = (tvb_get_guint8(tvb, offset) & 0xfc) >> 2; if (buffer_size[0] >= global_mac_lte_bsr_warn_threshold) { - expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, + expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, "UE %u - BSR for LCG 0 exceeds threshold: %u (%s)", p_mac_lte_info->ueid, buffer_size[0], @@ -3738,7 +3738,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree buffer_size[1] = ((tvb_get_guint8(tvb, offset) & 0x03) << 4) | ((tvb_get_guint8(tvb, offset+1) & 0xf0) >> 4); offset++; if (buffer_size[1] >= global_mac_lte_bsr_warn_threshold) { - expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, + expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, "UE %u - BSR for LCG 1 exceeds threshold: %u (%s)", p_mac_lte_info->ueid, buffer_size[1], @@ -3752,7 +3752,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree buffer_size[2] = ((tvb_get_guint8(tvb, offset) & 0x0f) << 2) | ((tvb_get_guint8(tvb, offset+1) & 0xc0) >> 6); offset++; if (buffer_size[2] >= global_mac_lte_bsr_warn_threshold) { - expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, + expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, "UE %u - BSR for LCG 2 exceeds threshold: %u (%s)", p_mac_lte_info->ueid, buffer_size[2], @@ -3765,7 +3765,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree buffer_size[3] = tvb_get_guint8(tvb, offset) & 0x3f; offset++; if (buffer_size[3] >= global_mac_lte_bsr_warn_threshold) { - expert_add_info_format_text(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, + expert_add_info_format(pinfo, buffer_size_ti, &ei_mac_lte_bsr_warn_threshold_exceeded, "UE %u - BSR for LCG 3 exceeds threshold: %u (%s)", p_mac_lte_info->ueid, buffer_size[3], @@ -3983,7 +3983,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* Make sure the PDU isn't bigger than reported! */ if (offset > p_mac_lte_info->length) { - expert_add_info_format_text(pinfo, padding_length_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, padding_length_ti, &ei_mac_lte_context_length, "%s MAC PDU is longer than reported length (reported=%u, actual=%u)", (direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH", p_mac_lte_info->length, offset); @@ -3993,7 +3993,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree /* There is no padding at the end of the frame */ if (!is_truncated && (offset < p_mac_lte_info->length)) { /* There is a problem if we haven't used all of the PDU */ - expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "%s PDU for UE %u is shorter than reported length (reported=%u, actual=%u)", (direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH", p_mac_lte_info->ueid, p_mac_lte_info->length, offset); @@ -4001,7 +4001,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (!is_truncated && (offset > p_mac_lte_info->length)) { /* There is a problem if the PDU is longer than rpeported */ - expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "%s PDU for UE %u is longer than reported length (reported=%u, actual=%u)", (direction == DIRECTION_UPLINK) ? "UL-SCH" : "DL-SCH", p_mac_lte_info->ueid, p_mac_lte_info->length, offset); @@ -4074,7 +4074,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro ti = proto_tree_add_item(pdu_subheader_tree, hf_mac_lte_mch_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_reserved_not_zero, + expert_add_info_format(pinfo, ti, &ei_mac_lte_reserved_not_zero, "MCH header Reserved bits not zero"); } @@ -4106,7 +4106,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro *after* a data PDU */ if (have_seen_data_header && (lcids[number_of_headers] > 28) && (lcids[number_of_headers] != PADDING_LCID)) { - expert_add_info_format_text(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader, + expert_add_info_format(pinfo, lcid_ti, &ei_mac_lte_control_subheader_after_data_subheader, "MCH Control subheaders should not appear after data subheaders"); return; } @@ -4222,7 +4222,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro /* Flag unknown lcid values in expert info */ if (try_val_to_str(lcids[number_of_headers],mch_lcid_vals) == NULL) { - expert_add_info_format_text(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected, + expert_add_info_format(pinfo, pdu_subheader_ti, &ei_mac_lte_lcid_unexpected, "MCH: Unexpected LCID received (%u)", lcids[number_of_headers]); } @@ -4277,7 +4277,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro pdu_lengths[n] = (gint16)tvb_length_remaining(tvb, curr_offset); } if (pdu_lengths[n] & 0x01) { - expert_add_info_format_text(pinfo, sched_info_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, sched_info_ti, &ei_mac_lte_context_length, "MCH Scheduling Information MAC Control Element should have an even size"); } @@ -4394,7 +4394,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro /* Make sure the PDU isn't bigger than reported! */ if (offset > p_mac_lte_info->length) { - expert_add_info_format_text(pinfo, padding_length_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, padding_length_ti, &ei_mac_lte_context_length, "MAC PDU is longer than reported length (reported=%u, actual=%u)", p_mac_lte_info->length, offset); } @@ -4403,14 +4403,14 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro /* There is no padding at the end of the frame */ if (!is_truncated && (offset < p_mac_lte_info->length)) { /* There is a problem if we haven't used all of the PDU */ - expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "PDU is shorter than reported length (reported=%u, actual=%u)", p_mac_lte_info->length, offset); } if (!is_truncated && (offset > p_mac_lte_info->length)) { /* There is a problem if the PDU is longer than rpeported */ - expert_add_info_format_text(pinfo, pdu_ti, &ei_mac_lte_context_length, + expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "PDU is longer than reported length (reported=%u, actual=%u)", p_mac_lte_info->length, offset); } @@ -4510,7 +4510,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) p_mac_lte_info->rach_attempt_number); /* Add expert info (a note, unless attempt > 1) */ - expert_add_info_format_text(pinfo, ti, + expert_add_info_format(pinfo, ti, (p_mac_lte_info->rach_attempt_number > 1) ? &ei_mac_lte_rach_preamble_sent_warn : &ei_mac_lte_rach_preamble_sent_note, "RACH Preamble sent for UE %u (RAPID=%u, attempt=%u)", p_mac_lte_info->ueid, p_mac_lte_info->rapid, @@ -4603,7 +4603,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, 0, 0, p_mac_lte_info->sysframeNumber); PROTO_ITEM_SET_GENERATED(ti); if (p_mac_lte_info->sysframeNumber > 1023) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_sysframe_number, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_sysframe_number, "Sysframe number (%u) out of range - valid range is 0-1023", p_mac_lte_info->sysframeNumber); } @@ -4614,7 +4614,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (p_mac_lte_info->subframeNumber > 9) { /* N.B. if we set it to valid value, it won't trigger when we rescan (at least with DCT2000 files where the context struct isn't re-read). */ - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_sysframe_number, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_sysframe_number, "Subframe number (%u) out of range - valid range is 0-9", p_mac_lte_info->subframeNumber); } @@ -4641,7 +4641,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (p_mac_lte_info->rntiType) { case M_RNTI: if (p_mac_lte_info->rnti != 0xFFFD) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type, "M-RNTI indicated, but value is %u (0x%x) (must be 0x%x)", p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFD); return; @@ -4649,7 +4649,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case P_RNTI: if (p_mac_lte_info->rnti != 0xFFFE) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type, "P-RNTI indicated, but value is %u (0x%x) (must be 0x%x)", p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFE); return; @@ -4657,7 +4657,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case SI_RNTI: if (p_mac_lte_info->rnti != 0xFFFF) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type, "SI-RNTI indicated, but value is %u (0x%x) (must be 0x%x)", p_mac_lte_info->rnti, p_mac_lte_info->rnti, 0xFFFE); return; @@ -4665,7 +4665,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case RA_RNTI: if ((p_mac_lte_info->rnti < 0x0001) || (p_mac_lte_info->rnti > 0x003C)) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type, "RA_RNTI indicated, but given value %u (0x%x)is out of range", p_mac_lte_info->rnti, p_mac_lte_info->rnti); return; @@ -4674,7 +4674,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case C_RNTI: case SPS_RNTI: if ((p_mac_lte_info->rnti < 0x0001) || (p_mac_lte_info->rnti > 0xFFF3)) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_rnti_type, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_rnti_type, "%s indicated, but given value %u (0x%x)is out of range", val_to_str_const(p_mac_lte_info->rntiType, rnti_type_vals, "Unknown"), p_mac_lte_info->rnti, p_mac_lte_info->rnti); @@ -4713,7 +4713,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) PROTO_ITEM_SET_GENERATED(retx_ti); if (p_mac_lte_info->reTxCount >= global_mac_lte_retx_counter_trigger) { - expert_add_info_format_text(pinfo, retx_ti, &ei_mac_lte_ul_mac_frame_retx, + expert_add_info_format(pinfo, retx_ti, &ei_mac_lte_ul_mac_frame_retx, "UE %u: UL MAC frame ReTX no. %u", p_mac_lte_info->ueid, p_mac_lte_info->reTxCount); } @@ -4731,7 +4731,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Report non-success */ if (p_mac_lte_info->detailed_phy_info.dl_info.crc_status != crc_success) { - expert_add_info_format_text(pinfo, ti, &ei_mac_lte_context_crc_status, + expert_add_info_format(pinfo, ti, &ei_mac_lte_context_crc_status, "%s Frame has CRC error problem (%s)", (p_mac_lte_info->direction == DIRECTION_UPLINK) ? "UL" : "DL", val_to_str_const(p_mac_lte_info->detailed_phy_info.dl_info.crc_status, diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c index 85cd3aa50d..81f910be0d 100644 --- a/epan/dissectors/packet-mbtcp.c +++ b/epan/dissectors/packet-mbtcp.c @@ -611,7 +611,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { calc_crc16 = crc16_plain_tvb_offset_seed(tvb, offset, len-2, 0xFFFF); if (g_htons(calc_crc16) != crc16) - expert_add_info_format_text(pinfo, crc_item, &ei_mbrtu_crc16_incorrect, "Incorrect CRC - should be 0x%04x", g_htons(calc_crc16)); + expert_add_info_format(pinfo, crc_item, &ei_mbrtu_crc16_incorrect, "Incorrect CRC - should be 0x%04x", g_htons(calc_crc16)); } /* make sure to ignore the CRC-16 footer bytes */ diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index 3009d6eb67..7a9b3cf372 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -420,7 +420,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_previous_offset = tvb_find_guint8(tvb, 0, tvb_len, '/'); if (tvb_previous_offset == -1) { - expert_add_info_format_text(pinfo, ti, &ei_megaco_parse_error, + expert_add_info_format(pinfo, ti, &ei_megaco_parse_error, "Sorry, no \"/\" in the MEGACO header, I can't parse this packet"); return; } @@ -444,7 +444,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_current_offset = megaco_tvb_skip_wsp(tvb, tvb_previous_offset); if (tvb_previous_offset == tvb_current_offset) { - expert_add_info_format_text(pinfo, ti, &ei_megaco_parse_error, + expert_add_info_format(pinfo, ti, &ei_megaco_parse_error, "[ Parse error: missing SEP in MEGACO header ]"); return; } @@ -463,7 +463,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_current_offset = tvb_pbrk_guint8(tvb, tvb_current_offset, -1, " \t\r\n", &needle); if (tvb_current_offset == -1) { - expert_add_info_format_text(pinfo, ti, &ei_megaco_parse_error, + expert_add_info_format(pinfo, ti, &ei_megaco_parse_error, "[ Parse error: no body in MEGACO message (missing SEP after mId) ]"); return; } @@ -692,7 +692,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default : ti = proto_tree_add_item(tree,proto_megaco,tvb, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_megaco_error_descriptor_transaction_list, + expert_add_info_format(pinfo, ti, &ei_megaco_error_descriptor_transaction_list, "Sorry, can't understand errorDescriptor / transactionList = %s, can't parse it pos %u", tvb_format_text(tvb,tvb_previous_offset,2),tvb_previous_offset); return; @@ -727,7 +727,7 @@ nextcontext: tvb_transaction_end_offset, '=')+1; tvb_previous_offset = megaco_tvb_skip_wsp(tvb, tvb_previous_offset); if (tvb_current_offset >= tvb_next_offset) { - expert_add_info_format_text(pinfo, ti, &ei_megaco_parse_error, "Parse error: Invalid offset"); + expert_add_info_format(pinfo, ti, &ei_megaco_parse_error, "Parse error: Invalid offset"); return; } tvb_current_offset = tvb_next_offset; @@ -901,13 +901,13 @@ nextcontext: if ( tempchar == 'P' || tempchar == 'O'){ gint tvb_topology_end_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_transaction_end_offset, '}'); if ( tvb_topology_end_offset == -1 ){ - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"}\""); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"}\""); return; } tvb_command_start_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_transaction_end_offset, '{'); if ( tvb_command_start_offset == -1 ){ - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"{\""); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"{\""); return; } dissect_megaco_topologydescriptor(tvb, megaco_tree_command_line, tvb_topology_end_offset-1, tvb_command_start_offset+1); @@ -953,7 +953,7 @@ nextcontext: tvb_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_transaction_end_offset, '='); if (tvb_offset == -1 ) { - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"=\""); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"=\""); return; } tvb_offset = megaco_tvb_skip_wsp_return(tvb, tvb_offset -1); @@ -1232,13 +1232,13 @@ nextcontext: tvb_offset = tvb_find_guint8(tvb, tvb_command_start_offset, tvb_transaction_end_offset, '='); if (tvb_offset == -1 ) { - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"=\""); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Missing \"=\""); return; } tvb_offset = megaco_tvb_skip_wsp(tvb, tvb_offset+1); tokenlen = tvb_next_offset - tvb_offset; if (tokenlen+1 <= 0) { - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Invalid token length (%d)", tokenlen+1); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Invalid token length (%d)", tokenlen+1); return; } @@ -1254,7 +1254,7 @@ nextcontext: case 'E': if ((tokenlen+1 > (int) sizeof(TermID))) { - expert_add_info_format_text(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Invalid TermID length (%d)", tokenlen+1); + expert_add_info_format(pinfo, sub_ti, &ei_megaco_parse_error, "Parse error: Invalid TermID length (%d)", tokenlen+1); return; } tvb_get_nstringz0(tvb,tvb_offset,tokenlen+1,TermID); @@ -1451,7 +1451,7 @@ dissect_megaco_descriptors(tvbuff_t *tvb, proto_tree *megaco_tree_command_line, } if (tvb_current_offset <= tvb_previous_offset) { - expert_add_info_format_text(pinfo, megaco_tree_command_line, &ei_megaco_parse_error, "Parse error: Invalid offset"); + expert_add_info_format(pinfo, megaco_tree_command_line, &ei_megaco_parse_error, "Parse error: Invalid offset"); return; } @@ -2622,7 +2622,7 @@ dissect_megaco_observedeventsdescriptor(tvbuff_t *tvb, packet_info *pinfo, proto tvb_current_offset = tvb_observedevents_end_offset; } if (tvb_current_offset < tvb_previous_offset) { - expert_add_info_format_text(pinfo, megaco_observedevent_ti, &ei_megaco_parse_error, "Parse error: Invalid offset"); + expert_add_info_format(pinfo, megaco_observedevent_ti, &ei_megaco_parse_error, "Parse error: Invalid offset"); return; } diff --git a/epan/dissectors/packet-memcache.c b/epan/dissectors/packet-memcache.c index cc9edab7ba..3982c1c6fc 100644 --- a/epan/dissectors/packet-memcache.c +++ b/epan/dissectors/packet-memcache.c @@ -370,7 +370,7 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (illegal) { ti = proto_tree_add_item (extras_tree, hf_extras_unknown, tvb, offset, extras_len, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_extras_unknown, "%s %s shall not have Extras", + expert_add_info_format(pinfo, ti, &ei_extras_unknown, "%s %s shall not have Extras", val_to_str (opcode, opcode_vals, "Opcode %d"), request ? "Request" : "Response"); offset += extras_len; @@ -381,7 +381,7 @@ dissect_extras (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if ((offset - save_offset) != extras_len) { - expert_add_info_format_text(pinfo, extras_item, &ei_extras_unknown, "Illegal Extras length, should be %d", offset - save_offset); + expert_add_info_format(pinfo, extras_item, &ei_extras_unknown, "Illegal Extras length, should be %d", offset - save_offset); } } @@ -428,7 +428,7 @@ dissect_key (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (illegal) { - expert_add_info_format_text(pinfo, ti, &ei_key_unknown, "%s %s shall not have Key", + expert_add_info_format(pinfo, ti, &ei_key_unknown, "%s %s shall not have Key", val_to_str (opcode, opcode_vals, "Opcode %d"), request ? "Request" : "Response"); } else if (missing) { @@ -450,7 +450,7 @@ dissect_value (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (!request && ((opcode == OP_INCREMENT) || (opcode == OP_DECREMENT))) { ti = proto_tree_add_item (tree, hf_uint64_response, tvb, offset, 8, ENC_BIG_ENDIAN); if (value_len != 8) { - expert_add_info_format_text(pinfo, ti, &ei_value_length, "Illegal Value length, should be 8"); + expert_add_info_format(pinfo, ti, &ei_value_length, "Illegal Value length, should be 8"); } } else { ti = proto_tree_add_item (tree, hf_value, tvb, offset, value_len, ENC_ASCII|ENC_NA); @@ -497,7 +497,7 @@ dissect_value (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (illegal) { - expert_add_info_format_text(pinfo, ti, &ei_value_unknown, "%s %s shall not have Value", + expert_add_info_format(pinfo, ti, &ei_value_unknown, "%s %s shall not have Value", val_to_str (opcode, opcode_vals, "Opcode %d"), request ? "Request" : "Response"); } else if (missing) { @@ -529,7 +529,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1; if (try_val_to_str (magic, magic_vals) == NULL) { - expert_add_info_format_text(pinfo, ti, &ei_magic_unknown, "Unknown magic byte: %d", magic); + expert_add_info_format(pinfo, ti, &ei_magic_unknown, "Unknown magic byte: %d", magic); } opcode = tvb_get_guint8 (tvb, offset); @@ -537,7 +537,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1; if (try_val_to_str (opcode, opcode_vals) == NULL) { - expert_add_info_format_text(pinfo, ti, &ei_opcode_unknown, "Unknown opcode: %d", opcode); + expert_add_info_format(pinfo, ti, &ei_opcode_unknown, "Unknown opcode: %d", opcode); } proto_item_append_text (memcache_item, ", %s %s", val_to_str (opcode, opcode_vals, "Unknown opcode (%d)"), @@ -563,7 +563,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) request = FALSE; ti = proto_tree_add_item (memcache_tree, hf_status, tvb, offset, 2, ENC_BIG_ENDIAN); if (status != 0) { - expert_add_info_format_text(pinfo, ti, &ei_status_response, "%s: %s", + expert_add_info_format(pinfo, ti, &ei_status_response, "%s: %s", val_to_str (opcode, opcode_vals, "Unknown opcode (%d)"), val_to_str (status, status_vals, "Status: %d")); } @@ -571,7 +571,7 @@ dissect_memcache (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) request = TRUE; ti = proto_tree_add_item (memcache_tree, hf_reserved, tvb, offset, 2, ENC_BIG_ENDIAN); if (status != 0) { - expert_add_info_format_text(pinfo, ti, &ei_reserved_value, "Reserved value: %d", status); + expert_add_info_format(pinfo, ti, &ei_reserved_value, "Reserved value: %d", status); } } offset += 2; diff --git a/epan/dissectors/packet-meta.c b/epan/dissectors/packet-meta.c index 1f82f1b38a..e5949a138e 100644 --- a/epan/dissectors/packet-meta.c +++ b/epan/dissectors/packet-meta.c @@ -498,7 +498,7 @@ static gint32 evaluate_meta_items(guint16 schema, tvbuff_t *tvb, packet_info *pi item_len = skip_item(meta_tree, tvb, pinfo, offs + total_len); } if (item_len < 4) { /* 4 is the minimum length of an item: id + type + length field */ - expert_add_info_format_text(pinfo, meta_tree, &ei_meta_malformed, + expert_add_info_format(pinfo, meta_tree, &ei_meta_malformed, "Malformed Packet %s (wrong item encoding)", pinfo->current_proto); return -1; } diff --git a/epan/dissectors/packet-miop.c b/epan/dissectors/packet-miop.c index 14816b339c..662d15e0d6 100644 --- a/epan/dissectors/packet-miop.c +++ b/epan/dissectors/packet-miop.c @@ -216,7 +216,7 @@ static void dissect_miop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ti = proto_tree_add_item(miop_tree, hf_miop_unique_id_len, tvb, offset, 4, byte_order); if (unique_id_len >= MIOP_MAX_UNIQUE_ID_LENGTH) { - expert_add_info_format_text(pinfo, ti, &ei_miop_unique_id_len_exceed_max_value, + expert_add_info_format(pinfo, ti, &ei_miop_unique_id_len_exceed_max_value, "Unique Id length (%u) exceeds max value (%u)", unique_id_len, MIOP_MAX_UNIQUE_ID_LENGTH); return; diff --git a/epan/dissectors/packet-moldudp.c b/epan/dissectors/packet-moldudp.c index 6a55ca62bf..fc6d3eb459 100644 --- a/epan/dissectors/packet-moldudp.c +++ b/epan/dissectors/packet-moldudp.c @@ -106,7 +106,7 @@ dissect_moldudp_msgblk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, tvb, offset, MOLDUDP_MSGLEN_LEN, ENC_LITTLE_ENDIAN); if (msglen != real_msglen) - expert_add_info_format_text(pinfo, ti, &ei_moldudp_msglen_invalid, + expert_add_info_format(pinfo, ti, &ei_moldudp_msglen_invalid, "Invalid Message Length (claimed %u, found %u)", msglen, real_msglen); @@ -176,7 +176,7 @@ dissect_moldudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data if (real_count != count) { - expert_add_info_format_text(pinfo, ti, &ei_moldudp_count_invalid, + expert_add_info_format(pinfo, ti, &ei_moldudp_count_invalid, "Invalid Message Count (claimed %u, found %u)", count, real_count); } diff --git a/epan/dissectors/packet-moldudp64.c b/epan/dissectors/packet-moldudp64.c index 4c5857bb29..6b3bb39f13 100644 --- a/epan/dissectors/packet-moldudp64.c +++ b/epan/dissectors/packet-moldudp64.c @@ -105,7 +105,7 @@ dissect_moldudp64_msgblk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, tvb, offset, MOLDUDP64_MSGLEN_LEN, ENC_BIG_ENDIAN); if (msglen != real_msglen) - expert_add_info_format_text(pinfo, ti, &ei_moldudp64_msglen_invalid, + expert_add_info_format(pinfo, ti, &ei_moldudp64_msglen_invalid, "Invalid Message Length (claimed %u, found %u)", msglen, real_msglen); @@ -184,7 +184,7 @@ dissect_moldudp64(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat } else if (real_count != count) { - expert_add_info_format_text(pinfo, ti, &ei_moldudp64_count_invalid, + expert_add_info_format(pinfo, ti, &ei_moldudp64_count_invalid, "Invalid Message Count (claimed %u, found %u)", count, real_count); } diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c index a111cccea0..7e5d8e7dd1 100644 --- a/epan/dissectors/packet-mongo.c +++ b/epan/dissectors/packet-mongo.c @@ -261,17 +261,17 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre proto_tree_add_item(doc_tree, hf_mongo_document_length, tvb, offset, 4, ENC_LITTLE_ENDIAN); if (nest_level > BSON_MAX_NESTING) { - expert_add_info_format_text(pinfo, ti, &ei_mongo_document_recursion_exceeded, "BSON document recursion exceeds %u", BSON_MAX_NESTING); + expert_add_info_format(pinfo, ti, &ei_mongo_document_recursion_exceeded, "BSON document recursion exceeds %u", BSON_MAX_NESTING); THROW(ReportedBoundsError); } if (document_length < 5) { - expert_add_info_format_text(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too short: %u", document_length); + expert_add_info_format(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too short: %u", document_length); THROW(ReportedBoundsError); } if (document_length > BSON_MAX_DOC_SIZE) { - expert_add_info_format_text(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too long: %u", document_length); + expert_add_info_format(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too long: %u", document_length); THROW(ReportedBoundsError); } diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index 9d470ddc75..de25492fe7 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -621,7 +621,7 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, remaining_len--; if (pointer > remaining_len) { /* Bogus pointer */ - expert_add_info_format_text(pinfo, pi, &ei_mp2t_pointer, + expert_add_info_format(pinfo, pi, &ei_mp2t_pointer, "Pointer value is too large (> remaining data length %u)", remaining_len); } @@ -920,7 +920,7 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, /* Add info to the proto tree about drops */ if (detected_drop) { - expert_add_info_format_text(pinfo, tree, &ei_mp2t_cc_drop, + expert_add_info_format(pinfo, tree, &ei_mp2t_cc_drop, "Detected %d missing TS frames before this (last_cc:%d total skips:%d discontinuity:%d)", skips, cc_prev, mp2t_data->total_skips, diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c index 67ce817bfc..597c160933 100644 --- a/epan/dissectors/packet-mpeg-dsmcc.c +++ b/epan/dissectors/packet-mpeg-dsmcc.c @@ -245,7 +245,7 @@ dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (0xff != tmp) { - expert_add_info_format_text(pinfo, pi, &ei_dsmcc_invalid_value, + expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff"); } offset +=1; @@ -268,7 +268,7 @@ dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_user_id_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (0xff != tmp) { - expert_add_info_format_text(pinfo, pi, &ei_dsmcc_invalid_value, + expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff"); } /*offset +=1;*/ @@ -303,7 +303,7 @@ dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint pi = proto_tree_add_item(sub_tree, hf_dsmcc_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN); if (0x11 != prot_disc) { - expert_add_info_format_text(pinfo, pi, &ei_dsmcc_invalid_value, + expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0x11"); } offset +=1; @@ -326,7 +326,7 @@ dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint pi = proto_tree_add_item(sub_tree, hf_dsmcc_header_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (0xff != reserved) { - expert_add_info_format_text(pinfo, pi, &ei_dsmcc_invalid_value, + expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff"); } offset +=1; @@ -506,7 +506,7 @@ dissect_dsmcc_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pi = proto_tree_add_item(tree, hf_dsmcc_ddb_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (0xff != reserved) { - expert_add_info_format_text(pinfo, pi, &ei_dsmcc_invalid_value, + expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff"); } offset +=1; diff --git a/epan/dissectors/packet-mpls-echo.c b/epan/dissectors/packet-mpls-echo.c index 0324dcf032..587b7c2d21 100644 --- a/epan/dissectors/packet-mpls-echo.c +++ b/epan/dissectors/packet-mpls-echo.c @@ -549,7 +549,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto } if (length + 4 > rem) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length (claimed %u, found %u)", length, rem - 4); return; @@ -575,7 +575,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto break; case TLV_FEC_STACK_RSVP_IPv4: if (length != 20) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be %u)", length, 20); @@ -600,7 +600,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto break; case TLV_FEC_STACK_RSVP_IPv6: if (length != 56) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be %u)", length, 56); @@ -669,7 +669,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto break; case TLV_FEC_STACK_L2_CID_NEW: if (length < 14) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be %u)", length, 14); @@ -690,7 +690,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto break; case TLV_FEC_VENDOR_PRIVATE_START: if (length < 4) { /* SMI Enterprise code */ - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be >= %u)", length, 4); @@ -754,7 +754,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto break; case TLV_FEC_STACK_P2MP_IPv4: if (length != 20) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be %u)", length, 20); @@ -784,7 +784,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto case TLV_FEC_STACK_P2MP_IPv6: if (length != 56) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Length " "(claimed %u, should be %u)", length, 56); @@ -864,7 +864,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto if (length % 4) { pad = 4 - (length % 4); if (length + 4 + pad > rem) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_fec_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_fec_len, "Invalid FEC Sub-TLV Padded Length (claimed %u, found %u)", length + pad, rem - 4); return; @@ -939,7 +939,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr (offset + 8), 4, ENC_BIG_ENDIAN); break; default: - expert_add_info_format_text(pinfo, addr_ti, &ei_mpls_echo_unknown_address_type, + expert_add_info_format(pinfo, addr_ti, &ei_mpls_echo_unknown_address_type, "Unknown Address Type (%u)", addr_type); break; } @@ -957,7 +957,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr rem -= 16; offset += 16; if (rem < mplen) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, "Invalid FEC Multipath (claimed %u, found %u)", mplen, rem); return; @@ -967,7 +967,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr switch (hash_type) { case TLV_DS_MAP_HASH_IP: if (mplen != 4) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, "Invalid FEC Multipath (claimed %u, should be 4)", mplen); break; @@ -980,7 +980,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr break; case TLV_DS_MAP_HASH_IP_RANGE: if (mplen != 8) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, "Invalid FEC Multipath (claimed %u, should be 8)", mplen); break; @@ -1002,7 +1002,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr break; case TLV_DS_MAP_HASH_BITMASK_IP: if (mplen < 4) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_ds_map_muti_len, "Invalid FEC Multipath (claimed %u, should be 4)", mplen); break; @@ -1108,7 +1108,7 @@ dissect_mpls_echo_tlv_dd_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr (offset + 8), 4, ENC_BIG_ENDIAN); break; default: - expert_add_info_format_text(pinfo, ddti, &ei_mpls_echo_unknown_address_type, + expert_add_info_format(pinfo, ddti, &ei_mpls_echo_unknown_address_type, "Unknown Address Type (%u)", addr_type); break; } @@ -1133,7 +1133,7 @@ dissect_mpls_echo_tlv_dd_map(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr offset += 4; if (rem= 4)", multipath_length); break; @@ -1515,7 +1515,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre break; case TLV_ILSO_IPv4: if (length < 12) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be >= 12)", length); break; @@ -1524,7 +1524,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre break; case TLV_ILSO_IPv6: if (length < 24) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be >= 24)", length); break; @@ -1555,7 +1555,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre #endif case TLV_P2MP_ECHO_JITTER: if (length != 4) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be 4)", length); break; @@ -1574,7 +1574,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre case TLV_P2MP_RESPONDER_IDENT_IPV4_EGRESS_ADDR: case TLV_P2MP_RESPONDER_IDENT_IPV4_NODE_ADDR: if (resp_ident_len != 4) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be 4)", length); break; @@ -1591,7 +1591,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre case TLV_P2MP_RESPONDER_IDENT_IPV6_EGRESS_ADDR: case TLV_P2MP_RESPONDER_IDENT_IPV6_NODE_ADDR: if (resp_ident_len != 16) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be 16)", length); break; @@ -1609,7 +1609,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre } case TLV_VENDOR_PRIVATE_START: if (length < 4) { /* SMI Enterprise code */ - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be >= 4)", length); } else { @@ -1621,7 +1621,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre break; case TLV_DOWNSTREAM_MAPPING: if (length < 16) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be >= 16)", length); break; @@ -1630,7 +1630,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre break; case TLV_DETAILED_DOWNSTREAM: /* [RFC 6424] */ if (length < 16) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be >= 16)", length); break; @@ -1646,7 +1646,7 @@ dissect_mpls_echo_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre break; case TLV_REPLY_TOS: if (length != 4) { - expert_add_info_format_text(pinfo, ti, &ei_mpls_echo_tlv_len, + expert_add_info_format(pinfo, ti, &ei_mpls_echo_tlv_len, "Invalid TLV Length (claimed %u, should be 4)", length); break; diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 3f41f6cb61..0d6aea5e41 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -1386,7 +1386,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, lenstr = tvb_reported_length_remaining(tvb, offset); if (tree && lenstr > 0) { ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_mysql_dissector_incomplete, "FIXME: execute dissector incomplete"); + expert_add_info_format(pinfo, ti, &ei_mysql_dissector_incomplete, "FIXME: execute dissector incomplete"); } offset += lenstr; #endif @@ -1417,7 +1417,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, case MYSQL_CONNECT_OUT: case MYSQL_REGISTER_SLAVE: ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, -1, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_mysql_dissector_incomplete, "FIXME: implement replication packets"); + expert_add_info_format(pinfo, ti, &ei_mysql_dissector_incomplete, "FIXME: implement replication packets"); offset += tvb_reported_length_remaining(tvb, offset); conn_data->state = REQUEST; break; diff --git a/epan/dissectors/packet-nat-pmp.c b/epan/dissectors/packet-nat-pmp.c index 12d529de5d..ab7cf60f2c 100644 --- a/epan/dissectors/packet-nat-pmp.c +++ b/epan/dissectors/packet-nat-pmp.c @@ -276,7 +276,7 @@ dissect_nat_pmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data default: /* Unknown OP */ - expert_add_info_format_text(pinfo, op_ti, &ei_natpmp_opcode_unknown, "Unknown opcode: %d", opcode); + expert_add_info_format(pinfo, op_ti, &ei_natpmp_opcode_unknown, "Unknown opcode: %d", opcode); break; } @@ -431,7 +431,7 @@ dissect_portcontrol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui break; default: /* Unknown OP */ - expert_add_info_format_text(pinfo, opcode_ti, &ei_pcp_opcode_unknown, "Unknown opcode: %d", ropcode); + expert_add_info_format(pinfo, opcode_ti, &ei_pcp_opcode_unknown, "Unknown opcode: %d", ropcode); break; } @@ -477,7 +477,7 @@ dissect_portcontrol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gui default: /* Unknown option */ - expert_add_info_format_text(pinfo, option_ti, &ei_pcp_option_unknown, "Unknown option: %d", option); + expert_add_info_format(pinfo, option_ti, &ei_pcp_option_unknown, "Unknown option: %d", option); break; } } diff --git a/epan/dissectors/packet-ncp-nmas.c b/epan/dissectors/packet-ncp-nmas.c index 623db4a6a8..885a2fb56a 100644 --- a/epan/dissectors/packet-ncp-nmas.c +++ b/epan/dissectors/packet-ncp-nmas.c @@ -574,7 +574,7 @@ dissect_nmas_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, guin if (str) { col_add_fstr(pinfo->cinfo, COL_INFO, "R Payload Error - %s", str); expert_item = proto_tree_add_item(atree, hf_encrypt_error, tvb, foffset, 4, ENC_BIG_ENDIAN); - expert_add_info_format_text(pinfo, expert_item, &ei_encrypt_error, "NMAS Payload Error: %s", str); + expert_add_info_format(pinfo, expert_item, &ei_encrypt_error, "NMAS Payload Error: %s", str); } else { proto_tree_add_item(atree, hf_opaque, tvb, foffset, msg_length, ENC_NA); } @@ -594,12 +594,12 @@ dissect_nmas_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, guin str = try_val_to_str(return_code, nmas_errors_enum); if (str) { expert_item = proto_tree_add_item(atree, hf_return_code, tvb, roffset, 4, ENC_LITTLE_ENDIAN); - expert_add_info_format_text(pinfo, expert_item, &ei_return_error, "NMAS Error: 0x%08x %s", return_code, str); + expert_add_info_format(pinfo, expert_item, &ei_return_error, "NMAS Error: 0x%08x %s", return_code, str); col_add_fstr(pinfo->cinfo, COL_INFO, "R Error - %s", str); } else { if (return_code!=0) { expert_item = proto_tree_add_item(atree, hf_return_code, tvb, roffset, 4, ENC_LITTLE_ENDIAN); - expert_add_info_format_text(pinfo, expert_item, &ei_return_error, "NMAS Error: 0x%08x is unknown", return_code); + expert_add_info_format(pinfo, expert_item, &ei_return_error, "NMAS Error: 0x%08x is unknown", return_code); col_add_fstr(pinfo->cinfo, COL_INFO, "R Unknown NMAS Error - 0x%08x", return_code); } } diff --git a/epan/dissectors/packet-ncp-sss.c b/epan/dissectors/packet-ncp-sss.c index 1d04d00bcf..66f5a5eaf7 100644 --- a/epan/dissectors/packet-ncp-sss.c +++ b/epan/dissectors/packet-ncp-sss.c @@ -665,7 +665,7 @@ dissect_sss_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ncp_tree, guint str = try_val_to_str(return_code, sss_errors_enum); if (str) { expert_item = proto_tree_add_item(atree, hf_return_code, tvb, foffset, 4, ENC_LITTLE_ENDIAN); - expert_add_info_format_text(pinfo, expert_item, &ei_return_code, "SSS Error: %s", str); + expert_add_info_format(pinfo, expert_item, &ei_return_code, "SSS Error: %s", str); col_add_fstr(pinfo->cinfo, COL_INFO, "R Error - %s", val_to_str(return_code, sss_errors_enum, "Unknown (%d)")); /*foffset+=4;*/ } else { diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index b2ffab47e6..31ca6534e9 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -274,7 +274,7 @@ mncp_hash_insert(conversation_t *conversation, guint32 nwconnection, guint8 nwta g_hash_table_insert(mncp_rhash, key, value); if (ncp_echo_conn && nwconnection != 65535) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nwconnection, nwtask); + expert_add_info_format(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nwconnection, nwtask); value->session_start_packet_num = pinfo->fd->num; } @@ -421,7 +421,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, request_value = mncp_hash_lookup(conversation, nw_connection, header.task); if (request_value) { if ((request_value->session_start_packet_num == pinfo->fd->num) && ncp_echo_conn) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nw_connection, header.task); + expert_add_info_format(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nw_connection, header.task); } } } @@ -454,7 +454,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, request_value = mncp_hash_lookup(conversation, nw_connection, header.task); if (request_value) { if ((request_value->session_start_packet_num == pinfo->fd->num) && ncp_echo_conn) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nw_connection, header.task); + expert_add_info_format(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nw_connection, header.task); } } } @@ -477,7 +477,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_item(ncp_tree, hf_ncp_oplock_flag, tvb, commhdr + 9, 1, tvb_get_guint8(tvb, commhdr+9)); proto_tree_add_item(ncp_tree, hf_ncp_oplock_handle, tvb, commhdr + 10, 4, ENC_BIG_ENDIAN); if ((tvb_get_guint8(tvb, commhdr+9)==0x24) && ncp_echo_file) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_oplock_handle, "Server requesting station to clear oplock on handle - %08x", tvb_get_ntohl(tvb, commhdr+10)); + expert_add_info_format(pinfo, NULL, &ei_ncp_oplock_handle, "Server requesting station to clear oplock on handle - %08x", tvb_get_ntohl(tvb, commhdr+10)); } break; @@ -823,7 +823,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, val_to_str(header.type, ncp_type_vals, "Unknown type (0x%04x)")); if (ncp_echo_err) { - expert_add_info_format_text(pinfo, expert_item, &ei_ncp_type, "%s packets not supported yet", val_to_str(header.type, ncp_type_vals, "Unknown type (0x%04x)")); + expert_add_info_format(pinfo, expert_item, &ei_ncp_type, "%s packets not supported yet", val_to_str(header.type, ncp_type_vals, "Unknown type (0x%04x)")); } break; } diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index 1a5e6aef26..7e93cd7bdd 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -2828,7 +2828,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record build_expert_data(ncp_tree, "ncp.file_handle", p_filehandle, sizeof p_filehandle, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_file_handle, "Close file handle %s", p_filehandle); + expert_add_info_format(pinfo, NULL, &ei_ncp_file_handle, "Close file handle %s", p_filehandle); } /* The following allows for oplock level 1 file opens echoed to expert tap. */ if ((ncp_rec->func == 89 || ncp_rec->func == 87) && (ncp_rec->subfunc == 1 || ncp_rec->subfunc == 30 || ncp_rec->subfunc == 32 || ncp_rec->subfunc == 33)) { @@ -2856,7 +2856,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record FALSE); } - expert_add_info_format_text(pinfo, NULL, &ei_ncp_file_rights, + expert_add_info_format(pinfo, NULL, &ei_ncp_file_rights, val_to_str((guint32)(strtoul(oaction, NULL, 16) & 0xeb), open_create_mode_vals, "Unknown: %d"), p_filename, val_to_str((atoi(p_rights) & 0x5f), ncp_rights_vals, "Unknown: %d")); @@ -2871,7 +2871,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record build_expert_data(ncp_tree, "ncp.cc_function", cc_function, sizeof cc_function, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_op_lock_handle, "Op-lock on handle %s - %s", p_filehandle, + expert_add_info_format(pinfo, NULL, &ei_ncp_op_lock_handle, "Op-lock on handle %s - %s", p_filehandle, val_to_str(atoi(cc_function), ncp_cc_function_vals, "Unknown: %d")); } /* The following allows for Update file handle rights echoed to expert tap. */ @@ -2886,7 +2886,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record p_rights, sizeof p_rights, 0, FALSE); build_expert_data(ncp_tree, "ncp.new_access_rights_mask", n_rights, sizeof n_rights, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_file_rights_change, "Change handle %s rights from:(%s) to:(%s)", + expert_add_info_format(pinfo, NULL, &ei_ncp_file_rights_change, "Change handle %s rights from:(%s) to:(%s)", p_filehandle, val_to_str((atoi(p_rights) & 0x1ff), access_rights_vals, "Unknown: %d"), val_to_str((atoi(n_rights) & 0x1ff), access_rights_vals, "Unknown: %d")); @@ -2909,7 +2909,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record p_filehandle, sizeof p_filehandle, 0, FALSE); if (ncp_rec->subfunc == 1) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_file_handle, "%s - File handle %s", + expert_add_info_format(pinfo, NULL, &ei_ncp_file_handle, "%s - File handle %s", val_to_str((atoi(oaction) & 0x8f), open_create_action_vals, "Unknown: %d"), p_filehandle); } @@ -2917,7 +2917,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record { build_expert_data(ncp_tree, "ncp.o_c_ret_flags", oplockflg, sizeof oplockflg, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_file_handle, "%s - File handle %s, %s", + expert_add_info_format(pinfo, NULL, &ei_ncp_file_handle, "%s - File handle %s, %s", val_to_str((atoi(oaction) & 0x8f), open_create_action_vals, "Unknown: %d"), p_filehandle, val_to_str(atoi(oplockflg), ncp_o_c_ret_flags_vals, "Unknown: %d")); @@ -2932,7 +2932,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record p_filehandle, sizeof p_filehandle, 0, FALSE); build_expert_data(ncp_tree, "ncp.effective_rights", p_rights, sizeof p_rights, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_effective_rights, "Handle %s effective rights:(%s)", p_filehandle, + expert_add_info_format(pinfo, NULL, &ei_ncp_effective_rights, "Handle %s effective rights:(%s)", p_filehandle, val_to_str((atoi(p_rights) & 0x1ff), access_rights_vals, "Unknown: %d")); } } @@ -2962,7 +2962,7 @@ trap_for_expert_event(proto_tree *ncp_tree, packet_info *pinfo, const ncp_record build_expert_data(ncp_tree, "ncp.oeslinux_or_netware", p_kernel, sizeof p_kernel, 0, FALSE); - expert_add_info_format_text(pinfo, NULL, &ei_ncp_server, "Server %s, version %s.%s, support pack %s, language %s, server type %s, kernel %s", fsname, + expert_add_info_format(pinfo, NULL, &ei_ncp_server, "Server %s, version %s.%s, support pack %s, language %s, server type %s, kernel %s", fsname, p_maj_ver, p_min_ver, p_rev, p_lang, val_to_str((atoi(p_serv_type) & 0x01), serv_type_vals, "Unknown: %d"), val_to_str((atoi(p_kernel) & 0x01), kernel_type_vals, "Unknown: %d") ); } } @@ -4824,7 +4824,7 @@ dissect_nds_iterator(proto_tree *it_tree, tvbuff_t *tvb, packet_info *pinfo, gui rcode, error_string ); if (rcode != 0 && ncp_echo_err) { - expert_add_info_format_text(pinfo, expert_item, &ei_iter_verb_completion_code, "Iteration Verb Error: 0x%08x %s", rcode, error_string); + expert_add_info_format(pinfo, expert_item, &ei_iter_verb_completion_code, "Iteration Verb Error: 0x%08x %s", rcode, error_string); } ioffset += 4; @@ -7474,7 +7474,7 @@ dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo, case NCP_DEALLOCATE_SLOT: ncp_rec = &ncp5555_request; if (ncp_echo_conn) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_destroy_connection, "Destroy Connection %u Request", nw_connection); + expert_add_info_format(pinfo, NULL, &ei_ncp_destroy_connection, "Destroy Connection %u Request", nw_connection); } break; case NCP_BROADCAST_SLOT: @@ -8213,7 +8213,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo, nds_error_code, nds_error_string); if (nds_error_code != 0 && ncp_echo_err) { - expert_add_info_format_text(pinfo, expert_item, &ei_nds_reply_error, "NDS Error: 0x%08x %s", nds_error_code, nds_error_string); + expert_add_info_format(pinfo, expert_item, &ei_nds_reply_error, "NDS Error: 0x%08x %s", nds_error_code, nds_error_string); } } if (request_value && nds_error_code == 0x00000000) @@ -8725,7 +8725,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo, pvalues[1].vvalue, val_to_str(pvalues[1].vvalue, nds_reply_errors, "Unknown: %d")); if (pvalues[1].vvalue != 0 && ncp_echo_err) { - expert_add_info_format_text(pinfo, expert_item, &ei_nds_iteration, "NDS Iteration Error: 0x%08x %s", + expert_add_info_format(pinfo, expert_item, &ei_nds_iteration, "NDS Iteration Error: 0x%08x %s", pvalues[1].vvalue, val_to_str(pvalues[1].vvalue, nds_reply_errors, "Unknown: %d")); } nds_offset = nds_offset+pvalues[1].vlength; @@ -8765,7 +8765,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo, } /* Echo EID data to expert Chat window */ if (add_eid && nds_echo_eid) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_eid, + expert_add_info_format(pinfo, NULL, &ei_ncp_eid, "EID (%08x) = %s", global_eid, global_object_name); } /* For NDS requests with just an EID, resolve name @@ -9025,7 +9025,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, completion_code, "Completion Code: %d (0x89%02x), %s", completion_code, completion_code, error_string); if ((completion_code != 0 || type == NCP_POSITIVE_ACK) && ncp_echo_err) { - expert_add_info_format_text(pinfo, expert_item, &ei_ncp_completion_code, + expert_add_info_format(pinfo, expert_item, &ei_ncp_completion_code, "Error: %d (0x89%02x) %s", completion_code, completion_code, error_string); } @@ -9135,7 +9135,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, /* Echo EID data to expert Chat window */ if (nds_echo_eid) { - expert_add_info_format_text(pinfo, NULL, &ei_ncp_eid, + expert_add_info_format(pinfo, NULL, &ei_ncp_eid, "EID (%s) = %s", eid_string, global_object_name); } } diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 27daf7eaf0..8efa4bf2dc 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -6727,7 +6727,7 @@ ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset ndps_problem_type = tvb_get_ntohl(tvb, foffset); col_set_str(pinfo->cinfo, COL_INFO, "R NDPS - Error"); expert_item = proto_tree_add_uint(ndps_tree, hf_ndps_problem_type, tvb, foffset, 4, ndps_problem_type); - expert_add_info_format_text(pinfo, expert_item, &ei_ndps_problem_type, "Fault: %s", val_to_str(ndps_problem_type, error_type_enum, "Unknown NDPS Error (0x%08x)")); + expert_add_info_format(pinfo, expert_item, &ei_ndps_problem_type, "Fault: %s", val_to_str(ndps_problem_type, error_type_enum, "Unknown NDPS Error (0x%08x)")); foffset += 4; switch(ndps_problem_type) { @@ -6928,7 +6928,7 @@ return_code(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffse expert_status = tvb_get_ntohl(tvb, foffset); expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); if (expert_status != 0) { - expert_add_info_format_text(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str(expert_status, ndps_error_types, "Unknown NDPS Error (0x%08x)")); + expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str(expert_status, ndps_error_types, "Unknown NDPS Error (0x%08x)")); } foffset += 4; if (tvb_get_ntohl(tvb, foffset-4) != 0) @@ -7005,7 +7005,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int expert_item = proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_stat, tvb, foffset, 4, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohl(tvb, foffset); if (expert_status != 0) { - expert_add_info_format_text(pinfo, expert_item, &ei_ndps_rpc_acc_stat, "Fault: %s", val_to_str(expert_status, accept_stat, "Unknown NDPS Error (0x%08x)")); + expert_add_info_format(pinfo, expert_item, &ei_ndps_rpc_acc_stat, "Fault: %s", val_to_str(expert_status, accept_stat, "Unknown NDPS Error (0x%08x)")); } foffset += 4; if (tvb_length_remaining(tvb,foffset) < 4 ) { @@ -7027,7 +7027,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int { expert_status = tvb_get_ntohl(tvb, foffset); expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN); - expert_add_info_format_text(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str(expert_status, ndps_error_types, "Unknown NDPS Error (0x%08x)")); + expert_add_info_format(pinfo, expert_item, &ei_ndps_return_code, "Fault: %s", val_to_str(expert_status, ndps_error_types, "Unknown NDPS Error (0x%08x)")); col_append_str(pinfo->cinfo, COL_INFO, "- Error"); return foffset; } diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c index b9b5aee9f6..6ad21b978f 100644 --- a/epan/dissectors/packet-netflow.c +++ b/epan/dissectors/packet-netflow.c @@ -2199,7 +2199,7 @@ dissect_v9_v10_flowset(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdutree, i length = tvb_get_ntohs(tvb, offset + 2); if (length < 4) { - expert_add_info_format_text(pinfo, NULL, &ei_cflow_flowset_length, + expert_add_info_format(pinfo, NULL, &ei_cflow_flowset_length, "Length (%u) too short", length); return tvb_reported_length_remaining(tvb, offset); } @@ -5371,7 +5371,7 @@ dissect_v9_v10_options_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p return 0; } if (option_scope_field_count > option_total_field_count) { - expert_add_info_format_text(pinfo, ti, &ei_cflow_template_ipfix_scope_field_count_too_many, + expert_add_info_format(pinfo, ti, &ei_cflow_template_ipfix_scope_field_count_too_many, "More scope fields (%u) than fields (%u)", option_scope_field_count, option_total_field_count); return 0; @@ -5385,7 +5385,7 @@ dissect_v9_v10_options_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p if (v9_tmplt_max_fields && (option_field_count > v9_tmplt_max_fields)) { - expert_add_info_format_text(pinfo, ti, &ei_cflow_options, + expert_add_info_format(pinfo, ti, &ei_cflow_options, "More options (%u) than we can handle." " Maximum value can be adjusted in the protocol preferences.", option_field_count); @@ -5393,7 +5393,7 @@ dissect_v9_v10_options_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *p if (v9_tmplt_max_fields && (option_scope_field_count > v9_tmplt_max_fields)) { - expert_add_info_format_text(pinfo, ti, &ei_cflow_scopes, + expert_add_info_format(pinfo, ti, &ei_cflow_scopes, "More scopes (%u) than we can handle [template won't be used]." " Maximum value can be adjusted in the protocol preferences.", option_scope_field_count); @@ -5491,7 +5491,7 @@ dissect_v9_v10_data_template(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pdut offset += 2; if (v9_tmplt_max_fields && (count > v9_tmplt_max_fields)) { - expert_add_info_format_text(pinfo, ti, &ei_cflow_entries, + expert_add_info_format(pinfo, ti, &ei_cflow_entries, "More entries (%u) than we can handle [template won't be used]." " Maximum value can be adjusted in the protocol preferences.", count); diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 7bb6402a19..96218b3a85 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -2303,7 +2303,7 @@ dissect_fhandle_data_CELERRA_VNX(tvbuff_t* tvb, packet_info *pinfo _U_, proto_tr } } else { /* This is not a Celerra|VNX file handle. Display a warning. */ - expert_add_info_format_text(pinfo, tree, &ei_nfs_not_vnx_file, + expert_add_info_format(pinfo, tree, &ei_nfs_not_vnx_file, "Celerra|VNX file handles are 32 (NFSv3) or 40 (NFSv4) but the length is %u.\n" "Change the 'Decode NFS file handles as' pref to the correct type or 'Unknown'.", fhlen); diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c index 8a53ecbe6f..2200dc5053 100644 --- a/epan/dissectors/packet-nhrp.c +++ b/epan/dissectors/packet-nhrp.c @@ -903,7 +903,7 @@ void dissect_nhrp_ext(tvbuff_t *tvb, ti = proto_tree_add_text(nhrp_tree, tvb, offset, len, "Malformed Extension: %s", tvb_bytes_to_str(tvb, offset, len)); - expert_add_info_format_text(pinfo, ti, &ei_nhrp_ext_malformed, "Incomplete Authentication Extension"); + expert_add_info_format(pinfo, ti, &ei_nhrp_ext_malformed, "Incomplete Authentication Extension"); } else { proto_item *auth_item; @@ -934,7 +934,7 @@ void dissect_nhrp_ext(tvbuff_t *tvb, ti = proto_tree_add_text(nhrp_tree, tvb, offset, len, "Malformed Extension: %s", tvb_bytes_to_str(tvb, offset, len)); - expert_add_info_format_text(pinfo, ti, &ei_nhrp_ext_malformed, "Incomplete Vendor-Private Extension"); + expert_add_info_format(pinfo, ti, &ei_nhrp_ext_malformed, "Incomplete Vendor-Private Extension"); } else { proto_item *vendor_item; diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index c440d4df48..5296b03a22 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -986,7 +986,7 @@ dissect_ntlmssp_blob (tvbuff_t *tvb, packet_info *pinfo, } else { result->length = 0; result->contents = NULL; - expert_add_info_format_text(pinfo, tf, &ei_ntlmssp_v2_key_too_long, + expert_add_info_format(pinfo, tf, &ei_ntlmssp_v2_key_too_long, "NTLM v2 key is %d bytes long, too big for our %d buffer", blob_length, MAX_BLOB_SIZE); } } @@ -1801,7 +1801,7 @@ dissect_ntlmssp_auth (tvbuff_t *tvb, packet_info *pinfo, int offset, } if (sessionblob.length > NTLMSSP_KEY_LEN) { - expert_add_info_format_text(pinfo, NULL, &ei_ntlmssp_blob_len_too_long, "Session blob length too long: %u", sessionblob.length); + expert_add_info_format(pinfo, NULL, &ei_ntlmssp_blob_len_too_long, "Session blob length too long: %u", sessionblob.length); } else if (sessionblob.length != 0) { memcpy(encryptedsessionkey, sessionblob.contents, sessionblob.length); /* Try to attach to an existing conversation if not then it's useless to try to do so diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index 69e038bcea..147fd32443 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -1211,7 +1211,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* command data length > 0 is NG; response data lengths are > 0 */ if (is_command) { if (reported_length_remaining != 0) { - expert_add_info_format_text(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); + expert_add_info_format(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); } return tvb_length(tvb); } @@ -1221,13 +1221,13 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* command data length should be 0 */ if (is_command) { if(reported_length_remaining != 0) { - expert_add_info_format_text(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); + expert_add_info_format(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); } } /* There's no response */ if (is_response) { - expert_add_info_format_text(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); + expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); } return tvb_length(tvb); break; @@ -1249,7 +1249,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* There's no response */ if (is_response) { - expert_add_info_format_text(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); + expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); return tvb_length(tvb); } break; @@ -1479,7 +1479,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da reported_length_remaining = reported_length_remaining - 1; if(memory_code_len == 0) { - expert_add_info_format_text(pinfo, ti, &ei_oomron_command_memory_area_code, "Unknown Memory-Area-Code (%u)", memory_area_code); + expert_add_info_format(pinfo, ti, &ei_oomron_command_memory_area_code, "Unknown Memory-Area-Code (%u)", memory_area_code); return tvb_length(tvb); /* Bail out .... */ } proto_tree_add_item(command_tree, hf_omron_data, tvb, offset, memory_code_len, ENC_NA); diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index ec11ecde8e..c05692ab45 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -1349,7 +1349,7 @@ dissect_opensafety_ssdo_message(tvbuff_t *message_tvb , packet_info *pinfo, prot { proto_tree_add_item(ssdo_tree, hf_oss_ssdo_payload, message_tvb, payloadOffset, calcDataLength, ENC_NA ); } else { - expert_add_info_format_text(pinfo, item, &ei_payload_length_not_positive, + expert_add_info_format(pinfo, item, &ei_payload_length_not_positive, "Calculation for payload length yielded non-positive result [%d]", (guint) calcDataLength ); } } @@ -1508,7 +1508,7 @@ dissect_opensafety_snmt_message(tvbuff_t *message_tvb, packet_info *pinfo , prot { local_scm_udid = (char *)se_alloc0(18 * sizeof(char)); g_snprintf(local_scm_udid, 18, "%s", tempString ); - expert_add_info_format_text(pinfo, item, &ei_scmudid_autodetected, "Auto detected payload as SCM UDID [%s].", tempString); + expert_add_info_format(pinfo, item, &ei_scmudid_autodetected, "Auto detected payload as SCM UDID [%s].", tempString); } } @@ -1539,7 +1539,7 @@ dissect_opensafety_snmt_message(tvbuff_t *message_tvb, packet_info *pinfo , prot { local_scm_udid = (char *)se_alloc0(18 * sizeof(char)); g_snprintf(local_scm_udid, 18, "%s", tempString ); - expert_add_info_format_text(pinfo, item, &ei_scmudid_autodetected, "Auto detected payload as SCM UDID [%s].", tempString); + expert_add_info_format(pinfo, item, &ei_scmudid_autodetected, "Auto detected payload as SCM UDID [%s].", tempString); } } diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c index 2b4dfaa4dc..55730fb195 100644 --- a/epan/dissectors/packet-openwire.c +++ b/epan/dissectors/packet-openwire.c @@ -1081,7 +1081,7 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o } else if (tvb_length_remaining(tvb, offset) > 0) { - expert_add_info_format_text(pinfo, object_tree, &ei_openwire_type_not_supported, "OpenWire type not supported by Wireshark : %d", type); + expert_add_info_format(pinfo, object_tree, &ei_openwire_type_not_supported, "OpenWire type not supported by Wireshark : %d", type); offset += tvb_length_remaining(tvb, offset); } proto_item_set_len(ti, offset - startOffset); @@ -1302,7 +1302,7 @@ dissect_openwire_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in } else if (tvb_length_remaining(tvb, offset) > 0) { - expert_add_info_format_text(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command not supported by Wireshark: %d", iCommand); + expert_add_info_format(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command not supported by Wireshark: %d", iCommand); } } } @@ -1356,7 +1356,7 @@ dissect_openwire(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += dissect_openwire_command(tvb, pinfo, openwireroot_tree, offset, iCommand); if (tvb_length_remaining(tvb, offset) > 0) { - expert_add_info_format_text(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command fields unknown to Wireshark: %d", iCommand); + expert_add_info_format(pinfo, tree, &ei_openwire_command_not_supported, "OpenWire command fields unknown to Wireshark: %d", iCommand); } } } diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c index 53aa67ad90..8716ee4126 100644 --- a/epan/dissectors/packet-ositp.c +++ b/epan/dissectors/packet-ositp.c @@ -915,7 +915,7 @@ static int ositp_decode_DR(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, ositp_decode_var_part(tvb, offset, li, 4, tpdu_len, pinfo, cotp_tree); offset += li; - expert_add_info_format_text(pinfo, ti, &ei_cotp_disconnect_request, "Disconnect Request(DR): 0x%x -> 0x%x", src_ref, dst_ref); + expert_add_info_format(pinfo, ti, &ei_cotp_disconnect_request, "Disconnect Request(DR): 0x%x -> 0x%x", src_ref, dst_ref); /* User data */ call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, @@ -1531,7 +1531,7 @@ static int ositp_decode_RJ(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, offset += li + 1; - expert_add_info_format_text(pinfo, item, &ei_cotp_reject, "Reject(RJ): -> 0x%x", dst_ref); + expert_add_info_format(pinfo, item, &ei_cotp_reject, "Reject(RJ): -> 0x%x", dst_ref); return offset; @@ -1600,7 +1600,7 @@ static int ositp_decode_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, /* expert info, but only if not encapsulated in TCP/SMB */ /* XXX - the best way to detect seems to be if we have a port set */ if (pinfo->destport == 0) { - expert_add_info_format_text(pinfo, item, &ei_cotp_connection, "Connection %s: 0x%x -> 0x%x", tpdu == CR_TPDU ? "Request(CR)" : "Confirm(CC)", src_ref, dst_ref); + expert_add_info_format(pinfo, item, &ei_cotp_connection, "Connection %s: 0x%x -> 0x%x", tpdu == CR_TPDU ? "Request(CR)" : "Confirm(CC)", src_ref, dst_ref); } if (tree) { @@ -1723,7 +1723,7 @@ static int ositp_decode_DC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu, ositp_decode_var_part(tvb, offset, li, 4, tpdu_len, pinfo, cotp_tree); offset += li; - expert_add_info_format_text(pinfo, item, &ei_cotp_disconnect_confirm, "Disconnect Confirm(DC): 0x%x -> 0x%x", src_ref, dst_ref); + expert_add_info_format(pinfo, item, &ei_cotp_disconnect_confirm, "Disconnect Confirm(DC): 0x%x -> 0x%x", src_ref, dst_ref); return offset; diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c index f88299bc48..693904c836 100644 --- a/epan/dissectors/packet-p_mul.c +++ b/epan/dissectors/packet-p_mul.c @@ -652,7 +652,7 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m tvb, 0, 0, ack_data->ack_resend_count); PROTO_ITEM_SET_GENERATED (en); - expert_add_info_format_text(pinfo, en, &ei_analysis_ack_dup_no, "Dup ACK #%d", ack_data->ack_resend_count); + expert_add_info_format(pinfo, en, &ei_analysis_ack_dup_no, "Dup ACK #%d", ack_data->ack_resend_count); en = proto_tree_add_uint (analysis_tree, hf_analysis_ack_resend_from, tvb, 0, 0, ack_data->ack_id); @@ -743,7 +743,7 @@ static p_mul_seq_val *add_seq_analysis (tvbuff_t *tvb, packet_info *pinfo, tvb, 0, 0, pkg_data->pdu_id); PROTO_ITEM_SET_GENERATED (en); - expert_add_info_format_text(pinfo, en, &ei_analysis_retrans_no, "Retransmission #%d", pkg_data->msg_resend_count); + expert_add_info_format(pinfo, en, &ei_analysis_retrans_no, "Retransmission #%d", pkg_data->msg_resend_count); nstime_delta (&ns, &pinfo->fd->abs_ts, &pkg_data->prev_msg_time); en = proto_tree_add_time (analysis_tree, hf_analysis_retrans_time, @@ -1194,7 +1194,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) en = proto_tree_add_uint (p_mul_tree, hf_tot_miss_seq_no, tvb, 0, 0, tot_no_missing); PROTO_ITEM_SET_GENERATED (en); - expert_add_info_format_text(pinfo, en, &ei_tot_miss_seq_no, "Missing seq numbers: %d", tot_no_missing); + expert_add_info_format(pinfo, en, &ei_tot_miss_seq_no, "Missing seq numbers: %d", tot_no_missing); } break; diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c index 1504eeeb0a..92fb2048bf 100644 --- a/epan/dissectors/packet-pcep.c +++ b/epan/dissectors/packet-pcep.c @@ -831,7 +831,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * pcep_subobj_ipv4 = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 8) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad IPv4 subobject: length %u != 8", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad IPv4 subobject: length %u != 8", length); return; } @@ -880,7 +880,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * break; default: - expert_add_info_format_text(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); + expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); break; } } @@ -897,7 +897,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * pcep_subobj_ipv6 = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 20) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad IPv6 subobject: length %u != 20", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad IPv6 subobject: length %u != 20", length); return; } @@ -945,7 +945,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * break; default: - expert_add_info_format_text(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); + expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); break; } } @@ -962,7 +962,7 @@ dissect_subobj_label_control(proto_tree *pcep_subobj_tree, packet_info *pinfo, pcep_subobj_label_control = proto_item_add_subtree(ti, ett_pcep_obj); if (length < 5) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad label control subobject: length %u < 5", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad label control subobject: length %u < 5", length); return; } @@ -991,7 +991,7 @@ dissect_subobj_label_control(proto_tree *pcep_subobj_tree, packet_info *pinfo, break; default: - expert_add_info_format_text(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); + expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); break; } } @@ -1010,7 +1010,7 @@ dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pin pcep_subobj_unnumb_interfaceID = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 12) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad unnumbered interface ID subobject: length %u != 12", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad unnumbered interface ID subobject: length %u != 12", length); return; } @@ -1056,7 +1056,7 @@ dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pin break; default: - expert_add_info_format_text(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); + expert_add_info_format(pinfo, ti, &ei_pcep_non_defined_subobject, "Non defined subobject for this object"); break; } @@ -1074,7 +1074,7 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, packet_info *pin ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM, tvb, offset, length, ENC_NA); pcep_subobj_autonomous_sys_num = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 8) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad autonomous system number subobject: length %u != 8", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad autonomous system number subobject: length %u != 8", length); return; } @@ -1091,7 +1091,7 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, packet_info *pin pcep_subobj_autonomous_sys_num = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 4) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad autonomous system number subobject: length %u != 4", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad autonomous system number subobject: length %u != 4", length); return; } @@ -1115,7 +1115,7 @@ dissect_subobj_srlg(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * pcep_subobj_srlg = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 8) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad SRLG subobject: length %u != 8", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad SRLG subobject: length %u != 8", length); return; } @@ -1142,7 +1142,7 @@ dissect_subobj_exrs(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * pcep_subobj_exrs = proto_item_add_subtree(ti, ett_pcep_obj); if (length < 4) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad EXRS subobject: length %u < 4", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad EXRS subobject: length %u < 4", length); return; } @@ -1160,7 +1160,7 @@ dissect_subobj_exrs(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t * length2 = tvb_get_guint8(tvb, offset+1); if (length2 < 2) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad packet: subobject length %u < 2", length2); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad packet: subobject length %u < 2", length2); break; } @@ -1206,7 +1206,7 @@ dissect_subobj_pksv4(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t pcep_subobj_pksv4 = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 8) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad path key subobject: length %u != 8", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad path key subobject: length %u != 8", length); return; } @@ -1230,7 +1230,7 @@ dissect_subobj_pksv6(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t pcep_subobj_pksv6 = proto_item_add_subtree(ti, ett_pcep_obj); if (length != 20) { - expert_add_info_format_text(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad path key subobject: length %u != 20", length); + expert_add_info_format(pinfo, ti, &ei_pcep_subobject_bad_length, "Bad path key subobject: length %u != 20", length); return; } @@ -1451,7 +1451,7 @@ dissect_pcep_explicit_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo while(body_obj_len){ if (body_obj_len < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad ERO object: subobject goes past end of object"); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad ERO object: subobject goes past end of object"); break; } @@ -1459,7 +1459,7 @@ dissect_pcep_explicit_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo length = tvb_get_guint8(tvb, offset2+1); if (length < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad ERO object: subobject length %u < 2", length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad ERO object: subobject length %u < 2", length); break; } @@ -1512,7 +1512,7 @@ dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo, while(body_obj_len){ if (body_obj_len < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad RRO object: subobject goes past end of object"); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad RRO object: subobject goes past end of object"); break; } @@ -1520,7 +1520,7 @@ dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, packet_info *pinfo, length = tvb_get_guint8(tvb, offset2+1); if (length < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad RRO object: subobject length %u < 2", length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad RRO object: subobject length %u < 2", length); break; } @@ -1602,7 +1602,7 @@ dissect_pcep_iro_obj(proto_tree *pcep_object_tree, packet_info *pinfo, while(body_obj_len){ if (body_obj_len < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad IRO object: subobject goes past end of object"); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad IRO object: subobject goes past end of object"); break; } @@ -1610,7 +1610,7 @@ dissect_pcep_iro_obj(proto_tree *pcep_object_tree, packet_info *pinfo, length = tvb_get_guint8(tvb, offset2+1); if (length < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad IRO object: subobject length %u < 2", length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad IRO object: subobject length %u < 2", length); break; } @@ -1869,7 +1869,7 @@ dissect_pcep_path_key_obj(proto_tree *pcep_object_tree, packet_info *pinfo, while(body_obj_len){ if (body_obj_len < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad PATH-KEY object: subobject goes past end of object"); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad PATH-KEY object: subobject goes past end of object"); break; } @@ -1877,7 +1877,7 @@ dissect_pcep_path_key_obj(proto_tree *pcep_object_tree, packet_info *pinfo, length = tvb_get_guint8(tvb, offset2+1); if (length < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad PATH-KEY object: subobject length %u < 2", length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad PATH-KEY object: subobject length %u < 2", length); break; } @@ -1933,7 +1933,7 @@ dissect_pcep_xro_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t while(body_obj_len >= 2){ if (body_obj_len < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad XRO object: subobject goes past end of object"); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad XRO object: subobject goes past end of object"); break; } @@ -1941,7 +1941,7 @@ dissect_pcep_xro_obj(proto_tree *pcep_object_tree, packet_info *pinfo, tvbuff_t length = tvb_get_guint8(tvb, offset2+1); if (length < 2) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad XRO object: object length %u < 2", length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_subobject_bad_length, "Bad XRO object: object length %u < 2", length); break; } @@ -2307,7 +2307,7 @@ dissect_pcep_obj_tree(proto_tree *pcep_tree, packet_info *pinfo, tvbuff_t *tvb, obj_length = tvb_get_ntohs(tvb, offset+2); proto_item_set_len(pcep_object_item, obj_length); if (obj_length < 4) { - expert_add_info_format_text(pinfo, pcep_object_tree, &ei_pcep_object_length, "Object Length: %u (bogus, must be >= 4)", obj_length); + expert_add_info_format(pinfo, pcep_object_tree, &ei_pcep_object_length, "Object Length: %u (bogus, must be >= 4)", obj_length); break; } diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index bb757e69e9..fd109599c8 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -437,7 +437,7 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); if (p->lastSN != p->firstSN) { - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_missing, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_missing, "PDCP SNs (%u to %u) missing for %s on UE %u (%s-%u)", p->firstSN, p->lastSN, val_to_str_const(p_pdcp_lte_info->direction, direction_vals, "Unknown"), @@ -448,7 +448,7 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p, p->firstSN, p->lastSN); } else { - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_missing, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_missing, "PDCP SN (%u) missing for %s on UE %u (%s-%u)", p->firstSN, val_to_str_const(p_pdcp_lte_info->direction, direction_vals, "Unknown"), @@ -467,7 +467,7 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p, ti = proto_tree_add_boolean(seqnum_tree, hf_pdcp_lte_sequence_analysis_repeated, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_repeated, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_sequence_analysis_sn_repeated, "PDCP SN (%u) repeated for %s for UE %u (%s-%u)", p->firstSN, val_to_str_const(p_pdcp_lte_info->direction, direction_vals, "Unknown"), @@ -480,7 +480,7 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p, default: /* Incorrect sequence number */ - expert_add_info_format_text(pinfo, ti_expected_sn, &ei_pdcp_lte_sequence_analysis_wrong_sequence_number, + expert_add_info_format(pinfo, ti_expected_sn, &ei_pdcp_lte_sequence_analysis_wrong_sequence_number, "Wrong Sequence Number for %s on UE %u (%s-%u) - got %u, expected %u", val_to_str_const(p_pdcp_lte_info->direction, direction_vals, "Unknown"), p_pdcp_lte_info->ueid, @@ -1060,7 +1060,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_item *ti = proto_tree_add_item(pdcp_tree, hf_pdcp_lte_control_plane_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, "PDCP signalling header reserved bits not zero"); } @@ -1153,7 +1153,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Complain if not 0 */ if (reserved_value != 0) { - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, "Reserved bits have value 0x%x - should be 0x0", reserved_value); } @@ -1217,7 +1217,7 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Complain if not 0 */ if (reserved_value != 0) { - expert_add_info_format_text(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, + expert_add_info_format(pinfo, ti, &ei_pdcp_lte_reserved_bits_not_zero, "Reserved bits have value 0x%x - should be 0x0", reserved_value); } diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index a593d463ab..9ae7dd5362 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -129,27 +129,27 @@ static const true_false_string tfs_optional_field_bit = { static void per_check_value(guint32 value, guint32 min_len, guint32 max_len, asn1_ctx_t *actx, proto_item *item, gboolean is_signed) { if ((is_signed == FALSE) && (value > max_len)) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %u (%u .. %u)", value, min_len, max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %u (%u .. %u)", value, min_len, max_len); } else if ((is_signed == TRUE) && ((gint32)value > (gint32)max_len)) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %d (%d .. %d)", (gint32)value, (gint32)min_len, (gint32)max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %d (%d .. %d)", (gint32)value, (gint32)min_len, (gint32)max_len); } } static void per_check_value64(guint64 value, guint64 min_len, guint64 max_len, asn1_ctx_t *actx, proto_item *item, gboolean is_signed) { if ((is_signed == FALSE) && (value > max_len)) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %" G_GINT64_MODIFIER "u (%" G_GINT64_MODIFIER "u .. %" G_GINT64_MODIFIER "u)", value, min_len, max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %" G_GINT64_MODIFIER "u (%" G_GINT64_MODIFIER "u .. %" G_GINT64_MODIFIER "u)", value, min_len, max_len); } else if ((is_signed == TRUE) && ((gint64)value > (gint64)max_len)) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %" G_GINT64_MODIFIER "d (%" G_GINT64_MODIFIER "d .. %" G_GINT64_MODIFIER "d)", (gint64)value, (gint64)min_len, (gint64)max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_value, "Size constraint: value too big: %" G_GINT64_MODIFIER "d (%" G_GINT64_MODIFIER "d .. %" G_GINT64_MODIFIER "d)", (gint64)value, (gint64)min_len, (gint64)max_len); } } static void per_check_items(guint32 cnt, int min_len, int max_len, asn1_ctx_t *actx, proto_item *item) { if (min_len != NO_BOUND && cnt < (guint32)min_len) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_too_few, "Size constraint: too few items: %d (%d .. %d)", cnt, min_len, max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_too_few, "Size constraint: too few items: %d (%d .. %d)", cnt, min_len, max_len); } else if (max_len != NO_BOUND && cnt > (guint32)max_len) { - expert_add_info_format_text(actx->pinfo, item, &ei_per_size_constraint_too_many, "Size constraint: too many items: %d (%d .. %d)", cnt, min_len, max_len); + expert_add_info_format(actx->pinfo, item, &ei_per_size_constraint_too_many, "Size constraint: too many items: %d (%d .. %d)", cnt, min_len, max_len); } } diff --git a/epan/dissectors/packet-pflog.c b/epan/dissectors/packet-pflog.c index 0b351531c7..108de3953c 100644 --- a/epan/dissectors/packet-pflog.c +++ b/epan/dissectors/packet-pflog.c @@ -178,7 +178,7 @@ dissect_pflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti_len = proto_tree_add_item(pflog_tree, hf_pflog_length, tvb, offset, 1, ENC_BIG_ENDIAN); if(length < LEN_PFLOG_BSD34) { - expert_add_info_format_text(pinfo, ti_len, &ei_pflog_invalid_header_length, "Invalid header length %u", length); + expert_add_info_format(pinfo, ti_len, &ei_pflog_invalid_header_length, "Invalid header length %u", length); } offset += 1; diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c index 5e7e213df9..83301e5474 100644 --- a/epan/dissectors/packet-pppoe.c +++ b/epan/dissectors/packet-pppoe.c @@ -308,7 +308,7 @@ static const value_string datarate_scale_vals[] = { #define CASE_VSPEC_DSLF_TAG_UINT(tag_name, relation, length, hf_var) case tag_name: \ if (!(poe_tag_length relation length)) { \ - expert_add_info_format_text(pinfo, pppoe_tree, &ei_pppoe_tag_length, \ + expert_add_info_format(pinfo, pppoe_tree, &ei_pppoe_tag_length, \ "%s: Wrong length: %u (expected %s %d)", \ val_to_str_const(poe_tag, vspec_tag_vals, "Unknown"), poe_tag_length, #relation, length); \ } else { \ @@ -319,7 +319,7 @@ static const value_string datarate_scale_vals[] = { #define CASE_VSPEC_DSLF_TAG_STRING(tag_name, relation, length, hf_var) case tag_name: \ if (!(poe_tag_length relation length)) { \ - expert_add_info_format_text(pinfo, pppoe_tree, &ei_pppoe_tag_length, \ + expert_add_info_format(pinfo, pppoe_tree, &ei_pppoe_tag_length, \ "%s: Wrong length: %u (expected %s %d)", \ val_to_str_const(poe_tag, vspec_tag_vals, "Unknown"), poe_tag_length, #relation, length); \ } else { \ @@ -400,7 +400,7 @@ dissect_pppoe_subtags_dslf(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, pr ti = proto_tree_add_item(pppoe_tree, hf_pppoed_tag_vspec_access_loop_encapsulation, tvb, tagstart+2, 3, ENC_NA); if (poe_tag_length != 3) { - expert_add_info_format_text(pinfo, ti, &ei_pppoe_tag_length, "%s: Wrong length: %u (expected 3)", val_to_str_const(poe_tag, vspec_tag_vals, "Unknown"), poe_tag_length); + expert_add_info_format(pinfo, ti, &ei_pppoe_tag_length, "%s: Wrong length: %u (expected 3)", val_to_str_const(poe_tag, vspec_tag_vals, "Unknown"), poe_tag_length); } encaps_tree = proto_item_add_subtree(ti, ett_pppoed_tag_vspec_dslf_access_loop_encaps); proto_tree_add_item(encaps_tree, hf_pppoed_tag_vspec_access_loop_encap_data_link, @@ -605,7 +605,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr proto_registrar_get_name(hf_pppoed_tag_seq_num), poe_tag_length); } - expert_add_info_format_text(pinfo, item, &ei_pppoe_tag_length, "Sequence Number tag: Wrong length: %u (expected 2)", poe_tag_length); + expert_add_info_format(pinfo, item, &ei_pppoe_tag_length, "Sequence Number tag: Wrong length: %u (expected 2)", poe_tag_length); } break; case PPPOE_TAG_CRED_SCALE: @@ -622,7 +622,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr proto_registrar_get_name(hf_pppoed_tag_cred_scale), poe_tag_length); } - expert_add_info_format_text(pinfo, item, &ei_pppoe_tag_length, "Credit Scale Factor tag: Wrong length: %u (expected 2)", poe_tag_length); + expert_add_info_format(pinfo, item, &ei_pppoe_tag_length, "Credit Scale Factor tag: Wrong length: %u (expected 2)", poe_tag_length); } break; case PPPOE_TAG_RELAY_ID: @@ -1169,7 +1169,7 @@ static void dissect_pppoes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ((reported_payload_length + 4) != actual_payload_length)) { proto_item_append_text(ti, " [incorrect, should be %u]", actual_payload_length); - expert_add_info_format_text(pinfo, ti, &ei_pppoe_payload_length, "Possible bad payload length %u != %u", reported_payload_length, actual_payload_length); + expert_add_info_format(pinfo, ti, &ei_pppoe_payload_length, "Possible bad payload length %u != %u", reported_payload_length, actual_payload_length); } } diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c index 4bc4b2c45d..e62bfdf0b6 100644 --- a/epan/dissectors/packet-pw-atm.c +++ b/epan/dissectors/packet-pw-atm.c @@ -483,7 +483,7 @@ too_small_packet_or_notpw(tvbuff_t * tvb { proto_item * item; item = proto_tree_add_item(tree, proto_handler, tvb, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_pw_packet_size_too_small, + expert_add_info_format(pinfo, item, &ei_pw_packet_size_too_small, "PW packet size (%d) is too small to carry sensible information" ,(int)packet_size); /* represent problems in the Packet List pane */ @@ -645,12 +645,12 @@ dissect_11_or_aal5_pdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } if (pd.props & PWC_PAY_SIZE_BAD) { - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "PW payload size (%d) must be <> 0 and multiple of %d", (int)payload_size, pw_cell_size(pd.mode, pd.submode)); if ((payload_size != 0) && MODE_11(pd.mode)) { - expert_add_info_format_text(pinfo, item, &ei_cell_broken, + expert_add_info_format(pinfo, item, &ei_cell_broken, "PW ATM cell [%.3d] is broken", (int)cells); } } @@ -860,7 +860,7 @@ dissect_aal5_sdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (pd.props & PWC_PAY_SIZE_BAD) { DISSECTOR_ASSERT(PWATM_SUBMODE_ADMIN_CELL == pd.submode); - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "In ATM admin cell mode," " PW payload size (%d) must be == %d (exactly 1 admin cell)", (int)payload_size, (int)SIZEOF_N1_PW_CELL); @@ -1039,15 +1039,15 @@ dissect_n1_cw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { if (payload_size != 0) { - expert_add_info_format_text(pinfo, item, &ei_cell_broken, + expert_add_info_format(pinfo, item, &ei_cell_broken, "PW ATM cell [%.3d] is broken", (int)cells); - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_note, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_note, "PW payload size (%d) must be <>0 and multiple of %d", (int)payload_size, (int)SIZEOF_N1_PW_CELL); } else { - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "PW payload size (%d) must be <>0 and multiple of %d", (int)payload_size, (int)SIZEOF_N1_PW_CELL); } @@ -1120,15 +1120,15 @@ dissect_n1_nocw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { if (payload_size != 0) { - expert_add_info_format_text(pinfo, item, &ei_cell_broken, + expert_add_info_format(pinfo, item, &ei_cell_broken, "Last PW ATM cell [%.3d] is broken", (int)cells); - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_note, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_note, "PW payload size (%d) must be <>0 and multiple of %d", (int)payload_size, (int)SIZEOF_N1_PW_CELL); } else { - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "PW payload size (%d) must be <>0 and multiple of %d", (int)payload_size, (int)SIZEOF_N1_PW_CELL); } @@ -1188,7 +1188,7 @@ dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { proto_item *item; item = proto_tree_add_item(tree, proto_control_word, tvb, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "Packet (size: %d) is too small to carry MPLS PW Control Word" ,(int)size); return; @@ -1295,24 +1295,24 @@ dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) } if (pd->props & PWC_CW_BAD_LEN_MUST_BE_0) { - expert_add_info_format_text(pinfo, item, &ei_pref_cw_len, + expert_add_info_format(pinfo, item, &ei_pref_cw_len, "Bad Length: must be 0 for this encapsulation"); } if (pd->props & PWC_CW_BAD_PAYLEN_LE_0) { - expert_add_info_format_text(pinfo, item, &ei_pref_cw_len, + expert_add_info_format(pinfo, item, &ei_pref_cw_len, "Bad Length: too small, must be >= %d", (int)(PWC_SIZEOF_CW+SIZEOF_N1_PW_CELL)); } if (pd->props & PWC_CW_BAD_PAYLEN_GT_PACKET) { - expert_add_info_format_text(pinfo, item, &ei_pref_cw_len, + expert_add_info_format(pinfo, item, &ei_pref_cw_len, "Bad Length: must be <= than PSN packet size (%d)", (int)pd->packet_size); } if (pd->props & PWC_CW_BAD_PADDING_NE_0) { - expert_add_info_format_text(pinfo, item, &ei_pref_cw_len, + expert_add_info_format(pinfo, item, &ei_pref_cw_len, "Bad Length: must be == PSN packet size (%d), no padding allowed", (int)pd->packet_size); } @@ -1509,13 +1509,13 @@ dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void item2 = proto_tree_add_item(tree2, hf_cell_h_pti, tvb, 3, 1, ENC_BIG_ENDIAN); if (NULL == try_val_to_str(pd->pti, atm_pt_vals)) { - expert_add_info_format_text(pinfo, item2, &ei_cell_h_pti_undecoded, + expert_add_info_format(pinfo, item2, &ei_cell_h_pti_undecoded, "Unknown value of PTI field (%d) in the ATM cell header", pd->pti); } else if ((pd->mode == PWATM_MODE_AAL5_SDU) && !PTI_IS_ADMIN(pd->pti)) { - expert_add_info_format_text(pinfo, item2, &ei_cell_h_pti_malformed, + expert_add_info_format(pinfo, item2, &ei_cell_h_pti_malformed, "ATM admin cell is transerred;" " PTI field (%d) should be 4, 5 or 6.", pd->pti); @@ -1538,13 +1538,13 @@ dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void } if ((0 != pd->cwb3.v) && (PWATM_MODE_11_VCC == pd->mode)) { - expert_add_info_format_text(pinfo, item2, &ei_cell_h_v_not_one, + expert_add_info_format(pinfo, item2, &ei_cell_h_v_not_one, "1:1 VCC mode:" " V bit must be 0 to indicate that VCI is absent"); } if ((0 != pd->cwb3.v) && (PWATM_MODE_AAL5_PDU == pd->mode)) { - expert_add_info_format_text(pinfo, item2, &ei_cell_h_v_not_one, + expert_add_info_format(pinfo, item2, &ei_cell_h_v_not_one, "AAL5 PDU mode:" " V bit must be 0 to indicate that VCI is absent"); } @@ -1568,7 +1568,7 @@ dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void item2 = proto_tree_add_item(tree2, hf_cell_h_pti, tvb, 0, 1, ENC_BIG_ENDIAN); if (NULL == try_val_to_str(pd->pti, atm_pt_vals)) { - expert_add_info_format_text(pinfo, item2, &ei_cell_h_pti_undecoded, + expert_add_info_format(pinfo, item2, &ei_cell_h_pti_undecoded, "Unknown value of PTI field (%d) in the atm-specific byte" ,pd->pti); } @@ -1594,7 +1594,7 @@ dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void } else { - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "Not enough data (size: %d), impossible to decode", (int)dissect_size); } @@ -1644,7 +1644,7 @@ dissect_cell(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data pwc_item_append_text_n_items(item, dissect_size, "byte"); if (!is_enough_data) { - expert_add_info_format_text(pinfo, item, &ei_pw_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_pw_payload_size_invalid_error, "Bad length of cell payload: must be == %d", (int)SIZEOF_ATM_CELL_PAYLOAD); } diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c index e63b762f81..442c850fbd 100644 --- a/epan/dissectors/packet-pw-cesopsn.c +++ b/epan/dissectors/packet-pw-cesopsn.c @@ -107,7 +107,7 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original { proto_item *item; item = proto_tree_add_item(tree, proto, tvb_original, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_packet_size_too_small, + expert_add_info_format(pinfo, item, &ei_packet_size_too_small, "PW packet size (%d) is too small to carry sensible information" ,(int)packet_size); col_set_str(pinfo->cinfo, COL_PROTOCOL, shortname); @@ -293,19 +293,19 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original item3 = proto_tree_add_item(tree3, hf_cw_len, tvb, 1, 1, ENC_BIG_ENDIAN); if (properties & PWC_CW_BAD_PAYLEN_LT_0) { - expert_add_info_format_text(pinfo, item3, &ei_pref_cw_len, + expert_add_info_format(pinfo, item3, &ei_pref_cw_len, "Bad Length: too small, must be > %d", (int)encaps_size); } if (properties & PWC_CW_BAD_PAYLEN_GT_PACKET) { - expert_add_info_format_text(pinfo, item3, &ei_pref_cw_len, + expert_add_info_format(pinfo, item3, &ei_pref_cw_len, "Bad Length: must be <= than PSN packet size (%d)", (int)packet_size); } if (properties & PWC_CW_BAD_LEN_MUST_BE_0) { - expert_add_info_format_text(pinfo, item3, &ei_pref_cw_len, + expert_add_info_format(pinfo, item3, &ei_pref_cw_len, "Bad Length: must be 0 if CESoPSN packet size (%d) is > 64", (int)packet_size); } @@ -322,12 +322,12 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original { if (properties & PWC_PAY_SIZE_BAD) { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid_error, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid_error, "CESoPSN payload: none found. Size of payload must be <> 0"); } else { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid_undecoded, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid_undecoded, "CESoPSN payload: omitted to conserve bandwidth"); } } @@ -343,7 +343,7 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original pwc_item_append_text_n_items(item2,(int)payload_size,"octet"); if (properties & PWC_PAY_SIZE_BAD) { - expert_add_info_format_text(pinfo, item2, &ei_payload_size_invalid_error, + expert_add_info_format(pinfo, item2, &ei_payload_size_invalid_error, "CESoPSN packet payload size must be multiple of 8"); } tree2 = proto_item_add_subtree(item2, ett); diff --git a/epan/dissectors/packet-pw-fr.c b/epan/dissectors/packet-pw-fr.c index 3c223dc6ba..84f8a2a6c7 100644 --- a/epan/dissectors/packet-pw-fr.c +++ b/epan/dissectors/packet-pw-fr.c @@ -91,7 +91,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) { proto_item *item; item = proto_tree_add_item(tree, proto_encaps, tvb, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_cw_packet_size_too_small, + expert_add_info_format(pinfo, item, &ei_cw_packet_size_too_small, "PW packet (%d) is smaller than PW encapsulation header (%d)", (int)packet_size,(int)encaps_size); } @@ -203,19 +203,19 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) item = proto_tree_add_item( subtree, hf_cw_len, tvb, 1, 1, ENC_BIG_ENDIAN ); if (packet_quality & PQ_CW_BAD_LEN_GT_PACKET) { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid, "Bad Length: greater than FR payload size (%d)", (int)payload_size); } if (packet_quality & PQ_CW_BAD_LEN_MUST_BE_NONZERO) { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid, "Bad Length: must be non-zero if FR PW packet size (%d) is < 64", (int)(payload_size+encaps_size)); } if (packet_quality & PQ_CW_BAD_LEN_MUST_BE_ZERO) { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid, "Bad Length: must be 0 if FR PW packet size (%d) is >= 64", (int)(payload_size+encaps_size)); } @@ -231,7 +231,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) if (packet_quality & PQ_PAYLOAD_SIZE_ZERO) { - expert_add_info_format_text(pinfo, item_headline, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item_headline, &ei_payload_size_invalid, "FR payload size must be non-zero"); } diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c index 5c363fd83c..22509e4d06 100644 --- a/epan/dissectors/packet-pw-satop.c +++ b/epan/dissectors/packet-pw-satop.c @@ -99,7 +99,7 @@ void dissect_pw_satop(tvbuff_t * tvb_original { proto_item *item; item = proto_tree_add_item(tree, proto, tvb_original, 0, -1, ENC_NA); - expert_add_info_format_text(pinfo, item, &ei_cw_packet_size_too_small, + expert_add_info_format(pinfo, item, &ei_cw_packet_size_too_small, "PW packet size (%d) is too small to carry sensible information" ,(int)packet_size); col_set_str(pinfo->cinfo, COL_PROTOCOL, shortname); @@ -291,19 +291,19 @@ void dissect_pw_satop(tvbuff_t * tvb_original item3 = proto_tree_add_item(tree3, hf_cw_len, tvb, 1, 1, ENC_BIG_ENDIAN); if (properties & PWC_CW_BAD_PAYLEN_LT_0) { - expert_add_info_format_text(pinfo, item3, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item3, &ei_payload_size_invalid, "Bad Length: too small, must be > %d", (int)encaps_size); } if (properties & PWC_CW_BAD_PAYLEN_GT_PACKET) { - expert_add_info_format_text(pinfo, item3, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item3, &ei_payload_size_invalid, "Bad Length: must be <= than PSN packet size (%d)", (int)packet_size); } if (properties & PWC_CW_BAD_LEN_MUST_BE_0) { - expert_add_info_format_text(pinfo, item3, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item3, &ei_payload_size_invalid, "Bad Length: must be 0 if SAToP packet size (%d) is > 64", (int)packet_size); } @@ -317,7 +317,7 @@ void dissect_pw_satop(tvbuff_t * tvb_original /* payload */ if (properties & PWC_PAY_SIZE_BAD) { - expert_add_info_format_text(pinfo, item, &ei_payload_size_invalid, + expert_add_info_format(pinfo, item, &ei_payload_size_invalid, "SAToP payload: none found. Size of payload must be <> 0"); } else if (payload_size == 0) diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index f8793ced61..6042e1c1c7 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -312,7 +312,7 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset actx->pinfo->private_data = actx->rose_ctx; call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); if (!arg_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } return offset; @@ -406,7 +406,7 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int actx->pinfo->private_data = actx->rose_ctx; call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); if (!res_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } } @@ -485,7 +485,7 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o actx->pinfo->private_data = actx->rose_ctx; call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); if (!err_handle) { - expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); + expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } return offset; diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c index c1e9bdfbfd..e07070f77e 100644 --- a/epan/dissectors/packet-reload.c +++ b/epan/dissectors/packet-reload.c @@ -1189,7 +1189,7 @@ static int dissect_resourceid(int anchor, tvbuff_t *tvb, packet_info *pinfo, pro /* We don't know the node ID. Just assume that all the data is part of it */ if (length < local_length+1) { ti_local = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ResourceId"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ResourceId"); return length; } @@ -1220,7 +1220,7 @@ static int dissect_nodeid(int anchor, tvbuff_t *tvb, packet_info *pinfo, proto_t /* We don't know the node ID. Just assume that all the data is part of it */ if (length < reload_nodeid_length) { ti_nodeid = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_nodeid, &ei_reload_truncated_field, "Truncated NodeId"); + expert_add_info_format(pinfo, ti_nodeid, &ei_reload_truncated_field, "Truncated NodeId"); return length; } @@ -1295,7 +1295,7 @@ dissect_destination(int anchor, tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_item(destination_tree, hf_reload_destination_type, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_uint(destination_tree, hf_reload_length_uint8, tvb, offset+1, 1, destination_length); if (2 + destination_length > length) { - expert_add_info_format_text(pinfo, ti_destination, &ei_reload_truncated_field, "Truncated Destination"); + expert_add_info_format(pinfo, ti_destination, &ei_reload_truncated_field, "Truncated Destination"); return length; } switch(destination_type) { @@ -1348,7 +1348,7 @@ dissect_probe_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g if (probe_length + 2 > length) { ti_probe_information = proto_tree_add_item(tree, hf_reload_probe_information, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_probe_information, &ei_reload_truncated_field, "Truncated probe information"); + expert_add_info_format(pinfo, ti_probe_information, &ei_reload_truncated_field, "Truncated probe information"); return length; } ti_probe_information = proto_tree_add_item(tree, hf_reload_probe_information, tvb, offset, 2 + probe_length, ENC_NA); @@ -1367,21 +1367,21 @@ dissect_probe_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g switch(type) { case PROBEINFORMATIONTYPE_RESPONSIBLESET: if (probe_length < 4) { - expert_add_info_format_text(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated responsible set"); + expert_add_info_format(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated responsible set"); return 2 + probe_length; } proto_tree_add_item(probe_information_data_tree, hf_reload_responsible_set, tvb, offset + 2, 4, ENC_BIG_ENDIAN); break; case PROBEINFORMATIONTYPE_NUMRESOURCES: if (probe_length < 4) { - expert_add_info_format_text(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated num resource info"); + expert_add_info_format(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated num resource info"); return 2 + probe_length; } proto_tree_add_item(probe_information_data_tree, hf_reload_num_resources, tvb, offset + 2, 4, ENC_BIG_ENDIAN); break; case PROBEINFORMATIONTYPE_UPTIME: if (probe_length < 4) { - expert_add_info_format_text(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated uptime info"); + expert_add_info_format(pinfo, ti_probe_information_data, &ei_reload_truncated_field, "Truncated uptime info"); return 2 + probe_length; } proto_tree_add_item(probe_information_data_tree, hf_reload_uptime, tvb, offset + 2, 4, ENC_BIG_ENDIAN); @@ -1471,7 +1471,7 @@ dissect_icecandidates(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint /* Precalculate the length of the icecandidate list */ if (2+icecandidates_length > length) { ti_icecandidates = proto_tree_add_item(tree, hf_reload_icecandidates, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_icecandidates, &ei_reload_truncated_field, "Truncated ice candidates"); + expert_add_info_format(pinfo, ti_icecandidates, &ei_reload_truncated_field, "Truncated ice candidates"); return length; } @@ -1518,7 +1518,7 @@ dissect_icecandidates(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint /* icecandidate_offset is now equal to the length of this icecandicate */ if (icecandidates_offset + icecandidate_offset > icecandidates_length) { - expert_add_info_format_text(pinfo, ti_icecandidates, &ei_reload_truncated_field, "Truncated IceCandidate"); + expert_add_info_format(pinfo, ti_icecandidates, &ei_reload_truncated_field, "Truncated IceCandidate"); break; } ti_icecandidate = proto_tree_add_item(icecandidates_tree, hf_reload_icecandidate, tvb, offset+local_offset+ icecandidates_offset, icecandidate_offset, ENC_NA); @@ -1590,7 +1590,7 @@ dissect_icecandidates(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint iceextension_value_length = tvb_get_ntohs(tvb, offset+local_offset+icecandidates_offset+icecandidate_offset+iceextensions_offset+iceextension_name_length + 2); if ((iceextensions_offset + 4 + iceextension_name_length + iceextension_value_length) > iceextensions_length) { - expert_add_info_format_text(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated extensions"); + expert_add_info_format(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated extensions"); break; } ti_iceextension = @@ -1632,7 +1632,7 @@ dissect_attachreqans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint1 local_offset += 1; if (local_offset + ufrag_length > length) { ti_attachreqans = proto_tree_add_item(tree, hf_reload_attachreqans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); + expert_add_info_format(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); return length; } local_offset += ufrag_length; @@ -1640,7 +1640,7 @@ dissect_attachreqans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint1 local_offset += 1; if (local_offset + password_length > length) { ti_attachreqans = proto_tree_add_item(tree, hf_reload_attachreqans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); + expert_add_info_format(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); return length; } local_offset += password_length; @@ -1648,7 +1648,7 @@ dissect_attachreqans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint1 local_offset += 1; if (local_offset + role_length > length) { ti_attachreqans = proto_tree_add_item(tree, hf_reload_attachreqans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); + expert_add_info_format(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); return length; } local_offset += role_length; @@ -1656,7 +1656,7 @@ dissect_attachreqans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint1 local_offset += 2; if (local_offset +icecandidates_length > length) { ti_attachreqans = proto_tree_add_item(tree, hf_reload_attachreqans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); + expert_add_info_format(pinfo, ti_attachreqans, &ei_reload_truncated_field, "Truncated attach_reqans"); return length; } local_offset += icecandidates_length; @@ -1777,7 +1777,7 @@ static int dissect_redirserviceprovider(tvbuff_t *tvb, packet_info *pinfo, proto if (2+length_field>length) { ti_local = proto_tree_add_item(tree, hf_reload_redirserviceprovider, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated RedirServiceProvider"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated RedirServiceProvider"); return length; } @@ -1806,7 +1806,7 @@ static int dissect_datavalue(int anchor, tvbuff_t *tvb, packet_info *pinfo, prot if (1+4+value_length > length) { ti_datavalue = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_datavalue, &ei_reload_truncated_field, "Truncated DataValue"); + expert_add_info_format(pinfo, ti_datavalue, &ei_reload_truncated_field, "Truncated DataValue"); return length; } @@ -1886,7 +1886,7 @@ static int dissect_datavalue(int anchor, tvbuff_t *tvb, packet_info *pinfo, prot if (1+4+1+1+hash_length > length) { ti_datavalue = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_datavalue, &ei_reload_truncated_field, "Truncated MetaData"); + expert_add_info_format(pinfo, ti_datavalue, &ei_reload_truncated_field, "Truncated MetaData"); return length; } @@ -1930,7 +1930,7 @@ static int dissect_arrayentry(int anchor, tvbuff_t *tvb, packet_info *pinfo, pro if (4+data_length > length) { ti_arrayentry = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_arrayentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); + expert_add_info_format(pinfo, ti_arrayentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); return length; } @@ -1962,7 +1962,7 @@ static int dissect_dictionaryentry(int anchor, tvbuff_t *tvb, packet_info *pinfo if (length < 2) { ti_dictionaryentry = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_dictionaryentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); + expert_add_info_format(pinfo, ti_dictionaryentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); return length; } key_length = get_opaque_length(tvb,offset,2); @@ -1970,7 +1970,7 @@ static int dissect_dictionaryentry(int anchor, tvbuff_t *tvb, packet_info *pinfo if (length < (key_length +2)) { ti_dictionaryentry = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_dictionaryentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); + expert_add_info_format(pinfo, ti_dictionaryentry, &ei_reload_truncated_field, "Truncated ArrayEntry"); return length; } @@ -2088,7 +2088,7 @@ dissect_signature(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 o certificate_hash_length = tvb_get_guint8(tvb, offset + local_offset + 1); if (1 + 1 + certificate_hash_length > signeridentityvalue_length) { - expert_add_info_format_text(pinfo, ti_signeridentity, &ei_reload_truncated_field, "Truncated signature identity value"); + expert_add_info_format(pinfo, ti_signeridentity, &ei_reload_truncated_field, "Truncated signature identity value"); } else { ti_signeridentityvalue= proto_tree_add_item(signeridentity_identity_tree, @@ -2138,7 +2138,7 @@ dissect_storeddata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 if (storeddata_length + 4 > length) { ti_storeddata = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_storeddata, &ei_reload_truncated_field, "Truncated StoredData"); + expert_add_info_format(pinfo, ti_storeddata, &ei_reload_truncated_field, "Truncated StoredData"); return length; } @@ -2231,7 +2231,7 @@ dissect_kinddata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 of values_length = tvb_get_ntohl(tvb, offset + 4 + 8); if (12 + values_length > length) { ti_kinddata = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_kinddata, &ei_reload_truncated_field, "Truncated kind data"); + expert_add_info_format(pinfo, ti_kinddata, &ei_reload_truncated_field, "Truncated kind data"); return length; } ti_kinddata = proto_tree_add_item(tree, hf, tvb, offset, 16+values_length, ENC_NA); @@ -2287,7 +2287,7 @@ static int dissect_nodeid_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (list_length+length_size>length) { ti_local = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated NodeId list"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated NodeId list"); } ti_local = proto_tree_add_item(tree, hf, tvb, offset, list_length+length_size, ENC_NA); proto_item_append_text(ti_local, " (NodeId<%d>)", list_length); @@ -2323,7 +2323,7 @@ dissect_storekindresponse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g if (length < local_length) { ti_local = proto_tree_add_item(tree, hf_reload_storekindresponse, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated StoreKindResponse"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated StoreKindResponse"); return length; } ti_local = proto_tree_add_item(tree, hf_reload_storekindresponse, tvb, offset, 4+8+2+replicas_length, ENC_NA); @@ -2380,14 +2380,14 @@ dissect_storereq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 of local_offset += get_opaque_length(tvb, offset, 1) + 1; /* resource id length */ if (local_offset > length) { ti_storereq = proto_tree_add_item(tree, hf_reload_storereq, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: resource too long"); + expert_add_info_format(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: resource too long"); return length; } local_offset += 1; /* replica_num */ if (local_offset > length) { ti_storereq = proto_tree_add_item(tree, hf_reload_storereq, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: no room for replica_number"); + expert_add_info_format(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: no room for replica_number"); return length; } @@ -2395,7 +2395,7 @@ dissect_storereq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 of local_offset += 4; if (local_offset + kind_data_length > length) { ti_storereq = proto_tree_add_item(tree, hf_reload_storereq, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: kind_data too long"); + expert_add_info_format(pinfo, ti_storereq, &ei_reload_truncated_field, "Truncated StoreReq: kind_data too long"); return length; } local_offset += kind_data_length; @@ -2470,7 +2470,7 @@ dissect_storeddataspecifier(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, length_field = tvb_get_ntohs(tvb, offset+4+8); if ((length_field + 4 + 8 + 2) > length) { ti_storeddataspecifier = proto_tree_add_item(tree, hf_reload_storeddataspecifier, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_storeddataspecifier, &ei_reload_truncated_field, "Truncated StoredDataSpecifier"); + expert_add_info_format(pinfo, ti_storeddataspecifier, &ei_reload_truncated_field, "Truncated StoredDataSpecifier"); return length; } @@ -2559,7 +2559,7 @@ dissect_fetchreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 of if (1+ resourceid_length+ 2 + specifiers_length > length) { ti_fetchreq = proto_tree_add_item(tree, hf, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_fetchreq, &ei_reload_truncated_field, "Truncated FetchReq"); + expert_add_info_format(pinfo, ti_fetchreq, &ei_reload_truncated_field, "Truncated FetchReq"); return length; } local_length = 1+ resourceid_length+ 2 + specifiers_length; @@ -2601,7 +2601,7 @@ dissect_fetchans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 of kind_responses_length = tvb_get_ntohl(tvb, offset); if (4 + kind_responses_length > length) { ti_fetchans = proto_tree_add_item(tree, hf_reload_fetchans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_fetchans, &ei_reload_truncated_field, "Truncated FetchAns"); + expert_add_info_format(pinfo, ti_fetchans, &ei_reload_truncated_field, "Truncated FetchAns"); return length; } ti_fetchans = proto_tree_add_item(tree, hf_reload_fetchans, tvb, offset, 4 + kind_responses_length, ENC_NA); @@ -2635,7 +2635,7 @@ dissect_statans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 off if (4 + kind_responses_length > length) { ti_statans = proto_tree_add_item(tree, hf_reload_statans, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_statans, &ei_reload_truncated_field, "Truncated StatAns"); + expert_add_info_format(pinfo, ti_statans, &ei_reload_truncated_field, "Truncated StatAns"); return length; } ti_statans = proto_tree_add_item(tree, hf_reload_statans, tvb, offset, 4 + kind_responses_length, ENC_NA); @@ -2752,7 +2752,7 @@ static int dissect_kindid_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if ((guint16)length)", results_length); if (results_length + 2 > length) { - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated FindAns"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated FindAns"); } proto_tree_add_uint(local_tree, hf_reload_length_uint16, tvb, offset, 2, results_length); @@ -2811,7 +2811,7 @@ static int dissect_findans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, findkinddata_length = 4/*kind id */ + 1 + get_opaque_length(tvb,offset + 2 + results_offset + 4, 1)/* resourceId */; if (results_offset + findkinddata_length > results_length) { ti_findkinddata = proto_tree_add_item(local_tree, hf_reload_findkinddata, tvb, offset + results_offset, results_length - results_offset, ENC_NA); - expert_add_info_format_text(pinfo, ti_findkinddata, &ei_reload_truncated_field, "Truncated FindKindData"); + expert_add_info_format(pinfo, ti_findkinddata, &ei_reload_truncated_field, "Truncated FindKindData"); break; } @@ -2866,7 +2866,7 @@ static int dissect_extensiveroutingmodeoption(tvbuff_t *tvb, packet_info *pinfo, int nDestinations = 0; destination_length = tvb_get_guint8(tvb, offset+local_offset); if (destination_length+1+local_offset>length) { - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ExtensiveRoutingModeOption"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ExtensiveRoutingModeOption"); destination_length = length -1-local_offset; } ti_destination = proto_tree_add_item(local_tree, hf_reload_extensiveroutingmode_destination, tvb,offset+local_offset, 1+destination_length, ENC_NA); @@ -2910,7 +2910,7 @@ static int dissect_forwardingoption(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_tree_add_uint(option_tree, hf_reload_length_uint16, tvb, offset+local_offset+2, 2, option_length); local_offset += 4; if (local_offset + option_length > length) { - expert_add_info_format_text(pinfo, ti_option, &ei_reload_truncated_field, "Truncated ForwardingOption"); + expert_add_info_format(pinfo, ti_option, &ei_reload_truncated_field, "Truncated ForwardingOption"); return length; } @@ -2988,7 +2988,7 @@ static int dissect_diagnosticrequest(int anchor, tvbuff_t *tvb, packet_info *pin local_offset += 4; if (local_offset+local_length > length) { - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated DiagnosticRequest"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated DiagnosticRequest"); local_length = length-local_offset; } if (local_length>0) { @@ -3002,7 +3002,7 @@ static int dissect_diagnosticrequest(int anchor, tvbuff_t *tvb, packet_info *pin extensions_tree = proto_item_add_subtree(ti_extensions, ett_reload_diagnosticrequest_extensions); extensions_length = tvb_get_ntohl(tvb, offset+local_offset); if (extensions_length+4 > local_length) { - expert_add_info_format_text(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated Diagnostic extensions"); + expert_add_info_format(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated Diagnostic extensions"); extensions_length = local_length-4; } proto_item_append_text(ti_extensions, " (DiagnosticExtension<%d>)",extensions_length); @@ -3229,7 +3229,7 @@ static int dissect_diagnosticresponse(int anchor, tvbuff_t *tvb, packet_info *pi diagnostics_length = tvb_get_ntohl(tvb, offset+local_offset); if (diagnostics_length+local_offset+4>length) { - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated Diagnostic Response"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated Diagnostic Response"); diagnostics_length = length -4 -local_offset; } ti_diagnostics = proto_tree_add_item(local_tree, hf_reload_diagnosticresponse_diagnostic_info_list, tvb, offset+local_offset, diagnostics_length, ENC_NA); @@ -3342,7 +3342,7 @@ static int dissect_probereq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_uint(requested_info_tree, hf_reload_length_uint8, tvb, offset, 1, info_list_length); if ((info_list_length+1) > length) { - expert_add_info_format_text(pinfo, ti_requested_info, &ei_reload_truncated_field, "Truncated requested_info"); + expert_add_info_format(pinfo, ti_requested_info, &ei_reload_truncated_field, "Truncated requested_info"); info_list_length = length - 1; } { @@ -3371,7 +3371,7 @@ static int dissect_probeans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, info_list_length = tvb_get_ntohs(tvb, offset); if (info_list_length+2 >length) { - expert_add_info_format_text(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ProbeAns"); + expert_add_info_format(pinfo, ti_local, &ei_reload_truncated_field, "Truncated ProbeAns"); info_list_length = length - 2; } ti_infos = proto_tree_add_item(local_tree, hf_reload_probeans_probe_info, tvb, offset, info_list_length, ENC_NA); @@ -3407,7 +3407,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr if (2 + 4 + message_body_length + 4 + extensions_length > length) { ti_message_contents = proto_tree_add_item(tree, hf_reload_message_contents, tvb, offset, length, ENC_NA); - expert_add_info_format_text(pinfo, ti_message_contents, &ei_reload_truncated_field, "Truncated MessageContents"); + expert_add_info_format(pinfo, ti_message_contents, &ei_reload_truncated_field, "Truncated MessageContents"); return length; } @@ -3525,7 +3525,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr else { message_type_str = "PingAns"; if (message_body_length < 16) { - expert_add_info_format_text(pinfo, ti_message_contents, &ei_reload_truncated_field, "Truncated ping answer"); + expert_add_info_format(pinfo, ti_message_contents, &ei_reload_truncated_field, "Truncated ping answer"); } else { proto_item *ti_local; @@ -3572,7 +3572,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr configupdate_length = tvb_get_ntohl(tvb, offset + local_offset); proto_tree_add_uint(configupdate_tree, hf_reload_length_uint32, tvb, offset + local_offset, 4, configupdate_length); if (5 + configupdate_length > message_body_length) { - expert_add_info_format_text(pinfo, ti_configupdate, &ei_reload_truncated_field, "Truncated ConfigUpdateReq"); + expert_add_info_format(pinfo, ti_configupdate, &ei_reload_truncated_field, "Truncated ConfigUpdateReq"); break; } local_offset += 4; @@ -3790,7 +3790,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr error_code = tvb_get_ntohs(tvb, offset); if (2 + 2 + error_length >length) { - expert_add_info_format_text(pinfo, ti_message_body, &ei_reload_truncated_field, "Truncated error message"); + expert_add_info_format(pinfo, ti_message_body, &ei_reload_truncated_field, "Truncated error message"); return length; } @@ -3852,7 +3852,7 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr proto_item *ti_extension; guint32 extension_content_length = tvb_get_ntohl(tvb, offset + extension_offset + 3); if ((extension_offset + 3 + 4 + extension_content_length) > extensions_length) { - expert_add_info_format_text(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated message extensions"); + expert_add_info_format(pinfo, ti_extensions, &ei_reload_truncated_field, "Truncated message extensions"); break; } ti_extension = proto_tree_add_item(extensions_tree, hf_reload_message_extension, tvb, offset+ extension_offset, 3 + 4 + extension_content_length, ENC_NA); @@ -4304,7 +4304,7 @@ dissect_reload_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) certificate_length = tvb_get_ntohs(tvb, offset + security_block_offset + certificate_offset + 1); if (certificate_offset + 1 + 2 + certificate_length > certificates_length) { - expert_add_info_format_text(pinfo, ti_security_block, &ei_reload_truncated_field, "Truncated certificate"); + expert_add_info_format(pinfo, ti_security_block, &ei_reload_truncated_field, "Truncated certificate"); break; } ti_genericcertificate = diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 49468de019..02df9e8d2e 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -995,7 +995,7 @@ static void checkFIconsistency(sequence_analysis_report *p, if (newSegmentStarted) { ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_framing_info_correct, tvb, 0, 0, FALSE); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_last_segment_not_continued, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_last_segment_not_continued, "Last segment of previous PDU was not continued for UE %u (%s-%u)", p_rlc_lte_info->ueid, val_to_str_const(p_rlc_lte_info->channelType, rlc_channel_type_vals, "Unknown"), @@ -1012,7 +1012,7 @@ static void checkFIconsistency(sequence_analysis_report *p, if (!newSegmentStarted) { ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_framing_info_correct, tvb, 0, 0, FALSE); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_last_segment_complete, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_last_segment_complete, "Last segment of previous PDU was complete, but new segment was not started on UE %u (%s-%u)", p_rlc_lte_info->ueid, val_to_str_const(p_rlc_lte_info->channelType, rlc_channel_type_vals, "Unknown"), @@ -1094,7 +1094,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_mac_retx, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_mac_retx, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_mac_retx, "AM Frame retransmitted for %s on UE %u - due to MAC retx! (%s-%u)", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid, @@ -1114,7 +1114,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_retx, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_retx, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_retx, "AM Frame retransmitted for %s on UE %u - most likely in response to NACK (%s-%u)", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid, @@ -1134,7 +1134,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_repeated, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_repeated, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_repeated, "AM SN Repeated for %s for UE %u - probably because didn't receive Status PDU? (%s-%u)", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid, @@ -1155,7 +1155,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); if (p->lastSN != p->firstSN) { - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_am_sn_missing, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_am_sn_missing, "AM SNs (%u to %u) missing for %s on UE %u (%s-%u)", p->firstSN, p->lastSN, val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -1167,7 +1167,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, tap_info->missingSNs = ((1024 + p->lastSN - p->firstSN) % 1024) + 1; } else { - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_am_sn_missing, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_am_sn_missing, "AM SN (%u) missing for %s on UE %u (%s-%u)", p->firstSN, val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -1200,7 +1200,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, PROTO_ITEM_SET_GENERATED(ti); /* Expert error */ - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_ack_out_of_range_opposite_frame, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_ack_out_of_range_opposite_frame, "AM ACK for SN %u - but last received SN in other direction is %u for UE %u (%s-%u)", p->firstSN, p->sequenceExpected, p_rlc_lte_info->ueid, @@ -1249,7 +1249,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); if (p->lastSN != p->firstSN) { - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_um_sn_missing, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_um_sn_missing, "UM SNs (%u to %u) missing for %s on UE %u (%s-%u)", p->firstSN, p->lastSN, val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -1261,7 +1261,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, tap_info->missingSNs = ((snLimit + p->lastSN - p->firstSN) % snLimit) + 1; } else { - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_um_sn_missing, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_um_sn_missing, "UM SN (%u) missing for %s on UE %u (%s-%u)", p->firstSN, val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -1281,7 +1281,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_repeated, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_um_sn_repeated, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_um_sn_repeated, "UM SN (%u) repeated for %s for UE %u (%s-%u)", p->firstSN, val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -1299,7 +1299,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_mac_retx, tvb, 0, 0, TRUE); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_mac_retx, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_mac_retx, "UM Frame retransmitted for %s on UE %u - due to MAC retx! (%s-%u)", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid, @@ -1309,7 +1309,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p, default: /* Incorrect sequence number */ - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_wrong_sequence_number, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_wrong_sequence_number, "Wrong Sequence Number for %s on UE %u - got %u, expected %u (%s-%u)", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid, sequenceNumber, p->sequenceExpected, @@ -1739,7 +1739,7 @@ static void addChannelRepeatedNACKInfo(channel_repeated_nack_report *p, tvb, 0, 0, p->repeatedNACKs[n]); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_sequence_analysis_repeated_nack, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_sequence_analysis_repeated_nack, "Same SN (%u) NACKd for %s on UE %u in successive Status PDUs", p->repeatedNACKs[n], val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), @@ -2072,7 +2072,7 @@ static void dissect_rlc_lte_um(tvbuff_t *tvb, packet_info *pinfo, reserved = (tvb_get_guint8(tvb, offset) & 0xe0) >> 5; ti = proto_tree_add_item(um_header_tree, hf_rlc_lte_um_fixed_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (reserved != 0) { - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_reserved_bits_not_zero, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_reserved_bits_not_zero, "RLC UM Fixed header Reserved bits not zero (found 0x%x)", reserved); } @@ -2248,7 +2248,7 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, ti = proto_tree_add_item(tree, hf_rlc_lte_am_cpt, tvb, offset, 1, ENC_BIG_ENDIAN); if (cpt != 0) { /* Protest and stop - only know about STATUS PDUs */ - expert_add_info_format_text(pinfo, ti, &ei_rlc_lte_am_cpt, + expert_add_info_format(pinfo, ti, &ei_rlc_lte_am_cpt, "RLC Control frame type %u not handled", cpt); return; } @@ -2287,7 +2287,7 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, /* We shouldn't NACK the ACK_SN! */ if (nack_sn == ack_sn) { - expert_add_info_format_text(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn_ack_same, + expert_add_info_format(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn_ack_same, "Status PDU shouldn't ACK and NACK the same sequence number (%" G_GINT64_MODIFIER "u)", ack_sn); } @@ -2317,13 +2317,13 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, /* Report as expert info */ if (e2) { - expert_add_info_format_text(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn_partial, + expert_add_info_format(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn_partial, "Status PDU reports NACK (partial) on %s for UE %u", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid); } else { - expert_add_info_format_text(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn, + expert_add_info_format(pinfo, nack_ti, &ei_rlc_lte_am_nack_sn, "Status PDU reports NACK on %s for UE %u", val_to_str_const(p_rlc_lte_info->direction, direction_vals, "Unknown"), p_rlc_lte_info->ueid); @@ -2369,7 +2369,7 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, /* Check that we've reached the end of the PDU. If not, show malformed */ offset = (bit_offset+7) / 8; if (tvb_length_remaining(tvb, offset) > 0) { - expert_add_info_format_text(pinfo, status_ti, &ei_rlc_lte_bytes_after_status_pdu_complete, + expert_add_info_format(pinfo, status_ti, &ei_rlc_lte_bytes_after_status_pdu_complete, "%cL %u bytes remaining after Status PDU complete", (p_rlc_lte_info->direction == DIRECTION_UPLINK) ? 'U' : 'D', tvb_length_remaining(tvb, offset)); @@ -2911,7 +2911,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree default: /* Error - unrecognised mode */ - expert_add_info_format_text(pinfo, mode_ti, &ei_rlc_lte_context_mode, + expert_add_info_format(pinfo, mode_ti, &ei_rlc_lte_context_mode, "Unrecognised RLC Mode set (%u)", p_rlc_lte_info->rlcMode); break; } diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c index 378b9001fc..339fce03ff 100644 --- a/epan/dissectors/packet-rlc.c +++ b/epan/dissectors/packet-rlc.c @@ -1788,7 +1788,7 @@ rlc_decode_li(enum rlc_mode mode, tvbuff_t *tvb, packet_info *pinfo, proto_tree || (li[num_li].li < prev_li)) { /* add malformed LI for investigation */ malformed = tree_add_li(mode, &li[num_li], num_li, li_offs, li_on_2_bytes, tvb, tree); - expert_add_info_format_text(pinfo, malformed, &ei_rlc_li_incorrect_mal, "Incorrect LI value 0x%x", li[num_li].li); + expert_add_info_format(pinfo, malformed, &ei_rlc_li_incorrect_mal, "Incorrect LI value 0x%x", li[num_li].li); return -1; /* just give up on this */ } li[num_li].len = li[num_li].li - prev_li; diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c index 9391319951..146a6b6e0d 100644 --- a/epan/dissectors/packet-rohc.c +++ b/epan/dissectors/packet-rohc.c @@ -886,7 +886,7 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, case ROHC_PROFILE_UNCOMPRESSED: /* 0 */ ti = proto_tree_add_item(tree, hf_rohc_profile_spec_octet, tvb, offset, 1, ENC_BIG_ENDIAN); if (oct) { - expert_add_info_format_text(pinfo, ti, &ei_rohc_profile_spec_octet, "Invalid profile-specific octet value (0x%02X)", oct); + expert_add_info_format(pinfo, ti, &ei_rohc_profile_spec_octet, "Invalid profile-specific octet value (0x%02X)", oct); } break; case ROHC_PROFILE_RTP: /* 1 */ diff --git a/epan/dissectors/packet-roofnet.c b/epan/dissectors/packet-roofnet.c index e5c6b08b3f..76924febd7 100644 --- a/epan/dissectors/packet-roofnet.c +++ b/epan/dissectors/packet-roofnet.c @@ -222,7 +222,7 @@ static void dissect_roofnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) roofnet_nlinks= tvb_get_guint8(tvb, ROOFNET_OFFSET_NLINKS); /* Check that we do not have a malformed roofnet packet */ if ((roofnet_nlinks*6*4)+ROOFNET_HEADER_LENGTH > ROOFNET_MAX_LENGTH) { - expert_add_info_format_text(pinfo, it, &ei_roofnet_too_many_links, "Too many links (%u)\n", roofnet_nlinks); + expert_add_info_format(pinfo, it, &ei_roofnet_too_many_links, "Too many links (%u)\n", roofnet_nlinks); return; } diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index fe6395535f..0dab4dc948 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -395,7 +395,7 @@ dissect_rpcap_error (tvbuff_t *tvb, packet_info *pinfo, tvb_format_text_wsp (tvb, offset, len)); ti = proto_tree_add_item (parent_tree, hf_error, tvb, offset, len, ENC_ASCII|ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_error, + expert_add_info_format(pinfo, ti, &ei_error, "Error: %s", tvb_format_text_wsp (tvb, offset, len)); } @@ -436,7 +436,7 @@ dissect_rpcap_ifaddr (tvbuff_t *tvb, packet_info *pinfo, } else { ti = proto_tree_add_item (tree, hf_if_unknown, tvb, offset, 126, ENC_NA); if (af != AF_UNSPEC) { - expert_add_info_format_text(pinfo, ti, &ei_if_unknown, + expert_add_info_format(pinfo, ti, &ei_if_unknown, "Unknown address family: %d", af); } offset += 126; diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 219bad9b76..59c2dc6e7a 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -1806,23 +1806,23 @@ static gboolean validate_xr_block_length(tvbuff_t *tvb, packet_info *pinfo, int switch (block_type) { case RTCP_XR_REF_TIME: if (block_len != 2) - expert_add_info_format_text(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 2"); + expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 2"); return FALSE; case RTCP_XR_STATS_SUMRY: if (block_len != 9) - expert_add_info_format_text(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 9"); + expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 9"); return FALSE; case RTCP_XR_VOIP_METRCS: case RTCP_XR_BT_XNQ: if (block_len != 8) - expert_add_info_format_text(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 8"); + expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 8"); return FALSE; case RTCP_XR_IDMS: if (block_len != 7) - expert_add_info_format_text(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 7"); + expert_add_info_format(pinfo, ti, &ei_rtcp_xr_block_length_bad, "Invalid block length, should be 7"); return FALSE; default: @@ -2780,11 +2780,11 @@ static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo, proto_tr /* Add to expert info */ if (delay >= 0) { - expert_add_info_format_text(pinfo, item, &ei_rtcp_roundtrip_delay, "RTCP round-trip delay detected (%d ms)", delay); + expert_add_info_format(pinfo, item, &ei_rtcp_roundtrip_delay, "RTCP round-trip delay detected (%d ms)", delay); } else { - expert_add_info_format_text(pinfo, item, &ei_rtcp_roundtrip_delay_negative, "Negative RTCP round-trip delay detected (%d ms)", delay); + expert_add_info_format(pinfo, item, &ei_rtcp_roundtrip_delay_negative, "Negative RTCP round-trip delay detected (%d ms)", delay); } /* Report delay in INFO column */ @@ -3105,7 +3105,7 @@ dissect_rtcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) total_packet_length, offset); PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format_text(pinfo, ti, &ei_rtcp_length_check, "Incorrect RTCP packet length information (expected %u bytes, found %d)", total_packet_length, offset); + expert_add_info_format(pinfo, ti, &ei_rtcp_length_check, "Incorrect RTCP packet length information (expected %u bytes, found %d)", total_packet_length, offset); } } diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c index 46cef2fe66..7a2624f710 100644 --- a/epan/dissectors/packet-rtps.c +++ b/epan/dissectors/packet-rtps.c @@ -2231,7 +2231,7 @@ void rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t* tv offset += 4; if (param_length < 4 + (int)seq_length) { - expert_add_info_format_text(pinfo, ti, &ei_rtps_parameter_value_invalid, "ERROR: Parameter value too small"); + expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "ERROR: Parameter value too small"); return; } @@ -2361,7 +2361,7 @@ static int rtps_util_add_fragment_number_set(proto_tree *tree, packet_info *pinf offset += 12; } else { /* size don't match, packet error */ - expert_add_info_format_text(pinfo, ti, &ei_rtps_parameter_value_invalid, "Illegal size for fragment number set"); + expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Illegal size for fragment number set"); return -1; } } @@ -2490,7 +2490,7 @@ static void rtps_util_decode_flags_16bit(proto_tree * tree, tvbuff_t *tvb, gint */ #define ENSURE_LENGTH(size) \ if (param_length < size) { \ - expert_add_info_format_text(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: parameter value too small (must be at least %d octects)", size); \ + expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: parameter value too small (must be at least %d octects)", size); \ break; \ } @@ -3910,7 +3910,7 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb for (;;) { size -= offset - original_offset; if (size < 4) { - expert_add_info_format_text(pinfo, (param_len_item == NULL) ? ti : param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter"); + expert_add_info_format(pinfo, (param_len_item == NULL) ? ti : param_len_item, &ei_rtps_parameter_value_invalid, "ERROR: not enough bytes to read the next parameter"); return 0; } original_offset = offset; @@ -3949,7 +3949,7 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb /* Make sure we have enough bytes for the param value */ if ((size-4 < param_length) && (parameter != PID_SENTINEL)) { - expert_add_info_format_text(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "Not enough bytes to read the parameter value"); + expert_add_info_format(pinfo, param_len_item, &ei_rtps_parameter_value_invalid, "Not enough bytes to read the parameter value"); return 0; } @@ -4154,7 +4154,7 @@ static void dissect_DATA_v1(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin if ((flags & FLAG_DATA_D) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -4301,7 +4301,7 @@ static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin if ((flags & FLAG_DATA_H) != 0) min_len += 12; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -4432,7 +4432,7 @@ static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu if ((flags & FLAG_DATA_FRAG_H) != 0) min_len += 12; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -4599,7 +4599,7 @@ static void dissect_NOKEY_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, g if ((flags & FLAG_NOKEY_DATA_Q) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -4690,7 +4690,7 @@ static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offs if ((flags & FLAG_NOKEY_DATA_Q) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -4796,7 +4796,7 @@ static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header < 20) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 20)"); return; } @@ -4845,7 +4845,7 @@ static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin /* In this case there must be something wrong in the bitmap: there * are some extra bytes that we don't know how to decode */ - expert_add_info_format_text(pinfo, item, &ei_rtps_extra_bytes, "Don't know how to decode those extra bytes: %d", octets_to_next_header - offset); + expert_add_info_format(pinfo, item, &ei_rtps_extra_bytes, "Don't know how to decode those extra bytes: %d", octets_to_next_header - offset); } else if (offset > original_offset + octets_to_next_header) { /* Decoding the bitmap went over the end of this submessage. * Enter an item in the protocol tree that spans over the entire @@ -4889,7 +4889,7 @@ static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header < 24) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); return; } @@ -4990,11 +4990,11 @@ static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if ((octets_to_next_header < 24) && (version <= 0x0101)) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); return; } else if (octets_to_next_header < 28) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 28)"); return; } @@ -5066,7 +5066,7 @@ static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header < 36) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 36)"); return; } @@ -5139,7 +5139,7 @@ static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header < 24) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); return; } @@ -5255,7 +5255,7 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu if ((flags & FLAG_RTPS_DATA_K) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -5453,7 +5453,7 @@ static void dissect_RTPS_DATA_FRAG(tvbuff_t *tvb, if ((flags & FLAG_RTPS_DATA_FRAG_Q) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -5640,7 +5640,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs if ((flags & FLAG_RTPS_DATA_BATCH_Q) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } @@ -5769,7 +5769,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs /* Ensure there are enough bytes to decode */ if (sampleListOffset - offset < min_length) { - expert_add_info_format_text(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info"); + expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample info"); return; } @@ -5836,7 +5836,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs for (count = 0; count < sample_info_count; ++count) { /* Ensure there are enough bytes in the buffer to dissect the next sample */ if (octets_to_next_header - (offset - old_offset) + 4 < (gint)sample_info_length[count]) { - expert_add_info_format_text(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample"); + expert_add_info_format(pinfo, ti, &ei_rtps_parameter_value_invalid, "Error: not enough bytes to dissect sample"); return; } @@ -5906,7 +5906,7 @@ static void dissect_GAP(tvbuff_t *tvb, offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header < 24) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= 24)"); return; } @@ -5976,7 +5976,7 @@ void dissect_INFO_TS(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flag if ((flags & FLAG_INFO_TS_T) == 0) min_len += 8; if (octets_to_next_header != min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); return; } @@ -6035,7 +6035,7 @@ void dissect_INFO_SRC(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 fla offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header != 16) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 16)"); return; } @@ -6121,7 +6121,7 @@ static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, gint offse if ((flags & FLAG_INFO_REPLY_IP4_M) != 0) min_len += 8; if (octets_to_next_header != min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == %u)", min_len); return; } @@ -6175,7 +6175,7 @@ static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, gint offset, gui offset + 2, 2, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN); if (octets_to_next_header != 8) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)"); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be == 8)"); return; } @@ -6238,7 +6238,7 @@ static void dissect_INFO_REPLY(tvbuff_t *tvb, if ((flags & FLAG_INFO_REPLY_M) != 0) min_len += 4; if (octets_to_next_header < min_len) { - expert_add_info_format_text(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); + expert_add_info_format(pinfo, octet_item, &ei_rtps_sm_octets_to_next_header_error, "(Error: should be >= %u)", min_len); return; } diff --git a/epan/dissectors/packet-sap.c b/epan/dissectors/packet-sap.c index 02ea585451..87b4612851 100644 --- a/epan/dissectors/packet-sap.c +++ b/epan/dissectors/packet-sap.c @@ -197,7 +197,7 @@ dissect_sap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if ((int) auth_data_len - pad_len - 1 < 0) { - expert_add_info_format_text(pinfo, sai, &ei_sap_bogus_authentication_or_pad_length, + expert_add_info_format(pinfo, sai, &ei_sap_bogus_authentication_or_pad_length, "Bogus authentication length (%d) or pad length (%d)", auth_len, pad_len); return; } diff --git a/epan/dissectors/packet-sasp.c b/epan/dissectors/packet-sasp.c index bd47d19e1f..ed385eb88b 100644 --- a/epan/dissectors/packet-sasp.c +++ b/epan/dissectors/packet-sasp.c @@ -361,7 +361,7 @@ dissect_sasp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Type: %s", (hdr_type == SASP_HDR_TYPE) ? "SASP" : "[Invalid]"); if (hdr_type != SASP_HDR_TYPE) { - expert_add_info_format_text(pinfo, hti, &ei_msg_type_invalid, + expert_add_info_format(pinfo, hti, &ei_msg_type_invalid, "Invalid SASP Header Type [0x%04x]", hdr_type); /* XXX: The folowing should actually happen automatically ? */ col_set_str(pinfo->cinfo, COL_INFO, "[Malformed: Invalid SASP Header Type]"); @@ -466,7 +466,7 @@ dissect_sasp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Unknown SASP Message Type */ col_add_fstr(pinfo->cinfo, COL_INFO, "[Malformed: Unknown Message Type [0x%04x]", msg_type); - expert_add_info_format_text(pinfo, mti, &ei_msg_type_invalid, + expert_add_info_format(pinfo, mti, &ei_msg_type_invalid, "Unknown SASP Message Type: 0x%4x", msg_type); return; } diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index b71852326a..0e44e66a35 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -1491,7 +1491,7 @@ dissect_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, } } else { if (reported_length % 4) { - expert_add_info_format_text(pinfo, parameter_item, &ei_sctp_parameter_length, "Parameter length is not padded to a multiple of 4 bytes (length=%d)", reported_length); + expert_add_info_format(pinfo, parameter_item, &ei_sctp_parameter_length, "Parameter length is not padded to a multiple of 4 bytes (length=%d)", reported_length); } } @@ -3716,7 +3716,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb, chunk_item = proto_tree_add_text(sctp_tree, chunk_tvb, CHUNK_HEADER_OFFSET, reported_length, "%s chunk", val_to_str_const(type, chunk_type_values, "RESERVED")); chunk_tree = proto_item_add_subtree(chunk_item, ett_sctp_chunk); if (reported_length % 4) - expert_add_info_format_text(pinfo, chunk_item, &ei_sctp_chunk_length_bad, "Chunk length is not padded to a multiple of 4 bytes (length=%d).", reported_length); + expert_add_info_format(pinfo, chunk_item, &ei_sctp_chunk_length_bad, "Chunk length is not padded to a multiple of 4 bytes (length=%d).", reported_length); if (tree) { /* then insert the chunk header components into the protocol tree */ @@ -3745,7 +3745,7 @@ dissect_sctp_chunk(tvbuff_t *chunk_tvb, length_item = proto_tree_add_uint(chunk_tree, hf_chunk_length, chunk_tvb, CHUNK_LENGTH_OFFSET, CHUNK_LENGTH_LENGTH, length); if (length > reported_length) { - expert_add_info_format_text(pinfo, length_item, &ei_sctp_chunk_length_bad, "Chunk length (%d) is longer than remaining data (%d) in the packet.", length, reported_length); + expert_add_info_format(pinfo, length_item, &ei_sctp_chunk_length_bad, "Chunk length (%d) is longer than remaining data (%d) in the packet.", length, reported_length); /* We'll almost certainly throw an exception shortly... */ } diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c index 0574ec3687..57f3acf249 100644 --- a/epan/dissectors/packet-sigcomp.c +++ b/epan/dissectors/packet-sigcomp.c @@ -822,7 +822,7 @@ dissect_sigcomp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sigcomp_tr offset++; /* Add expert item for NACK */ - expert_add_info_format_text(pinfo, reason_ti, &ei_sigcomp_nack_failed_op_code, + expert_add_info_format(pinfo, reason_ti, &ei_sigcomp_nack_failed_op_code, "SigComp NACK (reason=%s, opcode=%s)", val_to_str_const(octet, sigcomp_nack_reason_code_vals, "Unknown"), val_to_str_const(opcode, udvm_instruction_code_vals, "Unknown")); diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index a41e293a7e..1d7f5783e8 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -2389,7 +2389,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr next_tvb2 = tvb_new_subset(tvb, value_offset, value_len, value_len); dissector_try_string(ext_hdr_subdissector_table, header_name, next_tvb2, pinfo, proto_item_add_subtree(ti_c, ett_sip_ext_hdr)); } else { - expert_add_info_format_text(pinfo, ti_c, &ei_sip_unrecognized_header, + expert_add_info_format(pinfo, ti_c, &ei_sip_unrecognized_header, "Unrecognised SIP header (%s)", tvb_format_text(tvb, offset, header_len)); } diff --git a/epan/dissectors/packet-slowprotocols.c b/epan/dissectors/packet-slowprotocols.c index 222b2d11d7..731fa49f67 100644 --- a/epan/dissectors/packet-slowprotocols.c +++ b/epan/dissectors/packet-slowprotocols.c @@ -1671,7 +1671,7 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if ((tvb_get_guint8(tvb, offset) >> 4) != ESMC_VERSION_1) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_b, &ei_esmc_version_compliance, "Version must be 0x%.1x claim compliance with Version 1 of this protocol", ESMC_VERSION_1); + expert_add_info_format(pinfo, item_b, &ei_esmc_version_compliance, "Version must be 0x%.1x claim compliance with Version 1 of this protocol", ESMC_VERSION_1); } /*stay at the same octet in tvb*/ } @@ -1696,7 +1696,7 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if (reserved != 0x0) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_b, &ei_esmc_reserved_not_zero, "Reserved bits must be set to all zero on transmitter"); + expert_add_info_format(pinfo, item_b, &ei_esmc_reserved_not_zero, "Reserved bits must be set to all zero on transmitter"); } offset += 4; } @@ -1724,7 +1724,7 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if (type != ESMC_QL_TLV_TYPE) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_type_ql_type_not_first, "TLV Type must be == 0x%.2x (QL) because QL TLV must be first in the ESMC PDU", ESMC_QL_TLV_TYPE); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_type_ql_type_not_first, "TLV Type must be == 0x%.2x (QL) because QL TLV must be first in the ESMC PDU", ESMC_QL_TLV_TYPE); expert_add_info(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_ql_type); } offset += 1; @@ -1735,8 +1735,8 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if (length != ESMC_QL_TLV_LENGTH) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_length_bad, "QL TLV Length must be == 0x%.4x", ESMC_QL_TLV_LENGTH); - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_ql_type, "Let's decode this TLV as if Length has valid value"); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_length_bad, "QL TLV Length must be == 0x%.4x", ESMC_QL_TLV_LENGTH); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_ql_type, "Let's decode this TLV as if Length has valid value"); } offset += 2; @@ -1795,7 +1795,7 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if (type != ESMC_TIMESTAMP_TLV_TYPE) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_type_not_timestamp, "TLV Type must be == 0x%.2x (Timestamp) because Timestamp Valid Flag is set", ESMC_TIMESTAMP_TLV_TYPE); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_type_not_timestamp, "TLV Type must be == 0x%.2x (Timestamp) because Timestamp Valid Flag is set", ESMC_TIMESTAMP_TLV_TYPE); expert_add_info(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_timestamp); } offset += 1; @@ -1806,8 +1806,8 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex) if (length != ESMC_TIMESTAMP_TLV_LENGTH) { malformed = TRUE; - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_length_bad, "Timestamp TLV Length must be == 0x%.4x", ESMC_TIMESTAMP_TLV_LENGTH); - expert_add_info_format_text(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_timestamp, "Let's decode this TLV as if Length has valid value"); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_length_bad, "Timestamp TLV Length must be == 0x%.4x", ESMC_TIMESTAMP_TLV_LENGTH); + expert_add_info_format(pinfo, item_c, &ei_esmc_tlv_type_decoded_as_timestamp, "Let's decode this TLV as if Length has valid value"); } offset += 2; @@ -2526,7 +2526,7 @@ dissect_oampdu_event_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (raw_octet < 2) { - expert_add_info_format_text(pinfo, event_item, &ei_oampdu_event_length_bad, "Event length should be at least 2"); + expert_add_info_format(pinfo, event_item, &ei_oampdu_event_length_bad, "Event length should be at least 2"); } else { diff --git a/epan/dissectors/packet-sml.c b/epan/dissectors/packet-sml.c index 3322aa7409..13fa0406a9 100644 --- a/epan/dissectors/packet-sml.c +++ b/epan/dissectors/packet-sml.c @@ -1202,7 +1202,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre child = proto_tree_add_text(insert_tree, tvb, *offset, -1, "Child List with %d %s", *length + *data, plurality(*length + *data, "element", "elements")); child_list = proto_item_add_subtree(child, ett_sml_child); if (repeat <= 0){ - expert_add_info_format_text(pinfo, child, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, child, &ei_sml_invalid_count, "invalid loop count"); return; } *offset+=*length; @@ -1212,7 +1212,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre tree_Entry_list = proto_item_add_subtree(tree_Entry, ett_sml_tree_Entry); if (tvb_get_guint8(tvb, *offset) != 0x73){ - expert_add_info_format_text(pinfo, tree_Entry, &ei_sml_invalid_count, "invalid count of elements in tree_Entry"); + expert_add_info_format(pinfo, tree_Entry, &ei_sml_invalid_count, "invalid count of elements in tree_Entry"); return; } *offset+=1; @@ -1224,7 +1224,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre } } else { - expert_add_info_format_text(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in child List"); + expert_add_info_format(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in child List"); } } @@ -1411,11 +1411,11 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } *offset+=length; @@ -1437,11 +1437,11 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin object_list_list = proto_item_add_subtree(object_list, ett_sml_object_list); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, object_list, &ei_sml_invalid_count, "invalid count of elements in object_List"); + expert_add_info_format(pinfo, object_list, &ei_sml_invalid_count, "invalid count of elements in object_List"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1470,7 +1470,7 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin proto_item_set_end(dasDetails, tvb, *offset); } else { - expert_add_info_format_text(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in dasDetails"); + expert_add_info_format(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in dasDetails"); return TRUE; } return FALSE; @@ -1526,11 +1526,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1548,11 +1548,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot headerList_subtree = proto_item_add_subtree(headerList, ett_sml_headerList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, headerList, &ei_sml_invalid_count, "invalid count of elements in headerlist"); + expert_add_info_format(pinfo, headerList, &ei_sml_invalid_count, "invalid count of elements in headerlist"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, headerList, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, headerList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1584,11 +1584,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot periodList_list = proto_item_add_subtree(periodList, ett_sml_periodList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); + expert_add_info_format(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1619,11 +1619,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot valuelist_list = proto_item_add_subtree(valuelist, ett_sml_valuelist); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, valuelist, &ei_sml_invalid_count, "invalid count of elements in valueList"); + expert_add_info_format(pinfo, valuelist, &ei_sml_invalid_count, "invalid count of elements in valueList"); return TRUE; } else if (repeat2 <= 0){ - expert_add_info_format_text(pinfo, valuelist, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, valuelist, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1710,11 +1710,11 @@ static gboolean decode_GetProfileListRes(tvbuff_t *tvb, packet_info *pinfo, prot treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in parameterTreePath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in parameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1753,11 +1753,11 @@ static gboolean decode_GetProfileListRes(tvbuff_t *tvb, packet_info *pinfo, prot periodList_list = proto_item_add_subtree(periodList, ett_sml_periodList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); + expert_add_info_format(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1879,11 +1879,11 @@ static gboolean decode_GetListRes (tvbuff_t *tvb, packet_info *pinfo, proto_tree valtree_list = proto_item_add_subtree (valtree, ett_sml_valtree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, valtree, &ei_sml_invalid_count, "invalid count of elements in valList"); + expert_add_info_format(pinfo, valtree, &ei_sml_invalid_count, "invalid count of elements in valList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, valtree, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, valtree, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2004,11 +2004,11 @@ static gboolean decode_GetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo, pr treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2058,11 +2058,11 @@ static gboolean decode_GetProcParameterRes(tvbuff_t *tvb, packet_info *pinfo, pr treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2079,7 +2079,7 @@ static gboolean decode_GetProcParameterRes(tvbuff_t *tvb, packet_info *pinfo, pr parameterTree_list = proto_item_add_subtree(parameterTree, ett_sml_parameterTree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); + expert_add_info_format(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); return TRUE; } @@ -2119,11 +2119,11 @@ static gboolean decode_SetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo,pro treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); + expert_add_info_format(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2140,7 +2140,7 @@ static gboolean decode_SetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo,pro parameterTree_list = proto_item_add_subtree(parameterTree, ett_sml_parameterTree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); + expert_add_info_format(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); return TRUE; } @@ -2209,7 +2209,7 @@ static gboolean decode_AttentionRes(tvbuff_t *tvb, packet_info *pinfo, proto_tre attentionDetails_list = proto_item_add_subtree(attentionDetails, ett_sml_attentionDetails); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format_text(pinfo, attentionDetails, &ei_sml_invalid_count, "invalid count of elements in attentionDetails"); + expert_add_info_format(pinfo, attentionDetails, &ei_sml_invalid_count, "invalid count of elements in attentionDetails"); return TRUE; } @@ -2317,7 +2317,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr mainlist_list = proto_item_add_subtree (mainlist, ett_sml_mainlist); if (tvb_get_guint8(tvb, *offset) != LIST_6_ELEMENTS) { - expert_add_info_format_text(pinfo, mainlist, &ei_sml_invalid_count, "invalid count of elements"); + expert_add_info_format(pinfo, mainlist, &ei_sml_invalid_count, "invalid count of elements"); return; } *offset+=1; @@ -2575,7 +2575,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr /*(little to big endian convert) to display in correct order*/ crc_check = ((crc_check >> 8) & 0xFF) + ((crc_check << 8) & 0xFF00); proto_tree_add_text (msgend_tree, tvb, *offset, 0, "[CRC Bad 0x%X]", crc_check); - expert_add_info_format_text(pinfo, msgend, &ei_sml_crc_error, "CRC error (messages not reassembled ?)"); + expert_add_info_format(pinfo, msgend, &ei_sml_crc_error, "CRC error (messages not reassembled ?)"); } } else { diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index 34f604e3ce..b8867663dd 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -2682,7 +2682,7 @@ dissect_snmp_SNMPv3Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off usm_p.authOK = usm_p.user_assoc->user.authModel->authenticate( &usm_p, &calc_auth, &calc_auth_len, &error ); if (error) { - expert_add_info_format_text( actx->pinfo, usm_p.auth_item, &ei_snmp_verify_authentication_error, "Error while verifying Message authenticity: %s", error ); + expert_add_info_format( actx->pinfo, usm_p.auth_item, &ei_snmp_verify_authentication_error, "Error while verifying Message authenticity: %s", error ); } else { expert_field* expert; diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index bde1a92314..3b19420b82 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -894,7 +894,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; count = tvb_get_ntohs(tvb, offset); @@ -946,7 +946,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; break; @@ -978,7 +978,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; length = tvb_get_ntohs(tvb, offset); @@ -996,7 +996,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; length = tvb_get_ntohs(tvb, offset); @@ -1041,7 +1041,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error, "Error: %s", val_to_str(expert_status, srvloc_errs, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; count = tvb_get_ntohs(tvb, offset); @@ -1133,7 +1133,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; count = tvb_get_ntohs(tvb, offset); @@ -1199,7 +1199,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; break; @@ -1246,7 +1246,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; length = tvb_get_ntohs(tvb, offset); @@ -1269,7 +1269,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; ts.nsecs = 0; @@ -1347,7 +1347,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_item = proto_tree_add_item(srvloc_tree, hf_srvloc_error_v2, tvb, offset, 2, ENC_BIG_ENDIAN); expert_status = tvb_get_ntohs(tvb, offset); if (expert_status!=0) { - expert_add_info_format_text(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); + expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; length = tvb_get_ntohs(tvb, offset); diff --git a/epan/dissectors/packet-ssh.c b/epan/dissectors/packet-ssh.c index 3e2e8e9ffd..bc4fb3c2f8 100644 --- a/epan/dissectors/packet-ssh.c +++ b/epan/dissectors/packet-ssh.c @@ -686,7 +686,7 @@ ssh_dissect_key_exchange(tvbuff_t *tvb, packet_info *pinfo, ti = proto_tree_add_uint(tree, hf_ssh_packet_length, tvb, offset, 4, plen); if (plen >= 0xffff) { - expert_add_info_format_text(pinfo, ti, &ei_ssh_packet_length, "Overly large number %d", plen); + expert_add_info_format(pinfo, ti, &ei_ssh_packet_length, "Overly large number %d", plen); plen = remain_length-4; } offset+=4; diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index a1186291c8..dc1ad7bdcc 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -2823,7 +2823,7 @@ dissect_ssl3_hnd_cli_hello(tvbuff_t *tvb, packet_info *pinfo, if (cipher_suite_length % 2) { proto_tree_add_text(tree, tvb, offset, 2, "Invalid cipher suite length: %d", cipher_suite_length); - expert_add_info_format_text(pinfo, NULL, &ei_ssl_handshake_cipher_suites_mult2, + expert_add_info_format(pinfo, NULL, &ei_ssl_handshake_cipher_suites_mult2, "Cipher suite length (%d) must be a multiple of 2", cipher_suite_length); return; @@ -3153,7 +3153,7 @@ dissect_ssl3_hnd_cert_req(tvbuff_t *tvb, case SSL_VER_TLSv1DOT2: sh_alg_length = tvb_get_ntohs(tvb, offset); if (sh_alg_length % 2) { - expert_add_info_format_text(pinfo, NULL, + expert_add_info_format(pinfo, NULL, &ei_ssl_handshake_sig_hash_algs_mult2, "Signature Hash Algorithm length (%d) must be a multiple of 2", sh_alg_length); @@ -4059,7 +4059,7 @@ dissect_ssl2_hnd_client_hello(tvbuff_t *tvb, packet_info *pinfo, if (session_id_length > SSLV2_MAX_SESSION_ID_LENGTH_IN_BYTES) { proto_tree_add_text(tree, tvb, offset, 2, "Invalid session ID length: %d", session_id_length); - expert_add_info_format_text(pinfo, NULL, &ei_ssl2_handshake_session_id_len_error, + expert_add_info_format(pinfo, NULL, &ei_ssl2_handshake_session_id_len_error, "Session ID length (%u) must be less than %u.", session_id_length, SSLV2_MAX_SESSION_ID_LENGTH_IN_BYTES); return; diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index 6028bff1ed..692ff0dd5c 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -967,7 +967,7 @@ dissect_tacplus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tmp_pi = proto_tree_add_uint(tacplus_tree, hf_tacplus_packet_len, tvb, 8, 4, len); if ((gint)len < 1) { - expert_add_info_format_text(pinfo, tmp_pi, &ei_tacplus_packet_len_invalid, "Invalid length: %u", len); + expert_add_info_format(pinfo, tmp_pi, &ei_tacplus_packet_len_invalid, "Invalid length: %u", len); } tmp_pi = proto_tree_add_text(tacplus_tree, tvb, TAC_PLUS_HDR_SIZE, len, "%s%s", diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 2587d414a0..5f622e3f4b 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -1444,7 +1444,7 @@ tcp_sequence_number_analysis_print_duplicate(packet_info * pinfo, flags_item=proto_tree_add_uint(tree, hf_tcp_analysis_duplicate_ack_frame, tvb, 0, 0, ta->dupack_frame); PROTO_ITEM_SET_GENERATED(flags_item); - expert_add_info_format_text(pinfo, flags_item, &ei_tcp_analysis_duplicate_ack, "Duplicate ACK (#%u)", ta->dupack_num); + expert_add_info_format(pinfo, flags_item, &ei_tcp_analysis_duplicate_ack, "Duplicate ACK (#%u)", ta->dupack_num); } } @@ -3143,7 +3143,7 @@ dissect_tcpopt_snack(const ip_tcp_opt *optp, tvbuff_t *tvb, tcp_info_append_uint(pinfo, "SNLE", hole_start); tcp_info_append_uint(pinfo, "SNRE", hole_end); - expert_add_info_format_text(pinfo, NULL, &ei_tcp_option_snack_sequence, "SNACK Sequence %u - %u %s", hole_start, hole_end, modifier); + expert_add_info_format(pinfo, NULL, &ei_tcp_option_snack_sequence, "SNACK Sequence %u - %u %s", hole_start, hole_end, modifier); } } @@ -4365,12 +4365,12 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(tcph->th_flags & TH_SYN) { if(tcph->th_flags & TH_ACK) { - expert_add_info_format_text(pinfo, tf_syn, &ei_tcp_connection_sack, "Connection establish acknowledge (SYN+ACK): server port %s", get_tcp_port(tcph->th_sport)); + expert_add_info_format(pinfo, tf_syn, &ei_tcp_connection_sack, "Connection establish acknowledge (SYN+ACK): server port %s", get_tcp_port(tcph->th_sport)); /* Save the server port to help determine dissector used */ tcpd->server_port = tcph->th_sport; } else { - expert_add_info_format_text(pinfo, tf_syn, &ei_tcp_connection_syn, "Connection establish request (SYN): server port %s", + expert_add_info_format(pinfo, tf_syn, &ei_tcp_connection_syn, "Connection establish request (SYN): server port %s", get_tcp_port(tcph->th_dport)); /* Save the server port to help determine dissector used */ tcpd->server_port = tcph->th_dport; diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 4742e77648..102601734a 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -943,7 +943,7 @@ dissect_tds_all_headers(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto_ header_sub_tree = proto_item_add_subtree(item, ett_tds_all_headers_header); length_item = proto_tree_add_item(header_sub_tree, hf_tds_all_headers_header_length, tvb, *offset, 4, ENC_LITTLE_ENDIAN); if(header_length == 0 ) { - expert_add_info_format_text(pinfo, length_item, &ei_tds_invalid_length, "Empty header"); + expert_add_info_format(pinfo, length_item, &ei_tds_invalid_length, "Empty header"); break; } @@ -955,7 +955,7 @@ dissect_tds_all_headers(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto_ break; case TDS_HEADER_TRANS_DESCR: if(header_length != 18) - expert_add_info_format_text(pinfo, length_item, &ei_tds_invalid_length, "Length should equal 18"); + expert_add_info_format(pinfo, length_item, &ei_tds_invalid_length, "Length should equal 18"); proto_tree_add_item(header_sub_tree, hf_tds_all_headers_trans_descr, tvb, *offset + 6, 8, ENC_LITTLE_ENDIAN); proto_tree_add_item(header_sub_tree, hf_tds_all_headers_request_cnt, tvb, *offset + 14, 4, ENC_LITTLE_ENDIAN); break; @@ -966,7 +966,7 @@ dissect_tds_all_headers(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto_ *offset += header_length; } while(*offset < final_offset); if(*offset != final_offset) { - expert_add_info_format_text(pinfo, total_length_item, &ei_tds_invalid_length, "Sum of headers' lengths (%d) differs from total headers length (%d)", total_length + *offset - final_offset, total_length); + expert_add_info_format(pinfo, total_length_item, &ei_tds_invalid_length, "Sum of headers' lengths (%d) differs from total headers length (%d)", total_length + *offset - final_offset, total_length); return; } } @@ -2231,7 +2231,7 @@ dissect_tds_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, tds_conv_i if ((int) token_sz < 0) { token_item = proto_tree_add_text(tree, tvb, pos, 0, "Token"); - expert_add_info_format_text(pinfo, token_item, &ei_tds_token_length_invalid, "Bogus token size: %u", token_sz); + expert_add_info_format(pinfo, token_item, &ei_tds_token_length_invalid, "Bogus token size: %u", token_sz); break; } token_item = proto_tree_add_text(tree, tvb, pos, token_sz, @@ -2239,7 +2239,7 @@ dissect_tds_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, tds_conv_i val_to_str_const(token, token_names, "Unknown Token Type")); if ((int) token_len_field_size < 0) { - expert_add_info_format_text(pinfo, token_item, &ei_tds_token_length_invalid, "Bogus token length field size: %u", token_len_field_size); + expert_add_info_format(pinfo, token_item, &ei_tds_token_length_invalid, "Bogus token length field size: %u", token_len_field_size); break; } @@ -2503,7 +2503,7 @@ dissect_tds_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(tds_tree, hf_tds_status, tvb, offset + 1, 1, ENC_BIG_ENDIAN); tds_item = proto_tree_add_uint(tds_tree, hf_tds_length, tvb, offset + 2, 2, plen); - expert_add_info_format_text(pinfo, tds_item, &ei_tds_invalid_length, "bogus, should be >= 8"); + expert_add_info_format(pinfo, tds_item, &ei_tds_invalid_length, "bogus, should be >= 8"); } /* diff --git a/epan/dissectors/packet-telnet.c b/epan/dissectors/packet-telnet.c index d56a9e742c..51056fe3fb 100644 --- a/epan/dissectors/packet-telnet.c +++ b/epan/dissectors/packet-telnet.c @@ -271,7 +271,7 @@ dissect_string_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, in break; default: - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); offset++; len--; @@ -305,7 +305,7 @@ dissect_tn3270_regime_subopt(packet_info *pinfo, const char *optname _U_, tvbuff len -= len; return; default: - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_subcommand, "Bogus value: %u", cmd); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_subcommand, "Bogus value: %u", cmd); break; } offset++; @@ -501,7 +501,7 @@ dissect_htstops_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i break; default: - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); offset++; len--; if (len > 0) @@ -677,7 +677,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_baud_rate, tvb, offset, 5, baud, "%s Baud Rate: %d",source,baud); } } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_baud_rate, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_baud_rate, "%s ", source); } break; @@ -689,7 +689,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_data_size, tvb, offset, 2, datasize, "%s Data Size: %s",source,ds); } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_data_size, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_data_size, "%s ", source); } break; @@ -701,7 +701,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_parity, tvb, offset, 2, parity, "%s Parity: %s",source,pr); } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_parity, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_parity, "%s ", source); } break; case TNCOMPORT_SETSTOPSIZE: @@ -712,7 +712,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_stop, tvb, offset, 2, stop, "%s Stop: %s",source,st); } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_stop, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_stop, "%s ", source); } break; @@ -724,7 +724,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_control, tvb, offset, 2, crt, "%s Stop: %s",source,c); } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_control, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_control, "%s ", source); } break; @@ -754,7 +754,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i } else { const char *print_pattern = (cmd == TNCOMPORT_SETLINESTATEMASK) ? "%s " : "%s "; - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_linestate, print_pattern, source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_linestate, print_pattern, source); } break; @@ -784,7 +784,7 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i } else { const char *print_pattern = (cmd == TNCOMPORT_SETMODEMSTATEMASK) ? "%s " : "%s "; - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_modemstate, print_pattern, source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_modemstate, print_pattern, source); } break; @@ -806,12 +806,12 @@ dissect_comport_subopt(packet_info *pinfo, const char *optname, tvbuff_t *tvb, i proto_tree_add_uint_format_value(tree, hf_telnet_comport_subopt_purge, tvb, offset, 2, purge, "%s %s",source,p); } else { - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_purge, "%s ", source); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_purge, "%s ", source); } break; default: - expert_add_info_format_text(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); + expert_add_info_format(pinfo, item, &ei_telnet_invalid_subcommand, "Invalid %s subcommand %u", optname, cmd); offset++; len--; if (len > 0) @@ -1044,7 +1044,7 @@ dissect_krb5_authentication_data(packet_info *pinfo, tvbuff_t *tvb, int offset, if(krb5_tvb) dissect_kerberos_main(krb5_tvb, pinfo, tree, FALSE, NULL); else - expert_add_info_format_text(pinfo, ti, &ei_telnet_kerberos_blob_too_long, "Kerberos blob (too long to dissect - length %u > %u)", len, MAX_KRB5_BLOB_LEN); + expert_add_info_format(pinfo, ti, &ei_telnet_kerberos_blob_too_long, "Kerberos blob (too long to dissect - length %u > %u)", len, MAX_KRB5_BLOB_LEN); } } @@ -1584,13 +1584,13 @@ telnet_sub_option(packet_info *pinfo, proto_tree *option_tree, proto_item *optio case NO_LENGTH: /* There isn't supposed to *be* sub-option negotiation for this. */ - expert_add_info_format_text(pinfo, option_item, &ei_telnet_suboption_length, "Bogus suboption data"); + expert_add_info_format(pinfo, option_item, &ei_telnet_suboption_length, "Bogus suboption data"); return offset; case FIXED_LENGTH: /* Make sure the length is what it's supposed to be. */ if (subneg_len - iac_data != options[opt_byte].optlen) { - expert_add_info_format_text(pinfo, option_item, &ei_telnet_suboption_length, "Suboption parameter length is %d, should be %d", subneg_len, options[opt_byte].optlen); + expert_add_info_format(pinfo, option_item, &ei_telnet_suboption_length, "Suboption parameter length is %d, should be %d", subneg_len, options[opt_byte].optlen); return offset; } break; @@ -1598,7 +1598,7 @@ telnet_sub_option(packet_info *pinfo, proto_tree *option_tree, proto_item *optio case VARIABLE_LENGTH: /* Make sure the length is greater than the minimum. */ if (subneg_len - iac_data < options[opt_byte].optlen) { - expert_add_info_format_text(pinfo, option_item, &ei_telnet_suboption_length, "Suboption parameter length is %d, should be at least %d", subneg_len, options[opt_byte].optlen); + expert_add_info_format(pinfo, option_item, &ei_telnet_suboption_length, "Suboption parameter length is %d, should be at least %d", subneg_len, options[opt_byte].optlen); return offset; } break; diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c index 1794edb694..d40c071880 100644 --- a/epan/dissectors/packet-tnef.c +++ b/epan/dissectors/packet-tnef.c @@ -526,7 +526,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* check the signature */ if(signature != TNEF_SIGNATURE) { - expert_add_info_format_text(pinfo, item, &ei_tnef_incorrect_signature, + expert_add_info_format(pinfo, item, &ei_tnef_incorrect_signature, " [Incorrect, should be 0x%x. No further dissection possible. Check any Content-Transfer-Encoding has been removed.]", TNEF_SIGNATURE); return; diff --git a/epan/dissectors/packet-trmac.c b/epan/dissectors/packet-trmac.c index 12c57773b3..a2df352243 100644 --- a/epan/dissectors/packet-trmac.c +++ b/epan/dissectors/packet-trmac.c @@ -173,7 +173,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) /* Check the SV length; it must be at least 2, to include the subvector length and indicator. */ if (sv_length < 2) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Invalid subvector: length < 2"); return 0; /* tells our caller to give up */ } @@ -185,7 +185,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) switch(sv_id) { case 0x01: /* Beacon Type */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -198,7 +198,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x02: /* Upstream Neighbor's Address */ if (sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 8"); break; } @@ -209,7 +209,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x03: /* Local Ring Number */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -221,7 +221,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x04: /* Assign Physical Drop Number */ if (sv_length != 6) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 6"); break; } @@ -232,7 +232,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x05: /* Error Report Timer Value */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -246,7 +246,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x06: /* Authorized Function Classes */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -257,7 +257,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x07: /* Authorized Access Priority */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -268,7 +268,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x09: /* Correlator */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -279,7 +279,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x0A: /* SA of Last AMP or SMP Frame */ if (sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 8"); break; } @@ -291,7 +291,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x0B: /* Physical Drop Number */ if (sv_length != 6) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 6"); break; } @@ -302,7 +302,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x20: /* Response Code */ if (sv_length != 4 && sv_length != 6) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4 and != 6"); break; } @@ -333,7 +333,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x21: /* Individual Address Count */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -364,7 +364,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x28: /* Station Identifier */ if (sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 8"); break; } @@ -381,7 +381,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x2A: /* Transmit Status Code */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } @@ -392,7 +392,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x2B: /* Group Address */ if (sv_length != 6 && sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 6 and != 8"); break; } @@ -410,7 +410,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x2C: /* Functional Addresses */ if (sv_length != 6) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 6"); break; } @@ -421,7 +421,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x2D: /* Isolating Error Counts */ if (sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 8"); break; } @@ -440,7 +440,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x2E: /* Non-Isolating Error Counts */ if (sv_length != 8) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 8"); break; } @@ -458,7 +458,7 @@ sv_text(tvbuff_t *tvb, int svoff, packet_info *pinfo, proto_tree *tree) case 0x30: /* Error Code */ if (sv_length != 4) { - expert_add_info_format_text(pinfo, len_item, &ei_trmac_sv_len, + expert_add_info_format(pinfo, len_item, &ei_trmac_sv_len, "Subvector length is != 4"); break; } diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 443c319e1c..5e6993091d 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -404,7 +404,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) /* The beginning port number, 32768 + 666 (33434), is from LBL's traceroute.c source code and this code * further assumes that 3 attempts are made per hop */ if(udph->uh_sport > 32768 + 666 && udph->uh_sport <= 32768 + 666 + 30) - expert_add_info_format_text(pinfo, port_item, &ei_udp_possible_traceroute, "Possible traceroute: hop #%u, attempt #%u", + expert_add_info_format(pinfo, port_item, &ei_udp_possible_traceroute, "Possible traceroute: hop #%u, attempt #%u", ((udph->uh_sport - 32768 - 666 - 1) / 3) + 1, ((udph->uh_sport - 32768 - 666 - 1) % 3) + 1 ); @@ -412,7 +412,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) port_item = proto_tree_add_uint_format(udp_tree, hfi_udp_dstport.id, tvb, offset + 2, 2, udph->uh_dport, "Destination port: %s (%u)", get_udp_port(udph->uh_dport), udph->uh_dport); if(udph->uh_dport > 32768 + 666 && udph->uh_dport <= 32768 + 666 + 30) - expert_add_info_format_text(pinfo, port_item, &ei_udp_possible_traceroute, "Possible traceroute: hop #%u, attempt #%u", + expert_add_info_format(pinfo, port_item, &ei_udp_possible_traceroute, "Possible traceroute: hop #%u, attempt #%u", ((udph->uh_dport - 32768 - 666 - 1) / 3) + 1, ((udph->uh_dport - 32768 - 666 - 1) % 3) + 1 ); @@ -430,7 +430,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) /* XXX - should handle IPv6 UDP jumbograms (RFC 2675), where the length is zero */ item = proto_tree_add_uint_format(udp_tree, hfi_udp_length.id, tvb, offset + 4, 2, udph->uh_ulen, "Length: %u (bogus, must be >= 8)", udph->uh_ulen); - expert_add_info_format_text(pinfo, item, &ei_udp_length, "Bad length value %u < 8", udph->uh_ulen); + expert_add_info_format(pinfo, item, &ei_udp_length, "Bad length value %u < 8", udph->uh_ulen); col_append_fstr(pinfo->cinfo, COL_INFO, " [BAD UDP LENGTH %u < 8]", udph->uh_ulen); return; } @@ -438,7 +438,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) /* Bogus length - it goes past the end of the IP payload */ item = proto_tree_add_uint_format(udp_tree, hfi_udp_length.id, tvb, offset + 4, 2, udph->uh_ulen, "Length: %u (bogus, payload length %u)", udph->uh_ulen, tvb_reported_length(tvb)); - expert_add_info_format_text(pinfo, item, &ei_udp_length, "Bad length value %u > IP payload length", udph->uh_ulen); + expert_add_info_format(pinfo, item, &ei_udp_length, "Bad length value %u > IP payload length", udph->uh_ulen); col_append_fstr(pinfo->cinfo, COL_INFO, " [BAD UDP LENGTH %u > IP PAYLOAD LENGTH]", udph->uh_ulen); } else { if (tree) { @@ -463,7 +463,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) item = proto_tree_add_uint_format(udp_tree, hfi_udplite_checksum_coverage.id, tvb, offset + 4, 2, udph->uh_sum_cov, "Checksum coverage: %u (bogus, must be >= 8 and <= %u (ip.len-ip.hdr_len))", udph->uh_sum_cov, udph->uh_ulen); - expert_add_info_format_text(pinfo, item, &ei_udplite_checksum_coverage, "Bad checksum coverage length value %u < 8 or > %u", + expert_add_info_format(pinfo, item, &ei_udplite_checksum_coverage, "Bad checksum coverage length value %u < 8 or > %u", udph->uh_sum_cov, udph->uh_ulen); col_append_fstr(pinfo->cinfo, COL_INFO, " [BAD LIGHTWEIGHT UDP CHECKSUM COVERAGE LENGTH %u < 8 or > %u]", udph->uh_sum_cov, udph->uh_ulen); diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 5f98198721..e8d23470c3 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -970,7 +970,7 @@ dissect_spare_extension_and_crc(tvbuff_t *tvb, packet_info *pinfo, ti = proto_tree_add_item(tree, hf_fp_spare_extension, tvb, offset, remain-crc_size, ENC_NA); proto_item_append_text(ti, " (%u octets)", remain-crc_size); - expert_add_info_format_text(pinfo, ti, &ei_fp_spare_extension, "Spare Extension present (%u bytes)", remain-crc_size); + expert_add_info_format(pinfo, ti, &ei_fp_spare_extension, "Spare Extension present (%u bytes)", remain-crc_size); offset += remain-crc_size; } @@ -2111,7 +2111,7 @@ dissect_dch_timing_adjustment(proto_tree *tree, packet_info *pinfo, tvbuff_t *tv toa_ti = proto_tree_add_item(tree, hf_fp_toa, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - expert_add_info_format_text(pinfo, toa_ti, &ei_fp_timing_adjustmentment_reported, "Timing adjustmentment reported (%f ms)", (float)(toa / 8)); + expert_add_info_format(pinfo, toa_ti, &ei_fp_timing_adjustmentment_reported, "Timing adjustmentment reported (%f ms)", (float)(toa / 8)); col_append_fstr(pinfo->cinfo, COL_INFO, " CFN = %u, ToA = %d", control_cfn, toa); @@ -2660,7 +2660,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (ddi_size == -1) { - expert_add_info_format_text(pinfo, ddi_ti, &ei_fp_ddi_not_defined, "DDI %u not defined for this UE!", (guint)ddi); + expert_add_info_format(pinfo, ddi_ti, &ei_fp_ddi_not_defined, "DDI %u not defined for this UE!", (guint)ddi); return; } else { @@ -2950,7 +2950,7 @@ dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto do { /* Check we haven't gone past the limit */ if (macis_sdus_found++ > total_macis_sdus) { - expert_add_info_format_text(pinfo, f_ti, &ei_fp_mac_is_sdus_miscount, "Found too many (%u) MAC-is SDUs - header said there were %u", macis_sdus_found, (guint16)total_macis_sdus); + expert_add_info_format(pinfo, f_ti, &ei_fp_mac_is_sdus_miscount, "Found too many (%u) MAC-is SDUs - header said there were %u", macis_sdus_found, (guint16)total_macis_sdus); } /* LCH-ID */ @@ -2996,7 +2996,7 @@ dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto /* Check overall count of MAC-is SDUs */ if (macis_sdus_found != total_macis_sdus) { - expert_add_info_format_text(pinfo, subframe_macis_descriptors_ti, &ei_fp_mac_is_sdus_miscount, "Frame contains %u MAC-is SDUs - header said there would be %u!", macis_sdus_found, (guint16)total_macis_sdus); + expert_add_info_format(pinfo, subframe_macis_descriptors_ti, &ei_fp_mac_is_sdus_miscount, "Frame contains %u MAC-is SDUs - header said there would be %u!", macis_sdus_found, (guint16)total_macis_sdus); } header_length = offset; /* Now PDUs */ diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 1b2160db85..09b05c2d7a 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -349,12 +349,12 @@ static void dissect_mac_fdd_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * break; default: proto_item_append_text(ti, " (Unknown RACH DCCH/DTCH Content)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, "Unknown RACH DCCH/DTCH Content"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, "Unknown RACH DCCH/DTCH Content"); } break; default: proto_item_append_text(ti, " (Unknown RACH TCTF)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_rach_tctf_unknown, "Unknown RACH TCTF"); + expert_add_info_format(pinfo, NULL, &ei_mac_rach_tctf_unknown, "Unknown RACH TCTF"); } } @@ -442,7 +442,7 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * break; default: proto_item_append_text(ti, " (Unknown FACH Content"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, "Unknown FACH Content for this transportblock"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, "Unknown FACH Content for this transportblock"); } break; case TCTF_CTCH_FACH_FDD: @@ -481,7 +481,7 @@ static void dissect_mac_fdd_fach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * break; default: proto_item_append_text(ti, " (Unknown FACH Content)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, " Unknown FACH Content"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, " Unknown FACH Content"); break; } } @@ -598,7 +598,7 @@ static void dissect_mac_fdd_dch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t break; default: proto_item_append_text(ti, " (Unknown DCH Content)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, "Unknown DCH Content"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, "Unknown DCH Content"); } } @@ -928,7 +928,7 @@ static void call_rlc(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, pro break; default: proto_item_append_text(ti, " (Unknown EDCH Content)"); - expert_add_info_format_text(pinfo, ti, &ei_mac_unknown_content, "Unknown EDCH Content"); + expert_add_info_format(pinfo, ti, &ei_mac_unknown_content, "Unknown EDCH Content"); break; } } @@ -1056,7 +1056,7 @@ static void dissect_mac_fdd_edch(tvbuff_t *tvb, packet_info *pinfo, proto_tree * break; default: proto_item_append_text(ti, " (Unknown EDCH Content)"); - expert_add_info_format_text(pinfo, ti, &ei_mac_unknown_content, "Unknown EDCH Content"); + expert_add_info_format(pinfo, ti, &ei_mac_unknown_content, "Unknown EDCH Content"); break; } } @@ -1117,7 +1117,7 @@ static void dissect_mac_fdd_hsdsch_common(tvbuff_t *tvb, packet_info *pinfo, pro default: proto_item_append_text(ti, " (Unknown HSDSCH-Common Content)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, "Unknown HSDSCH-Common Content"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, "Unknown HSDSCH-Common Content"); break; } @@ -1265,7 +1265,7 @@ static void dissect_mac_fdd_hsdsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree break; default: proto_item_append_text(ti, " (Unknown HSDSCH Content)"); - expert_add_info_format_text(pinfo, NULL, &ei_mac_unknown_content, "Unknown HSDSCH Content"); + expert_add_info_format(pinfo, NULL, &ei_mac_unknown_content, "Unknown HSDSCH Content"); } } diff --git a/epan/dissectors/packet-usb-video.c b/epan/dissectors/packet-usb-video.c index d4197cd8af..0ea99dd3bf 100644 --- a/epan/dissectors/packet-usb-video.c +++ b/epan/dissectors/packet-usb-video.c @@ -1004,7 +1004,7 @@ dissect_usb_video_control_interface_descriptor(proto_tree *parent_tree, tvbuff_t } else { - expert_add_info_format_text(pinfo, subtype_item, &ei_usb_vid_subtype_unknown, + expert_add_info_format(pinfo, subtype_item, &ei_usb_vid_subtype_unknown, "Unknown VC subtype %u", subtype); } } diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c index 5cc5bdd124..5b001e6bea 100644 --- a/epan/dissectors/packet-user_encap.c +++ b/epan/dissectors/packet-user_encap.c @@ -98,7 +98,7 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) { "check your Preferences->Protocols->DLT_USER", pinfo->match_uint + 147 - WTAP_ENCAP_USER0); proto_item_set_text(item,"%s",msg); - expert_add_info_format_text(pinfo, item, &ei_user_encap_not_handled, "%s", msg); + expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg); call_dissector(data_handle, tvb, pinfo, tree); return; @@ -109,7 +109,7 @@ static void dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) { encap->payload_proto_name, pinfo->match_uint + 147 - WTAP_ENCAP_USER0); proto_item_set_text(item,"%s",msg); - expert_add_info_format_text(pinfo, item, &ei_user_encap_not_handled, "%s", msg); + expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg); call_dissector(data_handle, tvb, pinfo, tree); return; diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index 1e720559b8..02903d14a4 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -1877,7 +1877,7 @@ vnc_server_framebuffer_update(tvbuff_t *tvb, packet_info *pinfo, gint *offset, ti = proto_tree_add_item(tree, hf_vnc_rectangle_num, tvb, *offset, 2, ENC_BIG_ENDIAN); if (num_rects > 5000) { - expert_add_info_format_text(pinfo, ti, &ei_vnc_too_many_rectangles, + expert_add_info_format(pinfo, ti, &ei_vnc_too_many_rectangles, "Too many rectangles (%d), aborting dissection", num_rects); return(0); } @@ -2139,7 +2139,7 @@ vnc_rre_encoding(tvbuff_t *tvb, packet_info *pinfo, gint *offset, *offset += 4; if (num_subrects > 10000) { - expert_add_info_format_text(pinfo, ti, &ei_vnc_too_many_sub_rectangles, + expert_add_info_format(pinfo, ti, &ei_vnc_too_many_sub_rectangles, "Too many sub-rectangles (%d), aborting dissection", num_subrects); return(0); } @@ -3190,7 +3190,7 @@ vnc_server_set_colormap_entries(tvbuff_t *tvb, packet_info *pinfo, gint *offset, *offset, 2, ENC_BIG_ENDIAN); if (number_of_colors > 10000) { - expert_add_info_format_text(pinfo, ti, &ei_vnc_too_many_colors,"Too many colors (%d), aborting dissection", + expert_add_info_format(pinfo, ti, &ei_vnc_too_many_colors,"Too many colors (%d), aborting dissection", number_of_colors); return(0); } @@ -3257,7 +3257,7 @@ vnc_server_cut_text(tvbuff_t *tvb, packet_info *pinfo, gint *offset, *offset += 4; if (text_len > 100000) { - expert_add_info_format_text(pinfo, pi, &ei_vnc_too_many_cut_text, + expert_add_info_format(pinfo, pi, &ei_vnc_too_many_cut_text, "Too much cut text (%d), aborting dissection", text_len); return(0); } diff --git a/epan/dissectors/packet-vrrp.c b/epan/dissectors/packet-vrrp.c index e7d172d5a6..57024a34b7 100644 --- a/epan/dissectors/packet-vrrp.c +++ b/epan/dissectors/packet-vrrp.c @@ -198,7 +198,7 @@ dissect_vrrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ hidden_item = proto_tree_add_boolean(vrrp_tree, hf_vrrp_checksum_bad, tvb, offset, 2, TRUE); PROTO_ITEM_SET_HIDDEN(hidden_item); proto_item_append_text(checksum_item, " [incorrect, should be 0x%04x]", in_cksum_shouldbe(cksum, computed_cksum)); - expert_add_info_format_text(pinfo, checksum_item, &ei_vrrp_checksum, + expert_add_info_format(pinfo, checksum_item, &ei_vrrp_checksum, "VRRP Checksum Incorrect, should be 0x%04x", in_cksum_shouldbe(cksum, computed_cksum)); } diff --git a/epan/dissectors/packet-vtp.c b/epan/dissectors/packet-vtp.c index 27114e85be..8cf5cebe8d 100644 --- a/epan/dissectors/packet-vtp.c +++ b/epan/dissectors/packet-vtp.c @@ -424,7 +424,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_src_route_ring_num, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Source-Routing Ring Number: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Source-Routing Ring Number: Bad length %u", length); } break; @@ -432,7 +432,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_src_route_bridge_num, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Source-Routing Bridge Number: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Source-Routing Bridge Number: Bad length %u", length); } break; @@ -440,7 +440,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_stp_type, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Spanning-Tree Protocol Type: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Spanning-Tree Protocol Type: Bad length %u", length); } break; @@ -448,7 +448,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_parent_vlan, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Parent VLAN: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Parent VLAN: Bad length %u", length); } break; @@ -456,7 +456,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_translationally_bridged_vlans, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Translationally Bridged VLANs: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Translationally Bridged VLANs: Bad length %u", length); } break; @@ -464,7 +464,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_pruning, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Pruning: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Pruning: Bad length %u", length); } break; @@ -472,7 +472,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_bridge_type, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Bridge Type: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Bridge Type: Bad length %u", length); } break; @@ -480,7 +480,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_max_are_hop_count, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Max ARE Hop Count: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Max ARE Hop Count: Bad length %u", length); } break; @@ -488,7 +488,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_max_ste_hop_count, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Max STE Hop Count: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Max STE Hop Count: Bad length %u", length); } break; @@ -496,7 +496,7 @@ dissect_vlan_info_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, if (length == 2) { proto_tree_add_item(tree, hf_vtp_vlan_backup_crf_mode, tvb, offset, 2, ENC_BIG_ENDIAN); } else { - expert_add_info_format_text(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Backup CRF Mode: Bad length %u", length); + expert_add_info_format(pinfo, ti, &ei_vtp_vlan_tlvlength_bad, "Backup CRF Mode: Bad length %u", length); } break; diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c index 05b148dc5a..8ffc21956e 100644 --- a/epan/dissectors/packet-wccp.c +++ b/epan/dissectors/packet-wccp.c @@ -912,7 +912,7 @@ dissect_wccp2_info(tvbuff_t *tvb, int offset, guint16 length, tf = proto_tree_add_text(wccp_tree, tvb, offset, length, "Invalid WCCP Type/Length values"); - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The packet only has %d bytes left. That is not enough for a WCCP item type and length.", length); break; @@ -925,7 +925,7 @@ dissect_wccp2_info(tvbuff_t *tvb, int offset, guint16 length, if (item_length > tvb_length_remaining(tvb, offset)) { tf = proto_tree_add_text(wccp_tree, tvb, offset, length, "Excessive WCCP Length values"); - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The length of the item is %d but there are only %d bytes remaining in the packet, I counted %d remaining", item_length, tvb_length_remaining(tvb, offset), length); break; @@ -1030,7 +1030,7 @@ dissect_wccp2_info(tvbuff_t *tvb, int offset, guint16 length, length -= 4; if (length < item_length) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The item has length %d but the remaining WCCP data is only %d long", item_length, length); @@ -1041,13 +1041,13 @@ dissect_wccp2_info(tvbuff_t *tvb, int offset, guint16 length, /* warn if we left bytes */ if (remaining_item_length > 0) - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The dissector left %d bytes undecoded", remaining_item_length); /* error if we needed more bytes */ if (remaining_item_length < 0) - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The dissector needed %d more bytes to decode the packet, but the item is not that long", remaining_item_length); @@ -1919,7 +1919,7 @@ dissect_wccp2r1_address_table_info(tvbuff_t *tvb, int offset, wccp_wccp_address_table.table_ipv4 = (guint32 *) ep_alloc( wccp_wccp_address_table.table_length * 4); if ((address_length != 4) && (pinfo && info_tree)) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The Address length must be 4, but I found %d for IPv4 addresses. Correcting this.", address_length); address_length = 4; @@ -1930,7 +1930,7 @@ dissect_wccp2r1_address_table_info(tvbuff_t *tvb, int offset, wccp_wccp_address_table.table_ipv6 = (struct e_in6_addr *) ep_alloc( wccp_wccp_address_table.table_length * sizeof(struct e_in6_addr)); if ((address_length != 16) && (pinfo && info_tree)) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "The Address length must be 16, but I found %d for IPv6 addresses. Correcting this", address_length); address_length=16; @@ -1938,7 +1938,7 @@ dissect_wccp2r1_address_table_info(tvbuff_t *tvb, int offset, break; default: if (pinfo && info_tree) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_address_table_family_unknown, + expert_add_info_format(pinfo, tf, &ei_wccp_address_table_family_unknown, "Unknown address family: %d", wccp_wccp_address_table.family); } }; @@ -1951,7 +1951,7 @@ dissect_wccp2r1_address_table_info(tvbuff_t *tvb, int offset, /* do we have space? */ if (length < address_length) { if (pinfo && tf) - expert_add_info_format_text(pinfo, tf, &ei_wccp_length_bad, "Ran out of space to decode"); + expert_add_info_format(pinfo, tf, &ei_wccp_length_bad, "Ran out of space to decode"); /* first clean up: */ wccp_wccp_address_table.in_use = FALSE; @@ -2078,12 +2078,12 @@ dissect_wccp2r1_alt_assignment_map_info(tvbuff_t *tvb, int offset, EAT(2); if (length < assignment_length) - expert_add_info_format_text(pinfo, tf, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_assignment_length_bad, "Assignment length is %d but only %d remain in the packet. Ignoring this for now", assignment_length, length); if (length > assignment_length) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_assignment_length_bad, "Assignment length is %d but %d remain in the packet. Assuming that the assignment length is wrong and setting it to %d.", assignment_length, length, length); assignment_length = length; @@ -2255,7 +2255,7 @@ dissect_wccp2_extended_assignment_data_element(tvbuff_t *tvb, int offset, gint l EAT(2); if (length < assignment_length) - expert_add_info_format_text(pinfo, element_item, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, element_item, &ei_wccp_assignment_length_bad, "Assignment length is %d but only %d remain in the packet. Ignoring this for now", assignment_length, length); @@ -2264,7 +2264,7 @@ dissect_wccp2_extended_assignment_data_element(tvbuff_t *tvb, int offset, gint l if ((length > assignment_length) && (length == (assignment_length + 4))) { - expert_add_info_format_text(pinfo, element_item, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, element_item, &ei_wccp_assignment_length_bad, "Assignment length is %d but %d remain in the packet. Assuming that this is wrong as this is only 4 bytes to small, proceding with the assumption it is %d", assignment_length, length, length); assignment_length = length; @@ -2324,7 +2324,7 @@ dissect_wccp2_capability_element(tvbuff_t *tvb, int offset, gint length, val_to_str(capability_type, capability_type_vals, "Unknown (0x%08X)")); if (capability_val_len < 4) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_capability_element_length, + expert_add_info_format(pinfo, tf, &ei_wccp_capability_element_length, "Value Length: %u (illegal, must be >= 4)", capability_val_len); return -length; } @@ -2785,12 +2785,12 @@ dissect_wccp2_alternate_assignment_info(tvbuff_t *tvb, int offset, gint length, EAT(2); if (length < assignment_length) - expert_add_info_format_text(pinfo, tf, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_assignment_length_bad, "Assignment length is %d but only %d remain in the packet. Ignoring this for now", assignment_length, length); if (length > assignment_length) { - expert_add_info_format_text(pinfo, tf, &ei_wccp_assignment_length_bad, + expert_add_info_format(pinfo, tf, &ei_wccp_assignment_length_bad, "Assignment length is %d but %d remain in the packet. Assuming that the assignment length is wrong and setting it to %d.", assignment_length, length, length); assignment_length = length; diff --git a/epan/dissectors/packet-wcp.c b/epan/dissectors/packet-wcp.c index 405d2dd87e..827de75c30 100644 --- a/epan/dissectors/packet-wcp.c +++ b/epan/dissectors/packet-wcp.c @@ -490,7 +490,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin src_tvb, offset, cnt - offset, ENC_NA); cd_tree = proto_item_add_subtree(cd_item, ett_wcp_comp_data); if (cnt - offset > MAX_WCP_BUF_LEN) { - expert_add_info_format_text(pinfo, cd_item, &ei_wcp_compressed_data_exceeds, + expert_add_info_format(pinfo, cd_item, &ei_wcp_compressed_data_exceeds, "Compressed data exceeds maximum buffer length (%d > %d)", cnt - offset, MAX_WCP_BUF_LEN); return NULL; @@ -509,7 +509,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin if ( !pinfo->fd->flags.visited){ /* if first pass */ dst = decompressed_entry( src, dst, &len, buf_start, buf_end); if (dst == NULL){ - expert_add_info_format_text(pinfo, cd_item, &ei_wcp_uncompressed_data_exceeds, + expert_add_info_format(pinfo, cd_item, &ei_wcp_uncompressed_data_exceeds, "Uncompressed data exceeds maximum buffer length (%d > %d)", len, MAX_WCP_BUF_LEN); return NULL; @@ -543,7 +543,7 @@ static tvbuff_t *wcp_uncompress( tvbuff_t *src_tvb, int offset, packet_info *pin } }else { if ( ++len >MAX_WCP_BUF_LEN){ - expert_add_info_format_text(pinfo, cd_item, &ei_wcp_uncompressed_data_exceeds, + expert_add_info_format(pinfo, cd_item, &ei_wcp_uncompressed_data_exceeds, "Uncompressed data exceeds maximum buffer length (%d > %d)", len, MAX_WCP_BUF_LEN); return NULL; diff --git a/epan/dissectors/packet-websocket.c b/epan/dissectors/packet-websocket.c index 74b432e4e6..d4743ec11a 100644 --- a/epan/dissectors/packet-websocket.c +++ b/epan/dissectors/packet-websocket.c @@ -291,7 +291,7 @@ dissect_websocket_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, p default: /* Unknown */ ti = proto_tree_add_item(pl_tree, hf_ws_payload_unknown, tvb, offset, payload_length, ENC_NA); - expert_add_info_format_text(pinfo, ti, &ei_ws_payload_unknown, "Dissector for Websocket Opcode (%d)" + expert_add_info_format(pinfo, ti, &ei_ws_payload_unknown, "Dissector for Websocket Opcode (%d)" " code not implemented, Contact Wireshark developers" " if you want this supported", opcode); break; diff --git a/epan/dissectors/packet-wifi-display.c b/epan/dissectors/packet-wifi-display.c index b72785e470..340d14c993 100644 --- a/epan/dissectors/packet-wifi-display.c +++ b/epan/dissectors/packet-wifi-display.c @@ -186,7 +186,7 @@ dissect_wfd_subelem_associated_bssid(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, int len) { if (len < 6) { - expert_add_info_format_text(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Associated BSSID"); + expert_add_info_format(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Associated BSSID"); return; } proto_tree_add_item(tree, hf_wfd_subelem_assoc_bssid, tvb, offset, 6, ENC_NA); @@ -197,7 +197,7 @@ dissect_wfd_subelem_coupled_sink(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, int len) { if (len < 1) { - expert_add_info_format_text(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Coupled Sink"); + expert_add_info_format(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Coupled Sink"); return; } proto_tree_add_item(tree, hf_wfd_subelem_coupled_sink_status_bitmap, @@ -205,7 +205,7 @@ dissect_wfd_subelem_coupled_sink(packet_info *pinfo, proto_tree *tree, proto_tree_add_item(tree, hf_wfd_subelem_coupled_sink_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); if (len < 1 + 6) { - expert_add_info_format_text(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Coupled Sink"); + expert_add_info_format(pinfo, tree, &ei_wfd_subelem_len_invalid, "Too short Wi-Fi Display Coupled Sink"); return; } proto_tree_add_item(tree, hf_wfd_subelem_coupled_sink_mac_addr, tvb, @@ -317,7 +317,7 @@ void dissect_wifi_display_ie(packet_info *pinfo, proto_tree *tree, while (offset < end) { if (end - offset < 2) { - expert_add_info_format_text(pinfo, tree, &ei_wfd_subelem_len_invalid, "Packet too short for Wi-Fi Display subelement"); + expert_add_info_format(pinfo, tree, &ei_wfd_subelem_len_invalid, "Packet too short for Wi-Fi Display subelement"); break; } @@ -327,7 +327,7 @@ void dissect_wifi_display_ie(packet_info *pinfo, proto_tree *tree, val_to_str(id, wfd_subelem_ids, "Unknown subelement ID (%u)")); if (offset + 3 + len > end) { - expert_add_info_format_text(pinfo, subelem, &ei_wfd_subelem_len_invalid, "Packet too short for Wi-Fi Display subelement payload"); + expert_add_info_format(pinfo, subelem, &ei_wfd_subelem_len_invalid, "Packet too short for Wi-Fi Display subelement payload"); } wfd_tree = proto_item_add_subtree(subelem, ett_wfd_subelem); diff --git a/epan/dissectors/packet-wifi-p2p.c b/epan/dissectors/packet-wifi-p2p.c index c3e1dcaf3d..0c63befa0e 100644 --- a/epan/dissectors/packet-wifi-p2p.c +++ b/epan/dissectors/packet-wifi-p2p.c @@ -583,7 +583,7 @@ static void dissect_wifi_p2p_device_info(packet_info *pinfo, tvb, s_offset, 2, ENC_BIG_ENDIAN); attr_type = tvb_get_ntohs(tvb, s_offset); if (attr_type != 0x1011) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_dev_info_dev_name_type, "Incorrect Device Name attribute type"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_dev_info_dev_name_type, "Incorrect Device Name attribute type"); } s_offset += 2; item = proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_dev_name_len, @@ -591,7 +591,7 @@ static void dissect_wifi_p2p_device_info(packet_info *pinfo, attr_len = tvb_get_ntohs(tvb, s_offset); s_offset += 2; if (attr_len > offset + 3 + slen - s_offset) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute length"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute length"); return; } nlen = offset + 3 + slen - s_offset; @@ -601,7 +601,7 @@ static void dissect_wifi_p2p_device_info(packet_info *pinfo, nlen > attr_len ? attr_len : nlen, ENC_ASCII|ENC_NA); if (nlen != attr_len) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute"); } } @@ -670,7 +670,7 @@ static void dissect_wifi_p2p_group_bssid(packet_info *pinfo, guint8 addr[6]; if (slen != 6) { - expert_add_info_format_text(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Invalid ethernet address"); + expert_add_info_format(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Invalid ethernet address"); return; } @@ -688,7 +688,7 @@ static void dissect_notice_of_absence(packet_info *pinfo, proto_item *tlv_root, int s_offset = offset + 3; if (slen < 2) { - expert_add_info_format_text(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Too short NoA"); + expert_add_info_format(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Too short NoA"); return; } @@ -732,7 +732,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, while (offset + 3 + slen > s_offset) { if (offset + 3 + slen - s_offset < 25) { - expert_add_info_format_text(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Too short P2P Client Info Descriptor"); + expert_add_info_format(pinfo, tlv_item, &ei_wifi_p2p_attr_len, "Too short P2P Client Info Descriptor"); break; } @@ -744,7 +744,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, item = proto_tree_add_item(tree, hf_p2p_attr_gi_length, tvb, s_offset, 1, ENC_BIG_ENDIAN); if (ci_len < 24 || s_offset + ci_len > offset + 3 + slen) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid P2P Client Info Descriptor Length"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid P2P Client Info Descriptor Length"); break; } s_offset++; @@ -799,7 +799,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, s_offset++; left = offset + 3 + slen - s_offset; if (left < 8 * num_sec) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Secondary Device Type List"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Secondary Device Type List"); break; } while (num_sec > 0) { @@ -813,7 +813,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, tvb, s_offset, 2, ENC_BIG_ENDIAN); attr_type = tvb_get_ntohs(tvb, s_offset); if (attr_type != 0x1011) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_dev_info_dev_name_type, "Incorrect Device Name attribute type"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_dev_info_dev_name_type, "Incorrect Device Name attribute type"); } s_offset += 2; item = proto_tree_add_item(tree, hf_p2p_attr_gi_dev_name_len, @@ -821,7 +821,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, attr_len = tvb_get_ntohs(tvb, s_offset); s_offset += 2; if (attr_len > offset + 3 + slen - s_offset) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute length"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute length"); break; } nlen = next_offset - s_offset; @@ -831,7 +831,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo, nlen > attr_len ? attr_len : nlen, ENC_ASCII|ENC_NA); if (nlen != attr_len) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_attr_len, "Invalid Device Name attribute"); } s_offset = next_offset; @@ -888,7 +888,7 @@ void dissect_wifi_p2p_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, while (size > 0) { if (size < 3) { - expert_add_info_format_text(pinfo, NULL, &ei_wifi_p2p_attr_len, "Packet too short for P2P IE"); + expert_add_info_format(pinfo, NULL, &ei_wifi_p2p_attr_len, "Packet too short for P2P IE"); break; } @@ -1011,11 +1011,11 @@ void dissect_wifi_p2p_anqp(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, len = tvb_get_letohs(tvb, offset); if (len < 2) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_anqp_length, "Too short Service TLV field"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_anqp_length, "Too short Service TLV field"); return; } if (len > tvb_length_remaining(tvb, offset + 2)) { - expert_add_info_format_text(pinfo, item, &ei_wifi_p2p_anqp_length, "Too short frame for Service TLV field"); + expert_add_info_format(pinfo, item, &ei_wifi_p2p_anqp_length, "Too short frame for Service TLV field"); return; } diff --git a/epan/dissectors/packet-wps.c b/epan/dissectors/packet-wps.c index 2db161812e..f3dc951880 100644 --- a/epan/dissectors/packet-wps.c +++ b/epan/dissectors/packet-wps.c @@ -988,7 +988,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_confirmation_url4, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_confirmation_url4; if (tlv_len > 64) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -996,7 +996,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_confirmation_url6, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_confirmation_url6; if (tlv_len > 76) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1025,7 +1025,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_device_name, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_device_name; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1040,7 +1040,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_e_hash1, tvb, offset+4, 32, ENC_NA); hfindex = hf_eapwps_tlv_e_hash1; if ((tlv_len != 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 32); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 32); break; @@ -1049,7 +1049,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_e_hash2, tvb, offset+4, 32, ENC_NA); hfindex = hf_eapwps_tlv_e_hash2; if ((tlv_len != 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 32); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 32); break; @@ -1058,7 +1058,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_e_snonce1, tvb, offset+4, 16, ENC_NA); hfindex = hf_eapwps_tlv_e_snonce1; if ((tlv_len != 16) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); break; @@ -1066,7 +1066,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_e_snonce2, tvb, offset+4, 16, ENC_NA); hfindex = hf_eapwps_tlv_e_snonce2; if ((tlv_len != 16) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); break; @@ -1098,7 +1098,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_enrollee_nonce, tvb, offset+4, 16, ENC_NA); hfindex = hf_eapwps_tlv_enrollee_nonce; if ((tlv_len != 16) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 16); break; @@ -1113,7 +1113,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_identity, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_identity; if ((tlv_len > 80) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1146,7 +1146,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_manufacturer, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_manufacturer; if ((tlv_len > 64) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1164,7 +1164,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_model_name, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_model_name; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1173,7 +1173,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_model_number, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_model_number; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1188,7 +1188,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_network_key, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_network_key; if ((tlv_len > 64) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1203,7 +1203,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_new_device_name, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_new_device_name; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1212,7 +1212,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_new_password, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_new_password; if ((tlv_len > 64) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1221,7 +1221,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_oob_device_password, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_oob_device_password; if ((tlv_len > 56) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1254,7 +1254,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_public_key, tvb, offset+4, 192, ENC_NA); hfindex = hf_eapwps_tlv_public_key; if ((tlv_len != 192) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 192); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_length_warn, fmt_length_warn, 192); break; @@ -1356,7 +1356,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_serial_number, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_serial_number; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1371,7 +1371,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_ssid, tvb, offset+4, tlv_len, ENC_ASCII|ENC_NA); hfindex = hf_eapwps_tlv_ssid; if ((tlv_len > 32) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1385,7 +1385,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_e, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_uuid_e; if ((tlv_len > 16) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1393,7 +1393,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_r, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_uuid_r; if ((tlv_len > 16) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1426,7 +1426,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_eap_identity, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_eap_identity; if ((tlv_len > 64) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1512,7 +1512,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_secondary_device_type_list, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_secondary_device_type_list; if ((tlv_len > 128) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1533,7 +1533,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_application_extension, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_application_extension; if ((tlv_len > 512) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1542,7 +1542,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_eap_type, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_eap_type; if ((tlv_len > 8) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; @@ -1569,7 +1569,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset, tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_appsessionkey, tvb, offset+4, tlv_len, ENC_NA); hfindex = hf_eapwps_tlv_appsessionkey; if ((tlv_len > 128) && pinfo) - expert_add_info_format_text(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); + expert_add_info_format(pinfo, tmp_item, &ei_eapwps_fmt_warn_too_long, fmt_warn_too_long, tlv_len); break; diff --git a/epan/dissectors/packet-xmcp.c b/epan/dissectors/packet-xmcp.c index 58787dee26..4c3a803fbc 100644 --- a/epan/dissectors/packet-xmcp.c +++ b/epan/dissectors/packet-xmcp.c @@ -500,7 +500,7 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, case 477: /* Already Registered */ case 499: /* Miscellaneous Request Error */ case 500: /* Responder Error */ - expert_add_info_format_text(pinfo, it, &ei_xmcp_attr_error_code_unusual, "Unusual error code (%u, %s)", error_code, val_to_str_const(error_code, error_codes, "Unknown")); + expert_add_info_format(pinfo, it, &ei_xmcp_attr_error_code_unusual, "Unusual error code (%u, %s)", error_code, val_to_str_const(error_code, error_codes, "Unknown")); break; default: break; @@ -642,7 +642,7 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, switch (tvb_get_guint8(tvb, (offset+1))) { case 0x01: /* IPv4 */ if (attr_length != 8) { - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed IPv4 address"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed IPv4 address"); } else { guint32 ip; proto_tree_add_item(attr_tree, xmcp_attr_servtrans_ipv4, tvb, @@ -654,7 +654,7 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, break; case 0x02: /* IPv6 */ if (attr_length != 20) { - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed IPv6 address"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed IPv6 address"); } else { struct e_in6_addr ipv6; proto_tree_add_item(attr_tree, xmcp_attr_servtrans_ipv6, tvb, @@ -688,7 +688,7 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, case XMCP_FLAGS: /* Flags is a series of type-value pairs */ if (attr_length % 4 != 0) { - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed Flags - length not divisible by 4"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Malformed Flags - length not divisible by 4"); } { guint16 flag_type, flag_value, current_offset = offset; @@ -823,9 +823,9 @@ decode_xmcp_attr_value (proto_tree *attr_tree, guint16 attr_type, (4 - (attr_length % 4)), ENC_NA); } if (attr_length < get_xmcp_attr_min_len(attr_type)) { - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Length less than minimum for this attribute type"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Length less than minimum for this attribute type"); } else if (attr_length > get_xmcp_attr_max_len(attr_type)) { - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Length exceeds maximum for this attribute type"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Length exceeds maximum for this attribute type"); } } @@ -946,7 +946,7 @@ dissect_xmcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(xmcp_tree, hf_xmcp_length, tvb, 2, 2, ENC_BIG_ENDIAN); msg_length = tvb_get_ntohs(tvb, 2); if ((guint)(msg_length + XMCP_HDR_LEN) > tvb_reported_length(tvb)) { - expert_add_info_format_text(pinfo, ti, &ei_xmcp_length_bad, "XMCP message length (%u-byte header + %u) exceeds packet length (%u)", XMCP_HDR_LEN, msg_length, tvb_reported_length(tvb)); + expert_add_info_format(pinfo, ti, &ei_xmcp_length_bad, "XMCP message length (%u-byte header + %u) exceeds packet length (%u)", XMCP_HDR_LEN, msg_length, tvb_reported_length(tvb)); return; } @@ -1019,7 +1019,7 @@ dissect_xmcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((offset + attr_length) > (XMCP_HDR_LEN + msg_length)) { proto_item_append_text(ti, " (bogus, exceeds message length)"); - expert_add_info_format_text(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Attribute length exceeds message length"); + expert_add_info_format(pinfo, attr_tree, &ei_xmcp_attr_length_bad, "Attribute length exceeds message length"); break; } @@ -1047,10 +1047,10 @@ dissect_xmcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else if (xmcp_msg_type_class == XMCP_CLASS_REQUEST || xmcp_msg_type_class == XMCP_CLASS_RESPONSE_SUCCESS) { if (xmcp_msg_type_method == XMCP_METHOD_REGISTER) { - expert_add_info_format_text(pinfo, xmcp_tree, &ei_xmcp_new_session, "New session - Register %s", val_to_str_const(xmcp_msg_type_class, classes, "")); + expert_add_info_format(pinfo, xmcp_tree, &ei_xmcp_new_session, "New session - Register %s", val_to_str_const(xmcp_msg_type_class, classes, "")); } else if (xmcp_msg_type_method == XMCP_METHOD_UNREGISTER || xmcp_msg_type_method == XMCP_METHOD_REG_REVOKE) { - expert_add_info_format_text(pinfo, xmcp_tree, &ei_xmcp_session_termination, "Session termination - %s %s", val_to_str_const(xmcp_msg_type_method, methods, ""), val_to_str_const(xmcp_msg_type_class, classes, "")); + expert_add_info_format(pinfo, xmcp_tree, &ei_xmcp_session_termination, "Session termination - %s %s", val_to_str_const(xmcp_msg_type_method, methods, ""), val_to_str_const(xmcp_msg_type_class, classes, "")); } } } diff --git a/epan/dissectors/packet-xmpp-core.c b/epan/dissectors/packet-xmpp-core.c index 7b0fdbc857..4aec4f64ef 100644 --- a/epan/dissectors/packet-xmpp-core.c +++ b/epan/dissectors/packet-xmpp-core.c @@ -258,7 +258,7 @@ xmpp_error(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t * error_info = wmem_strdup_printf(wmem_packet_scope(), "%s Text: %s", error_info, text_element->data?text_element->data->value:""); } - expert_add_info_format_text(pinfo, error_item, &ei_xmpp_response, "%s", error_info); + expert_add_info_format(pinfo, error_item, &ei_xmpp_response, "%s", error_info); xmpp_unknown(error_tree, tvb, pinfo, element); } @@ -714,7 +714,7 @@ xmpp_starttls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, tls_tree = proto_item_add_subtree(tls_item, ett_xmpp_starttls); if (xmpp_info->ssl_start && xmpp_info->ssl_start != pinfo->fd->num) { - expert_add_info_format_text(pinfo, tls_item, &ei_xmpp_starttls_already_in_frame, "Already saw STARTTLS in frame %u", xmpp_info->ssl_start); + expert_add_info_format(pinfo, tls_item, &ei_xmpp_starttls_already_in_frame, "Already saw STARTTLS in frame %u", xmpp_info->ssl_start); } else { xmpp_info->ssl_start = pinfo->fd->num; @@ -745,7 +745,7 @@ xmpp_proceed(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, } if (xmpp_info->ssl_proceed && xmpp_info->ssl_proceed != pinfo->fd->num) { - expert_add_info_format_text(pinfo, proceed_item, &ei_xmpp_proceed_already_in_frame, "Already saw PROCEED in frame %u", xmpp_info->ssl_proceed); + expert_add_info_format(pinfo, proceed_item, &ei_xmpp_proceed_already_in_frame, "Already saw PROCEED in frame %u", xmpp_info->ssl_proceed); } else { xmpp_info->ssl_proceed = pinfo->fd->num; diff --git a/epan/dissectors/packet-xmpp-utils.c b/epan/dissectors/packet-xmpp-utils.c index d5652c0a4d..3290184343 100644 --- a/epan/dissectors/packet-xmpp-utils.c +++ b/epan/dissectors/packet-xmpp-utils.c @@ -249,7 +249,7 @@ xmpp_unknown(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t xmpp_unknown_items(unknown_tree, tvb, pinfo, child, 1); proto_item_append_text(unknown_item, " [UNKNOWN]"); - expert_add_info_format_text(pinfo, unknown_item, &ei_xmpp_unknown_element, "Unknown element: %s", child->name); + expert_add_info_format(pinfo, unknown_item, &ei_xmpp_unknown_element, "Unknown element: %s", child->name); } childs = childs->next; } @@ -296,7 +296,7 @@ xmpp_unknown_attrs(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, xmpp hf_xmpp_unknown_attr, tvb, attr->offset, attr->length, attr->name, "%s: %s", attr->name, attr->value); proto_item_append_text(unknown_attr_item, " [UNKNOWN ATTR]"); - expert_add_info_format_text(pinfo, unknown_attr_item, &ei_xmpp_unknown_attribute, "Unknown attribute %s", attr->name); + expert_add_info_format(pinfo, unknown_attr_item, &ei_xmpp_unknown_attribute, "Unknown attribute %s", attr->name); } } } @@ -842,7 +842,7 @@ xmpp_display_attrs(proto_tree *tree, xmpp_element_t *element, packet_info *pinfo } else if(attrs[i].is_required) { - expert_add_info_format_text(pinfo, item, &ei_xmpp_required_attribute, "Required attribute \"%s\" doesn't appear in \"%s\".", attrs[i].name, element->name); + expert_add_info_format(pinfo, item, &ei_xmpp_required_attribute, "Required attribute \"%s\" doesn't appear in \"%s\".", attrs[i].name, element->name); } if(attrs[i].val_func) @@ -904,7 +904,7 @@ xmpp_display_attrs_ext(proto_tree *tree, xmpp_element_t *element, packet_info *p } } else if (attrs[i].info.is_required) { - expert_add_info_format_text(pinfo, item, &ei_xmpp_required_attribute, "Required attribute \"%s\" doesn't appear in \"%s\".", attrs[i].info.name, element->name); + expert_add_info_format(pinfo, item, &ei_xmpp_required_attribute, "Required attribute \"%s\" doesn't appear in \"%s\".", attrs[i].info.name, element->name); } if (attrs[i].info.val_func) { @@ -1032,7 +1032,7 @@ xmpp_val_enum_list(packet_info *pinfo, proto_item *item, const gchar *name, cons } } if (!value_in_enums) { - expert_add_info_format_text(pinfo, item, &ei_xmpp_field_unexpected_value, "Field \"%s\" has unexpected value \"%s\"", name, value); + expert_add_info_format(pinfo, item, &ei_xmpp_field_unexpected_value, "Field \"%s\" has unexpected value \"%s\"", name, value); } } } diff --git a/epan/dissectors/packet-xmpp.c b/epan/dissectors/packet-xmpp.c index 001dd3b055..4afaf84c00 100644 --- a/epan/dissectors/packet-xmpp.c +++ b/epan/dissectors/packet-xmpp.c @@ -543,7 +543,7 @@ dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { xmpp_proceed(xmpp_tree, tvb, pinfo, packet, xmpp_info); }else { xmpp_proto_tree_show_first_child(xmpp_tree); - expert_add_info_format_text(pinfo, xmpp_tree, &ei_xmpp_packet_unknown, "Unknown packet: %s", packet->name); + expert_add_info_format(pinfo, xmpp_tree, &ei_xmpp_packet_unknown, "Unknown packet: %s", packet->name); col_clear(pinfo->cinfo, COL_INFO); col_append_fstr(pinfo->cinfo, COL_INFO, "UNKNOWN PACKET "); } diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c index c86770110b..8d13cb9b64 100644 --- a/epan/dissectors/packet-xtp.c +++ b/epan/dissectors/packet-xtp.c @@ -770,12 +770,12 @@ dissect_xtp_ecntl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spans_len = 16 * ecntl->nspan; if (len != spans_len) { - expert_add_info_format_text(pinfo, top_ti, &ei_xtp_spans_bad, "Number of spans (%u) incorrect. Should be %u.", ecntl->nspan, len); + expert_add_info_format(pinfo, top_ti, &ei_xtp_spans_bad, "Number of spans (%u) incorrect. Should be %u.", ecntl->nspan, len); THROW(ReportedBoundsError); } if (ecntl->nspan > XTP_MAX_NSPANS) { - expert_add_info_format_text(pinfo, top_ti, &ei_xtp_spans_bad, "Too many spans: %u", ecntl->nspan); + expert_add_info_format(pinfo, top_ti, &ei_xtp_spans_bad, "Too many spans: %u", ecntl->nspan); THROW(ReportedBoundsError); } -- cgit v1.2.3