Wireless protocol stack testing and IP packaging method, device, equipment and program product

By introducing virtual network cards and simulated APs, the seamless connection between the wireless protocol stack and the TCP/IP protocol stack is achieved, which solves the high cost and low flexibility of the wireless protocol stack testing method, improves the testing efficiency and applicability, and simulates the real data transmission process.

CN120499720APending Publication Date: 2025-08-15CHINA SATELLITE NETWORK EXPLORATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510810389.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing wireless protocol stack testing methods are cost-effective, lack flexibility, low testing efficiency and cannot simulate the data transmission process in real scenarios.

Method used

By introducing virtual network cards and simulated APs, using standard socket APIs and TCP/IP protocol stacks, seamless connection between wireless protocol stacks and TCP/IP protocol stacks is achieved, automatically routing and encapsulating data packets, and data transmission in real application scenarios is simulated.

Benefits of technology

It reduces development costs, improves testing efficiency and flexibility, realizes the application of various application scenarios, and simulates the real data transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499720A_ABST
    Figure CN120499720A_ABST
Patent Text Reader

Abstract

The invention discloses a wireless protocol stack testing and IP packaging method, device, equipment and program product, relates to the field of wireless communication, and is used for solving at least one problem existing in a current testing method. According to the invention, the application data of the application program is processed by the TCP / IP protocol stack, and is sent to the first virtual network card according to the first local routing table, so that the first virtual network card sends the application data to the application server for testing through the wireless protocol stack. According to the invention, the development cost of the test system is reduced, the test efficiency and flexibility are improved, and the data transmission process of a real application scene is simulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communications, and in particular to a wireless protocol stack testing and IP encapsulation method, device, equipment and program product. Background Art

[0002] Developing a wireless communication network involves developing a wireless protocol stack. The deployment of this wireless protocol stack requires interoperability with the TCP / IP protocol stack. To ensure the correct functionality of the wireless protocol stack, system testing is required on both the terminal and network side.

[0003] For the testing of wireless protocol stack, testers currently construct different types of IP data packets on the terminal side device for different transmission scenarios. These IP data packets are assigned different IP addresses and sent to different network side devices through the wireless protocol stack. The network side devices parse the data and verify the correctness of the wireless protocol stack function.

[0004] The above-mentioned testing method requires simulating the construction of a test system for related systems in different scenarios, which has high development costs; it needs to re-encode and construct different IP data packets for different scenarios, which lacks flexibility and has low testing efficiency; in addition, for different types of applications, it is necessary to adapt the application layer data protocol. The above-mentioned testing method cannot switch applications seamlessly and cannot simulate the data transmission process in real scenarios. Summary of the Invention

[0005] The object of the present invention is to provide a wireless protocol stack testing and IP encapsulation method, device, equipment and program product to address all or part of the above-mentioned problems, so as to solve at least one of the problems of traditional testing methods, namely, high development cost, lack of flexibility, low testing efficiency and inability to simulate real scenarios.

[0006] The technical solution adopted in the present invention is as follows: A wireless protocol stack testing method, comprising: The application data of the application is processed by the TCP / IP protocol stack and sent to the first virtual network card according to the first local routing table, so that the first virtual network card sends the application data to the application server through the wireless protocol stack for testing; wherein, the first local routing table indicates that all application data with the destination IP address of the application server is automatically routed to the first virtual network card.

[0007] In another aspect, the present invention further provides a wireless protocol stack testing device, comprising: The first module is configured to process application data of the application program via a TCP / IP protocol stack and send the data to the first virtual network card according to the first local routing table; A first virtual network card, configured to send the application data to an application server via a wireless protocol stack for testing; The first local routing table indicates that all application data whose destination IP address is the application server is automatically routed to the first virtual network card.

[0008] On the other hand, the present invention also provides a wireless protocol stack testing device, which includes a first processor and a first storage medium, wherein the first storage medium stores a first computer instruction, the first processor is signal-connected to the first storage medium, and when the first processor runs the first computer instruction, it can execute the above-mentioned wireless protocol stack testing method.

[0009] In another aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the above-mentioned wireless protocol stack testing method can be executed.

