lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

November 2024

  • 1 participants
  • 2209 discussions
[M] Change in osmo-sgsn[master]: move gsm48_gmm_att_tlvdef into gprs_gmm_util
by daniel 05 Nov '24

05 Nov '24
Attention is currently required from: fixeria, lynxis lazus, pespin. daniel has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/37868?usp=email ) Change subject: move gsm48_gmm_att_tlvdef into gprs_gmm_util ...................................................................... Patch Set 21: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/37868?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I67dcdb986fd01dc093501d324b5c376246a5d30d Gerrit-Change-Number: 37868 Gerrit-PatchSet: 21 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 05 Nov 2024 13:34:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[master]: gsm 04.08: add GSM48 IE GMM_ADD_IDENTITY/RAI2
by lynxis lazus 05 Nov '24

05 Nov '24
Attention is currently required from: daniel. lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/libosmocore/+/38630?usp=email ) Change subject: gsm 04.08: add GSM48 IE GMM_ADD_IDENTITY/RAI2 ...................................................................... Patch Set 1: (1 comment) File include/osmocom/gsm/protocol/gsm_04_08_gprs.h: https://gerrit.osmocom.org/c/libosmocore/+/38630/comment/50b212a0_5f82dbf6?… : PS1, Line 90: 10.5.5.4 > 10.5.1. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38630?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1861bae4b9c89a19500322de5670df1d46a6cd81 Gerrit-Change-Number: 38630 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 05 Nov 2024 13:33:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmocore[master]: gsm 04.08: add GSM48 IE GMM_ADD_IDENTITY/RAI2
by lynxis lazus 05 Nov '24

05 Nov '24
Attention is currently required from: daniel, lynxis lazus. Hello Jenkins Builder, daniel, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/38630?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by daniel, Verified+1 by Jenkins Builder Change subject: gsm 04.08: add GSM48 IE GMM_ADD_IDENTITY/RAI2 ...................................................................... gsm 04.08: add GSM48 IE GMM_ADD_IDENTITY/RAI2 Both IEs are used for 4G to 2G mobility. Change-Id: I1861bae4b9c89a19500322de5670df1d46a6cd81 --- M include/osmocom/gsm/protocol/gsm_04_08_gprs.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/38630/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38630?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1861bae4b9c89a19500322de5670df1d46a6cd81 Gerrit-Change-Number: 38630 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[L] Change in libosmo-sigtran[master]: sigtran: Make osmo_ss7_xua_server APIs private
by pespin 05 Nov '24

