USSD: Add basic dispatch + decode of GSUP-encapsulated SS/USSD

We don't want any SS session to run for more than 30s.  The timeout
is currently not refreshed.

If we need more comprehensive timeout handling, using osmo_fsm for SS
sessions might make sense.

Change-Id: I5c9fb6b619402d2a23fea9db99590143d85ac11a
diff --git a/src/hlr_ussd.h b/src/hlr_ussd.h
index 05d2099..433a7f2 100644
--- a/src/hlr_ussd.h
+++ b/src/hlr_ussd.h
@@ -1,5 +1,9 @@
 #include <stdint.h>
 #include <osmocom/core/linuxlist.h>
+#include <osmocom/gsm/gsup.h>
+#include "gsup_server.h"
+
+struct osmo_gsup_conn;
 
 struct hlr_euse_route {
 	/* hlr_euse.routes */
@@ -18,6 +22,9 @@
 	const char *description;
 	/* list of hlr_euse_route */
 	struct llist_head routes;
+
+	/* GSUP connection to the EUSE, if any */
+	struct osmo_gsup_conn *conn;
 };
 
 
@@ -28,3 +35,6 @@
 struct hlr_euse_route *euse_route_find(struct hlr_euse *euse, const char *prefix);
 struct hlr_euse_route *euse_route_prefix_alloc(struct hlr_euse *euse, const char *prefix);
 void euse_route_del(struct hlr_euse_route *rt);
+
+int rx_proc_ss_req(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup);
+int rx_proc_ss_error(struct osmo_gsup_conn *conn, const struct osmo_gsup_message *gsup);