PI Expressions Reference Classes and Methods

Added by Catherine Hampton , last edited by Catherine Hampton on Nov 16, 2007  (view change)
Tags: 

This article contains a complete list of PI expression classes and methods.

Summary

The table below contains an alphabetized list of all PI expression classes and methods, each with a description that explains the function of the class or method and how it is used in a PI expression.  For methods, the data object type the method returns is listed at the beginning of the description in italics.

Expression Element
Description
CLIENT Designates an expression that refers to the client.
CLIENT.ETHER Operates on the ethernet protocol data associated with the current packet.
CLIENT.ETHER.DSTMAC Text. Returns the MAC address of the ethernet interface that was the current packet's destination. All MAC addresses are given as colon-delimited hexadecimal codes in the format ##:##:##:##:##:##. Valid values for each # include numbers 0-9 and letters A through F.
CLIENT.ETHER.DSTMAC.EQ(mac) Boolean. Compares the MAC address of the packet source ethernet interface against the MAC address designated in mac, and returns TRUE if they match.
CLIENT.ETHER.DSTMAC.GET1 Number. Returns the hexadecimal code of the first segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 12.
CLIENT.ETHER.DSTMAC.GET2 Number. Returns the hexadecimal code of the second segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 34.
CLIENT.ETHER.DSTMAC.GET3 Number. Returns the hexadecimal code of the third segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 56.
CLIENT.ETHER.DSTMAC.GET4 Number. Returns the hexadecimal code of the fourth segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 78.
CLIENT.ETHER.DSTMAC.GET5 Number. Returns the hexadecimal code of the fifth segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 9a.
CLIENT.ETHER.DSTMAC.GET6 Number. Returns the hexadecimal code of the sixth segment of the destination MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns bc.
CLIENT.ETHER.SRCMAC Text. Returns the MAC address of the ethernet interface that was the current packet's source. All MAC addresses are given as colon-delimited hexadecimal codes in the format ##:##:##:##:##:##. Valid values for each # include numbers 0-9 and letters A through F.
CLIENT.ETHER.SRCMAC.EQ(mac) Boolean. Compares the MAC address of the packet source ethernet interface against the MAC address designated in mac, and returns TRUE if they match.
CLIENT.ETHER.SRCMAC.GET1 Number. Returns the hexadecimal code of the first segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 12.
CLIENT.ETHER.SRCMAC.GET2 Text. Returns the hexadecimal code of the second segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 34.
CLIENT.ETHER.SRCMAC.GET3 Text. Returns the hexadecimal code of the third segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 56.
CLIENT.ETHER.SRCMAC.GET4 Text. Returns the hexadecimal code of the fourth segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 78.
CLIENT.ETHER.SRCMAC.GET5 Text. Returns the hexadecimal code of the fifth segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 9a.
CLIENT.ETHER.SRCMAC.GET6 Text. Returns the hexadecimal code of the sixth segment of the source MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns bc.
CLIENT.INTERFACE Designates an expression that refers to the ID of the network interface through which the current packet entered the Application Switch.
CLIENT.INTERFACE.ID Text. Extracts the interface ID of the interface through which the current packet entered the Application Switch, and returns that ID.
CLIENT.INTERFACE.RXTHROUGHPUT Number. Returns an integer representing the raw received traffic throughput in kilobytes per second for the previous seven seconds.
CLIENT.INTERFACE.RXTXTHROUGHPUT Number. Returns an integer representing the raw received and transmitted traffic throughput in kilobytes per second for the previous seven seconds.
CLIENT.INTERFACE.TXTHROUGHPUT Number. Returns an integer representing the raw transmitted traffic throughput in kilobytes per second for the previous seven seconds.
CLIENT.IP Operates on the IP protocol data associated with the current packet.
CLIENT.IP.DST Text. Returns the destination IP of the current packet.
CLIENT.IP.SRC Text. Returns the source IP of the current packet.
CLIENT.SSL Operates on the SSL protocol data for the current packet.
CLIENT.SSL.CIPHERBITS Number. Returns the number of bits in the cryptographic key used for this SSL transaction. If the connection is not SSL-based, returns 0.
CLIENT.SSL.CIPHEREXPORTABLE Boolean. Returns TRUE if the SSL cryptographic key is exportable.
CLIENT.SSL.CLIENT_CERT Text. Returns the SSL client certificate in the current SSL transaction. .
CLIENT.SSL.CLIENT_CERT.AUTH_KEYID Text. Returns a string containing the Authority Key Identifier extension of the X509 V3 certificate.
CLIENT.SSL.CLIENT_CERT.CERT_POLICY Text. Returns a string containing the client certificate policy.
CLIENT.SSL.CLIENT_CERT.DAYS_T0_EXPIRE Text. Returns a string containing the Authority Key Identifier extension of the X509 V3 certificate.
CLIENT.SSL.CLIENT_CERT.EXISTS Boolean. Returns TRUE if the client has an SSL client certificate.
CLIENT.SSL.CLIENT_CERT.ISSUER Text (Name/Value List). Returns a name/value list consisting of the client certificate issuer information.
CLIENT.SSL.CLIENT_CERT.KEY_USAGE(string) Boolean. Returns a boolean value indicating whether the specified key usage extension bit value in the X509 certificate is set. The string argument specifies which bit is checked. Valid arguments are:
  • DIGITAL_SIGNATURE. Returns TRUE if the digital signature bit is set; FALSE otherwise.
  • NONREPUDIATION. Returns TRUE if the non-repudiation bit is set; FALSE otherwise.
  • KEYENCIPHERMENT. Returns TRUE if the key encipherment bit is set; FALSE otherwise.
  • DATAENCIPHERMENT. Returns TRUE if the data encipherment bit is set; FALSE otherwise.
  • KEYAGREEMENT. Returns TRUE if the key agreement bit is set; FALSE otherwise.
  • KEYCERTSIGN. Returns TRUE if the key cert sign bit is set; FALSE otherwise.
  • CRLSIGN. Returns TRUE if the CRL bit is set; FALSE otherwise.
  • ENCIPHERONLY. Returns TRUE if the encipher only bit is set; FALSE otherwise.
  • DECIPHERONLY. Returns TRUE if the decipher only bit is set; FALSE otherwise.
