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

January 2022

  • 3 participants
  • 781 discussions
Change in osmo-e1d[master]: e1_{intf,line}_new: Allow caller to specify the numeric identifier
by pespin 31 Jan '22

31 Jan '22
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27015 ) Change subject: e1_{intf,line}_new: Allow caller to specify the numeric identifier ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I9ff80831a3e3e3cb6dae178f8b438a9f3f4747df Gerrit-Change-Number: 27015 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 31 Jan 2022 16:34:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-e1d[master]: e1_{intf,line}_new: Allow caller to specify the numeric identifier
by pespin 31 Jan '22

31 Jan '22
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27015 ) Change subject: e1_{intf,line}_new: Allow caller to specify the numeric identifier ...................................................................... Patch Set 1: (2 comments) File src/intf_line.c: https://gerrit.osmocom.org/c/osmo-e1d/+/27015/comment/409bd313_ba9e7523 PS1, Line 119: return NULL; probably some error message here would be informative. https://gerrit.osmocom.org/c/osmo-e1d/+/27015/comment/e1188850_822ecf57 PS1, Line 202: return NULL; same -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27015 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I9ff80831a3e3e3cb6dae178f8b438a9f3f4747df Gerrit-Change-Number: 27015 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 31 Jan 2022 16:34:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-iuh[master]: ranap_common_cn: add functions for direct access to decoder
by pespin 31 Jan '22

31 Jan '22
Attention is currently required from: neels, daniel, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/27002 ) Change subject: ranap_common_cn: add functions for direct access to decoder ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/27002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I14d2ed8e597a5d12024a6a6c72ff011dbeb2549d Gerrit-Change-Number: 27002 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 31 Jan 2022 16:30:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc-nat[master]: bsc_nat_fsm: initial msc <> bsc msg forwarding
by osmith 31 Jan '22

