[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-12 Thread neels
neels has submitted this change. ( 
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-client caller (in the osmocom-cni world) has used
these structs in years and years. Everyone 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(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved




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   whatdescription / commit summary line
+libosmo-mgcp-clientremove 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_MODE0x0020
-#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 

[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-08 Thread pespin
Attention is currently required from: laforge, neels.

pespin 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 3: Code-Review+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: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 08 Dec 2023 12:59:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-07 Thread neels
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, laforge, pespin,

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 (#3).

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by pespin, 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-client caller (in the osmocom-cni world) has used
these structs in years and years. Everyone 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/3
--
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: 3
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-07 Thread neels
Attention is currently required from: laforge.

neels 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 2:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/95d25dcc_45d7d400
PS2, Line 12: mgcp
> libosmo-mgcp-client
Done



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 08 Dec 2023 06:04:04 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-07 Thread laforge
Attention is currently required from: neels.

laforge 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 2: Code-Review+1

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/35246/comment/2bdd9ba9_66be4cba
PS2, Line 12: mgcp
libosmo-mgcp-client



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 07 Dec 2023 13:14:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-07 Thread pespin
Attention is currently required from: neels.

pespin 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 2: Code-Review+1


--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 07 Dec 2023 12:47:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-06 Thread neels
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels 
Gerrit-MessageType: newpatchset


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-06 Thread Jenkins Builder
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 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Thu, 07 Dec 2023 03:35:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: client: move some items to internal header

2023-12-06 Thread neels
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   whatdescription / commit summary line
+libosmo-mgcp-clientremove 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_MODE0x0020
-#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