IP Library Granted Patent US 12712950
Granted Patent B2
US 12712950 · App. 18/161,460 · Granted Aug 18, 2026

Method for processing packet and apparatus

Inventors: Hewen Zheng (Nanjing, CN); Xiaojun Zhang (Shenzhen, CN); Lei Han (Nanjing, CN); Xiaofei Xu (Beijing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04L69/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 12712950
App. No.
18/161,460
Granted
Aug 18, 2026
Kind
B2
Abstract

A method implemented by a communication apparatus for processing a packet. The method includes obtaining, by the communication apparatus, a first packet, where the first packet includes a first-layer header. The first-layer header includes an identification field used to identify whether the first-layer header of the first packet includes information in a second-layer header. The communication apparatus then processes the first packet, which may include sending the first packet, forwarding the first packet, scheduling or marking the first packet, or the like.

Claims (42)

1 . A method implemented by a communication apparatus, the method comprising:

obtaining a second packet comprising at least one of a network layer header or a transport layer header;

generating, based on the second packet, a first packet comprising a first-layer header, wherein the first-layer header comprises an identification field for identifying whether the first-layer header comprises information in a second-layer header, wherein a link layer header of the first packet comprises the information in the at least one of the network layer header or the transport layer header of the second packet, and wherein the first packet does not comprise the at least one of the network layer header or the transport layer header; and

processing the first packet.

2 . The method of claim 1 , wherein the first packet does not comprise the second-layer header.

3 . The method of claim 1 , wherein the first-layer header and the second-layer header comprise at least one of the link layer header, a network layer header, or a transport layer header, and wherein the second-layer header is different from the first-layer header.

4 . The method of claim 3 , wherein a link layer protocol of the link layer header comprises any one of an Ethernet protocol, a wireless fidelity (Wi-Fi) protocol, or a point-to-point protocol (PPP), wherein a network layer protocol of the network layer header comprises any one of an Internet Protocol (IP) version 4 (IPv4) or IP version 6 (IPv6), an Address Resolution Protocol (ARP), or a multi-protocol label switching (MPLS) protocol, and wherein a transport layer protocol of the transport layer header comprises any one of a Transmission Control Protocol (TCP), a User Datagram Protocol (UDP), a generic routing encapsulation (GRE) protocol, a Datagram Congestion Control Protocol (DCCP), or a Stream Control Transmission Protocol (STCP).

5 . The method of claim 1 , further comprising:

determining that the first-layer header comprises the information in the second-layer header when the identification field carries a first identifier; or

determining that the first-layer header does not comprise the information in the second-layer header when the identification field carries a second identifier.

6 . The method of claim 5 , further comprising determining that the first-layer header comprises the information in the second-layer header in response to the identification field carrying the first identifier, wherein the first-layer header comprises the link layer header, wherein the link layer header comprises at least one of source Internet Protocol (IP) address information, destination IP address information, or source port information, wherein the second-layer header comprises at least one of a network layer header or a transport layer header, wherein the source IP address information and the destination IP address information are from the network layer header, and wherein the source port information is from the transport layer header.

7 . The method of claim 6 , wherein the link layer header further comprises type of service (TOS) information from the network layer header.

8 . The method of claim 1 , wherein processing the first packet comprises sending the first packet.

9 . The method of claim 1 , wherein a payload of the first packet is the payload of the second packet.

10 . The method of claim 1 , wherein the first packet is generated based on the second packet in response to a determining that a length of the second packet is less than or equal to at least one of a length threshold or a destination port field in the transport layer header of the second packet carries a preset port identifier.

11 . The method of claim 1 , wherein processing the first packet comprises at least one of:

forwarding the first packet based on a destination Internet Protocol (IP) address information comprised in the link layer header; or

scheduling the first packet to a corresponding queue based on a type of service (TOS) information comprised in the link layer header.

12 . The method of claim 11 , wherein when a queue depth of the corresponding queue is greater than or equal to a depth threshold, the TOS information comprises marked explicit congestion notification (ECN) information.

13 . The method of claim 1 , wherein processing the first packet comprises:

determining an application process based on source Internet Protocol (IP) address information, destination IP address information, and source port information in the link layer header; and

processing the first packet using the application process.

14 . An apparatus comprising:

a memory configured to store instructions; and

a processor coupled to the memory and configured to execute the instructions to cause the apparatus to:

obtain a second packet comprising at least one of a network layer header or a transport layer header;

generate, based on the second packet, a first packet comprising a first-layer header, wherein the first-layer header comprises an identification field for identifying whether the first-layer header of the first packet comprises information in a second-layer header, wherein a link layer header of the first packet comprises the information in the at least one of the network layer header or the transport layer header of the second packet, and wherein the first packet does not comprise the at least one of the network layer header or the transport layer header; and

process the first packet.

15 . The apparatus of claim 14 , wherein the processor is further configured to execute the instructions to cause the apparatus to:

determine that the first-layer header comprises the information in the second-layer header in response to the identification field carrying a first identifier, wherein the first-layer header is the link layer header, wherein the link layer header comprises at least one of a source IP address information or a destination IP address information from a network layer header, or a source port information from a transport layer header.

16 . The apparatus of claim 14 , wherein the processor is further configured to execute the instructions to cause the apparatus to perform at least one of:

forwarding, using a transceiver, the first packet based on a destination IP address information comprised in the link layer header; or

scheduling the first packet to a corresponding queue based on a type of service (TOS) information comprised in the link layer header.

17 . The apparatus of claim 14 , wherein the processor is further configured to execute the instructions to cause the apparatus to:

determine an application process based on a source IP address information, a destination IP address information, and a source port information in the first-layer header; and

process the first packet using the application process.

18 . A computer program product comprising computer-executable instructions stored on a non-transitory computer-readable storage medium, the computer-executable instructions when executed by a processor of an apparatus, cause the apparatus to:

obtain a second packet comprising at least one of a network layer header or a transport layer header;

generate, based on the second packet, a first packet comprising a first-layer header, wherein the first-layer header comprises an identification field for identifying whether the first-layer header of the first packet comprises information in a second-layer header, wherein a link layer header of the first packet comprises the information in the at least one of the network layer header or the transport layer header of the second packet, and wherein the first packet does not comprise the at least one of the network layer header or the transport layer header; and

process the first packet.

19 . The computer program product of claim 18 , wherein the first-layer header and the second-layer header comprise at least one of the link layer header, a network layer header, or a transport layer header, and wherein the second-layer header is different from the first-layer header.

20 . The computer program product of claim 19 , wherein a link layer protocol of the link layer header comprises any one of an Ethernet protocol, a wireless fidelity (Wi-Fi) protocol, or a point-to-point protocol (PPP), wherein a network layer protocol of the network layer header comprises any one of an Internet Protocol (IP) version 4 (IPv4) or IP version 6 (IPv6), an Address Resolution Protocol (ARP), or a multi-protocol label switching (MPLS) protocol, and wherein a transport layer protocol of the transport layer header comprises any one of a Transmission Control Protocol (TCP), a User Datagram Protocol (UDP), a generic routing encapsulation (GRE) protocol, a Datagram Congestion Control Protocol (DCCP), or a Stream Control Transmission Protocol (STCP).