ltm rule command GTP ieΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

GTP::ie
       This set of commands allows for the parsing and interpretation of GTP IE elements.

SYNOPSIS
       GTP::ie 'exists' ('-message' MESSAGE)? (IE_PATH)?

       GTP::ie 'count'	('-message' MESSAGE)? ('-type' TYPE)? ('-instance' INSTANCE)? (IE_PATH)?

       GTP::ie 'get' ('instance' | 'length' | 'encode-type' | 'value') ('-message' MESSAGE)? IE_PATH

       GTP::ie 'get' 'list' ('-message' MESSAGE)? ('-type' TYPE)? ('-instance' INSTANCE)?  (IE_PATH)?

       GTP::ie 'set' ('instance' | 'value') ('-message' MESSAGE)? IE_PATH VALUE

       GTP::ie 'append' ('-message' MESSAGE)? ((TYPE INSTANCE VALUE) |
						       (IE_PATH TYPE INSTANCE VALUE))

       GTP::ie 'remove' ('-message' MESSAGE)? IE_PATH

       GTP::ie 'insert' ('-message' MESSAGE)? IE_PATH TYPE INSTANCE VALUE

       GTP::ie 'info' ANY_CHARS (ANY_CHARS)? (ANY_CHARS)?

       GTP::ie 'list'

DESCRIPTION
       This set of commands allows for the parsing and interpretation of GTP IE elements.

       Syntax

       GTP::ie exists []

	    * Helps verify if this IE exists. In the absence of ie-path, it
	      returns true, if at the least one IE element is present in the
	      message.

       GTP::ie count [-type ] [-instance ] []

	  * The count of IEs held by referred path is returned that matches the
	  given type & instance, if the options are provided. The path provides
	  the scope for counting. Path has to be the last argument to the
	  command. The absence of path argument sets the message as the scope,
	  hence count of all IEs in the message is returned. If "-type " is
	  provided, only those IEs that matches this type within the scope are
	  counted. If "-instance " is provided, only those IEs that matches this
	  instance within the scope are counted.
	  * NOTE: The count happens at the given scope, implying it does not
	  include any embedded IEs in the count. Say message has 3 IEs and one of
	  which is grouped-IE. Here "GTP::ie count" returns 3. "GTP::ie count
	  bearer-ctx" returns count of embedded IEs in the first
	  bearer-ctx in the message. GTP::ie count returns count of all IEs
	  in the message. "GTP::ie count -type ip-address pdn-conn" returns the
	  count of IP address IEs inside the first PDN connection IE in the
	  message. Only first PDN Connection is used as absence of index in path
	  defaults to 0.

       GTP::ie get instance 

	  * Returns the instance value of this IE. For messages of version 1,
	  instance value is returned as 0.

       GTP::ie get length 

	  * Returns the length in octets of value of this IE.

       GTP::ie get encode-type 

	  * Returns the type of encoding of the value.

       GTP::ie get value 

	  * Returns the value of this IE.

       GTP::ie get list [-type ] [-instance ] []

	  * Returns list of IE objects in the contained scope. The scope is
	  provided by the path. path has to be the last argument. Absence of any
	  path set the message level as scope.
	  * -type helps collect IEs that matches this type value only.
	  * -instance helps collect IEs of given instance value only.
	  * Each IE object is a list of type, index, length, instance, encode-type
	  and value. In case of messages of version 1, all elements are considered
	  to have instance value of 0.

       GTP::ie set instance  

	  * Sets the instance value of this IE. This is valid only for message
	  version 2.

       GTP::ie set value  

	  * Sets the value of this IE.

       GTP::ie list

	  * Returns the list of all the IE elements contained in the message.

       GTP::ie info 

	  * Lists the following info for each IE supported in this version:
	  name, type (integer), encode-type, description. This command can be
	  used to gather information of all supported IEs.

       GTP::ie info  

	  * Returns the info as in GTP::ie info for the specified IE "type" only.
	  For example, "GTP::ie info 1 131" returns "apn 131 string {Access Point Name}".

       GTP::ie info  

	  * Returns the info as in GTP::ie info for the specified IE "name" only.
	  For example, "GTP::ie info 1 apn" returns "apn 131 string {Access Point Name}".

       GTP::ie info -encode-type  

	  * Returns only the encode type of the specified IE "type". For example,
	  "GTP::ie info -encode-type 1 apn" returns "string".

       GTP::ie info -encode-type  

	  * Returns only the encode type of the specified IE "name". For example,
	  "GTP::ie info -encode-type 1 apn" returns "string".

       GTP::ie info -name  

	  * Returns the name of specified IE "type". For example, "GTP::ie info -name 1 131"
	  returns "apn".

       GTP::ie info -type  

	  * Returns the type of specified IE "name". For example, "GTP::ie info -name 1 apn"
	  returns "131".

       GTP::ie remove 

	  * Removes IE specified by ie-path. For example, "GTP::ie remove apn" removes
	  the first apn.

       GTP::ie insert    

	  * Inserts new IE at location of IE specified by ie-path. The new IE
	  is created based on supported type or name, instance and value. For example,
	  "GTP::ie insert 2 apn 0 new-apn" inserts apn IE at location of existing IE
	  type=2. Note that instance is only valid for message version 2.

       GTP::ie append []   

	  * Appends new IE to the end of the scope of grouped-IE provided by ie-path.
	  The absence of ie-path argument sets the message as the scope, hence new IE
	  is appended to the end of the message.
	  * For example, "GTP::ie append bearer-ctx ebi 0 6" appends ebi -
	  EPS Bearer ID IE (with instance = 0, value = 6) to the end of bearer-ctx's
	  embedded IE. Note that instance is only valid for message version 2.

RETURN VALUE
VALID DURING
EXAMPLES
	when GTP_SIGNALLING_INGRESS {
	    if { [GTP::ie exists imsi:0] } {
		log local0. "GTP imsi [GTP::ie get value imsi:0]"
	    }
	    log local0. "Total number of top level IEs [GTP::ie count]"
	    set ie_list [ GTP::ie get list]
	    foreach ie $ie_list {
		log local0. "IE $ie"
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.5.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)