diff options
-rw-r--r-- | include/osmocom/msc/msc_a.h | 5 | ||||
-rw-r--r-- | src/libmsc/ran_peer.c | 25 |
2 files changed, 20 insertions, 10 deletions
diff --git a/include/osmocom/msc/msc_a.h b/include/osmocom/msc/msc_a.h index 525674434..bef741712 100644 --- a/include/osmocom/msc/msc_a.h +++ b/include/osmocom/msc/msc_a.h @@ -37,6 +37,8 @@ #include <osmocom/msc/neighbor_ident.h> struct ran_infra; +struct vgcs_bss; +struct vgcs_bss_cell; #define MSC_A_USE_LOCATION_UPDATING "lu" #define MSC_A_USE_CM_SERVICE_CC "cm_service_cc" @@ -220,6 +222,9 @@ const char *msc_a_cm_service_type_to_use(enum osmo_cm_service_type cm_service_ty void msc_a_release_cn(struct msc_a *msc_a); void msc_a_release_mo(struct msc_a *msc_a, enum gsm48_gsm_cause gsm_cause); +int msc_a_rx_vgcs_bss(struct vgcs_bss *bss, struct ran_conn *from_conn, struct msgb *msg); +int msc_a_rx_vgcs_cell(struct vgcs_bss_cell *cell, struct ran_conn *from_conn, struct msgb *msg); + int msc_a_ran_decode_cb(struct osmo_fsm_inst *msc_a_fi, void *data, const struct ran_msg *msg); int msc_a_vlr_set_cipher_mode(void *_msc_a, bool umts_aka, bool retrieve_imeisv); diff --git a/src/libmsc/ran_peer.c b/src/libmsc/ran_peer.c index 038ef4454..880619dc5 100644 --- a/src/libmsc/ran_peer.c +++ b/src/libmsc/ran_peer.c @@ -33,6 +33,7 @@ #include <osmocom/msc/vlr.h> #include <osmocom/msc/ran_conn.h> #include <osmocom/msc/cell_id_list.h> +#include <osmocom/msc/msc_vgcs.h> static struct osmo_fsm ran_peer_fsm; @@ -393,18 +394,22 @@ void ran_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data) OSMO_ASSERT(ctx->conn); OSMO_ASSERT(ctx->msg); - if (!ctx->conn->msc_role) { + if (ctx->conn->msc_role) { + /* "normal" A connection, dispatch to MSC-I or MSC-T */ + an_apdu = (struct an_apdu){ + .an_proto = rp->sri->ran->an_proto, + .msg = ctx->msg, + }; + osmo_fsm_inst_dispatch(ctx->conn->msc_role, MSC_EV_FROM_RAN_UP_L2, &an_apdu); + } else if (ctx->conn->vgcs.bss) { + /* VGCS call related */ + msc_a_rx_vgcs_bss(ctx->conn->vgcs.bss, ctx->conn, ctx->msg); + } else if (ctx->conn->vgcs.cell) { + /* VGCS channel related */ + msc_a_rx_vgcs_cell(ctx->conn->vgcs.cell, ctx->conn, ctx->msg); + } else LOG_RAN_PEER(rp, LOGL_ERROR, "Rx CO message on conn that is not associated with any MSC role\n"); - return; - } - - an_apdu = (struct an_apdu){ - .an_proto = rp->sri->ran->an_proto, - .msg = ctx->msg, - }; - - osmo_fsm_inst_dispatch(ctx->conn->msc_role, MSC_EV_FROM_RAN_UP_L2, &an_apdu); return; case RAN_PEER_EV_MSG_DOWN_CO_INITIAL: |