ADC CLI Commands

policy-evaluation

The following operations can be performed on “policy-evaluation”:

show policy evaluation

Executes pixl expression or action and gives result. Result type can be zero or more of: -Bool -Num -Double -Unsigned long -String

Synopsis

show policy evaluation (-expression | -action ) -type -input

Arguments

expression Expression string. For example: http.req.body(100).contains(“this”).

action Rewrite action name. Supported rewrite action types are: -delete -delete_all -delete_http_header -insert_after -insert_after_all -insert_before -insert_before_all -insert_http_header -replace -replace_all

type Indicates request or response input packet

Possible values: HTTP_REQ, HTTP_RES, TEXT

input Text representation of input packet.

Output

stateflag pitModifiedInputData Text representation of packet after evaluating expression or rewrite action.

pitBoolResult Result of the expression in bool format.

pitNumResult Result of the expression in num format.

pitDoubleResult Result of the expression in double format.

pitUlongResult Result of the expression in unsigned long format.

pitRefResult Result of the expression in string format.

isPitEmptyRefResult Result of the expression is empty string.

pitOffsetResult Offset of the resultant sting.

pitOffsetResultLen Offset length of the resultant sting.

isTruncatedRefResult Identify whether ref result is truncated result.

pitBoolEvalTime Average evaluation time of bool type expression in nanoseconds.

pitNumEvalTime Average evaluation time of num type expression in nanoseconds.

pitDoubleEvalTime Average evaluation time of double type expression in nanoseconds.

pitUlongEvalTime Average evaluation time of unsigned long type expression in nanoseconds.

pitRefEvalTime Average evaluation time of string type expression in nanoseconds.

pitOffsetEvalTime Average evaluation time in finding offset of the resultant string in the input. Time is in nanoseconds.

pitActionEvalTime Average evaluation time of rewrite action in nanoseconds.

pitOperationPerformerArray Details of the operation Citrix ADC performed at various offsets during applying of rewrite action on input data. Operation can be insertion, modfication or deletion.

pitOldOffsetArray Details of the offsets in the input data at which Citrix ADC either inserted or modified or deleted data during applying of rewrite action.

pitNewOffsetArray Details of the offsets in the output data at which Citrix ADC either inserted or modified or deleted data during applying of rewrite action.

pitOffsetLengthArray Details of the lengths of the data which Citrix ADC modified or deleted during applying of rewrite action.

pitOffsetNewLengthArray Details of the lengths of the data which Citrix ADC either inserted or modified during applying of rewrite action.

pitBoolErrorResult Result of the bool type expression if any error occurs during evaluation. Result will be in string format.

pitNumErrorResult Result of the num type expression if any error occurs during evaluation. Result will be in string format.

pitDoubleErrorResult Result of the double type expression if any error occurs during evaluation. Result will be in string format.

pitUlongErrorResult Result of the unsigned long type expression if any error occurs during evaluation. Result will be in string format.

pitRefErrorResult Result of the ref type expression if any error occurs during evaluation. Result will be in string format.

pitOffsetErrorResult Result of the expression if any error occurs in calculating offset. Result will be in string format.

pitActionErrorResult Result of the action if any error occurs in evaluation. Result will be in string format.

devno count

Example

Example 1: show policy evaluation -action rw_act_1 -type http_req -input ‘GET / HTTP/1.1\r\nHost: abc.com\r\n\r\n’ Example 2: show policy evaluation -expression ‘http.res.body(10).contains(“foo”)’ -type http_res -input “HTTP/1.1 200 OK\r\n\r\nabcdfooabcd” Example 3: show policy evaluation -expression ‘text.contains(“foo”)’ -type text -input “testing_test_foo”

policy-evaluation