05 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38642?usp=email ) Change subject: sigtran: Make osmo_ss7_xua_server APIs private ...................................................................... sigtran: Make osmo_ss7_xua_server APIs private xua_srv objects are managed so far exclusively through libosmo-sigtran VTY interface, hence make the struct as well as all its APIs private Change-Id: Ie03697fdb2c9f95de011b21771261e52befb6018 --- M include/osmocom/sigtran/osmo_ss7.h M src/Makefile.am M src/osmo_ss7.c M src/osmo_ss7_asp.c M src/osmo_ss7_vty.c M src/osmo_ss7_xua_srv.c M src/sccp_user.c M src/ss7_internal.h A src/ss7_xua_srv.h M src/xua_asp_fsm.c M src/xua_default_lm_fsm.c 11 files changed, 139 insertions(+), 112 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/42/38642/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index d558014..0027426 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -17,7 +17,6 @@ struct osmo_ss7_user; struct osmo_sccp_instance; struct osmo_mtp_prim; -struct osmo_xua_layer_manager; struct osmo_ss7_route_table; int osmo_ss7_init(void); @@ -39,6 +38,14 @@ } /*********************************************************************** + * xUA Servers + ***********************************************************************/ + +struct osmo_xua_layer_manager; + +struct osmo_xua_server; + +/*********************************************************************** * SS7 Instances ***********************************************************************/ @@ -402,70 +409,6 @@ void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb); -/*********************************************************************** - * xUA Servers - ***********************************************************************/ - -struct osmo_xua_layer_manager { - osmo_prim_cb prim_cb; -}; - -struct osmo_xua_server { - struct llist_head list; - struct osmo_ss7_instance *inst; - - /* list of ASPs established via this server */ - struct llist_head asp_list; - - struct osmo_stream_srv_link *server; - - struct { - bool accept_dyn_reg; - struct osmo_ss7_asp_peer local; - enum osmo_ss7_asp_protocol proto; - struct { - bool num_ostreams_present; - bool max_instreams_present; - uint16_t num_ostreams_value; - uint16_t max_instreams_value; - } sctp_init; - - /*! The underlaying transport protocol (one of IPPROTO_*) */ - int trans_proto; - } cfg; -}; - -struct osmo_xua_server * -osmo_ss7_xua_server_find(struct osmo_ss7_instance *inst, - enum osmo_ss7_asp_protocol proto, - uint16_t local_port) - OSMO_DEPRECATED("Use osmo_ss7_xua_server_find2() instead"); -struct osmo_xua_server * -osmo_ss7_xua_server_find2(struct osmo_ss7_instance *inst, - int trans_proto, - enum osmo_ss7_asp_protocol proto, - uint16_t local_port); - -struct osmo_xua_server * -osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, - enum osmo_ss7_asp_protocol proto, - uint16_t local_port, const char *local_host) - OSMO_DEPRECATED("Use osmo_ss7_xua_server_create2() instead"); -struct osmo_xua_server * -osmo_ss7_xua_server_create2(struct osmo_ss7_instance *inst, - int trans_proto, enum osmo_ss7_asp_protocol proto, - uint16_t local_port, const char *local_host); - -int -osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); - -int -osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); -int -osmo_ss7_xua_server_set_local_hosts(struct osmo_xua_server *xs, const char **local_hosts, size_t local_host_cnt); -int osmo_ss7_xua_server_add_local_host(struct osmo_xua_server *xs, const char *local_host); -int osmo_ss7_xua_server_del_local_host(struct osmo_xua_server *xs, const char *local_host); -void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); struct osmo_sccp_instance * osmo_sccp_simple_client(void *ctx, const char *name, uint32_t default_pc, diff --git a/src/Makefile.am b/src/Makefile.am index b258a02..8f848de 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,6 +10,7 @@ ss7_route.h \ ss7_route_table.h \ ss7_user.h \ + ss7_xua_srv.h \ xua_asp_fsm.h \ xua_as_fsm.h \ xua_internal.h \ diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 59012bc..0402038 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -655,51 +655,6 @@ trans_proto, proto); } -/*! \brief find an xUA server with the given parameters - * \param[in] inst SS7 Instance on which we operate - * \param[in] trans_proto transport protocol in use (one of IPPROTO_*) - * \param[in] proto protocol (xUA variant) in use - * \param[in] local_port local port of the server - * \returns \ref osmo_xua_server or NULL (not found) - */ -struct osmo_xua_server * -osmo_ss7_xua_server_find2(struct osmo_ss7_instance *inst, - int trans_proto, - enum osmo_ss7_asp_protocol proto, - uint16_t local_port) -{ - struct osmo_xua_server *xs; - - OSMO_ASSERT(ss7_initialized); - llist_for_each_entry(xs, &inst->xua_servers, list) { - if (trans_proto != xs->cfg.trans_proto) - continue; - if (proto != xs->cfg.proto) - continue; - if (local_port != xs->cfg.local.port) - continue; - return xs; - } - - return NULL; -} - -/*! \brief find an xUA server with the given parameters - * \param[in] inst SS7 Instance on which we operate - * \param[in] proto protocol (xUA variant) in use - * \param[in] local_port local port of the server - * \returns \ref osmo_xua_server or NULL (not found) - */ -struct osmo_xua_server * -osmo_ss7_xua_server_find(struct osmo_ss7_instance *inst, - enum osmo_ss7_asp_protocol proto, - uint16_t local_port) -{ - const int trans_proto = ss7_default_trans_proto_for_asp_proto(proto); - - return osmo_ss7_xua_server_find2(inst, trans_proto, proto, local_port); -} - bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc) { OSMO_ASSERT(ss7_initialized); diff --git a/src/osmo_ss7_asp.c b/src/osmo_ss7_asp.c index 9bb4b40..6058304 100644 --- a/src/osmo_ss7_asp.c +++ b/src/osmo_ss7_asp.c @@ -52,6 +52,7 @@ #include "sccp_internal.h" #include "xua_internal.h" #include "ss7_internal.h" +#include "ss7_xua_srv.h" #include "xua_asp_fsm.h" #include "xua_as_fsm.h" diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 6c9db5a..6f149cd 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -49,6 +49,7 @@ #include "ss7_route.h" #include "ss7_route_table.h" #include "ss7_internal.h" +#include "ss7_xua_srv.h" #include <netinet/tcp.h> diff --git a/src/osmo_ss7_xua_srv.c b/src/osmo_ss7_xua_srv.c index 473826f..3d57c63 100644 --- a/src/osmo_ss7_xua_srv.c +++ b/src/osmo_ss7_xua_srv.c @@ -54,6 +54,7 @@ #include "ss7_internal.h" #include "xua_asp_fsm.h" #include "xua_as_fsm.h" +#include "ss7_xua_srv.h" /*********************************************************************** * SS7 xUA Server @@ -372,3 +373,48 @@ llist_del(&xs->list); talloc_free(xs); } + +/*! \brief find an xUA server with the given parameters + * \param[in] inst SS7 Instance on which we operate + * \param[in] trans_proto transport protocol in use (one of IPPROTO_*) + * \param[in] proto protocol (xUA variant) in use + * \param[in] local_port local port of the server + * \returns \ref osmo_xua_server or NULL (not found) + */ +struct osmo_xua_server * +osmo_ss7_xua_server_find2(struct osmo_ss7_instance *inst, + int trans_proto, + enum osmo_ss7_asp_protocol proto, + uint16_t local_port) +{ + struct osmo_xua_server *xs; + + OSMO_ASSERT(ss7_initialized); + llist_for_each_entry(xs, &inst->xua_servers, list) { + if (trans_proto != xs->cfg.trans_proto) + continue; + if (proto != xs->cfg.proto) + continue; + if (local_port != xs->cfg.local.port) + continue; + return xs; + } + + return NULL; +} + +/*! \brief find an xUA server with the given parameters + * \param[in] inst SS7 Instance on which we operate + * \param[in] proto protocol (xUA variant) in use + * \param[in] local_port local port of the server + * \returns \ref osmo_xua_server or NULL (not found) + */ +struct osmo_xua_server * +osmo_ss7_xua_server_find(struct osmo_ss7_instance *inst, + enum osmo_ss7_asp_protocol proto, + uint16_t local_port) +{ + const int trans_proto = ss7_default_trans_proto_for_asp_proto(proto); + + return osmo_ss7_xua_server_find2(inst, trans_proto, proto, local_port); +} diff --git a/src/sccp_user.c b/src/sccp_user.c index 1ca5f1c..61b0829 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -42,6 +42,7 @@ #include "ss7_route.h" #include "ss7_route_table.h" #include "ss7_internal.h" +#include "ss7_xua_srv.h" /*! \brief Find a SCCP User registered for given PC+SSN or SSN only * First search all users with a valid PC for a full PC+SSN match. diff --git a/src/ss7_internal.h b/src/ss7_internal.h index 9a10fab..5d576c5 100644 --- a/src/ss7_internal.h +++ b/src/ss7_internal.h @@ -36,8 +36,6 @@ bool ss7_asp_peer_match_host(const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6); int ss7_asp_peer_find_host(const struct osmo_ss7_asp_peer *peer, const char *host); -bool ss7_xua_server_set_default_local_hosts(struct osmo_xua_server *oxs); - int xua_tcp_segmentation_cb(struct msgb *msg); enum ss7_as_ctr { diff --git a/src/ss7_xua_srv.h b/src/ss7_xua_srv.h new file mode 100644 index 0000000..95f0914 --- /dev/null +++ b/src/ss7_xua_srv.h @@ -0,0 +1,79 @@ +#pragma once + +#include <stdint.h> +#include <unistd.h> +#include <osmocom/core/defs.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/prim.h> +#include <osmocom/netif/stream.h> + +#include <osmocom/sigtran/osmo_ss7.h> + +/*********************************************************************** + * xUA Servers + ***********************************************************************/ + +struct osmo_ss7_instance; + +struct osmo_xua_layer_manager { + osmo_prim_cb prim_cb; +}; + +struct osmo_xua_server { + struct llist_head list; + struct osmo_ss7_instance *inst; + + /* list of ASPs established via this server */ + struct llist_head asp_list; + + struct osmo_stream_srv_link *server; + + struct { + bool accept_dyn_reg; + struct osmo_ss7_asp_peer local; + enum osmo_ss7_asp_protocol proto; + struct { + bool num_ostreams_present; + bool max_instreams_present; + uint16_t num_ostreams_value; + uint16_t max_instreams_value; + } sctp_init; + + /*! The underlaying transport protocol (one of IPPROTO_*) */ + int trans_proto; + } cfg; +}; + +struct osmo_xua_server * +osmo_ss7_xua_server_find(struct osmo_ss7_instance *inst, + enum osmo_ss7_asp_protocol proto, + uint16_t local_port) + OSMO_DEPRECATED("Use osmo_ss7_xua_server_find2() instead"); +struct osmo_xua_server * +osmo_ss7_xua_server_find2(struct osmo_ss7_instance *inst, + int trans_proto, + enum osmo_ss7_asp_protocol proto, + uint16_t local_port); + +struct osmo_xua_server * +osmo_ss7_xua_server_create(struct osmo_ss7_instance *inst, + enum osmo_ss7_asp_protocol proto, + uint16_t local_port, const char *local_host) + OSMO_DEPRECATED("Use osmo_ss7_xua_server_create2() instead"); +struct osmo_xua_server * +osmo_ss7_xua_server_create2(struct osmo_ss7_instance *inst, + int trans_proto, enum osmo_ss7_asp_protocol proto, + uint16_t local_port, const char *local_host); + +int +osmo_ss7_xua_server_bind(struct osmo_xua_server *xs); + +int +osmo_ss7_xua_server_set_local_host(struct osmo_xua_server *xs, const char *local_host); +int +osmo_ss7_xua_server_set_local_hosts(struct osmo_xua_server *xs, const char **local_hosts, size_t local_host_cnt); +int osmo_ss7_xua_server_add_local_host(struct osmo_xua_server *xs, const char *local_host); +int osmo_ss7_xua_server_del_local_host(struct osmo_xua_server *xs, const char *local_host); +void osmo_ss7_xua_server_destroy(struct osmo_xua_server *xs); + +bool ss7_xua_server_set_default_local_hosts(struct osmo_xua_server *oxs); diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 3a9be3f..9e9f8ac 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -28,6 +28,7 @@ #include <osmocom/sigtran/protocol/sua.h> #include "ss7_internal.h" +#include "ss7_xua_srv.h" #include "xua_asp_fsm.h" #include "xua_as_fsm.h" #include "xua_internal.h" diff --git a/src/xua_default_lm_fsm.c b/src/xua_default_lm_fsm.c index 639d30a..b55f982 100644 --- a/src/xua_default_lm_fsm.c +++ b/src/xua_default_lm_fsm.c @@ -37,6 +37,7 @@ #include "xua_internal.h" #include "xua_asp_fsm.h" +#include "ss7_xua_srv.h" #define S(x) (1 << (x)) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38642?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ie03697fdb2c9f95de011b21771261e52befb6018 Gerrit-Change-Number: 38642 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-python-tests[master]: Update osmopy module version to match released tag
by osmith 05 Nov '24

05 Nov '24
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/38637?usp=email ) Change subject: Update osmopy module version to match released tag ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/38637?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/osmo-python-tests Gerrit-Branch: master Gerrit-Change-Id: Idca3f28dad015e626d604e545a0f9b9c9e7bf979 Gerrit-Change-Number: 38637 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 05 Nov 2024 13:02:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-sigtran[master]: sigtran: Make LOG SS7 macros private
by pespin 05 Nov '24

