Genreate GSMTAP messages from raw received DIAG frames

This commit is contained in:
Harald Welte 2017-01-07 16:01:09 +01:00
parent 651d4d8fbc
commit 6ec7abf157
1 changed files with 8 additions and 0 deletions

View File

@ -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);