diff options
author | jjako <jjako> | 2003-10-13 20:33:30 +0000 |
---|---|---|
committer | jjako <jjako> | 2003-10-13 20:33:30 +0000 |
commit | 08d331db63cf42d16d0b2b00533a37fde79eb2c2 (patch) | |
tree | f21b884722d5e3a1f7bc5c9ea261a6a04fdaf822 /gtp/pdp.c | |
parent | 48c205f3f02161cc86d97cac92577f19eda2ba34 (diff) |
First attempt at a GTP1 implementation
Diffstat (limited to 'gtp/pdp.c')
-rw-r--r-- | gtp/pdp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -128,7 +128,7 @@ int pdp_newpdp(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi, (*pdp)->fllc = (uint16_t) n; (*pdp)->fllu = (uint16_t) n; (*pdp)->teic_own = (uint32_t) n; - (*pdp)->teic_own = (uint32_t) n; + (*pdp)->teid_own = (uint32_t) n; pdp_tidset(*pdp, pdp_gettid(imsi, nsapi)); return 0; } @@ -227,6 +227,11 @@ int pdp_tidget(struct pdp_t **pdp, uint64_t tid) { return EOF; /* End of linked list and not found */ } +int pdp_getimsi(struct pdp_t **pdp, uint64_t imsi, uint8_t nsapi) { + return pdp_tidget(pdp, + (imsi & 0x0fffffffffffffff) + ((uint64_t)nsapi << 60)); +} + /* int pdp_iphash(void* ipif, struct ul66_t *eua) { /#printf("IPhash %ld\n", lookup(eua->v, eua->l, ipif) % PDP_MAX);#/ |