CLIENT.SSL.CLIENT_CERT.PK_ALGORITHM Text. Returns the name of the public key algorithm used by the SSL key.
CLIENT.SSL.CLIENT_CERT.PK_ALGORITHM.BLOB_TO_HEX Text. Converts each character in the public key algorithm from standard text to a string of colon-delimited ASCII codes in hexadecimal format. For example, if the public key algorithm is "rsa", converts that string to "72:73:61".
CLIENT.SSL.CLIENT_CERT.PK_SIZE Number. Returns the number of bits used by the client certificate public key.
CLIENT.SSL.CLIENT_CERT.SERIALNUMBER Text. Returns the serial number of the client certificate.
CLIENT.SSL.CLIENT_CERT.SIGNATURE_ALGORITHM Text. Returns the name of the cryptographic algorithm used to sign the client certificate.
CLIENT.SSL.CLIENT_CERT.SUBJECT Text (Name/Value List). Returns the "Distinguished Name of the Issuer" of the client certificate as a name/value list.
CLIENT.SSL.CLIENT_CERT.SUBJECT_KEYID Text. Returns the Subject KeyID of the client certificate, if one exists. If there is no Subject KeyID, returns a zero-length text object.
CLIENT.SSL.CLIENT_CERT.VALID_NOT_AFTER Text (Time). Returns the date after which the client certificate is no longer valid.
CLIENT.SSL.CLIENT_CERT.VALID_NOT_BEFORE Text (Time). Returns the date before which the client certificate is not valid.
CLIENT.SSL.CLIENT_CERT.VERSION Text. Returns the version number of the certificate. If the connection is not SSL-based, returns zero (0).
CLIENT.SSL.IS_SSL Boolean. Returns TRUE if the current connection is SSL-based.
CLIENT.SSL.VERSION Text. Returns the SSL protocol version. For SSL2, returns 0x002. For SSL3, returns 0x300. For TLSv1, returns 0x301. If the current connection is not SSL-based, returns zero (0).
CLIENT.TCP Operates on the TCP protocol data associated with the current packet.
CLIENT.TCP.DSTPORT Number. Returns the ID of the current packet's destination port as a Number.
CLIENT.TCP.MSS Number. Returns the maximum segment size (MSS) for the current connection as a Number.
CLIENT.TCP.PAYLOAD(uint) Text. Returns the specified portion of the TCP payload data as a string, beginning with the first character and continuing for the number of characters designated in uint.
CLIENT.TCP.SRCPORT Number. Returns the ID of the current packet's source port as a Number.
CLIENT.UDP Operates on the UDP protocol data associated with the current packet.
CLIENT.UDP.DNS Text. Returns DNS data for the current packet's UDP source port.
CLIENT.UDP.DSTPORT Number. Returns the ID of the current packet's UDP destination port as a Number.
CLIENT.UDP.SRCPORT Number. Returns the ID of the current packet's UDP source port as a Number.
CLIENT.VLAN Operates on the VLAN through which the current packet entered the Application Switch.
CLIENT.VLAN.ID Number. Returns the ID of the VLAN through which the current packet entered the Application Switch as a Number.
HTTP Designates an HTTP connection.
HTTP.REQ Operates on an HTTP request.
HTTP.REQ.BODY Text. Returns the body of the HTTP request as a multiline text object. NOTE: This usage is deprecated; you should use HTTP.REQ.BODY(uint) instead.
HTTP.REQ.BODY(uint) Text. Returns the body of the HTTP request as a multiline text object up to the character position designated in uint. If the HTTP request body does not contain that many characters, returns the entire HTTP request body.
HTTP.REQ.CONTENT_LENGTH Number. Returns the length of the HTTP request as a Number.
HTTP.REQ.COOKIE Text (Name/Value List). Returns the contents of the HTTP Cookie header as a name/value list.
HTTP.REQ.DATE Text (Date). Returns the contents of the HTTP Date header as text or as a date object. The date formats recognized are:
  • RFC822. Sun, 06 Jan 1980 8:49:37 GMT
  • RFC850. Sunday, 06-Jan-80 9:49:37 GMT
  • ASCTIME. Sun Jan 6 08:49:37 1980
