aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-21 23:07:33 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-21 23:07:33 +0000
commitc702e92121ec5477ecc25a87b00bf478b42c1dc7 (patch)
tree962e68606a5718b59153d14ee28c319eb29a904b /ui
parent74b6c5949957411e5ce95e5e4b1a34997cf31b09 (diff)
Replace relative timestamp with reference frame number. Saves 16B per frame.
svn path=/trunk/; revision=50772
Diffstat (limited to 'ui')
-rw-r--r--ui/cli/tap-iostat.c6
-rw-r--r--ui/cli/tap-iousers.c20
-rw-r--r--ui/cli/tap-sv.c2
-rw-r--r--ui/gtk/conversations_eth.c2
-rw-r--r--ui/gtk/conversations_fc.c2
-rw-r--r--ui/gtk/conversations_fddi.c2
-rw-r--r--ui/gtk/conversations_ip.c2
-rw-r--r--ui/gtk/conversations_ipv6.c2
-rw-r--r--ui/gtk/conversations_ipx.c2
-rw-r--r--ui/gtk/conversations_ncp.c2
-rw-r--r--ui/gtk/conversations_rsvp.c2
-rw-r--r--ui/gtk/conversations_sctp.c2
-rw-r--r--ui/gtk/conversations_tcpip.c2
-rw-r--r--ui/gtk/conversations_tr.c2
-rw-r--r--ui/gtk/conversations_udpip.c2
-rw-r--r--ui/gtk/conversations_usb.c2
-rw-r--r--ui/gtk/conversations_wlan.c2
-rw-r--r--ui/gtk/iax2_analysis.c4
-rw-r--r--ui/gtk/io_stat.c6
-rw-r--r--ui/gtk/mcast_stream.c20
-rw-r--r--ui/gtk/rlc_lte_graph.c10
-rw-r--r--ui/gtk/rtp_analysis.c2
-rw-r--r--ui/gtk/sctp_stat.c24
-rw-r--r--ui/gtk/tcp_graph.c10
-rw-r--r--ui/gtk/voip_calls.c49
-rw-r--r--ui/gtk/voip_calls.h2
-rw-r--r--ui/gtk/voip_calls_dlg.c4
-rw-r--r--ui/tap-rtp-common.c10
-rw-r--r--ui/time_shift.c9
29 files changed, 121 insertions, 85 deletions
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index e1904da766..667377d4a2 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -105,10 +105,10 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du
mit = (io_stat_item_t *) arg;
parent = mit->parent;
- relative_time = ((guint64)pinfo->fd->rel_ts.secs * 1000000ULL) +
- ((guint64)((pinfo->fd->rel_ts.nsecs+500)/1000));
+ relative_time = ((guint64)pinfo->rel_ts.secs * 1000000ULL) +
+ ((guint64)((pinfo->rel_ts.nsecs+500)/1000));
if (mit->parent->start_time == 0) {
- mit->parent->start_time = pinfo->fd->abs_ts.secs - pinfo->fd->rel_ts.secs;
+ mit->parent->start_time = pinfo->fd->abs_ts.secs - pinfo->rel_ts.secs;
}
/* The prev item before the main one is always the last interval we saw packets for */
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index 3830eaa321..beeef9084e 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -206,7 +206,7 @@ iousers_udpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
}
- iousers_process_name_packet(iu, name1, name2, direction, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, &pinfo->fd->abs_ts);
+ iousers_process_name_packet(iu, name1, name2, direction, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->fd->abs_ts);
return 1;
}
@@ -237,7 +237,7 @@ iousers_sctp_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, cons
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&sctph->ip_dst),s_dport);
}
- iousers_process_name_packet(iu, name1, name2, direction, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, &pinfo->fd->abs_ts);
+ iousers_process_name_packet(iu, name1, name2, direction, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->fd->abs_ts);
return 1;
}
@@ -269,7 +269,7 @@ iousers_tcpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
}
- iousers_process_name_packet_with_conv_id(iu, name1, name2, tcph->th_stream, direction, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, &pinfo->fd->abs_ts);
+ iousers_process_name_packet_with_conv_id(iu, name1, name2, tcph->th_stream, direction, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->fd->abs_ts);
return 1;
}
@@ -281,7 +281,7 @@ iousers_ip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
io_users_t *iu=(io_users_t *)arg;
const ws_ip *iph=(const ws_ip *)vip;
- iousers_process_address_packet(iu, &iph->ip_src, &iph->ip_dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &iph->ip_src, &iph->ip_dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -299,7 +299,7 @@ iousers_ipv6_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, cons
src.data = &ip6h->ip6_src;
dst.data = &ip6h->ip6_dst;
- iousers_process_address_packet(iu, &src, &dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &src, &dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -310,7 +310,7 @@ iousers_ipx_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
io_users_t *iu=(io_users_t *)arg;
const ipxhdr_t *ipxh=(const ipxhdr_t *)vipx;
- iousers_process_address_packet(iu, &ipxh->ipx_src, &ipxh->ipx_dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &ipxh->ipx_src, &ipxh->ipx_dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -321,7 +321,7 @@ iousers_fc_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
io_users_t *iu=(io_users_t *)arg;
const fc_hdr *fchdr=(const fc_hdr *)vfc;
- iousers_process_address_packet(iu, &fchdr->s_id, &fchdr->d_id, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &fchdr->s_id, &fchdr->d_id, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -332,7 +332,7 @@ iousers_eth_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
io_users_t *iu=(io_users_t *)arg;
const eth_hdr *ehdr=(const eth_hdr *)veth;
- iousers_process_address_packet(iu, &ehdr->src, &ehdr->dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &ehdr->src, &ehdr->dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -343,7 +343,7 @@ iousers_fddi_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, cons
io_users_t *iu=(io_users_t *)arg;
const fddi_hdr *ehdr=(const fddi_hdr *)veth;
- iousers_process_address_packet(iu, &ehdr->src, &ehdr->dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &ehdr->src, &ehdr->dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
@@ -354,7 +354,7 @@ iousers_tr_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
io_users_t *iu=(io_users_t *)arg;
const tr_hdr *trhdr=(const tr_hdr *)vtr;
- iousers_process_address_packet(iu, &trhdr->src, &trhdr->dst, pinfo->fd->pkt_len, &pinfo->fd->rel_ts);
+ iousers_process_address_packet(iu, &trhdr->src, &trhdr->dst, pinfo->fd->pkt_len, &pinfo->rel_ts);
return 1;
}
diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c
index ccd705a445..8f2960a297 100644
--- a/ui/cli/tap-sv.c
+++ b/ui/cli/tap-sv.c
@@ -40,7 +40,7 @@ sv_packet(void *prs _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void
int i;
const sv_frame_data * sv_data = (const sv_frame_data *)pri;
- printf("%f %u ", nstime_to_sec(&pinfo->fd->rel_ts), sv_data->smpCnt);
+ printf("%f %u ", nstime_to_sec(&pinfo->rel_ts), sv_data->smpCnt);
for(i = 0; i < sv_data->num_phsMeas; i++) {
printf("%d ", sv_data->phsMeas[i].value);
diff --git a/ui/gtk/conversations_eth.c b/ui/gtk/conversations_eth.c
index ed3ffe9dbf..513579a1d9 100644
--- a/ui/gtk/conversations_eth.c
+++ b/ui/gtk/conversations_eth.c
@@ -43,7 +43,7 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
{
const eth_hdr *ehdr=(eth_hdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_ETHER, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_ETHER, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_fc.c b/ui/gtk/conversations_fc.c
index ee1f8c7de8..3c66fb88ac 100644
--- a/ui/gtk/conversations_fc.c
+++ b/ui/gtk/conversations_fc.c
@@ -46,7 +46,7 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
{
const fc_hdr *fchdr=(fc_hdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_fddi.c b/ui/gtk/conversations_fddi.c
index dce562f944..39ae8791bf 100644
--- a/ui/gtk/conversations_fddi.c
+++ b/ui/gtk/conversations_fddi.c
@@ -43,7 +43,7 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
{
const fddi_hdr *ehdr=(fddi_hdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_FDDI, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_FDDI, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_ip.c b/ui/gtk/conversations_ip.c
index 8fbf67602a..3be82f2c65 100644
--- a/ui/gtk/conversations_ip.c
+++ b/ui/gtk/conversations_ip.c
@@ -43,7 +43,7 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
{
const ws_ip *iph=(ws_ip *)vip;
- add_conversation_table_data((conversations_table *)pct, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_ipv6.c b/ui/gtk/conversations_ipv6.c
index 6d03cd55e5..e01782c02e 100644
--- a/ui/gtk/conversations_ipv6.c
+++ b/ui/gtk/conversations_ipv6.c
@@ -51,7 +51,7 @@ ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
src.data = &ip6h->ip6_src;
dst.data = &ip6h->ip6_dst;
- add_conversation_table_data((conversations_table *)pct, &src, &dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &src, &dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_ipx.c b/ui/gtk/conversations_ipx.c
index 9664f88c48..c3036bf78d 100644
--- a/ui/gtk/conversations_ipx.c
+++ b/ui/gtk/conversations_ipx.c
@@ -44,7 +44,7 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
{
const ipxhdr_t *ipxh=(ipxhdr_t *)vip;
- add_conversation_table_data((conversations_table *)pct, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_ncp.c b/ui/gtk/conversations_ncp.c
index e1e9e415f7..f7cf956af7 100644
--- a/ui/gtk/conversations_ncp.c
+++ b/ui/gtk/conversations_ncp.c
@@ -46,7 +46,7 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
connection = (ncph->conn_high * 256)+ncph->conn_low;
if (connection < 65535) {
- add_conversation_table_data((conversations_table *)pct, &pinfo->src, &pinfo->dst, connection, connection, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NCP);
+ add_conversation_table_data((conversations_table *)pct, &pinfo->src, &pinfo->dst, connection, connection, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NCP);
}
return 1;
diff --git a/ui/gtk/conversations_rsvp.c b/ui/gtk/conversations_rsvp.c
index 33bb3d1819..984cfac701 100644
--- a/ui/gtk/conversations_rsvp.c
+++ b/ui/gtk/conversations_rsvp.c
@@ -45,7 +45,7 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
add_conversation_table_data((conversations_table *)pct,
&rsvph->source, &rsvph->destination, 0, 0, 1,
- pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_sctp.c b/ui/gtk/conversations_sctp.c
index e02783b940..5eed8cb671 100644
--- a/ui/gtk/conversations_sctp.c
+++ b/ui/gtk/conversations_sctp.c
@@ -50,7 +50,7 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
sctphdr->dport,
1,
pinfo->fd->pkt_len,
- &pinfo->fd->rel_ts,
+ &pinfo->rel_ts,
SAT_NONE,
PT_SCTP);
diff --git a/ui/gtk/conversations_tcpip.c b/ui/gtk/conversations_tcpip.c
index e999375d47..f986693fd3 100644
--- a/ui/gtk/conversations_tcpip.c
+++ b/ui/gtk/conversations_tcpip.c
@@ -43,7 +43,7 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_
{
const struct tcpheader *tcphdr=(struct tcpheader *)vip;
- add_conversation_table_data_with_conv_id((conversations_table *)pct, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_TCP);
+ add_conversation_table_data_with_conv_id((conversations_table *)pct, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_TCP);
return 1;
}
diff --git a/ui/gtk/conversations_tr.c b/ui/gtk/conversations_tr.c
index 87cfc80c45..3f91458a52 100644
--- a/ui/gtk/conversations_tr.c
+++ b/ui/gtk/conversations_tr.c
@@ -43,7 +43,7 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c
{
const tr_hdr *trhdr=(tr_hdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_TOKENRING, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_TOKENRING, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_udpip.c b/ui/gtk/conversations_udpip.c
index 180d32e28f..8b24bd785a 100644
--- a/ui/gtk/conversations_udpip.c
+++ b/ui/gtk/conversations_udpip.c
@@ -43,7 +43,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_
{
const e_udphdr *udphdr=(e_udphdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_UDP);
+ add_conversation_table_data((conversations_table *)pct, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_UDP);
return 1;
}
diff --git a/ui/gtk/conversations_usb.c b/ui/gtk/conversations_usb.c
index 8c320ba52a..76a469a698 100644
--- a/ui/gtk/conversations_usb.c
+++ b/ui/gtk/conversations_usb.c
@@ -40,7 +40,7 @@
static int
usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_)
{
- add_conversation_table_data((conversations_table *)pct, &pinfo->src, &pinfo->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &pinfo->src, &pinfo->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);
return 1;
}
diff --git a/ui/gtk/conversations_wlan.c b/ui/gtk/conversations_wlan.c
index c2de6ae32f..8050ce90aa 100644
--- a/ui/gtk/conversations_wlan.c
+++ b/ui/gtk/conversations_wlan.c
@@ -43,7 +43,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_,
{
const wlan_hdr *whdr=(wlan_hdr *)vip;
- add_conversation_table_data((conversations_table *)pct, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_WLAN, PT_NONE);
+ add_conversation_table_data((conversations_table *)pct, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_WLAN, PT_NONE);
return 1;
}
diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c
index aa00b35279..54aa27b4aa 100644
--- a/ui/gtk/iax2_analysis.c
+++ b/ui/gtk/iax2_analysis.c
@@ -385,7 +385,7 @@ iax2_packet_add_graph(dialog_graph_graph_t *dgg, tap_iax2_stat_t *statinfo, pack
if (dgg->ud->dlg.dialog_graph.start_time == -1) { /* it is the first */
dgg->ud->dlg.dialog_graph.start_time = statinfo->start_time;
}
- rtp_time = nstime_to_msec(&pinfo->fd->rel_ts) - dgg->ud->dlg.dialog_graph.start_time;
+ rtp_time = nstime_to_msec(&pinfo->rel_ts) - dgg->ud->dlg.dialog_graph.start_time;
if (rtp_time < 0) {
return FALSE;
}
@@ -521,7 +521,7 @@ int iax2_packet_analyse(tap_iax2_stat_t *statinfo,
}
/* store the current time and calculate the current jitter */
- current_time = nstime_to_sec(&pinfo->fd->rel_ts);
+ current_time = nstime_to_sec(&pinfo->rel_ts);
current_diff = fabs (current_time - statinfo->time - (((double)iax2info->timestamp - (double)statinfo->timestamp)/1000));
current_jitter = statinfo->jitter + ( current_diff - statinfo->jitter)/16;
statinfo->delta = current_time - (statinfo->time);
diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c
index a6c6d09e2a..86d97b522c 100644
--- a/ui/gtk/io_stat.c
+++ b/ui/gtk/io_stat.c
@@ -290,7 +290,7 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
/*
* Find in which interval this is supposed to go and store the interval index as idx
*/
- time_delta = pinfo->fd->rel_ts;
+ time_delta = pinfo->rel_ts;
if (time_delta.nsecs<0) {
time_delta.secs--;
time_delta.nsecs += 1000000000;
@@ -313,7 +313,7 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
/* set start time */
if ((io->start_time.secs == 0) && (io->start_time.nsecs == 0)) {
- nstime_delta(&io->start_time, &pinfo->fd->abs_ts, &pinfo->fd->rel_ts);
+ nstime_delta(&io->start_time, &pinfo->fd->abs_ts, &pinfo->rel_ts);
}
/* Point to the appropriate io_item_t struct */
@@ -425,7 +425,7 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
j = idx;
/*
* Handle current interval */
- pt = pinfo->fd->rel_ts.secs * 1000000 + pinfo->fd->rel_ts.nsecs / 1000;
+ pt = pinfo->rel_ts.secs * 1000000 + pinfo->rel_ts.nsecs / 1000;
pt = pt % (io->interval * 1000);
if (pt > t) {
pt = t;
diff --git a/ui/gtk/mcast_stream.c b/ui/gtk/mcast_stream.c
index dd90e253e5..db4f0e9523 100644
--- a/ui/gtk/mcast_stream.c
+++ b/ui/gtk/mcast_stream.c
@@ -200,8 +200,8 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
tmp_strinfo.first_frame_num = pinfo->fd->num;
tmp_strinfo.start_sec = (guint32) pinfo->fd->abs_ts.secs;
tmp_strinfo.start_usec = pinfo->fd->abs_ts.nsecs/1000;
- tmp_strinfo.start_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- tmp_strinfo.start_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ tmp_strinfo.start_rel_sec = (guint32) pinfo->rel_ts.secs;
+ tmp_strinfo.start_rel_usec = pinfo->rel_ts.nsecs/1000;
tmp_strinfo.vlan_id = 0;
/* reset Mcast stats */
@@ -233,8 +233,8 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
tapinfo->allstreams = (mcast_stream_info_t *)g_malloc(sizeof(mcast_stream_info_t));
tapinfo->allstreams->element.buff =
(struct timeval *)g_malloc(buffsize * sizeof(struct timeval));
- tapinfo->allstreams->start_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- tapinfo->allstreams->start_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ tapinfo->allstreams->start_rel_sec = (guint32) pinfo->rel_ts.secs;
+ tapinfo->allstreams->start_rel_usec = pinfo->rel_ts.nsecs/1000;
tapinfo->allstreams->total_bytes = 0;
tapinfo->allstreams->element.first=0;
tapinfo->allstreams->element.last=0;
@@ -252,8 +252,8 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
}
/* time between first and last packet in the group */
- strinfo->stop_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- strinfo->stop_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ strinfo->stop_rel_sec = (guint32) pinfo->rel_ts.secs;
+ strinfo->stop_rel_usec = pinfo->rel_ts.nsecs/1000;
deltatime = ((float)((strinfo->stop_rel_sec * 1000000 + strinfo->stop_rel_usec)
- (strinfo->start_rel_sec*1000000 + strinfo->start_rel_usec)))/1000000;
@@ -267,8 +267,8 @@ mcaststream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const
strinfo->apackets = (guint32) (strinfo->npackets / deltatime);
/* time between first and last packet in any group */
- tapinfo->allstreams->stop_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- tapinfo->allstreams->stop_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ tapinfo->allstreams->stop_rel_sec = (guint32) pinfo->rel_ts.secs;
+ tapinfo->allstreams->stop_rel_usec = pinfo->rel_ts.nsecs/1000;
deltatime = ((float)((tapinfo->allstreams->stop_rel_sec * 1000000 + tapinfo->allstreams->stop_rel_usec)
- (tapinfo->allstreams->start_rel_sec*1000000 + tapinfo->allstreams->start_rel_usec)))/1000000;
@@ -433,8 +433,8 @@ slidingwindow(mcast_stream_info_t *strinfo, packet_info *pinfo)
}
/* burst count */
- buffer[strinfo->element.last].tv_sec = (guint32) pinfo->fd->rel_ts.secs;
- buffer[strinfo->element.last].tv_usec = pinfo->fd->rel_ts.nsecs/1000;
+ buffer[strinfo->element.last].tv_sec = (guint32) pinfo->rel_ts.secs;
+ buffer[strinfo->element.last].tv_usec = pinfo->rel_ts.nsecs/1000;
while(comparetimes((struct timeval *)&(buffer[strinfo->element.first]),
(struct timeval *)&(buffer[strinfo->element.last]), mcast_stream_burstint)){
strinfo->element.first++;
diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c
index 79039d14b3..1b48c526b5 100644
--- a/ui/gtk/rlc_lte_graph.c
+++ b/ui/gtk/rlc_lte_graph.c
@@ -749,8 +749,8 @@ tapall_rlc_lte_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, co
/* It matches. Add to end of segment list */
segment->next = NULL;
segment->num = pinfo->fd->num;
- segment->rel_secs = (guint32) pinfo->fd->rel_ts.secs;
- segment->rel_usecs = pinfo->fd->rel_ts.nsecs/1000;
+ segment->rel_secs = (guint32) pinfo->rel_ts.secs;
+ segment->rel_usecs = pinfo->rel_ts.nsecs/1000;
segment->abs_secs = (guint32) pinfo->fd->abs_ts.secs;
segment->abs_usecs = pinfo->fd->abs_ts.nsecs/1000;
@@ -887,6 +887,7 @@ static rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct segment
epan_dissect_t edt;
dfilter_t *sfcode;
GString *error_string;
+ nstime_t rel_ts;
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
if (cf->state == FILE_CLOSED) {
@@ -917,6 +918,7 @@ static rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct segment
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
+ rel_ts = edt.pi.rel_ts;
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);
@@ -942,8 +944,8 @@ static rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf, struct segment
/* For now, still always choose the first/only one */
hdrs->num = fdata->num;
- hdrs->rel_secs = (guint32) fdata->rel_ts.secs;
- hdrs->rel_usecs = fdata->rel_ts.nsecs/1000;
+ hdrs->rel_secs = (guint32) rel_ts.secs;
+ hdrs->rel_usecs = rel_ts.nsecs/1000;
hdrs->abs_secs = (guint32) fdata->abs_ts.secs;
hdrs->abs_usecs = fdata->abs_ts.nsecs/1000;
diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c
index 312edefd6a..b6e01ba413 100644
--- a/ui/gtk/rtp_analysis.c
+++ b/ui/gtk/rtp_analysis.c
@@ -426,7 +426,7 @@ rtp_packet_add_graph(dialog_graph_graph_t *dgg, tap_rtp_stat_t *statinfo, packet
if (dgg->ud->dlg.dialog_graph.start_time == -1) { /* it is the first */
dgg->ud->dlg.dialog_graph.start_time = statinfo->start_time;
}
- rtp_time = nstime_to_msec(&pinfo->fd->rel_ts) - dgg->ud->dlg.dialog_graph.start_time;
+ rtp_time = nstime_to_msec(&pinfo->rel_ts) - dgg->ud->dlg.dialog_graph.start_time;
if (rtp_time < 0) {
return FALSE;
}
diff --git a/ui/gtk/sctp_stat.c b/ui/gtk/sctp_stat.c
index 227b8dc0ee..5e050fc058 100644
--- a/ui/gtk/sctp_stat.c
+++ b/ui/gtk/sctp_stat.c
@@ -709,8 +709,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
sack->dst.data = addr;
- sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- sack->usecs=tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ sack->secs=tsn->secs = (guint32)pinfo->rel_ts.secs;
+ sack->usecs=tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID) ||
@@ -854,8 +854,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tsn->tsns = g_list_append(tsn->tsns, t_s_n);
tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
- tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ tsn_s->secs = tsn->secs = (guint32)pinfo->rel_ts.secs;
+ tsn_s->usecs = tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
tsn_s->offset = 0;
tsn_s->framenumber = framenumber;
if (datachunk)
@@ -897,8 +897,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
sackchunk = TRUE;
tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
- tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ tsn_s->secs = tsn->secs = (guint32)pinfo->rel_ts.secs;
+ tsn_s->usecs = tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
tsn_s->offset = 0;
tsn_s->framenumber = framenumber;
tsn_s->length = tvb_get_ntohl(sctp_info->tvb[chunk_number], SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET);
@@ -994,8 +994,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
addr = (guint8 *)g_malloc(tmp_info.dst.len);
memcpy(addr, tmp_info.dst.data, tmp_info.dst.len);
sack->dst.data = addr;
- sack->secs=tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- sack->usecs=tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ sack->secs=tsn->secs = (guint32)pinfo->rel_ts.secs;
+ sack->usecs=tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
if (((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_DATA_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_SACK_CHUNK_ID) ||
((tvb_get_guint8(sctp_info->tvb[0],0)) == SCTP_NR_SACK_CHUNK_ID) ||
@@ -1171,8 +1171,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
- tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ tsn_s->secs = tsn->secs = (guint32)pinfo->rel_ts.secs;
+ tsn_s->usecs = tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
tsn_s->offset = 0;
tsn_s->framenumber = framenumber;
tsn_s->length = length;
@@ -1291,8 +1291,8 @@ packet(void *tapdata _U_, packet_info *pinfo , epan_dissect_t *edt _U_ , const v
sackchunk = TRUE;
tsn_s = (struct tsn_sort *)g_malloc(sizeof(struct tsn_sort));
tsn_s->tsnumber = tsnumber;
- tsn_s->secs = tsn->secs = (guint32)pinfo->fd->rel_ts.secs;
- tsn_s->usecs = tsn->usecs = (guint32)pinfo->fd->rel_ts.nsecs/1000;
+ tsn_s->secs = tsn->secs = (guint32)pinfo->rel_ts.secs;
+ tsn_s->usecs = tsn->usecs = (guint32)pinfo->rel_ts.nsecs/1000;
tsn_s->offset = 0;
tsn_s->framenumber = framenumber;
tsn_s->length = tvb_get_ntohl(sctp_info->tvb[chunk_number], SACK_CHUNK_ADV_REC_WINDOW_CREDIT_OFFSET);
diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c
index c7d715702f..d285116009 100644
--- a/ui/gtk/tcp_graph.c
+++ b/ui/gtk/tcp_graph.c
@@ -1832,8 +1832,8 @@ tapall_tcpip_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, cons
struct segment *segment = (struct segment *)g_malloc(sizeof(struct segment));
segment->next = NULL;
segment->num = pinfo->fd->num;
- segment->rel_secs = (guint32)pinfo->fd->rel_ts.secs;
- segment->rel_usecs = pinfo->fd->rel_ts.nsecs/1000;
+ segment->rel_secs = (guint32)pinfo->rel_ts.secs;
+ segment->rel_usecs = pinfo->rel_ts.nsecs/1000;
segment->abs_secs = (guint32)pinfo->fd->abs_ts.secs;
segment->abs_usecs = pinfo->fd->abs_ts.nsecs/1000;
segment->th_seq = tcphdr->th_seq;
@@ -1964,6 +1964,7 @@ static struct tcpheader *select_tcpip_session(capture_file *cf, struct segment *
epan_dissect_t edt;
dfilter_t *sfcode;
GString *error_string;
+ nstime_t rel_ts;
th_t th = {0, {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
fdata = cf->current_frame;
@@ -1990,6 +1991,7 @@ static struct tcpheader *select_tcpip_session(capture_file *cf, struct segment *
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
+ rel_ts = edt.pi.rel_ts;
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);
@@ -2015,8 +2017,8 @@ static struct tcpheader *select_tcpip_session(capture_file *cf, struct segment *
/* For now, still always choose the first/only one */
hdrs->num = fdata->num;
- hdrs->rel_secs = (guint32) fdata->rel_ts.secs;
- hdrs->rel_usecs = fdata->rel_ts.nsecs/1000;
+ hdrs->rel_secs = (guint32) rel_ts.secs;
+ hdrs->rel_usecs = rel_ts.nsecs/1000;
hdrs->abs_secs = (guint32) fdata->abs_ts.secs;
hdrs->abs_usecs = fdata->abs_ts.nsecs/1000;
hdrs->th_seq = th.tcphdrs[0]->th_seq;
diff --git a/ui/gtk/voip_calls.c b/ui/gtk/voip_calls.c
index 500da4fe49..8d7e06a23c 100644
--- a/ui/gtk/voip_calls.c
+++ b/ui/gtk/voip_calls.c
@@ -138,7 +138,9 @@ typedef struct _voip_rtp_stream_info {
guint32 setup_frame_number; /* frame number of setup message */
/* The frame_data struct holds the frame number and timing information needed. */
frame_data *start_fd;
+ nstime_t start_rel_ts;
frame_data *stop_fd;
+ nstime_t stop_rel_ts;
gint32 rtp_event;
} voip_rtp_stream_info_t;
@@ -564,6 +566,7 @@ RTP_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, void cons
if (!strinfo->pt_str) strinfo->pt_str = g_strdup(val_to_str_ext(strinfo->pt, &rtp_payload_type_short_vals_ext, "%u"));
strinfo->npackets = 0;
strinfo->start_fd = pinfo->fd;
+ strinfo->start_rel_ts = pinfo->rel_ts;
strinfo->setup_frame_number = pi->info_setup_frame_num;
strinfo->rtp_event = -1;
tapinfo->list = g_list_prepend(tapinfo->list, strinfo);
@@ -572,6 +575,7 @@ RTP_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, void cons
/* Add the info to the existing RTP stream */
strinfo->npackets++;
strinfo->stop_fd = pinfo->fd;
+ strinfo->stop_rel_ts = pinfo->rel_ts;
/* process RTP Event */
if (rtp_evt_frame_num == pinfo->fd->num) {
@@ -615,7 +619,7 @@ static void RTP_packet_draw(void *prs _U_)
/* if RTP was already in the Graph, just update the comment information */
gai = (graph_analysis_item_t *)g_hash_table_lookup(the_tapinfo_struct.graph_analysis->ht, &rtp_listinfo->start_fd->num);
if(gai != NULL) {
- duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_fd->rel_ts) - nstime_to_msec(&rtp_listinfo->start_fd->rel_ts));
+ duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_rel_ts) - nstime_to_msec(&rtp_listinfo->start_rel_ts));
g_free(gai->comment);
gai->comment = g_strdup_printf("%s Num packets:%u Duration:%u.%03us SSRC:0x%X",
(rtp_listinfo->is_srtp)?"SRTP":"RTP", rtp_listinfo->npackets,
@@ -627,7 +631,7 @@ static void RTP_packet_draw(void *prs _U_)
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_fd->rel_ts) - nstime_to_msec(&rtp_listinfo->start_fd->rel_ts));
+ duration = (guint32)(nstime_to_msec(&rtp_listinfo->stop_rel_ts) - nstime_to_msec(&rtp_listinfo->start_rel_ts));
new_gai->frame_label = g_strdup_printf("%s (%s) %s",
(rtp_listinfo->is_srtp)?"SRTP":"RTP",
rtp_listinfo->pt_str,
@@ -827,6 +831,7 @@ T38_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd = pinfo->fd;
+ callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->protocol=MEDIA_T38;
callsinfo->prot_info=NULL;
callsinfo->free_prot_info = NULL;
@@ -835,6 +840,7 @@ T38_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
tapinfo->callsinfo_list = g_list_prepend(tapinfo->callsinfo_list, callsinfo);
}
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -867,7 +873,7 @@ T38_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
comment = g_strdup_printf("WARNING: received t38:%s:HDLC:%s", val_to_str(pi->data_value, t38_T30_data_vals, "Ukn (0x%02X)"), pi->Data_Field_field_type_value == 3 ? "fcs-BAD" : "fcs-BAD-sig-end");
break;
case 7: /* t4-non-ecm-sig-end */
- duration = nstime_to_sec(&pinfo->fd->rel_ts) - pi->time_first_t4_data;
+ duration = nstime_to_sec(&pinfo->rel_ts) - pi->time_first_t4_data;
frame_label = g_strdup_printf("t4-non-ecm-data:%s",val_to_str(pi->data_value, t38_T30_data_vals, "Ukn (0x%02X)") );
comment = g_strdup_printf("t38:t4-non-ecm-data:%s Duration: %.2fs %s",val_to_str(pi->data_value, t38_T30_data_vals, "Ukn (0x%02X)"), duration, pi->desc_comment );
insert_to_graph_t38(tapinfo, pinfo, frame_label, comment, (guint16)conv_num, &(pinfo->src), &(pinfo->dst), line_style, pi->frame_num_first_t4_data);
@@ -984,6 +990,7 @@ SIPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_SIP;
callsinfo->prot_info=g_malloc(sizeof(sip_calls_info_t));
callsinfo->free_prot_info = free_sip_info;
@@ -1053,6 +1060,7 @@ SIPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
}
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -1202,6 +1210,7 @@ isup_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_ISUP;
if (pi->calling_number!=NULL) {
callsinfo->from_identity=g_strdup(pi->calling_number);
@@ -1224,6 +1233,7 @@ isup_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
if (callsinfo!=NULL) {
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* Let's analyze the call state */
@@ -1632,6 +1642,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
COPY_ADDRESS(&(callsinfo->initial_speaker),actrace_direction?&pstn_add:&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_AC_ISDN;
callsinfo->prot_info=g_malloc(sizeof(actrace_isdn_calls_info_t));
callsinfo->free_prot_info = g_free;
@@ -1644,6 +1655,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
}
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -1841,6 +1853,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_H323;
callsinfo->prot_info=g_malloc(sizeof(h323_calls_info_t));
callsinfo->free_prot_info = free_h225_info;
@@ -1872,6 +1885,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
/* let's analyze the call state */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -2397,7 +2411,7 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
check first if it is an ended call. We can still match packets to this Endpoint 2 seconds
after the call has been released
*/
- diff_time = nstime_to_sec(&pinfo->fd->rel_ts) - nstime_to_sec(&tmp_listinfo->stop_fd->rel_ts);
+ diff_time = nstime_to_sec(&pinfo->rel_ts) - nstime_to_sec(&tmp_listinfo->stop_rel_ts);
if ( ((tmp_listinfo->call_state == VOIP_CANCELLED) ||
(tmp_listinfo->call_state == VOIP_COMPLETED) ||
(tmp_listinfo->call_state == VOIP_REJECTED)) &&
@@ -2473,6 +2487,7 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_MGCP;
callsinfo->prot_info=g_malloc(sizeof(mgcp_calls_info_t));
callsinfo->free_prot_info = g_free;
@@ -2560,6 +2575,7 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
comment = g_strdup_printf("MGCP %s %s%s", tmp_mgcpinfo->endpointId, (pi->mgcp_type == MGCP_REQUEST)?"Request":"Response", pi->is_duplicate?" Duplicate":"");
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -2681,6 +2697,7 @@ ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
COPY_ADDRESS(&(callsinfo->initial_speaker),actrace_direction?&pstn_add:&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_AC_CAS;
callsinfo->prot_info=g_malloc(sizeof(actrace_cas_calls_info_t));
callsinfo->free_prot_info = g_free;
@@ -2694,6 +2711,7 @@ ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
}
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
/* increment the packets counter of all calls */
++(tapinfo->npackets);
@@ -2820,7 +2838,9 @@ static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
callsinfo->protocol = TEL_H248;
callsinfo->call_num = tapinfo->ncalls++;
callsinfo->start_fd = pinfo->fd;
+ callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
@@ -2847,6 +2867,7 @@ static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
g_string_free(s,FALSE);
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
}
@@ -2974,7 +2995,9 @@ static int sccp_calls(packet_info *pinfo, const void *prot_info) {
callsinfo->protocol = SP2VP(assoc->payload);
/* Store frame data which holds time and frame number */
callsinfo->start_fd = pinfo->fd;
+ callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
callsinfo->call_num = tapinfo->ncalls++;
@@ -2995,6 +3018,7 @@ static int sccp_calls(packet_info *pinfo, const void *prot_info) {
callsinfo->protocol = SP2VP(assoc->payload);
/* Store frame data which holds stop time and frame number */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
switch (msg->type) {
@@ -3188,6 +3212,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Otherwise if the call is completed we'll have the open/close streams to ref actual call duration */
/* Store frame data which holds time and frame number */
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_UNISTIM;
callsinfo->prot_info=g_malloc(sizeof(unistim_info_t));
@@ -3227,6 +3252,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Each packet COULD BE OUR LAST!!!! */
/* Store frame data which holds time and frame number */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
/* This is a valid packet so increment counter */
++(callsinfo->npackets);
@@ -3391,9 +3417,11 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Signifies the start of the call so set start_sec & start_usec */
/* Frame data holds the time info */
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
/* Each packet COULD BE OUR LAST!!!! */
/* Store frame data which holds time and frame number */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
/* Local packets too */
++(callsinfo->npackets);
@@ -3440,6 +3468,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Set this on init of struct so in case the call doesn't complete, we'll have a ref. */
/* Otherwise if the call is completed we'll have the open/close streams to ref actual call duration */
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_UNISTIM;
callsinfo->prot_info=g_malloc(sizeof(unistim_info_t));
@@ -3473,6 +3502,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Each packet COULD BE OUR LAST!!!! */
/* Store frame data which holds time and frame number */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
/* Local packets too */
++(callsinfo->npackets);
@@ -3506,6 +3536,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
/* Set stop seconds + usec */
/* frame_data holds the time info */
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
tmp_unistim_info->sequence = pi->sequence;
@@ -3673,7 +3704,9 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
callsinfo->protocol = VOIP_SKINNY;
callsinfo->call_num = tapinfo->ncalls++;
callsinfo->start_fd = pinfo->fd;
+ callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
tapinfo->callsinfo_list = g_list_prepend(tapinfo->callsinfo_list, callsinfo);
@@ -3690,6 +3723,7 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_,
callsinfo->call_state = skinny_tap_voip_state[si->callState];
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
}
@@ -3826,7 +3860,9 @@ iax2_calls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
callsinfo->protocol = VOIP_IAX2;
callsinfo->call_num = tapinfo->ncalls++;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
tapinfo->callsinfo_list = g_list_prepend(tapinfo->callsinfo_list, callsinfo);
@@ -3835,6 +3871,7 @@ iax2_calls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c
callsinfo->call_state = ii->callState;
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
}
@@ -3931,6 +3968,7 @@ VoIPcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
+ callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_COMMON;
callsinfo->protocol_name=g_strdup((pi->protocol_name)?pi->protocol_name:"");
callsinfo->call_comment=g_strdup((pi->call_comment)?pi->call_comment:"");
@@ -3953,6 +3991,7 @@ VoIPcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con
callsinfo->call_comment=g_strdup(pi->call_comment);
}
callsinfo->stop_fd = pinfo->fd;
+ callsinfo->stop_rel_ts = pinfo->rel_ts;
++(callsinfo->npackets);
++(tapinfo->npackets);
@@ -4013,7 +4052,7 @@ prot_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co
voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct;
if (callsinfo!=NULL) {
callsinfo->stop_abs = pinfo->fd->abs_ts;
- callsinfo->stop_rel = pinfo->fd->rel_ts;
+ callsinfo->stop_rel = pinfo->rel_ts;
callsinfo->last_frame_num=pinfo->fd->num;
++(callsinfo->npackets);
++(tapinfo->npackets);
diff --git a/ui/gtk/voip_calls.h b/ui/gtk/voip_calls.h
index c634ed8c43..a364e2b378 100644
--- a/ui/gtk/voip_calls.h
+++ b/ui/gtk/voip_calls.h
@@ -150,7 +150,9 @@ typedef struct _voip_calls_info {
guint16 call_num;
/**> The frame_data struct holds the frame number and timing information needed. */
frame_data *start_fd;
+ nstime_t start_rel_ts;
frame_data *stop_fd;
+ nstime_t stop_rel_ts;
gboolean selected;
} voip_calls_info_t;
diff --git a/ui/gtk/voip_calls_dlg.c b/ui/gtk/voip_calls_dlg.c
index 690c70a55d..8f5b617b53 100644
--- a/ui/gtk/voip_calls_dlg.c
+++ b/ui/gtk/voip_calls_dlg.c
@@ -477,8 +477,8 @@ add_to_list_store(voip_calls_info_t* strinfo)
/* Fill the new row */
gtk_list_store_set(list_store, &list_iter,
- CALL_COL_START_TIME, nstime_to_sec(&strinfo->start_fd->rel_ts),
- CALL_COL_STOP_TIME, nstime_to_sec(&strinfo->stop_fd->rel_ts),
+ CALL_COL_START_TIME, nstime_to_sec(&strinfo->start_rel_ts),
+ CALL_COL_STOP_TIME, nstime_to_sec(&strinfo->stop_rel_ts),
CALL_COL_INITIAL_SPEAKER, &field[CALL_COL_INITIAL_SPEAKER][0],
CALL_COL_FROM, &field[CALL_COL_FROM][0],
CALL_COL_TO, &field[CALL_COL_TO][0],
diff --git a/ui/tap-rtp-common.c b/ui/tap-rtp-common.c
index 0a93675bd0..00207a272e 100644
--- a/ui/tap-rtp-common.c
+++ b/ui/tap-rtp-common.c
@@ -223,8 +223,8 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
tmp_strinfo.first_frame_num = pinfo->fd->num;
tmp_strinfo.start_sec = (guint32) pinfo->fd->abs_ts.secs;
tmp_strinfo.start_usec = pinfo->fd->abs_ts.nsecs/1000;
- tmp_strinfo.start_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- tmp_strinfo.start_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ tmp_strinfo.start_rel_sec = (guint32) pinfo->rel_ts.secs;
+ tmp_strinfo.start_rel_usec = pinfo->rel_ts.nsecs/1000;
tmp_strinfo.tag_vlan_error = 0;
tmp_strinfo.tag_diffserv_error = 0;
tmp_strinfo.vlan_id = 0;
@@ -275,8 +275,8 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
/* increment the packets counter for this stream */
++(strinfo->npackets);
- strinfo->stop_rel_sec = (guint32) pinfo->fd->rel_ts.secs;
- strinfo->stop_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+ strinfo->stop_rel_sec = (guint32) pinfo->rel_ts.secs;
+ strinfo->stop_rel_usec = pinfo->rel_ts.nsecs/1000;
/* increment the packets counter of all streams */
++(tapinfo->npackets);
@@ -446,7 +446,7 @@ int rtp_packet_analyse(tap_rtp_stat_t *statinfo,
guint32 clock_rate;
/* Store the current time */
- current_time = nstime_to_msec(&pinfo->fd->rel_ts);
+ current_time = nstime_to_msec(&pinfo->rel_ts);
/* Is this the first packet we got in this direction? */
if (statinfo->first_packet) {
diff --git a/ui/time_shift.c b/ui/time_shift.c
index faeb17ece5..b9160a63d9 100644
--- a/ui/time_shift.c
+++ b/ui/time_shift.c
@@ -114,15 +114,6 @@ modify_time_perform(frame_data *fd, int neg, nstime_t *offset, int settozero)
} else {
fprintf(stderr, "Modify_time_perform: neg = %d?\n", neg);
}
-
- /*
- * rel_ts - Relative timestamp to first packet
- */
- if (first_packet != NULL) {
- nstime_copy(&(fd->rel_ts), &(fd->abs_ts));
- nstime_subtract(&(fd->rel_ts), &(first_packet->abs_ts));
- } else
- nstime_copy(&(fd->rel_ts), &nulltime);
}
/*