aboutsummaryrefslogtreecommitdiffstats
path: root/gtp/gtp.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-16 16:47:12 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-21 17:22:54 +0000
commit8e8c7ef3c7c2822737e7b74d299d520f0f4d94e0 (patch)
tree7b9a0b783d681ec9f33c735213ac1baba9018bf1 /gtp/gtp.h
parent57238889ebf046cdf9381036d9bc1394a574ed57 (diff)
gtp: Add new API to avoid freeing pdp contexts during DEL CTX REQ
With this API, user is expectd to free the PDP ctx when the confirmation for the release has been received (cb_conf time). This way user can maintain the pdp ctx alive during all this time. Extra code is added to gtp_delete_pdp_resp() since it's now possible to match it and push it up to the user cb_conf. This way, cb_conf() can be used for locally-initiated DEL CTX REQ, while delete_context() cb is left for remotely-initiated DEL CTX REQ. In this later case, when the DEL CTX RESP is sent the ctx is deleted and the delete_context() is called, where the user can do related actions or trigger consequence events (in the case of SGSN, it will drop all related GGSN bits for that PDP ctx and forward the DEACT PDP CTX to the MS). Change-Id: I29d366253bb98dcba328c7ce8aa3e4daf8f75e6c
Diffstat (limited to 'gtp/gtp.h')
-rw-r--r--gtp/gtp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtp/gtp.h b/gtp/gtp.h
index 8f8e293..f185424 100644
--- a/gtp/gtp.h
+++ b/gtp/gtp.h
@@ -13,6 +13,7 @@
#define _GTP_H
#include <osmocom/core/utils.h>
+#include <osmocom/core/defs.h>
#define GTP_MODE_GGSN 1
#define GTP_MODE_SGSN 2
@@ -323,7 +324,10 @@ extern int gtp_update_context(struct gsn_t *gsn, struct pdp_t *pdp,
void *cbp, struct in_addr *inetaddr);
extern int gtp_delete_context_req(struct gsn_t *gsn, struct pdp_t *pdp,
- void *cbp, int teardown);
+ void *cbp, int teardown)
+ OSMO_DEPRECATED("Use gtp_delete_context_req2() instead, to avoid freeing pdp ctx before reply");
+extern int gtp_delete_context_req2(struct gsn_t *gsn, struct pdp_t *pdp,
+ void *cbp, int teardown);
extern int gtp_data_req(struct gsn_t *gsn, struct pdp_t *pdp,
void *pack, unsigned len);