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/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13923 Change subject: bssap: Detect MSC Osmux support on RESET (ACK) recv ...................................................................... bssap: Detect MSC Osmux support on RESET (ACK) recv Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_bssap.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/13923/1 diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 271bdd4..4720845 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -133,6 +133,8 @@ /* Whether we want to use Osmux against this MSC. Controlled via VTY */ enum osmux_usage use_osmux; + /* Whether we detected the MSC supports Osmux (during BSSMAP_RESET) */ + bool remote_supports_osmux; }; /* diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index e79a344..014a9b8 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -51,6 +51,29 @@ * helpers for the assignment command */ +/* We expect MSC to provide use with an Osmocom extension TLV in BSSMAP_RESET to + * announce Osmux support */ +static void update_msc_osmux_support(struct bsc_msc_data *msc, + struct msgb *msg, unsigned int length) +{ + struct tlv_parsed tp; + int rc; + bool old_value = msc->remote_supports_osmux; + /*TODO tlv_parse, check for GSM0808_IE_OSMO_OSMUX_CID existance. If present, set */ + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l4h + 1, length - 1, 0, 0); + if (rc < 0) + LOGP(DMSC, LOGL_NOTICE, "Failed parsing TLV looking for Osmux support\n"); + + if (TLVP_PRESENT(&tp, GSM0808_IE_OSMO_OSMUX_SUPPORT)) { + msc->remote_supports_osmux = true; + } else { + msc->remote_supports_osmux = false; + } + + if (old_value != msc->remote_supports_osmux) + LOGP(DMSC, LOGL_INFO, "MSC detected AoIP Osmux support changed: %d->%d\n", + old_value, msc->remote_supports_osmux); +} static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) @@ -63,6 +86,8 @@ * that we have successfully received the reset-ack message */ a_reset_ack_confirm(msc); + update_msc_osmux_support(msc, msg, length); + return 0; } @@ -81,6 +106,8 @@ /* Drop all ongoing paging requests that this MSC has created on any BTS */ paging_flush_network(msc->network, msc); + update_msc_osmux_support(msc, msg, length); + /* Inform the MSC that we have received the reset request and * that we acted accordingly */ osmo_bsc_sigtran_tx_reset_ack(msc); -- To view, visit https://gerrit.osmocom.org/13923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528 Gerrit-Change-Number: 13923 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190508/d69bd407/attachment.htm>