GTP

Description

iRules commands that are specifically designed to query for or manipulate GTP (GPRS Tunneling Protocol) information, including commands to access the parsed fields such as TunnelID, GGSN address (APN), MSISDN, and IMSI.
A few use cases for such information:
  • Information from the parsed fields may be used to LB GTP traffic to pool members
  • Persistence can be enabled via iRules using specific GTP info
  • iRules to allow more control over GTP specific traffic

Parsing - Within this command namespace APIs are provided to:

  • Parse the message from given blob.
  • Access GTP header fields.
  • Access Payload in case of G-PDU.
  • Access extension headers.
  • Walk the list of extension headers.
  • Access an extension header of a given type.
  • Access Information Elements (IEs)
  • And much more…

Creating - APIs are provided to help create a message.

  • A create message is called with “version” & “type”.
    • Header fields other than “version”, “type” & “length” can be added/updated/removed.
      • The header fields that are mandatory per specifications can’t be removed, but could be zeroed.
  • The length of the message is computed dynamically as updates happen to the message.
  • For Version 1, the extension headers can be added/updated/removed.
  • IEs can be added/updated/removed to message or another IE (grouped IE only).

Command List

  • GTP::clone - Returns a cloned copy of the GTP message.
  • GTP::discard - Discards the current message
  • GTP::header - Allows for the parsing of GTP header information.
  • GTP::header extension - The extension headers are identified by unique type values. The type can be appended with index, if multiple headers of same type are expected.
  • GTP::ie - This set of commands allows for the parsing and interpretation of GTP IE elements.
  • GTP::forward - Forwards GTP message to peer flow.
  • GTP::length - This value is returned as read from the message header.
  • GTP::message - Returns the entire GTP message.
  • GTP::new - Creates a new GTP message for given version & request-type
  • GTP::parse - Creates a new GTP message from a byte stream
  • GTP::payload - Returns the entire payload for G-PDU message. This command returns an empty value, in case of non-G-PDU messages.
  • GTP::respond - Sends the GTP message back to the remote node of this connection
  • GTP::tunnel - These commands parse the payload of G-PDU as IP datagram and return the values from IP header and TCP/UDP header.

Event List

  • GTP_GPDU_EGRESS - Triggered for a message that has GTP message-type = 255 on the connection that forwards/egresses the message.
  • GTP_GPDU_INGRESS - Triggered for a message that has GTP message-type = 255 on the connection that accepted the message.
  • GTP_PRIME_EGRESS - Triggered only for GTP prime messages for revision 1 on the connection that forwards/egresses the message.
  • GTP_PRIME_INGRESS - Triggered only for GTP prime messages for revision 1 on the connection that accepted the message.
  • GTP_SIGNALLING_EGRESS - Triggered for any GTP-message except G-PDU on the connection that forwards/egresses the message.
  • GTP_SIGNALLING_INGRESS - Triggered for any GTP-message except G-PDU on the connection that accepted the message