aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-23 00:03:41 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-23 00:04:05 +0100
commitffa7c0ad3900c44fb67d486758f31b347f585eb2 (patch)
tree6014aae5c9ef189e7eb3fe6233eaa77958c3eea2
parent75a4e65f52f02e20d56d8426219feb46ec5cabf9 (diff)
use msgb_sctp_ppid() from libosmo-netif, remove local declaration
-rw-r--r--src/hnbgw.c4
-rw-r--r--src/hnbgw.h2
-rw-r--r--src/hnbgw_hnbap.c3
-rw-r--r--src/hnbgw_rua.c3
4 files changed, 7 insertions, 5 deletions
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 7938c5b..60baf78 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -44,6 +44,8 @@
#include <osmocom/vty/logging.h>
#include <osmocom/vty/command.h>
+#include <osmocom/netif/stream.h>
+
#include <osmocom/sigtran/sua.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/sccp_sap.h>
@@ -197,7 +199,7 @@ static int hnb_write_cb(struct osmo_fd *fd, struct msgb *msg)
{
struct hnb_context *ctx = fd->data;
struct sctp_sndrcvinfo sinfo = {
- .sinfo_ppid = htonl(msgb_ppid(msg)),
+ .sinfo_ppid = htonl(msgb_sctp_ppid(msg)),
.sinfo_stream = ctx->hnbap_stream,
};
int rc;
diff --git a/src/hnbgw.h b/src/hnbgw.h
index d78dad0..f854698 100644
--- a/src/hnbgw.h
+++ b/src/hnbgw.h
@@ -7,8 +7,6 @@
#define DEBUG
#include <osmocom/core/logging.h>
-#define msgb_ppid(msg) (msg)->cb[0]
-
enum {
DMAIN,
DHNBAP,
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 0b8e3e4..fb7cfab 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -21,6 +21,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm48.h>
+#include <osmocom/netif/stream.h>
#include <unistd.h>
#include <errno.h>
@@ -41,7 +42,7 @@ static int hnbgw_hnbap_tx(struct hnb_context *ctx, struct msgb *msg)
if (!msg)
return -EINVAL;
- msgb_ppid(msg) = IUH_PPI_HNBAP;
+ msgb_sctp_ppid(msg) = IUH_PPI_HNBAP;
return osmo_wqueue_enqueue(&ctx->wqueue, msg);
}
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index cca09ad..3ac3751 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -21,6 +21,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
+#include <osmocom/netif/stream.h>
#include <unistd.h>
#include <errno.h>
@@ -38,7 +39,7 @@ static int hnbgw_rua_tx(struct hnb_context *ctx, struct msgb *msg)
if (!msg)
return -EINVAL;
- msgb_ppid(msg) = IUH_PPI_RUA;
+ msgb_sctp_ppid(msg) = IUH_PPI_RUA;
return osmo_wqueue_enqueue(&ctx->wqueue, msg);
}