HTTP.REQ.HEADER(String) Text. Returns the contents of the HTTP header specified by the String argument.
HTTP.REQ.HOSTNAME Text. Returns the HTTP hostname.
HTTP.REQ.ISVALID Boolean. Returns TRUE if the HTTP request is properly formed.
HTTP.REQ.METHOD Text. Returns the HTTP method.
HTTP.REQ.TRACKING Text. Returns the HTTP body tracking mechanism.
HTTP.REQ.URL Text. Returns the HTTP URL in URL-encoded format.
HTTP.REQ.VERSION Text. Returns the HTTP version.
HTTP.RES Operates on an HTTP response.
HTTP.RES.BODY(uint) Text. Returns the body of the HTTP response as a multiline text object up to the character position designated in uint. If the HTTP response body does not contain that many characters, returns the entire HTTP response body.
HTTP.RES.CONTENT_LENGTH Number. Returns the length of the HTTP response as a Number.
HTTP.RES.DATE Text (Date). Returns the contents of the HTTP Date header as text or as a date object. The date formats recognized are:
  • RFC822. Sun, 06 Jan 1980 8:49:37 GMT
  • RFC850. Sunday, 06-Jan-80 9:49:37 GMT
  • ASCTIME. Sun Jan 6 08:49:37 1980
