From 626a5a1e596f9820139aa28fe0b6fa64b974da5d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Jul 2018 21:04:45 +0200 Subject: WIP: Add support for GPRS NS IP Sub-Network-Service (SNS) Change-Id: I84786c3b43a8ae34ef3b3ba84b33c90042d234ea --- include/osmocom/gprs/gprs_ns.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index c97b2004..febbde22 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -14,8 +14,8 @@ #include -#define NS_TIMERS_COUNT 7 -#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)" +#define NS_TIMERS_COUNT 8 +#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries|tsns-prov)" #define NS_TIMERS_HELP \ "(un)blocking Timer (Tns-block) timeout\n" \ "(un)blocking Timer (Tns-block) number of retries\n" \ @@ -23,7 +23,8 @@ "Reset Timer (Tns-reset) number of retries\n" \ "Test Timer (Tns-test) timeout\n" \ "Alive Timer (Tns-alive) timeout\n" \ - "Alive Timer (Tns-alive) number of retries\n" + "Alive Timer (Tns-alive) number of retries\n" \ + "SNS Provision Timer (Tsns-prov) timeout\n" /* Educated guess - LLC user payload is 1500 bytes plus possible headers */ #define NS_ALLOC_SIZE 3072 @@ -37,6 +38,7 @@ enum ns_timeout { NS_TOUT_TNS_TEST, NS_TOUT_TNS_ALIVE, NS_TOUT_TNS_ALIVE_RETRIES, + NS_TOUT_TSNS_PROV, }; #define NSE_S_BLOCKED 0x0001 @@ -102,6 +104,8 @@ struct gprs_ns_inst { uint32_t local_ip; unsigned int enabled:1; } frgre; + + struct osmo_fsm_inst *bss_sns_fi; }; enum nsvc_timer_mode { @@ -169,6 +173,9 @@ struct gprs_nsvc *gprs_ns_nsip_connect(struct gprs_ns_inst *nsi, struct sockaddr_in *dest, uint16_t nsei, uint16_t nsvci); +/* Establish a connection (from the BSS) to the SGSN using IP SNS */ +struct gprs_nsvc *gprs_ns_nsip_connect_sns(struct gprs_ns_inst *nsi, struct sockaddr_in *dest, + uint16_t nsei, uint16_t nsvci); struct sockaddr_in; @@ -211,6 +218,7 @@ enum signal_ns { S_NS_ALIVE_EXP, /* Tns-alive expired more than N times */ S_NS_REPLACED, /* nsvc object is replaced (sets old_nsvc) */ S_NS_MISMATCH, /* got an unexpected IE (sets msg, pdu_type, ie_type) */ + S_SNS_CONFIGURED, /* IP-SNS configuration completed */ }; extern const struct value_string gprs_ns_signal_ns_names[]; -- cgit v1.2.3