05 Nov '24
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38641?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: sigtran: Make LOG SS7 macros private ...................................................................... sigtran: Make LOG SS7 macros private Those macros are intended for internal use only, since they access private headers of the objects. They are currently not used outside of libosmo-sigtran, so its safe making them private. Change-Id: I9cb852d92086fd04aafe512545553601effe7308 --- M include/osmocom/sigtran/osmo_ss7.h M src/ss7_internal.h M src/xua_asp_fsm.c M src/xua_rkm.c M src/xua_shared.c M src/xua_snm.c 6 files changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/41/38641/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I9cb852d92086fd04aafe512545553601effe7308 Gerrit-Change-Number: 38641 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in libosmo-sigtran[master]: sigtran: Make osmo_ss7_user APIs private
by pespin 05 Nov '24

05 Nov '24
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38640?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: sigtran: Make osmo_ss7_user APIs private ...................................................................... sigtran: Make osmo_ss7_user APIs private ss7_user objects are managed so far exclusively through libosmo-sigtran internal upper layers (SCCP), hence make the struct as well as all its APIs private. Change-Id: I59d8f70aa81ba396159af40ffd7e8cc6c27cb864 --- M include/osmocom/sigtran/osmo_ss7.h M src/Makefile.am M src/osmo_ss7.c M src/osmo_ss7_hmrt.c A src/osmo_ss7_user.c M src/sccp_internal.h M src/sccp_user.c A src/ss7_user.h M tests/ss7/ss7_test.c 9 files changed, 160 insertions(+), 112 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/40/38640/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38640?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I59d8f70aa81ba396159af40ffd7e8cc6c27cb864 Gerrit-Change-Number: 38640 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: sigtran: Make LOG SS7 macros private
by pespin 05 Nov '24

