aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-10-07 18:42:34 +0200
committerHarald Welte <laforge@gnumonks.org>2011-10-07 18:42:34 +0200
commit41af5691ef08fb70e2c65aba03c8b9e6c20983a6 (patch)
treee0e46b53f3c271d4b3d3db6fc6f2755923ab01a0 /gtp
parent11a398fbc3ad9b655d8ba947bea7012f7ce81604 (diff)
Add optional RAI Field
Routing Area Information is an optional Field described in 3GPP TS 29.060 7.7.3 it can be added with command line option rai, in the dot separated format MCC.MNC.LAC.RAC example : --rai 208.10.65535.255 Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr> Signed-off-by: Harald Welte <laforge@gnumonks.org>
Diffstat (limited to 'gtp')
-rw-r--r--gtp/gtp.c6
-rw-r--r--gtp/pdp.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/gtp/gtp.c b/gtp/gtp.c
index 2516f50..111168b 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -1049,6 +1049,12 @@ extern int gtp_create_context_req(struct gsn_t *gsn, struct pdp_t *pdp,
sizeof(pdp->imsi), (uint8_t*) &pdp->imsi);
}
+ /* Section 7.7.3 Routing Area Information */
+ if (pdp->rai_given == 1)
+ gtpie_tv0(&packet, &length, GTP_MAX, GTPIE_RAI,
+ pdp->rai.l, (uint8_t*) &pdp->rai.v);
+
+
/* Section 7.7.11 */
gtpie_tv1(&packet, &length, GTP_MAX, GTPIE_RECOVERY,
gsn->restart_counter);
diff --git a/gtp/pdp.h b/gtp/pdp.h
index d826d77..aea5df7 100644
--- a/gtp/pdp.h
+++ b/gtp/pdp.h
@@ -192,6 +192,8 @@ struct pdp_t {
int rattype_given; /* Radio Access Technology Type given*/
struct ul255_t userloc; /* User Location Information */
int userloc_given; /* User Location Information given*/
+ struct ul255_t rai; /* Routing Area Information */
+ int rai_given; /* Routing Area Information given*/
struct ul255_t mstz; /* MS Time Zone */
int mstz_given; /* MS Time Zone given*/
struct ul255_t imeisv; /* IMEI Software Version */