From b0c05aa3a9c5d69290eb454814fb4fca55544a16 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 6 Jul 2020 11:52:19 +0200 Subject: [PATCH] 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 --- include/osmocom/mgcp/mgcp_conn.h | 41 +++++++++++++++++++++++++++ include/osmocom/mgcp/mgcp_internal.h | 42 ---------------------------- 2 files changed, 41 insertions(+), 42 deletions(-) diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index f4e89f293..ff5a779fd 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -33,6 +33,47 @@ LOGPENDP((conn)->endp, cat, level, "CI:%s " fmt, \ (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 e415bbcad..a9d5ea4dc 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -153,7 +153,6 @@ enum mgcp_conn_rtp_type { }; #include -struct mgcp_conn; /* MGCP connection (RTP) */ struct mgcp_conn_rtp { @@ -196,47 +195,6 @@ struct mgcp_conn_rtp { 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 struct mgcp_endpoint_type;