Genreate GSMTAP messages from raw received DIAG frames
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 @@
 {
 	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);