# US 2005/0238012 A1 · Programmable packet parsing processor

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2005/0238012 A1
- Document ID: US20050238012A1
- Status: Published application
- Kind: A1
- Application number: 10/927,290
- Filed: 2004-08-25
- Published: 2005-10-27
- Earliest claimed: 2004-04-26
- Assignees: Cisco Technology, Inc.
- Inventors: Rina Panigrahy; Jackie Liu; Daniel Ng; Sanjay Jain; Nagaraj Bagepalli; Abhijit Patra
- Web page: https://patentgrep.com/patent/US20050238012A1

## CPC

- H04L 63/0254: {Stateful filtering}
- H04L 63/1408: {by monitoring network traffic (monitoring network traffic per se H04L43/00)}
- H04L 69/22: Parsing or analysis of headers
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present invention provides a packet processing device and method. A parsing processor provides instruction-driven content inspection of network packets at 10-Gbps and above with a parsing engine that executes parsing instructions. A flow state unit maintains statefulness of packet flows to allow content inspection across several related network packets. A state-graph unit traces state-graph nodes to keyword indications and/or parsing instructions. The parsing instructions can be derived from a high-level application to emulate user-friendly parsing logic. The parsing processor sends parsed packets to a network processor unit for further processing.

## Claims

### Claim 1

A packet parsing processor, comprising:
a state-graph unit to store parsing instructions for content inspection of network packets at memory locations representative of packet parsing states; and
a parsing engine, having an input/output coupled to an input/output of the state-graph unit to receive the parsing instructions and having an input coupled to receive a network packet, the parsing engine to execute a first parsing instruction located at a current packet parsing state against a byte steam from the network packet to determine a next packet parsing state.

### Claim 2 (depends on 1)

The packet processor of claim 1, wherein the current packet parsing state comprises a bit indicating that the current packet parsing state contains the first parsing instruction.

### Claim 3 (depends on 1)

The packet processor of claim 1, wherein the parsing engine further comprises a register to store the data, wherein the first parsing instruction comprises a register instruction to perform actions on the data.

### Claim 4 (depends on 3)

The packet processor of claim 3, wherein the register instruction copies a current byte from a byte stream across a plurality of related network packets from the network packet to the register.

### Claim 5 (depends on 3)

The packet processor of claim 3, wherein the register instruction skips a defined number of bytes within a byte stream spanning across a plurality of related network packets from the network packet to the register.

### Claim 6 (depends on 3)

The packet processor of claim 3, wherein the register instruction copies a bit operand to the register.

### Claim 7 (depends on 3)

The packet processor of claim 3, wherein the register instruction converts a string representation of a number to a register value.

### Claim 8 (depends on 1)

The packet processor of claim 1, wherein the parsing engine further comprises a register, wherein the first parsing instruction comprises a function call instruction to save a current parsing state address in the register and jump to a subroutine.

### Claim 9 (depends on 8)

The packet processor of claim 8, further comprising a return instruction to jump back to the current state address stored in the register.

### Claim 10 (depends on 1)

The packet processor of claim 1, wherein the first parsing instruction comprises a messaging instruction to send bytes from a byte stream to external to the packet parsing processor for additional processing.

### Claim 11 (depends on 1)

The packet processor of claim 1, further comprising a hash table to store portions of parsing states, wherein the first parsing instruction comprises a hash instruction.

### Claim 12 (depends on 11)

The packet processor of claim 11, wherein the hash instruction calculates a hash key indicative of an entry in the hash table.

### Claim 13 (depends on 11)

The packet processor of claim 11, wherein the hash instruction modifies an entry in the hash table.

### Claim 14 (depends on 1)

The packet processor of claim 1, wherein the first parsing instruction comprises a bit vector instruction to perform a logical operation against a bit vector related to a parsing context maintained across a plurality of related network packets.

### Claim 15 (depends on 1)

The packet processor of claim 1, wherein the first parsing instruction comprises a location of the next parsing state.

### Claim 16 (depends on 1)

The packet processor of claim 1, wherein the byte stream comprises payload data from the network packet.

### Claim 17 (depends on 1)

The packet processor of claim 1, wherein the byte stream comprises header data from the network packet.

### Claim 18

In a packet parsing processor, a method comprising:
storing parsing instructions for content inspection of network packets at memory locations representative of packet parsing states;
receiving a first parsing instruction and a network packet; and
executing a first parsing instruction located at a current packet parsing state against a byte stream of the network packet to determine a next packet parsing state.

### Claim 19 (depends on 18)

The method of claim 18, further comprising:
indicating that the current packet parsing state contains the first parsing instruction.

### Claim 20 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a register instruction to perform actions on the data.

### Claim 21 (depends on 20)

The method of claim 20, wherein the register instruction copies a current byte from the byte stream spanning across a plurality of related network packets from a network packet to a register.

### Claim 22 (depends on 20)

