use osmo_{htonl,htons,ntohl,ntohs}() functions all over libosmocore

This gets us one step closer to fixing the embedded build

Change-Id: I3fc2639b6ade9ab138766987eceab7ec9498fdc7
diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c
index 85f8c28..f37f8e7 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 @@
 	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)