Method for judging process of TCP/IP packet in driver layer

A driver layer and process technology, applied in the direction of electrical components, transmission systems, etc., can solve problems such as unsuitable for billing nature, distance, etc.

Active Publication Date: 2010-11-24
CHINANETCENT TECH
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, there is a certain randomness in the sending and receiving of network packets, and the layer where the NDIS filter driver resides is logically separated from the application layer. As a result, when the filter driver is used to process network packets, the PID obtained by calling the PsGetCurrentProcessId function may not be the current active data packet. owning process number
In the actual test, the result of PID is 0 is often obtained, which is obviously not suitable for some occasions with billing nature or accuracy requirements

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
  • Method for judging process of TCP/IP packet in driver layer
  • Method for judging process of TCP/IP packet in driver layer
  • Method for judging process of TCP/IP packet in driver layer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0021] figure 1 An embodiment of the method for judging the process of the TCP / IP packet belonging to the driver layer of the present invention is shown, figure 2 is a schematic diagram of its implementation. Please also see figure 1 and figure 2 , the following is a detailed description of each step in the method of this embodiment.

[0022] Step S10: when a certain program uses the Windows socket interface (WinSock API), load layered transport service providers (LSP, Layered Transport Service Providers) through a certain process.

[0023] Formally speaking, LSP is a DLL (Dynamic Link Library) on the user mode application layer. Usually, WinSockSPI is the Service Provider Interface (service provider interface), which is used to provide WinSock services. It is divided into two types of service providers: transport providers and namespace provider...

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 invention discloses a method for judging a process of a TCP / IP packet in a driver layer, which can accurately distinguish the process of a packet in a network driver interface specification (NDIS) filter driver. The technical scheme comprises that the method comprises the following steps of: when a certain program uses a Windows socket interface, loading a layered service provider through a certain process; acquiring an identification number of the process and a source port opened by the process by the layered service provider; judging whether the process is an interested process according to the identification number of the layered service provider; if the process is the interested process, transmitting a user datagram protocol (UDP) notification packet to a specific address and a port; receiving the UDP notification packet, extracting the identification number of the process, a protocol used by the process and the source port opened by the process from the UDP notification packet, saving the identification number of the process, the protocol used by the process and the source port opened by the process as an association table, and discarding the UDP notification packet by using an intermediate layer driver / filter driver normalized by a network driver interface; and when the intermediate layer driver / the filter driver receives another TCP / IP packet transmitted by a local host, judging whether the TCP / IP packet comprises the information consistent with the contents in the association table, and determining the identification number of the process to which the TCP / IP packet belongs according to the judgment.

Description

technical field [0001] The invention relates to a method for judging the process to which a data packet belongs, in particular to a method for judging the process to which a TCP / IP packet belongs at a driver layer, which is applied in the fields of network firewall software, network proxy software, or network acceleration software. Background technique [0002] The filter driver (NDIS filter, Network Driver Interface Specification) of the network driver interface specification is located in the kernel driver layer of the Windows system, and can filter and process the packets of the data link layer. [0003] In network technology, it is necessary to be able to accurately distinguish the process to which a TCP / IP packet belongs in the NDIS filter driver. The existing method is to use the PsGetCurrentProcessId function to obtain the process ID to which the currently active data packet belongs. However, there is a certain randomness in the sending and receiving of network packe...

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 Applications(China)
IPC IPC(8): H04L29/06H04L29/08
Inventor 郑明
Owner CHINANETCENT TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products