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 2025

  • 1 participants
  • 1491 discussions
[M] Change in osmo-bsc[master]: nokia_site: add missing element names
by csaba.sipos 08 Jan '25

08 Jan '25
csaba.sipos has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39252?usp=email ) Change subject: nokia_site: add missing element names ...................................................................... nokia_site: add missing element names Change-Id: Ia4026bbe458817e164b756847229cf6a90d02865 Signed-off-by: csaba.sipos <metro4(a)freemail.hu> --- M src/osmo-bsc/bts_nokia_site.c 1 file changed, 82 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/39252/1 diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index dad61ae..b54142a 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -471,7 +471,88 @@ { 0xAA, "TSC" }, { 0xAB, "Special TX Power Setting" }, { 0xAC, "Optional sync settings" }, - { 0xFA, "Abis If parameters" }, + { 0xAD, "STIRC Option Setting" }, + { 0xAE, "Rx Difference Samples Count" }, + { 0xAF, "BTS Object Mapping" }, + { 0xB0, "Abis Mapping" }, + { 0xB1, "LAPDm T200 Values" }, + { 0xB2, "DTRX info" }, + { 0xB3, "Link and Counters" }, + { 0xB4, "TRS and BTS licensing" }, + { 0xB5, "TRX DDU association" }, + { 0xB6, "Power control reason" }, + { 0xB7, "CSDAP" }, + { 0xB8, "BS2 parameters" }, + { 0xB9, "BSC parameters" }, + { 0xBA, "BTS parameters" }, + { 0xBB, "TRX parameters" }, + { 0xBC, "HO parameters" }, + { 0xBD, "POC parameters" }, + { 0xBE, "ADJC parameters" }, + { 0xBF, "ADJC object" }, + { 0xC0, "UADJC parameters" }, + { 0xC1, "UADJC object" }, + { 0xC2, "BTS PCM id" }, + { 0xC3, "Segment Object id" }, + { 0xC4, "Cell load parameters" }, + { 0xC5, "Dynamic cell load info" }, + { 0xC6, "BSC Release information" }, + { 0xC7, "Complete data" }, + { 0xC8, "OMUSIG PCM info" }, + { 0xC9, "Line type" }, + { 0xCA, "Concurrent OMUSIGs priorities" }, + { 0xCB, "OMUSIG Priority" }, + { 0xCC, "OSC support" }, + { 0xCD, "CSDAP id" }, + { 0xCE, "CSDAP parameters" }, + { 0xCF, "Local Switching Counters" }, + { 0xD0, "TX queue handling parameters" }, + { 0xD1, "Valid History Records" }, + { 0xD2, "Measurement Operation Status" }, + { 0xD3, "Abis Delay Counters" }, + { 0xD4, "Abis Measurement channel" }, + { 0xD5, "Packet Abis BCF group configuration" }, + { 0xD6, "Traffic to DSCP mapping" }, + { 0xD7, "UL Shaping parameters" }, + { 0xD8, "Traffic scheduling" }, + { 0xD9, "Random Fill Bits usage" }, + { 0xDA, "Packet Abis BCF group id" }, + { 0xDB, "UDP" }, + { 0xDC, "Backhaul utilization monitor parameters" }, + { 0xDD, "Packet loss monitor parameters" }, + { 0xDE, "Congestion control" }, + { 0xDF, "Congestion reaction hysteresis parameters" }, + { 0xE0, "Multiplexing parameters" }, + { 0xE1, "IP addresses" }, + { 0xE2, "TRX feature capability" }, + { 0xE3, "Packet Abis If configuration" }, + { 0xE4, "BTS IPv4 address C/U-plane" }, + { 0xE5, "IPv4 address" }, + { 0xE6, "Subnet mask" }, + { 0xE7, "BSC IPv4 address C-plane" }, + { 0xE8, "BSC IPv4 address CS U-plane" }, + { 0xE9, "BSC IPv4 address PS U-plane" }, + { 0xEA, "MC-PPP class map" }, + { 0xEB, "SCTP parameters" }, + { 0xEC, "Packet Abis mapping" }, + { 0xED, "Sig ID" }, + { 0xEE, "Packet Abis mapping" }, + { 0xEF, "Measurement Request Type" }, + { 0xF0, "Peer BTS info" }, + { 0xF1, "Packet Abis Counters" }, + { 0xF2, "Waiting time for BSC restarting" }, + { 0xF3, "Peer BCF ID" }, + { 0xF4, "TRX starting mode" }, + { 0xF5, "GSM-R configuration" }, + { 0xF6, "DSCP to VLAN priority mapping" }, + { 0xF7, "TRX Assosiation" }, + { 0xF8, "Power Finetuning" }, + { 0xF9, "Abis Delay Measurement UDP port" }, + { 0xFA, "Abis if parameters" }, + { 0xFB, "PDV" }, + { 0xFC, "Horizon BTS parameters" }, + { 0xFD, "reserved" }, + { 0xFE, "Radio Module SW" }, { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39252?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: Ia4026bbe458817e164b756847229cf6a90d02865 Gerrit-Change-Number: 39252 Gerrit-PatchSet: 1 Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu>
1 0
0 0
[S] Change in osmo-bsc[master]: nokia_site: add some missing meesage IDs
by csaba.sipos 08 Jan '25

08 Jan '25
csaba.sipos has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39251?usp=email ) Change subject: nokia_site: add some missing meesage IDs ...................................................................... nokia_site: add some missing meesage IDs Change-Id: I2ecd2ac285493352a9b121b09bf6a3a560e14c6c Signed-off-by: csaba.sipos <metro4(a)freemail.hu> --- M src/osmo-bsc/bts_nokia_site.c 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/39251/1 diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c index dc8ff14..dad61ae 100644 --- a/src/osmo-bsc/bts_nokia_site.c +++ b/src/osmo-bsc/bts_nokia_site.c @@ -217,6 +217,7 @@ /* TODO: put in a separate file ? */ static const struct value_string nokia_msgt_name[] = { + { 0x7F, "NOKIA_BTS_RSSI_VSWR_COUNTERS_REQ" }, { 0x80, "NOKIA_BTS_CONF_DATA" }, { 0x81, "NOKIA_BTS_ACK" }, { 0x82, "NOKIA_BTS_OMU_STARTED" }, @@ -275,6 +276,20 @@ { 0xB7, "NOKIA_BTS_LCS_ANSWER" }, { 0xB8, "NOKIA_BTS_LMU_FN_OFFSET_COMMAND" }, { 0xB9, "NOKIA_BTS_LMU_FN_OFFSET_ANSWER" }, + { 0xBA, "NOKIA_BTS_LAPD_CTR_REP" }, + { 0xBB, "NOKIA_BTS_TRX_CONFIGURATION_UPDATE" }, + { 0xBC, "NOKIA_BTS_DYNAMIC_LOAD_INFO" }, + { 0xBD, "NOKIA_BTS_CONF_DATA_BS2" }, + { 0xBE, "NOKIA_BTS_REGISTRY_REQ" }, + { 0xBF, "NOKIA_BTS_SFS_UPLOAD_REQ" }, + { 0xC0, "NOKIA_BTS_DELAY_MEAS_REQ" }, + { 0xC1, "NOKIA_BTS_DELAY_MEAS_ACK" }, + { 0xC2, "NOKIA_BTS_PABIS_MEAS_REQ" }, + { 0xC3, "NOKIA_BTS_PABIS_MEAS_ACK" }, + { 0xC4, "NOKIA_BSC_RESET_INFO" }, + { 0xC5, "NOKIA_BSC_RESET_COMPL" }, + { 0xC6, "NOKIA_BSC_RESET_COMPL_ANSWER" }, + { 0xC7, "NOKIA_BTS_RSSI_VSWR_COUNTERS" }, { 0, NULL } }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39251?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: I2ecd2ac285493352a9b121b09bf6a3a560e14c6c Gerrit-Change-Number: 39251 Gerrit-PatchSet: 1 Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu>
1 0
0 0
[S] Change in osmo-mgw[master]: mgw: MDCX: Simplify early return code paths
by pespin 07 Jan '25