HTTP.RES.HEADER(String) Text. Returns the contents of the HTTP header specified by the String argument.
HTTP.RES.IS_VALID Boolean. Returns TRUE if the HTTP response is properly formed.
HTTP.RES.STATUS Number. Returns the HTTP response status code.
HTTP.RES.STATUS_MSG Text. Returns the HTTP response status message.
HTTP.RES.TRACKING Text. Returns the HTTP body tracking mechanism.
HTTP.RES.VERSION Text. Returns the HTTP version.
SERVER Designates an expression that refers to the server.
SERVER.ETHER Operates on the ethernet protocol data associated with the current packet.
SERVER.ETHER.DSTMAC Text. Returns the MAC address of the ethernet interface that was the current packet's destination.
SERVER.ETHER.DSTMAC.EQ(mac) Boolean. Compares the MAC address of the packet source ethernet interface against the MAC address designated in mac, and returns TRUE if they match.
SERVER.ETHER.DSTMAC.GET1 Number. Returns the hexadecimal code of the first segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 12.
SERVER.ETHER.DSTMAC.GET2 Number. Returns the hexadecimal code of the second segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 34.
SERVER.ETHER.DSTMAC.GET3 Number. Returns the hexadecimal code of the third segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 56.
SERVER.ETHER.DSTMAC.GET4 Number. Returns the hexadecimal code of the fourth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 78.
SERVER.ETHER.DSTMAC.GET5 Number. Returns the hexadecimal code of the fifth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 9a.
SERVER.ETHER.DSTMAC.GET6 Number. Returns the hexadecimal code of the sixth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns bc.
SERVER.ETHER.SRCMAC Text. Returns the MAC address of the ethernet interface that was the current packet's source. All MAC addresses are given as colon-delimited hexadecimal codes in the format ##:##:##:##:##:##. Valid values for each # include numbers 0-9 and letters A through F.
SERVER.ETHER.SRCMAC.EQ(mac) Boolean. Compares the MAC address of the packet source ethernet interface against the MAC address designated in mac, and returns TRUE if they match.
SERVER.ETHER.SRCMAC.GET1 Number. Returns the hexadecimal code of the first segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 12.
SERVER.ETHER.SRCMAC.GET2 Text. Returns the hexadecimal code of the second segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 34.
SERVER.ETHER.SRCMAC.GET3 Text. Returns the hexadecimal code of the third segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 56.
SERVER.ETHER.SRCMAC.GET4 Text. Returns the hexadecimal code of the fourth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 78.
SERVER.ETHER.SRCMAC.GET5 Text. Returns the hexadecimal code of the fifth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns 9a.
SERVER.ETHER.SRCMAC.GET6 Text. Returns the hexadecimal code of the sixth segment of the MAC address. For example, if the MAC address is 12:34:56:78:9a:bc, returns bc.
SERVER.INTERFACE Operates on the interface through which the current packet entered the Application Switch.
SERVER.INTERFACE.ID Text. Extracts the interface ID of the interface through which the current packet entered the Application Switch, and returns that ID.
SERVER.INTERFACE.RXTHROUGHPUT Number. Returns an integer representing the raw received traffic throughput in kilobytes per second for the previous seven seconds.
SERVER.INTERFACE.RXTXTHROUGHPUT Number. Returns an integer representing the raw received and transmitted traffic throughput in kilobytes per second for the previous seven seconds.
SERVER.INTERFACE.TXTHROUGHPUT Number. Returns an integer representing the raw transmitted traffic throughput in kilobytes per second for the previous seven seconds.
SERVER.IP Operates on the IP protocol data associated with the current packet.
SERVER.IP.DST Text. Returns the destination IP of the current packet.
SERVER.IP.SRC Text. Returns the source IP of the current packet.
SERVER.TCP Operates on the TCP protocol data associated with the current packet.
SERVER.TCP.DSTPORT Number. Returns the ID of the current packet's destination port as a Number.
SERVER.TCP.MSS Number. Returns the maximum segment size (MSS) for the current connection as a Number.
SERVER.TCP.SRCPORT Number. Returns the ID of the current packet's source port as a Number.
SERVER.VLAN Operates on the VLAN through which the current packet entered the Application Switch.
SERVER.VLAN.ID Number. Returns the ID of the VLAN through which the current packet entered the Application Switch as a Number.
SYS Designates an expression that refers to the Application Switch, rather than the client or server.
SYS.EVAL_CLASSIC_EXPR(classic_expr) Boolean. Evaluates the designated NetScaler classic expression and returns the result as a boolean value.
SYS.TIME Number. Returns the current system time as the number of seconds since "GMT Jan 1 1970 0h 0m 0s". NOTE: It is not possible to set the system time to date and time before 1970.
SYS.TIME.DAY Number. Extracts the day of the month from the current system time, and returns that value as a number from 1 through 31 representing that day.
SYS.TIME.HOURS Number. Extracts the hour from the current system time, and returns that value as an integer from 0 to 23.
SYS.TIME.MINUTES Number. Extracts the minute from the current system time, and returns that value as an integer from 0 to 59.
SYS.TIME.MONTH Number. Extracts the month from the current system time, and returns that value as an integer from 1 (January) to 12 (December).
SYS.TIME.RELATIVE_BOOT Number. Calculates the number of seconds to the closest previous or scheduled reboot, and returns an integer. If the closest boot time is in the past, the integer is negative; if it is in the future, the integer is positive.
SYS.TIME.RELATIVE_NOW Number. Calculates the number of seconds between the current system time and the specified time, and returns an integer showing that Number. If the designated time is in the past, the integer is negative; if it is in the future, the integer is positive.
SYS.TIME.SECONDS Number. Extracts the seconds from the current system time, and returns that value as an integer from 0 to 59.
SYS.TIME.WEEKDAY Number. Extracts the day of the week from the current system time, and returns that value as an integer from 0 (Sunday) to 6 (Saturday).
SYS.TIME.WEEKDAY.MUL(int) Number. Multiples the integer value of the day of the week portion of the current system time by int, and returns the resulting Number.
SYS.TIME.YEAR Number. Extracts the year from the current system time, and returns that value as a four-digit integer.
TARGET Designates ....
TEXT Designates any piece of text.
URL Designates an HTTP URL.
VPN Designates a connection via a virtual private network (VPN).
VPN.BASEURL Text. Returns the VPN base URL.
VPN.CLIENTLESS_BASEURL Text. Returns the clientless VPN base URL.
VPN.CLIENTLESS_HOSTURL Text. Returns the clientless VPN host URL.
VPN.HOST Text. Returns the VPN host.

More Information