05 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38641?usp=email ) Change subject: sigtran: Make LOG SS7 macros private ...................................................................... sigtran: Make LOG SS7 macros private Those macros are intended for internal use only, since they access private headers of the objects. They are currently not used outside of libosmo-sigtran, so its safe making them private. Change-Id: I9cb852d92086fd04aafe512545553601effe7308 --- M include/osmocom/sigtran/osmo_ss7.h M src/ss7_internal.h 2 files changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/41/38641/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 6fbe76c..d558014 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -402,15 +402,6 @@ void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb); -#define _LOGSS7(inst, subsys, level, fmt, args ...) \ - LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args) -#define LOGSS7(inst, level, fmt, args ...) _LOGSS7(inst, DLSS7, level, fmt, ## args) - -#define LOGPASP(asp, subsys, level, fmt, args ...) \ - _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args) -#define LOGPAS(as, subsys, level, fmt, args ...) \ - _LOGSS7((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## args) - /*********************************************************************** * xUA Servers ***********************************************************************/ diff --git a/src/ss7_internal.h b/src/ss7_internal.h index dcc2ef1..9a10fab 100644 --- a/src/ss7_internal.h +++ b/src/ss7_internal.h @@ -50,3 +50,13 @@ SS7_ASP_CTR_PKT_RX_UNKNOWN, SS7_ASP_CTR_PKT_TX_TOTAL, }; + +#define _LOGSS7(inst, subsys, level, fmt, args ...) \ + LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args) +#define LOGSS7(inst, level, fmt, args ...) \ + _LOGSS7(inst, DLSS7, level, fmt, ## args) + +#define LOGPASP(asp, subsys, level, fmt, args ...) \ + _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args) +#define LOGPAS(as, subsys, level, fmt, args ...) \ + _LOGSS7((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## args) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38641?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I9cb852d92086fd04aafe512545553601effe7308 Gerrit-Change-Number: 38641 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in libosmo-sigtran[master]: sigtran: Make osmo_ss7_route struct and several APIs private
by pespin 05 Nov '24