07 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39250?usp=email ) Change subject: mgw: MDCX: Simplify early return code paths ...................................................................... mgw: MDCX: Simplify early return code paths Change-Id: Icb03a95e34e0c7d9396fefc2e37ee33ab09daa89 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 15 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/39250/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 46c6815..9166854 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1189,26 +1189,24 @@ if (mgcp_conn_rtp_is_osmux(conn_rtp)) { OSMO_ASSERT(conn_rtp->osmux.local_cid_allocated); if (hpars->remote_osmux_cid < -1) { - LOGPCONN(conn, DLMGCP, LOGL_ERROR, - "MDCX: Failed to parse Osmux CID!\n"); + LOGPCONN(conn, DLMGCP, LOGL_ERROR, "MDCX: Failed to parse Osmux CID!\n"); goto error3; - } else if (hpars->remote_osmux_cid == -1) { - LOGPCONN(conn, DLMGCP, LOGL_ERROR, - "MDCX: wilcard in MDCX is not supported!\n"); + } + if (hpars->remote_osmux_cid == -1) { + LOGPCONN(conn, DLMGCP, LOGL_ERROR, "MDCX: wilcard in MDCX is not supported!\n"); goto error3; - } else if (conn_rtp->osmux.remote_cid_present && - hpars->remote_osmux_cid != conn_rtp->osmux.remote_cid) { - LOGPCONN(conn, DLMGCP, LOGL_ERROR, - "MDCX: changing already allocated CID is not supported!\n"); + } + if (conn_rtp->osmux.remote_cid_present && + hpars->remote_osmux_cid != conn_rtp->osmux.remote_cid) { + LOGPCONN(conn, DLMGCP, LOGL_ERROR, "MDCX: changing already allocated CID is not supported!\n"); goto error3; - } else { - conn_rtp->osmux.remote_cid_present = true; - conn_rtp->osmux.remote_cid = hpars->remote_osmux_cid; - if (conn_osmux_event_rx_crcx_mdcx(conn_rtp) < 0) { - LOGPCONN(conn, DLMGCP, LOGL_ERROR, - "MDCX: Osmux handling failed!\n"); - goto error3; - } + } + conn_rtp->osmux.remote_cid_present = true; + conn_rtp->osmux.remote_cid = hpars->remote_osmux_cid; + if (conn_osmux_event_rx_crcx_mdcx(conn_rtp) < 0) { + LOGPCONN(conn, DLMGCP, LOGL_ERROR, + "MDCX: Osmux handling failed!\n"); + goto error3; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39250?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Icb03a95e34e0c7d9396fefc2e37ee33ab09daa89 Gerrit-Change-Number: 39250 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-mgw[master]: mgw: Remove wrong TODO comment
by pespin 07 Jan '25

07 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39249?usp=email ) Change subject: mgw: Remove wrong TODO comment ...................................................................... mgw: Remove wrong TODO comment The TODO was written because the author had in mind the ptr where the codec was stored was a MGCP endpoint object, but it is actually an rtp_end which is an object under conn_rtp, so that's fine already with current code. Change-Id: I99d2211e81443883c45cc3fdda10e39a8c152063 --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/49/39249/1 diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index dca98a2..46c6815 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1182,7 +1182,6 @@ goto error3; } /* Upgrade the conn type RTP_DEFAULT->RTP_IUUP if needed based on requested codec: */ - /* TODO: "codec" probably needs to be moved from endp to conn */ if (conn_rtp->type == MGCP_RTP_DEFAULT && strcmp(conn_rtp->end.cset.codec->subtype_name, "VND.3GPP.IUFP") == 0) rc = mgcp_conn_iuup_init(conn_rtp); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39249?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I99d2211e81443883c45cc3fdda10e39a8c152063 Gerrit-Change-Number: 39249 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-mgw[master]: mgw: CRCX: Split mgcp header pars parsing into a previous step
by pespin 07 Jan '25

07 Jan '25
Attention is currently required from: daniel. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email ) Change subject: mgw: CRCX: Split mgcp header pars parsing into a previous step ...................................................................... Patch Set 3: (1 comment) File src/libosmo-mgcp/mgcp_msg.c: https://gerrit.osmocom.org/c/osmo-mgw/+/39224/comment/c0fdba60_2b6414e2?usp… : PS2, Line 172: * \returns 0 when parsing was successful, negative (MGCP cause code) on error. */ > regarding negative returns: I actually took the idea from already existing mgcp_verify_ci(). […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 Gerrit-Change-Number: 39224 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 07 Jan 2025 19:51:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-mgw[master]: mgw: DLCX: Split mgcp header pars parsing into a previous step
by pespin 07 Jan '25