[0010] This application also provides another wireless protocol stack testing method, which includes: The service data of the application server is sent to the simulated AP via the wireless protocol stack, so that the simulated AP automatically forwards the service data with the source IP address of the application server to the second virtual network card, prompting the second virtual network card to process the service data through the TCP / IP protocol stack and then send it to the application socket for testing.

[0011] On the other hand, the present application also provides another wireless protocol stack testing device, which includes: The second module is used to send the service data of the application server to the simulated AP via the wireless protocol stack; Simulating an AP, configured to automatically forward service data whose source IP address is the application server to the second virtual network card; The second virtual network card is used to process the business data through the TCP / IP protocol stack and then send it to the application socket for testing.

[0012] On the other hand, the present application also provides another wireless protocol stack testing device, which includes a second processor and a second storage medium, the second storage medium stores second computer instructions, the second processor is signal-connected to the second storage medium, and when the first processor runs the second computer instructions, it can execute the above-mentioned wireless protocol stack testing method.

[0013] On the other hand, the present application also provides another computer program product, including a computer program, which can execute the above-mentioned wireless protocol stack testing method when executed by a processor.

[0014] In addition, the present invention also provides a wireless protocol stack IP address encapsulation method, which includes: The application data of the application is processed by the TCP / IP protocol stack and sent to the third virtual network card according to the second local routing table, so that the third virtual network card encapsulates the application data with the wireless protocol stack IP address and sends it to the wireless protocol stack; wherein, the second local routing table indicates that all application data with the destination IP address of the application server is automatically routed to the third virtual network card.

[0015] On the other hand, the present invention also provides a wireless protocol stack IP address encapsulation device, which includes: The third module is used to process the application data of the application program through the TCP / IP protocol stack and send it to the third virtual network card according to the second local routing table; A third virtual network card is used to encapsulate the application data with the wireless protocol stack IP address and send it to the wireless protocol stack; The second local routing table indicates that all application data whose destination IP address is an application server is automatically routed to the third virtual network card.

[0016] On the other hand, the present invention also provides a wireless protocol stack IP address encapsulation device, which includes a third processor and a third storage medium, wherein the third storage medium stores a third computer instruction, and the third processor is signal-connected to the second storage medium. When the third processor runs the third computer instruction, it can execute the above-mentioned wireless protocol stack IP address encapsulation method.

[0017] In another aspect, the present invention further provides another computer program product, comprising a computer program, which can execute the above-mentioned wireless protocol stack IP address encapsulation method when executed by a processor.

[0018] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: This application introduces a virtual network card to provide the application with a standard socket API and TCP / IP protocol stack, thereby achieving seamless connection between the wireless protocol stack and the TCP / IP protocol stack, thereby meeting the testing and transmission requirements in various application scenarios. It can simulate the data transmission process of real application scenarios without the need to separately encode and construct different IP data packets for different application scenarios, reducing development costs, improving testing efficiency and increasing testing flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention will now be described by way of example with reference to the accompanying drawings, in which: Figure 1 This is a data flow diagram of a wireless protocol stack testing method provided in an embodiment of the present application.

[0020] Figure 2This is a data flow diagram for configuring the first local routing table in an embodiment of the present application.

[0021] Figure 3 This is the uplink data flow diagram in the embodiment of the present application.

[0022] Figure 4 This is a structural diagram of a wireless protocol stack testing device provided in an embodiment of the present application.

[0023] Figure 5 This is a data flow diagram of another wireless protocol stack testing method provided in an embodiment of the present application.

[0024] Figure 6 yes Figure 5 Implementation method A data flow diagram in a specific embodiment of the present application.

[0025] Figure 7 This is the downlink data flow diagram in the embodiment of the present application.

[0026] Figure 8 、 Figure 9 They are respectively flowcharts of simulating AP forwarding downlink data packets in two embodiments of the present application.

[0027] Figure 10 It is a structural diagram of the simulated AP in an embodiment of the present application.

[0028] Figure 11 This is a diagram of the simulated AP deployment architecture in an embodiment of the present application.

[0029] Figure 12 This is a diagram of the application data encapsulation structure in an embodiment of the present application.

[0030] Figure 13 This is a structural diagram of another wireless protocol stack testing device provided in an embodiment of the present application.

[0031] Figure 14 This is a test system architecture diagram provided in an embodiment of the present application.

