aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsup_router.h
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-04-04 12:00:24 +0200
committerOliver Smith <osmith@sysmocom.de>2019-04-09 13:42:26 +0200
commit95abc2be17f06b28225e19c198340d14d7848c47 (patch)
tree806d821bd90dea8bcf1fd3e7610687bd8e964e97 /src/gsup_router.h
parentf1fe94c8cae5591dff4dd77e74c4c2f09638d6a1 (diff)
USSD: save MO USSD's originating MSC's vlr_number
Save the source IPA name in ss_session, so we can send "invalid IMSI" messages to the originating MSC. Remove the fixed size from ss->vlr_number (we don't know the size of the IPA name when it does not come from the database). Add ss->vlr_number_len to give osmo_gsup_addr_send() the format it expects, and to have one less place in the code where the IPA names are not stored as blob. Looking up the IPA name from struct osmo_gsup_conn could either be done like in osmo_gsup_server_ccm_cb() by reading the IPA IEs (which has a FIXME comment), or by finding the route associated with conn. I went with the latter approach, because it seems cleaner to me. Related: OS#3710 Change-Id: If5a65f471672949192061c5fe396603611123bc1
Diffstat (limited to 'src/gsup_router.h')
-rw-r--r--src/gsup_router.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gsup_router.h b/src/gsup_router.h
index 282531d..bff484e 100644
--- a/src/gsup_router.h
+++ b/src/gsup_router.h
@@ -3,9 +3,18 @@
#include <stdint.h>
#include "gsup_server.h"
+struct gsup_route {
+ struct llist_head list;
+
+ uint8_t *addr;
+ struct osmo_gsup_conn *conn;
+};
+
struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs,
const uint8_t *addr, size_t addrlen);
+struct gsup_route *gsup_route_find_by_conn(const struct osmo_gsup_conn *conn);
+
/* add a new route for the given address to the given conn */
int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen);