Voice dialogs: Added option to apply display filter in VoIP/RTP dialogs

VoIP Calls dialog and RTP Streams dialog has now option to apply display
filter dialog during processing packets.
Filter checkbox is activated during dialog open when display filter is active.

New field apply_display_filter had to be added to voip_calls_tapinfo_t and
_rtpstream_tapinfo/rtpstream_tapinfo_t structures.
This commit is contained in:
Jirka Novak 2021-01-01 16:51:47 +01:00 committed by AndersBroman
parent 1f3a81de86
commit 2a5c96a799
15 changed files with 286 additions and 9 deletions

View File

@ -2182,7 +2182,7 @@ sharkd_session_process_tap(char *buf, const jsmntok_t *tokens, int count)
int i;
rtpstream_tapinfo_t rtp_tapinfo =
{ NULL, NULL, NULL, NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE };
{ NULL, NULL, NULL, NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE, FALSE};
for (i = 0; i < 16; i++)
{

View File

@ -44,7 +44,7 @@ static void rtpstreams_stat_draw_cb(rtpstream_tapinfo_t *tapinfo);
*/
static rtpstream_tapinfo_t the_tapinfo_struct =
{ NULL, rtpstreams_stat_draw_cb, NULL,
NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE
NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE, FALSE
};
static void

View File

@ -3310,6 +3310,8 @@ void MainWindow::openVoipCallsDialog(bool all_flows)
this, SLOT(filterPackets(QString, bool)));
connect(voip_calls_dialog_, SIGNAL(openRtpStreamDialogPassOut()),
this, SLOT(on_actionTelephonyRTPStreams_triggered()));
connect(this, SIGNAL(displayFilterSuccess(bool)),
voip_calls_dialog_, SLOT(displayFilterSuccess(bool)));
interconnectRtpStreamDialogToVoipCallsDialog(rtp_stream_dialog_, voip_calls_dialog_);
voip_calls_dialog_->show();
voip_calls_dialog_->raise();
@ -3413,6 +3415,8 @@ void MainWindow::on_actionTelephonyRTPStreams_triggered()
packet_list_, SLOT(goToPacket(int)));
connect(rtp_stream_dialog_, SIGNAL(updateFilter(QString, bool)),
this, SLOT(filterPackets(QString, bool)));
connect(this, SIGNAL(displayFilterSuccess(bool)),
rtp_stream_dialog_, SLOT(displayFilterSuccess(bool)));
interconnectRtpStreamDialogToVoipCallsDialog(rtp_stream_dialog_, voip_calls_dialog_);
rtp_stream_dialog_->show();
rtp_stream_dialog_->raise();

View File

@ -214,6 +214,12 @@ void VoipCallsInfoModel::updateCalls(GQueue *callsinfos)
}
}
void VoipCallsInfoModel::removeAllCalls()
{
beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
callinfos_.clear();
endRemoveRows();
}
// Proxy model that allows columns to be sorted.
VoipCallsInfoSortedModel::VoipCallsInfoSortedModel(QObject *parent) :

View File

@ -33,6 +33,7 @@ public:
void setTimeOfDay(bool timeOfDay);
bool timeOfDay() const;
void updateCalls(GQueue *callsinfos);
void removeAllCalls();
static voip_calls_info_t *indexToCallInfo(const QModelIndex &index);

View File