05 Nov '24
Attention is currently required from: fixeria, laforge, osmith, pespin. Hello Jenkins Builder, fixeria, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38636?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: sigtran: Make osmo_ss7_route struct and several APIs private ...................................................................... sigtran: Make osmo_ss7_route struct and several APIs private The struct is in general managed internally by the library, only a few APIs which are in use by some external users (osmo-hnbgw and osmo-bsc vty) are left public. Change-Id: I8a86966cb6a5361687987a2e9acd79c4ab3d97c4 --- M TODO-RELEASE M include/osmocom/sigtran/osmo_ss7.h M src/Makefile.am M src/osmo_ss7.c M src/osmo_ss7_as.c M src/osmo_ss7_hmrt.c A src/osmo_ss7_route.c M src/osmo_ss7_route_table.c M src/osmo_ss7_vty.c M src/sccp_scrc.c M src/sccp_user.c M src/ss7_internal.h A src/ss7_route.h M src/xua_as_fsm.c M src/xua_rkm.c M tests/ss7/ss7_test.c 16 files changed, 409 insertions(+), 345 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/36/38636/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38636?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I8a86966cb6a5361687987a2e9acd79c4ab3d97c4 Gerrit-Change-Number: 38636 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: sigtran: Make osmo_ss7_user APIs private
by pespin 05 Nov '24

