IBM® Carrier Grade Server X3650 T
Revision 3.0
93
operators result in string comparisons unless otherwise specified. For example, if x and y are character-
string values, "x != y" evaluates to 1 if strcmp(x,y) would return a non-zero value, or to zero otherwise.
(Note that sometimes a string comparison is not performed even when the right operand is a string; see
Table 3 for examples.)
The "=" operator is a synonym for the "==" operator.
The "&" operator is defined only for integer operands, and has the meaning specified for that token in the
C language (bitwise OR).
As in the C language, the expression "! x" evaluates to 1 if x is zero, or to zero otherwise.
For purposes of evaluating expressions, operator precedence shall be as defined for the corresponding
operators in the C language.
An identifier token, which conforms to the rules of a C-language identifier, can be the name of an attribute
(e.g., severity) or of a symbolic constant (e.g., EMERG). An attribute name stands for the value of the
indicated attribute in the event record being examined.
A string-literal token is a character sequence, beginning and ending with double-quote characters, that
conforms to the rules for a C-language character string literal. Support for wide string literals (in which
the first double-quote is immediately preceded by the letter 'L') is not required. Support for automatic
concatenation of adjacent string literals into a single string literal is not required.
An integer-constant token is a sequence of digits and letters than conforms to the rules for a C-language
integer constant (decimal, hexadecimal, or octal), except than unsigned and long suffixes (upper or
lowercase 'U', upper or lowercase 'L') are not permitted.
The expression "x contains y" is valid only for character-string operands. It evaluates to zero if
strstr(x,y) would return NULL, or to 1 otherwise.
A test expression that consists only of an attribute name evaluates to 1 for a record that contains a value
for that attribute, or to zero for other records. In particular, the test "data" shall fail if the record contains
no variable portion.
3
A test of the form "attribute-name op val" shall fail for any event record that does not contain a value for
the named attribute.
17.2.8.2.6 Required Comparison Operations for General Queries
Table 3 lists the required members of struct syscon_log_entry and the required comparison operations
for each member. The “string representation” of a record’s attribute is the character string returned by the
syscon_log_memtostr() function for that member of that record.
4
Table 3. Required Operations on Standard Attributes
3
In strictly conforming applications, this paragraph and the next apply only to the “data” pseudo-attribute, which refers
to the variable portion of an event record. They could also apply to implementation- and/or application-defined
attributes in implementations that support such attributes.
4
The implementation is permitted to convert a string-literal operand to an equivalent value (e.g., uid=“root” to uid=0)
to obtain an equivalent (presumably more efficient) test.