@ -275,6 +275,8 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
ca->setToolTip(ui->actionCopyAsYaml->toolTip());
connect(ca, SIGNAL(triggered()), this, SLOT(on_actionCopyAsYaml_triggered()));
copy_button_->setMenu(copy_menu);
connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent)),
this, SLOT(captureEvent(CaptureEvent)));
/* Register the tap listener */
memset(&tapinfo_, 0, sizeof(rtpstream_tapinfo_t));
@ -285,6 +287,12 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
tapinfo_.mode = TAP_ANALYSE;
register_tap_listener_rtpstream(&tapinfo_, NULL, show_tap_registration_error);
if (cap_file_.capFile()->dfilter) {
// Activate display filter checking
tapinfo_.apply_display_filter = true;
ui->displayFilterCheckBox->setChecked(true);
}
/* Scan for RTP streams (redissect all packets) */
rtpstream_scan(&tapinfo_, cf.capFile(), NULL);
@ -353,6 +361,25 @@ bool RtpStreamDialog::eventFilter(QObject *, QEvent *event)
return false;
}
void RtpStreamDialog::captureEvent(CaptureEvent e)
{
if (e.captureContext() == CaptureEvent::Retap)
{
switch (e.eventType())
{
case CaptureEvent::Started:
ui->displayFilterCheckBox->setEnabled(false);
break;
case CaptureEvent::Finished:
ui->displayFilterCheckBox->setEnabled(true);
break;
default:
break;
}
}
}
void RtpStreamDialog::tapReset(rtpstream_tapinfo_t *tapinfo)
{
RtpStreamDialog *rtp_stream_dialog = dynamic_cast<RtpStreamDialog *>((RtpStreamDialog *)tapinfo->tap_data);
@ -716,6 +743,17 @@ void RtpStreamDialog::on_buttonBox_helpRequested()
wsApp->helpTopicAction(HELP_RTP_ANALYSIS_DIALOG);
}
void RtpStreamDialog::on_displayFilterCheckBox_toggled(bool checked _U_)
{
if (!cap_file_.isValid()) {
return;
}
tapinfo_.apply_display_filter = checked;
cap_file_.retapPackets();
}
void RtpStreamDialog::showPlayer()
{
rtpstream_info_t stream_info;
@ -750,6 +788,13 @@ void RtpStreamDialog::showPlayer()
#endif // QT_MULTIMEDIA_LIB
}
void RtpStreamDialog::displayFilterSuccess(bool success)
{
if (success && ui->displayFilterCheckBox->isChecked()) {
cap_file_.retapPackets();
}
}
/*
* Editor modelines
*

View File

@ -41,6 +41,7 @@ signals:
public slots:
void selectRtpStream(rtpstream_id_t *id);
void deselectRtpStream(rtpstream_id_t *id);
void displayFilterSuccess(bool success);
protected:
bool eventFilter(QObject *obj, QEvent *event);
@ -85,6 +86,8 @@ private slots:
void on_buttonBox_clicked(QAbstractButton *button);
void on_actionExportAsRtpDump_triggered();
void on_actionAnalyze_triggered();
void captureEvent(CaptureEvent e);
void on_displayFilterCheckBox_toggled(bool checked);
};
#endif // RTP_STREAM_DIALOG_H

View File

@ -122,6 +122,33 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="displayFilterCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Only show conversations matching the current display filter&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Limit to display filter</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">

View File

@ -79,6 +79,8 @@ VoipCallsDialog::VoipCallsDialog(QWidget &parent, CaptureFile &cf, bool all_flow
ca = copy_menu->addAction(tr("as YAML"));
connect(ca, SIGNAL(triggered()), this, SLOT(copyAsYAML()));
copy_button_->setMenu(copy_menu);
connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent)),
this, SLOT(captureEvent(CaptureEvent)));
memset (&tapinfo_, 0, sizeof(tapinfo_));
tapinfo_.tap_packet = tapPacket;
@ -94,6 +96,11 @@ VoipCallsDialog::VoipCallsDialog(QWidget &parent, CaptureFile &cf, bool all_flow
shown_callsinfos_ = g_queue_new();
voip_calls_init_all_taps(&tapinfo_);
if (cap_file_.capFile()->dfilter) {
// Activate display filter checking
tapinfo_.apply_display_filter = true;
ui->displayFilterCheckBox->setChecked(true);
}
updateWidgets();
@ -183,6 +190,25 @@ void VoipCallsDialog::changeEvent(QEvent *event)
QDialog::changeEvent(event);
}
void VoipCallsDialog::captureEvent(CaptureEvent e)
{
if (e.captureContext() == CaptureEvent::Retap)
{
switch (e.eventType())
{
case CaptureEvent::Started:
ui->displayFilterCheckBox->setEnabled(false);
break;
case CaptureEvent::Finished:
ui->displayFilterCheckBox->setEnabled(true);
break;
default:
break;
}
}
}
void VoipCallsDialog::tapReset(void *tapinfo_ptr)
{
voip_calls_tapinfo_t *tapinfo = static_cast<voip_calls_tapinfo_t *>(tapinfo_ptr);
@ -572,6 +598,36 @@ void VoipCallsDialog::on_buttonBox_clicked(QAbstractButton *button)
}
}
void VoipCallsDialog::removeAllCalls()
{
voip_calls_info_t *callsinfo;
GList *list = NULL;
call_infos_model_->removeAllCalls();
/* Free shown callsinfos */
list = g_queue_peek_nth_link(shown_callsinfos_, 0);
while (list)
{
callsinfo = (voip_calls_info_t *)list->data;
voip_calls_free_callsinfo(callsinfo);
list = g_list_next(list);
}
g_queue_clear(shown_callsinfos_);
}
void VoipCallsDialog::on_displayFilterCheckBox_toggled(bool checked)
{
if (!cap_file_.isValid()) {
return;
}
tapinfo_.apply_display_filter = checked;
removeAllCalls();
cap_file_.retapPackets();
}
void VoipCallsDialog::on_buttonBox_helpRequested()
{
wsApp->helpTopicAction(HELP_TELEPHONY_VOIP_CALLS_DIALOG);
@ -602,6 +658,13 @@ void VoipCallsDialog::openRtpStreamDialogPassIn()
emit openRtpStreamDialogPassOut();
}
void VoipCallsDialog::displayFilterSuccess(bool success)
{
if (success && ui->displayFilterCheckBox->isChecked()) {
removeAllCalls();
cap_file_.retapPackets();
}
}
/*
* Editor modelines

View File

@ -49,6 +49,9 @@ signals:
void deselectRtpStreamPassOut(rtpstream_id_t *id);
void openRtpStreamDialogPassOut();
public slots:
void displayFilterSuccess(bool success);
protected:
void contextMenuEvent(QContextMenuEvent *event);
virtual void removeTapListeners();
@ -82,6 +85,7 @@ private:
void prepareFilter();
void showSequence();
void showPlayer();
void removeAllCalls();
QList<QVariant> streamRowData(int row) const;
@ -98,6 +102,8 @@ private slots:
void selectRtpStreamPassIn(rtpstream_id_t *id);
void deselectRtpStreamPassIn(rtpstream_id_t *id);
void openRtpStreamDialogPassIn();
void captureEvent(CaptureEvent e);
void on_displayFilterCheckBox_toggled(bool checked);
};
#endif // VOIP_CALLS_DIALOG_H

View File

@ -42,6 +42,23 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="displayFilterCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Only show conversations matching the current display filter&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Limit to display filter</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="todCheckBox">
<property name="text">
<string>Time of Day</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -55,13 +72,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="todCheckBox">
<property name="text">
<string>Time of Day</string>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -96,6 +96,7 @@ struct _rtpstream_tapinfo {
rtpstream_info_t *filter_stream_rev; /**< used as filter in some tap modes */
FILE *save_file;
gboolean is_registered; /**< if the tap listener is currently registered or not */
gboolean apply_display_filter; /**< if apply display filter during analyse */
};
#if 0

