Claims
- 1. A computer implemented method of processing a packet, comprising:
associating a packet context with the packet in response to receiving the packet; storing information related to the packet in the packet context; determining a first action in an initial action table; storing a pointer to the first action in the packet context; retrieving the first action; and processing the first action, the first action including a pointer to a next action, the pointer to the next action being stored in the packet context in place of the pointer to the first action in response to processing of the first action.
- 2. An apparatus for processing a packet based, comprising:
an input unit for receiving the packet; a packet processing controller connected to the input unit for initiating a packet context for the received packet in response to the packet being received, assigning an initial action table with at least one action entry to the packet, and storing information associated with the packet in the packet context; a field extraction unit for extracting a field from the packet under direction of the packet processing controller; a table entry processor for receiving and decoding action entries, generating a command in response to a first action entry that causes the packet processing controller to cause the field extraction unit to extract a field from the packet, and generating a command in response to a second action entry that causes the packet processing controller to store a packet edit in the packet context; and an editing unit for receiving the packet edit stored in the packet context from the packet processing controller and editing the packet.
- 3. A computer program product comprising a computer-readable medium containing computer program code for processing a packet, the computer program code comprising instructions for performing the steps of:
associating a packet context with the packet in response to receiving the packet; storing information related to the packet in the packet context; determining a first action in an initial action table; storing a pointer to the first action in the packet context; retrieving the first action; and processing the first action, the first action including a pointer to a next action, the pointer to the next action being stored in the packet context in place of the pointer to the first action in response to processing of the first action.
- 4. A method for an application programming interface, the application programming interface being adapted to receive instructions to create an action table, instructions to add at least one action to the action table, instructions to remove at least one action from the action table, and instructions to delete the action table, the action table controlling the execution of a packet processor to process a packet, comprising:
receiving instructions to create at least one action table; receiving instructions to create at least one lookup table, the lookup table including match rules; receiving instructions to create at least one state table, the state table including state records; and receiving instructions to link the at least one action table with the at least one lookup table and the at least one state table to implement a packet processing program.
- 5. The method of claim 4 wherein the application programming interface comprises a mechanism for receiving symbolic names of protocols within the packet and translating the symbolic names of protocols into encapsulation pointers.
- 6. The method of claim 5 wherein the application programming interface further comprises a mechanism for receiving symbolic names for fields within the protocols and translating the symbolic names for fields within the protocols into encapsulation pointer relative offsets.
RELATED APPLICATIONS
[0001] This application claims priority from U.S. provisional application No. 60/354,405 filed on Feb. 4, 2002, which is incorporated by reference herein in its entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60354405 |
Feb 2002 |
US |