matchport()

Returns true if the specified port group contains a combination of a port and a protocol and false otherwise.

Syntax

matchport(PORT_GUID, PORT_EXPR[, PROTO_EXPR])
Required Parameter
PORT_GUID
Port group GUID. The GUID string must be a valid port group identifier. If you specify an invalid port group GUID, the query fails.
PORT_EXPR
Expression to specify the port number. The value must be an integer between 0 and 65535. The function returns false if the expression cannot be evaluated or the value is not valid.
Optional Parameter
PROTO_EXPR
Expression to specify the protocol. Only TCP or UDP strings are allowed. The function returns false if the expression cannot be evaluated or the value is not valid. When the expression is null, it returns true if the port group contains either TCP or UDP.