31 Jan '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030 ) Change subject: bsc_nat_fsm: initial msc <> bsc msg forwarding ...................................................................... bsc_nat_fsm: initial msc <> bsc msg forwarding Add an initial implementation of sccp_sap_up, that assumes one BSC and one MSC, and successfully forwards RESET and RESET ACK between both. Related: SYS#5560 Depends: libosmo-sccp I0f38b0d038b0dd8cd355e7284e5b56d438811bd9 Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd --- M doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg M src/osmo-bsc-nat/bsc_nat_fsm.c 2 files changed, 117 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/30/27030/1 diff --git a/doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg b/doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg index c3c5825..f56dcb0 100644 --- a/doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg +++ b/doc/examples/osmo-bsc-nat/osmo-bsc-nat.cfg @@ -3,12 +3,20 @@ asp asp-clnt-OsmoBSCNAT-CN 2905 0 m3ua remote-ip 127.0.0.1 local-ip 127.0.0.3 + sccp-address msc + routing-indicator PC + point-code 0.23.1 + subsystem-number 254 cs7 instance 1 point-code 0.23.1 asp asp-clnt-OsmoBSCNAT-RAN 2905 0 m3ua remote-ip 127.0.0.2 local-ip 127.0.0.4 + sccp-address bsc + routing-indicator PC + point-code 0.23.3 + subsystem-number 254 bsc-nat cs7-instance-cn 0 diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c index a0903f4..0682e14 100644 --- a/src/osmo-bsc-nat/bsc_nat_fsm.c +++ b/src/osmo-bsc-nat/bsc_nat_fsm.c @@ -25,7 +25,10 @@ #include <osmocom/core/fsm.h> #include <osmocom/core/select.h> +#include <osmocom/gsm/gsm0808.h> + #include <osmocom/sigtran/osmo_ss7.h> +#include <osmocom/sigtran/sccp_helpers.h> #include <osmocom/bsc_nat/bsc_nat.h> #include <osmocom/bsc_nat/bsc_nat_fsm.h> @@ -34,6 +37,18 @@ #define DEFAULT_PC_RAN "0.23.1" /* same as default for OsmoMSC */ #define DEFAULT_PC_CN "0.23.3" /* same as default for OsmoBSC */ +static char log_buf[255]; + +#define LOG_SCCP(ss7_inst, peer_addr, level, fmt, args...) do { \ + if (peer_addr) \ + osmo_sccp_addr_to_str_buf(log_buf, sizeof(log_buf), NULL, peer_addr); \ + LOGP(DMAIN, level, "(%s%s%s) " fmt, \ + peer_addr ? log_buf : "", \ + peer_addr ? " from " : "", \ + ss7_inst == g_bsc_nat->ran ? "RAN" : "CN", \ + ## args); \ +} while (0) + #define X(s) (1 << (s)) enum bsc_nat_fsm_states { @@ -47,11 +62,102 @@ BSC_NAT_FSM_EV_STOP, }; -static int sccp_sap_up(struct osmo_prim_hdr *oph, void *priv) +static struct bsc_nat_ss7_inst *ss7_inst_dest(struct bsc_nat_ss7_inst *src) { - LOGP(DMAIN, LOGL_NOTICE, "STUB: sccp_sap_up() called\n"); + if (src == g_bsc_nat->cn) + return g_bsc_nat->ran; + return g_bsc_nat->cn; +} - return 0; +static int sccp_sap_up(struct osmo_prim_hdr *oph, void *scu) +{ + struct bsc_nat_ss7_inst *src = osmo_sccp_user_get_priv(scu); + struct bsc_nat_ss7_inst *dest = ss7_inst_dest(src); + struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph; + struct osmo_sccp_addr *my_addr; + struct osmo_sccp_addr *peer_addr; + struct msgb *msg = NULL; + char buf[255]; + int rc = -1; + + switch (OSMO_PRIM_HDR(oph)) { + case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_INDICATION): + /* indication of new inbound connection request */ + peer_addr = &prim->u.connect.calling_addr; + LOG_SCCP(src, peer_addr, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph)); + break; + + case OSMO_PRIM(OSMO_SCU_PRIM_N_DATA, PRIM_OP_INDICATION): + /* connection-oriented data received */ + LOG_SCCP(src, NULL, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph)); + break; + + case OSMO_PRIM(OSMO_SCU_PRIM_N_DISCONNECT, PRIM_OP_INDICATION): + /* indication of disconnect */ + LOG_SCCP(src, NULL, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph)); + break; + + case OSMO_PRIM(OSMO_SCU_PRIM_N_UNITDATA, PRIM_OP_INDICATION): + /* connection-less data received */ + my_addr = &prim->u.unitdata.called_addr; + peer_addr = &prim->u.unitdata.calling_addr; + LOG_SCCP(src, peer_addr, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph)); + + if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, my_addr)) { + osmo_sccp_addr_to_str_buf(buf, sizeof(buf), NULL, my_addr); + LOG_SCCP(src, peer_addr, LOGL_ERROR, "Called address %s is not the locally configured" + " address %s\n", buf, osmo_sccp_inst_addr_name(NULL, &src->local_sccp_addr)); + goto error; + } + + /* Figure out called party in dest. TODO: build and use a + * mapping of peer_addr + conn_id <--> dest_ss7. For now, this + * is simplified by assuming there is only one MSC, one BSC. */ + + struct osmo_ss7_instance *dest_ss7; + struct osmo_sccp_addr dest_called; + + dest_ss7 = osmo_ss7_instance_find(dest->ss7_id); + OSMO_ASSERT(dest_ss7); + + if (src == g_bsc_nat->ran) { + if (osmo_sccp_addr_by_name_local(&dest_called, "msc", dest_ss7) < 0) { + LOG_SCCP(src, peer_addr, LOGL_ERROR, "Could not find MSC in address book\n"); + goto error; + } + } else { + if (osmo_sccp_addr_by_name_local(&dest_called, "bsc", dest_ss7) < 0) { + LOG_SCCP(src, peer_addr, LOGL_ERROR, "Could not find BSC in address book\n"); + goto error; + } + } + + LOG_SCCP(src, peer_addr, LOGL_NOTICE, "Forwarding to %s in %s\n", + osmo_sccp_inst_addr_name(NULL, &dest_called), + dest == g_bsc_nat->ran ? "RAN" : "CN"); + + msg = msgb_copy(oph->msg, NULL); + OSMO_ASSERT(msg); + talloc_set_name(msg, "bssmap copy: %s", talloc_get_name(oph->msg)); + msg->l3h = msg->l2h; + msgb_pull_to_l3(msg); + osmo_sccp_tx_unitdata_msg(dest->scu, &dest->local_sccp_addr, &dest_called, msg); + + rc = 0; + break; + + default: + LOG_SCCP(src, NULL, LOGL_DEBUG, "%s(%s)\n", __func__, osmo_scu_prim_name(oph)); + break; + } + + msgb_free(oph->msg); + return rc; + +error: + msgb_free(msg); + msgb_free(oph->msg); + return rc; } static int ss7_inst_init(struct bsc_nat_ss7_inst *inst, const char *name, const char *default_pc_str, -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc-nat Gerrit-Branch: master Gerrit-Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd Gerrit-Change-Number: 27030 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc-nat[master]: vty: use osmo_ss7_vty_go_parent
by osmith 31 Jan '22