[0032] Figure 15 This is a structural diagram of a wireless protocol stack IP address encapsulation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] All features disclosed in this specification, or all steps in the disclosed methods or processes, except mutually exclusive features and / or steps, can be combined in any manner.

[0034] Any feature disclosed in this specification (including any appended claims and abstract), unless otherwise stated, may be replaced by other equivalent or similar features. In other words, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0035] The ordinal numbers such as "first" and "second" mentioned in this application are only for distinguishing the objects described in different scenarios and are not intended to limit whether there are substantial differences between the specific described objects.

[0036] In response to the need to perform wireless protocol stack testing when developing wireless communication systems, current methods for testing wireless protocol stacks have problems such as high system development costs, low testing efficiency, low testing flexibility, and inability to simulate data transmission processes in real scenarios. An embodiment of the present application provides a wireless protocol stack testing method that aims to solve at least one of these problems.

[0037] The wireless protocol stack testing method provided in the embodiment of the present application can perform a test on the wireless protocol stack on the network side device, which transmits the application data to the application server for testing via the data uplink, such as Figure 1 As shown, the test method includes the following processes: The application data of the application program is processed via the TCP / IP protocol stack and sent to the first virtual network card according to the first local routing table, so that the first virtual network card sends the application data to the application server via the wireless protocol stack for testing.

[0038] The embodiment of the present application introduces a virtual network card in the test system. By configuring the first local routing table, it indicates that all application data with the destination IP address of the application server is automatically routed to the first virtual network card, and provides a standard virtual network card socket and a standard TCP / IP protocol stack to all applications. Application data in different application scenarios can be exchanged with the core network through the same gateway, different applications can be switched seamlessly, and the applicability to all test scenarios is achieved, thereby improving the flexibility and test efficiency of the test system and reducing development costs.

[0039] The first local routing table automatically routes application data of the application program to the virtual network card. As an optional implementation, a method for configuring the first local routing table includes: Instruct the wireless protocol stack to access the core network to obtain the wireless protocol stack IP address. Figure 2As shown, a simulated AP can be introduced. The simulated AP sends network search and access instructions to the wireless protocol stack through a data channel between the simulated AP and the wireless protocol stack, instructing the wireless protocol stack to randomly access the core network. After the wireless protocol stack successfully accesses the core network, a wireless data service bearer link is established. The core network assigns a unique IP address to the wireless protocol stack, which is then received by the simulated AP.

[0040] The wireless protocol stack IP address is assigned to the first virtual network card, and a static route for the application server IP data packets is configured to the first virtual network card. This ensures that application data destined for the application server is automatically encapsulated with the wireless protocol stack IP address. This process can also be implemented by simulating an access point (AP). The simulated AP configures the received wireless protocol stack IP address to the first virtual network card, sets it to the link-up state, and configures a static route for the application server IP data packets to the first virtual network card. This allows the application to interact with the application server through the first virtual network card.

[0041] Through the virtual network card and the first local routing table, the IP data of all applications are routed to the virtual network card, the virtual network card IP address is encapsulated, and the application data is automatically encapsulated with the wireless protocol stack IP address, so that the application can realize data communication through the wireless link without any sense.

[0042] In some feasible implementations, the above process of processing the application data of the application program through the TCP / IP protocol stack and sending it to the first virtual network card according to the first local routing table includes the following processes: The application data is encapsulated into a first IP data packet through the first virtual network card socket and the TCP / IP protocol stack; and the first IP data packet is forwarded to the first virtual network card according to the first local routing table.

[0043] As mentioned above, the embodiment of the present application provides the application with a standard virtual network card socket and a standard TCP / IP protocol stack by introducing a virtual network card. With this, the wireless protocol stack and the TCP / IP protocol stack are seamlessly connected, and the needs of various test scenarios can be flexibly met.

[0044] For the process of uploading application data from the virtual network card to the application server, such as Figure 3 As shown, in some feasible implementations, the method for enabling the first virtual network card to send application data to the application server via the wireless protocol stack includes: The encapsulated application data is obtained from the first virtual network card sending queue by simulating an AP, encapsulated, and sent to the wireless protocol stack through a data channel, so that the wireless protocol stack parses the encapsulated application data and sends the encapsulated application data to the application server according to air interface resource scheduling.

