Use address functions instead of ADDRESS macros in ui.
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the ui directory. Change-Id: I10e95e66c8da5b880133452ebc484c53046e87ba Reviewed-on: https://code.wireshark.org/review/11199 Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
86fe2be4dc
commit
d9e530bc17
|
@ -253,7 +253,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg)
|
|||
fInfoTemp = (frame_info *)g_hash_table_lookup(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id));
|
||||
if (fInfoTemp == NULL) {
|
||||
if (TTL_method == FALSE) {
|
||||
if ((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))) {
|
||||
if ((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst))) {
|
||||
g_hash_table_insert(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id), fInfo);
|
||||
fInfo->zebra_time = cs->zebra_time;
|
||||
cs->zebra_time.nsecs = cs->zebra_time.nsecs + MERGED_FILES;
|
||||
|
@ -278,7 +278,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg)
|
|||
}
|
||||
} else {
|
||||
if (TTL_method == FALSE) {
|
||||
if (((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))) && (!fmod(fInfoTemp->zebra_time.nsecs, MERGED_FILES))) {
|
||||
if (((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst))) && (!fmod(fInfoTemp->zebra_time.nsecs, MERGED_FILES))) {
|
||||
fInfo->zebra_time.nsecs = fInfoTemp->zebra_time.nsecs;
|
||||
} else {
|
||||
fInfo->zebra_time.nsecs = fInfoTemp->zebra_time.nsecs+1;
|
||||
|
|
|
@ -302,8 +302,8 @@ followAlloc(
|
|||
fp = (follow_t *)g_malloc0(sizeof *fp);
|
||||
|
||||
fp->type = type;
|
||||
SET_ADDRESS(&fp->addr[0], AT_NONE, 0, fp->addrBuf[0]);
|
||||
SET_ADDRESS(&fp->addr[1], AT_NONE, 0, fp->addrBuf[1]);
|
||||
set_address(&fp->addr[0], AT_NONE, 0, fp->addrBuf[0]);
|
||||
set_address(&fp->addr[1], AT_NONE, 0, fp->addrBuf[1]);
|
||||
|
||||
return fp;
|
||||
}
|
||||
|
@ -376,12 +376,12 @@ followSslPacket(
|
|||
if (fp->addr[0].type == AT_NONE)
|
||||
{
|
||||
memcpy(fp->addrBuf[0], pip->net_src.data, pip->net_src.len);
|
||||
SET_ADDRESS(&fp->addr[0], pip->net_src.type, pip->net_src.len,
|
||||
set_address(&fp->addr[0], pip->net_src.type, pip->net_src.len,
|
||||
fp->addrBuf[0]);
|
||||
fp->port[0] = pip->srcport;
|
||||
|
||||
memcpy(fp->addrBuf[1], pip->net_dst.data, pip->net_dst.len);
|
||||
SET_ADDRESS(&fp->addr[1], pip->net_dst.type, pip->net_dst.len,
|
||||
set_address(&fp->addr[1], pip->net_dst.type, pip->net_dst.len,
|
||||
fp->addrBuf[1]);
|
||||
fp->port[1] = pip->destport;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ followDraw(
|
|||
for (node = 0; node < 2; node++)
|
||||
{
|
||||
memcpy(fp->addrBuf[node], stats.ip_address[node], len);
|
||||
SET_ADDRESS(&fp->addr[node], type, len, fp->addrBuf[node]);
|
||||
set_address(&fp->addr[node], type, len, fp->addrBuf[node]);
|
||||
fp->port[node] = stats.port[node];
|
||||
}
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ followArgFilter(
|
|||
{
|
||||
followExit("Can't get IPv6 address");
|
||||
}
|
||||
SET_ADDRESS(&fp->addr[ii], AT_IPv6, 16, fp->addrBuf[ii]);
|
||||
set_address(&fp->addr[ii], AT_IPv6, 16, fp->addrBuf[ii]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -823,7 +823,7 @@ followArgFilter(
|
|||
{
|
||||
followExit("Can't get IPv4 address");
|
||||
}
|
||||
SET_ADDRESS(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]);
|
||||
set_address(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]);
|
||||
}
|
||||
|
||||
*opt_argp += len;
|
||||
|
|
|
@ -110,8 +110,8 @@ alloc_sctp_ep(const struct _sctp_info *si)
|
|||
if (!(ep = g_new(sctp_ep_t, 1)))
|
||||
return NULL;
|
||||
|
||||
COPY_ADDRESS(&ep->src, &si->ip_src);
|
||||
COPY_ADDRESS(&ep->dst, &si->ip_dst);
|
||||
copy_address(&ep->src, &si->ip_src);
|
||||
copy_address(&ep->dst, &si->ip_dst);
|
||||
ep->sport = si->sport;
|
||||
ep->dport = si->dport;
|
||||
ep->next = NULL;
|
||||
|
@ -144,8 +144,8 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
|
|||
} else {
|
||||
for (tmp = hs->ep_list; tmp; tmp = tmp->next)
|
||||
{
|
||||
if ((!CMP_ADDRESS(&tmp->src, &si->ip_src)) &&
|
||||
(!CMP_ADDRESS(&tmp->dst, &si->ip_dst)) &&
|
||||
if ((!cmp_address(&tmp->src, &si->ip_src)) &&
|
||||
(!cmp_address(&tmp->dst, &si->ip_dst)) &&
|
||||
(tmp->sport == si->sport) &&
|
||||
(tmp->dport == si->dport))
|
||||
{
|
||||
|
|
|
@ -1300,12 +1300,12 @@ insert_new_rows(GList *list)
|
|||
|
||||
switch (addr->ifat_type) {
|
||||
case IF_AT_IPv4:
|
||||
SET_ADDRESS(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
set_address(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
temp_addr_str = (char*)address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
case IF_AT_IPv6:
|
||||
SET_ADDRESS(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
set_address(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
temp_addr_str = (char*)address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
|
|
|
@ -480,12 +480,12 @@ set_ip_addr_label(GSList *addr_list, GtkWidget *ip_lb, guint selected_ip_addr)
|
|||
switch (addr->ifat_type) {
|
||||
|
||||
case IF_AT_IPv4:
|
||||
SET_ADDRESS(&addr_address, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
set_address(&addr_address, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
addr_str = (char*)address_to_str(NULL, &addr_address);
|
||||
break;
|
||||
|
||||
case IF_AT_IPv6:
|
||||
SET_ADDRESS(&addr_address, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
set_address(&addr_address, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
addr_str = (char*)address_to_str(NULL, &addr_address);
|
||||
break;
|
||||
|
||||
|
|
|
@ -157,8 +157,8 @@ comparestat_reset(void *arg)
|
|||
{
|
||||
compstat_t *cs=(compstat_t *)arg;
|
||||
|
||||
SET_ADDRESS(&cs->eth_src, AT_ETHER, 0, NULL);
|
||||
SET_ADDRESS(&cs->eth_dst, AT_ETHER, 0, NULL);
|
||||
set_address(&cs->eth_src, AT_ETHER, 0, NULL);
|
||||
set_address(&cs->eth_dst, AT_ETHER, 0, NULL);
|
||||
|
||||
gtk_tree_store_clear(cs->simple_list);
|
||||
comparestat_set_title(cs);
|
||||
|
@ -327,7 +327,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg)
|
|||
fInfoTemp=(frame_info *)g_hash_table_lookup(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id));
|
||||
if(fInfoTemp==NULL){
|
||||
if(TTL_method==FALSE){
|
||||
if((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))){
|
||||
if((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst))){
|
||||
g_hash_table_insert(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id), fInfo);
|
||||
fInfo->zebra_time=cs->zebra_time;
|
||||
cs->zebra_time.nsecs=cs->zebra_time.nsecs + MERGED_FILES;
|
||||
|
@ -352,7 +352,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg)
|
|||
}
|
||||
} else {
|
||||
if(TTL_method==FALSE){
|
||||
if(((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst)))&&(!fmod(fInfoTemp->zebra_time.nsecs,MERGED_FILES))){
|
||||
if(((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst)))&&(!fmod(fInfoTemp->zebra_time.nsecs,MERGED_FILES))){
|
||||
fInfo->zebra_time.nsecs=fInfoTemp->zebra_time.nsecs;
|
||||
} else {
|
||||
fInfo->zebra_time.nsecs=fInfoTemp->zebra_time.nsecs+1;
|
||||
|
|
|
@ -168,9 +168,9 @@ ct_sort_func(GtkTreeModel *model,
|
|||
|
||||
switch(data_column){
|
||||
case CONV_COLUMN_SRC_ADDR: /* Source address */
|
||||
return(CMP_ADDRESS(&conv1->src_address, &conv2->src_address));
|
||||
return(cmp_address(&conv1->src_address, &conv2->src_address));
|
||||
case CONV_COLUMN_DST_ADDR: /* Destination address */
|
||||
return(CMP_ADDRESS(&conv1->dst_address, &conv2->dst_address));
|
||||
return(cmp_address(&conv1->dst_address, &conv2->dst_address));
|
||||
case CONV_COLUMN_SRC_PORT: /* Source port */
|
||||
CMP_NUM(conv1->src_port, conv2->src_port);
|
||||
case CONV_COLUMN_DST_PORT: /* Destination port */
|
||||
|
|
|
@ -194,10 +194,10 @@ firewall_rule_cb(GtkWidget *w _U_, gpointer data _U_)
|
|||
guint i;
|
||||
|
||||
rule_info = g_new0(rule_info_t, 1);
|
||||
COPY_ADDRESS(&(rule_info->dl_src), &(pinfo->dl_src));
|
||||
COPY_ADDRESS(&(rule_info->dl_dst), &(pinfo->dl_dst));
|
||||
COPY_ADDRESS(&(rule_info->net_src), &(pinfo->net_src));
|
||||
COPY_ADDRESS(&(rule_info->net_dst), &(pinfo->net_dst));
|
||||
copy_address(&(rule_info->dl_src), &(pinfo->dl_src));
|
||||
copy_address(&(rule_info->dl_dst), &(pinfo->dl_dst));
|
||||
copy_address(&(rule_info->net_src), &(pinfo->net_src));
|
||||
copy_address(&(rule_info->net_dst), &(pinfo->net_dst));
|
||||
rule_info->ptype = pinfo->ptype;
|
||||
rule_info->srcport = pinfo->srcport;
|
||||
rule_info->destport = pinfo->destport;
|
||||
|
|
|
@ -78,9 +78,9 @@ ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_
|
|||
/* Compute the packet's sender. */
|
||||
if (follow_info->client_port == 0) {
|
||||
follow_info->client_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&follow_info->client_ip, &pinfo->src);
|
||||
copy_address(&follow_info->client_ip, &pinfo->src);
|
||||
}
|
||||
if (ADDRESSES_EQUAL(&follow_info->client_ip, &pinfo->src) &&
|
||||
if (addresses_equal(&follow_info->client_ip, &pinfo->src) &&
|
||||
follow_info->client_port == pinfo->srcport) {
|
||||
from = FROM_CLIENT;
|
||||
} else {
|
||||
|
|
|
@ -57,10 +57,10 @@ udp_queue_packet_data(void *tapdata, packet_info *pinfo,
|
|||
|
||||
if (follow_info->client_port == 0) {
|
||||
follow_info->client_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&follow_info->client_ip, &pinfo->src);
|
||||
copy_address(&follow_info->client_ip, &pinfo->src);
|
||||
}
|
||||
|
||||
if (ADDRESSES_EQUAL(&follow_info->client_ip, &pinfo->src) && follow_info->client_port == pinfo->srcport)
|
||||
if (addresses_equal(&follow_info->client_ip, &pinfo->src) && follow_info->client_port == pinfo->srcport)
|
||||
follow_record->is_server = FALSE;
|
||||
else
|
||||
follow_record->is_server = TRUE;
|
||||
|
|
|
@ -169,7 +169,7 @@ hostlist_sort_column(GtkTreeModel *model,
|
|||
|
||||
switch(data_column){
|
||||
case ENDP_COLUMN_ADDR: /* Address */
|
||||
return(CMP_ADDRESS(&host1->myaddress, &host2->myaddress));
|
||||
return(cmp_address(&host1->myaddress, &host2->myaddress));
|
||||
case ENDP_COLUMN_PORT: /* (Port) */
|
||||
CMP_INT(host1->port, host2->port);
|
||||
#ifdef HAVE_GEOIP
|
||||
|
|
|
@ -458,9 +458,9 @@ iax2_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
return FALSE;
|
||||
|
||||
/* is it the forward direction? */
|
||||
else if ((CMP_ADDRESS(&(user_data->ip_src_fwd), &(pinfo->net_src)) == 0)
|
||||
else if ((cmp_address(&(user_data->ip_src_fwd), &(pinfo->net_src)) == 0)
|
||||
&& (user_data->port_src_fwd == pinfo->srcport)
|
||||
&& (CMP_ADDRESS(&(user_data->ip_dst_fwd), &(pinfo->net_dst)) == 0)
|
||||
&& (cmp_address(&(user_data->ip_dst_fwd), &(pinfo->net_dst)) == 0)
|
||||
&& (user_data->port_dst_fwd == pinfo->destport)) {
|
||||
iax2_packet_analyse(&(user_data->forward.statinfo), pinfo, iax2info);
|
||||
iax2_packet_add_graph(&(user_data->dlg.dialog_graph.graph[GRAPH_FWD_JITTER]),
|
||||
|
@ -477,9 +477,9 @@ iax2_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
&(user_data->forward.statinfo), pinfo, iax2info);
|
||||
}
|
||||
/* is it the reversed direction? */
|
||||
else if (CMP_ADDRESS(&(user_data->ip_src_rev), &(pinfo->net_src)) == 0
|
||||
else if (cmp_address(&(user_data->ip_src_rev), &(pinfo->net_src)) == 0
|
||||
&& user_data->port_src_rev == pinfo->srcport
|
||||
&& CMP_ADDRESS(&(user_data->ip_dst_rev), &(pinfo->net_dst)) == 0
|
||||
&& cmp_address(&(user_data->ip_dst_rev), &(pinfo->net_dst)) == 0
|
||||
&& user_data->port_dst_rev == pinfo->destport) {
|
||||
iax2_packet_analyse(&(user_data->reversed.statinfo), pinfo, iax2info);
|
||||
iax2_packet_add_graph(&(user_data->dlg.dialog_graph.graph[GRAPH_REV_JITTER]),
|
||||
|
@ -3515,13 +3515,13 @@ iax2_analysis(
|
|||
/* init */
|
||||
user_data = (user_data_t *)g_malloc(sizeof(user_data_t));
|
||||
|
||||
COPY_ADDRESS(&(user_data->ip_src_fwd), ip_src_fwd);
|
||||
copy_address(&(user_data->ip_src_fwd), ip_src_fwd);
|
||||
user_data->port_src_fwd = port_src_fwd;
|
||||
COPY_ADDRESS(&(user_data->ip_dst_fwd), ip_dst_fwd);
|
||||
copy_address(&(user_data->ip_dst_fwd), ip_dst_fwd);
|
||||
user_data->port_dst_fwd = port_dst_fwd;
|
||||
COPY_ADDRESS(&(user_data->ip_src_rev), ip_src_rev);
|
||||
copy_address(&(user_data->ip_src_rev), ip_src_rev);
|
||||
user_data->port_src_rev = port_src_rev;
|
||||
COPY_ADDRESS(&(user_data->ip_dst_rev), ip_dst_rev);
|
||||
copy_address(&(user_data->ip_dst_rev), ip_dst_rev);
|
||||
user_data->port_dst_rev = port_dst_rev;
|
||||
|
||||
|
||||
|
@ -3658,14 +3658,14 @@ void iax2_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
#endif
|
||||
|
||||
/* ok, it is a IAX2 frame, so let's get the ip and port values */
|
||||
COPY_ADDRESS(&(ip_src_fwd), &(edt.pi.src));
|
||||
COPY_ADDRESS(&(ip_dst_fwd), &(edt.pi.dst));
|
||||
copy_address(&(ip_src_fwd), &(edt.pi.src));
|
||||
copy_address(&(ip_dst_fwd), &(edt.pi.dst));
|
||||
port_src_fwd = edt.pi.srcport;
|
||||
port_dst_fwd = edt.pi.destport;
|
||||
|
||||
/* assume the inverse ip/port combination for the reverse direction */
|
||||
COPY_ADDRESS(&(ip_src_rev), &(edt.pi.dst));
|
||||
COPY_ADDRESS(&(ip_dst_rev), &(edt.pi.src));
|
||||
copy_address(&(ip_src_rev), &(edt.pi.dst));
|
||||
copy_address(&(ip_dst_rev), &(edt.pi.src));
|
||||
port_src_rev = edt.pi.destport;
|
||||
port_dst_rev = edt.pi.srcport;
|
||||
|
||||
|
@ -3677,17 +3677,17 @@ void iax2_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
while (strinfo_list)
|
||||
{
|
||||
strinfo = (rtp_stream_info_t*)(strinfo_list->data);
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr),&(ip_src_fwd))
|
||||
if (addresses_equal(&(strinfo->src_addr),&(ip_src_fwd))
|
||||
&& strinfo->src_port == port_src_fwd
|
||||
&& ADDRESSES_EQUAL(&(strinfo->dest_addr),&(ip_dst_fwd))
|
||||
&& addresses_equal(&(strinfo->dest_addr),&(ip_dst_fwd))
|
||||
&& strinfo->dest_port == port_dst_fwd)
|
||||
{
|
||||
filtered_list = g_list_prepend(filtered_list, strinfo);
|
||||
}
|
||||
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr),&(ip_src_rev))
|
||||
if (addresses_equal(&(strinfo->src_addr),&(ip_src_rev))
|
||||
&& strinfo->src_port == port_src_rev
|
||||
&& ADDRESSES_EQUAL(&(strinfo->dest_addr),&(ip_dst_rev))
|
||||
&& addresses_equal(&(strinfo->dest_addr),&(ip_dst_rev))
|
||||
&& strinfo->dest_port == port_dst_rev)
|
||||
{
|
||||
++nfound;
|
||||
|
|
|
@ -131,7 +131,7 @@ static int lbmc_uim_flow_graph_add_to_graph(packet_info * pinfo, const lbm_uim_s
|
|||
{
|
||||
int compare;
|
||||
|
||||
compare = CMP_ADDRESS(&(stream_info->endpoint_a.stream_info.dest.addr), &(stream_info->endpoint_b.stream_info.dest.addr));
|
||||
compare = cmp_address(&(stream_info->endpoint_a.stream_info.dest.addr), &(stream_info->endpoint_b.stream_info.dest.addr));
|
||||
if (compare < 0)
|
||||
{
|
||||
swap_endpoints = FALSE;
|
||||
|
@ -164,8 +164,8 @@ static int lbmc_uim_flow_graph_add_to_graph(packet_info * pinfo, const lbm_uim_s
|
|||
epa = stream_info->endpoint_b;
|
||||
}
|
||||
item = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
COPY_ADDRESS(&(item->src_addr), &(pinfo->src));
|
||||
COPY_ADDRESS(&(item->dst_addr), &(pinfo->dst));
|
||||
copy_address(&(item->src_addr), &(pinfo->src));
|
||||
copy_address(&(item->dst_addr), &(pinfo->dst));
|
||||
item->fd = pinfo->fd;
|
||||
item->port_src = pinfo->srcport;
|
||||
item->port_dst = pinfo->destport;
|
||||
|
|
|
@ -509,7 +509,7 @@ finfo_ipv4_output(GtkSpinButton *spinbutton, gpointer user_data _U_)
|
|||
adj = gtk_spin_button_get_adjustment(spinbutton);
|
||||
value = (guint32) gtk_adjustment_get_value(adj);
|
||||
value = GUINT32_TO_BE(value);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &value);
|
||||
set_address(&addr, AT_IPv4, 4, &value);
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
gtk_entry_set_text(GTK_ENTRY(spinbutton), addr_str);
|
||||
wmem_free(NULL, addr_str);
|
||||
|
|
|
@ -499,9 +499,9 @@ rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
return FALSE;
|
||||
/* is it the forward direction? */
|
||||
else if (user_data->ssrc_fwd == rtpinfo->info_sync_src
|
||||
&& (CMP_ADDRESS(&(user_data->src_fwd), &(pinfo->src)) == 0)
|
||||
&& (cmp_address(&(user_data->src_fwd), &(pinfo->src)) == 0)
|
||||
&& (user_data->port_src_fwd == pinfo->srcport)
|
||||
&& (CMP_ADDRESS(&(user_data->dst_fwd), &(pinfo->dst)) == 0)
|
||||
&& (cmp_address(&(user_data->dst_fwd), &(pinfo->dst)) == 0)
|
||||
&& (user_data->port_dst_fwd == pinfo->destport)) {
|
||||
rtp_packet_analyse(&(user_data->forward.statinfo), pinfo, rtpinfo);
|
||||
rtp_packet_add_graph(&(user_data->dlg.dialog_graph.graph[GRAPH_FWD_JITTER]),
|
||||
|
@ -521,9 +521,9 @@ rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
}
|
||||
/* is it the reversed direction? */
|
||||
else if (user_data->ssrc_rev == rtpinfo->info_sync_src
|
||||
&& (CMP_ADDRESS(&(user_data->src_rev), &(pinfo->src)) == 0)
|
||||
&& (cmp_address(&(user_data->src_rev), &(pinfo->src)) == 0)
|
||||
&& (user_data->port_src_rev == pinfo->srcport)
|
||||
&& (CMP_ADDRESS(&(user_data->dst_rev), &(pinfo->dst)) == 0)
|
||||
&& (cmp_address(&(user_data->dst_rev), &(pinfo->dst)) == 0)
|
||||
&& (user_data->port_dst_rev == pinfo->destport)) {
|
||||
rtp_packet_analyse(&(user_data->reversed.statinfo), pinfo, rtpinfo);
|
||||
rtp_packet_add_graph(&(user_data->dlg.dialog_graph.graph[GRAPH_REV_JITTER]),
|
||||
|
@ -3833,14 +3833,14 @@ rtp_analysis(address *src_fwd,
|
|||
/* init */
|
||||
user_data = (user_data_t *)g_malloc(sizeof(user_data_t));
|
||||
|
||||
COPY_ADDRESS(&(user_data->src_fwd), src_fwd);
|
||||
copy_address(&(user_data->src_fwd), src_fwd);
|
||||
user_data->port_src_fwd = port_src_fwd;
|
||||
COPY_ADDRESS(&(user_data->dst_fwd), dst_fwd);
|
||||
copy_address(&(user_data->dst_fwd), dst_fwd);
|
||||
user_data->port_dst_fwd = port_dst_fwd;
|
||||
user_data->ssrc_fwd = ssrc_fwd;
|
||||
COPY_ADDRESS(&(user_data->src_rev), src_rev);
|
||||
copy_address(&(user_data->src_rev), src_rev);
|
||||
user_data->port_src_rev = port_src_rev;
|
||||
COPY_ADDRESS(&(user_data->dst_rev), dst_rev);
|
||||
copy_address(&(user_data->dst_rev), dst_rev);
|
||||
user_data->port_dst_rev = port_dst_rev;
|
||||
user_data->ssrc_rev = ssrc_rev;
|
||||
|
||||
|
@ -3972,14 +3972,14 @@ rtp_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
}
|
||||
|
||||
/* ok, it is a RTP frame, so let's get the ip and port values */
|
||||
COPY_ADDRESS(&(src_fwd), &(edt.pi.src));
|
||||
COPY_ADDRESS(&(dst_fwd), &(edt.pi.dst));
|
||||
copy_address(&(src_fwd), &(edt.pi.src));
|
||||
copy_address(&(dst_fwd), &(edt.pi.dst));
|
||||
port_src_fwd = edt.pi.srcport;
|
||||
port_dst_fwd = edt.pi.destport;
|
||||
|
||||
/* assume the inverse ip/port combination for the reverse direction */
|
||||
COPY_ADDRESS(&(src_rev), &(edt.pi.dst));
|
||||
COPY_ADDRESS(&(dst_rev), &(edt.pi.src));
|
||||
copy_address(&(src_rev), &(edt.pi.dst));
|
||||
copy_address(&(dst_rev), &(edt.pi.src));
|
||||
port_src_rev = edt.pi.destport;
|
||||
port_dst_rev = edt.pi.srcport;
|
||||
|
||||
|
@ -4005,17 +4005,17 @@ rtp_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
while (strinfo_list)
|
||||
{
|
||||
strinfo = (rtp_stream_info_t*)(strinfo_list->data);
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_fwd))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_fwd))
|
||||
&& (strinfo->src_port == port_src_fwd)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_fwd)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_fwd)))
|
||||
&& (strinfo->dest_port == port_dst_fwd))
|
||||
{
|
||||
filtered_list = g_list_prepend(filtered_list, strinfo);
|
||||
}
|
||||
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_rev))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_rev))
|
||||
&& (strinfo->src_port == port_src_rev)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_rev)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_rev)))
|
||||
&& (strinfo->dest_port == port_dst_rev))
|
||||
{
|
||||
++nfound;
|
||||
|
|
|
@ -339,9 +339,9 @@ add_rtp_packet(const struct _rtp_info *rtp_info, packet_info *pinfo)
|
|||
/* if it is not in the hash table, create a new stream */
|
||||
if (stream_info==NULL) {
|
||||
stream_info = g_new0(rtp_stream_info_t, 1);
|
||||
COPY_ADDRESS(&(stream_info->src_addr), &(pinfo->src));
|
||||
copy_address(&(stream_info->src_addr), &(pinfo->src));
|
||||
stream_info->src_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&(stream_info->dest_addr), &(pinfo->dst));
|
||||
copy_address(&(stream_info->dest_addr), &(pinfo->dst));
|
||||
stream_info->dest_port = pinfo->destport;
|
||||
stream_info->ssrc = rtp_info->info_sync_src;
|
||||
stream_info->start_fd = pinfo->fd;
|
||||
|
|
|
@ -516,23 +516,23 @@ rtpstream_on_analyse(GtkButton *button _U_, gpointer user_data _U_)
|
|||
return;
|
||||
}
|
||||
|
||||
SET_ADDRESS(&src_fwd,AT_NONE,0,NULL);
|
||||
SET_ADDRESS(&dst_fwd,AT_NONE,0,NULL);
|
||||
SET_ADDRESS(&src_rev,AT_NONE,0,NULL);
|
||||
SET_ADDRESS(&dst_rev,AT_NONE,0,NULL);
|
||||
set_address(&src_fwd,AT_NONE,0,NULL);
|
||||
set_address(&dst_fwd,AT_NONE,0,NULL);
|
||||
set_address(&src_rev,AT_NONE,0,NULL);
|
||||
set_address(&dst_rev,AT_NONE,0,NULL);
|
||||
|
||||
if (selected_stream_fwd) {
|
||||
COPY_ADDRESS(&(src_fwd), &(selected_stream_fwd->src_addr));
|
||||
copy_address(&(src_fwd), &(selected_stream_fwd->src_addr));
|
||||
port_src_fwd = selected_stream_fwd->src_port;
|
||||
COPY_ADDRESS(&(dst_fwd), &(selected_stream_fwd->dest_addr));
|
||||
copy_address(&(dst_fwd), &(selected_stream_fwd->dest_addr));
|
||||
port_dst_fwd = selected_stream_fwd->dest_port;
|
||||
ssrc_fwd = selected_stream_fwd->ssrc;
|
||||
}
|
||||
|
||||
if (selected_stream_rev) {
|
||||
COPY_ADDRESS(&(src_rev), &(selected_stream_rev->src_addr));
|
||||
copy_address(&(src_rev), &(selected_stream_rev->src_addr));
|
||||
port_src_rev = selected_stream_rev->src_port;
|
||||
COPY_ADDRESS(&(dst_rev), &(selected_stream_rev->dest_addr));
|
||||
copy_address(&(dst_rev), &(selected_stream_rev->dest_addr));
|
||||
port_dst_rev = selected_stream_rev->dest_port;
|
||||
ssrc_rev = selected_stream_rev->ssrc;
|
||||
}
|
||||
|
|
|
@ -466,7 +466,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
|
||||
srclist = g_list_first(selected_stream->addr1);
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
gstring = g_string_new(g_strdup_printf(
|
||||
"((sctp.srcport==%u && sctp.dstport==%u && (ip.src==%s",
|
||||
|
@ -479,7 +479,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
while (srclist)
|
||||
{
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -489,7 +489,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
|
||||
dstlist = g_list_first(selected_stream->addr2);
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(") && (ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -499,7 +499,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
while (dstlist)
|
||||
{
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -509,7 +509,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
|
||||
srclist = g_list_first(selected_stream->addr1);
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(")) || (sctp.dstport==%u && sctp.srcport==%u && (ip.dst==%s",
|
||||
selected_stream->port1,
|
||||
|
@ -522,7 +522,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
while (srclist)
|
||||
{
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -532,7 +532,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
|
||||
dstlist = g_list_first(selected_stream->addr2);
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(") && (ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -541,7 +541,7 @@ sctp_set_filter(GtkButton *button _U_, struct sctp_analyse *u_data)
|
|||
while (dstlist)
|
||||
{
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
|
|
@ -111,8 +111,8 @@ static sctp_ep_t* alloc_sctp_ep(struct _sctp_info *si)
|
|||
if (!(ep = (sctp_ep_t *)g_malloc(sizeof(sctp_ep_t))))
|
||||
return NULL;
|
||||
|
||||
COPY_ADDRESS(&ep->src,&si->ip_src);
|
||||
COPY_ADDRESS(&ep->dst,&si->ip_dst);
|
||||
copy_address(&ep->src,&si->ip_src);
|
||||
copy_address(&ep->dst,&si->ip_dst);
|
||||
ep->sport = si->sport;
|
||||
ep->dport = si->dport;
|
||||
ep->next = NULL;
|
||||
|
@ -139,8 +139,8 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons
|
|||
te = hs->ep_list;
|
||||
} else {
|
||||
for(tmp=hs->ep_list ; tmp ; tmp=tmp->next) {
|
||||
if((!CMP_ADDRESS(&tmp->src,&si->ip_src)) &&
|
||||
(!CMP_ADDRESS(&tmp->dst,&si->ip_dst)) &&
|
||||
if((!cmp_address(&tmp->src,&si->ip_src)) &&
|
||||
(!cmp_address(&tmp->dst,&si->ip_dst)) &&
|
||||
(tmp->sport == si->sport) &&
|
||||
(tmp->dport == si->dport)) {
|
||||
te = tmp;
|
||||
|
|
|
@ -462,7 +462,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
|
||||
srclist = g_list_first(selected_stream->addr1);
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
gstring = g_string_new(g_strdup_printf("((sctp.srcport==%u && sctp.dstport==%u && (ip.src==%s",
|
||||
selected_stream->port1, selected_stream->port2, addr_str));
|
||||
|
@ -472,7 +472,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
while (srclist)
|
||||
{
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -481,7 +481,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
}
|
||||
dstlist = g_list_first(selected_stream->addr2);
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(") && (ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -490,7 +490,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
while (dstlist)
|
||||
{
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -499,7 +499,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
}
|
||||
srclist = g_list_first(selected_stream->addr1);
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(")) || (sctp.dstport==%u && sctp.srcport==%u && (ip.dst==%s",
|
||||
selected_stream->port1, selected_stream->port2, addr_str);
|
||||
|
@ -510,7 +510,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
while (srclist)
|
||||
{
|
||||
infosrc = (struct sockaddr_in *)(srclist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infosrc->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.dst==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -520,7 +520,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
|
||||
dstlist = g_list_first(selected_stream->addr2);
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf(") && (ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
@ -529,7 +529,7 @@ sctp_stat_on_filter(GtkButton *button _U_, gpointer user_data _U_)
|
|||
while (dstlist)
|
||||
{
|
||||
infodst = (struct sockaddr_in *)(dstlist->data);
|
||||
SET_ADDRESS(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
set_address(&addr, AT_IPv4, 4, &(infodst->sin_addr.s_addr));
|
||||
addr_str = (char*)address_to_str(NULL, &addr);
|
||||
str = g_strdup_printf("|| ip.src==%s", addr_str);
|
||||
g_string_append(gstring, str);
|
||||
|
|
|
@ -642,9 +642,9 @@ void tcp_graph_known_stream_launch(address *src_address, guint16 src_port,
|
|||
graph_initialize_values(g);
|
||||
|
||||
/* Can set stream info for graph now */
|
||||
COPY_ADDRESS(&g->tg.src_address, src_address);
|
||||
copy_address(&g->tg.src_address, src_address);
|
||||
g->tg.src_port = src_port;
|
||||
COPY_ADDRESS(&g->tg.dst_address, dst_address);
|
||||
copy_address(&g->tg.dst_address, dst_address);
|
||||
g->tg.dst_port = dst_port;
|
||||
g->tg.stream = stream;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ alloc_wlan_ep (const struct _wlan_hdr *si, const packet_info *pinfo _U_)
|
|||
|
||||
ep = (wlan_ep_t *)g_malloc (sizeof(wlan_ep_t));
|
||||
|
||||
COPY_ADDRESS (&ep->bssid, &si->bssid);
|
||||
copy_address (&ep->bssid, &si->bssid);
|
||||
ep->stats.channel = si->stats.channel;
|
||||
memcpy (ep->stats.ssid, si->stats.ssid, MAX_SSID_LEN);
|
||||
ep->stats.ssid_len = si->stats.ssid_len;
|
||||
|
@ -267,7 +267,7 @@ alloc_wlan_details_ep (const address *addr)
|
|||
if (!(d_ep = (wlan_details_ep_t *)g_malloc (sizeof(wlan_details_ep_t))))
|
||||
return NULL;
|
||||
|
||||
COPY_ADDRESS (&d_ep->addr, addr);
|
||||
copy_address (&d_ep->addr, addr);
|
||||
d_ep->probe_req = 0;
|
||||
d_ep->probe_rsp = 0;
|
||||
d_ep->auth = 0;
|
||||
|
@ -292,7 +292,7 @@ get_details_ep (wlan_ep_t *te, const address *addr)
|
|||
d_te = te->details;
|
||||
} else {
|
||||
for (tmp = te->details; tmp; tmp = tmp->next) {
|
||||
if (!CMP_ADDRESS (&tmp->addr, addr)) {
|
||||
if (!cmp_address (&tmp->addr, addr)) {
|
||||
d_te = tmp;
|
||||
break;
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ is_broadcast(const address *addr)
|
|||
|
||||
/* doesn't work if MAC resolution is disable */
|
||||
return cmp_addr;
|
||||
return ADDRESSES_EQUAL(&broadcast, addr);
|
||||
return addresses_equal(&broadcast, addr);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -408,7 +408,7 @@ wlanstat_packet (void *phs, packet_info *pinfo, epan_dissect_t *edt _U_, const v
|
|||
|| ((si->stats.ssid_len != 0) && (ssid_equal(&tmp->stats, &si->stats)))
|
||||
)))
|
||||
||
|
||||
((si->type != MGT_PROBE_REQ) && !CMP_ADDRESS(&tmp->bssid, &si->bssid))) {
|
||||
((si->type != MGT_PROBE_REQ) && !cmp_address(&tmp->bssid, &si->bssid))) {
|
||||
te = tmp;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -197,13 +197,13 @@ scan_local_interfaces(void (*update_cb)(void))
|
|||
switch (addr->ifat_type) {
|
||||
case IF_AT_IPv4:
|
||||
temp_addr->addr.ip4_addr = addr->addr.ip4_addr;
|
||||
SET_ADDRESS(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
set_address(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
temp_addr_str = address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
case IF_AT_IPv6:
|
||||
memcpy(temp_addr->addr.ip6_addr, addr->addr.ip6_addr, sizeof(addr->addr));
|
||||
SET_ADDRESS(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
set_address(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
temp_addr_str = address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
|
|
|
@ -75,9 +75,9 @@ mcast_stream_info_cmp(gconstpointer aa, gconstpointer bb)
|
|||
return 0;
|
||||
if (a==NULL || b==NULL)
|
||||
return 1;
|
||||
if (ADDRESSES_EQUAL(&(a->src_addr), &(b->src_addr))
|
||||
if (addresses_equal(&(a->src_addr), &(b->src_addr))
|
||||
&& (a->src_port == b->src_port)
|
||||
&& ADDRESSES_EQUAL(&(a->dest_addr), &(b->dest_addr))
|
||||
&& addresses_equal(&(a->dest_addr), &(b->dest_addr))
|
||||
&& (a->dest_port == b->dest_port))
|
||||
return 0;
|
||||
else
|
||||
|
@ -178,9 +178,9 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
}
|
||||
|
||||
/* gather infos on the stream this packet is part of */
|
||||
COPY_ADDRESS(&(tmp_strinfo.src_addr), &(pinfo->net_src));
|
||||
copy_address(&(tmp_strinfo.src_addr), &(pinfo->net_src));
|
||||
tmp_strinfo.src_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&(tmp_strinfo.dest_addr), &(pinfo->net_dst));
|
||||
copy_address(&(tmp_strinfo.dest_addr), &(pinfo->net_dst));
|
||||
tmp_strinfo.dest_port = pinfo->destport;
|
||||
|
||||
/* check whether we already have a stream with these parameters in the list */
|
||||
|
|
|
@ -423,7 +423,7 @@ ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *, const
|
|||
follow_info->client_port = pinfo->srcport;
|
||||
copy_address(&follow_info->client_ip, &pinfo->src);
|
||||
}
|
||||
if (ADDRESSES_EQUAL(&follow_info->client_ip, &pinfo->src) &&
|
||||
if (addresses_equal(&follow_info->client_ip, &pinfo->src) &&
|
||||
follow_info->client_port == pinfo->srcport) {
|
||||
from = FROM_CLIENT;
|
||||
} else {
|
||||
|
|
|
@ -332,14 +332,14 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
|
|||
dfilter_free(sfcode);
|
||||
|
||||
/* ok, it is a IAX2 frame, so let's get the ip and port values */
|
||||
COPY_ADDRESS(&(src_fwd_), &(edt.pi.src));
|
||||
COPY_ADDRESS(&(dst_fwd_), &(edt.pi.dst));
|
||||
copy_address(&(src_fwd_), &(edt.pi.src));
|
||||
copy_address(&(dst_fwd_), &(edt.pi.dst));
|
||||
port_src_fwd_ = edt.pi.srcport;
|
||||
port_dst_fwd_ = edt.pi.destport;
|
||||
|
||||
/* assume the inverse ip/port combination for the reverse direction */
|
||||
COPY_ADDRESS(&(src_rev_), &(edt.pi.dst));
|
||||
COPY_ADDRESS(&(dst_rev_), &(edt.pi.src));
|
||||
copy_address(&(src_rev_), &(edt.pi.dst));
|
||||
copy_address(&(dst_rev_), &(edt.pi.src));
|
||||
port_src_rev_ = edt.pi.destport;
|
||||
port_dst_rev_ = edt.pi.srcport;
|
||||
|
||||
|
@ -371,18 +371,18 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
|
|||
for (GList *strinfo_list = g_list_first(tapinfo.strinfo_list); strinfo_list; strinfo_list = g_list_next(strinfo_list)) {
|
||||
rtp_stream_info_t * strinfo = (rtp_stream_info_t*)(strinfo_list->data);
|
||||
<< address_to_qstring(&strinfo->dest_addr) << address_to_qstring(&src_rev_) << address_to_qstring(&dst_rev_);
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_fwd_))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_fwd_))
|
||||
&& (strinfo->src_port == port_src_fwd_)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_fwd_)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_fwd_)))
|
||||
&& (strinfo->dest_port == port_dst_fwd_))
|
||||
{
|
||||
++num_streams;
|
||||
filtered_list = g_list_prepend(filtered_list, strinfo);
|
||||
}
|
||||
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_rev_))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_rev_))
|
||||
&& (strinfo->src_port == port_src_rev_)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_rev_)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_rev_)))
|
||||
&& (strinfo->dest_port == port_dst_rev_))
|
||||
{
|
||||
++num_streams;
|
||||
|
@ -630,17 +630,17 @@ gboolean Iax2AnalysisDialog::tapPacket(void *tapinfoptr, packet_info *pinfo, str
|
|||
return FALSE;
|
||||
|
||||
/* is it the forward direction? */
|
||||
else if ((CMP_ADDRESS(&(iax2_analysis_dialog->src_fwd_), &(pinfo->src)) == 0)
|
||||
else if ((cmp_address(&(iax2_analysis_dialog->src_fwd_), &(pinfo->src)) == 0)
|
||||
&& (iax2_analysis_dialog->port_src_fwd_ == pinfo->srcport)
|
||||
&& (CMP_ADDRESS(&(iax2_analysis_dialog->dst_fwd_), &(pinfo->dst)) == 0)
|
||||
&& (cmp_address(&(iax2_analysis_dialog->dst_fwd_), &(pinfo->dst)) == 0)
|
||||
&& (iax2_analysis_dialog->port_dst_fwd_ == pinfo->destport)) {
|
||||
|
||||
iax2_analysis_dialog->addPacket(true, pinfo, iax2info);
|
||||
}
|
||||
/* is it the reversed direction? */
|
||||
else if ((CMP_ADDRESS(&(iax2_analysis_dialog->src_rev_), &(pinfo->src)) == 0)
|
||||
else if ((cmp_address(&(iax2_analysis_dialog->src_rev_), &(pinfo->src)) == 0)
|
||||
&& (iax2_analysis_dialog->port_src_rev_ == pinfo->srcport)
|
||||
&& (CMP_ADDRESS(&(iax2_analysis_dialog->dst_rev_), &(pinfo->dst)) == 0)
|
||||
&& (cmp_address(&(iax2_analysis_dialog->dst_rev_), &(pinfo->dst)) == 0)
|
||||
&& (iax2_analysis_dialog->port_dst_rev_ == pinfo->destport)) {
|
||||
|
||||
iax2_analysis_dialog->addPacket(false, pinfo, iax2info);
|
||||
|
|
|
@ -90,7 +90,7 @@ static gboolean lbm_uimflow_add_to_graph(seq_analysis_info_t * seq_info, packet_
|
|||
{
|
||||
int compare;
|
||||
|
||||
compare = CMP_ADDRESS(&(stream_info->endpoint_a.stream_info.dest.addr), &(stream_info->endpoint_b.stream_info.dest.addr));
|
||||
compare = cmp_address(&(stream_info->endpoint_a.stream_info.dest.addr), &(stream_info->endpoint_b.stream_info.dest.addr));
|
||||
if (compare < 0)
|
||||
{
|
||||
swap_endpoints = FALSE;
|
||||
|
@ -123,8 +123,8 @@ static gboolean lbm_uimflow_add_to_graph(seq_analysis_info_t * seq_info, packet_
|
|||
epa = stream_info->endpoint_b;
|
||||
}
|
||||
item = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
COPY_ADDRESS(&(item->src_addr), &(pinfo->src));
|
||||
COPY_ADDRESS(&(item->dst_addr), &(pinfo->dst));
|
||||
copy_address(&(item->src_addr), &(pinfo->src));
|
||||
copy_address(&(item->dst_addr), &(pinfo->dst));
|
||||
item->fd = pinfo->fd;
|
||||
item->port_src = pinfo->srcport;
|
||||
item->port_dst = pinfo->destport;
|
||||
|
|
|
@ -569,12 +569,12 @@ void ManageInterfacesDialog::addRemoteInterfaces(GList* rlist, remote_options *r
|
|||
addr = (if_addr_t *)curr_addr->data;
|
||||
switch (addr->ifat_type) {
|
||||
case IF_AT_IPv4:
|
||||
SET_ADDRESS(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
set_address(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr);
|
||||
temp_addr_str = (char*)address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
case IF_AT_IPv6:
|
||||
SET_ADDRESS(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
set_address(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr);
|
||||
temp_addr_str = (char*)address_to_str(NULL, &addr_str);
|
||||
g_string_append(ip_str, temp_addr_str);
|
||||
break;
|
||||
|
|
|
@ -1537,9 +1537,9 @@ void RtpAnalysisDialog::findStreams()
|
|||
|
||||
for (GList *strinfo_list = g_list_first(tapinfo_.strinfo_list); strinfo_list; strinfo_list = g_list_next(strinfo_list)) {
|
||||
rtp_stream_info_t * strinfo = (rtp_stream_info_t*)(strinfo_list->data);
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_fwd_))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_fwd_))
|
||||
&& (strinfo->src_port == port_src_fwd_)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_fwd_)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_fwd_)))
|
||||
&& (strinfo->dest_port == port_dst_fwd_))
|
||||
{
|
||||
packet_count_fwd_ = strinfo->packet_count;
|
||||
|
@ -1548,9 +1548,9 @@ void RtpAnalysisDialog::findStreams()
|
|||
num_streams_++;
|
||||
}
|
||||
|
||||
if (ADDRESSES_EQUAL(&(strinfo->src_addr), &(src_rev_))
|
||||
if (addresses_equal(&(strinfo->src_addr), &(src_rev_))
|
||||
&& (strinfo->src_port == port_src_rev_)
|
||||
&& (ADDRESSES_EQUAL(&(strinfo->dest_addr), &(dst_rev_)))
|
||||
&& (addresses_equal(&(strinfo->dest_addr), &(dst_rev_)))
|
||||
&& (strinfo->dest_port == port_dst_rev_))
|
||||
{
|
||||
packet_count_rev_ = strinfo->packet_count;
|
||||
|
|
|
@ -143,9 +143,9 @@ gboolean rtp_stream_info_is_reverse(const rtp_stream_info_t *stream_a, rtp_strea
|
|||
if (stream_a == NULL || stream_b == NULL)
|
||||
return FALSE;
|
||||
|
||||
if ((ADDRESSES_EQUAL(&(stream_a->src_addr), &(stream_b->dest_addr)))
|
||||
if ((addresses_equal(&(stream_a->src_addr), &(stream_b->dest_addr)))
|
||||
&& (stream_a->src_port == stream_b->dest_port)
|
||||
&& (ADDRESSES_EQUAL(&(stream_a->dest_addr), &(stream_b->src_addr)))
|
||||
&& (addresses_equal(&(stream_a->dest_addr), &(stream_b->src_addr)))
|
||||
&& (stream_a->dest_port == stream_b->src_port))
|
||||
return TRUE;
|
||||
else
|
||||
|
|
|
@ -65,9 +65,9 @@ static gint rtp_stream_info_cmp(gconstpointer aa, gconstpointer bb)
|
|||
return 0;
|
||||
if (a==NULL || b==NULL)
|
||||
return 1;
|
||||
if (ADDRESSES_EQUAL(&(a->src_addr), &(b->src_addr))
|
||||
if (addresses_equal(&(a->src_addr), &(b->src_addr))
|
||||
&& (a->src_port == b->src_port)
|
||||
&& ADDRESSES_EQUAL(&(a->dest_addr), &(b->dest_addr))
|
||||
&& addresses_equal(&(a->dest_addr), &(b->dest_addr))
|
||||
&& (a->dest_port == b->dest_port)
|
||||
&& (a->ssrc == b->ssrc))
|
||||
return 0;
|
||||
|
@ -208,9 +208,9 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
|
||||
/* gather infos on the stream this packet is part of */
|
||||
memset(&new_stream_info, 0, sizeof(rtp_stream_info_t));
|
||||
COPY_ADDRESS(&(new_stream_info.src_addr), &(pinfo->src));
|
||||
copy_address(&(new_stream_info.src_addr), &(pinfo->src));
|
||||
new_stream_info.src_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&(new_stream_info.dest_addr), &(pinfo->dst));
|
||||
copy_address(&(new_stream_info.dest_addr), &(pinfo->dst));
|
||||
new_stream_info.dest_port = pinfo->destport;
|
||||
new_stream_info.ssrc = rtpinfo->info_sync_src;
|
||||
new_stream_info.payload_type = rtpinfo->info_payload_type;
|
||||
|
@ -433,7 +433,7 @@ rtp_packet_analyse(tap_rtp_stat_t *statinfo,
|
|||
if (statinfo->first_packet) {
|
||||
/* Save the MAC address of the first RTP frame */
|
||||
if( pinfo->dl_src.type == AT_ETHER){
|
||||
COPY_ADDRESS(&(statinfo->first_packet_mac_addr), &(pinfo->dl_src));
|
||||
copy_address(&(statinfo->first_packet_mac_addr), &(pinfo->dl_src));
|
||||
}
|
||||
statinfo->start_seq_nr = rtpinfo->info_seq_num;
|
||||
statinfo->stop_seq_nr = rtpinfo->info_seq_num;
|
||||
|
@ -469,7 +469,7 @@ rtp_packet_analyse(tap_rtp_stat_t *statinfo,
|
|||
|
||||
/* Chek for duplicates (src mac differs from first_packet_mac_addr) */
|
||||
if( pinfo->dl_src.type == AT_ETHER){
|
||||
if(!ADDRESSES_EQUAL(&(statinfo->first_packet_mac_addr), &(pinfo->dl_src))){
|
||||
if(!addresses_equal(&(statinfo->first_packet_mac_addr), &(pinfo->dl_src))){
|
||||
statinfo->flags |= STAT_FLAG_DUP_PKT;
|
||||
statinfo->delta = current_time-(statinfo->time);
|
||||
return;
|
||||
|
|
|
@ -247,7 +247,7 @@ add_chunk_count(address *vadd, sctp_assoc_info_t *info, guint32 direction, guint
|
|||
if (ch->direction == direction)
|
||||
{
|
||||
v = (address *) (ch->addr);
|
||||
if (ADDRESSES_EQUAL(vadd, v))
|
||||
if (addresses_equal(vadd, v))
|
||||
{
|
||||
if (IS_SCTP_CHUNK_TYPE(type))
|
||||
ch->addr_count[type]++;
|
||||
|
@ -297,7 +297,7 @@ add_address(address *vadd, sctp_assoc_info_t *info, guint16 direction)
|
|||
while (list)
|
||||
{
|
||||
v = (address *) (list->data);
|
||||
if (ADDRESSES_EQUAL(vadd, v)) {
|
||||
if (addresses_equal(vadd, v)) {
|
||||
g_free(vadd);
|
||||
return info;
|
||||
}
|
||||
|
|
|
@ -91,15 +91,15 @@ seq_analysis_frame_packet( void *ptr, packet_info *pinfo, epan_dissect_t *edt _U
|
|||
if (sainfo->any_addr) {
|
||||
if (pinfo->net_src.type!=AT_NONE && pinfo->net_dst.type!=AT_NONE) {
|
||||
sai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
COPY_ADDRESS(&(sai->src_addr),&(pinfo->net_src));
|
||||
COPY_ADDRESS(&(sai->dst_addr),&(pinfo->net_dst));
|
||||
copy_address(&(sai->src_addr),&(pinfo->net_src));
|
||||
copy_address(&(sai->dst_addr),&(pinfo->net_dst));
|
||||
}
|
||||
|
||||
} else {
|
||||
if (pinfo->src.type!=AT_NONE && pinfo->dst.type!=AT_NONE) {
|
||||
sai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
COPY_ADDRESS(&(sai->src_addr),&(pinfo->src));
|
||||
COPY_ADDRESS(&(sai->dst_addr),&(pinfo->dst));
|
||||
copy_address(&(sai->src_addr),&(pinfo->src));
|
||||
copy_address(&(sai->dst_addr),&(pinfo->dst));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,11 +199,11 @@ seq_analysis_tcp_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt
|
|||
sai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
sai->fd = pinfo->fd;
|
||||
if (sainfo->any_addr) {
|
||||
COPY_ADDRESS(&(sai->src_addr),&(pinfo->net_src));
|
||||
COPY_ADDRESS(&(sai->dst_addr),&(pinfo->net_dst));
|
||||
copy_address(&(sai->src_addr),&(pinfo->net_src));
|
||||
copy_address(&(sai->dst_addr),&(pinfo->net_dst));
|
||||
} else {
|
||||
COPY_ADDRESS(&(sai->src_addr),&(pinfo->src));
|
||||
COPY_ADDRESS(&(sai->dst_addr),&(pinfo->dst));
|
||||
copy_address(&(sai->src_addr),&(pinfo->src));
|
||||
copy_address(&(sai->dst_addr),&(pinfo->dst));
|
||||
}
|
||||
sai->port_src=pinfo->srcport;
|
||||
sai->port_dst=pinfo->destport;
|
||||
|
@ -436,14 +436,14 @@ static guint add_or_get_node(seq_analysis_info_t *sainfo, address *node) {
|
|||
if (node->type == AT_NONE) return NODE_OVERFLOW;
|
||||
|
||||
for (i=0; i<MAX_NUM_NODES && i < sainfo->num_nodes ; i++) {
|
||||
if ( CMP_ADDRESS(&(sainfo->nodes[i]), node) == 0 ) return i; /* it is in the array */
|
||||
if ( cmp_address(&(sainfo->nodes[i]), node) == 0 ) return i; /* it is in the array */
|
||||
}
|
||||
|
||||
if (i >= MAX_NUM_NODES) {
|
||||
return NODE_OVERFLOW;
|
||||
} else {
|
||||
sainfo->num_nodes++;
|
||||
COPY_ADDRESS(&(sainfo->nodes[i]), node);
|
||||
copy_address(&(sainfo->nodes[i]), node);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,9 +61,9 @@ tapall_tcpip_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
* We only know the stream number. Fill in our connection data.
|
||||
* We assume that the server response is more interesting.
|
||||
*/
|
||||
COPY_ADDRESS(&tg->src_address, &tcphdr->ip_dst);
|
||||
copy_address(&tg->src_address, &tcphdr->ip_dst);
|
||||
tg->src_port = tcphdr->th_dport;
|
||||
COPY_ADDRESS(&tg->dst_address, &tcphdr->ip_src);
|
||||
copy_address(&tg->dst_address, &tcphdr->ip_src);
|
||||
tg->dst_port = tcphdr->th_sport;
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,8 @@ tapall_tcpip_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
segment->th_sport = tcphdr->th_sport;
|
||||
segment->th_dport = tcphdr->th_dport;
|
||||
segment->th_seglen = tcphdr->th_seglen;
|
||||
COPY_ADDRESS(&segment->ip_src, &tcphdr->ip_src);
|
||||
COPY_ADDRESS(&segment->ip_dst, &tcphdr->ip_dst);
|
||||
copy_address(&segment->ip_src, &tcphdr->ip_src);
|
||||
copy_address(&segment->ip_dst, &tcphdr->ip_dst);
|
||||
|
||||
segment->num_sack_ranges = MIN(MAX_TCP_SACK_RANGES, tcphdr->num_sack_ranges);
|
||||
if (segment->num_sack_ranges > 0) {
|
||||
|
@ -132,9 +132,9 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
|
|||
ts.direction = COMPARE_ANY_DIR;
|
||||
|
||||
/* Remember stream info in graph */
|
||||
COPY_ADDRESS(&tg->src_address, ¤t.ip_src);
|
||||
copy_address(&tg->src_address, ¤t.ip_src);
|
||||
tg->src_port = current.th_sport;
|
||||
COPY_ADDRESS(&tg->dst_address, ¤t.ip_dst);
|
||||
copy_address(&tg->dst_address, ¤t.ip_dst);
|
||||
tg->dst_port = current.th_dport;
|
||||
tg->stream = header->th_stream;
|
||||
}
|
||||
|
@ -178,16 +178,16 @@ compare_headers(address *saddr1, address *daddr1, guint16 sport1, guint16 dport1
|
|||
{
|
||||
int dir1, dir2;
|
||||
|
||||
dir1 = ((!(CMP_ADDRESS(saddr1, saddr2))) &&
|
||||
(!(CMP_ADDRESS(daddr1, daddr2))) &&
|
||||
dir1 = ((!(cmp_address(saddr1, saddr2))) &&
|
||||
(!(cmp_address(daddr1, daddr2))) &&
|
||||
(sport1==sport2) &&
|
||||
(dport1==dport2));
|
||||
|
||||
if (dir == COMPARE_CURR_DIR) {
|
||||
return dir1;
|
||||
} else {
|
||||
dir2 = ((!(CMP_ADDRESS(saddr1, daddr2))) &&
|
||||
(!(CMP_ADDRESS(daddr1, saddr2))) &&
|
||||
dir2 = ((!(cmp_address(saddr1, daddr2))) &&
|
||||
(!(cmp_address(daddr1, saddr2))) &&
|
||||
(sport1 == dport2) &&
|
||||
(dport1 == sport2));
|
||||
return dir1 || dir2;
|
||||
|
@ -268,8 +268,8 @@ tap_tcpip_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
|
|||
to read after this function returns? */
|
||||
th->tcphdrs[th->num_hdrs] = (struct tcpheader *)g_malloc(sizeof(struct tcpheader));
|
||||
*(th->tcphdrs[th->num_hdrs]) = *header;
|
||||
COPY_ADDRESS(&th->tcphdrs[th->num_hdrs]->ip_src, &header->ip_src);
|
||||
COPY_ADDRESS(&th->tcphdrs[th->num_hdrs]->ip_dst, &header->ip_dst);
|
||||
copy_address(&th->tcphdrs[th->num_hdrs]->ip_src, &header->ip_src);
|
||||
copy_address(&th->tcphdrs[th->num_hdrs]->ip_dst, &header->ip_dst);
|
||||
|
||||
th->num_hdrs++;
|
||||
}
|
||||
|
@ -359,8 +359,8 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
|
|||
hdrs->th_sport = th.tcphdrs[0]->th_sport;
|
||||
hdrs->th_dport = th.tcphdrs[0]->th_dport;
|
||||
hdrs->th_seglen = th.tcphdrs[0]->th_seglen;
|
||||
COPY_ADDRESS(&hdrs->ip_src, &th.tcphdrs[0]->ip_src);
|
||||
COPY_ADDRESS(&hdrs->ip_dst, &th.tcphdrs[0]->ip_dst);
|
||||
copy_address(&hdrs->ip_src, &th.tcphdrs[0]->ip_src);
|
||||
copy_address(&hdrs->ip_dst, &th.tcphdrs[0]->ip_dst);
|
||||
return th.tcphdrs[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -313,8 +313,8 @@ add_to_graph(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *
|
|||
|
||||
gai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
gai->fd = pinfo->fd;
|
||||
COPY_ADDRESS(&(gai->src_addr),src_addr);
|
||||
COPY_ADDRESS(&(gai->dst_addr),dst_addr);
|
||||
copy_address(&(gai->src_addr),src_addr);
|
||||
copy_address(&(gai->dst_addr),dst_addr);
|
||||
|
||||
gai->port_src=pinfo->srcport;
|
||||
gai->port_dst=pinfo->destport;
|
||||
|
@ -434,8 +434,8 @@ static void insert_to_graph_t38(voip_calls_tapinfo_t *tapinfo, packet_info *pinf
|
|||
|
||||
new_gai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
new_gai->fd = packet_list_get_row_data(frame_num);
|
||||
COPY_ADDRESS(&(new_gai->src_addr),src_addr);
|
||||
COPY_ADDRESS(&(new_gai->dst_addr),dst_addr);
|
||||
copy_address(&(new_gai->src_addr),src_addr);
|
||||
copy_address(&(new_gai->dst_addr),dst_addr);
|
||||
|
||||
new_gai->port_src=pinfo->srcport;
|
||||
new_gai->port_dst=pinfo->destport;
|
||||
|
@ -613,9 +613,9 @@ rtp_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, void c
|
|||
/* not in the list? then create a new entry */
|
||||
if (strinfo==NULL) {
|
||||
strinfo = (rtp_stream_info_t *)g_malloc0(sizeof(rtp_stream_info_t));
|
||||
COPY_ADDRESS(&(strinfo->src_addr), &(pinfo->src));
|
||||
copy_address(&(strinfo->src_addr), &(pinfo->src));
|
||||
strinfo->src_port = pinfo->srcport;
|
||||
COPY_ADDRESS(&(strinfo->dest_addr), &(pinfo->dst));
|
||||
copy_address(&(strinfo->dest_addr), &(pinfo->dst));
|
||||
strinfo->dest_port = pinfo->destport;
|
||||
strinfo->ssrc = rtp_info->info_sync_src;
|
||||
strinfo->payload_type = rtp_info->info_payload_type;
|
||||
|
@ -698,8 +698,8 @@ rtp_draw(void *tap_offset_ptr)
|
|||
} else {
|
||||
new_gai = (seq_analysis_item_t *)g_malloc0(sizeof(seq_analysis_item_t));
|
||||
new_gai->fd = rtp_listinfo->start_fd;
|
||||
COPY_ADDRESS(&(new_gai->src_addr),&(rtp_listinfo->src_addr));
|
||||
COPY_ADDRESS(&(new_gai->dst_addr),&(rtp_listinfo->dest_addr));
|
||||
copy_address(&(new_gai->src_addr),&(rtp_listinfo->src_addr));
|
||||
copy_address(&(new_gai->dst_addr),&(rtp_listinfo->dest_addr));
|
||||
new_gai->port_src = rtp_listinfo->src_port;
|
||||
new_gai->port_dst = rtp_listinfo->dest_port;
|
||||
duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_rel_time) - nstime_to_msec(&rtp_listinfo->start_rel_time));
|
||||
|
@ -779,8 +779,8 @@ rtp_packet_draw(void *tap_offset_ptr)
|
|||
if (rtp_listinfo->start_fd->num<gai->fd->num || !voip_calls_graph_list) {
|
||||
new_gai = g_malloc0(sizeof(seq_analysis_item_t));
|
||||
new_gai->fd = rtp_listinfo->start_fd;
|
||||
COPY_ADDRESS(&(new_gai->src_addr),&(rtp_listinfo->src_addr));
|
||||
COPY_ADDRESS(&(new_gai->dst_addr),&(rtp_listinfo->dest_addr));
|
||||
copy_address(&(new_gai->src_addr),&(rtp_listinfo->src_addr));
|
||||
copy_address(&(new_gai->dst_addr),&(rtp_listinfo->dest_addr));
|
||||
new_gai->port_src = rtp_listinfo->src_port;
|
||||
new_gai->port_dst = rtp_listinfo->dest_port;
|
||||
new_gai->protocol = g_strdup(port_type_to_str(pinfo->ptype));
|
||||
|
@ -905,7 +905,7 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
|
|||
callsinfo->call_state = VOIP_UNKNOWN;
|
||||
callsinfo->from_identity=g_strdup("T38 Media only");
|
||||
callsinfo->to_identity=g_strdup("T38 Media only");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd = pinfo->fd;
|
||||
callsinfo->start_rel_ts = pinfo->rel_ts;
|
||||
|
@ -1088,7 +1088,7 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
|
|||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
callsinfo->from_identity=g_strdup(pi->tap_from_addr);
|
||||
callsinfo->to_identity=g_strdup(pi->tap_to_addr);
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -1118,14 +1118,14 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
|
|||
|
||||
/* let's analyze the call state */
|
||||
|
||||
COPY_ADDRESS(&(tmp_src), &(pinfo->src));
|
||||
COPY_ADDRESS(&(tmp_dst), &(pinfo->dst));
|
||||
copy_address(&(tmp_src), &(pinfo->src));
|
||||
copy_address(&(tmp_dst), &(pinfo->dst));
|
||||
|
||||
if (pi->request_method == NULL) {
|
||||
frame_label = g_strdup_printf("%u %s", pi->response_code, pi->reason_phrase );
|
||||
comment = g_strdup_printf("SIP Status %u %s", pi->response_code, pi->reason_phrase );
|
||||
|
||||
if ((tmp_sipinfo && pi->tap_cseq_number == tmp_sipinfo->invite_cseq)&&(ADDRESSES_EQUAL(&tmp_dst,&(callsinfo->initial_speaker)))) {
|
||||
if ((tmp_sipinfo && pi->tap_cseq_number == tmp_sipinfo->invite_cseq)&&(addresses_equal(&tmp_dst,&(callsinfo->initial_speaker)))) {
|
||||
if ((pi->response_code > 199) && (pi->response_code<300) && (tmp_sipinfo->sip_state == SIP_INVITE_SENT)) {
|
||||
tmp_sipinfo->sip_state = SIP_200_REC;
|
||||
}
|
||||
|
@ -1152,7 +1152,7 @@ TODO: is useful but not perfect, what is appended is truncated when displayed in
|
|||
else {
|
||||
frame_label = g_strdup(pi->request_method);
|
||||
|
||||
if ((strcmp(pi->request_method,"INVITE")==0)&&(ADDRESSES_EQUAL(&tmp_src,&(callsinfo->initial_speaker)))) {
|
||||
if ((strcmp(pi->request_method,"INVITE")==0)&&(addresses_equal(&tmp_src,&(callsinfo->initial_speaker)))) {
|
||||
tmp_sipinfo->invite_cseq = pi->tap_cseq_number;
|
||||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
/* TODO: sometimes truncated when displayed in dialog window */
|
||||
|
@ -1161,7 +1161,7 @@ TODO: is useful but not perfect, what is appended is truncated when displayed in
|
|||
callsinfo->call_id, pi->tap_cseq_number);
|
||||
}
|
||||
else if ((strcmp(pi->request_method,"ACK")==0)&&(pi->tap_cseq_number == tmp_sipinfo->invite_cseq)
|
||||
&&(ADDRESSES_EQUAL(&tmp_src,&(callsinfo->initial_speaker)))&&(tmp_sipinfo->sip_state==SIP_200_REC)
|
||||
&&(addresses_equal(&tmp_src,&(callsinfo->initial_speaker)))&&(tmp_sipinfo->sip_state==SIP_200_REC)
|
||||
&&(callsinfo->call_state == VOIP_CALL_SETUP)) {
|
||||
callsinfo->call_state = VOIP_IN_CALL;
|
||||
comment = g_strdup_printf("SIP Request INVITE ACK 200 CSeq:%d", pi->tap_cseq_number);
|
||||
|
@ -1172,7 +1172,7 @@ TODO: is useful but not perfect, what is appended is truncated when displayed in
|
|||
comment = g_strdup_printf("SIP Request BYE CSeq:%d", pi->tap_cseq_number);
|
||||
}
|
||||
else if ((strcmp(pi->request_method,"CANCEL")==0)&&(pi->tap_cseq_number == tmp_sipinfo->invite_cseq)
|
||||
&&(ADDRESSES_EQUAL(&tmp_src,&(callsinfo->initial_speaker)))&&(callsinfo->call_state==VOIP_CALL_SETUP)) {
|
||||
&&(addresses_equal(&tmp_src,&(callsinfo->initial_speaker)))&&(callsinfo->call_state==VOIP_CALL_SETUP)) {
|
||||
callsinfo->call_state = VOIP_CANCELLED;
|
||||
tmp_sipinfo->sip_state = SIP_CANCEL_SENT;
|
||||
comment = g_strdup_printf("SIP Request CANCEL CSeq:%d", pi->tap_cseq_number);
|
||||
|
@ -1314,7 +1314,7 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t));
|
||||
callsinfo->call_active_state = VOIP_ACTIVE;
|
||||
callsinfo->call_state = VOIP_UNKNOWN;
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -1695,7 +1695,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
list = g_list_next (list);
|
||||
}
|
||||
|
||||
SET_ADDRESS(&pstn_add, AT_STRINGZ, 5, g_strdup("PSTN"));
|
||||
set_address(&pstn_add, AT_STRINGZ, 5, g_strdup("PSTN"));
|
||||
|
||||
/* if it is a new call, add it to the list */
|
||||
if (!callsinfo) {
|
||||
|
@ -1704,7 +1704,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
callsinfo->from_identity=g_strdup(tapinfo->q931_calling_number);
|
||||
callsinfo->to_identity=g_strdup(tapinfo->q931_called_number);
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -1737,7 +1737,7 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
case Q931_RELEASE:
|
||||
case Q931_DISCONNECT:
|
||||
if (callsinfo->call_state==VOIP_CALL_SETUP) {
|
||||
if (ADDRESSES_EQUAL(&(callsinfo->initial_speaker), tapinfo->actrace_direction?&pstn_add:&(pinfo->src) )) { /* forward direction */
|
||||
if (addresses_equal(&(callsinfo->initial_speaker), tapinfo->actrace_direction?&pstn_add:&(pinfo->src) )) { /* forward direction */
|
||||
callsinfo->call_state=VOIP_CANCELLED;
|
||||
}
|
||||
else { /* reverse */
|
||||
|
@ -1910,7 +1910,7 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
callsinfo->call_state = VOIP_UNKNOWN;
|
||||
callsinfo->from_identity=g_strdup("");
|
||||
callsinfo->to_identity=g_strdup("");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -1978,7 +1978,7 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
|
||||
/* Set the Setup address if it was not set */
|
||||
if (tmp_h323info->h225SetupAddr.type == AT_NONE)
|
||||
COPY_ADDRESS(&(tmp_h323info->h225SetupAddr), &(pinfo->src));
|
||||
copy_address(&(tmp_h323info->h225SetupAddr), &(pinfo->src));
|
||||
callsinfo->call_state=VOIP_CALL_SETUP;
|
||||
comment = g_strdup_printf("H225 TunnH245:%s FS:%s", (tmp_h323info->is_h245Tunneling==TRUE?"on":"off"),
|
||||
(pi->is_faststart==TRUE?"on":"off"));
|
||||
|
@ -1991,7 +1991,7 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
break;
|
||||
case H225_RELEASE_COMPLET:
|
||||
if (callsinfo->call_state==VOIP_CALL_SETUP) {
|
||||
if (ADDRESSES_EQUAL(&(tmp_h323info->h225SetupAddr),&(pinfo->src))) { /* forward direction */
|
||||
if (addresses_equal(&(tmp_h323info->h225SetupAddr),&(pinfo->src))) { /* forward direction */
|
||||
callsinfo->call_state=VOIP_CANCELLED;
|
||||
}
|
||||
else { /* reverse */
|
||||
|
@ -2169,8 +2169,8 @@ h245dg_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
|
|||
while (list2)
|
||||
{
|
||||
h245_add=(h245_address_t *)list2->data;
|
||||
if ( (ADDRESSES_EQUAL(&(h245_add->h245_address),&(pinfo->src)) && (h245_add->h245_port == pinfo->srcport))
|
||||
|| (ADDRESSES_EQUAL(&(h245_add->h245_address),&(pinfo->dst)) && (h245_add->h245_port == pinfo->destport)) ) {
|
||||
if ( (addresses_equal(&(h245_add->h245_address),&(pinfo->src)) && (h245_add->h245_port == pinfo->srcport))
|
||||
|| (addresses_equal(&(h245_add->h245_address),&(pinfo->dst)) && (h245_add->h245_port == pinfo->destport)) ) {
|
||||
callsinfo = (voip_calls_info_t*)(list->data);
|
||||
|
||||
++(callsinfo->npackets);
|
||||
|
@ -2515,7 +2515,7 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
callsinfo->from_identity=g_strdup("");
|
||||
callsinfo->to_identity=g_strdup(pi->endpointId);
|
||||
}
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -2703,7 +2703,7 @@ actrace_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
list = g_list_next (list);
|
||||
}
|
||||
|
||||
SET_ADDRESS(&pstn_add, AT_STRINGZ, 5, "PSTN");
|
||||
set_address(&pstn_add, AT_STRINGZ, 5, "PSTN");
|
||||
|
||||
/* if it is a new call, add it to the list */
|
||||
if (!callsinfo) {
|
||||
|
@ -2712,7 +2712,7 @@ actrace_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
callsinfo->from_identity=g_strdup("N/A");
|
||||
callsinfo->to_identity=g_strdup("N/A");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
@ -2840,7 +2840,7 @@ h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan
|
|||
|
||||
callsinfo->npackets = 1;
|
||||
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker), mgc);
|
||||
copy_address(&(callsinfo->initial_speaker), mgc);
|
||||
|
||||
callsinfo->protocol = TEL_H248;
|
||||
callsinfo->call_num = tapinfo->ncalls++;
|
||||
|
@ -2992,7 +2992,7 @@ sccp_calls(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *ed
|
|||
|
||||
callsinfo->npackets = 1;
|
||||
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker), &(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker), &(pinfo->src));
|
||||
|
||||
callsinfo->protocol = SP2VP(assoc->payload);
|
||||
/* Store frame data which holds time and frame number */
|
||||
|
@ -3160,7 +3160,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
}
|
||||
} else {
|
||||
/* If no term id use ips / port to find entry */
|
||||
if(ADDRESSES_EQUAL(&tmp_unistim_info->it_ip, &pinfo->dst) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->src) && (tmp_unistim_info->it_port == pinfo->destport)) {
|
||||
if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->dst) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->src) && (tmp_unistim_info->it_port == pinfo->destport)) {
|
||||
if(tmp_listinfo->call_state == VOIP_COMPLETED || tmp_listinfo->call_state == VOIP_UNKNOWN) {
|
||||
/* Do nothing previous call */
|
||||
} else {
|
||||
|
@ -3168,7 +3168,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if(ADDRESSES_EQUAL(&tmp_unistim_info->it_ip, &pinfo->src) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->dst) && (tmp_unistim_info->it_port == pinfo->srcport)) {
|
||||
else if(addresses_equal(&tmp_unistim_info->it_ip, &pinfo->src) && ADDRESSES_EQUAL(&tmp_unistim_info->ni_ip,&pinfo->dst) && (tmp_unistim_info->it_port == pinfo->srcport)) {
|
||||
if(tmp_listinfo->call_state == VOIP_COMPLETED || tmp_listinfo->call_state == VOIP_UNKNOWN) {
|
||||
/* Do nothing, it ain't our call.. */
|
||||
} else {
|
||||
|
@ -3198,7 +3198,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
callsinfo->from_identity=g_strdup_printf("%x",pi->termid);
|
||||
callsinfo->to_identity=g_strdup("UNKNOWN");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
|
||||
/* Set this on init of struct so in case the call doesn't complete, we'll have a ref. */
|
||||
|
@ -3226,8 +3226,8 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
tmp_unistim_info->string_data = NULL;
|
||||
tmp_unistim_info->key_buffer = NULL;
|
||||
|
||||
COPY_ADDRESS(&(tmp_unistim_info->it_ip),&(pi->it_ip));
|
||||
COPY_ADDRESS(&(tmp_unistim_info->ni_ip),&(pi->ni_ip));
|
||||
copy_address(&(tmp_unistim_info->it_ip),&(pi->it_ip));
|
||||
copy_address(&(tmp_unistim_info->ni_ip),&(pi->ni_ip));
|
||||
tmp_unistim_info->it_port = pi->it_port;
|
||||
|
||||
callsinfo->free_prot_info = g_free;
|
||||
|
@ -3455,7 +3455,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
callsinfo->call_state = VOIP_CALL_SETUP;
|
||||
callsinfo->from_identity=g_strdup("UNKNOWN");
|
||||
callsinfo->to_identity=g_strdup("UNKNOWN");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
|
||||
/* Set this on init of struct so in case the call doesn't complete, we'll have a ref. */
|
||||
|
@ -3482,8 +3482,8 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
|
|||
tmp_unistim_info->string_data = NULL;
|
||||
tmp_unistim_info->key_buffer = NULL;
|
||||
|
||||
COPY_ADDRESS(&(tmp_unistim_info->it_ip),&(pi->it_ip));
|
||||
COPY_ADDRESS(&(tmp_unistim_info->ni_ip),&(pi->ni_ip));
|
||||
copy_address(&(tmp_unistim_info->it_ip),&(pi->it_ip));
|
||||
copy_address(&(tmp_unistim_info->ni_ip),&(pi->ni_ip));
|
||||
tmp_unistim_info->it_port = pi->it_port;
|
||||
|
||||
callsinfo->free_prot_info = g_free;
|
||||
|
@ -3682,7 +3682,7 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
|
|||
tmp_skinnyinfo->callId = si->callId ? si->callId : si->passThruId;
|
||||
callsinfo->npackets = 1;
|
||||
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker), phone);
|
||||
copy_address(&(callsinfo->initial_speaker), phone);
|
||||
|
||||
callsinfo->protocol = VOIP_SKINNY;
|
||||
callsinfo->call_num = tapinfo->ncalls++;
|
||||
|
@ -3826,7 +3826,7 @@ iax2_calls_packet( void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
|
|||
|
||||
callsinfo->npackets = 1;
|
||||
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker), phone);
|
||||
copy_address(&(callsinfo->initial_speaker), phone);
|
||||
callsinfo->from_identity = g_strdup(ii->callingParty);
|
||||
callsinfo->to_identity = g_strdup(ii->calledParty);
|
||||
|
||||
|
@ -3930,7 +3930,7 @@ voip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
|
|||
callsinfo->call_id=g_strdup((pi->call_id)?pi->call_id:"");
|
||||
callsinfo->from_identity = g_strdup((pi->from_identity)?pi->from_identity:"");
|
||||
callsinfo->to_identity = g_strdup((pi->to_identity)?pi->to_identity:"");
|
||||
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
|
||||
callsinfo->selected=FALSE;
|
||||
callsinfo->start_fd=pinfo->fd;
|
||||
callsinfo->start_rel_ts=pinfo->rel_ts;
|
||||
|
|
Loading…
Reference in New Issue