31 Jan '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27028 ) Change subject: vty: use osmo_ss7_vty_go_parent ...................................................................... vty: use osmo_ss7_vty_go_parent Remove unnecessary bsc_nat_vty_go_parent function, and use osmo_ss7_vty_go_parent instead. Without the latter, it segfaults while attempting to parse a config segment like this: cs7 instance 0 point-code 0.23.3 asp asp-clnt-OsmoBSCNAT-CN 2905 0 m3ua remote-ip 127.0.0.1 local-ip 127.0.0.3 sccp-address msc # segfault here, vty->index == NULL routing-indicator PC point-code 0.23.1 Related: SYS#5560 Related: https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26659/comment/c99b8cca_865449aa/ Change-Id: Iee6ece062f11694acb771463be7effb7342e92f2 --- M include/osmocom/bsc_nat/vty.h M src/osmo-bsc-nat/main.c M src/osmo-bsc-nat/vty.c 3 files changed, 1 insertion(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/28/27028/1 diff --git a/include/osmocom/bsc_nat/vty.h b/include/osmocom/bsc_nat/vty.h index f882c23..9a842b5 100644 --- a/include/osmocom/bsc_nat/vty.h +++ b/include/osmocom/bsc_nat/vty.h @@ -28,4 +28,3 @@ }; void bsc_nat_vty_init(void); -int bsc_nat_vty_go_parent(struct vty *vty); diff --git a/src/osmo-bsc-nat/main.c b/src/osmo-bsc-nat/main.c index 006382d..7a5d503 100644 --- a/src/osmo-bsc-nat/main.c +++ b/src/osmo-bsc-nat/main.c @@ -49,7 +49,7 @@ static struct vty_app_info vty_info = { .name = "OsmoBSCNAT", .version = PACKAGE_VERSION, - .go_parent_cb = bsc_nat_vty_go_parent, + .go_parent_cb = osmo_ss7_vty_go_parent, }; static struct { diff --git a/src/osmo-bsc-nat/vty.c b/src/osmo-bsc-nat/vty.c index 128940e..41681d4 100644 --- a/src/osmo-bsc-nat/vty.c +++ b/src/osmo-bsc-nat/vty.c @@ -28,26 +28,6 @@ #include <osmocom/bsc_nat/bsc_nat.h> #include <osmocom/bsc_nat/vty.h> -int bsc_nat_vty_go_parent(struct vty *vty) -{ - switch (vty->node) { - case BSC_NAT_NODE: - vty->node = CONFIG_NODE; - vty->index = g_bsc_nat; - break; - case CONFIG_NODE: - vty->node = ENABLE_NODE; - vty->index = NULL; - break; - default: - vty->node = CONFIG_NODE; - vty->index = NULL; - break; - } - - return vty->node; -} - static struct cmd_node bsc_nat_node = { BSC_NAT_NODE, "%s(config-bsc-nat)# ", -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc-nat Gerrit-Branch: master Gerrit-Change-Id: Iee6ece062f11694acb771463be7effb7342e92f2 Gerrit-Change-Number: 27028 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc-nat[master]: bsc_nat_fsm: fix SSN of OsmoBSCNAT-RAN
by osmith 31 Jan '22

31 Jan '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27029 ) Change subject: bsc_nat_fsm: fix SSN of OsmoBSCNAT-RAN ...................................................................... bsc_nat_fsm: fix SSN of OsmoBSCNAT-RAN Related: SYS#5560 Change-Id: I0491ba90d28eea6f10d8d6f98a00d3dd6c698476 --- M src/osmo-bsc-nat/bsc_nat_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/29/27029/1 diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c index b460d69..a0903f4 100644 --- a/src/osmo-bsc-nat/bsc_nat_fsm.c +++ b/src/osmo-bsc-nat/bsc_nat_fsm.c @@ -103,7 +103,7 @@ return; } - if (ss7_inst_init(bsc_nat->ran, "OsmoBSCNAT-RAN", DEFAULT_PC_RAN, OSMO_SCCP_SSN_MSC) < 0) { + if (ss7_inst_init(bsc_nat->ran, "OsmoBSCNAT-RAN", DEFAULT_PC_RAN, OSMO_SCCP_SSN_BSSAP) < 0) { osmo_fsm_inst_state_chg(fi, BSC_NAT_FSM_ST_STOPPED, 0, 0); return; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc-nat Gerrit-Branch: master Gerrit-Change-Id: I0491ba90d28eea6f10d8d6f98a00d3dd6c698476 Gerrit-Change-Number: 27029 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-sccp[master]: include/osmocom/sigtran/sccp_sap.h: cosmetic fixes
by osmith 31 Jan '22

