IP Library Granted Patent US 10,645,176
Granted Patent B2
US 10,645,176 · App. 15/850,498 · Granted May 5, 2020

System and method to process packets in a transmission control protocol session

Inventors: Anoop Wilbur Saldanha (Mangalore, IN); Marshall Ha (San Jose, CA)
Assignee: Cyphort Inc.
H04L67/142H04L69/161H04L69/163H04L69/166H04L69/22
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,645,176
App. No.
15/850,498
Granted
May 5, 2020
Kind
B2
Abstract

A device may include one or more memories and one or more processors communicatively coupled to the one or more memories to: receive a plurality of data packets of a Transmission Control Protocol (TCP) session; determine that a particular TCP segment, of the TCP session that includes a synchronization acknowledgment (SYN-ACK) flag, has been received before a corresponding TCP segment of the TCP session that includes a synchronization (SYN) flag; store a sequence number of the particular TCP segment as an initial sequence number for a stream of the TCP session; and reassemble or rearrange a set of data packets of the TCP session based on the initial sequence number for the stream and based on one or more sequence numbers of the set of data packets.

Claims (59)

1. A device, comprising:

one or more memories; and

one or more processors to:

receive a plurality of data packets of a Transmission Control Protocol (TCP) session;

determine, based on the plurality of data packets, a state of one direction of a first stream of the TCP session;

generate, based on the state of the one direction of the first stream, a TCP state machine for the TCP session based on one or more values associated with the TCP session;

determine, based on the TCP state machine, that a particular TCP segment, of the TCP session that includes a synchronization acknowledgment (SYNACK) flag, has been received before a corresponding TCP segment of the TCP session that includes a synchronization (SYN) flag;

store a sequence number of the particular TCP segment as an initial sequence number for the first stream;

reassemble or rearrange a set of data packets of the TCP session based on the initial sequence number for the first stream and based on one or more sequence numbers of the set of data packets; and

generate an initial sequence number for a second stream based on a value associated with the SYN-ACK flag.

2. The device of claim 1 , where the first stream includes at least one of a client stream or a server stream.

3. The device of claim 1 , where the TCP state machine identifies at least one of:

the sequence number or the one or more sequence numbers,

the one direction of the first stream,

a last byte sequence number for the first stream,

a last seen ACK value for the first stream, or

a value that indicates a byte value identifying data packets for which reassembly or rearranging have been performed.

4. The device of claim 1 , where the device comprises a network interface card.

5. The device of claim 1 , where the reassembly or rearrangement is performed based on at least one of a finish flag or a reset flag of the plurality of data packets.

6. The device of claim 5 , where the finish flag or the reset flag is used to determine a last byte for which the reassembly or rearrangement is to be performed.

7. The device of claim 1 , where the corresponding TCP segment is identified by an acknowledgment value of the particular TCP segment.

8. A method, performed by a network device, to process data packets in a transmission control protocol (TCP) session, the method comprising:

receiving a plurality of data packets;

determining, based on the plurality of data packets, a state of one direction of a first stream of the TCP session;

generating, based on the state of the one direction of the first stream, a modified TCP state machine for the TCP session based on one or more values in at least one data packet of the plurality of data packets, the at least one data packet including a TCP segment;

analyzing the TCP segment of the at least one data packet for one or more flags to generate, based on the modified TCP state machine, a determination that the TCP segment includes a synchronization acknowledgment (SYNACK) flag before another determination that another TCP segment for the TCP session includes a synchronization (SYN) flag;

based on the determination that the TCP segment includes a SYN-ACK flag before the other determination that the other TCP segment for the TCP session includes the SYN flag, storing a sequence number of the TCP segment as an initial sequence number for the first stream;

reassembling a set of the plurality of data packets based on sequence numbers of the set of the plurality of data packets, where the sequence numbers of the set of the plurality of data packets are less than a last acknowledgment sequence number for a corresponding direction; and

generating an initial sequence number for a second stream based on a value associated with the SYN-ACK flag.

9. The method of claim 8 , wherein generating the initial sequence number for the second stream comprises:

generating the initial sequence number for the second stream based on an ACK value in the SYN-ACK flag.

10. The method of claim 8 , where the other TCP segment is identified based on an ACK value in the TCP segment with the SYN-ACK flag.

11. The method of claim 8 , where the modified TCP state machine identifies at least one of:

the sequence number of the TCP segment,

a direction associated with the TCP segment,

a last byte sequence number for at least one stream of the TCP session,

a last seen ACK value for the at least one stream, or

a value that indicates a byte value identifying data packets for which reassembly or rearranging have been performed.

12. The method of claim 8 , where the plurality of data packets are received over a plurality of receive rings.

13. The method of claim 8 , where the plurality of data packets are received from a tap or span or some form of mirroring between a client device and a server device.

14. The method of claim 8 , further comprising:

storing information indicating that the one direction of the first stream is from a server to a client based on the determination that the TCP segment includes the SYN-ACK flag.

15. A non-transitory computer-readable medium storing instructions, the instructions comprising:

one or more instructions that, when executed by one or more processors of a device, cause the one or more processors to:

receive a plurality of data packets of a Transmission Control Protocol (TCP) session;

determine, based on the plurality of data packets, a state of one direction of a first stream of the TCP session;

generate, based on the state of the one direction of the first stream, a TCP state machine for the TCP session based on one or more values associated with the TCP session;

determine, based on the TCP state machine, that a particular TCP segment of the TCP session that includes a synchronization acknowledgment (SYNACK) flag has been received before a corresponding TCP segment of the TCP session that includes a synchronization (SYN) flag;

store a sequence number of the particular TCP segment as an initial sequence number for the first stream;

reassemble or rearrange a set of data packets of the TCP session based on the initial sequence number for the first stream and based on one or more sequence numbers of the set of data packets; and

generate an initial sequence number for a second stream based on a value associated with the SYN-ACK flag.

16. The non-transitory computer-readable medium of claim 15 , where the one or more instructions, that cause the one or more processors to reassemble or rearrange the set of data packets, cause the one or more processors to:

transmit the corresponding TCP segment before the particular TCP segment.

17. The non-transitory computer-readable medium of claim 15 , where the set of data packets are reassembled or rearranged based on a first data packet of the set of data packets including an ACK that identifies a second data packet of the set of data packets.

18. The method of claim 8 , further comprising:

generating a second modified TCP state machine for a second direction of the first stream.

19. The device of claim 1 , wherein the one or more processors, when generating the initial sequence number for the second stream, are to:

generate the initial sequence number for the second stream based on an ACK value in the SYN-ACK flag.

20. The device of claim 1 , wherein the one or more processors are further to: generate a second modified TCP state machine for a second direction of the first stream.

Assignments (2)
NUNC PRO TUNC ASSIGNMENT Recorded May 6, 2026
From: CYPHORT INC.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 075513/0143 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2017
From: SALDANHA, ANOOP WILBUR; HA, MARSHALL
To: CYPHORT INC.
Reel/Frame 044468/0545 →
Priority Claims (1)
IN 201611044894 · Dec 29, 2016 · national
Continuity (1)
Related Publication 20180191835A1 · Jul 5, 2018