07 Jan '25
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/39240?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: mgw: DLCX: Split mgcp header pars parsing into a previous step ...................................................................... mgw: DLCX: Split mgcp header pars parsing into a previous step Do most of the initial parsing and verification in a prior step, filling in a "parsed" struct which simplifies logic coming after for different message types. Change-Id: I557a3a257ddefedc479a4aff974a74c4e4e2c85d --- M src/libosmo-mgcp/mgcp_protocol.c 1 file changed, 38 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/40/39240/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39240?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I557a3a257ddefedc479a4aff974a74c4e4e2c85d Gerrit-Change-Number: 39240 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in osmo-mgw[master]: mgw: MDCX: Split mgcp header pars parsing into a previous step
by pespin 07 Jan '25

07 Jan '25
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/39239?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: mgw: MDCX: Split mgcp header pars parsing into a previous step ...................................................................... mgw: MDCX: Split mgcp header pars parsing into a previous step Do most of the initial parsing and verification in a prior step, filling in a "parsed" struct which simplifies logic coming after for different message types. This commit only modifies stuff enough to work for MDCX. Further work (commits) will follow for DLCX. Change-Id: I6ecb41fc2cc737c3a161b6bc98bd08ae01909655 --- M include/osmocom/mgcp/mgcp_protocol.h M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 3 files changed, 45 insertions(+), 90 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/39/39239/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39239?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6ecb41fc2cc737c3a161b6bc98bd08ae01909655 Gerrit-Change-Number: 39239 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[L] Change in osmo-mgw[master]: mgw: CRCX: Split mgcp header pars parsing into a previous step
by pespin 07 Jan '25

