summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-06-08 15:28:39 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-06-18 17:50:09 +0200
commit21521acd3f9147db01fde7729181c26769efdc77 (patch)
treedb8e45d926ade8e38ac196d506f980d53a33104b
parentcf04ac42b1981805b028ea02d42456d53299e62d (diff)
mgcp: make structs accessible from outside
struct mgcpgw_client and struct mgcp_inuse_endpoint are not accessible from outside, making it difficult to look in the mgcp client properties and status. The commit moves the structs into the header file.
-rw-r--r--openbsc/include/openbsc/mgcpgw_client.h16
-rw-r--r--openbsc/src/libmgcp/mgcpgw_client.c14
2 files changed, 15 insertions, 15 deletions
diff --git a/openbsc/include/openbsc/mgcpgw_client.h b/openbsc/include/openbsc/mgcpgw_client.h
index 87fb276..de3fe6a 100644
--- a/openbsc/include/openbsc/mgcpgw_client.h
+++ b/openbsc/include/openbsc/mgcpgw_client.h
@@ -3,11 +3,11 @@
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/write_queue.h>
enum mgcp_connection_mode;
struct msgb;
-struct mgcpgw_client;
struct vty;
#define MGCPGW_CLIENT_LOCAL_ADDR_DEFAULT "0.0.0.0"
@@ -40,6 +40,20 @@ struct mgcp_response {
uint16_t audio_port;
};
+struct mgcpgw_client {
+ struct mgcpgw_client_conf actual;
+ uint32_t remote_addr;
+ struct osmo_wqueue wq;
+ mgcp_trans_id_t next_trans_id;
+ struct llist_head responses_pending;
+ struct llist_head inuse_endpoints;
+};
+
+struct mgcp_inuse_endpoint {
+ struct llist_head entry;
+ uint16_t id;
+};
+
/* 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);
diff --git a/openbsc/src/libmgcp/mgcpgw_client.c b/openbsc/src/libmgcp/mgcpgw_client.c
index 2cafcf2..0c5b5ca 100644
--- a/openbsc/src/libmgcp/mgcpgw_client.c
+++ b/openbsc/src/libmgcp/mgcpgw_client.c
@@ -35,20 +35,6 @@
#include <unistd.h>
#include <string.h>
-struct mgcpgw_client {
- struct mgcpgw_client_conf actual;
- uint32_t remote_addr;
- struct osmo_wqueue wq;
- mgcp_trans_id_t next_trans_id;
- struct llist_head responses_pending;
- struct llist_head inuse_endpoints;
-};
-
-struct mgcp_inuse_endpoint {
- struct llist_head entry;
- uint16_t id;
-};
-
void mgcpgw_client_conf_init(struct mgcpgw_client_conf *conf)
{
/* NULL and -1 default to MGCPGW_CLIENT_*_DEFAULT values */