[0045] Taking the encapsulation of application data into a first IP packet as an example, after the first virtual network interface card encapsulates the first IP packet, the simulated AP retrieves the first IP packet from the first virtual network interface card's send queue, encapsulates it, and sends the encapsulated first IP packet to the wireless protocol stack via a data channel. The wireless protocol stack receives and parses the first IP packet and, based on air interface resource scheduling, sends it to the application server.

[0046] This implementation introduces a simulated AP. By adapting the simulated AP to the first virtual network interface card's send queue read / write interface, the simulated AP transmits encapsulated application data to the wireless protocol stack via the data channel between the simulated AP and the wireless protocol stack. The wireless protocol stack then uniformly sends the application data to the application server via air interface resources, eliminating the need to individually encode and construct different IP packets for different test scenarios. Furthermore, the simulated AP allows integration with real application scenarios, achieving the same test results as those in real application scenarios.

[0047] According to the idea of the present application, a wireless protocol stack testing device is also provided in the embodiment of the present application, such as Figure 4 As shown, the test device includes: The first module is configured to process application data of the application program through a TCP / IP protocol stack and send the data to the first virtual network card according to a first local routing table. The first local routing table indicates that all application data with a destination IP address of the application server is automatically routed to the first virtual network card.

[0048] The first virtual network card is used to send application data to the application server via the wireless protocol stack for testing.

[0049] The configuration of the first module and the first virtual network card can refer to the corresponding features of the test method embodiment described above. For example, a simulated AP can be introduced to send application data on the first virtual network card to the application server via the wireless protocol stack, and the simulated AP can be used to configure the local routing table.

[0050] In addition, embodiments of the present application further provide a wireless protocol stack testing device, comprising a first processor and a first storage medium, wherein the first storage medium stores first computer instructions, and the first processor is signal-connected to the first storage medium, for example, via a bus. When the first processor executes the first computer instructions, the wireless protocol stack testing method of the above embodiment can be executed.

[0051] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the wireless protocol stack testing method of the above embodiment can be executed.

[0052] The wireless protocol stack testing method provided in the present application can also be used to test the wireless protocol stack on a terminal side device, which transmits the service data of the application server to the application program via a data downlink for testing.

[0053] Based on the above concept, as an optional implementation method, Figure 5 As shown, the embodiment of the present application provides another wireless protocol stack testing method, which includes: The application server's service data is sent to the second virtual network card via the wireless protocol stack, so that the second virtual network card processes the service data through the TCP / IP protocol stack and then sends it to the application socket for testing. The second virtual network card automatically sends the service data to the target network card after processing it through the TCP / IP protocol stack and delivers it to the application socket.

[0054] The above process allows for testing of the wireless protocol stack on the terminal device. Different applications receive service data from the same gateway, enabling seamless switching and seamless integration of the wireless protocol stack and the TCP / IP protocol stack.

[0055] As an optional implementation, Figure 6 As shown, the above-mentioned wireless protocol stack testing method specifically includes: sending the business data of the application server to the simulated AP via the wireless protocol stack, so that the simulated AP automatically forwards the business data with the source IP address of the application server to the second virtual network card, prompting the second virtual network card to process the business data through the TCP / IP protocol stack and then send it to the application socket for testing.

[0056] In some optional embodiments, such as Figure 7 As shown, the above-mentioned sending of the service data of the application server to the simulated AP via the wireless protocol stack so that the simulated AP automatically forwards the service data with the source IP address of the application server to the second virtual network card includes the following processes: The wireless protocol stack is called to parse the second IP data packet encapsulating the business data according to the air interface resource scheduling, and is encapsulated and sent to the simulated AP through the data channel, so that the simulated AP parses the second IP data packet and sends the second IP data packet with the source IP address of the application server to the second virtual network card receiving queue.

[0057] Leveraging a dedicated data channel between the wireless protocol stack and the simulated AP, downlink service data is sent from the wireless protocol stack to the simulated AP via a unified socket API or other physical channel. The simulated AP then parses the second IP packet and automatically passes it, sourced from the application server, to the second virtual network card's receive queue. This testing method also eliminates the need to code and construct separate IP packets for different applications, offering the same high testing efficiency and flexibility.