The method of claim 20, wherein the register instruction skips a defined number of bytes within the byte stream spanning across a plurality of related network packets from the network packet to a register.

### Claim 23 (depends on 20)

The method of claim 20, wherein the register instruction copies a bit operand to a register.

### Claim 24 (depends on 20)

The method of claim 20, wherein the register instruction converts a string representation of a number to a register value.

### Claim 25 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a function call instruction to save a current parsing state address in a register and jump to a subroutine.

### Claim 26 (depends on 25)

The method of claim 25, further comprising a return instruction to jump back to the current parsing state address stored in the register.

### Claim 27 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a messaging instruction to send bytes from the byte stream to external to the packet parsing processor for additional processing.

### Claim 28 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a hash instruction to perform an action related to the hash table.

### Claim 29 (depends on 28)

The method of claim 28, wherein the hash instruction calculates a hash key indicative of an entry in the hash table.

### Claim 30 (depends on 28)

The method of claim 28, wherein the hash instruction modifies an entry in a hash table.

### Claim 31 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a bit vector instruction to perform a logical operation against a bit vector related to a parsing context maintained across a plurality of related network packets.

### Claim 32 (depends on 18)

The method of claim 18, wherein the first parsing instruction comprises a location of the next packet parsing state.

### Claim 33

A packet parsing processor, comprising:
means for storing parsing instructions for content inspection of network packets at memory locations representative of packet parsing states;
means for receiving a first parsing instruction and a network packet; and
means for executing, coupled to the means for storing and the means for receiving, the means for executing performing an action on a first parsing instruction located at a current packet parsing state against a byte stream of the network packet to determine a next packet parsing state.

### Claim 34 (depends on 33)

The packet parsing processor of claim 33, further comprising:
means for indicating that the first packet parsing state contains the first parsing instruction.

### Claim 35 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a register instruction to perform actions on the data.

### Claim 36 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a function call instruction to save a current parsing state address in a register and jump to the next parsing state.

### Claim 37 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a messaging instruction to send bytes from the byte stream to external to the packet parser for processing.

### Claim 38 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a hash instruction to perform an action related to a means for hashing.

### Claim 39 (depends on 38)

The packet parsing processor of claim 38, wherein the hash instruction calculates a hash key indicative of an entry in the means for hashing.

### Claim 40 (depends on 38)

The packet parsing processor of claim 38, wherein the hash instruction modifies an entry in the means for hashing.

### Claim 41 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a bit vector instruction to perform a logical operation against a bit vector related to a parsing context maintained across a plurality of related network packets.

### Claim 42 (depends on 33)

The packet parsing processor of claim 33, wherein the first parsing instruction comprises a location of the next packet parsing state.

### Claim 43

A computer program product, comprising a computer-readable medium having computer program instructions and data embodied thereon for a method of parsing packets in a packet parsing processor, the method comprising:
storing parsing instructions for content inspection of network packets at memory locations representative of packet parsing states;
receiving a first parsing instruction and a network packet; and
executing a first parsing instruction located at a current packet parsing state against a byte stream of the network packet to determine a next packet parsing state.

### Claim 44 (depends on 43)

The computer program product of claim 43, further comprising:
indicating that the first packet parsing state contains the first parsing instruction.

### Claim 45 (depends on 43)

The computer program product of claim 43, wherein the first parsing instruction comprises a register instruction to perform actions on the data.

### Claim 46 (depends on 43)

The computer program product of claim 43, wherein the first parsing instruction comprises a function call instruction to save a current parsing state address in a register and jump to a subroutine.

### Claim 47 (depends on 43)

The computer program product of claim 43, wherein the first parsing instruction comprises a messaging instruction to send bytes from a byte stream to external to the packet parser for processing.

### Claim 48 (depends on 43)

The computer program product of claim 43, wherein the first parsing instruction comprises a hash instruction to perform an action related to a hash table.

### Claim 49 (depends on 48)

The computer program product of claim 48, wherein the hash instruction calculates a hash key indicative of an entry in the hash table.

### Claim 50 (depends on 48)

The computer program product of claim 48, wherein the hash instruction modifies an entry in the hash table.

### Claim 51 (depends on 43)

The computer program product of claim 43, wherein the first parsing instruction comprises a bit vector instruction to perform a logical operation against a bit vector related to a parsing context maintained across a plurality of related network packets.
The computer program product of claim 43, wherein the first parsing instruction comprises a location of the next packet parsing state.

### Claim 52

A network device having a processor and a memory, comprising:
a state-graph unit to store parsing instructions for content inspection of network packets at memory locations representative of packet parsing states; and
a parsing engine, having an input/output coupled to an input/output of the state-graph unit to receive the parsing instructions and having an input coupled to receive a network packet, the parsing engine to execute a first parsing instruction located at a current packet parsing state against a byte steam from the network packet to determine a next packet parsing state.
