aboutsummaryrefslogtreecommitdiffstats
path: root/ui/voip_calls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/voip_calls.c')
-rw-r--r--ui/voip_calls.c105
1 files changed, 105 insertions, 0 deletions
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 1934a1303e..8eea6cd9a1 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -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;