summaryrefslogtreecommitdiffstats
path: root/src/logging_gsmtap.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-15 12:11:36 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-15 13:42:03 +0200
commit95871dadbd92048b0dc2ceb2d631a53e062a7420 (patch)
tree1d9de18dda6837429409d235171270706bce7041 /src/logging_gsmtap.c
parent3318c657dea52c143842dab0e0f7733288f7bd4d (diff)
use osmo_{htonl,htons,ntohl,ntohs}() functions all over libosmocore
This gets us one step closer to fixing the embedded build Change-Id: I3fc2639b6ade9ab138766987eceab7ec9498fdc7
Diffstat (limited to 'src/logging_gsmtap.c')
-rw-r--r--src/logging_gsmtap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c
index 85f8c28b..f37f8e7d 100644
--- a/src/logging_gsmtap.c
+++ b/src/logging_gsmtap.c
@@ -32,7 +32,6 @@
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
-#include <arpa/inet.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
@@ -44,6 +43,7 @@
#include <osmocom/core/gsmtap_util.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
+#include <osmocom/core/byteswap.h>
#define GSMTAP_LOG_MAX_SIZE 4096
@@ -81,12 +81,12 @@ static void _gsmtap_raw_output(struct log_target *target, int subsys,
else
golh->subsys[0] = '\0';
osmo_strlcpy(golh->src_file.name, file, sizeof(golh->src_file.name));
- golh->src_file.line_nr = htonl(line);
+ golh->src_file.line_nr = osmo_htonl(line);
golh->level = level;
/* we always store the timestamp in the message, irrespective
* of hat prrint_[ext_]timestamp say */
- golh->ts.sec = htonl(tv.tv_sec);
- golh->ts.usec = htonl(tv.tv_usec);
+ golh->ts.sec = osmo_htonl(tv.tv_sec);
+ golh->ts.usec = osmo_htonl(tv.tv_usec);
rc = vsnprintf((char *) msg->tail, msgb_tailroom(msg), format, ap);
if (rc < 0)