aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-18 10:35:06 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-18 10:35:06 +0200
commit6abf94e4206fa97c7dfd72f481c278d9e2873958 (patch)
treeb18b638e78d561a77fa0957b56a889559d7a475d /openbsc/include
parentd2a9ed22859dfc4b99bfac7c0010539db3e12a0d (diff)
[GPRS] Properly connect GPRS SM with LIBGTP for PDP context activation
* store LLC SAPI as part of PDP ctx * store NSEI + BVCI as part of MM ctx * export gsm48_tx_gsm_act_pdp_acc() and call it from sgsn_libgtp.c * create and use gsm48_tx_gsm_act_pdp_rej for error cases * print SAPI as part of VTY show pdp
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h10
-rw-r--r--openbsc/include/openbsc/gsm_04_08_gprs.h4
-rw-r--r--openbsc/include/openbsc/sgsn.h6
3 files changed, 16 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 8ad6ba10d..df1ee4724 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -71,6 +71,8 @@ struct sgsn_mm_ctx {
/* Additional bits not present in the GSM TS */
uint32_t tlli;
+ uint16_t nsei;
+ uint16_t bvci;
struct timer_list timer;
unsigned int T;
};
@@ -88,10 +90,15 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli,
enum pdp_ctx_state {
PDP_STATE_NONE,
+ PDP_STATE_CR_REQ,
+ PDP_STATE_CR_CONF,
};
enum pdp_type {
PDP_TYPE_NONE,
+ PDP_TYPE_ETSI_PPP,
+ PDP_TYPE_IANA_IPv4,
+ PDP_TYPE_IANA_IPv6,
};
struct sgsn_pdp_ctx {
@@ -107,7 +114,8 @@ struct sgsn_pdp_ctx {
uint32_t address;
char *apn_subscribed;
//char *apn_used;
- uint16_t nsapi;
+ uint16_t nsapi; /* SNDCP */
+ uint16_t sapi; /* LLC */
uint8_t ti; /* transaction identifier */
int vplmn_allowed;
uint32_t qos_profile_subscr;
diff --git a/openbsc/include/openbsc/gsm_04_08_gprs.h b/openbsc/include/openbsc/gsm_04_08_gprs.h
index d9fb285bf..e314b565c 100644
--- a/openbsc/include/openbsc/gsm_04_08_gprs.h
+++ b/openbsc/include/openbsc/gsm_04_08_gprs.h
@@ -2,6 +2,7 @@
#define _GSM48_GPRS_H
#include <stdint.h>
+#include <osmocore/protocol/gsm_04_08.h>
/* Table 10.4 / 10.4a, GPRS Mobility Management (GMM) */
#define GSM48_MT_GMM_ATTACH_REQ 0x01
@@ -358,7 +359,4 @@ struct gsm48_qos {
int gprs_tlli_type(uint32_t tlli);
-struct gsm_bts *gsm48_bts_by_ra_id(struct gsm_network *net,
- const uint8_t *buf, unsigned int len);
-
#endif /* _GSM48_GPRS_H */
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index b2625dbac..1633b834d 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -6,6 +6,7 @@
#include <osmocore/msgb.h>
#include <openbsc/gprs_ns.h>
+#include <openbsc/gprs_sgsn.h>
struct sgsn_config {
/* parsed from config file */
@@ -44,4 +45,9 @@ int sgsn_parse_config(const char *config_file, struct sgsn_config *cfg);
/* Main input function for Gb proxy */
int sgsn_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci);
+
+struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct ggsn_ctx *ggsn,
+ struct sgsn_mm_ctx *mmctx,
+ uint16_t nsapi,
+ struct tlv_parsed *tp);
#endif