From ffa7c0ad3900c44fb67d486758f31b347f585eb2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 23 Dec 2015 00:03:41 +0100 Subject: use msgb_sctp_ppid() from libosmo-netif, remove local declaration --- src/hnbgw.c | 4 +++- src/hnbgw.h | 2 -- src/hnbgw_hnbap.c | 3 ++- src/hnbgw_rua.c | 3 ++- 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 #include +#include + #include #include #include @@ -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 -#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 #include #include +#include #include #include @@ -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 #include +#include #include #include @@ -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); } -- cgit v1.2.3