aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_cmd.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-07 16:01:09 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-07 16:01:42 +0100
commit6ec7abf1572c9fc2e74fe71e1264eb99e697fe22 (patch)
tree0fbf0b7704b927c475076df141dabbaefdda6009 /src/diag_cmd.c
parent651d4d8fbc5933a921a9e70945bdf611bbc3f8f0 (diff)
Genreate GSMTAP messages from raw received DIAG frames
Diffstat (limited to 'src/diag_cmd.c')
-rw-r--r--src/diag_cmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/diag_cmd.c b/src/diag_cmd.c
index a1b814d..39f819a 100644
--- a/src/diag_cmd.c
+++ b/src/diag_cmd.c
@@ -20,6 +20,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <osmocom/core/gsmtap.h>
+#include <osmocom/core/gsmtap_util.h>
+
#include "protocol/protocol.h"
#include "protocol/diagcmd.h"
#include "diag_cmd.h"
@@ -47,6 +50,11 @@ int diag_process_msg(struct diag_instance *di, struct msgb *msg)
{
uint8_t cmd = msg->l2h[0];
+ if (di->gsmtap) {
+ gsmtap_send_ex(di->gsmtap, GSMTAP_TYPE_QC_DIAG, 0, 0, 0,
+ 0, 0, 0, 0, msgb_l2(msg), msgb_l2len(msg));
+ }
+
switch (cmd) {
case DIAG_LOG_F:
diag_log_handle(di, msg);