cscn wip: direct dtap responses to IuCS

This commit is contained in:
Neels Hofmeyr
2016-02-11 01:28:06 +01:00
parent c6172a320b
commit 7a70a4f52a
7 changed files with 23 additions and 9 deletions

View File

@@ -4,4 +4,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t l
struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network,
uint8_t link_id,
uint32_t conn_id)
uint32_t conn_id);
int iucs_submit_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg);

View File

@@ -253,9 +253,9 @@ struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan)
/* Configure the time and start it so it will be closed */
/* FIXME: above comment is weird in at least two ways */
conn->network = network;
conn->via_iface = IFACE_A;
conn->lchan = lchan;
conn->network = network;
lchan->conn = conn;
llist_add_tail(&conn->entry, &network->subscr_conns);
return conn;

View File

@@ -20,7 +20,8 @@ libmsc_a_SOURCES = auth.c \
ussd.c \
vty_interface_layer3.c \
transaction.c \
osmo_msc.c ctrl_commands.c meas_feed.c
osmo_msc.c ctrl_commands.c meas_feed.c \
msc_api.c
if BUILD_SMPP
noinst_HEADERS += smpp_smsc.h

View File

@@ -65,6 +65,8 @@
#include <assert.h>
#include "msc_api.h"
/* These debug statements were removed during the BSC/MSC split. It may make
* sense to replace them with debug statements that do not access BTS data. */
#define BEFORE_MSCSPLIT 0
@@ -102,7 +104,7 @@ static int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection
gh->proto_discr = trans->protocol | (trans->transaction_id << 4);
}
return gsm0808_submit_dtap(conn, msg, 0, 0);
return msc_submit_dtap(conn, msg);
}
int gsm48_cc_tx_notify_ss(struct gsm_trans *trans, const char *message)

View File

@@ -6,3 +6,7 @@
/* TODO does this belong to openbsc/gsm_04_08.h ?? */
int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
uint16_t chosen_channel);
/* Depending on conn->via_iface (A or IuCS), submit msg to the proper link api. */
extern int msc_submit_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg);

View File

@@ -108,3 +108,12 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg)
return rc;
}
int iucs_submit_dtap(struct gsm_subscriber_connection *conn,
struct msgb *msg)
{
OSMO_ASSERT(conn->via_iface == IFACE_IUCS);
msg->dst = conn->iu.ue_ctx;
return iu_tx(msg, 0);
}

View File

@@ -1,5 +0,0 @@
#pragma once
#include <openbsc/iu.h>
int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t link_id);