bssgp: Add callback UNITDATA.DL messaes with the data

This commit is contained in:
Holger Hans Peter Freyther 2013-08-22 08:44:04 +02:00 committed by Ivan Kluchnikov
parent c0f1644c88
commit 416ce69550
2 changed files with 7 additions and 0 deletions

View File

@ -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:

View File

@ -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,