Feature #2873
closedpdpa global array to be moved to gsn_t
100%
Description
In pdp.c:
/* *********************************************************** * Global variables TODO: most should be moved to gsn_t *************************************************************/ static struct pdp_t pdpa[PDP_MAX]; /* PDP storage */ static struct pdp_t *hashtid[PDP_MAX]; /* Hash table for IMSI + NSAPI */
Then APIs in the same file (pdp_init, pdp_newpdp, pdp_getgtp0, etc.) should be updated to receive a point to pdpa as first parameter.
Updated by pespin almost 5 years ago
This means:
- pdp_init() is not really a public API and we can modify it. it's only meant to be called from inside libgtp.
- We modify pdp_init() to pass the allocated gsn_t and save it as a static pointer in pdp.c
- We keep the old pdp_*(...) APIs for backward compatibility
- We add new gtp_pdp_*(gsn_t*, ...) APIs
- Old pdp_*(...) implementations are changed to call newgtp_pdp_*() APIs with the static gsn_t as first parameter.
Updated by pespin almost 5 years ago
- Status changed from New to Feedback
- Assignee set to pespin
- % Done changed from 0 to 90
Should be accomplished by:
osmo-ggsn:
remote: https://gerrit.osmocom.org/#/c/osmo-ggsn/+/14296 gtp: Introduce new pdp APIs (and deprecate old ones) to support multiple GSN
remote: https://gerrit.osmocom.org/#/c/osmo-ggsn/+/14297 gtp: Replace old pdp APIs with new ones with multi-gsn support
remote: https://gerrit.osmocom.org/#/c/osmo-ggsn/+/14298 ggsn: vty: Require ggsn param in <show pdp-context> cmd
remote: https://gerrit.osmocom.org/#/c/osmo-ggsn/+/14299 sgsnemu: Replace old API pdp_newpdp with new one provided by libgtp
osmo-sgsn:
https://gerrit.osmocom.org/#/c/osmo-sgsn/+/14292 sgsn_libgtp: Replace deprcated API pdp_newpdp with per-gsn new API
Updated by pespin almost 5 years ago
- Status changed from Feedback to Resolved
- % Done changed from 90 to 100
Merged, closing the ticket.