use msgb_sctp_ppid() from libosmo-netif, remove local declaration

This commit is contained in:
Harald Welte 2015-12-23 00:03:41 +01:00
parent 75a4e65f52
commit ffa7c0ad39
4 changed files with 7 additions and 5 deletions

View File

@ -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;

View File

@ -7,8 +7,6 @@
#define DEBUG
#include <osmocom/core/logging.h>
#define msgb_ppid(msg) (msg)->cb[0]
enum {
DMAIN,
DHNBAP,

View File

@ -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);
}

View File

@ -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);
}