摘要 |
A packet filter is provided comprising an interface (50) for receiving packets of data from a network and a packet processor (54). The packet processor matches a stored rule against the packets, wherein the rule comprises packet filter sub-expressions nested as elements within a regular expression pattern. A regular expression engine (54a) is arranged to match the regular expression pattern against a target sequence of received packets. To match an element of the regular expression pattern with a packet in the sequence, a packet filter engine (54b) is used to evaluate the packet filter sub-expression of that element against the byes of that packet. The rule is determined to match the sequence of packets if all the elements have been matched according to the regular expression pattern. An actioning module (60) takes a predetermined action in response to the rule being determined to match the packets. |