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
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
by osmith 07 Dec '23

07 Dec '23
Attention is currently required from: laforge, neels, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 07 Dec 2023 08:37:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
by neels 07 Dec '23

07 Dec '23
Attention is currently required from: laforge, osmith, pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email ) Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail ...................................................................... Patch Set 2: (2 comments) File include/osmocom/core/utils.h: https://gerrit.osmocom.org/c/libosmocore/+/35207/comment/0bf789f8_bb1c30ef PS2, Line 288: #define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && (STRBUF).pos > (STRBUF).buf ? \ > I would really welcome some extra formatting (lines) and more parenthesis to make this readable at a […] ack on the parens, the line formatting "ok if you need that" File src/core/utils.c: https://gerrit.osmocom.org/c/libosmocore/+/35207/comment/ab90371f_4cbcb308 PS2, Line 1238: if (!sb->pos) > how is it is possible that if n_chars were written to sb->pos, sb->pos is null? This makes no sense […] added comment to explain -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 07 Dec 2023 03:54:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: util: add OSMO_STRBUF_REMAIN()
by neels 07 Dec '23

07 Dec '23
Attention is currently required from: neels. Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: util: add OSMO_STRBUF_REMAIN() ...................................................................... util: add OSMO_STRBUF_REMAIN() This code already exists twice, and upcoming patch will need this as well in logging.c. Add a macro to remove the code dup. Related: OS#6284 Related: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c --- M include/osmocom/core/utils.h 1 file changed, 19 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/06/35206/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35206?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6f2991125882bff948708bbb4ae218f9f3d1e50c Gerrit-Change-Number: 35206 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmocore[master]: logging: fix nul octets in log output / use osmo_strbuf
by neels 07 Dec '23

07 Dec '23
Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35208?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: logging: fix nul octets in log output / use osmo_strbuf ...................................................................... logging: fix nul octets in log output / use osmo_strbuf Patch [1] merged few weeks ago, for yet unknown reasons, sprinkles nul characters at seemingly randomly chosen log line ends. Trying to figure out why that happens, i got tired of the unreadable cruft, and decided to migrate the _output_buf() implementation to osmo_strbuf first. With osmo_strbuf in use and implementing 1:1 what the previous code did, the odd nul octets have disappeared. So the bug was caused by unreadable code. [1] 11a416827dd9f2da6b7c1db0e1e83adb1e6e5cc8 Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433 "logging: ensure ANSI color escape is sent in same line/before newline" Related: OS#6284 Related: Ia7de9d88aa5ac48ec0d5c1a931a89d21c02c5433 Change-Id: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 --- M src/core/logging.c 1 file changed, 70 insertions(+), 84 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/35208/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35208?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 Gerrit-Change-Number: 35208 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmocore[master]: util: add osmo_strbuf macros to manipulate the strbuf tail
by neels 07 Dec '23

07 Dec '23
Attention is currently required from: laforge, neels, osmith. Hello Jenkins Builder, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail ...................................................................... util: add osmo_strbuf macros to manipulate the strbuf tail Upcoming patch adopts osmo_strbuf in logging.c, which sometimes needs to steal and re-add trailing newline characters, and also needs to let ctime_r() write to the buffer before updating the osmo_strbuf state. Related: OS#6284 Related: Ib577a5e0d7450ce93ff21f37ba3262704cbf4752 Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 --- M include/osmocom/core/utils.h M src/core/libosmocore.map M src/core/utils.c M tests/utils/utils_test.c M tests/utils/utils_test.ok 5 files changed, 178 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/35207/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I997707c328eab3ffa00a78fdb9a0a2cbe18404b4 Gerrit-Change-Number: 35207 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-mgw[master]: client: move some items to internal header
by neels 07 Dec '23

