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

December 2023

  • 1 participants
  • 1601 discussions
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_sstat_state
by pespin 08 Dec '23

08 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_sstat_state ...................................................................... netif: sctp.h: Introduce value_string for enum sctp_sstat_state This can be used by apps retrieving struct sctp_status through getsockopt(SCTP_STATUS). The relevant field is spinfo_state: osmo_sctp_sstat_state_str(st.sstat_state); Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Related: SYS#6636 --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/83/35283/1 diff --git a/include/osmocom/netif/sctp.h b/include/osmocom/netif/sctp.h index 374cf6e..9dcb6dd 100644 --- a/include/osmocom/netif/sctp.h +++ b/include/osmocom/netif/sctp.h @@ -53,3 +53,8 @@ extern const struct value_string osmo_sctp_spinfo_state_strs[]; static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val) { return get_value_string(osmo_sctp_spinfo_state_strs, val); } + +enum sctp_sstat_state; +extern const struct value_string osmo_sctp_sstat_state_strs[]; +static inline const char *osmo_sctp_sstat_state_str(enum sctp_sstat_state val) +{ return get_value_string(osmo_sctp_sstat_state_strs, val); } diff --git a/src/sctp.c b/src/sctp.c index c725d2f..daa19cf 100644 --- a/src/sctp.c +++ b/src/sctp.c @@ -79,3 +79,17 @@ { SCTP_UNKNOWN, "UNKNOWN" }, {} }; + +/* linux/sctp.h enum sctp_sstat_state */ +const struct value_string osmo_sctp_sstat_state_strs[] = { + { SCTP_EMPTY, "EMPTY" }, + { SCTP_CLOSED, "CLOSED" }, + { SCTP_COOKIE_WAIT, "COOKIE_WAIT" }, + { SCTP_COOKIE_ECHOED, "COOKIE_ECHOED" }, + { SCTP_ESTABLISHED, "ESTABLISHED" }, + { SCTP_SHUTDOWN_PENDING, "SHUTDOWN_PENDING" }, + { SCTP_SHUTDOWN_SENT, "SHUTDOWN_SENT" }, + { SCTP_SHUTDOWN_RECEIVED, "SHUTDOWN_RECEIVED" }, + { SCTP_SHUTDOWN_ACK_SENT, "SHUTDOWN_ACK_SENT" }, + {} +}; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35283?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Id7d8a9ad7b32406ac603e520b33809d7ae5c762f Gerrit-Change-Number: 35283 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: bertlv_parse_len: Fix input data is smaller than num length octets
by laforge 08 Dec '23

08 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35282?usp=email ) Change subject: bertlv_parse_len: Fix input data is smaller than num length octets ...................................................................... bertlv_parse_len: Fix input data is smaller than num length octets This can happen if there's a file with invalid encoding on the card, such as a tag followed by all-ff. Let's gracefully ignore it and return zero bytes as response. Change-Id: Ic44557368a6034dbf4bb021ab23a57927c22def0 --- M pySim/utils.py 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/82/35282/1 diff --git a/pySim/utils.py b/pySim/utils.py index 44800fb..23b26f9 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -314,6 +314,8 @@ else: num_len_oct = binary[0] & 0x7f length = 0 + if len(binary) < num_len_oct + 1: + return (0, b'') for i in range(1, 1+num_len_oct): length <<= 8 length |= binary[i] -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35282?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ic44557368a6034dbf4bb021ab23a57927c22def0 Gerrit-Change-Number: 35282 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
by pespin 08 Dec '23

08 Dec '23
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-netif/+/35280?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: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state ...................................................................... netif: sctp.h: Introduce value_string for enum sctp_spinfo_state This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/35280/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-sccp[master]: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address...
by pespin 08 Dec '23

08 Dec '23
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-sccp/+/35253?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: vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list ...................................................................... vty: show cs7 instance asp: Swap columns SCTP Role and Remote Address list The Remote Address is by far the potentially largest column, as well as the one with more variable length, so move it to the end for better formatting. Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 49 insertions(+), 37 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/53/35253/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35253?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I4854219f8898266ae47b9117ef79dbad30a5b0fd Gerrit-Change-Number: 35253 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-sccp[master]: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME'
by pespin 08 Dec '23

