forked from osmocom/wireshark
Replace relative timestamp with reference frame number. Saves 16B per frame.
svn path=/trunk/; revision=50772
This commit is contained in:
parent
74b6c59499
commit
c702e92121
|
@ -189,7 +189,7 @@ VAL_PTR=&Data_Field_field_type_value
|
|||
/* we use the first fragment's frame_number as fragment ID because the protocol doesn't provide it */
|
||||
p_t38_conv_info->reass_ID = actx->pinfo->fd->num;
|
||||
p_t38_conv_info->reass_start_seqnum = seq_number;
|
||||
p_t38_conv_info->time_first_t4_data = nstime_to_sec(&actx->pinfo->fd->rel_ts);
|
||||
p_t38_conv_info->time_first_t4_data = nstime_to_sec(&actx->pinfo->rel_ts);
|
||||
p_t38_conv_info->additional_hdlc_data_field_counter = 0;
|
||||
p_t38_packet_conv_info->reass_ID = p_t38_conv_info->reass_ID;
|
||||
p_t38_packet_conv_info->reass_start_seqnum = p_t38_conv_info->reass_start_seqnum;
|
||||
|
|
|
@ -971,20 +971,25 @@ set_time_hour_min_sec(const nstime_t *ts, gchar *buf)
|
|||
static void
|
||||
col_set_rel_time(const frame_data *fd, column_info *cinfo, const int col)
|
||||
{
|
||||
nstime_t del_rel_ts;
|
||||
|
||||
if (!fd->flags.has_ts) {
|
||||
cinfo->col_buf[col][0] = '\0';
|
||||
return;
|
||||
}
|
||||
|
||||
frame_delta_abs_time(cinfo->epan, fd, fd->frame_ref_num, &del_rel_ts);
|
||||
|
||||
switch (timestamp_get_seconds_type()) {
|
||||
case TS_SECONDS_DEFAULT:
|
||||
set_time_seconds(&fd->rel_ts, cinfo->col_buf[col]);
|
||||
set_time_seconds(&del_rel_ts, cinfo->col_buf[col]);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_relative";
|
||||
g_strlcpy(cinfo->col_expr.col_expr_val[col],cinfo->col_buf[col],COL_MAX_LEN);
|
||||
break;
|
||||
case TS_SECONDS_HOUR_MIN_SEC:
|
||||
set_time_hour_min_sec(&fd->rel_ts, cinfo->col_buf[col]);
|
||||
set_time_hour_min_sec(&del_rel_ts, cinfo->col_buf[col]);
|
||||
cinfo->col_expr.col_expr[col] = "frame.time_relative";
|
||||
set_time_seconds(&fd->rel_ts, cinfo->col_expr.col_expr_val[col]);
|
||||
set_time_seconds(&del_rel_ts, cinfo->col_expr.col_expr_val[col]);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
|
@ -1208,12 +1213,16 @@ set_fd_time(const epan_t *epan, frame_data *fd, gchar *buf)
|
|||
|
||||
case TS_RELATIVE:
|
||||
if (fd->flags.has_ts) {
|
||||
nstime_t del_rel_ts;
|
||||
|
||||
frame_delta_abs_time(epan, fd, fd->frame_ref_num, &del_rel_ts);
|
||||
|
||||
switch (timestamp_get_seconds_type()) {
|
||||
case TS_SECONDS_DEFAULT:
|
||||
set_time_seconds(&fd->rel_ts, buf);
|
||||
set_time_seconds(&del_rel_ts, buf);
|
||||
break;
|
||||
case TS_SECONDS_HOUR_MIN_SEC:
|
||||
set_time_seconds(&fd->rel_ts, buf);
|
||||
set_time_seconds(&del_rel_ts, buf);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
|
|
|
@ -352,7 +352,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
}
|
||||
|
||||
item = proto_tree_add_time(fh_tree, hf_frame_time_relative, tvb,
|
||||
0, 0, &(pinfo->fd->rel_ts));
|
||||
0, 0, &(pinfo->rel_ts));
|
||||
PROTO_ITEM_SET_GENERATED(item);
|
||||
|
||||
if(pinfo->fd->flags.ref_time){
|
||||
|
|
|
@ -715,7 +715,7 @@ dissect_t38_T_field_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_
|
|||
/* we use the first fragment's frame_number as fragment ID because the protocol doesn't provide it */
|
||||
p_t38_conv_info->reass_ID = actx->pinfo->fd->num;
|
||||
p_t38_conv_info->reass_start_seqnum = seq_number;
|
||||
p_t38_conv_info->time_first_t4_data = nstime_to_sec(&actx->pinfo->fd->rel_ts);
|
||||
p_t38_conv_info->time_first_t4_data = nstime_to_sec(&actx->pinfo->rel_ts);
|
||||
p_t38_conv_info->additional_hdlc_data_field_counter = 0;
|
||||
p_t38_packet_conv_info->reass_ID = p_t38_conv_info->reass_ID;
|
||||
p_t38_packet_conv_info->reass_start_seqnum = p_t38_conv_info->reass_start_seqnum;
|
||||
|
|
|
@ -179,6 +179,17 @@ frame_data_time_delta_compare(const struct epan_session *epan, const frame_data
|
|||
return COMPARE_TS_REAL(del_cap_ts1, del_cap_ts2);
|
||||
}
|
||||
|
||||
static gint
|
||||
frame_data_time_delta_rel_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2)
|
||||
{
|
||||
nstime_t del_rel_ts1, del_rel_ts2;
|
||||
|
||||
frame_delta_abs_time(epan, fdata1, fdata1->frame_ref_num, &del_rel_ts1);
|
||||
frame_delta_abs_time(epan, fdata2, fdata2->frame_ref_num, &del_rel_ts2);
|
||||
|
||||
return COMPARE_TS_REAL(del_rel_ts1, del_rel_ts2);
|
||||
}
|
||||
|
||||
static gint
|
||||
frame_data_time_delta_dis_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2)
|
||||
{
|
||||
|
@ -207,7 +218,7 @@ frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, co
|
|||
return COMPARE_TS(abs_ts);
|
||||
|
||||
case TS_RELATIVE:
|
||||
return COMPARE_TS(rel_ts);
|
||||
return frame_data_time_delta_rel_compare(epan, fdata1, fdata2);
|
||||
|
||||
case TS_DELTA:
|
||||
return frame_data_time_delta_compare(epan, fdata1, fdata2);
|
||||
|
@ -227,7 +238,7 @@ frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, co
|
|||
return COMPARE_TS(abs_ts);
|
||||
|
||||
case COL_REL_TIME:
|
||||
return COMPARE_TS(rel_ts);
|
||||
return frame_data_time_delta_rel_compare(epan, fdata1, fdata2);
|
||||
|
||||
case COL_DELTA_TIME:
|
||||
return frame_data_time_delta_compare(epan, fdata1, fdata2);
|
||||
|
@ -277,8 +288,7 @@ frame_data_init(frame_data *fdata, guint32 num,
|
|||
fdata->abs_ts.nsecs = phdr->ts.nsecs;
|
||||
fdata->shift_offset.secs = 0;
|
||||
fdata->shift_offset.nsecs = 0;
|
||||
fdata->rel_ts.secs = 0;
|
||||
fdata->rel_ts.nsecs = 0;
|
||||
fdata->frame_ref_num = 0;
|
||||
fdata->prev_dis_num = 0;
|
||||
fdata->opt_comment = phdr->opt_comment;
|
||||
}
|
||||
|
@ -286,31 +296,32 @@ frame_data_init(frame_data *fdata, guint32 num,
|
|||
void
|
||||
frame_data_set_before_dissect(frame_data *fdata,
|
||||
nstime_t *elapsed_time,
|
||||
nstime_t *first_ts,
|
||||
const frame_data **frame_ref,
|
||||
const frame_data *prev_dis)
|
||||
{
|
||||
/* If we don't have the time stamp of the first packet in the
|
||||
capture, it's because this is the first packet. Save the time
|
||||
stamp of this packet as the time stamp of the first packet. */
|
||||
if (nstime_is_unset(first_ts))
|
||||
*first_ts = fdata->abs_ts;
|
||||
nstime_t rel_ts;
|
||||
|
||||
/* if this frames is marked as a reference time frame, reset
|
||||
firstsec and firstusec to this frame */
|
||||
/* Don't have the reference frame, set to current */
|
||||
if (*frame_ref == NULL)
|
||||
*frame_ref = fdata;
|
||||
|
||||
/* if this frames is marked as a reference time frame,
|
||||
set reference frame this frame */
|
||||
if(fdata->flags.ref_time)
|
||||
*first_ts = fdata->abs_ts;
|
||||
*frame_ref = fdata;
|
||||
|
||||
/* Get the time elapsed between the first packet and this packet. */
|
||||
nstime_delta(&fdata->rel_ts, &fdata->abs_ts, first_ts);
|
||||
nstime_delta(&rel_ts, &fdata->abs_ts, &(*frame_ref)->abs_ts);
|
||||
|
||||
/* If it's greater than the current elapsed time, set the elapsed time
|
||||
to it (we check for "greater than" so as not to be confused by
|
||||
time moving backwards). */
|
||||
if ((gint32)elapsed_time->secs < fdata->rel_ts.secs
|
||||
|| ((gint32)elapsed_time->secs == fdata->rel_ts.secs && (gint32)elapsed_time->nsecs < fdata->rel_ts.nsecs)) {
|
||||
*elapsed_time = fdata->rel_ts;
|
||||
if ((gint32)elapsed_time->secs < rel_ts.secs
|
||||
|| ((gint32)elapsed_time->secs == rel_ts.secs && (gint32)elapsed_time->nsecs < rel_ts.nsecs)) {
|
||||
*elapsed_time = rel_ts;
|
||||
}
|
||||
|
||||
fdata->frame_ref_num = (*frame_ref != fdata) ? (*frame_ref)->num : 0;
|
||||
fdata->prev_dis_num = (prev_dis) ? prev_dis->num : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ typedef struct _frame_data {
|
|||
|
||||
nstime_t abs_ts; /**< Absolute timestamp */
|
||||
nstime_t shift_offset; /**< How much the abs_tm of the frame is shifted */
|
||||
nstime_t rel_ts; /**< Relative timestamp (yes, it can be negative) */
|
||||
guint32 frame_ref_num; /**< Previous reference frame (0 if this is one) */
|
||||
guint32 prev_dis_num; /**< Previous displayed frame (0 if first one) */
|
||||
gchar *opt_comment; /**< NULL if not available */
|
||||
} frame_data;
|
||||
|
@ -124,7 +124,7 @@ extern void frame_delta_abs_time(const struct epan_session *epan, const frame_da
|
|||
*/
|
||||
WS_DLL_PUBLIC void frame_data_set_before_dissect(frame_data *fdata,
|
||||
nstime_t *elapsed_time,
|
||||
nstime_t *first_ts,
|
||||
const frame_data **frame_ref,
|
||||
const frame_data *prev_dis);
|
||||
|
||||
WS_DLL_PUBLIC void frame_data_set_after_dissect(frame_data *fdata,
|
||||
|
|
|
@ -351,6 +351,8 @@ dissect_packet(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
|||
edt->pi.link_dir = LINK_DIR_UNKNOWN;
|
||||
edt->tvb = tvb;
|
||||
|
||||
frame_delta_abs_time(edt->session, fd, fd->frame_ref_num, &edt->pi.rel_ts);
|
||||
|
||||
/* to enable decode as for ethertype=0x0000 (fix for bug 4721) */
|
||||
edt->pi.ethertype = G_MAXINT;
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ typedef struct _packet_info {
|
|||
|
||||
struct _wmem_allocator_t *pool; /**< Memory pool scoped to the pinfo struct */
|
||||
struct epan_session *epan;
|
||||
nstime_t rel_ts; /**< Relative timestamp (yes, it can be negative) */
|
||||
} packet_info;
|
||||
|
||||
/**< For old code that hasn't yet been changed. */
|
||||
|
|
|
@ -359,7 +359,7 @@ extern int
|
|||
stats_tree_packet(void *p, packet_info *pinfo, epan_dissect_t *edt, const void *pri)
|
||||
{
|
||||
stats_tree *st = (stats_tree *)p;
|
||||
double now = nstime_to_msec(&pinfo->fd->rel_ts);
|
||||
double now = nstime_to_msec(&pinfo->rel_ts);
|
||||
|
||||
if (st->start < 0.0) st->start = now;
|
||||
|
||||
|
|
|
@ -1022,7 +1022,7 @@ PINFO_GET_NUMBER(Pinfo_number,pinfo->ws_pinfo->fd->num)
|
|||
PINFO_GET_NUMBER(Pinfo_len,pinfo->ws_pinfo->fd->pkt_len)
|
||||
PINFO_GET_NUMBER(Pinfo_caplen,pinfo->ws_pinfo->fd->cap_len)
|
||||
PINFO_GET_NUMBER(Pinfo_abs_ts,lua_nstime_to_sec(&pinfo->ws_pinfo->fd->abs_ts))
|
||||
PINFO_GET_NUMBER(Pinfo_rel_ts,lua_nstime_to_sec(&pinfo->ws_pinfo->fd->rel_ts))
|
||||
PINFO_GET_NUMBER(Pinfo_rel_ts,lua_nstime_to_sec(&pinfo->ws_pinfo->rel_ts))
|
||||
PINFO_GET_NUMBER(Pinfo_delta_ts,lua_delta_nstime_to_sec(pinfo, pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->num - 1))
|
||||
PINFO_GET_NUMBER(Pinfo_delta_dis_ts,lua_delta_nstime_to_sec(pinfo, pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->prev_dis_num))
|
||||
PINFO_GET_NUMBER(Pinfo_ipproto,pinfo->ws_pinfo->ipproto)
|
||||
|
|
30
file.c
30
file.c
|
@ -109,7 +109,7 @@ gboolean auto_scroll_live;
|
|||
#endif
|
||||
|
||||
static guint32 cum_bytes;
|
||||
static nstime_t first_ts;
|
||||
const static frame_data *ref;
|
||||
static frame_data *prev_dis;
|
||||
static frame_data *prev_cap;
|
||||
|
||||
|
@ -397,7 +397,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
|
|||
cf->frames = new_frame_data_sequence();
|
||||
|
||||
nstime_set_zero(&cf->elapsed_time);
|
||||
nstime_set_unset(&first_ts);
|
||||
ref = NULL;
|
||||
prev_dis = NULL;
|
||||
prev_cap = NULL;
|
||||
cum_bytes = 0;
|
||||
|
@ -1155,7 +1155,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
|
|||
gint row = -1;
|
||||
|
||||
frame_data_set_before_dissect(fdata, &cf->elapsed_time,
|
||||
&first_ts, prev_dis);
|
||||
&ref, prev_dis);
|
||||
prev_cap = fdata;
|
||||
|
||||
/* Dissect the frame. */
|
||||
|
@ -1871,7 +1871,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item, gb
|
|||
/* Iterate through the list of frames. Call a routine for each frame
|
||||
to check whether it should be displayed and, if so, add it to
|
||||
the display list. */
|
||||
nstime_set_unset(&first_ts);
|
||||
ref = NULL;
|
||||
prev_dis = NULL;
|
||||
prev_cap = NULL;
|
||||
cum_bytes = 0;
|
||||
|
@ -2108,8 +2108,9 @@ ref_time_packets(capture_file *cf)
|
|||
{
|
||||
guint32 framenum;
|
||||
frame_data *fdata;
|
||||
nstime_t rel_ts;
|
||||
|
||||
nstime_set_unset(&first_ts);
|
||||
ref = NULL;
|
||||
prev_dis = NULL;
|
||||
cum_bytes = 0;
|
||||
|
||||
|
@ -2126,14 +2127,12 @@ ref_time_packets(capture_file *cf)
|
|||
/* If we don't have the time stamp of the first packet in the
|
||||
capture, it's because this is the first packet. Save the time
|
||||
stamp of this packet as the time stamp of the first packet. */
|
||||
if (nstime_is_unset(&first_ts)) {
|
||||
first_ts = fdata->abs_ts;
|
||||
}
|
||||
if (ref == NULL)
|
||||
ref = fdata;
|
||||
/* if this frames is marked as a reference time frame, reset
|
||||
firstsec and firstusec to this frame */
|
||||
if (fdata->flags.ref_time) {
|
||||
first_ts = fdata->abs_ts;
|
||||
}
|
||||
if (fdata->flags.ref_time)
|
||||
ref = fdata;
|
||||
|
||||
/* If we don't have the time stamp of the previous displayed packet,
|
||||
it's because this is the first displayed packet. Save the time
|
||||
|
@ -2144,14 +2143,15 @@ ref_time_packets(capture_file *cf)
|
|||
}
|
||||
|
||||
/* Get the time elapsed between the first packet and this packet. */
|
||||
nstime_delta(&fdata->rel_ts, &fdata->abs_ts, &first_ts);
|
||||
fdata->frame_ref_num = (fdata != ref) ? ref->num : 0;
|
||||
nstime_delta(&rel_ts, &fdata->abs_ts, &ref->abs_ts);
|
||||
|
||||
/* If it's greater than the current elapsed time, set the elapsed time
|
||||
to it (we check for "greater than" so as not to be confused by
|
||||
time moving backwards). */
|
||||
if ((gint32)cf->elapsed_time.secs < fdata->rel_ts.secs
|
||||
|| ((gint32)cf->elapsed_time.secs == fdata->rel_ts.secs && (gint32)cf->elapsed_time.nsecs < fdata->rel_ts.nsecs)) {
|
||||
cf->elapsed_time = fdata->rel_ts;
|
||||
if ((gint32)cf->elapsed_time.secs < rel_ts.secs
|
||||
|| ((gint32)cf->elapsed_time.secs == rel_ts.secs && (gint32)cf->elapsed_time.nsecs < rel_ts.nsecs)) {
|
||||
cf->elapsed_time = rel_ts;
|
||||
}
|
||||
|
||||
/* If this frame is displayed, get the time elapsed between the
|
||||
|
|
15
rawshark.c
15
rawshark.c
|
@ -121,7 +121,8 @@
|
|||
static const gchar decode_as_arg_template[] = "<layer_type>==<selector>,<decode_as_protocol>";
|
||||
|
||||
static guint32 cum_bytes;
|
||||
static nstime_t first_ts;
|
||||
static const frame_data *ref;
|
||||
static frame_data ref_frame;
|
||||
static frame_data *prev_dis;
|
||||
static frame_data prev_dis_frame;
|
||||
static frame_data *prev_cap;
|
||||
|
@ -1074,7 +1075,12 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
|||
printf("%lu", (unsigned long int) cf->count);
|
||||
|
||||
frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
|
||||
&first_ts, prev_dis);
|
||||
&ref, prev_dis);
|
||||
|
||||
if (ref == &fdata) {
|
||||
ref_frame = fdata;
|
||||
ref = &ref_frame;
|
||||
}
|
||||
|
||||
/* We only need the columns if we're printing packet info but we're
|
||||
*not* verbose; in verbose mode, we print the protocol tree, not
|
||||
|
@ -1569,6 +1575,9 @@ open_failure_message(const char *filename, int err, gboolean for_writing)
|
|||
const nstime_t *
|
||||
raw_get_frame_ts(void *data _U_, guint32 frame_num)
|
||||
{
|
||||
if (ref && ref->num == frame_num)
|
||||
return &ref->abs_ts;
|
||||
|
||||
if (prev_dis && prev_dis->num == frame_num)
|
||||
return &prev_dis->abs_ts;
|
||||
|
||||
|
@ -1622,7 +1631,7 @@ raw_cf_open(capture_file *cf, const char *fname)
|
|||
cf->has_snap = FALSE;
|
||||
cf->snap = WTAP_MAX_PACKET_SIZE;
|
||||
nstime_set_zero(&cf->elapsed_time);
|
||||
nstime_set_unset(&first_ts);
|
||||
ref = NULL;
|
||||
prev_dis = NULL;
|
||||
prev_cap = NULL;
|
||||
|
||||
|
|
26
tshark.c
26
tshark.c
|
@ -105,7 +105,8 @@
|
|||
static const gchar decode_as_arg_template[] = "<layer_type>==<selector>,<decode_as_protocol>";
|
||||
|
||||
static guint32 cum_bytes;
|
||||
static nstime_t first_ts;
|
||||
static const frame_data *ref;
|
||||
static frame_data ref_frame;
|
||||
static frame_data *prev_dis;
|
||||
static frame_data prev_dis_frame;
|
||||
static frame_data *prev_cap;
|
||||
|
@ -2163,6 +2164,9 @@ tshark_get_frame_ts(void *data, guint32 frame_num)
|
|||
{
|
||||
capture_file *cf = (capture_file *) data;
|
||||
|
||||
if (ref && ref->num == frame_num)
|
||||
return &ref->abs_ts;
|
||||
|
||||
if (prev_dis && prev_dis->num == frame_num)
|
||||
return &prev_dis->abs_ts;
|
||||
|
||||
|
@ -2725,7 +2729,11 @@ process_packet_first_pass(capture_file *cf,
|
|||
epan_dissect_prime_dfilter(&edt, cf->rfcode);
|
||||
|
||||
frame_data_set_before_dissect(&fdlocal, &cf->elapsed_time,
|
||||
&first_ts, prev_dis);
|
||||
&ref, prev_dis);
|
||||
if (ref == &fdlocal) {
|
||||
ref_frame = fdlocal;
|
||||
ref = &ref_frame;
|
||||
}
|
||||
|
||||
epan_dissect_run(&edt, whdr, frame_tvbuff_new(&fdlocal, pd), &fdlocal, NULL);
|
||||
|
||||
|
@ -2814,7 +2822,11 @@ process_packet_second_pass(capture_file *cf, frame_data *fdata,
|
|||
cinfo = NULL;
|
||||
|
||||
frame_data_set_before_dissect(fdata, &cf->elapsed_time,
|
||||
&first_ts, prev_dis);
|
||||
&ref, prev_dis);
|
||||
if (ref == fdata) {
|
||||
ref_frame = *fdata;
|
||||
ref = &ref_frame;
|
||||
}
|
||||
|
||||
epan_dissect_run_with_taps(&edt, phdr, frame_tvbuff_new_buffer(fdata, buf), fdata, cinfo);
|
||||
|
||||
|
@ -3276,7 +3288,11 @@ process_packet(capture_file *cf, gint64 offset, struct wtap_pkthdr *whdr,
|
|||
cinfo = NULL;
|
||||
|
||||
frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
|
||||
&first_ts, prev_dis);
|
||||
&ref, prev_dis);
|
||||
if (ref == &fdata) {
|
||||
ref_frame = fdata;
|
||||
ref = &ref_frame;
|
||||
}
|
||||
|
||||
epan_dissect_run_with_taps(&edt, whdr, frame_tvbuff_new(&fdata, pd), &fdata, cinfo);
|
||||
|
||||
|
@ -3766,7 +3782,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err)
|
|||
} else
|
||||
cf->has_snap = TRUE;
|
||||
nstime_set_zero(&cf->elapsed_time);
|
||||
nstime_set_unset(&first_ts);
|
||||
ref = NULL;
|
||||
prev_dis = NULL;
|
||||
prev_cap = NULL;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue