Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for transmitting data between a protocol stack and an application program

An application program and data transmission technology, applied in the network field, to achieve the effect of avoiding copying, avoiding memory copying, and avoiding memory copying operations

Active Publication Date: 2017-10-10
北京太一星晨信息技术有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The LWIP protocol stack uses mbuf (memory cache) as the data carrier for receiving and sending data to transfer data. Although it avoids the copy from the kernel space to the user space, it still cannot avoid the occurrence of the other two copies.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for transmitting data between a protocol stack and an application program
  • A method and device for transmitting data between a protocol stack and an application program
  • A method and device for transmitting data between a protocol stack and an application program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] Embodiment 1. A method for transmitting data between a protocol stack and an application program, comprising:

[0053] S101. Receive the first data in the form of a singly linked list sent to the protocol stack by the application program;

[0054] S102. Map each data block in the first data to the TCP segment in sequence according to the order of the singly linked list, and the length of the data block mapped in a TCP segment is less than or equal to a predetermined length; the mapping means to represent the The information of the start and end positions of the data block in the sending data buffer is written into the TCP segment; the mapped TCP segments are sequentially added to the sending queue.

[0055] In this embodiment, the first data is stored in the form of a singly linked list, each node in the singly linked list can be regarded as a data block in the first data, each node includes an area for storing data, And a pointer to indicate the starting address of th...

Embodiment 2

[0108] Embodiment 2, a device for transmitting data between a protocol stack and an application program, comprising:

[0109] The sending data interface module is used to receive the first data in the form of a singly linked list sent by the application program to the protocol stack;

[0110] The mapping module is used to sequentially map each data block in the first data to the TCP segment according to the order of the singly linked list, and the length of the data block mapped in a TCP segment is less than or equal to a predetermined length; the mapping refers to the The information indicating the start and end positions of the data block in the sending data buffer is written into the TCP segment; and the mapped TCP segments are sequentially added to the sending queue.

[0111] In an implementation manner of this embodiment, the mapping module may specifically include:

[0112] mapping control unit, mapping execution unit, sending control unit;

[0113] The mapping control...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention provides a method and device for transmitting data between a protocol stack and an application program; the method includes: receiving the first data in the form of a singly linked list sent by the application program to the protocol stack; According to the sequence of the singly linked list, it is sequentially mapped into the transmission control protocol TCP segment, and the length of the data block mapped in a TCP segment is less than or equal to the predetermined length; The location information is written into the TCP segment; the mapped TCP segments are sequentially added to the sending queue. The invention can avoid duplication during the data transmission process between the protocol stack and the application program, and improve the processing performance.

Description

technical field [0001] The invention relates to the network field, in particular to a method and device for transmitting data between a protocol stack and an application program. Background technique [0002] At present, the commonly used dedicated protocol stacks are roughly divided into two types, one is a commercial proprietary protocol stack based on the linux or FreeBSD standard protocol stack, and the other is a protocol stack that follows the TCP protocol stack standard and is modified according to a certain system framework. The obtained open source lightweight protocol stack, the most common one that can be transplanted for commercial use is the LWIP protocol stack. Other protocol stacks like OpenTCP are mostly suitable for theoretical research and teaching of protocol stacks. Although some practical technologies and concepts are proposed, they lack some specific implementation solutions and are difficult to commercialize. [0003] When the traditional TCP protocol...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/06
Inventor 冯璐
Owner 北京太一星晨信息技术有限公司