SUA: Ensure osmo_ prefix is used on all global symbols
diff --git a/sigtran/sua.c b/sigtran/sua.c
index e7326cb..42c3b94 100644
--- a/sigtran/sua.c
+++ b/sigtran/sua.c
@@ -61,7 +61,7 @@
 	osmo_prim_cb prim_cb;
 };
 
-struct sua_link {
+struct osmo_sua_link {
 	/* list of SUA links per sua_user */
 	struct llist_head list;
 	/* sua user to which we belong */
@@ -101,7 +101,7 @@
 
 struct sua_connection {
 	struct llist_head list;
-	struct sua_link *link;
+	struct osmo_sua_link *link;
 	struct osmo_sccp_addr calling_addr;
 	struct osmo_sccp_addr called_addr;
 	uint32_t conn_id;
@@ -204,11 +204,11 @@
  * SUA Link and Connection handling
  ***********************************************************************/
 
-static struct sua_link *sua_link_new(struct osmo_sua_user *user, int is_server)
+static struct osmo_sua_link *sua_link_new(struct osmo_sua_user *user, int is_server)
 {
-	struct sua_link *link;
+	struct osmo_sua_link *link;
 
-	link = talloc_zero(user, struct sua_link);
+	link = talloc_zero(user, struct osmo_sua_link);
 	if (!link)
 		return NULL;
 
@@ -223,7 +223,7 @@
 
 static void conn_destroy(struct sua_connection *conn);
 
-static void sua_link_destroy(struct sua_link *link)
+static void sua_link_destroy(struct osmo_sua_link *link)
 {
 	struct sua_connection *conn;
 
@@ -237,7 +237,7 @@
 	talloc_free(link);
 }
 
-static int sua_link_send(struct sua_link *link, struct msgb *msg)
+static int sua_link_send(struct osmo_sua_link *link, struct msgb *msg)
 {
 	msgb_sctp_ppid(msg) = SUA_PPID;
 
@@ -249,7 +249,7 @@
 	return 0;
 }
 
-static struct sua_connection *conn_find_by_id(struct sua_link *link, uint32_t id)
+static struct sua_connection *conn_find_by_id(struct osmo_sua_link *link, uint32_t id)
 {
 	struct sua_connection *conn;
 
@@ -291,7 +291,7 @@
 }
 
 
-static struct sua_connection *conn_create_id(struct sua_link *link, uint32_t conn_id)
+static struct sua_connection *conn_create_id(struct osmo_sua_link *link, uint32_t conn_id)
 {
 	struct sua_connection *conn = talloc_zero(link, struct sua_connection);
 
@@ -309,7 +309,7 @@
 	return conn;
 }
 
-static struct sua_connection *conn_create(struct sua_link *link)
+static struct sua_connection *conn_create(struct osmo_sua_link *link)
 {
 	uint32_t conn_id;
 
@@ -369,7 +369,7 @@
  ***********************************************************************/
 
 /* user program sends us a N-CONNNECT.req to initiate a new connection */
-static int sua_connect_req(struct sua_link *link, struct osmo_scu_prim *prim)
+static int sua_connect_req(struct osmo_sua_link *link, struct osmo_scu_prim *prim)
 {
 	struct osmo_scu_connect_param *par = &prim->u.connect;
 	struct xua_msg *xua = xua_msg_alloc();
@@ -420,7 +420,7 @@
 
 /* user program sends us a N-CONNNECT.resp, presumably against a
  * N-CONNECT.ind */
-static int sua_connect_resp(struct sua_link *link, struct osmo_scu_prim *prim)
+static int sua_connect_resp(struct osmo_sua_link *link, struct osmo_scu_prim *prim)
 {
 	struct osmo_scu_connect_param *par = &prim->u.connect;
 	struct xua_msg *xua = xua_msg_alloc();
@@ -473,7 +473,7 @@
 }
 
 /* user wants to send connection-oriented data */
-static int sua_data_req(struct sua_link *link, struct osmo_scu_prim *prim)
+static int sua_data_req(struct osmo_sua_link *link, struct osmo_scu_prim *prim)
 {
 	struct osmo_scu_data_param *par = &prim->u.data;
 	struct xua_msg *xua;
@@ -515,7 +515,7 @@
 }
 
 /* user wants to disconnect a connection */
-static int sua_disconnect_req(struct sua_link *link, struct osmo_scu_prim *prim)
+static int sua_disconnect_req(struct osmo_sua_link *link, struct osmo_scu_prim *prim)
 {
 	struct osmo_scu_disconn_param *par = &prim->u.disconnect;
 	struct xua_msg *xua;
@@ -552,7 +552,7 @@
 }
 
 /* user wants to send connectionless data */
-static int sua_unitdata_req(struct sua_link *link, struct osmo_scu_prim *prim)
+static int sua_unitdata_req(struct osmo_sua_link *link, struct osmo_scu_prim *prim)
 {
 	struct osmo_scu_unitdata_param *par = &prim->u.unitdata;
 	struct xua_msg *xua = xua_msg_alloc();
@@ -576,7 +576,7 @@
 }
 
 /* user hands us a SCCP-USER SAP primitive down into the stack */
-int osmo_osmo_sua_user_link_down(struct sua_link *link, struct osmo_prim_hdr *oph)
+int osmo_sua_user_link_down(struct osmo_sua_link *link, struct osmo_prim_hdr *oph)
 {
 	struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph;
 	struct msgb *msg = prim->oph.msg;
@@ -732,7 +732,7 @@
 	return 0;
 }
 
-static int sua_rx_cldt(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_cldt(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct osmo_scu_unitdata_param *param;
@@ -765,7 +765,7 @@
 
 
 /* connectioness messages received from socket */
-static int sua_rx_cl(struct sua_link *link,
+static int sua_rx_cl(struct osmo_sua_link *link,
 		     struct xua_msg *xua, struct msgb *msg)
 {
 	int rc = -1;
@@ -786,7 +786,7 @@
 }
 
 /* RFC 3868 3.3.3 / SCCP CR */
-static int sua_rx_core(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_core(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct osmo_scu_connect_param *param;
@@ -832,7 +832,7 @@
 }
 
 /* RFC 3868 3.3.4 / SCCP CC */
-static int sua_rx_coak(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_coak(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct sua_connection *conn;
@@ -893,7 +893,7 @@
 }
 
 /* RFC 3868 3.3.5 / SCCP CREF */
-static int sua_rx_coref(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_coref(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct sua_connection *conn;
@@ -946,7 +946,7 @@
 }
 
 /* RFC 3868 3.3.6 / SCCP RLSD */
-static int sua_rx_relre(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_relre(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct sua_connection *conn;
@@ -998,7 +998,7 @@
 }
 
 /* RFC 3868 3.3.7 / SCCP RLC */
-static int sua_rx_relco(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_relco(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct sua_connection *conn;
@@ -1043,7 +1043,7 @@
 }
 
 /* RFC3868 3.3.1 / SCCP DT1 */
-static int sua_rx_codt(struct sua_link *link, struct xua_msg *xua)
+static int sua_rx_codt(struct osmo_sua_link *link, struct xua_msg *xua)
 {
 	struct osmo_scu_prim *prim;
 	struct sua_connection *conn;
@@ -1093,7 +1093,7 @@
 
 
 /* connection-oriented messages received from socket */
-static int sua_rx_co(struct sua_link *link,
+static int sua_rx_co(struct osmo_sua_link *link,
 		     struct xua_msg *xua, struct msgb *msg)
 {
 	int rc = -1;
@@ -1134,7 +1134,7 @@
 }
 
 /* process SUA message received from socket */
-static int sua_rx_msg(struct sua_link *link, struct msgb *msg)
+static int sua_rx_msg(struct osmo_sua_link *link, struct msgb *msg)
 {
 	struct xua_msg *xua;
 	int rc = -1;
@@ -1182,7 +1182,7 @@
 static int sua_srv_conn_cb(struct osmo_stream_srv *conn)
 {
 	struct osmo_fd *ofd = osmo_stream_srv_get_ofd(conn);
-	struct sua_link *link = osmo_stream_srv_get_data(conn);
+	struct osmo_sua_link *link = osmo_stream_srv_get_data(conn);
 	struct msgb *msg = msgb_alloc(SUA_MSGB_SIZE, "SUA Server Rx");
 	struct sctp_sndrcvinfo sinfo;
 	unsigned int ppid;
@@ -1235,7 +1235,7 @@
 
 static int sua_srv_conn_closed_cb(struct osmo_stream_srv *srv)
 {
-	struct sua_link *sual = osmo_stream_srv_get_data(srv);
+	struct osmo_sua_link *sual = osmo_stream_srv_get_data(srv);
 	struct sua_connection *conn;
 
 	LOGP(DSUA, LOGL_INFO, "SCTP connection closed\n");
@@ -1256,7 +1256,7 @@
 {
 	struct osmo_sua_user *user = osmo_stream_srv_link_get_data(link);
 	struct osmo_stream_srv *srv;
-	struct sua_link *sual;
+	struct osmo_sua_link *sual;
 
 	LOGP(DSUA, LOGL_INFO, "New SCTP connection accepted\n");
 
@@ -1278,7 +1278,7 @@
 	return 0;
 }
 
-int sua_server_listen(struct osmo_sua_user *user, const char *hostname, uint16_t port)
+int osmo_sua_server_listen(struct osmo_sua_user *user, const char *hostname, uint16_t port)
 {
 	int rc;
 
@@ -1308,7 +1308,7 @@
 static int sua_cli_conn_cb(struct osmo_stream_cli *conn)
 {
 	struct osmo_fd *ofd = osmo_stream_cli_get_ofd(conn);
-	struct sua_link *link = osmo_stream_cli_get_data(conn);
+	struct osmo_sua_link *link = osmo_stream_cli_get_data(conn);
 	struct msgb *msg = msgb_alloc(SUA_MSGB_SIZE, "SUA Client Rx");
 	struct sctp_sndrcvinfo sinfo;
 	unsigned int ppid;
@@ -1359,10 +1359,10 @@
 	return rc;
 }
 
-int sua_client_connect(struct osmo_sua_user *user, const char *hostname, uint16_t port)
+int osmo_sua_client_connect(struct osmo_sua_user *user, const char *hostname, uint16_t port)
 {
 	struct osmo_stream_cli *cli;
-	struct sua_link *sual;
+	struct osmo_sua_link *sual;
 	int rc;
 
 	cli = osmo_stream_cli_create(user);
@@ -1394,7 +1394,7 @@
 	return 0;
 }
 
-struct sua_link *sua_client_get_link(struct osmo_sua_user *user)
+struct osmo_sua_link *osmo_sua_client_get_link(struct osmo_sua_user *user)
 {
 	return osmo_stream_cli_get_data(user->client);
 }
@@ -1415,7 +1415,7 @@
 
 void osmo_sua_user_destroy(struct osmo_sua_user *user)
 {
-	struct sua_link *link;
+	struct osmo_sua_link *link;
 
 	llist_del(&user->list);
 
diff --git a/sigtran/sua.h b/sigtran/sua.h
index add2fd8..2aa99f4 100644
--- a/sigtran/sua.h
+++ b/sigtran/sua.h
@@ -4,17 +4,18 @@
 #include <osmocom/core/prim.h>
 
 struct osmo_sua_user;
+struct osmo_sua_link;
 
 void osmo_sua_set_log_area(int area);
 
 struct osmo_sua_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb);
 void osmo_sua_user_destroy(struct osmo_sua_user *user);
 
-int sua_server_listen(struct osmo_sua_user *user, const char *hostname, uint16_t port);
+int osmo_sua_server_listen(struct osmo_sua_user *user, const char *hostname, uint16_t port);
 
-int sua_client_connect(struct osmo_sua_user *user, const char *hostname, uint16_t port);
-struct sua_link *sua_client_get_link(struct osmo_sua_user *user);
+int osmo_sua_client_connect(struct osmo_sua_user *user, const char *hostname, uint16_t port);
+struct osmo_sua_link *osmo_sua_client_get_link(struct osmo_sua_user *user);
 
 /* user hands us a SCCP-USER SAP primitive down into the stack */
-int osmo_osmo_sua_user_link_down(struct sua_link *link, struct osmo_prim_hdr *oph);
+int osmo_sua_user_link_down(struct osmo_sua_link *link, struct osmo_prim_hdr *oph);
 
diff --git a/sigtran/sua_client_test.c b/sigtran/sua_client_test.c
index 552e0f0..968a7d1 100644
--- a/sigtran/sua_client_test.c
+++ b/sigtran/sua_client_test.c
@@ -20,7 +20,7 @@
 	}
 
 	if (resp)
-		osmo_osmo_sua_user_link_down(link, resp);
+		osmo_sua_user_link_down(link, resp);
 
 	msgb_free(oph->msg);
 	return 0;
@@ -39,12 +39,12 @@
 
 	g_user = osmo_sua_user_create(ctx, sccp_sap_up);
 
-	rc = sua_client_connect(g_user, "127.0.0.1", 2342);
+	rc = osmo_sua_client_connect(g_user, "127.0.0.1", 2342);
 	if (rc < 0) {
 		exit(1);
 	}
 
-	g_link = sua_client_get_link(g_user);
+	g_link = osmo_sua_client_get_link(g_user);
 
 	int i = 8000;
 
diff --git a/sigtran/sua_server_test.c b/sigtran/sua_server_test.c
index be123c2..9b9706f 100644
--- a/sigtran/sua_server_test.c
+++ b/sigtran/sua_server_test.c
@@ -49,7 +49,7 @@
 	}
 
 	if (resp)
-		osmo_osmo_sua_user_link_down(link, resp);
+		osmo_sua_user_link_down(link, resp);
 
 	msgb_free(oph->msg);
 	return 0;
@@ -68,7 +68,7 @@
 
 	user = osmo_sua_user_create(ctx, sccp_sap_up);
 
-	rc = sua_server_listen(user, "127.0.0.1", 2342);
+	rc = osmo_sua_server_listen(user, "127.0.0.1", 2342);
 	if (rc < 0) {
 		exit(1);
 	}
diff --git a/sigtran/sua_test_common.c b/sigtran/sua_test_common.c
index 92c2b38..a0da4c1 100644
--- a/sigtran/sua_test_common.c
+++ b/sigtran/sua_test_common.c
@@ -24,7 +24,7 @@
 	.num_cat = ARRAY_SIZE(log_cat),
 };
 
-int tx_unitdata(struct sua_link *link)
+int tx_unitdata(struct osmo_sua_link *link)
 {
 	struct msgb *msg = msgb_alloc(1024, "tx_unitdata");
 	struct osmo_scu_prim *prim;
@@ -40,7 +40,7 @@
 	cur = msg->l2h = msgb_put(msg, 3);
 	cur[0] = 1; cur[1] = 2; cur[2] = 3;
 
-	return osmo_osmo_sua_user_link_down(link, &prim->oph);
+	return osmo_sua_user_link_down(link, &prim->oph);
 }
 
 static void sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn)
@@ -70,10 +70,10 @@
 	return &prim->oph;
 }
 
-int tx_conn_req(struct sua_link *link, uint32_t conn_id)
+int tx_conn_req(struct osmo_sua_link *link, uint32_t conn_id)
 {
 	struct osmo_prim_hdr *prim = make_conn_req(conn_id);
-	return osmo_osmo_sua_user_link_down(link, prim);
+	return osmo_sua_user_link_down(link, prim);
 }
 
 struct osmo_prim_hdr *
diff --git a/sigtran/sua_test_common.h b/sigtran/sua_test_common.h
index 7c6f0f7..0fb62f5 100644
--- a/sigtran/sua_test_common.h
+++ b/sigtran/sua_test_common.h
@@ -24,8 +24,8 @@
 
 extern const struct log_info test_log_info;
 
-int tx_unitdata(struct sua_link *link);
-int tx_conn_req(struct sua_link *link, uint32_t conn_id);
+int tx_unitdata(struct osmo_sua_link *link);
+int tx_conn_req(struct osmo_sua_link *link, uint32_t conn_id);
 
 struct osmo_prim_hdr *make_conn_req(uint32_t conn_id);
 struct osmo_prim_hdr *make_dt1_req(uint32_t conn_id, const uint8_t *data, unsigned int len);