08 Dec '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?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: vty: Introduce cmd 'show cs7 instance asp name ASP_NAME' ...................................................................... vty: Introduce cmd 'show cs7 instance asp name ASP_NAME' Allow printing only a specific asp by name. Useful when user is only interested in a uniqe ASP and there's lots of them configured. Related: SYS#6636 Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 --- M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 2 files changed, 84 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/35275/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35275?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I08426272069ce5f3c8403b08dcaf686547bee336 Gerrit-Change-Number: 35275 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-sccp[master]: vty: Introduce show cs7 instance asp-remaddr
by pespin 08 Dec '23

08 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email ) Change subject: vty: Introduce show cs7 instance asp-remaddr ...................................................................... vty: Introduce show cs7 instance asp-remaddr Depends: libosmocore.git Change-Id I3e1c84526b006baff435bbbca49dc6cf7d201cf5 Depends: libosmo-netif.git Change-Id I78a0bd8279a04f4011c7273e0f542981308e482f Related: SYS#6636 Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0 --- M TODO-RELEASE M src/osmo_ss7_vty.c M tests/vty/ss7_asp_test.vty 3 files changed, 203 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/81/35281/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index c7771bd..1913dc6 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -10,3 +10,5 @@ libosmocore >1.9.0 osmo_sock_multiaddr_{add,del}_local_addr() libosmo-netif >1.4.0 osmo_stream_{srv,cli}_get_fd() libosmocore >1.9.0 osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf() +libosmocore >1.9.0 osmo_sock_sctp_get_peer_addr_info() +libosmo-netif >1.4.0 osmo_sctp_spinfo_state_str() diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c index 39329b8..878e8dd 100644 --- a/src/osmo_ss7_vty.c +++ b/src/osmo_ss7_vty.c @@ -47,6 +47,11 @@ #include "sccp_internal.h" #include "ss7_internal.h" +#ifdef HAVE_LIBSCTP +#include <netinet/sctp.h> +#include <osmocom/netif/sctp.h> +#endif + #define XUA_VAR_STR "(sua|m3ua|ipa)" #define XUA_VAR_HELP_STR \ @@ -1244,6 +1249,178 @@ return show_asp(vty, id, asp_name); } +#include <netinet/tcp.h> +/* netinet/tcp.h */ +static const struct value_string tcp_info_state_values[] = { + { TCP_ESTABLISHED, "ESTABLISHED" }, + { TCP_SYN_SENT, "SYN_SENT" }, + { TCP_SYN_RECV, "SYN_RECV" }, + { TCP_FIN_WAIT1, "FIN_WAIT1" }, + { TCP_FIN_WAIT2, "FIN_WAIT2" }, + { TCP_TIME_WAIT, "TIME_WAIT" }, + { TCP_CLOSE, "CLOSE" }, + { TCP_CLOSE_WAIT, "CLOSE_WAIT" }, + { TCP_LAST_ACK, "LAST_ACK" }, + { TCP_LISTEN, "LISTEN" }, + { TCP_CLOSING, "CLOSING" }, + {} +}; + +static void show_one_asp_remaddr_tcp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct osmo_sockaddr osa = {}; + struct tcp_info tcpi = {}; + socklen_t len; + int fd, rc; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s %-46s uninitialized%s", asp->cfg.name, "", VTY_NEWLINE); + return; + } + + len = sizeof(osa.u.sas); + rc = getpeername(fd, &osa.u.sa, &len); + + len = sizeof(tcpi); + rc = getsockopt(fd, SOL_TCP, TCP_INFO, &tcpi, &len); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s %-46s getsockopt(TCP_INFO) failed: %s%s", + asp->cfg.name, osmo_sockaddr_to_str(&osa), buf_err, VTY_NEWLINE); + return; + } + + vty_out(vty, "%-12s %-46s TCP_%-19s %-8u %-8u %-8u %-8u%s", + asp->cfg.name, + osmo_sockaddr_to_str(&osa), + get_value_string(tcp_info_state_values, tcpi.tcpi_state), + tcpi.tcpi_snd_cwnd, tcpi.tcpi_rtt, + tcpi.tcpi_rto, tcpi.tcpi_pmtu, + VTY_NEWLINE); +} + +#ifdef HAVE_LIBSCTP +static void show_one_asp_remaddr_sctp(struct vty *vty, struct osmo_ss7_asp *asp) +{ + struct sctp_paddrinfo pinfo[OSMO_SOCK_MAX_ADDRS]; + struct osmo_sockaddr osa = {}; + size_t pinfo_cnt = ARRAY_SIZE(pinfo); + bool more_needed; + int fd, rc; + unsigned int i; + + fd = ss7_asp_get_fd(asp); + if (fd < 0) { + vty_out(vty, "%-12s %-46s uninitialized%s", asp->cfg.name, "", VTY_NEWLINE); + return; + } + + rc = osmo_sock_sctp_get_peer_addr_info(fd, &pinfo[0], &pinfo_cnt); + if (rc < 0) { + char buf_err[128]; + strerror_r(errno, buf_err, sizeof(buf_err)); + vty_out(vty, "%-12s %-46s getsockopt(SCTP_GET_PEER_ADDR_INFO) failed: %s%s", asp->cfg.name, "", buf_err, VTY_NEWLINE); + return; + } + + more_needed = pinfo_cnt > ARRAY_SIZE(pinfo); + if (pinfo_cnt > ARRAY_SIZE(pinfo)) + pinfo_cnt = ARRAY_SIZE(pinfo); + + for (i = 0; i < pinfo_cnt; i++) { + osa.u.sas = pinfo[i].spinfo_address; + vty_out(vty, "%-12s %-46s SCTP_%-18s %-8u %-8u %-8u %-8u%s", + asp->cfg.name, + osmo_sockaddr_to_str(&osa), + osmo_sctp_spinfo_state_str(pinfo[i].spinfo_state), + pinfo[i].spinfo_cwnd, pinfo[i].spinfo_srtt, + pinfo[i].spinfo_rto, pinfo[i].spinfo_mtu, + VTY_NEWLINE); + } + + if (more_needed) + vty_out(vty, "%-12s more address buffers needed!%s", asp->cfg.name, VTY_NEWLINE); +} +#endif + +static void show_one_asp_remaddr(struct vty *vty, struct osmo_ss7_asp *asp) +{ + int proto = ss7_asp_proto_to_ip_proto(asp->cfg.proto); + + switch (proto) { + case IPPROTO_TCP: + show_one_asp_remaddr_tcp(vty, asp); + break; +#ifdef HAVE_LIBSCTP + case IPPROTO_SCTP: + show_one_asp_remaddr_sctp(vty, asp); + break; +#endif + default: + vty_out(vty, "%-12s %-46s unknown proto %u%s", asp->cfg.name, "", proto, VTY_NEWLINE); + break; + } +} + +static int show_asp_remaddr(struct vty *vty, int id, const char *asp_name) +{ + struct osmo_ss7_instance *inst; + struct osmo_ss7_asp *asp = NULL; + + inst = osmo_ss7_instance_find(id); + if (!inst) { + vty_out(vty, "No SS7 instance %d found%s", id, VTY_NEWLINE); + return CMD_WARNING; + } + + if (asp_name) { + asp = osmo_ss7_asp_find_by_name(inst, asp_name); + if (!asp) { + vty_out(vty, "No ASP %s found%s", asp_name, VTY_NEWLINE); + return CMD_WARNING; + } + } + + vty_out(vty, "ASP Name Remote IP Address & Port State CWND SRTT RTO MTU%s", VTY_NEWLINE); + vty_out(vty, "------------ ---------------------------------------------- ----------------------- -------- -------- -------- --------%s", VTY_NEWLINE); + + if (asp) { + show_one_asp_remaddr(vty, asp); + return CMD_SUCCESS; + } + + llist_for_each_entry(asp, &inst->asp_list, list) { + show_one_asp_remaddr(vty, asp); + } + return CMD_SUCCESS; +} + +DEFUN(show_cs7_asp_remaddr, show_cs7_asp_remaddr_cmd, + "show cs7 instance <0-15> asp-remaddr", + SHOW_STR CS7_STR INST_STR INST_STR + "Application Server Process (ASP) remote addresses information\n") +{ + int id = atoi(argv[0]); + + return show_asp_remaddr(vty, id, NULL); +} + + +DEFUN(show_cs7_asp_remaddr_name, show_cs7_asp_remaddr_name_cmd, + "show cs7 instance <0-15> asp-remaddr name ASP_NAME", + SHOW_STR CS7_STR INST_STR INST_STR + "Application Server Process (ASP) remote addresses information\n" + "Lookup ASP with a given name\n" + "Name of the Application Server Process (ASP)\n") +{ + int id = atoi(argv[0]); + const char *asp_name = argv[1]; + + return show_asp_remaddr(vty, id, asp_name); +} + static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp, bool show_dyn_config) { int i; @@ -2520,6 +2697,8 @@ install_node(&asp_node, NULL); install_lib_element_ve(&show_cs7_asp_cmd); install_lib_element_ve(&show_cs7_asp_name_cmd); + install_lib_element_ve(&show_cs7_asp_remaddr_cmd); + install_lib_element_ve(&show_cs7_asp_remaddr_name_cmd); install_lib_element(L_CS7_NODE, &cs7_asp_cmd); install_lib_element(L_CS7_NODE, &no_cs7_asp_cmd); install_lib_element(L_CS7_ASP_NODE, &cfg_description_cmd); diff --git a/tests/vty/ss7_asp_test.vty b/tests/vty/ss7_asp_test.vty index 35653cb..0c11d61 100644 --- a/tests/vty/ss7_asp_test.vty +++ b/tests/vty/ss7_asp_test.vty @@ -5,6 +5,8 @@ show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> asp name ASP_NAME + show cs7 instance <0-15> asp-remaddr + show cs7 instance <0-15> asp-remaddr name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) show cs7 instance <0-15> route show cs7 instance <0-15> sccp addressbook @@ -22,6 +24,8 @@ show cs7 config show cs7 instance <0-15> asp show cs7 instance <0-15> asp name ASP_NAME + show cs7 instance <0-15> asp-remaddr + show cs7 instance <0-15> asp-remaddr name ASP_NAME show cs7 instance <0-15> as (active|all|m3ua|sua) show cs7 instance <0-15> route show cs7 instance <0-15> sccp addressbook @@ -50,11 +54,12 @@ <0-15> An instance of the SS7 stack ss7_asp_vty_test# show cs7 instance 0 ? - users User Table - asp Application Server Process (ASP) - as Application Server (AS) - route Routing Table - sccp Signalling Connection Control Part + users User Table + asp Application Server Process (ASP) + asp-remaddr Application Server Process (ASP) remote addresses information + as Application Server (AS) + route Routing Table + sccp Signalling Connection Control Part ss7_asp_vty_test# show cs7 instance 0 as ? active Display all active ASs -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35281?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ie5ac1d0ee74d2b977b1f5319cd88566df7994fd0 Gerrit-Change-Number: 35281 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[master]: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state
by pespin 08 Dec '23

