ADC Advanced Policy Expressions

DIAMETER_REQ_T

Retrieves header information and AVPs from Diameter requests.

AVPs can be retrieved by:

  • Directly specifying the AVP codes in the form: DIAMETER.REQ.AVP(). For example, to retrieve the Auth-Application-Id AVP (code 258), you can

    use the expression: DIAMETER.REQ.AVP(258).

  • Using aliases that are provided for important AVPs. For example, the

    Auth-Application-Id AVP has the alias AUTH_APPLICATION_ID. So, the expression

    to retrieve the Auth-Application-Id AVP by using the alias is

    DIAMETER.REQ.AUTH_APPLICATION_ID.

General usage:DIAMETER.REQ.

This topic lists the expressions that are provided by this class.

Note:Expressions with the *symbol are inherited/promoted from diameter_message_t.

* ACCOUNTING_SUB_SESSION_ID

Returns the Accounting-Sub-Session-Id AVP (code 287) from the message.

Returns: avp_t

* ACCT_APPLICATION_ID

Returns the Acct-Application-Id AVP (code 259) from the message.

Note:expression can be used to retrieve the value as Unsigned32

Returns: avp_unum_t

* ACCT_MULTI_SESSION_ID

Returns the Acct-Multi-Session-Id AVP (code 50) from the message.

Returns: avp_t

* ACCT_SESSION_ID

Returns the Acct-Session-ID AVP (code 44) from the message.

Returns: avp_t

* APPLICATION_ID

Returns the Application-ID from the message.

Returns: unum_text_t

* AUTH_APPLICATION_ID

Returns the Auth-Application-Id AVP (code 258) from the message.

Note:expression can be used to retrieve the value as Unsigned32

Returns: avp_unum_t

* AVP_END

Returns the location at the end of Diameter message (or in other words

end of all AVPs) in Diameter message.

Returns: text_t

* AVP_LIST

Returns the AVP region in Diameter message (or in other words

returns location at start of AVPs and length equal to Diameter

message length excluding header).

Returns: text_t

* AVP(uint avpcode)

Returns the specified AVP from the message.

For example, to get the AVP with code 263 from a Request, use the expression:

DIAMETER.REQ.AVP(263).

Note:To get AVP that is nested inside a grouped AVP, use the

AVP method from the avp_t class.

Parameters(expressions not allowed):

avpcode -

                        AVP code

Returns: avp_t

* AVP(uint avpcode, uint vendorid)

Returns the specified AVP in given vendor-id namespace from the message.

For example, to get the AVP with code 1001 and VendorId 10415 from a Request,

use the expression: DIAMETER.REQ.AVP(1001, 10415).

Note:To get AVP that is nested inside a grouped AVP, use the

AVP method from the avp_t class.

Parameters(expressions not allowed):

avpcode -

                        AVP code

vendorid -

                        Vendor Id

Returns: avp_t

* AVP_START

Returns the location at the start of AVPs (or in other words

end of diameter header) in Diameter message.

Returns: text_t

* COMMAND_CODE

Returns the Command Code from the message.

Returns: unum_text_t

DESTINATION_HOST

Returns the Destination-Host AVP (code 293) from the request.

Returns: avp_t

DESTINATION_REALM

Returns the Destination-Realm AVP (code 283) from the request.

Returns: avp_t

* END_TO_END_ID

Returns the End-to-End Identifier from the message.

Returns: unsigned_long_at

* FLAGS

Returns the value of Diameter Header flags in Diameter message.

Returns: diameter_flag_t

* HOP_BY_HOP_ID

Returns the Hop-by-Hop Identifier from the message.

Returns: unsigned_long_at

* IS_PROXIABLE

Returns true if the P (proxiable) command flag is set for the message.

Returns: bool_at

IS_RETRANSMIT

Returns true if the T (potentially retransmitted message) command flag is

set for the request.

Returns: bool_at

* LENGTH

Returns the Message Length from the message.

Returns: num_at

* ORIGIN_HOST

Returns the Origin-Host AVP (code 264) from the message.

Returns: avp_t

* ORIGIN_REALM

Returns the Origin-Realm AVP (code 296) from the message.

Returns: avp_t

* PRODUCT_NAME

Returns the Product-Name AVP (code 269) from the message.

Returns: avp_t

* SESSION_ID

Returns the Session-ID AVP (code 263) from the message.

Returns: avp_t

* SUPPORTED_VENDOR_ID

Returns the Supported-Vendor-Id AVP (code 265) from the message.

Returns: avp_t

TYPECAST_DIAMETER_MESSAGE_T

Convert diameter_req_t to diameter_message_t. Will raise an undef if the value is null, empty, or the value has an invalid format for the destination type. (diameter_message_t : Define common operations for Diameter.Req or Diameter.Res.)

Returns: diameter_message_t

* USER_NAME

Returns the User-Name AVP (code 1) from the message.

Returns: avp_t

* VENDOR_ID

Returns the Vendor-Id AVP (code 266) from the message.

Returns: avp_t

* VENDOR_SPECIFIC_APPLICATION_ID

Returns the Vendor-Specific-Application-Id AVP (code 260) from the message.

Returns: vendor_spec_appid_avp_t

* VERSION

Returns the version of the Diameter protocol. Currently, Diameter supports

only version 1.

Returns: unum_text_t

DIAMETER_REQ_T

In this article