This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11550 ) Change subject: RSL: restructure MDCX functions ...................................................................... RSL: restructure MDCX functions In preparation for upcoming LCLS changes we have to split IPA RSL MDCX generation into separate function with the ability to set destination explicitly instead of just using the value from lchan which will be used in follow-up patches. Change-Id: Iffe2f4f10e841fc36965cce02b4e5f017a5ae6c8 Related: OS#3659 --- M include/osmocom/bsc/abis_rsl.h M src/osmo-bsc/abis_rsl.c 2 files changed, 19 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h index 5ada3fc..098d2e6 100644 --- a/include/osmocom/bsc/abis_rsl.h +++ b/include/osmocom/bsc/abis_rsl.h @@ -61,6 +61,7 @@ int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci); /* ip.access specfic RSL extensions */ +struct msgb *rsl_make_ipacc_mdcx(const struct gsm_lchan *lchan, uint32_t dest_ip, uint16_t dest_port); int rsl_tx_ipacc_crcx(const struct gsm_lchan *lchan); int rsl_tx_ipacc_mdcx(const struct gsm_lchan *lchan); int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 6e8d078..954fb0f 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -1847,11 +1847,12 @@ return abis_rsl_sendmsg(msg); } -/*! Send IPA RSL MDCX to configure the RTP port the BTS sends to (MGW). - * \param[in] lchan Logical Channel for which we issue MDCX - * Remote (MGW) IP address, port and payload types for RTP are determined from lchan->abis_ip. +/*! Allocate buffer for IPA RSL MDCX and populate it with given parameters. + * \param[in] lchan Logical Channel for which we make MDCX + * \param[in] dest_ip The IP address to connect to + * \param[in] dest_port The port to connect to */ -int rsl_tx_ipacc_mdcx(const struct gsm_lchan *lchan) +struct msgb *rsl_make_ipacc_mdcx(const struct gsm_lchan *lchan, uint32_t dest_ip, uint16_t dest_port) { struct msgb *msg = rsl_msgb_alloc(); struct abis_rsl_dchan_hdr *dh; @@ -1865,8 +1866,8 @@ msgb_tv16_put(msg, RSL_IE_IPAC_CONN_ID, lchan->abis_ip.conn_id); msgb_v_put(msg, RSL_IE_IPAC_REMOTE_IP); att_ip = (uint32_t *)msgb_put(msg, sizeof(uint32_t)); - *att_ip = htonl(lchan->abis_ip.connect_ip); - msgb_tv16_put(msg, RSL_IE_IPAC_REMOTE_PORT, lchan->abis_ip.connect_port); + *att_ip = htonl(dest_ip); + msgb_tv16_put(msg, RSL_IE_IPAC_REMOTE_PORT, dest_port); msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload); if (lchan->abis_ip.rtp_payload2) @@ -1874,6 +1875,17 @@ msg->dst = lchan->ts->trx->rsl_link; + return msg; +} + +/*! Send IPA RSL MDCX to configure the RTP port the BTS sends to (MGW). + * \param[in] lchan Logical Channel for which we issue MDCX + * Remote (MGW) IP address, port and payload types for RTP are determined from lchan->abis_ip. + */ +int rsl_tx_ipacc_mdcx(const struct gsm_lchan *lchan) +{ + struct msgb *msg = rsl_make_ipacc_mdcx(lchan, lchan->abis_ip.connect_ip, lchan->abis_ip.connect_port); + LOG_LCHAN(lchan, LOGL_DEBUG, "Sending IPACC MDCX to BTS:" " %s:%u rtp_payload=%u rtp_payload2=%u conn_id=%u speech_mode=0x%02x\n", ip_to_a(lchan->abis_ip.connect_ip), -- To view, visit https://gerrit.osmocom.org/11550 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iffe2f4f10e841fc36965cce02b4e5f017a5ae6c8 Gerrit-Change-Number: 11550 Gerrit-PatchSet: 9 Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-CC: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181122/1227f76c/attachment.htm>