31 Jan '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/27026 ) Change subject: include/osmocom/sigtran/sccp_sap.h: cosmetic fixes ...................................................................... include/osmocom/sigtran/sccp_sap.h: cosmetic fixes Move return type to the same line as the name of the function to follow coding guidelines. Change-Id: I10475aa395a1cfd49ff62c758f99f9689a0038d0 --- M include/osmocom/sigtran/sccp_sap.h 1 file changed, 7 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/26/27026/1 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index d741644..adac606 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -281,8 +281,7 @@ void osmo_sccp_vty_init(void); -struct osmo_sccp_instance * -osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv); +struct osmo_sccp_instance *osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv); void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst); struct osmo_ss7_instance *osmo_sccp_get_ss7(const struct osmo_sccp_instance *sccp); struct osmo_sccp_instance *osmo_sccp_get_sccp(const struct osmo_sccp_user *scu); @@ -291,22 +290,17 @@ void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv); void *osmo_sccp_user_get_priv(struct osmo_sccp_user *scu); -struct osmo_sccp_user * -osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name, - osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc); +struct osmo_sccp_user *osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name, + osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc); -struct osmo_sccp_user * -osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, - osmo_prim_cb prim_cb, uint16_t ssn); -struct osmo_sccp_user * -osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc); +struct osmo_sccp_user *osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, + osmo_prim_cb prim_cb, uint16_t ssn); +struct osmo_sccp_user *osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc); int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); -struct osmo_ss7_instance * -osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, - const char *name); +struct osmo_ss7_instance *osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name); const char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/27026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I10475aa395a1cfd49ff62c758f99f9689a0038d0 Gerrit-Change-Number: 27026 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-sccp[master]: osmo_ss7_vty: add osmo_sccp_addr_by_name_local
by osmith 31 Jan '22

31 Jan '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/27027 ) Change subject: osmo_ss7_vty: add osmo_sccp_addr_by_name_local ...................................................................... osmo_ss7_vty: add osmo_sccp_addr_by_name_local Add a new function similar to osmo_sccp_addr_by_name, but search in a specific ss7 instance's addressbook instead of searching in the global address book. This is needed for osmo-bsc-nat, which uses two separate instances at the same time. Related: SYS#5560 Change-Id: I0f38b0d038b0dd8cd355e7284e5b56d438811bd9 --- M include/osmocom/sigtran/sccp_sap.h M src/osmo_ss7_vty.c 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/27/27027/1 diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index adac606..2b41fed 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -301,6 +301,8 @@ int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); struct osmo_ss7_instance *osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name); +int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name, + const struct osmo_ss7_instance *inst); const char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr); diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 8ee3087..7dffe02 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -1350,6 +1350,28 @@ return entry->inst; } +/*! \brief Lookup an SCCP address from the addressbook of a specific instance + * by its name. + * \param[out] dest_addr pointer to output the resulting sccp-address; + * (set to NULL if not interested) + * \param[in] name of the address to lookup + * \param[in] inst ss7 instance of which the address book will be searched + * \returns 0 on success; <0 on error */ +int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name, + const struct osmo_ss7_instance *inst) +{ + struct osmo_sccp_addr_entry *entry; + + entry = addr_entry_by_name_local(name, inst); + if (!entry) + return -ENOENT; + + if (dest_addr) + *dest_addr = entry->addr; + + return 0; +} + /*! \brief Reverse lookup the lookup-name of a specified SCCP address. * \param[in] name of the address to lookup * \returns char pointer to the lookup-name; NULL on error */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/27027 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I0f38b0d038b0dd8cd355e7284e5b56d438811bd9 Gerrit-Change-Number: 27027 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libgtpnl[master]: fix some cases of rc == 0 on error
by pespin 31 Jan '22

31 Jan '22
Attention is currently required from: Pablo Neira Ayuso, neels, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/26990 ) Change subject: fix some cases of rc == 0 on error ...................................................................... Patch Set 1: (1 comment) File src/gtp-genl.c: https://gerrit.osmocom.org/c/libgtpnl/+/26990/comment/115394b2_d0f7dd4c PS1, Line 82: return -2; > why the magic number "-2"? Why not simlpy do "rc = genl_socket_talk()" and then pass that 'rc' valu […] or perhaps: rc = -errno; perror(); return rc; -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/26990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: I22fd69709e023572c6c616a4184340a554456faf Gerrit-Change-Number: 26990 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Pablo Neira Ayuso <pablo(a)gnumonks.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Pablo Neira Ayuso <pablo(a)gnumonks.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 31 Jan 2022 16:24:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-e1d[master]: Allow configuration of interfaces/lines via VTY
by tnt 31 Jan '22

31 Jan '22
Attention is currently required from: laforge. tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27016 ) Change subject: Allow configuration of interfaces/lines via VTY ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27016 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I89b57b688b68901f87d9683ab9294772ee747d77 Gerrit-Change-Number: 27016 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 31 Jan 2022 15:22:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • ...
  • 79
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.