Python policy – GTPv2-C API

The system provides a Python object for input GTPv2-C packet: alc.gtp2c.

Shown in Table: GTPv2-C API , the alc.gtp2c packet has following attributes to represent the GTPv2-C header fields:

Table: GTPv2-C API
Class attributes GTPv2-C header field Access

alc.gtp2c.version

Integer version field in the header

Read

alc.gtp2c.pbit

boolean, true mean 1, false means 0; P bit in the header

Read

alc.gtp2c.tbit

boolean, T bit in the header

Read

alc.gtp2c.type

Integer message type field in the header

Read

alc.gtp2c.len

Integer message length field in the header

Read

alc.gtp2c.teid

Unsigned integer, or None if TEID does not exist

Read

alc.gtp2c.seq

Integer sequence number in the header

Read

The following is a list of alc.gtp2c functions:

Be aware that the alc.gtp2c.str_to_groupedIE (parent_ie_str) and alc.gtp2c.groupedIE_to_str(grouped_ie_tuple) do not check whether the input parameter is a grouped IE. The user should verify that the input parameter is a grouped IE before using these two functions.