Patent ID: 8234255

Claim:
A method comprising: receiving a packet at a network device; invoking, by a first hardware component associated with the network device, a first function, the first function causing a second hardware component associated with the network device to cause a third hardware component associated with the network device to load a set of patterns from a database into a dynamic memory to start a pattern matching session; obtaining, by the first hardware component, data from the packet; storing, by the first hardware component, the data in a memory; invoking, by the first hardware component, a second function, the second function sending a request to the third hardware component to match a portion of the data to the set of patterns, the request identifying the portion in the memory; accessing, by the third the third hardware component and in response to receiving the request, the portion in the memory based on the request; comparing, by the third hardware component, the accessed portion to the set of patterns; generating, by the third hardware component, a result by comparing the accessed portion to the set of patterns; outputting, by the third hardware component, the result to the second hardware component; invoking, by the first hardware component, the second function, the second function sending another request to match another portion of the data to a set of patterns without further storing the data in the memory, the other request identifying the other portion in the memory; invoking, by the first component, a third function, the third function ending the pattern matching session; and invoking, by the first component, a fourth function, the fourth function unloading the set of patterns from the dynamic memory when a different set of patterns is loaded into the dynamic memory.