mgcp_conn: move struct mgcp_conn mgcp_conn.h
The struct mgcp_conn is currently defined in mgcp_internal.h, however it
makes more sense to put the struct in mgcp_conn.h
Change-Id: Ibe9a356300ddb9567432fe48e37c956b7125c79c
Related: OS#2659
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index f4e89f2..ff5a779 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -33,6 +33,47 @@
(conn)->id, \
## args)
+/*! Connection type, specifies which member of the union "u" in mgcp_conn
+ * contains a useful connection description (currently only RTP) */
+enum mgcp_conn_type {
+ MGCP_CONN_TYPE_RTP,
+};
+
+/*! MGCP connection (untyped) */
+struct mgcp_conn {
+ /*! list head */
+ struct llist_head entry;
+
+ /*! Backpointer to the endpoint where the conn belongs to */
+ struct mgcp_endpoint *endp;
+
+ /*! type of the connection (union) */
+ enum mgcp_conn_type type;
+
+ /*! mode of the connection */
+ enum mgcp_connection_mode mode;
+
+ /*! copy of the mode to restore the original setting (VTY) */
+ enum mgcp_connection_mode mode_orig;
+
+ /*! connection id to identify the connection */
+ char id[MGCP_CONN_ID_MAXLEN];
+
+ /*! human readable name (vty, logging) */
+ char name[256];
+
+ /*! activity tracker (for cleaning up inactive connections) */
+ struct osmo_timer_list watchdog;
+
+ /*! union with connection description */
+ union {
+ struct mgcp_conn_rtp rtp;
+ } u;
+
+ /*! pointer to optional private data */
+ void *priv;
+};
+
/* RTP connection related counters */
enum {
IN_STREAM_ERR_TSTMP_CTR,
diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h
index e415bbc..a9d5ea4 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -153,7 +153,6 @@
};
#include <osmocom/mgcp/osmux.h>
-struct mgcp_conn;
/* MGCP connection (RTP) */
struct mgcp_conn_rtp {
@@ -196,47 +195,6 @@
struct rate_ctr_group *rate_ctr_group;
};
-/*! Connection type, specifies which member of the union "u" in mgcp_conn
- * contains a useful connection description (currently only RTP) */
-enum mgcp_conn_type {
- MGCP_CONN_TYPE_RTP,
-};
-
-/*! MGCP connection (untyped) */
-struct mgcp_conn {
- /*! list head */
- struct llist_head entry;
-
- /*! Backpointer to the endpoint where the conn belongs to */
- struct mgcp_endpoint *endp;
-
- /*! type of the connection (union) */
- enum mgcp_conn_type type;
-
- /*! mode of the connection */
- enum mgcp_connection_mode mode;
-
- /*! copy of the mode to restore the original setting (VTY) */
- enum mgcp_connection_mode mode_orig;
-
- /*! connection id to identify the connection */
- char id[MGCP_CONN_ID_MAXLEN];
-
- /*! human readable name (vty, logging) */
- char name[256];
-
- /*! activity tracker (for cleaning up inactive connections) */
- struct osmo_timer_list watchdog;
-
- /*! union with connection description */
- union {
- struct mgcp_conn_rtp rtp;
- } u;
-
- /*! pointer to optional private data */
- void *priv;
-};
-
#include <osmocom/mgcp/mgcp_conn.h>
struct mgcp_endpoint_type;