forked from osmocom/wireshark
Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25244
This commit is contained in:
parent
31cae6e4ef
commit
b6454e76ac
|
@ -142,3 +142,6 @@ doxygen.chm:
|
|||
|
||||
doxygen: doxygen.cfg doxygen-run doxygen.chm
|
||||
|
||||
checkapi:
|
||||
$(PERL) ../tools/checkAPIs.pl $(WIRESHARK_GTK_SRC) \
|
||||
$(WIRESHARK_TAP_SRC)
|
|
@ -32,7 +32,7 @@
|
|||
#ifdef HAVE_AIRPCAP
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
//#include <glib/gprintf.h>
|
||||
/*#include <glib/gprintf.h> */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ airpcap_get_all_channels_list(airpcap_if_info_t* if_info)
|
|||
if(current_adapter != if_info && g_ascii_strncasecmp("AirPcap USB wireless capture adapter nr.", current_adapter->description, 40) == 0)
|
||||
{
|
||||
chan_str = ieee80211_mhz_to_str(current_adapter->channelInfo.Frequency);
|
||||
g_string_sprintfa(freq_str, "%s%s", sep, chan_str);
|
||||
g_string_append_printf(freq_str, "%s%s", sep, chan_str);
|
||||
g_free(chan_str);
|
||||
sep = ", ";
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ dcerpcstat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_)
|
|||
const char *filter;
|
||||
|
||||
str = g_string_new("dcerpc,srt");
|
||||
g_string_sprintfa(str,
|
||||
g_string_append_printf(str,
|
||||
",%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,%u.%u",
|
||||
dcerpc_uuid_program->Data1, dcerpc_uuid_program->Data2,
|
||||
dcerpc_uuid_program->Data3,
|
||||
|
@ -371,7 +371,7 @@ dcerpcstat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_)
|
|||
dcerpc_version, 0);
|
||||
filter=gtk_entry_get_text(GTK_ENTRY(filter_entry));
|
||||
if(filter[0]!=0){
|
||||
g_string_sprintfa(str, ",%s", filter);
|
||||
g_string_append_printf(str, ",%s", filter);
|
||||
}
|
||||
|
||||
gtk_dcerpcstat_init(str->str,NULL);
|
||||
|
|
|
@ -376,17 +376,17 @@ decode_dcerpc_add_page (packet_info *pinfo)
|
|||
|
||||
switch(binding->ptype) {
|
||||
case(PT_TCP):
|
||||
g_string_sprintf(gs2, "TCP port");
|
||||
g_string_printf(gs2, "TCP port");
|
||||
break;
|
||||
case(PT_UDP):
|
||||
g_string_sprintf(gs2, "UDP port");
|
||||
g_string_printf(gs2, "UDP port");
|
||||
break;
|
||||
default:
|
||||
g_string_sprintf(gs2, "Unknown port type");
|
||||
g_string_printf(gs2, "Unknown port type");
|
||||
}
|
||||
|
||||
/* XXX - how to print the address binding->addr_a? */
|
||||
g_string_sprintf(gs, "Address: ToBeDone %s: %u", gs2->str, binding->port_a);
|
||||
g_string_printf(gs, "Address: ToBeDone %s: %u", gs2->str, binding->port_a);
|
||||
label = gtk_label_new(gs->str);
|
||||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
|
||||
|
@ -394,14 +394,14 @@ decode_dcerpc_add_page (packet_info *pinfo)
|
|||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
|
||||
/* XXX - how to print the address binding->addr_b? */
|
||||
g_string_sprintf(gs, "Address: ToBeDone %s: %u", gs2->str, binding->port_b);
|
||||
g_string_printf(gs, "Address: ToBeDone %s: %u", gs2->str, binding->port_b);
|
||||
label = gtk_label_new(gs->str);
|
||||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new("&");
|
||||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
|
||||
g_string_sprintf(gs, "Context ID: %u", binding->ctx_id);
|
||||
g_string_printf(gs, "Context ID: %u", binding->ctx_id);
|
||||
label = gtk_label_new(gs->str);
|
||||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
|
||||
|
@ -409,7 +409,7 @@ decode_dcerpc_add_page (packet_info *pinfo)
|
|||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
gtk_widget_set_sensitive(label, binding->smb_fid);
|
||||
|
||||
g_string_sprintf(gs, "SMB FID: %u", binding->smb_fid);
|
||||
g_string_printf(gs, "SMB FID: %u", binding->smb_fid);
|
||||
label = gtk_label_new(gs->str);
|
||||
gtk_box_pack_start(GTK_BOX(info_vb), label, TRUE, TRUE, 0);
|
||||
gtk_widget_set_sensitive(label, binding->smb_fid);
|
||||
|
|
|
@ -482,10 +482,10 @@ set_rule_text(rule_info_t *rule_info) {
|
|||
GtkTextBuffer *buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(rule_info->text));
|
||||
|
||||
if (prod < NUM_PRODS) {
|
||||
g_string_sprintf(rtxt, "%s %s\n", products[prod].comment_pfx, products[prod].name);
|
||||
g_string_printf(rtxt, "%s %s\n", products[prod].comment_pfx, products[prod].name);
|
||||
switch(rt) {
|
||||
case RT_NONE:
|
||||
g_string_sprintfa(rtxt, "%s Not supported", products[prod].comment_pfx);
|
||||
g_string_append_printf(rtxt, "%s Not supported", products[prod].comment_pfx);
|
||||
rt_func = sf_dummy;
|
||||
break;
|
||||
case RT_MAC_SRC:
|
||||
|
@ -520,7 +520,7 @@ set_rule_text(rule_info_t *rule_info) {
|
|||
if (rt_func) {
|
||||
rt_func(rtxt, addr_str, port, rule_info->ptype, rule_info->inbound, rule_info->deny);
|
||||
} else {
|
||||
g_string_sprintfa(rtxt, "ERROR: Unable to create rule");
|
||||
g_string_append_printf(rtxt, "ERROR: Unable to create rule");
|
||||
}
|
||||
|
||||
gtk_text_buffer_set_text(buf, rtxt->str, rtxt->len);
|
||||
|
@ -538,121 +538,121 @@ static void sf_dummy(GString *rtxt _U_, gchar *addr _U_, guint32 port _U_, port_
|
|||
#define IPFW_DENY (deny ? "deny" : "allow")
|
||||
#define IPFW_IN (inbound ? "in" : "out")
|
||||
static void sf_ipfw_mac(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add %s MAC %s any %s",
|
||||
g_string_append_printf(rtxt, "add %s MAC %s any %s",
|
||||
IPFW_DENY, addr, IPFW_IN);
|
||||
}
|
||||
|
||||
#define NF_DROP (deny ? "DROP" : "ACCEPT")
|
||||
#define NF_INPUT (inbound ? "INPUT" : "OUTPUT")
|
||||
static void sf_netfilter_mac(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "iptables -A %s --mac-source %s -j %s",
|
||||
g_string_append_printf(rtxt, "iptables -A %s --mac-source %s -j %s",
|
||||
NF_INPUT, addr, NF_DROP);
|
||||
}
|
||||
|
||||
/* IPv4 */
|
||||
#define IOS_DENY (deny ? "deny" : "permit")
|
||||
static void sf_ios_std_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound _U_, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s host %s", IOS_DENY, addr);
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s host %s", IOS_DENY, addr);
|
||||
}
|
||||
|
||||
static void sf_ios_ext_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
if (inbound)
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s ip host %s any", IOS_DENY, addr);
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s ip host %s any", IOS_DENY, addr);
|
||||
else
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s ip any host %s", IOS_DENY, addr);
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s ip any host %s", IOS_DENY, addr);
|
||||
}
|
||||
|
||||
#define IPFILTER_DENY (deny ? "block" : "pass")
|
||||
#define IPFILTER_IN (inbound ? "in" : "out")
|
||||
static void sf_ipfilter_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "%s %s on le0 from %s to any",
|
||||
g_string_append_printf(rtxt, "%s %s on le0 from %s to any",
|
||||
IPFILTER_DENY, IPFILTER_IN, addr);
|
||||
}
|
||||
|
||||
static void sf_ipfw_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add %s ip from %s to any %s",
|
||||
g_string_append_printf(rtxt, "add %s ip from %s to any %s",
|
||||
IPFW_DENY, addr, IPFW_IN);
|
||||
}
|
||||
|
||||
static void sf_netfilter_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "iptables -A %s -i eth0 -d %s/32 -j %s",
|
||||
g_string_append_printf(rtxt, "iptables -A %s -i eth0 -d %s/32 -j %s",
|
||||
NF_INPUT, addr, NF_DROP);
|
||||
}
|
||||
|
||||
#define PF_DENY (deny ? "block" : "pass")
|
||||
#define PF_IN (inbound ? "in" : "out")
|
||||
static void sf_pf_ipv4(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "%s %s quick on $ext_if from %s to any",
|
||||
g_string_append_printf(rtxt, "%s %s quick on $ext_if from %s to any",
|
||||
PF_DENY, PF_IN, addr);
|
||||
}
|
||||
|
||||
/* Port */
|
||||
#define RT_TCP_UDP (ptype == PT_TCP ? "tcp" : "udp")
|
||||
static void sf_ios_ext_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype, gboolean inbound _U_, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s %s any any eq %u",
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s %s any any eq %u",
|
||||
IOS_DENY, RT_TCP_UDP, port);
|
||||
}
|
||||
|
||||
static void sf_ipfilter_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "%s %s on le0 proto %s from any to any port = %u",
|
||||
g_string_append_printf(rtxt, "%s %s on le0 proto %s from any to any port = %u",
|
||||
IPFILTER_DENY, IPFILTER_IN, RT_TCP_UDP, port);
|
||||
}
|
||||
|
||||
static void sf_ipfw_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add %s %s from any to any %u %s",
|
||||
g_string_append_printf(rtxt, "add %s %s from any to any %u %s",
|
||||
IPFW_DENY, RT_TCP_UDP, port, IPFW_IN);
|
||||
}
|
||||
|
||||
static void sf_netfilter_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "iptables -A %s -p %s --destination-port %u -j %s",
|
||||
g_string_append_printf(rtxt, "iptables -A %s -p %s --destination-port %u -j %s",
|
||||
NF_INPUT, RT_TCP_UDP, port, NF_DROP);
|
||||
}
|
||||
|
||||
static void sf_pf_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "%s %s quick on $ext_if proto %s from any to any port %u",
|
||||
g_string_append_printf(rtxt, "%s %s quick on $ext_if proto %s from any to any port %u",
|
||||
PF_DENY, PF_IN, RT_TCP_UDP, port);
|
||||
}
|
||||
|
||||
#define NETSH_DENY (deny ? "DISABLE" : "ENABLE")
|
||||
static void sf_netsh_port(GString *rtxt, gchar *addr _U_, guint32 port, port_type ptype, gboolean inbound _U_, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add portopening %s %u Wireshark %s",
|
||||
g_string_append_printf(rtxt, "add portopening %s %u Wireshark %s",
|
||||
RT_TCP_UDP, port, NETSH_DENY);
|
||||
}
|
||||
|
||||
/* IPv4 + port */
|
||||
static void sf_ios_ext_ipv4_port(GString *rtxt, gchar *addr, guint32 port _U_, port_type ptype _U_, gboolean inbound, gboolean deny) {
|
||||
if (inbound)
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s %s host %s any eq %u", IOS_DENY, RT_TCP_UDP, addr, port);
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s %s host %s any eq %u", IOS_DENY, RT_TCP_UDP, addr, port);
|
||||
else
|
||||
g_string_sprintfa(rtxt, "access-list NUMBER %s %s any host %s eq %u", IOS_DENY, RT_TCP_UDP, addr, port);
|
||||
g_string_append_printf(rtxt, "access-list NUMBER %s %s any host %s eq %u", IOS_DENY, RT_TCP_UDP, addr, port);
|
||||
}
|
||||
|
||||
static void sf_ipfilter_ipv4_port(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
if (inbound)
|
||||
g_string_sprintfa(rtxt, "%s %s on le0 proto %s from %s to any port = %u",
|
||||
g_string_append_printf(rtxt, "%s %s on le0 proto %s from %s to any port = %u",
|
||||
IPFILTER_DENY, IPFILTER_IN, RT_TCP_UDP, addr, port);
|
||||
else
|
||||
g_string_sprintfa(rtxt, "%s %s on le0 proto %s from any to %s port = %u",
|
||||
g_string_append_printf(rtxt, "%s %s on le0 proto %s from any to %s port = %u",
|
||||
IPFILTER_DENY, IPFILTER_IN, RT_TCP_UDP, addr, port);
|
||||
}
|
||||
|
||||
static void sf_ipfw_ipv4_port(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add %s %s from %s to any %u %s",
|
||||
g_string_append_printf(rtxt, "add %s %s from %s to any %u %s",
|
||||
IPFW_DENY, RT_TCP_UDP, addr, port, IPFW_IN);
|
||||
}
|
||||
|
||||
static void sf_pf_ipv4_port(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "%s %s quick on $ext_if proto %s from %s to any port %u",
|
||||
g_string_append_printf(rtxt, "%s %s quick on $ext_if proto %s from %s to any port %u",
|
||||
PF_DENY, PF_IN, RT_TCP_UDP, addr, port);
|
||||
}
|
||||
|
||||
static void sf_netfilter_ipv4_port(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "iptables -A %s -p %s -d %s/32 --destination-port %u -j %s",
|
||||
g_string_append_printf(rtxt, "iptables -A %s -p %s -d %s/32 --destination-port %u -j %s",
|
||||
NF_INPUT, RT_TCP_UDP, addr, port, NF_DROP);
|
||||
}
|
||||
|
||||
static void sf_netsh_ipv4_port(GString *rtxt, gchar *addr, guint32 port, port_type ptype, gboolean inbound _U_, gboolean deny) {
|
||||
g_string_sprintfa(rtxt, "add portopening %s %u Wireshark %s %s",
|
||||
g_string_append_printf(rtxt, "add portopening %s %u Wireshark %s %s",
|
||||
RT_TCP_UDP, port, NETSH_DENY, addr);
|
||||
}
|
||||
|
||||
|
|
|
@ -342,11 +342,11 @@ static gboolean dialog_graph_dump_to_file(graph_analysis_data_t* user_data)
|
|||
/* Write the node names on top */
|
||||
for (i=0; i<display_nodes; i++){
|
||||
/* print the node identifiers */
|
||||
g_string_sprintf(label_string, "| %s",
|
||||
g_string_printf(label_string, "| %s",
|
||||
get_addr_name(&(user_data->nodes[i+first_node])));
|
||||
enlarge_string(label_string, NODE_CHARS_WIDTH, ' ');
|
||||
fprintf(of, "%s", label_string->str);
|
||||
g_string_sprintf(label_string, "| ");
|
||||
g_string_printf(label_string, "| ");
|
||||
enlarge_string(label_string, NODE_CHARS_WIDTH, ' ');
|
||||
g_string_append(empty_line, label_string->str);
|
||||
}
|
||||
|
@ -385,19 +385,19 @@ static gboolean dialog_graph_dump_to_file(graph_analysis_data_t* user_data)
|
|||
|
||||
/* write the conversation number */
|
||||
if (several_convs){
|
||||
g_string_sprintf(label_string, "%i", user_data->dlg.items[current_item].conv_num);
|
||||
g_string_printf(label_string, "%i", user_data->dlg.items[current_item].conv_num);
|
||||
enlarge_string(label_string, 5, ' ');
|
||||
fprintf(of, "%s", label_string->str);
|
||||
}
|
||||
|
||||
/* write the time */
|
||||
g_string_sprintf(label_string, "|%.3f", user_data->dlg.items[current_item].time);
|
||||
g_string_printf(label_string, "|%.3f", user_data->dlg.items[current_item].time);
|
||||
enlarge_string(label_string, 10, ' ');
|
||||
fprintf(of, "%s", label_string->str);
|
||||
|
||||
/* write the frame label */
|
||||
|
||||
g_string_sprintf(tmp_str, empty_line->str);
|
||||
g_string_printf(tmp_str, empty_line->str);
|
||||
overwrite(tmp_str,user_data->dlg.items[current_item].frame_label,
|
||||
start_position,
|
||||
end_position
|
||||
|
@ -410,7 +410,7 @@ static gboolean dialog_graph_dump_to_file(graph_analysis_data_t* user_data)
|
|||
/* write the arrow and frame label*/
|
||||
fprintf(of, "%s", empty_header);
|
||||
|
||||
g_string_sprintf(tmp_str, empty_line->str);
|
||||
g_string_printf(tmp_str, empty_line->str);
|
||||
|
||||
g_string_truncate(tmp_str2, 0);
|
||||
|
||||
|
@ -419,7 +419,7 @@ static gboolean dialog_graph_dump_to_file(graph_analysis_data_t* user_data)
|
|||
g_string_append_c(tmp_str2, '>');
|
||||
}
|
||||
else{
|
||||
g_string_sprintf(tmp_str2, "<");
|
||||
g_string_printf(tmp_str2, "<");
|
||||
enlarge_string(tmp_str2, item_width-1, '-');
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/***************************************************************************
|
||||
* gtkvumeter.c
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* Fri Jan 10 20:06:23 2003
|
||||
* Copyright 2003 Todd Goyen
|
||||
* wettoad@knighthoodofbuh.org
|
||||
|
|
|
@ -2029,7 +2029,7 @@ copy_as_csv_cb(GtkWindow *copy_bt _U_, gpointer data)
|
|||
g_string_append(CSV_str, "Interval start");
|
||||
for(i=0;i<MAX_GRAPHS;i++) {
|
||||
if (io->graphs[i].display) {
|
||||
g_string_sprintfa(CSV_str, ",Graph %d", i+1);
|
||||
g_string_append_printf(CSV_str, ",Graph %d", i+1);
|
||||
}
|
||||
}
|
||||
g_string_append(CSV_str,"\n");
|
||||
|
@ -2040,7 +2040,7 @@ copy_as_csv_cb(GtkWindow *copy_bt _U_, gpointer data)
|
|||
for(i=0;i<MAX_GRAPHS;i++) {
|
||||
if (io->graphs[i].display) {
|
||||
val=get_it_value(io, i, interval/io->interval);
|
||||
g_string_sprintfa(CSV_str, ",%d", val);
|
||||
g_string_append_printf(CSV_str, ",%d", val);
|
||||
}
|
||||
}
|
||||
g_string_append(CSV_str,"\n");
|
||||
|
|
|
@ -289,7 +289,7 @@ match_selected_cb_do(gpointer data, int action, gchar *text)
|
|||
/* Don't change the current display filter if we only want to copy the filter */
|
||||
if (action&MATCH_SELECTED_COPY_ONLY) {
|
||||
GString *gtk_text_str = g_string_new("");
|
||||
g_string_sprintfa(gtk_text_str, "%s", new_filter);
|
||||
g_string_append_printf(gtk_text_str, "%s", new_filter);
|
||||
copy_to_clipboard(gtk_text_str);
|
||||
g_string_free(gtk_text_str, TRUE);
|
||||
} else {
|
||||
|
@ -478,11 +478,11 @@ copy_selected_plist_cb(GtkWidget *w _U_, gpointer data _U_)
|
|||
char *stringpointer = labelstring;
|
||||
|
||||
if (cfile.finfo_selected->rep->representation != 0) {
|
||||
g_string_sprintfa(gtk_text_str, "%s", cfile.finfo_selected->rep->representation); /* Get the represented data */
|
||||
g_string_append_printf(gtk_text_str, "%s", cfile.finfo_selected->rep->representation); /* Get the represented data */
|
||||
}
|
||||
if (gtk_text_str->len == 0) { /* If no representation then... */
|
||||
proto_item_fill_label(cfile.finfo_selected, stringpointer); /* Try to read the value */
|
||||
g_string_sprintfa(gtk_text_str, "%s", stringpointer);
|
||||
g_string_append_printf(gtk_text_str, "%s", stringpointer);
|
||||
}
|
||||
if (gtk_text_str->len == 0) { /* Could not get item so display error msg */
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not acquire information to copy, try expanding or choosing another item");
|
||||
|
@ -1812,7 +1812,7 @@ main(int argc, char *argv[])
|
|||
comp_info_str = g_string_new("Compiled ");
|
||||
|
||||
g_string_append(comp_info_str, "with ");
|
||||
g_string_sprintfa(comp_info_str,
|
||||
g_string_append_printf(comp_info_str,
|
||||
#ifdef GTK_MAJOR_VERSION
|
||||
"GTK+ %d.%d.%d", GTK_MAJOR_VERSION, GTK_MINOR_VERSION,
|
||||
GTK_MICRO_VERSION);
|
||||
|
|
|
@ -681,12 +681,12 @@ static void copy_hex_all_info(GString* copy_buffer, const guint8* data_p, int da
|
|||
i = 0;
|
||||
while (i<data_len){
|
||||
if(end_of_line) {
|
||||
g_string_sprintfa(hex_str,"%04x ",i); /* Offset - note that we _append_ here */
|
||||
g_string_append_printf(hex_str,"%04x ",i); /* Offset - note that we _append_ here */
|
||||
}
|
||||
|
||||
g_string_sprintfa(hex_str," %02x",*data_p);
|
||||
g_string_append_printf(hex_str," %02x",*data_p);
|
||||
if(append_text) {
|
||||
g_string_sprintfa(char_str,"%c",isprint(*data_p) ? *data_p : '.');
|
||||
g_string_append_printf(char_str,"%c",isprint(*data_p) ? *data_p : '.');
|
||||
}
|
||||
|
||||
++data_p;
|
||||
|
@ -745,7 +745,7 @@ int copy_hex_bytes_text_only(GString* copy_buffer, const guint8* data_p, int dat
|
|||
static
|
||||
int copy_hex_bytes_hex(GString* copy_buffer, const guint8* data_p, int data_len _U_)
|
||||
{
|
||||
g_string_sprintfa(copy_buffer, "%02x", *data_p);
|
||||
g_string_append_printf(copy_buffer, "%02x", *data_p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -330,10 +330,10 @@ rpcstat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_)
|
|||
const char *filter;
|
||||
|
||||
str = g_string_new("rpc,srt");
|
||||
g_string_sprintfa(str, ",%d,%d", rpc_program, rpc_version);
|
||||
g_string_append_printf(str, ",%d,%d", rpc_program, rpc_version);
|
||||
filter=gtk_entry_get_text(GTK_ENTRY(filter_entry));
|
||||
if(filter[0]!=0){
|
||||
g_string_sprintfa(str, ",%s", filter);
|
||||
g_string_append_printf(str, ",%s", filter);
|
||||
}
|
||||
|
||||
gtk_rpcstat_init(str->str,NULL);
|
||||
|
|
|
@ -297,10 +297,10 @@ scsistat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_)
|
|||
const char *filter;
|
||||
|
||||
str = g_string_new("scsi,srt");
|
||||
g_string_sprintfa(str, ",%d", scsi_program);
|
||||
g_string_append_printf(str, ",%d", scsi_program);
|
||||
filter=gtk_entry_get_text(GTK_ENTRY(filter_entry));
|
||||
if(filter[0]!=0){
|
||||
g_string_sprintfa(str, ",%s", filter);
|
||||
g_string_append_printf(str, ",%s", filter);
|
||||
}
|
||||
|
||||
gtk_scsistat_init(str->str,NULL);
|
||||
|
|
|
@ -151,7 +151,7 @@ static char* fld_tostr(void* rec, uat_field_t* f) {
|
|||
GString* s = g_string_sized_new( len*2 + 1 );
|
||||
guint i;
|
||||
|
||||
for (i=0; i<len;i++) g_string_sprintfa(s,"%.2X",((guint8*)ptr)[i]);
|
||||
for (i=0; i<len;i++) g_string_append_printf(s,"%.2X",((guint8*)ptr)[i]);
|
||||
|
||||
out = ep_strdup_printf(s->str);
|
||||
|
||||
|
|
|
@ -2832,7 +2832,7 @@ static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
|
|||
ctx_term;
|
||||
ctx_term = ctx_term->next ) {
|
||||
if ( ctx_term->term && ctx_term->term->str) {
|
||||
g_string_sprintfa(s," %s",ctx_term->term->str);
|
||||
g_string_append_printf(s," %s",ctx_term->term->str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -303,18 +303,18 @@ voip_calls_on_filter (GtkButton *button _U_,
|
|||
filter_string_fwd = g_string_new(filter_prepend);
|
||||
|
||||
/* look in the Graph and get all the frame_num for this call */
|
||||
g_string_sprintfa(filter_string_fwd, " (");
|
||||
g_string_append_printf(filter_string_fwd, " (");
|
||||
list = g_list_first(voip_calls_get_info()->graph_analysis->list);
|
||||
while (list)
|
||||
{
|
||||
gai = list->data;
|
||||
if (gai->conv_num == selected_call_fwd->call_num){
|
||||
g_string_sprintfa(filter_string_fwd,"%sframe.number == %d", isFirst?"":" or ", gai->frame_num );
|
||||
g_string_append_printf(filter_string_fwd,"%sframe.number == %d", isFirst?"":" or ", gai->frame_num );
|
||||
isFirst = FALSE;
|
||||
}
|
||||
list = g_list_next (list);
|
||||
}
|
||||
g_string_sprintfa(filter_string_fwd, ") ");
|
||||
g_string_append_printf(filter_string_fwd, ") ");
|
||||
filter_length = filter_length + filter_string_fwd->len;
|
||||
|
||||
if (filter_length < max_filter_length){
|
||||
|
@ -326,7 +326,7 @@ voip_calls_on_filter (GtkButton *button _U_,
|
|||
switch(selected_call_fwd->protocol){
|
||||
case VOIP_SIP:
|
||||
tmp_sipinfo = selected_call_fwd->prot_info;
|
||||
g_string_sprintfa(filter_string_fwd,
|
||||
g_string_append_printf(filter_string_fwd,
|
||||
"(sip.Call-ID == \"%s\") ",
|
||||
tmp_sipinfo->call_identifier
|
||||
);
|
||||
|
@ -334,7 +334,7 @@ voip_calls_on_filter (GtkButton *button _U_,
|
|||
break;
|
||||
case VOIP_ISUP:
|
||||
tmp_isupinfo = selected_call_fwd->prot_info;
|
||||
g_string_sprintfa(filter_string_fwd,
|
||||
g_string_append_printf(filter_string_fwd,
|
||||
"(isup.cic == %i and frame.number >=%i and frame.number<=%i and mtp3.network_indicator == %i and ((mtp3.dpc == %i) and (mtp3.opc == %i)) or((mtp3.dpc == %i) and (mtp3.opc == %i))) ",
|
||||
tmp_isupinfo->cic,selected_call_fwd->first_frame_num,
|
||||
selected_call_fwd->last_frame_num,
|
||||
|
@ -345,7 +345,7 @@ voip_calls_on_filter (GtkButton *button _U_,
|
|||
break;
|
||||
case VOIP_H323:
|
||||
tmp_h323info = selected_call_fwd->prot_info;
|
||||
g_string_sprintfa(filter_string_fwd,
|
||||
g_string_append_printf(filter_string_fwd,
|
||||
"((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x) ",
|
||||
guid_to_str(&tmp_h323info->guid[0]),
|
||||
(guint8)(tmp_h323info->q931_crv & 0xff),
|
||||
|
@ -356,12 +356,12 @@ voip_calls_on_filter (GtkButton *button _U_,
|
|||
while (list)
|
||||
{
|
||||
h245_add=list->data;
|
||||
g_string_sprintfa(filter_string_fwd,
|
||||
g_string_append_printf(filter_string_fwd,
|
||||
" || (ip.addr == %s && tcp.port == %d && h245) ",
|
||||
ip_to_str((guint8 *)&(h245_add->h245_address)), h245_add->h245_port);
|
||||
list = g_list_next(list);
|
||||
}
|
||||
g_string_sprintfa(filter_string_fwd, ") ");
|
||||
g_string_append_printf(filter_string_fwd, ") ");
|
||||
gtk_entry_append_text(GTK_ENTRY(main_display_filter_widget), filter_string_fwd->str);
|
||||
break;
|
||||
case TEL_H248: {
|
||||
|
|
Loading…
Reference in New Issue