08 Dec '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email ) Change subject: netif: sctp.h: Introduce value_string for enum sctp_spinfo_state ...................................................................... netif: sctp.h: Introduce value_string for enum sctp_spinfo_state This can be used by apps retrieving struct sctp_paddrinfo through getsockopt(SCTP_GET_PEER_ADDR_INFO). The relevant field is spinfo_state: osmo_sctp_spinfo_state_str(pinfo.spinfo_state); Related: SYS#6636 Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f --- M include/osmocom/netif/sctp.h M src/sctp.c 2 files changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/35280/1 diff --git a/include/osmocom/netif/sctp.h b/include/osmocom/netif/sctp.h index bb8acda..374cf6e 100644 --- a/include/osmocom/netif/sctp.h +++ b/include/osmocom/netif/sctp.h @@ -48,3 +48,8 @@ extern const struct value_string osmo_sctp_op_error_strs[]; static inline const char *osmo_sctp_op_error_str(enum osmo_sctp_op_error val) { return get_value_string(osmo_sctp_op_error_strs, val); } + +enum sctp_spinfo_state; +extern const struct value_string osmo_sctp_spinfo_state_strs[]; +static inline const char *osmo_sctp_spinfo_state_str(enum sctp_spinfo_state val) +{ return get_value_string(osmo_sctp_spinfo_state_strs, val); } diff --git a/src/sctp.c b/src/sctp.c index 7f4f54b..a81077e 100644 --- a/src/sctp.c +++ b/src/sctp.c @@ -69,3 +69,13 @@ { OSMO_SCTP_OP_ERR_PROTO_VERSION, "Protocol Violation" }, { 0, NULL } }; + +/* linux/sctp.h enum sctp_spinfo_state */ +const struct value_string osmo_sctp_spinfo_state_strs[] = { + { SCTP_INACTIVE, "INACTIVE" }, + { SCTP_POTENTIALLY_FAILED, "POTENTIALLY_FAILED" }, + { SCTP_ACTIVE, "ACTIVE" }, + { SCTP_UNCONFIRMED, "UNCONFIRMED" }, + { SCTP_UNKNOWN, "UNKNOWN" }, + {} +}; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I78a0bd8279a04f4011c7273e0f542981308e482f Gerrit-Change-Number: 35280 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ci[master]: coverity: add job to check for failed uploads
by pespin 08 Dec '23

