osmo-mgw: rename struct mgcp_trunk_config and symbol tcfg

rename struct mgcp_trunk_config to struct mgcp_trunk and the related
symbol name "tcfg" to "trunk" in order to better match the reality.

Change-Id: I02889dbf8149e139b1bd0326e13ce4c1aec867d1
Related: OS#2659
diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h
index 27b1e35..538c907 100644
--- a/include/osmocom/mgcp/mgcp.h
+++ b/include/osmocom/mgcp/mgcp.h
@@ -42,7 +42,7 @@
  */
 struct mgcp_endpoint;
 struct mgcp_config;
-struct mgcp_trunk_config;
+struct mgcp_trunk;
 struct mgcp_rtp_end;
 
 #define MGCP_ENDP_CRCX 1
@@ -59,9 +59,9 @@
 #define MGCP_POLICY_REJECT	5
 #define MGCP_POLICY_DEFER	6
 
-typedef int (*mgcp_change)(struct mgcp_trunk_config *cfg, int endpoint, int state);
-typedef int (*mgcp_policy)(struct mgcp_trunk_config *cfg, int endpoint, int state, const char *transactio_id);
-typedef int (*mgcp_reset)(struct mgcp_trunk_config *cfg);
+typedef int (*mgcp_change)(struct mgcp_trunk *cfg, int endpoint, int state);
+typedef int (*mgcp_policy)(struct mgcp_trunk *cfg, int endpoint, int state, const char *transactio_id);
+typedef int (*mgcp_reset)(struct mgcp_trunk *cfg);
 typedef int (*mgcp_rqnt)(struct mgcp_endpoint *endp, char tone);
 
 /**
@@ -177,7 +177,7 @@
 	MGCP_DLCX_DEFERRED_BY_POLICY,
 };
 
-struct mgcp_trunk_config {
+struct mgcp_trunk {
 	struct llist_head entry;
 
 	struct mgcp_config *cfg;
@@ -263,7 +263,7 @@
 	/* trunk handling */
 
 	/* virtual trunk for RTP - RTP endpoints */
-	struct mgcp_trunk_config *virt_trunk;
+	struct mgcp_trunk *virt_trunk;
 	/* physical trunks with underlying E1 endpoints */
 	struct llist_head trunks;
 
@@ -302,8 +302,8 @@
 int mgcp_parse_config(const char *config_file, struct mgcp_config *cfg,
 		      enum mgcp_role role);
 int mgcp_vty_init(void);
-int mgcp_endpoints_allocate(struct mgcp_trunk_config *cfg);
-void mgcp_trunk_set_keepalive(struct mgcp_trunk_config *tcfg, int interval);
+int mgcp_endpoints_allocate(struct mgcp_trunk *cfg);
+void mgcp_trunk_set_keepalive(struct mgcp_trunk *trunk, int interval);
 
 /*
  * format helper functions
diff --git a/include/osmocom/mgcp/mgcp_endp.h b/include/osmocom/mgcp/mgcp_endp.h
index 4c2caad..8fa8390 100644
--- a/include/osmocom/mgcp/mgcp_endp.h
+++ b/include/osmocom/mgcp/mgcp_endp.h
@@ -81,7 +81,7 @@
 	struct mgcp_config *cfg;
 
 	/*! Backpointer to the Trunk specific configuration */
-	struct mgcp_trunk_config *tcfg;
+	struct mgcp_trunk *trunk;
 
 	/*! Endpoint properties (see above) */
 	const struct mgcp_endpoint_type *type;
@@ -101,6 +101,6 @@
 };
 
 /*! Extract endpoint number for a given endpoint */
-#define ENDPOINT_NUMBER(endp) abs((int)(endp - endp->tcfg->endpoints))
+#define ENDPOINT_NUMBER(endp) abs((int)(endp - endp->trunk->endpoints))
 
 void mgcp_endp_release(struct mgcp_endpoint *endp);
diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h
index 670332d..b2e2210 100644
--- a/include/osmocom/mgcp/mgcp_internal.h
+++ b/include/osmocom/mgcp/mgcp_internal.h
@@ -282,8 +282,8 @@
 	return endpoint + 60;
 }
 
-struct mgcp_trunk_config *mgcp_trunk_alloc(struct mgcp_config *cfg, enum mgcp_trunk_type ttype, int index);
-struct mgcp_trunk_config *mgcp_trunk_num(struct mgcp_config *cfg, int index);
+struct mgcp_trunk *mgcp_trunk_alloc(struct mgcp_config *cfg, enum mgcp_trunk_type ttype, int index);
+struct mgcp_trunk *mgcp_trunk_num(struct mgcp_config *cfg, int index);
 
 char *get_lco_identifier(const char *options);
 int check_local_cx_options(void *ctx, const char *options);