[0058] The simulated AP has a virtual network card daemon process, which checks the downlink business data and filters non-business data for the virtual network card.

[0059] In some possible implementations, such as Figure 8 As shown, the process of enabling the simulated AP to parse the second IP data packet and send the second IP data packet with the source IP address of the application server to the receiving queue of the second virtual network card includes: The simulated AP is invoked to resolve the source IP address of the second IP packet. If the source IP address indicates that the second IP packet originated from the application server, the simulated AP sends the second IP packet to the receive queue of the second virtual network interface card. This means that the simulated AP forwards data from the application server while blocking other non-test data from the virtual network interface card, thus avoiding unnecessary forwarding and testing.

[0060] In addition, the data sent by the wireless protocol stack to the simulated AP is not all interactive data between the application server and the application, but may also be control data that instructs the simulated AP to perform related operations. For such data, the simulated AP will not forward it to the second virtual network card. Figure 9 As shown, the process of causing the simulated AP to parse the second IP data packet and send the second IP data packet with the source IP address of the application server to the second virtual network card receiving queue further includes: The simulated AP is called to parse the source IP address of the second IP packet and also parse the data type of the second IP packet. When the source IP address indicates that the second IP packet is from the application server and the data type indicates that the second IP packet is of an interactive data type, the simulated AP sends the second IP packet to the receive queue of the second virtual network card. Furthermore, if the data type indicates that the second IP packet is of a control data type, the simulated AP itself is the receiving destination, and the simulated AP does not send the second IP packet to the receive queue of the second virtual network card.

[0061] The above design simulates the data communication process of real application scenarios and improves the credibility of the test results.

[0062] In some possible implementations, such as Figure 10 As shown, the simulated AP includes an AP control system and a virtual network card driver. The above process of sending application data to the wireless protocol stack, or the process of forwarding business data from the wireless protocol stack to the virtual network card, is completed by the virtual network card driver. As for the second IP data packet of the above control data type, it is parsed by the virtual network card driver and then handed over to the AP control system for processing.

[0063] After the second virtual network card receives the downlink service data, it sends the service data to the corresponding application to complete the test. In some feasible implementations, the method of the second virtual network card sending the service data to the application socket after processing it through the TCP / IP protocol stack includes: The second virtual network card parses the second IP packet using the TCP / IP protocol stack to extract service data and an IP 5-tuple. The IP 5-tuple includes a source IP address, a source port, a destination IP address, a destination port, and a transport layer protocol. An application socket is obtained based on the IP 5-tuple, and the service data is sent to the application socket, allowing the application to test the service data.

[0064] As mentioned in some of the previous embodiments, the data exchanged between the first / second virtual network card and the wireless protocol stack is transmitted through the data channel between the simulated AP and the wireless protocol stack. As an optional implementation method, the method for constructing the data channel includes: The simulated AP and the wireless protocol stack are linked through a physical network card (such as a GE physical network card) to establish a socket channel to carry the CMUX protocol of the interface between the simulated AP and the wireless protocol stack based on the socket IP data.

[0065] By building a standard socket, the difficulty of building a test system can be reduced, the workload of coding and building IP data packets can be reduced, and the universality of applications can be increased. In addition, using the CMUX protocol to implement multiplexing can reduce the physical resources required for the test environment and further reduce the development cost of the test system. Based on the constructed data channel, the following is obtained: Figure 11 The simulated AP deployment architecture is shown.

[0066] According to this embodiment, for the method of performing wireless protocol stack testing based on uplink data, the application data encapsulation and decapsulation process includes: 1) The application data is encapsulated through the virtual network card socket and the TCP / IP protocol stack to obtain the first IP data packet; 2) According to the first local routing table, the first IP data packet is automatically routed to the first virtual network card and written into the first virtual network card send queue; 3) The simulated AP captures the first IP data packet from the first virtual network card's sending queue, encapsulates it in the CMUX protocol, and transmits it to the wireless protocol stack through the data channel; 4) The wireless protocol stack decapsulates the CMUX protocol, removes the CMUX header, obtains the first IP data packet, and sends it to the application server for testing based on (uplink) air interface resource scheduling.

