Projects
osmocom:master
libosmo-sigtran
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 20
View file
commit_88274180a42cc640cadc71dcebef5be0ad0f9932.txt
Added
View file
commit_d4e32669ab9f5cc667ed11922abc293d0a17d2bf.txt
Deleted
View file
libosmo-sigtran_2.0.0.40.d4e32.dsc -> libosmo-sigtran_2.0.0.41.8827.dsc
Changed
@@ -2,7 +2,7 @@ Source: libosmo-sigtran Binary: libosmo-sigtran10, libosmo-sigtran-dbg, libosmo-sigtran-doc, libosmo-sigtran-dev, osmo-stp, osmo-stp-dbg, osmo-stp-doc Architecture: any all -Version: 2.0.0.40.d4e32 +Version: 2.0.0.41.8827 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmo-sccp Standards-Version: 3.9.7 @@ -18,8 +18,8 @@ osmo-stp-dbg deb debug optional arch=any osmo-stp-doc deb doc optional arch=all Checksums-Sha1: - 9059b891eba9fe764bf6e072fe035b6ec1ce0651 230072 libosmo-sigtran_2.0.0.40.d4e32.tar.xz + f30dbc07e834242e203c2eb582919e76d5e96982 230228 libosmo-sigtran_2.0.0.41.8827.tar.xz Checksums-Sha256: - 7a21110bb0dda01053ee4c86a175fd84f3f1273c3e335af30dac8fdb558fbcb0 230072 libosmo-sigtran_2.0.0.40.d4e32.tar.xz + c43f8b6fca9249c5b7ecf8b9080e9c797d079dcf1313ee02202c60726ebbbfad 230228 libosmo-sigtran_2.0.0.41.8827.tar.xz Files: - 72861eefc23470daec9afe28b9a000a4 230072 libosmo-sigtran_2.0.0.40.d4e32.tar.xz + 256c89c6282ea8d579c67ebf3066300e 230228 libosmo-sigtran_2.0.0.41.8827.tar.xz
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/.tarball-version -> libosmo-sigtran_2.0.0.41.8827.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.0.0.40-d4e32 +2.0.0.41-8827
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/TODO-RELEASE -> libosmo-sigtran_2.0.0.41.8827.tar.xz/TODO-RELEASE
Changed
@@ -13,4 +13,4 @@ libosmo-sigtran Make private osmo_ss7_route libosmo-sigtran add API osmo_ss7_instance_get_id(), osmo_ss7_instance_get_name(), osmo_ss7_instance_get_pc_fmt(), osmo_ss7_instance_get_primary_pc(), osmo_ss7_get_sccp() libosmo-sigtran add API osmo_ss7_instances_llist_entry() -libosmo-sigtran add API osmo_ss7_as_get_asp_protocol() +libosmo-sigtran add API osmo_ss7_as_get_asp_protocol(), osmo_ss7_as_select_asp()
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/debian/changelog -> libosmo-sigtran_2.0.0.41.8827.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -libosmo-sigtran (2.0.0.40.d4e32) unstable; urgency=medium +libosmo-sigtran (2.0.0.41.8827) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Mon, 11 Nov 2024 17:47:49 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Tue, 12 Nov 2024 12:57:58 +0000 libosmo-sigtran (2.0.0) unstable; urgency=medium
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/include/osmocom/sigtran/osmo_ss7.h -> libosmo-sigtran_2.0.0.41.8827.tar.xz/include/osmocom/sigtran/osmo_ss7.h
Changed
@@ -274,6 +274,7 @@ void osmo_ss7_as_destroy(struct osmo_ss7_as *as); bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp); +struct osmo_ss7_asp *osmo_ss7_as_select_asp(struct osmo_ss7_as *as); bool osmo_ss7_as_down(const struct osmo_ss7_as *as); bool osmo_ss7_as_active(const struct osmo_ss7_as *as); bool osmo_ss7_as_tmode_compatible_xua(struct osmo_ss7_as *as, uint32_t m3ua_tmt);
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/src/osmo_ss7_as.c -> libosmo-sigtran_2.0.0.41.8827.tar.xz/src/osmo_ss7_as.c
Changed
@@ -222,3 +222,88 @@ return true; return as->fi->state == XUA_AS_S_DOWN; } + +static struct osmo_ss7_asp *ss7_as_select_asp_override(struct osmo_ss7_as *as) +{ + struct osmo_ss7_asp *asp; + unsigned int i; + + /* FIXME: proper selection of the ASP based on the SLS! */ + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + asp = as->cfg.aspsi; + if (asp && osmo_ss7_asp_active(asp)) + break; + } + return asp; +} + +static struct osmo_ss7_asp *ss7_as_select_asp_roundrobin(struct osmo_ss7_as *as) +{ + struct osmo_ss7_asp *asp; + unsigned int i; + unsigned int first_idx; + + first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps); + i = first_idx; + do { + asp = as->cfg.aspsi; + if (asp && osmo_ss7_asp_active(asp)) + break; + i = (i + 1) % ARRAY_SIZE(as->cfg.asps); + } while (i != first_idx); + as->cfg.last_asp_idx_sent = i; + + return asp; +} + +/* returns NULL if multiple ASPs would need to be selected. */ +static struct osmo_ss7_asp *ss7_as_select_asp_broadcast(struct osmo_ss7_as *as) +{ + struct osmo_ss7_asp *asp; + struct osmo_ss7_asp *asp_found = NULL; + + for (unsigned int i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + asp = as->cfg.aspsi; + if (!asp || !osmo_ss7_asp_active(asp)) + continue; + if (asp_found) /* >1 ASPs selected, early return */ + return NULL; + asp_found = asp; + } + return asp_found; +} + +/*! Select an AS to transmit a message, according to AS configuration and ASP availability. + * \paramin as Application Server. + * \returns asp to send the message to, NULL if no possible asp found + * + * This function returns NULL too if multiple ASPs would be selected, ie. AS is + * configured in broadcast mode and more than one ASP is configured. + */ +struct osmo_ss7_asp *osmo_ss7_as_select_asp(struct osmo_ss7_as *as) +{ + struct osmo_ss7_asp *asp = NULL; + + switch (as->cfg.mode) { + case OSMO_SS7_AS_TMOD_OVERRIDE: + asp = ss7_as_select_asp_override(as); + break; + case OSMO_SS7_AS_TMOD_LOADSHARE: + /* TODO: actually use the SLS value to ensure same SLS goes + * through same ASP. Not strictly required by M3UA RFC, but + * would fit the overall principle. */ + case OSMO_SS7_AS_TMOD_ROUNDROBIN: + asp = ss7_as_select_asp_roundrobin(as); + break; + case OSMO_SS7_AS_TMOD_BCAST: + return ss7_as_select_asp_broadcast(as); + case _NUM_OSMO_SS7_ASP_TMOD: + OSMO_ASSERT(false); + } + + if (!asp) { + LOGPFSM(as->fi, "No selectable ASP in AS\n"); + return NULL; + } + return asp; +}
View file
libosmo-sigtran_2.0.0.40.d4e32.tar.xz/src/xua_as_fsm.c -> libosmo-sigtran_2.0.0.41.8827.tar.xz/src/xua_as_fsm.c
Changed
@@ -97,39 +97,6 @@ return -1; } -static struct osmo_ss7_asp *xua_as_select_asp_override(struct osmo_ss7_as *as) -{ - struct osmo_ss7_asp *asp; - unsigned int i; - - /* FIXME: proper selection of the ASP based on the SLS! */ - for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { - asp = as->cfg.aspsi; - if (asp && osmo_ss7_asp_active(asp)) - break; - } - return asp; -} - -static struct osmo_ss7_asp *xua_as_select_asp_roundrobin(struct osmo_ss7_as *as) -{ - struct osmo_ss7_asp *asp; - unsigned int i; - unsigned int first_idx; - - first_idx = (as->cfg.last_asp_idx_sent + 1) % ARRAY_SIZE(as->cfg.asps); - i = first_idx; - do { - asp = as->cfg.aspsi; - if (asp && osmo_ss7_asp_active(asp)) - break; - i = (i + 1) % ARRAY_SIZE(as->cfg.asps); - } while (i != first_idx); - as->cfg.last_asp_idx_sent = i; - - return asp; -} - int xua_as_transmit_msg_broadcast(struct osmo_ss7_as *as, struct msgb *msg) { struct osmo_ss7_asp *asp; @@ -157,13 +124,12 @@ switch (as->cfg.mode) { case OSMO_SS7_AS_TMOD_OVERRIDE: - asp = xua_as_select_asp_override(as); - break; case OSMO_SS7_AS_TMOD_LOADSHARE: - /* TODO: actually use the SLS value to ensure same SLS goes through same ASP. Not - * strictly required by M3UA RFC, but would fit the overall principle. */ + /* TODO: OSMO_SS7_AS_TMOD_LOADSHARE: actually use the SLS value + * to ensure same SLS goes through same ASP. Not strictly + * required by M3UA RFC, but would fit the overall principle. */ case OSMO_SS7_AS_TMOD_ROUNDROBIN: - asp = xua_as_select_asp_roundrobin(as); + asp = osmo_ss7_as_select_asp(as); break; case OSMO_SS7_AS_TMOD_BCAST: return xua_as_transmit_msg_broadcast(as, msg);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.