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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21399 ) Change subject: gprs_ns2: Introduce gprs_ns2_lltype_str() for link layer name ...................................................................... gprs_ns2: Introduce gprs_ns2_lltype_str() for link layer name Change-Id: I4b257c09d9d3c97d6da04240c7a74a95c7c93675 --- M include/osmocom/gprs/gprs_ns2.h M src/gb/gprs_ns2.c M src/gb/libosmogb.map 3 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/99/21399/1 diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h index 99764d0..4575329 100644 --- a/include/osmocom/gprs/gprs_ns2.h +++ b/include/osmocom/gprs/gprs_ns2.h @@ -47,11 +47,16 @@ }; extern const struct value_string gprs_ns2_prim_strs[]; +extern const struct value_string gprs_ns2_lltype_strs[]; /*! Obtain a human-readable string for NS primitives */ static inline const char *gprs_ns2_prim_str(enum gprs_ns2_prim val) { return get_value_string(gprs_ns2_prim_strs, val); } +/*! Obtain a human-readable string for NS link-layer type */ +static inline const char *gprs_ns2_lltype_str(enum gprs_ns2_ll val) +{ return get_value_string(gprs_ns2_lltype_strs, val); } + /*! Osmocom NS primitives according to 48.016 5.2.2.4 Service primitves */ enum gprs_ns2_congestion_cause { NS_CONG_CAUSE_BACKWARD_BEGIN, diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index 470027a..30716fc 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -211,6 +211,13 @@ { 0, NULL } }; +const struct value_string gprs_ns2_lltype_strs[] = { + { GPRS_NS2_LL_UDP, "UDP" }, + { GPRS_NS2_LL_FR_GRE, "FR_GRE" }, + { GPRS_NS2_LL_FR, "FR" }, + { 0, NULL } +}; + /*! string-format a given NS-VC into a user-supplied buffer. * \param[in] buf user-allocated output buffer * \param[in] buf_len size of user-allocated output buffer in bytes diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map index ddfd071..2c4e897 100644 --- a/src/gb/libosmogb.map +++ b/src/gb/libosmogb.map @@ -119,6 +119,7 @@ gprs_ns2_ll_str; gprs_ns2_ll_str_buf; gprs_ns2_ll_str_c; +gprs_ns2_lltype_strs; gprs_ns2_nse_by_nsei; gprs_ns2_nse_foreach_nsvc; gprs_ns2_nse_nsei; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21399 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b257c09d9d3c97d6da04240c7a74a95c7c93675 Gerrit-Change-Number: 21399 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201129/86ef0b55/attachment.htm>