pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email )
Change subject: WIP ......................................................................
WIP
Change-Id: I567ed206eab1add21836bfd937f3790d3d7a00d7 --- M src/osmo-bsc/bsc_ctrl.c 1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/00/41400/1
diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c index 2ba7af8..f24395a 100644 --- a/src/osmo-bsc/bsc_ctrl.c +++ b/src/osmo-bsc/bsc_ctrl.c @@ -628,6 +628,7 @@ return 0; }
+#if 0 /* Obtain SS7 application server currently handling given MSC (DPC) */ static struct osmo_ss7_as *msc_get_ss7_as(struct bsc_msc_data *msc) { @@ -642,9 +643,11 @@ return NULL; return as; } +#endif
int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg) { +#if 0 struct osmo_ss7_as *as; struct osmo_ss7_asp *asp;
@@ -667,6 +670,24 @@ return -1; } return osmo_ss7_asp_send(asp, msg); +#endif + + struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(msc->a.sccp); + struct osmo_mtp_prim *omp; + struct osmo_mtp_transfer_param *param; + + /* 2) wrap into MTP-TRANSFER.req primitive */ + msg->l2h = msg->data; + omp = (struct osmo_mtp_prim *) msgb_push(msg, sizeof(*omp)); + osmo_prim_init(&omp->oph, MTP_SAP_USER, OSMO_MTP_PRIM_TRANSFER, PRIM_OP_REQUEST, msg); + param = &omp->u.transfer; + param->opc = s7i->cfg.primary_pc; + param->dpc = msc->a.msc_addr.pc; + param->sls = 0; + param->sio = MTP_SIO(MTP_SI_SCCP, s7i->cfg.network_indicator); + + /* 3) send via MTP-SAP (osmo_ss7_instance) */ + return osmo_ss7_user_mtp_xfer_req(s7i, omp); }
/* Encode a CTRL command and send it to the given ASP