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
[XS] Change in osmo-bsc[master]: bsc_ctrl: Use new libosmo-sigtran API osmo_ss7_route_get_dest_as()
by pespin 04 Nov '24

04 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38628?usp=email ) Change subject: bsc_ctrl: Use new libosmo-sigtran API osmo_ss7_route_get_dest_as() ...................................................................... bsc_ctrl: Use new libosmo-sigtran API osmo_ss7_route_get_dest_as() Use this new API instead of accessing the route struct directly. Depends: libosmo-sigtran.git Change-Id Ife63bd384d247a761e0b89505ea71c41a4a16d9b Change-Id: I198351fba4cfeba310b397c964e5306cd73189ba --- M TODO-RELEASE M src/osmo-bsc/bsc_ctrl.c 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/28/38628/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 0ed7189..c073b60 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-sigtran >2.0.1 Use API osmo_ss7_route_get_dest_as() \ No newline at end of file diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c index aff1d83..5cc8d90 100644 --- a/src/osmo-bsc/bsc_ctrl.c +++ b/src/osmo-bsc/bsc_ctrl.c @@ -632,11 +632,15 @@ static struct osmo_ss7_as *msc_get_ss7_as(struct bsc_msc_data *msc) { struct osmo_ss7_route *rt; + struct osmo_ss7_as *as; struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(msc->a.sccp); rt = osmo_ss7_route_lookup(ss7, msc->a.msc_addr.pc); if (!rt) return NULL; - return rt->dest.as; + as = osmo_ss7_route_get_dest_as(rt); + if (!as) + return NULL; + return as; } static int _ss7_as_send(struct osmo_ss7_as *as, struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38628?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I198351fba4cfeba310b397c964e5306cd73189ba Gerrit-Change-Number: 38628 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: sigtran: Add API osmo_ss7_route_get_dest_as()
by pespin 04 Nov '24

04 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38627?usp=email ) Change subject: sigtran: Add API osmo_ss7_route_get_dest_as() ...................................................................... sigtran: Add API osmo_ss7_route_get_dest_as() This is needed by users willing to get the AS from a routing entry, i.e. osmo-bsc needs to access this information in order to inject MGCP into the IPA multiplex conn transporting the SCCPLite signalling. Change-Id: Ife63bd384d247a761e0b89505ea71c41a4a16d9b --- M TODO-RELEASE M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 3 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/27/38627/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 6d8cb80..06d4f53 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line libosmo-sigtran API change struct osmo_ss7_instance has new member 'secondary_pc' libosmo-sigtran add API osmo_sccp_{release,return,reset,error,refusal}_cause_name(s), osmo_sua_sccp_cause_name +libosmo-sigtran add API osmo_ss7_route_get_dest_as() \ No newline at end of file diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index d009958..3b5aa4f 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -214,7 +214,8 @@ void osmo_ss7_route_destroy(struct osmo_ss7_route *rt); const char *osmo_ss7_route_print(const struct osmo_ss7_route *rt); const char *osmo_ss7_route_name(struct osmo_ss7_route *rt, bool list_asps); - +struct osmo_ss7_as * +osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt); /*********************************************************************** * SS7 Application Servers diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 38b07da..95e58a7 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -882,6 +882,15 @@ return buf; } +/*! \brief Get destination AS of route + * \param[in] rt Route entry holding the AS destination + * \returns pointer to Application Server on success; NULL if rt doesn't route + * to an AS (i.e. routes to a linkset). */ +struct osmo_ss7_as * +osmo_ss7_route_get_dest_as(struct osmo_ss7_route *rt) +{ + return rt->dest.as; +} /*********************************************************************** * SS7 Application Server -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38627?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: Ife63bd384d247a761e0b89505ea71c41a4a16d9b Gerrit-Change-Number: 38627 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bts[master]: csd_v110_rtp_decode: preserve E2 & E3 bits for RLP alignment
by falconia 04 Nov '24

04 Nov '24
Attention is currently required from: pespin. falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bts/+/38556?usp=email ) Change subject: csd_v110_rtp_decode: preserve E2 & E3 bits for RLP alignment ...................................................................... Patch Set 4: (1 comment) File src/common/csd_v110.c: https://gerrit.osmocom.org/c/osmo-bts/+/38556/comment/02b56739_b6496f2c?usp… : PS2, Line 213: align_accum <<= 2; > Correct. 4 is the greatest possible number of V.110 frames per 20 ms clearmode packet of TS 48. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38556?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I43b97caa6030b9401779998ca5dddc4cfe636e2f Gerrit-Change-Number: 38556 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 04 Nov 2024 21:44:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-bts[master]: CSD: implement half-rate modes correctly
by falconia 04 Nov '24

04 Nov '24
Attention is currently required from: fixeria. falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bts/+/38553?usp=email ) Change subject: CSD: implement half-rate modes correctly ...................................................................... Patch Set 4: (4 comments) Commit Message: https://gerrit.osmocom.org/c/osmo-bts/+/38553/comment/597d5469_e6fc369b?usp… : PS2, Line 26: by emitting two RTP packets : directly back-to-back for UL, and pulling two RTP packets at a time : from the Rx jitter buffer at the needed times for DL. > You are correct: if we were implementing a new E1 BTS, there would be no other way to handle the pre […] Done File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/38553/comment/cc0083bb_90ec06f7?usp… : PS2, Line 1493: /* TDMA frame number of burst 'a' % 26 is the table index. > I agree with Mychaela here. It's a well known constant that is used quite often here and there. Done https://gerrit.osmocom.org/c/osmo-bts/+/38553/comment/f165ebd3_682357c9?usp… : PS2, Line 1523: if (!sched_tchh_dl_csd_map[fn % 26]) > Again, I don't just have the number 26 randomly floating around in the code. […] Done https://gerrit.osmocom.org/c/osmo-bts/+/38553/comment/2366f794_08a3e6c8?usp… : PS2, Line 2045: * back-to-back every 40 ms on the same frame number, */ > If you read my comment carefully, you'll see that I don't say anything about sending packets "with" […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38553?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib35e910df263743cd243f51fb0bd6551ddfcf4c5 Gerrit-Change-Number: 38553 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 04 Nov 2024 21:43:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in libosmo-sigtran[master]: sigtran: Make osmo_ss7_route_table APIs private
by pespin 04 Nov '24

04 Nov '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?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_table APIs private ...................................................................... sigtran: Make osmo_ss7_route_table APIs private The routing table is actually handled internally through VTY and no user is making use of it. Make it private, to ease extension in the future (it will be extended to eg. support combined link load sharing). Change-Id: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a --- 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_table.c M src/osmo_ss7_vty.c M src/sccp_user.c A src/ss7_route_table.h M src/xua_as_fsm.c M src/xua_rkm.c M tests/ss7/ss7_test.c 12 files changed, 188 insertions(+), 142 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/26/38626/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?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: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a Gerrit-Change-Number: 38626 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in libosmo-sigtran[master]: sigtran: xua_msg.h,msg_types.h: Make headers private
by pespin 04 Nov '24

04 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/+/38625?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: sigtran: xua_msg.h,msg_types.h: Make headers private ...................................................................... sigtran: xua_msg.h,msg_types.h: Make headers private Those headers are only used internally in libosmo-sigtran, since those objects have no real use outside of it. Mark the headers as no-install, which implicitly makes them private. Only API osmo_xua_msg_tall_ctx_init() is used by osmo-bsc, hence why it's left in the existing public header. This decreases the amount of public APIs the libosmo-sigtran has. Change-Id: Icd23bf9c9364c33ea2ba709e3ef4439813a168f4 --- M include/osmocom/sigtran/Makefile.am M include/osmocom/sigtran/xua_msg.h M src/Makefile.am M src/ipa.c M src/m3ua.c M src/sccp2sua.c M src/sua.c M src/xua_as_fsm.c M src/xua_asp_fsm.c M src/xua_internal.h M src/xua_msg.c A src/xua_msg.h M src/xua_rkm.c M src/xua_shared.c R src/xua_types.h M tests/m2ua/m2ua_test.c M tests/xua/xua_test.c 17 files changed, 131 insertions(+), 103 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/25/38625/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38625?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: Icd23bf9c9364c33ea2ba709e3ef4439813a168f4 Gerrit-Change-Number: 38625 Gerrit-PatchSet: 4 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 osmo-bts[master]: CSD: implement half-rate modes correctly
by pespin 04 Nov '24

04 Nov '24
Attention is currently required from: falconia. pespin has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bts/+/38553?usp=email ) Change subject: CSD: implement half-rate modes correctly ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38553?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib35e910df263743cd243f51fb0bd6551ddfcf4c5 Gerrit-Change-Number: 38553 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 04 Nov 2024 19:57:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in libosmo-sigtran[master]: Make osmo_ss7_route_table APIs private
by pespin 04 Nov '24

