$geo (parse-spec) function
Similar to the preceding $ipaddr() function, except that the two-letter country code for the IPv4 portion of the word given by parse-spec is returned. If the parse-spec value does not return an IP address, the match specification is not matched. This function is especially useful in a nested specification. (See further section.)
Target String | Parse Expression | Return Value |
|---|---|---|
src: 192.168.1.1 dest: 10.1.1.2
| $geo ($2) | ZZ |
address target: 1.2.1.1:88 logged
| $geo ($extip()) | CN |
dropped=66.2.3.45
| $geo (dropped=*) | US |
Test 123 | $geo ($2) | No match. The second word of the target string is not an IP address. |
Test 192.1.1.1 value | $geo (xxx: *) | No match. There is no match for XXX: * in the target string. |
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*