05 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38640?usp=email ) Change subject: sigtran: Make osmo_ss7_user APIs private ...................................................................... sigtran: Make osmo_ss7_user APIs private ss7_user objects are managed so far exclusively through libosmo-sigtran internal upper layers (SCCP), hence make the struct as well as all its APIs private. Change-Id: I59d8f70aa81ba396159af40ffd7e8cc6c27cb864 --- M include/osmocom/sigtran/osmo_ss7.h M src/Makefile.am M src/osmo_ss7.c M src/osmo_ss7_hmrt.c A src/osmo_ss7_user.c M src/sccp_internal.h M src/sccp_user.c A src/ss7_user.h M tests/ss7/ss7_test.c 9 files changed, 162 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/40/38640/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 9a754cd..6fbe76c 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -98,28 +98,7 @@ * MTP Users (Users of MTP, such as SCCP or ISUP) ***********************************************************************/ -struct osmo_ss7_user { - /* pointer back to SS7 instance */ - struct osmo_ss7_instance *inst; - /* name of the user */ - const char *name; - /* primitive call-back for incoming MTP primitives */ - osmo_prim_cb prim_cb; - /* private data */ - void *priv; -}; - -int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, - struct osmo_ss7_user *user); - -int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, - struct osmo_ss7_user *user); - -int osmo_ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp); - -/* SS7 User wants to issue MTP-TRANSFER.req */ -int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, - struct osmo_mtp_prim *omp); +struct osmo_ss7_user; /*********************************************************************** * SS7 Links diff --git a/src/Makefile.am b/src/Makefile.am index 6dd338e..8d074e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,6 +9,7 @@ ss7_linkset.h \ ss7_route.h \ ss7_route_table.h \ + ss7_user.h \ xua_asp_fsm.h \ xua_as_fsm.h \ xua_internal.h \ @@ -45,6 +46,7 @@ osmo_ss7_xua_srv.c \ osmo_ss7_route.c \ osmo_ss7_route_table.c \ + osmo_ss7_user.h \ sccp2sua.c \ sccp_helpers.c \ sccp_lbcs.c \ diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 8f6d417..ab88780 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -423,7 +423,7 @@ * \param[in] service_ind Service (ISUP, SCCP, ...) * \param[in] user SS7 user (including primitive call-back) * \returns 0 on success; negative on error */ -int osmo_ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, +int ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) { if (service_ind >= ARRAY_SIZE(inst->user)) @@ -447,7 +447,7 @@ * \param[in] user (optional) SS7 user. If present, we will not * unregister other users * \returns 0 on success; negative on error */ -int osmo_ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, +int ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) { if (service_ind >= ARRAY_SIZE(inst->user)) @@ -467,7 +467,7 @@ } /* deliver to a local MTP user */ -int osmo_ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) +int ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) { uint32_t service_ind; const struct osmo_ss7_user *osu; diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index b0208b0..e504cb1 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -39,6 +39,7 @@ #include "ss7_route.h" #include "ss7_route_table.h" #include "ss7_internal.h" +#include "ss7_user.h" /* convert from M3UA message to MTP-TRANSFER.ind osmo_mtp_prim */ struct osmo_mtp_prim *m3ua_to_xfer_ind(struct xua_msg *xua) diff --git a/src/osmo_ss7_user.c b/src/osmo_ss7_user.c new file mode 100644 index 0000000..9d17d7a --- /dev/null +++ b/src/osmo_ss7_user.c @@ -0,0 +1,106 @@ +/* (C) 2015-2017 by Harald Welte <laforge(a)gnumonks.org> + * (C) 2023-2024 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de> + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <errno.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/logging.h> +#include <osmocom/sigtran/osmo_ss7.h> + +#include "ss7_internal.h" + +/*********************************************************************** + * MTP Users (Users of MTP, such as SCCP or ISUP) + ***********************************************************************/ + +/*! \brief Register a MTP user for a given service indicator + * \param[in] inst SS7 instance for which we register the user + * \param[in] service_ind Service (ISUP, SCCP, ...) + * \param[in] user SS7 user (including primitive call-back) + * \returns 0 on success; negative on error */ +int ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, + struct osmo_ss7_user *user) +{ + if (service_ind >= ARRAY_SIZE(inst->user)) + return -EINVAL; + + if (inst->user[service_ind]) + return -EBUSY; + + DEBUGP(DLSS7, "registering user=%s for SI %u with priv %p\n", + user->name, service_ind, user->priv); + + user->inst = inst; + inst->user[service_ind] = user; + + return 0; +} + +/*! \brief Unregister a MTP user for a given service indicator + * \param[in] inst SS7 instance for which we register the user + * \param[in] service_ind Service (ISUP, SCCP, ...) + * \param[in] user (optional) SS7 user. If present, we will not + * unregister other users + * \returns 0 on success; negative on error */ +int ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, + struct osmo_ss7_user *user) +{ + if (service_ind >= ARRAY_SIZE(inst->user)) + return -EINVAL; + + if (!inst->user[service_ind]) + return -ENODEV; + + if (user && (inst->user[service_ind] != user)) + return -EINVAL; + + if (user) + user->inst = NULL; + inst->user[service_ind] = NULL; + + return 0; +} + +/* deliver to a local MTP user */ +int ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) +{ + uint32_t service_ind; + const struct osmo_ss7_user *osu; + + if (omp->oph.sap != MTP_SAP_USER || + omp->oph.primitive != OSMO_MTP_PRIM_TRANSFER || + omp->oph.operation != PRIM_OP_INDICATION) { + LOGP(DLSS7, LOGL_ERROR, "Unsupported Primitive\n"); + return -EINVAL; + } + + service_ind = omp->u.transfer.sio & 0xF; + osu = inst->user[service_ind]; + + if (!osu) { + LOGP(DLSS7, LOGL_NOTICE, "No MTP-User for SI %u\n", service_ind); + return -ENODEV; + } + + DEBUGP(DLSS7, "delivering MTP-TRANSFER.ind to user %s, priv=%p\n", + osu->name, osu->priv); + return osu->prim_cb(&omp->oph, (void *) osu->priv); +} diff --git a/src/sccp_internal.h b/src/sccp_internal.h index 0367fe1..6f1fdb9 100644 --- a/src/sccp_internal.h +++ b/src/sccp_internal.h @@ -11,6 +11,8 @@ #define SCCP_STR "Signalling Connection Control Part\n" +#include "ss7_user.h" + /* Appendix C.4 of Q.714 */ enum osmo_sccp_timer { /* 0 kept unused on purpose since it's handled specially by osmo_fsm */ diff --git a/src/sccp_user.c b/src/sccp_user.c index 6edbfd1..1ca5f1c 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -250,7 +250,7 @@ return NULL; } - osmo_ss7_user_register(ss7, MTP_SI_SCCP, &inst->ss7_user); + ss7_user_register(ss7, MTP_SI_SCCP, &inst->ss7_user); llist_add_tail(&inst->list, &sccp_instances); @@ -262,7 +262,7 @@ struct osmo_sccp_user *scu, *scu2; inst->ss7->sccp = NULL; - osmo_ss7_user_unregister(inst->ss7, MTP_SI_SCCP, &inst->ss7_user); + ss7_user_unregister(inst->ss7, MTP_SI_SCCP, &inst->ss7_user); llist_for_each_entry_safe(scu, scu2, &inst->users, list) { osmo_sccp_user_unbind(scu); diff --git a/src/ss7_user.h b/src/ss7_user.h new file mode 100644 index 0000000..34d7342 --- /dev/null +++ b/src/ss7_user.h @@ -0,0 +1,34 @@ +#pragma once + +#include <stdint.h> +#include <osmocom/core/prim.h> +#include <osmocom/sigtran/mtp_sap.h> + +/*********************************************************************** + * SS7 Linksets + ***********************************************************************/ + +struct osmo_ss7_instance; + +struct osmo_ss7_user { + /* pointer back to SS7 instance */ + struct osmo_ss7_instance *inst; + /* name of the user */ + const char *name; + /* primitive call-back for incoming MTP primitives */ + osmo_prim_cb prim_cb; + /* private data */ + void *priv; +}; + +int ss7_user_register(struct osmo_ss7_instance *inst, uint8_t service_ind, + struct osmo_ss7_user *user); + +int ss7_user_unregister(struct osmo_ss7_instance *inst, uint8_t service_ind, + struct osmo_ss7_user *user); + +int ss7_mtp_to_user(struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp); + +/* SS7 User wants to issue MTP-TRANSFER.req */ +int osmo_ss7_user_mtp_xfer_req(struct osmo_ss7_instance *inst, + struct osmo_mtp_prim *omp); diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c index 7d4ec5f..6fd21d7 100644 --- a/tests/ss7/ss7_test.c +++ b/tests/ss7/ss7_test.c @@ -2,6 +2,7 @@ #include "../src/ss7_linkset.h" #include "../src/ss7_route.h" #include "../src/ss7_route_table.h" +#include "../src/ss7_user.h" #include "../src/xua_internal.h" #include "../src/xua_asp_fsm.h" @@ -117,25 +118,25 @@ user.prim_cb = test_user_prim_cb; /* registration */ - OSMO_ASSERT(osmo_ss7_user_register(s7i, 1, &user) == 0); - OSMO_ASSERT(osmo_ss7_user_register(s7i, 1, NULL) == -EBUSY); - OSMO_ASSERT(osmo_ss7_user_register(s7i, 255, NULL) == -EINVAL); + OSMO_ASSERT(ss7_user_register(s7i, 1, &user) == 0); + OSMO_ASSERT(ss7_user_register(s7i, 1, NULL) == -EBUSY); + OSMO_ASSERT(ss7_user_register(s7i, 255, NULL) == -EINVAL); /* primitive delivery */ - OSMO_ASSERT(osmo_ss7_mtp_to_user(s7i, &omp) == 23); + OSMO_ASSERT(ss7_mtp_to_user(s7i, &omp) == 23); /* cleanup */ - OSMO_ASSERT(osmo_ss7_user_unregister(s7i, 255, NULL) == -EINVAL); - OSMO_ASSERT(osmo_ss7_user_unregister(s7i, 10, NULL) == -ENODEV); - OSMO_ASSERT(osmo_ss7_user_unregister(s7i, 1, &user2) == -EINVAL); - OSMO_ASSERT(osmo_ss7_user_unregister(s7i, 1, &user) == 0); + OSMO_ASSERT(ss7_user_unregister(s7i, 255, NULL) == -EINVAL); + OSMO_ASSERT(ss7_user_unregister(s7i, 10, NULL) == -ENODEV); + OSMO_ASSERT(ss7_user_unregister(s7i, 1, &user2) == -EINVAL); + OSMO_ASSERT(ss7_user_unregister(s7i, 1, &user) == 0); /* primitive delivery should fail now */ - OSMO_ASSERT(osmo_ss7_mtp_to_user(s7i, &omp) == -ENODEV); + OSMO_ASSERT(ss7_mtp_to_user(s7i, &omp) == -ENODEV); /* wrong primitive delivery should also fail */ omp.oph.primitive = OSMO_MTP_PRIM_PAUSE; - OSMO_ASSERT(osmo_ss7_mtp_to_user(s7i, &omp) == -EINVAL); + OSMO_ASSERT(ss7_mtp_to_user(s7i, &omp) == -EINVAL); } static void test_route(void) -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38640?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I59d8f70aa81ba396159af40ffd7e8cc6c27cb864 Gerrit-Change-Number: 38640 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.