[0067] like Figure 12As shown, in the above process 1) the first virtual network card IP address is encapsulated into application data, and the virtual network card IP header is encapsulated on the application data to obtain a virtual network card IP packet, that is, a first IP data packet; process 3) the CMUX protocol is encapsulated on the basis of the virtual network card IP packet, and a CMUX header is added to obtain a CMUX packet; on this basis, the data channel simulates the AP and the wireless protocol stack via the physical network card link, and then the transmission protocol is encapsulated on the physical network card, and a physical network card header is added to obtain a physical network card IP packet.

[0068] For wireless protocol stack testing based on downlink data, the service data encapsulation and decapsulation process includes: 1) The wireless protocol stack receives a second IP data packet according to (downlink) air interface resource scheduling. The second IP data packet is obtained by encapsulating the service data of the application server through the TCP / IP protocol stack. 2) The wireless protocol stack encapsulates the second IP packet using the CMUX protocol and transmits it to the simulated AP; 3) Simulate the AP to decapsulate the CMUX protocol, remove the CMUX packet header, obtain the second IP data packet, and forward the second IP data packet to the second virtual network card receiving queue; 4) The second virtual network card parses the service data and IP five-tuple from the second IP data packet through the TCP / IP protocol stack, obtains the application socket according to the IP five-tuple, sends the parsed service data to the application socket, and has the application test the service data.

[0069] According to the idea of this application, the embodiment of this application also provides another wireless protocol stack testing device, such as Figure 13 As shown, it includes: The second module is used to send the service data of the application server to the simulated AP via the wireless protocol stack.

[0070] The simulated AP is used to automatically forward service data with the source IP address of the application server to the second virtual network card.

[0071] The second virtual network card is used to process the business data through the TCP / IP protocol stack and then send it to the application socket for testing.

[0072] Similarly, for the specific configuration features of the second module, simulated AP and second virtual network card, reference may be made to the relevant features of the wireless protocol stack testing method described above.

[0073] In addition, an embodiment of the present application also provides another wireless protocol stack testing device, which includes a second processor and a second storage medium, the second storage medium stores second computer instructions, the second processor is signal-connected to the second storage medium, and when the second processor runs the second computer instructions, it can execute the wireless protocol stack testing method as described in the above embodiment.

[0074] An embodiment of the present application further provides another computer program product, including a computer program. When the computer program is executed by a processor, the wireless protocol stack testing method of the above embodiment can be executed.

[0075] like Figure 14 The embodiment of the present application shown in the figure provides a test system architecture diagram. In this embodiment, the protocol software process running the wireless protocol stack is deployed on a multi-channel simulator industrial computer equipped with a Linux environment. The wireless protocol stack is externally connected to the USRP (Universal Software Radio Peripheral) and is connected to the operating system by the baseband software process. The baseband software process is connected to the USRP via a 10GE physical network card. The simulated AP is deployed on a business PC (Personal Computer) equipped with a Windows environment. The business PC and the multi-channel simulator industrial computer are connected through a GE physical network card to realize the connection between the protocol software process and the simulated AP component through the physical network card, thereby establishing a dedicated socket channel as a data channel between the simulated AP and the wireless protocol stack. Both the business PC and the multi-channel simulator industrial computer support the TCP / IP protocol stack. Configure the TAP virtual network card (i.e., the first virtual network card) on the business PC.

[0076] See also Figure 14 In the bidirectional curve, in the upstream direction, application data generated by user service data processes (such as FTP Cilent, HTTP, and Ping) is encapsulated into virtual network card IP packets via the TCP / IP protocol stack and the TAP virtual network card socket. These packets are automatically routed to the TAP virtual network card. The simulated AP captures the virtual network card IP packets from the TAP virtual network card send queue, adds a CMUX header, and passes them to the protocol software process via the GE physical network card. The wireless protocol stack parses and removes the CMUX header to obtain the virtual network card IP packet, which is then sent to the application server via the air interface resources. The downstream process is the opposite and will not be detailed here. The only thing to emphasize is that the simulated AP is deployed with a TAP daemon process. In the downstream direction, only IP packets destined for the TAP virtual network card are forwarded to the TAP virtual network card receive queue by the simulated AP.

[0077] Based on the design logic of the wireless protocol stack testing method of the present application, the embodiment of the present application also proposes a wireless protocol stack IP address encapsulation method, which is intended to be applied in real data transmission scenarios to seamlessly switch between different applications.

