Patent ID: 8873556

Claim:
A method for processing packets at a network device, the method comprising: receiving a plurality of packets associated with a flow, one or more of the plurality of packets having associated header data and content; based on the content of two or more first packets in the plurality of packets, identifying an application associated with the flow, where none of the first packets is addressed to the network device, wherein identifying the application includes reassembling two or more of the first packets, and performing heuristic analysis on the content of the reassembled two or more of the first packets; and for one or more second packets associated with the flow, determining a forwarding destination for the second packets based on the application associated with the flow using an application based policy and a non-application based policy; wherein if the application based policy indicates that the one or more second packets are forwarded to a first destination and the non-application based policy indicates that the one or more second packets are forwarded to a second destination, and wherein the network device is configured with a rule indicating whether to give a preference to the application based policy or to the non-application based policy, then the network device applies the rule to determine whether to forward the one or more second packets to the first destination or to the second destination as the forwarding destination; and forwarding the one or more second packets according to the determined forwarding destination.