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/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21653 ) Change subject: gprs_ns2: add gprs_ns2_fr_bind_role() to retrieve the fr role ...................................................................... gprs_ns2: add gprs_ns2_fr_bind_role() to retrieve the fr role Change-Id: I277b805e588ba68536789b4a64a428ea0b31728a --- M include/osmocom/gprs/gprs_ns2.h M src/gb/gprs_ns2_fr.c 2 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/21653/1 diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h index 876e97e..8c61788 100644 --- a/include/osmocom/gprs/gprs_ns2.h +++ b/include/osmocom/gprs/gprs_ns2.h @@ -183,6 +183,7 @@ struct gprs_ns2_inst *nsi, const char *netif); const char *gprs_ns2_fr_bind_netif(struct gprs_ns2_vc_bind *bind); +enum osmo_fr_role gprs_ns2_fr_bind_role(struct gprs_ns2_vc_bind *bind); int gprs_ns2_fr_bind(struct gprs_ns2_inst *nsi, const char *name, const char *netif, diff --git a/src/gb/gprs_ns2_fr.c b/src/gb/gprs_ns2_fr.c index 0dcb05b..6e761f6 100644 --- a/src/gb/gprs_ns2_fr.c +++ b/src/gb/gprs_ns2_fr.c @@ -555,6 +555,21 @@ return rc; } +/*! Return the frame relay role of a bind + * \param[in] bind The bind + * \return the frame relay role or -EINVAL if bind is not frame relay + */ +enum osmo_fr_role gprs_ns2_fr_bind_role(struct gprs_ns2_vc_bind *bind) +{ + struct priv_bind *priv; + + if (bind->driver != &vc_driver_fr) + return -EINVAL; + + priv = bind->priv; + return priv->link->role; +} + /*! Return the network interface of the bind * \param[in] bind The bind * \return the network interface -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21653 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I277b805e588ba68536789b4a64a428ea0b31728a Gerrit-Change-Number: 21653 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201210/e39d4e34/attachment.htm>