[PATCH 06/10] bssgp: Add callback UNITDATA.DL messaes with the data

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Holger Freyther hfreyther at sysmocom.de
Thu Aug 22 07:17:00 UTC 2013


From: Holger Hans Peter Freyther <holger at moiji-mobile.com>

---
 src/gprs_bssgp_pcu.cpp | 3 +++
 src/gprs_bssgp_pcu.h   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index cc66290..6f67f52 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -1,6 +1,7 @@
 /* gprs_bssgp_pcu.cpp
  *
  * Copyright (C) 2012 Ivan Klyuchnikov
+ * Copyright (C) 2013 by Holger Hans Peter Freyther
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -314,6 +315,8 @@ static int gprs_bssgp_pcu_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, struct
 	switch (pdu_type) {
 	case BSSGP_PDUT_DL_UNITDATA:
 		LOGP(DBSSGP, LOGL_DEBUG, "RX: [SGSN->PCU] BSSGP_PDUT_DL_UNITDATA\n");
+		if (the_pcu.on_dl_unit_data)
+			the_pcu.on_dl_unit_data(&the_pcu, msg, tp);
 		gprs_bssgp_pcu_rx_dl_ud(msg, tp);
 		break;
 	case BSSGP_PDUT_PAGING_PS:
diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h
index 413c056..7156bf0 100644
--- a/src/gprs_bssgp_pcu.h
+++ b/src/gprs_bssgp_pcu.h
@@ -61,6 +61,10 @@ struct gprs_bssgp_pcu {
 
 	/* The BSSGP has been unblocked */
 	void (*on_unblock_ack)(struct gprs_bssgp_pcu *pcu);
+
+	/* When BSSGP data arrives. The msgb is not only for reference */
+	void (*on_dl_unit_data)(struct gprs_bssgp_pcu *pcu, struct msgb *msg,
+				struct tlv_parsed *tp);
 };
 
 struct gprs_bssgp_pcu *gprs_bssgp_create_and_connect(struct gprs_rlcmac_bts *bts,
-- 
1.8.3.2





More information about the osmocom-net-gprs mailing list