To handle both incoming and outgoing SGSN Context via GTPv1.
Introduce a FSM which handles the state of SGSN Context to simplify
the API for the SGSN which uses libgtp as well as the external SGSN
which communicates via GTP.
Change-Id: Idb8ed0bb87200a68bb8caedd734fc070df9179c0
No idea why the previous ones started at the second IE.
Further add more length arguments to the encapsulation method.
Change-Id: I8bb086c568e07052c52d880df06049490346e91e
Required for SGSN Context Req fsm which is using talloc.
Adds a new api to set the libgtp talloc context via gtp_set_talloc_ctx()
Change-Id: I7c4a29c4bb1ef3c7bf506e59e99b3a804cabe34b
This will be used by:
* SGSN: Get to know that RNC has gonne down according to GGSN (re-attempt
Direct Tunnel or go back to tun SGSN<->GGSN).
* GGSN: Maybe find out that Direct Flags are used (should be handled
internally directly in the rx path probably)
Related: OS#6512
Change-Id: Ic80a9a928c55b6ff85be96014920bb42793cb943
In Update PDP Ctx Response, only SGSN is expected to transmit Direct
Tunnel Flags in the message.
Related: SYS#5435
Change-Id: I36d93619e2fe9cafd3092515df18b82d29099d2d
While at it, move internal functions of gtp.h to a separate file too.
Make all functions that are only used inside gtp.c static.
The following APIs are unexpectedly public:
* imsi_gtp2str gets used by pdp.h
* gsna2in_addr, gtp_echo_req gets used by osmo-sgsn
Change-Id: I72c40cbdec33449ca8104fb3cad8df1a9e07dfd7
Remove ipv42eua and eua2ipv4, which are in the "internal functions"
section of gtp.h, but are not used anywhere in the code anymore. This is
in preparation of moving the internal functions that are used in
multiple .c files into a separate header file, and to make the other
internal functions static. (Compiler complains about unused static
functions.)
Change-Id: I90e2750f6a6e3e6122e9c562103fda77d7326932
Move all includes from /usr/include/….h to
/usr/include/osmocom/gtp/….h to be more consistent with other Osmocom
projects, and to not "pollute" the top include directory if we add more
header files.
Also the new directory structure makes more obvious, which headers are
public and which ones aren't.
Adjust libgtp.pc.in so both #include <gtp.h> (legacy)
and #include <osmocom/gtp/gtp.h> can be used.
Related: OS#6373
Change-Id: If7e01c61168819bf7120667344e40c857da5490b