summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-06-19 14:10:00 -0400
committerMichael Mann <mmann78@netscape.net>2014-06-19 18:26:57 +0000
commitb0bc4d5535b4112cdc71eb87e351bc87aba0c7c5 (patch)
tree7b2d0f02eed4233b19019b717457c5ecfa01ab6d /epan
parent14824e6adf07a1c3cfb6537ce8723d873ecd0d0f (diff)
downloadwireshark-b0bc4d5535b4112cdc71eb87e351bc87aba0c7c5.tar.gz
Revert "Fixup: ep_address_to_str -> address_to_str"
Most (all?) of these functions are being called within GUI, so they can't have packet_scope, which is why they weren't already converted (I made this mistake once already) This reverts commit 7fea55a0541bcc5059f767970b6f6291f81d7b9c. Change-Id: I4bf29b206e5e1f5daefcec131309a8f6e78e1eb1 Reviewed-on: https://code.wireshark.org/review/2428 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bacapp.c16
-rw-r--r--epan/dissectors/packet-hpteam.c2
-rw-r--r--epan/dissectors/packet-http.c4
-rw-r--r--epan/dissectors/packet-iax2.c8
-rw-r--r--epan/dissectors/packet-isup.c2
-rw-r--r--epan/dissectors/packet-rtcp.c2
-rw-r--r--epan/dissectors/packet-ssl-utils.c12
-rw-r--r--epan/dissectors/packet-tacacs.c8
8 files changed, 24 insertions, 30 deletions
diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c
index 0caa458b73..451c4dc130 100644
--- a/epan/dissectors/packet-bacapp.c
+++ b/epan/dissectors/packet-bacapp.c
@@ -4838,8 +4838,8 @@ bacapp_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t* edt
gchar *srcstr;
const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
- srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", address_to_str(wmem_packet_scope(), &pinfo->src), NULL);
- dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", address_to_str(wmem_packet_scope(), &pinfo->dst), NULL);
+ srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", ep_address_to_str(&pinfo->src), NULL);
+ dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", ep_address_to_str(&pinfo->dst), NULL);
tick_stat_node(st, st_str_packets_by_ip, 0, TRUE);
packets_for_this_dst = tick_stat_node(st, st_str_packets_by_ip_dst, st_node_packets_by_ip, TRUE);
@@ -4884,8 +4884,8 @@ bacapp_stats_tree_service(stats_tree* st, packet_info* pinfo, epan_dissect_t* ed
const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
- srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", address_to_str(wmem_packet_scope(), &pinfo->src), NULL);
- dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", address_to_str(wmem_packet_scope(), &pinfo->dst), NULL);
+ srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", ep_address_to_str(&pinfo->src), NULL);
+ dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", ep_address_to_str(&pinfo->dst), NULL);
tick_stat_node(st, st_str_packets_by_service, 0, TRUE);
if (binfo->service_type) {
@@ -4922,8 +4922,8 @@ bacapp_stats_tree_objectid(stats_tree* st, packet_info* pinfo, epan_dissect_t* e
gchar *srcstr;
const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
- srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", address_to_str(wmem_packet_scope(), &pinfo->src), NULL);
- dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", address_to_str(wmem_packet_scope(), &pinfo->dst), NULL);
+ srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", ep_address_to_str(&pinfo->src), NULL);
+ dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", ep_address_to_str(&pinfo->dst), NULL);
tick_stat_node(st, st_str_packets_by_objectid, 0, TRUE);
if (binfo->object_ident) {
@@ -4960,8 +4960,8 @@ bacapp_stats_tree_instanceid(stats_tree* st, packet_info* pinfo, epan_dissect_t*
gchar *srcstr;
const bacapp_info_value_t *binfo = (const bacapp_info_value_t *)p;
- srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", address_to_str(wmem_packet_scope(), &pinfo->src), NULL);
- dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", address_to_str(wmem_packet_scope(), &pinfo->dst), NULL);
+ srcstr = wmem_strconcat(wmem_packet_scope(), "Src: ", ep_address_to_str(&pinfo->src), NULL);
+ dststr = wmem_strconcat(wmem_packet_scope(), "Dst: ", ep_address_to_str(&pinfo->dst), NULL);
tick_stat_node(st, st_str_packets_by_instanceid, 0, TRUE);
if (binfo->object_ident) {
diff --git a/epan/dissectors/packet-hpteam.c b/epan/dissectors/packet-hpteam.c
index 219e5cb0f2..8ce21effed 100644
--- a/epan/dissectors/packet-hpteam.c
+++ b/epan/dissectors/packet-hpteam.c
@@ -91,7 +91,7 @@ dissect_hpteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "HP NIC Team");
col_add_fstr(pinfo->cinfo, COL_INFO, "HP NIC Teaming Heartbeat; Port MAC = %s",
- address_to_str(wmem_packet_scope(), &pinfo->dl_src));
+ ep_address_to_str(&pinfo->dl_src));
if (tree) { /* we are being asked for details */
proto_item *hpteam_item;
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 6bc02dd888..13abd2c9d1 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -415,7 +415,7 @@ http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t*
if (v->request_method) {
- ip_str = address_to_str(wmem_packet_scope(), &pinfo->dst);
+ ip_str = ep_address_to_str(&pinfo->dst);
tick_stat_node(st, st_str_reqs, 0, FALSE);
tick_stat_node(st, st_str_reqs_by_srv_addr, st_node_reqs, TRUE);
@@ -432,7 +432,7 @@ http_reqs_stats_tree_packet(stats_tree* st, packet_info* pinfo, epan_dissect_t*
return 1;
} else if (i != 0) {
- ip_str = address_to_str(wmem_packet_scope(), &pinfo->src);
+ ip_str = ep_address_to_str(&pinfo->src);
tick_stat_node(st, st_str_resps_by_srv_addr, 0, FALSE);
resps_by_this_addr = tick_stat_node(st, ip_str, st_node_resps_by_srv_addr, TRUE);
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index 75d100b2b9..dd60ab58b3 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -605,12 +605,12 @@ static gchar *key_to_str( const iax_circuit_key *key )
}
strp = str[i];
- /* why doesn't address_to_str take a const pointer?
+ /* why doesn't ep_address_to_str take a const pointer?
cast the warnings into oblivion. */
/* XXX - is this a case for wmem_packet_scope()? */
g_snprintf(strp, 80, "{%s:%i,%i}",
- address_to_str(wmem_packet_scope(), (address *)&key->addr),
+ ep_address_to_str((address *)&key->addr),
key->port,
key->callno);
return strp;
@@ -932,8 +932,8 @@ static iax_call_data *iax_lookup_call( packet_info *pinfo,
#ifdef DEBUG_HASHING
g_debug("++ iax_lookup_circuit_details: Looking up circuit for frame %u, "
"from {%s:%u:%u} to {%s:%u:%u}", pinfo->fd->num,
- address_to_str(wmem_packet_scope(), &pinfo->src), pinfo->srcport, scallno,
- address_to_str(wmem_packet_scope(), &pinfo->dst), pinfo->destport, dcallno);
+ ep_address_to_str(&pinfo->src), pinfo->srcport, scallno,
+ ep_address_to_str(&pinfo->dst), pinfo->destport, dcallno);
#endif
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 3c4aaef448..ac62d15fc3 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -10893,7 +10893,7 @@ msg_stats_tree_packet(stats_tree *st, packet_info *pinfo, epan_dissect_t *edt _U
int msg_node;
int dir_node;
- dir = wmem_strdup_printf(wmem_packet_scope(), "%s->%s", address_to_str(wmem_packet_scope(), &pinfo->src), address_to_str(wmem_packet_scope(), &pinfo->dst));
+ dir = wmem_strdup_printf(wmem_packet_scope(), "%s->%s", ep_address_to_str(&pinfo->src), ep_address_to_str(&pinfo->dst));
msg_node = tick_stat_node(st, msg, st_node_msg, TRUE);
tick_stat_node(st, dir, msg_node, FALSE);
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index ab62369284..dc8773c3e0 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -2850,7 +2850,7 @@ static void add_roundtrip_delay_info(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* Report delay in INFO column */
col_append_fstr(pinfo->cinfo, COL_INFO,
" (roundtrip delay <-> %s = %dms, using frame %u) ",
- address_to_str(wmem_packet_scope(), &pinfo->net_src), delay, frame);
+ ep_address_to_str(&pinfo->net_src), delay, frame);
}
static int
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 586a909f86..a5a65c1039 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -3684,7 +3684,7 @@ ssl_find_private_key(SslDecryptSession *ssl_session, GHashTable *key_hash, GTree
dummy.port = port = pinfo->destport;
}
ssl_debug_printf("ssl_find_private_key server %s:%u\n",
- address_to_str(wmem_packet_scope(), &dummy.addr),dummy.port);
+ ep_address_to_str(&dummy.addr),dummy.port);
if (g_hash_table_size(key_hash) == 0) {
ssl_debug_printf("ssl_find_private_key: no keys found\n");
@@ -4169,7 +4169,6 @@ ssl_parse_key_list(const ssldecrypt_assoc_t * uats, GHashTable *key_hash, GTree*
guint32 addr_data[4];
int addr_len, at;
address_type addr_type[2] = { AT_IPv4, AT_IPv6 };
- gchar* address_string;
/* try to load keys file first */
fp = ws_fopen(uats->keyfile, "rb");
@@ -4234,15 +4233,10 @@ ssl_parse_key_list(const ssldecrypt_assoc_t * uats, GHashTable *key_hash, GTree*
service->port = atoi(uats->port);
}
- /*
- * This gets called outside any dissection scope, so we have to
- * use a NULL scope and free it ourselves.
- */
- address_string = address_to_str(NULL, &service->addr);
+
ssl_debug_printf("ssl_init %s addr '%s' (%s) port '%d' filename '%s' password(only for p12 file) '%s'\n",
- (addr_type[at] == AT_IPv4) ? "IPv4" : "IPv6", uats->ipaddr, address_string,
+ (addr_type[at] == AT_IPv4) ? "IPv4" : "IPv6", uats->ipaddr, ep_address_to_str(&service->addr),
service->port, uats->keyfile, uats->password);
- wmem_free(NULL, address_string);
ssl_debug_printf("ssl_init private key file %s successfully loaded.\n", uats->keyfile);
diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c
index f927fae9e5..e663c72997 100644
--- a/epan/dissectors/packet-tacacs.c
+++ b/epan/dissectors/packet-tacacs.c
@@ -749,11 +749,11 @@ tacplus_print_key_entry( gpointer data, gpointer user_data )
{
tacplus_key_entry *tacplus_data=(tacplus_key_entry *)data;
if( user_data ) {
- printf("%s:%s=%s\n", address_to_str(wmem_packet_scope(), tacplus_data->s),
- address_to_str(wmem_packet_scope(), tacplus_data->c), tacplus_data->k );
+ printf("%s:%s=%s\n", ep_address_to_str( tacplus_data->s ),
+ ep_address_to_str( tacplus_data->c ), tacplus_data->k );
} else {
- printf("%s:%s\n", address_to_str(wmem_packet_scope(), tacplus_data->s),
- address_to_str(wmem_packet_scope(), tacplus_data->c));
+ printf("%s:%s\n", ep_address_to_str( tacplus_data->s ),
+ ep_address_to_str( tacplus_data->c ) );
}
}
#endif