04 Nov '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?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: Make osmo_ss7_route_table APIs private ...................................................................... Make osmo_ss7_route_table APIs private The routing table is actually handled internally through VTY and no user is making use of it. Make it private, to ease extension in the future (it will be extended to eg. support combined link load sharing). Change-Id: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a --- 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_table.c M src/osmo_ss7_vty.c M src/sccp_user.c A src/ss7_route_table.h M src/xua_as_fsm.c M src/xua_rkm.c M tests/ss7/ss7_test.c 12 files changed, 188 insertions(+), 142 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/26/38626/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?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: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a Gerrit-Change-Number: 38626 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in libosmo-sigtran[master]: Make osmo_ss7_route_table APIs private
by pespin 04 Nov '24

04 Nov '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?usp=email ) Change subject: Make osmo_ss7_route_table APIs private ...................................................................... Make osmo_ss7_route_table APIs private The routing table is actually handled internally through VTY and no user is making use of it. Make it private, to ease extension in the future (it will be extended to eg. support combined link load sharing). Change-Id: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a --- 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_table.c M src/osmo_ss7_vty.c A src/ss7_route_table.h M tests/ss7/ss7_test.c 9 files changed, 115 insertions(+), 74 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/26/38626/1 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 049c7d8..1fb4cfc 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -18,6 +18,7 @@ struct osmo_sccp_instance; struct osmo_mtp_prim; struct osmo_xua_layer_manager; +struct osmo_ss7_route_table; int osmo_ss7_init(void); int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst); @@ -38,30 +39,6 @@ } /*********************************************************************** - * SS7 Routing Tables - ***********************************************************************/ - -struct osmo_ss7_route_table { - /*! member in list of routing tables */ - struct llist_head list; - /*! \ref osmo_ss7_instance to which we belong */ - struct osmo_ss7_instance *inst; - /*! list of \ref osmo_ss7_route */ - struct llist_head routes; - - struct { - char *name; - char *description; - } cfg; -}; - -struct osmo_ss7_route_table * -osmo_ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name); -struct osmo_ss7_route_table * -osmo_ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name); -void osmo_ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl); - -/*********************************************************************** * SS7 Instances ***********************************************************************/ diff --git a/src/Makefile.am b/src/Makefile.am index 2a257ae..5dddb05 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,6 +5,7 @@ noinst_HEADERS = \ sccp_internal.h \ ss7_internal.h \ + ss7_route_table.h \ xua_asp_fsm.h \ xua_as_fsm.h \ xua_internal.h \ @@ -37,6 +38,7 @@ osmo_ss7_hmrt.c \ osmo_ss7_vty.c \ osmo_ss7_xua_srv.c \ + osmo_ss7_route_table.c \ sccp2sua.c \ sccp_helpers.c \ sccp_lbcs.c \ diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 93bcfc2..1a19e2a 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -51,6 +51,7 @@ #include "sccp_internal.h" #include "xua_internal.h" #include "ss7_internal.h" +#include "ss7_route_table.h" #include "xua_asp_fsm.h" #include "xua_as_fsm.h" @@ -342,7 +343,7 @@ INIT_LLIST_HEAD(&inst->asp_list); INIT_LLIST_HEAD(&inst->rtable_list); INIT_LLIST_HEAD(&inst->xua_servers); - inst->rtable_system = osmo_ss7_route_table_find_or_create(inst, "system"); + inst->rtable_system = ss7_route_table_find_or_create(inst, "system"); /* default point code structure + formatting */ inst->cfg.pc_fmt.delimiter = '.'; @@ -610,49 +611,6 @@ return link; } - -/*********************************************************************** - * SS7 Route Tables - ***********************************************************************/ - -struct osmo_ss7_route_table * -osmo_ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name) -{ - struct osmo_ss7_route_table *rtbl; - OSMO_ASSERT(ss7_initialized); - llist_for_each_entry(rtbl, &inst->rtable_list, list) { - if (!strcmp(rtbl->cfg.name, name)) - return rtbl; - } - return NULL; -} - -struct osmo_ss7_route_table * -osmo_ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name) -{ - struct osmo_ss7_route_table *rtbl; - - OSMO_ASSERT(ss7_initialized); - rtbl = osmo_ss7_route_table_find(inst, name); - if (!rtbl) { - LOGSS7(inst, LOGL_INFO, "Creating Route Table %s\n", name); - rtbl = talloc_zero(inst, struct osmo_ss7_route_table); - rtbl->inst = inst; - rtbl->cfg.name = talloc_strdup(rtbl, name); - INIT_LLIST_HEAD(&rtbl->routes); - llist_add_tail(&rtbl->list, &inst->rtable_list); - } - return rtbl; -} - -void osmo_ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl) -{ - llist_del(&rtbl->list); - /* routes are allocated as children of route table, will be - * automatically freed() */ - talloc_free(rtbl); -} - /*********************************************************************** * SS7 Routes ***********************************************************************/ diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c index 9683e94..87e7e04 100644 --- a/src/osmo_ss7_as.c +++ b/src/osmo_ss7_as.c @@ -33,6 +33,7 @@ #include <osmocom/core/talloc.h> #include <osmocom/core/logging.h> +#include "ss7_route_table.h" #include "ss7_internal.h" #include "xua_as_fsm.h" #include "xua_asp_fsm.h" diff --git a/src/osmo_ss7_hmrt.c b/src/osmo_ss7_hmrt.c index 3ac43b8..57d7388 100644 --- a/src/osmo_ss7_hmrt.c +++ b/src/osmo_ss7_hmrt.c @@ -35,6 +35,7 @@ #include <osmocom/sigtran/protocol/m3ua.h> #include "xua_internal.h" +#include "ss7_route_table.h" #include "ss7_internal.h" /* convert from M3UA message to MTP-TRANSFER.ind osmo_mtp_prim */ diff --git a/src/osmo_ss7_route_table.c b/src/osmo_ss7_route_table.c new file mode 100644 index 0000000..311f13f --- /dev/null +++ b/src/osmo_ss7_route_table.c @@ -0,0 +1,71 @@ +/* (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 <osmocom/core/linuxlist.h> +#include <osmocom/core/logging.h> +#include <osmocom/sigtran/mtp_sap.h> +#include <osmocom/sigtran/osmo_ss7.h> + +#include "ss7_route_table.h" +#include "ss7_internal.h" + +/*********************************************************************** + * SS7 Route Tables + ***********************************************************************/ + +struct osmo_ss7_route_table * +ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name) +{ + struct osmo_ss7_route_table *rtbl; + OSMO_ASSERT(ss7_initialized); + llist_for_each_entry(rtbl, &inst->rtable_list, list) { + if (!strcmp(rtbl->cfg.name, name)) + return rtbl; + } + return NULL; +} + +struct osmo_ss7_route_table * +ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name) +{ + struct osmo_ss7_route_table *rtbl; + + OSMO_ASSERT(ss7_initialized); + rtbl = ss7_route_table_find(inst, name); + if (!rtbl) { + LOGSS7(inst, LOGL_INFO, "Creating Route Table %s\n", name); + rtbl = talloc_zero(inst, struct osmo_ss7_route_table); + rtbl->inst = inst; + rtbl->cfg.name = talloc_strdup(rtbl, name); + INIT_LLIST_HEAD(&rtbl->routes); + llist_add_tail(&rtbl->list, &inst->rtable_list); + } + return rtbl; +} + +void +ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl) +{ + llist_del(&rtbl->list); + /* routes are allocated as children of route table, will be + * automatically freed() */ + talloc_free(rtbl); +} diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index e3142c7..7c93039 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -46,6 +46,7 @@ #include "xua_internal.h" #include <osmocom/sigtran/sccp_sap.h> #include "sccp_internal.h" +#include "ss7_route_table.h" #include "ss7_internal.h" #include <netinet/tcp.h> diff --git a/src/ss7_route_table.h b/src/ss7_route_table.h new file mode 100644 index 0000000..25f0266 --- /dev/null +++ b/src/ss7_route_table.h @@ -0,0 +1,29 @@ +#pragma once + +#include <osmocom/core/linuxlist.h> + +/*********************************************************************** + * SS7 Routing Tables + ***********************************************************************/ + +struct osmo_ss7_instance; + +struct osmo_ss7_route_table { + /*! member in list of routing tables */ + struct llist_head list; + /*! \ref osmo_ss7_instance to which we belong */ + struct osmo_ss7_instance *inst; + /*! list of \ref osmo_ss7_route */ + struct llist_head routes; + + struct { + char *name; + char *description; + } cfg; +}; + +struct osmo_ss7_route_table * +ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name); +struct osmo_ss7_route_table * +ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name); +void ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl); diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c index ad8dc77..54a8e62 100644 --- a/tests/ss7/ss7_test.c +++ b/tests/ss7/ss7_test.c @@ -1,3 +1,4 @@ +#include "../src/ss7_route_table.h" #include "../src/xua_internal.h" #include "../src/xua_asp_fsm.h" @@ -143,15 +144,15 @@ printf("Testing SS7 routing\n"); /* creation / destruction */ - OSMO_ASSERT(osmo_ss7_route_table_find(s7i, "foobar") == NULL); - rtbl = osmo_ss7_route_table_find_or_create(s7i, "foobar"); + OSMO_ASSERT(ss7_route_table_find(s7i, "foobar") == NULL); + rtbl = ss7_route_table_find_or_create(s7i, "foobar"); OSMO_ASSERT(rtbl); - OSMO_ASSERT(osmo_ss7_route_table_find_or_create(s7i, "foobar") == rtbl); - osmo_ss7_route_table_destroy(rtbl); - OSMO_ASSERT(osmo_ss7_route_table_find(s7i, "foobar") == NULL); + OSMO_ASSERT(ss7_route_table_find_or_create(s7i, "foobar") == rtbl); + ss7_route_table_destroy(rtbl); + OSMO_ASSERT(ss7_route_table_find(s7i, "foobar") == NULL); /* we now work with system route table */ - rtbl = osmo_ss7_route_table_find(s7i, "system"); + rtbl = ss7_route_table_find(s7i, "system"); OSMO_ASSERT(rtbl && rtbl == s7i->rtable_system); lset_a = osmo_ss7_linkset_find_or_create(s7i, "a", 100); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38626?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: Ie7c709c9849ef3d50aef94f79751c9c4a010c92a Gerrit-Change-Number: 38626 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: sigtran: xua_msg.h,msg_types.h: Make headers private
by pespin 04 Nov '24

04 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/+/38625?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: xua_msg.h,msg_types.h: Make headers private ...................................................................... sigtran: xua_msg.h,msg_types.h: Make headers private Those headers are only used internally in libosmo-sigtran, since those objects have no real use outside of it. Mark the headers as no-install, which implicitly makes them private. This decreases the amount of public APIs the libosmo-sigtran has. Change-Id: Icd23bf9c9364c33ea2ba709e3ef4439813a168f4 --- M include/osmocom/sigtran/Makefile.am M src/Makefile.am M src/ipa.c M src/m3ua.c M src/sccp2sua.c M src/sua.c M src/xua_as_fsm.c M src/xua_asp_fsm.c M src/xua_internal.h M src/xua_msg.c R src/xua_msg.h M src/xua_rkm.c M src/xua_shared.c R src/xua_types.h M tests/m2ua/m2ua_test.c M tests/xua/xua_test.c 16 files changed, 21 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/25/38625/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/38625?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: Icd23bf9c9364c33ea2ba709e3ef4439813a168f4 Gerrit-Change-Number: 38625 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.