07 Dec '23
Attention is currently required from: neels. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?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: client: move some items to internal header ...................................................................... client: move some items to internal header There is an upcoming modification of structs mgcp_msg and mgcp_response. When it is public API, it needs to be kept backwards compatible. But no libosmo-mgcp caller (in the osmocom-cni world) has used these structs in years and years. All libosmo-mgcp-client users should use the higher level osmo_mgcpc_* API only. Move this legacy API to a private header, so we no longer need to worry about compatibility there. Related: OS#6171 Related: I798e02c6663376d3d52f4a74fc4b32411ce95bed Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 --- M TODO-RELEASE M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_internal.h M src/libosmo-mgcp-client/mgcp_client_fsm.c 4 files changed, 99 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/35246/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-mgw[master]: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better
by neels 07 Dec '23

07 Dec '23
Attention is currently required from: dexter. neels has uploaded a new patch set (#11) to the change originally created by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email ) The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better ...................................................................... mgcp_client_fsm: explain member param in struct mgcp_conn_peer better The struct member param specifies additional codec parameters. Let's improve its explaination. Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19 Related: OS#6171 --- M include/osmocom/mgcp_client/mgcp_client_fsm.h 1 file changed, 15 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34350/11 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19 Gerrit-Change-Number: 34350 Gerrit-PatchSet: 11 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-mgw[master]: client: move some items to internal header
by Jenkins Builder 07 Dec '23

07 Dec '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header ...................................................................... Patch Set 1: (3 comments) File include/osmocom/mgcp_client/mgcp_client_internal.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12884): https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/48def2e0_67592516 PS1, Line 49: typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv); do not add new typedefs Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12884): https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/00755ee2_57a16d45 PS1, Line 49: typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv); space prohibited after that '*' (ctx:BxW) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-12884): https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/1753938f_2a065949 PS1, Line 49: typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv); space prohibited before that close parenthesis ')' -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 07 Dec 2023 03:35:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-mgw[master]: mgcp_client_test: fix function name
by neels 07 Dec '23

07 Dec '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email ) Change subject: mgcp_client_test: fix function name ...................................................................... mgcp_client_test: fix function name Change-Id: I213f9b2713ff80a16603b8342c204cb546cc782d --- M tests/mgcp_client/mgcp_client_test.c 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/45/35245/1 diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c index 37c5f6c..a39f19b 100644 --- a/tests/mgcp_client/mgcp_client_test.c +++ b/tests/mgcp_client/mgcp_client_test.c @@ -531,7 +531,7 @@ OSMO_ASSERT(!failures); } -static void test_map_pt_to_codec(void) +static void test_map_str_to_codec(void) { /* Full form */ OSMO_ASSERT(map_str_to_codec("PCMU/8000/1") == CODEC_PCMU_8000_1); @@ -703,7 +703,7 @@ test_mgcp_client_cancel(); test_sdp_section_start(); test_map_codec_to_pt_and_map_pt_to_codec(); - test_map_pt_to_codec(); + test_map_str_to_codec(); test_mgcp_client_e1_epname(); printf("Done\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35245?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I213f9b2713ff80a16603b8342c204cb546cc782d Gerrit-Change-Number: 35245 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-mgw[master]: client: move some items to internal header
by neels 07 Dec '23

