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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21888 ) Change subject: gbproxy: Add comments to sgsn functions ...................................................................... gbproxy: Add comments to sgsn functions Change-Id: I8c96308045112f25292b0e57c306d8486a2524cc --- M src/gbproxy/gb_proxy_main.c M src/gbproxy/gb_proxy_peer.c 2 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/88/21888/1 diff --git a/src/gbproxy/gb_proxy_main.c b/src/gbproxy/gb_proxy_main.c index e85e951..c660ede 100644 --- a/src/gbproxy/gb_proxy_main.c +++ b/src/gbproxy/gb_proxy_main.c @@ -303,6 +303,8 @@ gprs_ns2_vty_create(); + /* TODO: Warn if we create a gbproxy_nse for an NSEI which we don't have a bind */ + /* start telnet after reading config for vty_get_bind_addr() */ rc = telnet_init_dynif(tall_sgsn_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_GBPROXY); diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c index 595e2a6..a966c6c 100644 --- a/src/gbproxy/gb_proxy_peer.c +++ b/src/gbproxy/gb_proxy_peer.c @@ -343,7 +343,15 @@ return nse; } -/* SGSN */ +/*********************************************************************** + * SGSN - Serving GPRS Support Node + ***********************************************************************/ + +/*! Allocate a new SGSN. This ensures the corresponding gbproxy_nse is allocated as well + * \param[in] cfg The gbproxy configuration + * \param[in] nsei The nsei where the SGSN can be reached + * \return The SGSN, NULL if it couldn't be allocated + */ struct gbproxy_sgsn *gbproxy_sgsn_alloc(struct gbproxy_config *cfg, uint16_t nsei) { struct gbproxy_sgsn *sgsn; @@ -381,6 +389,9 @@ talloc_free(sgsn); } +/*! Free the SGSN. This ensures the corresponding gbproxy_nse is freed as well + * \param[in] sgsn The SGSN + */ void gbproxy_sgsn_free(struct gbproxy_sgsn *sgsn) { if (!sgsn) @@ -392,6 +403,11 @@ _sgsn_free(sgsn); } +/*! Return the SGSN for a given NSEI + * \param[in] cfg The gbproxy configuration + * \param[in] nsei The nsei where the SGSN can be reached + * \return Returns the matching SGSN or NULL if it couldn't be found + */ struct gbproxy_sgsn *gbproxy_sgsn_by_nsei(struct gbproxy_config *cfg, uint16_t nsei) { struct gbproxy_sgsn *sgsn; @@ -405,6 +421,11 @@ return NULL; } +/*! Return the SGSN for a given NSEI, creating a new one if none exists + * \param[in] cfg The gbproxy configuration + * \param[in] nsei The nsei where the SGSN can be reached + * \return Returns the SGSN + */ struct gbproxy_sgsn *gbproxy_sgsn_by_nsei_or_new(struct gbproxy_config *cfg, uint16_t nsei) { struct gbproxy_sgsn *sgsn; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I8c96308045112f25292b0e57c306d8486a2524cc Gerrit-Change-Number: 21888 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201229/86a8927e/attachment.htm>