[VoIP calls] Make ISUP over M3UA work.
authorAndersBroman <anders.broman@ericsson.com>
Mon, 15 Jan 2018 16:51:55 +0000 (17:51 +0100)
committerAnders Broman <a.broman58@gmail.com>
Tue, 16 Jan 2018 05:28:25 +0000 (05:28 +0000)
I'm not sure how this tap_base_to_id() works but this seems to fix the
problem.

Change-Id: I98663a9560a38de03c130181dfa43b43befc612f
Reviewed-on: https://code.wireshark.org/review/25327
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/voip_calls.c

index 4ab23e18ef4ccc49553cfddfb4f4ff74157bd284..6976091d48c361680b6b36191ecebfa04ef03be5 100644 (file)
@@ -1530,6 +1530,22 @@ mtp3_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
     return FALSE;
 }
 
+static gboolean
+m3ua_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt _U_, const void *mtp3_info)
+{
+    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;
+
+    /* keep the data in memory to use when the ISUP information arrives */
+
+    tapinfo->mtp3_opc = pi->addr_opc.pc;
+    tapinfo->mtp3_dpc = pi->addr_dpc.pc;
+    tapinfo->mtp3_ni = pi->addr_opc.ni;
+    tapinfo->mtp3_frame_num = pinfo->num;
+
+    return FALSE;
+}
+
 /****************************************************************************/
 
 void
@@ -1555,7 +1571,7 @@ mtp3_calls_init_tap(voip_calls_tapinfo_t *tap_id_base)
             NULL,
             0,
             NULL,
-            mtp3_calls_packet,
+            m3ua_calls_packet,
             NULL
             );