[0078] The wireless protocol stack IP address encapsulation method provided in the embodiment of the present application includes the following process: The application data of the application is processed by the TCP / IP protocol stack and sent to the third virtual network card according to the second local routing table, so that the third virtual network card encapsulates the application data with the wireless protocol stack IP address and sends it to the wireless protocol stack. The second local routing table indicates that all application data destined for the application server IP address is automatically routed to the third virtual network card.

[0079] Through this process, all application data is automatically routed to the third virtual network card and encapsulated with the wireless protocol stack IP address. This allows the same gateway to interact with the outside world in different application scenarios, eliminating the need to manually code and construct different IP packets for each application. This improves flexibility in wireless protocol stack testing and actual applications, increases IP packet encapsulation efficiency, and enables seamless integration between the wireless protocol stack and the TCP / IP protocol stack, as well as seamless switching between applications.

[0080] The wireless protocol stack IP address encapsulation method provided in this application is an intermediate product of the research process of the wireless protocol stack testing method provided in this application. Therefore, the characteristic definitions of the relevant operations in the process can be referred to the wireless protocol stack testing method embodiment section above. The configuration of the third virtual network card can refer to the configuration of the first virtual network card. For example, a simulated AP is introduced to obtain encapsulated application data from the third virtual network card sending queue, encapsulate it, and send it to the wireless protocol stack through a data channel. For another example, the third routing table can be configured in the same way as the first routing table.

[0081] Based on the same inventive concept, the embodiment of the present application also provides a wireless protocol stack IP address encapsulation device, such as Figure 15 As shown, it includes: The third module is configured to process the application data of the application program via the TCP / IP protocol stack and send the data to the third virtual network card according to the second local routing table, wherein the second local routing table indicates that all application data with a destination IP address of the application server is automatically routed to the third virtual network card.

[0082] The third virtual network card is used to encapsulate the application data with the wireless protocol stack IP address and send it to the wireless protocol stack.

[0083] For the specific configuration information of the third module and the third virtual network card, please refer to the embodiment of the wireless protocol stack IP address encapsulation method above.

[0084] In addition, an embodiment of the present application also provides a wireless protocol stack IP address encapsulation device, which includes a third processor and a third storage medium, the third storage medium stores a third computer instruction, the third processor is signal-connected to the second storage medium, and when the third processor runs the third computer instruction, it can execute the wireless protocol stack IP address encapsulation method of the above embodiment.

[0085] An embodiment of the present application further provides another computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned wireless protocol stack IP address encapsulation method can be executed.

[0086] The present invention is not limited to the aforementioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.

Claims

1. A wireless protocol stack testing method, characterized in that: include: The application data of the application is processed by the TCP / IP protocol stack and sent to the first virtual network card according to the first local routing table, so that the first virtual network card sends the application data to the application server through the wireless protocol stack for testing; wherein, the first local routing table indicates that all application data with the destination IP address of the application server is automatically routed to the first virtual network card.

2. The wireless protocol stack testing method according to claim 1, wherein: The method for configuring the first local routing table includes: Instruct the wireless protocol stack to access the core network to obtain a wireless protocol stack IP address; configure the wireless protocol stack IP address to the first virtual network card, and configure the static routing of the application server IP data packet to the first virtual network card so that the application data with the destination IP address as the application server automatically encapsulates the wireless protocol stack IP address.

3. The wireless protocol stack testing method according to claim 1, wherein: The step of processing the application data of the application program through the TCP / IP protocol stack and sending the data to the first virtual network card according to the first local routing table includes: Encapsulating the application data into a first IP data packet through the first virtual network card socket and the TCP / IP protocol stack; Forward the first IP data packet to the first virtual network card according to the first local routing table.

4. The wireless protocol stack testing method according to claim 1 or 3, wherein: The method for enabling the first virtual network card to send the application data to the application server via the wireless protocol stack includes: The encapsulated application data is obtained from the first virtual network card sending queue by simulating an AP, encapsulated, and sent to the wireless protocol stack through a data channel, so that the wireless protocol stack parses the encapsulated application data and sends the encapsulated application data to the application server according to air interface resource scheduling.