08 Dec '23
Attention is currently required from: fixeria, osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email ) Change subject: coverity: add job to check for failed uploads ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/35267?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ideabcb30f9f8f365acff2de7751eb74a2762a7a6 Gerrit-Change-Number: 35267 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 08 Dec 2023 14:28:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in pysim[master]: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util
by laforge 08 Dec '23

08 Dec '23
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/35279?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: move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util ...................................................................... move {enc,dec}_addr_tlv functions from pySim.util to pySim.legacy.util In the previous commit we've stopped using those functions from modern pySim-shell code. Hence, the only remaining user is the legacy tools, so we can move the code to the legacy module. Change-Id: I6f18ccb36fc33bc204c01f9ece135676510e67ec --- M pySim/legacy/cards.py M pySim/legacy/utils.py M pySim/utils.py 3 files changed, 135 insertions(+), 123 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/35279/2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35279?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I6f18ccb36fc33bc204c01f9ece135676510e67ec Gerrit-Change-Number: 35279 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in pysim[master]: isim: Replace legacy imperative address TLV encoder/decoder with cons...
by laforge 08 Dec '23

08 Dec '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35278?usp=email ) Change subject: isim: Replace legacy imperative address TLV encoder/decoder with construct ...................................................................... isim: Replace legacy imperative address TLV encoder/decoder with construct We've recently introduced IPv{4,6}Adapter construct classes and can switch to this instead of using the old imperative encoder/decoder functions {enc,dec}_addr_tlv(). Aside from code cleanup, this also means we now support the IPv6 address type in EF.PCSCF. Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac --- M pySim/ts_31_103.py 1 file changed, 25 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/78/35278/1 diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py index 5268c70..a4a7656 100644 --- a/pySim/ts_31_103.py +++ b/pySim/ts_31_103.py @@ -135,19 +135,18 @@ class EF_PCSCF(LinFixedEF): _test_de_encode = [ ( '802c0070637363662e696d732e6d6e633030302e6d63633733382e7075622e336770706e6574776f726b2e6f7267', - { "addr": "pcscf.ims.mnc000.mcc738.pub.3gppnetwork.org", "addr_type": "00" } ), + {'pcscf_address': { "address": "pcscf.ims.mnc000.mcc738.pub.3gppnetwork.org", "type_of_address": "FQDN" } } ), ] + class PcscfAddress(BER_TLV_IE, tag=0x80): + _construct = Struct('type_of_address'/Enum(Byte, FQDN=0, IPv4=1, IPv6=2), + 'address'/Switch(this.type_of_address, + {'FQDN': Utf8Adapter(GreedyBytes), + 'IPv4': Ipv4Adapter(GreedyBytes), + 'IPv6': Ipv6Adapter(GreedyBytes)})) + def __init__(self, fid='6f09', sfid=None, name='EF.P-CSCF', desc='P-CSCF Address', **kwargs): super().__init__(fid=fid, sfid=sfid, name=name, desc=desc, **kwargs) - - def _decode_record_hex(self, raw_hex, **kwargs): - addr, addr_type = dec_addr_tlv(raw_hex) - return {"addr": addr, "addr_type": addr_type} - - def _encode_record_hex(self, json_in, **kwargs): - addr = json_in['addr'] - addr_type = json_in['addr_type'] - return enc_addr_tlv(addr, addr_type) + self._tlv = EF_PCSCF.PcscfAddress # TS 31.103 Section 4.2.9 class EF_GBABP(TransparentEF): -- To view, visit https://gerrit.osmocom.org/c/pysim/+/35278?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4d01ccfe473a8a80fbee33fdcbd8a19b39da85ac Gerrit-Change-Number: 35278 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.