View File

@ -380,6 +380,11 @@ tap_packet_status rtpstream_packet_cb(void *arg, packet_info *pinfo, epan_dissec
new_stream_info.first_payload_type_name = rtpinfo->info_payload_type_str;
if (tapinfo->mode == TAP_ANALYSE) {
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* check whether we already have a stream with these parameters in the list */
list = g_list_first(tapinfo->strinfo_list);
while (list)

View File

@ -514,6 +514,10 @@ rtp_event_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_rtp_event_);
const struct _rtp_event_info *pi = (const struct _rtp_event_info *)rtp_event_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* do not consider RTP events packets without a setup frame */
if (pi->info_setup_frame_num == 0) {
return TAP_PACKET_DONT_REDRAW;
@ -604,6 +608,11 @@ rtp_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, void c
const struct _rtp_info *rtp_info = (const struct _rtp_info *)rtp_info_ptr;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* do not consider RTP packets without a setup frame */
if (rtp_info->info_setup_frame_num == 0) {
return TAP_PACKET_DONT_REDRAW;
@ -914,6 +923,11 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
const t38_packet_info *t38_info = (const t38_packet_info *)t38_info_ptr;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
if (t38_info->setup_frame_number != 0) {
/* using the setup frame number of the T38 packet, we get the call number that it belongs */
if(tapinfo->graph_analysis){
@ -1120,6 +1134,11 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
const sip_info_value_t *pi = (const sip_info_value_t *)SIPinfo;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
tapinfo->sip_frame_num = pinfo->num;
/* do not consider packets without call_id */
@ -1341,6 +1360,11 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
const isup_tap_rec_t *pi = (const isup_tap_rec_t *)isup_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* check if the lower layer is MTP matching the frame number */
if (tapinfo->mtp3_frame_num != pinfo->num)
return TAP_PACKET_DONT_REDRAW;
@ -1536,6 +1560,11 @@ mtp3_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_mtp3_);
const mtp3_tap_rec_t *pi = (const mtp3_tap_rec_t *)mtp3_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* keep the data in memory to use when the ISUP information arrives */
tapinfo->mtp3_opc = pi->addr_opc.pc;
@ -1552,6 +1581,11 @@ m3ua_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_m3ua_);
const mtp3_tap_rec_t *pi = (const mtp3_tap_rec_t *)mtp3_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* keep the data in memory to use when the ISUP information arrives */
tapinfo->mtp3_opc = pi->addr_opc.pc;
@ -1633,6 +1667,11 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
const q931_packet_info *pi = (const q931_packet_info *)q931_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* free previously allocated q931_calling/ed_number */
g_free(tapinfo->q931_calling_number);
g_free(tapinfo->q931_called_number);
@ -1972,6 +2011,11 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
const h225_packet_info *pi = (const h225_packet_info *)H225info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* if not guid and RAS and not LRQ, LCF or LRJ return because did not belong to a call */
/* OR, if not guid and is H225 return because doesn't belong to a call */
if ((memcmp(&pi->guid, &guid_allzero, GUID_LEN) == 0))
@ -2280,6 +2324,11 @@ h245dg_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
const h245_packet_info *pi = (const h245_packet_info *)H245info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* check if Tunneling is OFF and we have a call with this H245 add */
list = g_queue_peek_nth_link(tapinfo->callsinfos, 0);
while (list)
@ -2392,6 +2441,11 @@ sdp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_sdp_);
const sdp_packet_info *pi = (const sdp_packet_info *)SDPinfo;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* There are protocols like MGCP/SIP where the SDP is called before the tap for the
MGCP/SIP packet, in those cases we assign the SPD summary to global lastSDPsummary
to use it later
@ -2584,6 +2638,10 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
const mgcp_info_t *pi = (const mgcp_info_t *)MGCPinfo;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
if ((pi->mgcp_type == MGCP_REQUEST) && !pi->is_duplicate ) {
/* check whether we already have a call with this Endpoint and it is active*/
@ -2849,6 +2907,11 @@ actrace_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
voip_calls_info_t *tmp_listinfo;
voip_calls_info_t *callsinfo = NULL;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
tapinfo->actrace_frame_num = pinfo->num;
tapinfo->actrace_trunk = pi->trunk;
tapinfo->actrace_direction = pi->direction;
@ -3071,6 +3134,10 @@ static tap_packet_status
h248_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) {
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_h248_);
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
return h248_calls_packet_common(tapinfo, pinfo, edt, prot_info, REDRAW_H248);
}
@ -3089,6 +3156,10 @@ static tap_packet_status
megaco_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) {
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_megaco_);
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
return h248_calls_packet_common(tapinfo, pinfo, edt, prot_info, REDRAW_MEGACO);
}
@ -3264,6 +3335,10 @@ static tap_packet_status
sccp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) {
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_sccp_);
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
sccp_payload_values = sccp_message_type_acro_values;
return sccp_calls(tapinfo, pinfo, edt, prot_info, REDRAW_SCCP);
}
@ -3283,6 +3358,10 @@ static tap_packet_status
sua_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *prot_info) {
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_sua_);
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
sccp_payload_values = sua_co_class_type_acro_values;
return sccp_calls(tapinfo, pinfo, edt, prot_info, REDRAW_SUA);
}
@ -3358,6 +3437,11 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Fetch specific packet infos */
const unistim_info_t *pi = (const unistim_info_t *)unistim_info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* Init gstring */
g_tmp = g_string_new(NULL);
@ -3883,6 +3967,11 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
skinny_calls_info_t *tmp_skinnyinfo;
gchar *comment;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
if (si == NULL || (si->callId == 0 && si->passThroughPartyId == 0))
return TAP_PACKET_DONT_REDRAW;
/* check whether we already have this context in the list */
@ -4039,6 +4128,11 @@ iax2_calls_packet( void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
const iax2_info_t *ii = (const iax2_info_t *)iax2_info;
iax2_info_t *tmp_iax2info;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
if (ii == NULL || ii->ptype != IAX2_FULL_PACKET || (ii->scallno == 0 && ii->dcallno == 0))
return TAP_PACKET_DONT_REDRAW;
/* check whether we already have this context in the list */
@ -4172,6 +4266,11 @@ voip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
GList *list = NULL;
const voip_packet_info_t *pi = (const voip_packet_info_t *)VoIPinfo;
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
/* VOIP_CALLS_DEBUG("num %u", pinfo->num); */
if (pi->call_id)
list = g_queue_peek_nth_link(tapinfo->callsinfos, 0);
@ -4283,6 +4382,12 @@ static tap_packet_status
prot_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prot_info _U_)
{
voip_calls_tapinfo_t *tapinfo = tap_id_to_base(tap_offset_ptr, tap_id_offset_prot_);
/* if display filtering activated and packet do not match, ignore it */
if (tapinfo->apply_display_filter && (pinfo->fd->passed_dfilter == 0)) {
return TAP_PACKET_DONT_REDRAW;
}
if (callsinfo!=NULL) {
callsinfo->stop_abs = pinfo->abs_ts;
callsinfo->stop_rel = pinfo->rel_ts;

View File

@ -216,6 +216,7 @@ typedef struct _voip_calls_tapinfo {
gint32 actrace_direction;
flow_show_options fs_option;
guint32 redraw;
gboolean apply_display_filter;
} voip_calls_tapinfo_t;
#if 0