5. The wireless protocol stack testing method according to claim 4, wherein: The method for constructing the data channel includes: The simulated AP and the wireless protocol stack are linked via a physical network card to establish a socket channel to carry the CMUX protocol of the interface between the simulated AP and the wireless protocol stack based on socketIP data.

6. A wireless protocol stack testing device, characterized in that: include: The first module is configured to process application data of the application program via a TCP / IP protocol stack and send the data to the first virtual network card according to the first local routing table; A first virtual network card, configured to send the application data to an application server via a wireless protocol stack for testing; The first local routing table indicates that all application data whose destination IP address is the application server is automatically routed to the first virtual network card.

7. A wireless protocol stack testing device, characterized in that: The method comprises a first processor and a first storage medium, wherein the first storage medium stores a first computer instruction, the first processor is signal-connected to the first storage medium, and when the first processor runs the first computer instruction, the wireless protocol stack testing method according to any one of claims 1 to 5 can be executed.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the wireless protocol stack testing method according to any one of claims 1 to 5 can be executed.

9. A wireless protocol stack testing method, characterized in that: include: The service data of the application server is sent to the simulated AP via the wireless protocol stack, so that the simulated AP automatically forwards the service data with the source IP address of the application server to the second virtual network card, prompting the second virtual network card to process the service data through the TCP / IP protocol stack and then send it to the application socket for testing.

10. The wireless protocol stack testing method according to claim 9, wherein: Sending service data of the application server to the simulated AP via the wireless protocol stack, so that the simulated AP automatically forwards the service data with the source IP address of the application server to the second virtual network card, including: The wireless protocol stack is called to parse the second IP data packet encapsulating the business data according to the air interface resource scheduling, and is encapsulated and sent to the simulated AP through the data channel, so that the simulated AP parses the second IP data packet and sends the second IP data packet with the source IP address of the application server to the second virtual network card receiving queue.

11. The wireless protocol stack testing method according to claim 10, wherein: The step of causing the simulated AP to parse the second IP data packet and send the second IP data packet whose source IP address is the application server to a receiving queue of a second virtual network card includes: Call the simulated AP to parse the source IP address and data type of the second IP data packet, so that the simulated AP sends the second IP data packet to the second virtual network card receiving queue when the source IP address indicates that the second IP data packet comes from the application server and the data type indicates that the second IP data packet is an interactive data type.

12. A wireless protocol stack testing device, characterized in that: include: The second module is used to send the service data of the application server to the simulated AP via the wireless protocol stack; Simulating an AP, configured to automatically forward service data whose source IP address is the application server to the second virtual network card; The second virtual network card is used to process the business data through the TCP / IP protocol stack and then send it to the application socket for testing.

13. A wireless protocol stack testing device, characterized in that: It includes a second processor and a second storage medium, the second storage medium stores second computer instructions, the second processor is signal-connected to the second storage medium, and when the second processor runs the second computer instructions, it can execute the wireless protocol stack testing method as described in any one of claims 9 to 11.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the wireless protocol stack testing method according to any one of claims 9 to 11 can be executed.

15. A wireless protocol stack IP address encapsulation method, characterized in that: include: The application data of the application is processed by the TCP / IP protocol stack and sent to the third virtual network card according to the second local routing table, so that the third virtual network card encapsulates the application data with the wireless protocol stack IP address and sends it to the wireless protocol stack; wherein, the second local routing table indicates that all application data with the destination IP address of the application server is automatically routed to the third virtual network card.

16. A wireless protocol stack IP address encapsulation device, characterized in that: include: The third module is used to process the application data of the application program through the TCP / IP protocol stack and send it to the third virtual network card according to the second local routing table; A third virtual network card is used to encapsulate the application data with the wireless protocol stack IP address and send it to the wireless protocol stack; The second local routing table indicates that all application data whose destination IP address is an application server is automatically routed to the third virtual network card.

17. A wireless protocol stack IP address encapsulation device, characterized in that: The method comprises a third processor and a third storage medium, wherein the third storage medium stores a third computer instruction, the third processor is signal-connected to the second storage medium, and when the third processor runs the third computer instruction, the wireless protocol stack IP address encapsulation method as claimed in claim 15 can be executed.

18. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the wireless protocol stack IP address encapsulation method according to claim 15 can be executed.