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.

Change-Id: I20dcdaac013e3bcbd870eaf34a17598eac373f95
This commit is contained in:
Philipp Maier 2017-06-08 15:28:39 +02:00 committed by Neels Hofmeyr
parent 00a0862e9c
commit 95e1a3b53c
2 changed files with 15 additions and 15 deletions

View File

@ -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);

View File

@ -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 */