diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-04-30 20:26:32 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-04 07:20:42 +0200 |
commit | 9f75c35eb3cf796366b7452538a1d3113cd6b546 (patch) | |
tree | 73d808204e00b05d87558c4e5982bd053d096bf4 /openbsc/include/openbsc/gprs_ns.h | |
parent | 44f1c27460325924e0391677ca76798951289f53 (diff) |
GPRS: Introduce a GPRS Gb Proxy
The ida of the Gb proxy is to aggregate Gb links with a number of BSS
and then present all the BSSGP-VC's together inside one NS-VC to the
actual SGSN.
The code is not yet expected to be complete.
Diffstat (limited to 'openbsc/include/openbsc/gprs_ns.h')
-rw-r--r-- | openbsc/include/openbsc/gprs_ns.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h index 34a3e581f..dd10d3339 100644 --- a/openbsc/include/openbsc/gprs_ns.h +++ b/openbsc/include/openbsc/gprs_ns.h @@ -73,7 +73,37 @@ enum ns_cause { NS_CAUSE_UNKN_IP_TEST_FAILED = 0x14, }; -struct gprs_nsvc; + +/* Our Implementation */ +#include <netinet/in.h> + +#define NSE_S_BLOCKED 0x0001 +#define NSE_S_ALIVE 0x0002 + +struct gprs_nsvc { + struct llist_head list; + struct gprs_ns_inst *nsi; + + u_int16_t nsei; /* end-to-end significance */ + u_int16_t nsvci; /* uniquely identifies NS-VC at SGSN */ + + u_int32_t state; + u_int32_t remote_state; + + struct timer_list alive_timer; + int timer_is_tns_alive; + int alive_retries; + + int remote_end_is_sgsn; + + union { + struct { + struct sockaddr_in bts_addr; + } ip; + }; +}; + + struct gprs_ns_inst; enum gprs_ns_evt { @@ -101,4 +131,11 @@ int gprs_ns_rcvmsg(struct gprs_ns_inst *nsi, struct msgb *msg, /* main function for higher layers (BSSGP) to send NS messages */ int gprs_ns_sendmsg(struct gprs_ns_inst *nsi, struct msgb *msg); + +/* Listen for incoming GPRS packets */ +int nsip_listen(struct gprs_ns_inst *nsi, uint16_t udp_port); + +/* Establish a connection (from the BSS) to the SGSN */ +struct gprs_nsvc *nsip_connect(struct gprs_ns_inst *nsi, + struct sockaddr_in *dest, uint16_t nsvci); #endif |