07 Dec '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email ) Change subject: client: move some items to internal header ...................................................................... client: move some items to internal header There is an upcoming modification of structs mgcp_msg and mgcp_response. When it is public API, it needs to be kept backwards compatible. But no libosmo-mgcp caller (in the osmocom-cni world) has used these structs in years and years. All libosmo-mgcp-client users should use the higher level osmo_mgcpc_* API only. Move this legacy API to a private header, so we no longer need to worry about compatibility there. Related: OS#6171 Related: I798e02c6663376d3d52f4a74fc4b32411ce95bed Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 --- M TODO-RELEASE M include/osmocom/mgcp_client/mgcp_client.h M include/osmocom/mgcp_client/mgcp_client_internal.h M src/libosmo-mgcp-client/mgcp_client_fsm.c 4 files changed, 99 insertions(+), 65 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/35246/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index c5a3b36..82368ff 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -24,3 +24,14 @@ # If any interfaces have been removed or changed since the last public release, a=0. # #library what description / commit summary line +libosmo-mgcp-client remove public API These public API items have not been called by any of our osmo-programs + for many years. Any sane caller of libosmo-mgcp-client should use the + higher level osmo_mgcpc_* API instead. Move these to a private header: + struct mgcp_response_head + struct mgcp_response + struct mgcp_msg + mgcp_response_parse_params() + mgcp_client_tx() + mgcp_client_cancel() + mgcp_msg_gen() + mgcp_msg_trans_id() diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h index 9a0611a..a96ae19 100644 --- a/include/osmocom/mgcp_client/mgcp_client.h +++ b/include/osmocom/mgcp_client/mgcp_client.h @@ -79,28 +79,6 @@ unsigned int pt; }; -struct mgcp_response_head { - int response_code; - mgcp_trans_id_t trans_id; - char comment[MGCP_COMMENT_MAXLEN]; - char conn_id[MGCP_CONN_ID_MAXLEN]; - char endpoint[MGCP_ENDPOINT_MAXLEN]; - bool x_osmo_osmux_use; - uint8_t x_osmo_osmux_cid; -}; - -struct mgcp_response { - char *body; - struct mgcp_response_head head; - uint16_t audio_port; - char audio_ip[INET6_ADDRSTRLEN]; - unsigned int ptime; - enum mgcp_codecs codecs[MGCP_MAX_CODECS]; - unsigned int codecs_len; - struct ptmap ptmap[MGCP_MAX_CODECS]; - unsigned int ptmap_len; -}; - enum mgcp_verb { MGCP_VERB_CRCX, MGCP_VERB_MDCX, @@ -109,37 +87,6 @@ MGCP_VERB_RSIP, }; -#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001 -#define MGCP_MSG_PRESENCE_CALL_ID 0x0002 -#define MGCP_MSG_PRESENCE_CONN_ID 0x0004 -#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008 -#define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010 -#define MGCP_MSG_PRESENCE_CONN_MODE 0x0020 -#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000 -#define MGCP_MSG_PRESENCE_X_OSMO_IGN 0x8000 - -struct mgcp_msg { - enum mgcp_verb verb; - /* See MGCP_MSG_PRESENCE_* constants */ - uint32_t presence; - char endpoint[MGCP_ENDPOINT_MAXLEN]; - unsigned int call_id; - char *conn_id; - uint16_t audio_port; - char *audio_ip; - enum mgcp_connection_mode conn_mode; - unsigned int ptime; - enum mgcp_codecs codecs[MGCP_MAX_CODECS]; - unsigned int codecs_len; - struct ptmap ptmap[MGCP_MAX_CODECS]; - unsigned int ptmap_len; - uint32_t x_osmo_ign; - bool x_osmo_osmux_use; - int x_osmo_osmux_cid; /* -1 is wildcard */ - bool param_present; - struct mgcp_codec_param param; -}; - struct mgcp_client_conf *mgcp_client_conf_alloc(void *ctx); void mgcp_client_conf_init(struct mgcp_client_conf *conf) OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT("use mgcp_client_conf_alloc() (or even better, switch to the mgcp_client_pool API!)"); void mgcp_client_vty_init(void *talloc_ctx, int node, struct mgcp_client_conf *conf); @@ -161,20 +108,8 @@ const char *mgcp_client_e1_epname(void *ctx, const struct mgcp_client *mgcp, uint8_t trunk_id, uint8_t ts, uint8_t rate, uint8_t offset); -/* Invoked when an MGCP response is received or sending failed. When the - * response is passed as NULL, this indicates failure during transmission. */ -typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv); -int mgcp_response_parse_params(struct mgcp_response *r); - -int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, - mgcp_response_cb_t response_cb, void *priv); -int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id); - enum mgcp_connection_mode; -struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); -mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg); - extern const struct value_string mgcp_client_connection_mode_strs[]; static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode) { diff --git a/include/osmocom/mgcp_client/mgcp_client_internal.h b/include/osmocom/mgcp_client/mgcp_client_internal.h index d0ae76b..bea49cd 100644 --- a/include/osmocom/mgcp_client/mgcp_client_internal.h +++ b/include/osmocom/mgcp_client/mgcp_client_internal.h @@ -22,6 +22,32 @@ bool conn_up; }; +struct mgcp_response_head { + int response_code; + mgcp_trans_id_t trans_id; + char comment[MGCP_COMMENT_MAXLEN]; + char conn_id[MGCP_CONN_ID_MAXLEN]; + char endpoint[MGCP_ENDPOINT_MAXLEN]; + bool x_osmo_osmux_use; + uint8_t x_osmo_osmux_cid; +}; + +struct mgcp_response { + char *body; + struct mgcp_response_head head; + uint16_t audio_port; + char audio_ip[INET6_ADDRSTRLEN]; + unsigned int ptime; + enum mgcp_codecs codecs[MGCP_MAX_CODECS]; + unsigned int codecs_len; + struct ptmap ptmap[MGCP_MAX_CODECS]; + unsigned int ptmap_len; +}; + +/* Invoked when an MGCP response is received or sending failed. When the + * response is passed as NULL, this indicates failure during transmission. */ +typedef void (* mgcp_response_cb_t )(struct mgcp_response *response, void *priv); + struct mgcp_response_pending { struct llist_head entry; @@ -37,3 +63,43 @@ mgcp_trans_id_t trans_id, mgcp_response_cb_t response_cb, void *priv); + +#define MGCP_MSG_PRESENCE_ENDPOINT 0x0001 +#define MGCP_MSG_PRESENCE_CALL_ID 0x0002 +#define MGCP_MSG_PRESENCE_CONN_ID 0x0004 +#define MGCP_MSG_PRESENCE_AUDIO_IP 0x0008 +#define MGCP_MSG_PRESENCE_AUDIO_PORT 0x0010 +#define MGCP_MSG_PRESENCE_CONN_MODE 0x0020 +#define MGCP_MSG_PRESENCE_X_OSMO_OSMUX_CID 0x4000 +#define MGCP_MSG_PRESENCE_X_OSMO_IGN 0x8000 + +struct mgcp_msg { + enum mgcp_verb verb; + /* See MGCP_MSG_PRESENCE_* constants */ + uint32_t presence; + char endpoint[MGCP_ENDPOINT_MAXLEN]; + unsigned int call_id; + char *conn_id; + uint16_t audio_port; + char *audio_ip; + enum mgcp_connection_mode conn_mode; + unsigned int ptime; + enum mgcp_codecs codecs[MGCP_MAX_CODECS]; + unsigned int codecs_len; + struct ptmap ptmap[MGCP_MAX_CODECS]; + unsigned int ptmap_len; + uint32_t x_osmo_ign; + bool x_osmo_osmux_use; + int x_osmo_osmux_cid; /* -1 is wildcard */ + bool param_present; + struct mgcp_codec_param param; +}; + +int mgcp_response_parse_params(struct mgcp_response *r); + +int mgcp_client_tx(struct mgcp_client *mgcp, struct msgb *msg, + mgcp_response_cb_t response_cb, void *priv); +int mgcp_client_cancel(struct mgcp_client *mgcp, mgcp_trans_id_t trans_id); + +struct msgb *mgcp_msg_gen(struct mgcp_client *mgcp, struct mgcp_msg *mgcp_msg); +mgcp_trans_id_t mgcp_msg_trans_id(struct msgb *msg); diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c index 432ad84..14aacd1 100644 --- a/src/libosmo-mgcp-client/mgcp_client_fsm.c +++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c @@ -19,6 +19,7 @@ */ #include <osmocom/mgcp_client/mgcp_client.h> +#include <osmocom/mgcp_client/mgcp_client_internal.h> #include <osmocom/mgcp_client/mgcp_client_fsm.h> #include <osmocom/core/utils.h> #include <osmocom/core/fsm.h> -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6d8bdda5c2ffa236e94a0b6111de4dbfac923187 Gerrit-Change-Number: 35246 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • ...
  • 161
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.