diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-05-15 12:11:36 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-05-15 13:42:03 +0200 |
commit | 95871dadbd92048b0dc2ceb2d631a53e062a7420 (patch) | |
tree | 1d9de18dda6837429409d235171270706bce7041 /src/gsm/ipa.c | |
parent | 3318c657dea52c143842dab0e0f7733288f7bd4d (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/gsm/ipa.c')
-rw-r--r-- | src/gsm/ipa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c index 2c0880ae..90cf0eb6 100644 --- a/src/gsm/ipa.c +++ b/src/gsm/ipa.c @@ -26,10 +26,10 @@ #include <errno.h> #include <stdlib.h> -#include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> +#include <osmocom/core/byteswap.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> #include <osmocom/core/logging.h> @@ -431,7 +431,7 @@ void ipa_prepend_header(struct msgb *msg, int proto) /* prepend the ip.access header */ hh = (struct ipaccess_head *) msgb_push(msg, sizeof(*hh)); - hh->len = htons(msg->len - sizeof(*hh)); + hh->len = osmo_htons(msg->len - sizeof(*hh)); hh->proto = proto; } @@ -502,7 +502,7 @@ int ipa_msg_recv_buffered(int fd, struct msgb **rmsg, struct msgb **tmp_msg) hh = (struct ipaccess_head *) msg->data; /* then read the length as specified in header */ - len = ntohs(hh->len); + len = osmo_ntohs(hh->len); if (len < 0 || IPA_ALLOC_SIZE < len + sizeof(*hh)) { LOGP(DLINP, LOGL_ERROR, "bad message length of %d bytes, " |