Hi,
I'm currently looking into extending the libgtp interface to support Gn.
Gn will be used between a SGSN and a MME to transfer UE state.
This allows a UE to have mobility between 2G/3G network served by an SGSN and
a 4G network served by an MME.
It is based on GTPv1 TS 29.060 and to simply contains 3 PDUs:
- 7.5.3 SGSN Context Request,
- 7.5.4 SGSN Context Response
- 7.5.5 SGSN Context Ack
It can work in both direction for UE from 2G to 4G as well 4G to 2G.
The SGSN Context Request creates its own GTP session by exchanging a TEID-C
in the SGSN Req + Resp. E.g.:
MME -> SGSN: SGSN Context Request (TEID 0, new TEID A)
MME <- SGSN: SGSN Context Response (TEID A, new TEID B)
MME -> SGSN: SGSN Context Ack (TEID B)
But the API of libgtp is currently very high level, except for RAN Info Relay,
a user doesn't interact with the GTP TLVs, instead it is using a struct and converts
between each other.
Libgtp was developed with GTPv0/v1 in mind to support requesting PDP Context for
2G (and later got extended to support 3G).
Also the SGSN Context Response contains a very long list of optional TLVs (e.g. 27 in Rel
12), some
of the TLVs also contain nested TLVs.
So what is the right direction?
Should I create a new high level API, parse only the 3-4 TLVs the SGSN will use into a
`struct sgsn_response`?
Also the state tracking of a request would be tracked then by GTP and passed as identifier
to it.
Or it could pass it to the SGSN and the SGSN has to take care of everything (except
general message and tlv validation, parsing)?
Best,
lynxis