07 Jan '25
Attention is currently required from: daniel. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?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: mgw: CRCX: Split mgcp header pars parsing into a previous step ...................................................................... mgw: CRCX: Split mgcp header pars parsing into a previous step Do most of the initial parsing and verification in a prior step, filling in a "parsed" struct which simplifies logic coming after for different message types. This commit only modifies stuff enough to work for CRCX. Further work (commits) will follow for MDCX and DLCX. Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 --- M include/osmocom/mgcp/mgcp_msg.h M include/osmocom/mgcp/mgcp_protocol.h M src/libosmo-mgcp/mgcp_msg.c M src/libosmo-mgcp/mgcp_protocol.c 4 files changed, 165 insertions(+), 107 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/24/39224/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 Gerrit-Change-Number: 39224 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-mgw[master]: mgw: Decouple SDP parsing step from conn obj update
by pespin 07 Jan '25

07 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39248?usp=email ) Change subject: mgw: Decouple SDP parsing step from conn obj update ...................................................................... mgw: Decouple SDP parsing step from conn obj update This allows delaying modification of the conn before full parsing succeeds. Change-Id: I4a2aecb542886672c1f586c6607714e0356abe35 --- M include/osmocom/mgcp/mgcp_protocol.h M include/osmocom/mgcp/mgcp_sdp.h M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_sdp.c 4 files changed, 118 insertions(+), 69 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/48/39248/1 diff --git a/include/osmocom/mgcp/mgcp_protocol.h b/include/osmocom/mgcp/mgcp_protocol.h index ffe7ae0..a6a7cec 100644 --- a/include/osmocom/mgcp/mgcp_protocol.h +++ b/include/osmocom/mgcp/mgcp_protocol.h @@ -1,7 +1,35 @@ #pragma once +#include <stdint.h> +#include <sys/socket.h> + #include <osmocom/core/utils.h> +#include <osmocom/core/socket.h> #include <osmocom/mgcp/mgcp_common.h> +#include <osmocom/mgcp/mgcp_codec.h> + + +#define MGCP_PARSE_SDP_PTIME_UNSET (-1) +#define MGCP_PARSE_SDP_MAXPTIME_UNSET (-1) +#define MGCP_PARSE_SDP_RTP_PORT_UNSET (0) + +struct mgcp_parse_sdp { + int ptime; + int maxptime; + int rtp_port; + struct osmo_sockaddr rem_addr; /* Only IP address, port is in rtp_port above */ + struct mgcp_rtp_codecset cset; +}; + +static inline void mgcp_parse_sdp_init(struct mgcp_parse_sdp *sdp) +{ + sdp->ptime = MGCP_PARSE_SDP_PTIME_UNSET; + sdp->maxptime = MGCP_PARSE_SDP_MAXPTIME_UNSET; + sdp->rtp_port = MGCP_PARSE_SDP_RTP_PORT_UNSET; + sdp->rem_addr = (struct osmo_sockaddr){ .u.sa.sa_family = AF_UNSPEC }; + mgcp_codecset_reset(&sdp->cset); +} + #define MGCP_PARSE_HDR_PARS_OSMUX_CID_UNSET (-2) #define MGCP_PARSE_HDR_PARS_OSMUX_CID_WILDCARD (-1) @@ -39,6 +67,7 @@ char *trans; /* MGCP Body: */ struct mgcp_parse_hdr_pars hpars; + struct mgcp_parse_sdp sdp; }; /* Local connection options */ diff --git a/include/osmocom/mgcp/mgcp_sdp.h b/include/osmocom/mgcp/mgcp_sdp.h index 950092e..4a1313f 100644 --- a/include/osmocom/mgcp/mgcp_sdp.h +++ b/include/osmocom/mgcp/mgcp_sdp.h @@ -22,9 +22,9 @@ #pragma once -int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, - struct mgcp_conn_rtp *conn, - struct mgcp_parse_data *p); +struct mgcp_parse_data; + +int mgcp_parse_sdp_data(struct mgcp_parse_data *p); int mgcp_write_response_sdp(const struct mgcp_endpoint *endp, const struct mgcp_conn_rtp *conn, struct msgb *sdp, diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index d066f29..dfd3e0c 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -716,36 +716,59 @@ return 0; } +/* Apply parsed SDP information stored in struct mgcp_parse_sdp to conn_rtp: */ +static int handle_sdp(struct mgcp_conn_rtp *conn, struct mgcp_request_data *rq) +{ + OSMO_ASSERT(conn); + OSMO_ASSERT(rq); + struct mgcp_parse_data *p = rq->pdata; + OSMO_ASSERT(p); + OSMO_ASSERT(p->hpars.have_sdp); + struct mgcp_parse_sdp *sdp = &p->sdp; + struct mgcp_rtp_end *rtp; + + rtp = &conn->end; + + if (sdp->ptime != MGCP_PARSE_SDP_PTIME_UNSET) + mgcp_rtp_end_set_packet_duration_ms(rtp, sdp->ptime); + + if (sdp->maxptime != MGCP_PARSE_SDP_MAXPTIME_UNSET) + rtp->maximum_packet_time = sdp->maxptime; + + if (sdp->rem_addr.u.sa.sa_family != AF_UNSPEC) { + /* Keep port, only apply ip address: */ + uint16_t port = osmo_sockaddr_port(&rtp->addr.u.sa); + memcpy(&rtp->addr, &sdp->rem_addr, sizeof(rtp->addr)); + osmo_sockaddr_set_port(&rtp->addr.u.sa, port); + } + + if (sdp->rtp_port != MGCP_PARSE_SDP_RTP_PORT_UNSET) { + osmo_sockaddr_set_port(&rtp->addr.u.sa, sdp->rtp_port); + rtp->rtcp_port = htons(sdp->rtp_port + 1); + } + + /* Copy parsed codec set to conn: */ + rtp->cset = sdp->cset; + + return 0; +} + /* Process codec information contained in CRCX/MDCX */ -static int handle_codec_info(struct mgcp_conn_rtp *conn, - struct mgcp_request_data *rq, int have_sdp, bool crcx) +static int handle_codec_info(struct mgcp_conn_rtp *conn, struct mgcp_request_data *rq) { struct mgcp_endpoint *endp = rq->endp; struct mgcp_conn *conn_dst; struct mgcp_conn_rtp *conn_dst_rtp; struct mgcp_rtp_codecset *cset = &conn->end.cset; - int rc; - char *cmd; - - if (crcx) - cmd = "CRCX"; - else - cmd = "MDCX"; /* Collect codec information */ - if (have_sdp) { + if (rq->pdata->hpars.have_sdp) { /* If we have SDP, we ignore the local connection options and * use only the SDP information. */ - mgcp_codecset_reset(cset); - rc = mgcp_parse_sdp_data(endp, conn, rq->pdata); - if (rc != 0) { - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "%s: sdp not parseable\n", cmd); - - /* See also RFC 3661: Protocol error */ - return 510; - } + rc = handle_sdp(conn, rq); + if (rc != 0) + goto error; } else if (endp->local_options.codec) { /* When no SDP is available, we use the codec information from * the local connection options (if present) */ @@ -780,9 +803,7 @@ return 0; error: - LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, - "%s: codec negotiation failure\n", cmd); - + LOGPCONN(conn->conn, DLMGCP, LOGL_ERROR, "%s: codec negotiation failure\n", rq->name); /* See also RFC 3661: Codec negotiation failure */ return 534; } @@ -861,6 +882,15 @@ return create_err_response(endp, endp, 523, "CRCX", pdata->trans); } + /* Parse SDP if found: */ + if (hpars->have_sdp) { + rc = mgcp_parse_sdp_data(pdata); + if (rc < 0) { /* See also RFC 3661: Protocol error */ + LOGPENDP(endp, DLMGCP, LOGL_ERROR, "CRCX: sdp not parseable\n"); + return create_err_response(endp, endp, 510, "CRCX", pdata->trans); + } + } + /* If osmux is disabled, just skip setting it up */ if (trunk->cfg->osmux.usage == OSMUX_USAGE_OFF) hpars->remote_osmux_cid = MGCP_PARSE_HDR_PARS_OSMUX_CID_UNSET; @@ -969,7 +999,7 @@ } /* Handle codec information and decide for a suitable codec */ - rc = handle_codec_info(conn_rtp, rq, hpars->have_sdp, true); + rc = handle_codec_info(conn_rtp, rq); mgcp_codecset_summary(&conn_rtp->end.cset, mgcp_conn_dump(conn)); if (rc) { error_code = rc; @@ -1103,6 +1133,15 @@ return create_err_response(endp, endp, error_code, "MDCX", pdata->trans); } + /* Parse SDP if found: */ + if (hpars->have_sdp) { + rc = mgcp_parse_sdp_data(pdata); + if (rc < 0) { /* See also RFC 3661: Protocol error */ + LOGPENDP(endp, DLMGCP, LOGL_ERROR, "MDCX: sdp not parseable\n"); + return create_err_response(endp, endp, 510, "MDCX", pdata->trans); + } + } + conn = mgcp_endp_get_conn(endp, hpars->connid); if (!conn) { rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_MDCX_FAIL_CONN_NOT_FOUND)); @@ -1136,7 +1175,7 @@ OSMO_ASSERT(conn_rtp); /* Handle codec information and decide for a suitable codec */ - rc = handle_codec_info(conn_rtp, rq, hpars->have_sdp, false); + rc = handle_codec_info(conn_rtp, rq); mgcp_codecset_summary(&conn_rtp->end.cset, mgcp_conn_dump(conn)); if (rc) { error_code = rc; diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c index ffd0f18..1d76ddb 100644 --- a/src/libosmo-mgcp/mgcp_sdp.c +++ b/src/libosmo-mgcp/mgcp_sdp.c @@ -312,16 +312,13 @@ } /*! Analyze SDP input string. - * \param[in] endp trunk endpoint. - * \param[out] conn associated rtp connection. - * \param[out] caller provided memory to store the parsing results. + * \param[inout] p provided memory to store the parsing results. * - * Note: In conn (conn->end) the function returns the packet duration, - * rtp port, rtcp port and the codec information. * \returns 0 on success, -1 on failure. */ -int mgcp_parse_sdp_data(const struct mgcp_endpoint *endp, - struct mgcp_conn_rtp *conn, struct mgcp_parse_data *p) +int mgcp_parse_sdp_data(struct mgcp_parse_data *p) { + OSMO_ASSERT(p); + struct mgcp_parse_sdp *sdp = &p->sdp; struct sdp_rtp_map codecs[MGCP_MAX_CODECS]; unsigned int codecs_used = 0; struct sdp_fmtp_param fmtp_params[MGCP_MAX_CODECS]; @@ -331,19 +328,14 @@ char *line; unsigned int i; void *tmp_ctx = talloc_new(NULL); - struct mgcp_rtp_end *rtp; int payload_type; int ptime, ptime2 = 0; char audio_name[64]; int port, rc; - OSMO_ASSERT(endp); - OSMO_ASSERT(conn); - OSMO_ASSERT(p); - - rtp = &conn->end; memset(&codecs, 0, sizeof(codecs)); + mgcp_parse_sdp_init(sdp); for_each_line(line, p->save) { switch (line[0]) { @@ -361,19 +353,19 @@ if (sscanf(line, "a=ptime:%d-%d", &ptime, &ptime2) >= 1) { if (ptime2 > 0 && ptime2 != ptime) - mgcp_rtp_end_set_packet_duration_ms(rtp, 0); + sdp->ptime = 0; else - mgcp_rtp_end_set_packet_duration_ms(rtp, ptime); + sdp->ptime = ptime; break; } if (sscanf(line, "a=maxptime:%d", &ptime2) == 1) { - rtp->maximum_packet_time = ptime2; + sdp->maxptime = ptime2; break; } if (strncmp("a=fmtp:", line, 6) == 0) { - rc = fmtp_from_sdp(conn->conn, &fmtp_params[fmtp_used], line); + rc = fmtp_from_sdp(tmp_ctx, &fmtp_params[fmtp_used], line); if (rc >= 0) fmtp_used++; break; @@ -382,33 +374,23 @@ break; case 'm': rc = sscanf(line, "m=audio %d RTP/AVP", &port); - if (rc == 1) { - osmo_sockaddr_set_port(&rtp->addr.u.sa, port); - rtp->rtcp_port = htons(port + 1); - } + if (rc == 1) + sdp->rtp_port = port; - rc = pt_from_sdp(conn->conn, codecs, - ARRAY_SIZE(codecs), line); + rc = pt_from_sdp(tmp_ctx, codecs, ARRAY_SIZE(codecs), line); if (rc > 0) codecs_used = rc; break; case 'c': - if (audio_ip_from_sdp(&rtp->addr, line) < 0) { + if (audio_ip_from_sdp(&sdp->rem_addr, line) < 0) { talloc_free(tmp_ctx); return -1; } break; default: - if (endp) - /* TODO: Check spec: We used the bare endpoint number before, - * now we use the endpoint name as a whole? Is this allowed? */ - LOGP(DLMGCP, LOGL_NOTICE, - "Unhandled SDP option: '%c'/%d on %s\n", - line[0], line[0], endp->name); - else - LOGP(DLMGCP, LOGL_NOTICE, - "Unhandled SDP option: '%c'/%d\n", - line[0], line[0]); + LOGP(DLMGCP, LOGL_NOTICE, + "Unhandled SDP option: '%c'/%d on %s\n", + line[0], line[0], p->epname); break; } } @@ -422,23 +404,22 @@ /* Store parsed codec information */ for (i = 0; i < codecs_used; i++) { codec_param = param_by_pt(codecs[i].payload_type, fmtp_params, fmtp_used); - rc = mgcp_codecset_add_codec(&conn->end.cset, codecs[i].payload_type, codecs[i].map_line, codec_param); + rc = mgcp_codecset_add_codec(&sdp->cset, codecs[i].payload_type, codecs[i].map_line, codec_param); if (rc < 0) - LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "failed to add codec\n"); + LOGP(DLMGCP, LOGL_NOTICE, "%s: failed to add codec\n", p->epname); } talloc_free(tmp_ctx); - LOGPCONN(conn->conn, DLMGCP, LOGL_NOTICE, - "Got media info via SDP: port:%d, addr:%s, duration:%d, payload-types:", - osmo_sockaddr_port(&rtp->addr.u.sa), osmo_sockaddr_ntop(&rtp->addr.u.sa, ipbuf), - rtp->packet_duration_ms); + LOGP(DLMGCP, LOGL_NOTICE, + "%s: Got media info via SDP: port:%d, addr:%s, duration:%d, payload-types:", + p->epname, sdp->rtp_port, osmo_sockaddr_ntop(&sdp->rem_addr.u.sa, ipbuf), sdp->ptime); if (codecs_used == 0) LOGPC(DLMGCP, LOGL_NOTICE, "none"); for (i = 0; i < codecs_used; i++) { LOGPC(DLMGCP, LOGL_NOTICE, "%d=%s", - rtp->cset.codecs[i].payload_type, - strlen(rtp->cset.codecs[i].subtype_name) ? rtp->cset.codecs[i].subtype_name : "unknown"); + sdp->cset.codecs[i].payload_type, + strlen(sdp->cset.codecs[i].subtype_name) ? sdp->cset.codecs[i].subtype_name : "unknown"); LOGPC(DLMGCP, LOGL_NOTICE, " "); } LOGPC(DLMGCP, LOGL_NOTICE, "\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39248?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I4a2aecb542886672c1f586c6607714e0356abe35 Gerrit-Change-Number: 39248 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-mgw[master]: mgw: CRCX: Split mgcp header pars parsing into a previous step
by pespin 07 Jan '25

07 Jan '25
Attention is currently required from: daniel. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email ) Change subject: mgw: CRCX: Split mgcp header pars parsing into a previous step ...................................................................... Patch Set 2: (1 comment) File src/libosmo-mgcp/mgcp_msg.c: https://gerrit.osmocom.org/c/osmo-mgw/+/39224/comment/3f5e2e40_4baa4e8c?usp… : PS2, Line 172: * \returns 0 when parsing was successful, negative (MGCP cause code) on error. */ > The error returns here are not negative. […] regarding negative returns: I actually took the idea from already existing mgcp_verify_ci(). It's true though that mgcp_parse_header() returns them in negative values. regarding defines for protocol errors, I'll really skip that now and leave it to somebody else (or me) for the future, since I'm already refactoring quite a lot of stuff and I try to leave the error paths as similar as possible. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 Gerrit-Change-Number: 39224 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 07 Jan 2025 19:33:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.