Patent ID: 8085777

Claim:
A packet-processing apparatus, for receiving and processing N packets in a series, each of the N series packets having a current header, N being a natural number, the packet-processing apparatus comprising: an agent controller, for sequentially receiving each of the N packets and determining if the current header of the packet matches with one of a plurality of pre-stored first established headers which corresponds to one of a plurality of pre-stored first processed headers, and if yes, the agent controller selectively intercepts the packet in accordance with a first criterion and outputs the packet to an output interface in accordance with the first processed header corresponding to the first established header matched, and if no, the agent controller stores the current header of the packet as a second established header, labels an index to the second established header, and delivers the packet for further processing; a processing unit, coupling to the agent controller, for receiving the packet from the agent controller, changing the current header of the packet into a second processed header, and outputting the packet to the output interface in accordance with the second processed header; a monitoring unit, coupling to the agent controller, and the processing unit respectively, for intercepting the packet from the processing unit, selectively storing the second processed header of the packet corresponding to the second established header in accordance with the index based on a second criterion, and outputting the packet through the agent controller; a lookup table, coupling to the agent controller and the monitoring unit respectively, for storing the plurality of first established headers and the plurality first processed header corresponding to the first established headers, the second established header delivered by the agent controller and the second processed header corresponding to said second established header delivered by the monitoring unit; and a control unit, coupling to the lookup table, for periodically refreshing the content of the lookup table and setting a flag in the lookup table corresponding to a series number, wherein the flag is part of the first and second criteria.