CN114124457A - Interception method and system based on vxworks system network - Google Patents

Interception method and system based on vxworks system network Download PDF

Info

Publication number
CN114124457A
CN114124457A CN202111238335.3A CN202111238335A CN114124457A CN 114124457 A CN114124457 A CN 114124457A CN 202111238335 A CN202111238335 A CN 202111238335A CN 114124457 A CN114124457 A CN 114124457A
Authority
CN
China
Prior art keywords
network
mux
interception
vxworks
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111238335.3A
Other languages
Chinese (zh)
Inventor
郭廷喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei Hanguang Heavy Industry Ltd
Original Assignee
Hebei Hanguang Heavy Industry Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei Hanguang Heavy Industry Ltd filed Critical Hebei Hanguang Heavy Industry Ltd
Priority to CN202111238335.3A priority Critical patent/CN114124457A/en
Publication of CN114124457A publication Critical patent/CN114124457A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/30Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The interception method and the interception system based on the vxworks system network utilize an API function of a MUX layer of the vxworks system network to bind a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol for an interception equipment network card; binding a monitoring interface function of the monitoring equipment as a muxBind parameter of the MUX layer by using the network MUX layer API function; and setting the working mode of the network card of the interception equipment into a promiscuous mode to capture a data packet, and analyzing and processing the data packet to realize data interception based on the vxworks system network. The capturing and analyzing functions of Ethernet network data packets of the vxworks operating system can be realized, and all Ethernet data packets received by the network card driving function of the equipment are received and processed in real time; the function of identifying the source of the data packet (such as from which network card) can be used for one-machine multi-card equipment, and can also be used as a debugging means of network application software, so that the development efficiency of the application software is improved.

Description

Interception method and system based on vxworks system network
Technical Field
The invention belongs to the technical field of data interception, and particularly relates to an interception method and system based on a vxworks system network.
Background
Currently, with the rapid development of computer and communication technologies, network communication technologies are widely used, and ethernet, which is a high-speed communication method, is commonly used in embedded systems. For example, sniffer packet capturing software of a windows system receives all Ethernet data packet reports received by a network card in the operating environment of the windows system, and can provide powerful help for software development of users in aspects of data logging, fault location, network diagnosis and the like.
The VxWorks embedded development operating system does not provide random network interception software, so an Ethernet interception method based on the VxWorks operating system is urgently needed, the defects of the VxWorks operating system are overcome, technical support is provided for a user, the VxWorks user can capture a data packet by packet capturing software like a Windows user, and required help is obtained in the software development and application process.
Disclosure of Invention
The invention overcomes one of the defects of the prior art, provides a monitoring method and a system based on a vxworks system network, can realize the functions of capturing and analyzing Ethernet network data packets of a vxworks operating system, and receives and processes all Ethernet data packets received by a device network card driving function in real time; the function of identifying the source of the data packet (such as from which network card) can be used for one-machine multi-card equipment, and can also be used as a debugging means of network application software, so that the development efficiency of the application software is improved.
According to one aspect of the disclosure, an interception method based on a vxworks system network is provided, where the method includes:
utilizing an API function of a network MUX layer of a vxworks system to bind a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol for a network card of the interception equipment;
binding a monitoring interface function of the monitoring equipment as a muxBind parameter of the MUX layer by using the network MUX layer API function;
and setting the working mode of the network card of the interception equipment into a promiscuous mode to capture a data packet, and analyzing and processing the data packet to realize data interception based on the vxworks system network.
In a possible implementation manner, the setting the operation mode of the network card of the listening device to the promiscuous mode includes:
and using a MUX layer control function to firstly acquire the current working mode word of the network card of the monitoring equipment, adding a hybrid mode into the previous working mode word, and then writing the working mode word to set the hybrid mode.
In one possible implementation, the data packet includes: data source, data type, data length, and data IP address.
According to another aspect of the present disclosure, an interception system based on a vxworks system network is provided, where the system employs the above interception method based on a vxworks system network, and the system includes:
the system comprises an industrial personal computer, a network card and a monitoring software, wherein the industrial personal computer is provided with a vxworks system, three network cards and monitoring software, and the network cards are bound by a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol, and are set in a promiscuous mode;
the system comprises an upper computer, a network test software and a data packet, wherein the upper computer is provided with a Windows XP system and is used for running the network test software to send the data packet;
and the HUB is used for connecting the network cards of the industrial personal computer and the upper computer and limiting the industrial personal computer and the upper computer in the same local area network.
In one possible implementation, there are two of the upper computers.
In one possible implementation mode, the industrial personal computer and the network card of the upper computer are connected to the HUB through network cables.
The interception method based on the vxworks system network utilizes the API function of the network MUX layer of the vxworks system network to bind a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol for the network card of the interception equipment; binding a monitoring interface function of the monitoring equipment as a muxBind parameter of the MUX layer by using the network MUX layer API function; and setting the working mode of the network card of the interception equipment into a promiscuous mode to capture a data packet, and analyzing and processing the data packet to realize data interception based on the vxworks system network. The capturing and analyzing functions of Ethernet network data packets of the vxworks operating system can be realized, and all Ethernet data packets received by the network card driving function of the equipment are received and processed in real time; the function of identifying the source of the data packet (such as from which network card) can be used for one-machine multi-card equipment, and can also be used as a debugging means of network application software, so that the development efficiency of the application software is improved.
Drawings
The accompanying drawings are included to provide a further understanding of the technology or prior art of the present application and are incorporated in and constitute a part of this specification. The drawings expressing the embodiments of the present application are used for explaining the technical solutions of the present application, and should not be construed as limiting the technical solutions of the present application.
Fig. 1 shows a flowchart of an interception method based on a vxworks system network according to an embodiment of the present disclosure.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the accompanying drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the corresponding technical effects can be fully understood and implemented. The embodiments and the features of the embodiments can be combined without conflict, and the technical solutions formed are all within the scope of the present invention.
In order to better understand the design idea of the method, the principle of the MUX layer (which is a functional function interface of an independent network layer) of the network protocol stack of the vxworks network system is introduced first.
Compared with a general computer operating system, the network design of the embedded operating system is required to adapt to more network devices and support more network protocols. In order to facilitate the development of network drivers and protocols, the coupling between the drivers and the protocols is required to be loose, so that the VxWorks adds a MUX layer between a protocol layer and a data link layer. That is, the MUX layer is designed to weaken the coupling between the driver and the protocol. The method has the advantages that when the network device driver is developed, a programmer does not consider the influence of the protocol, only the interface provided by the MUX is realized, and similarly, when the protocol is developed, the influence of the lower layer driver is not considered, and only the interface specification of the MUX layer is followed.
The MUX is a library of routines that VxWorks uses to weaken the tight connection of the IP layer and the data link layer. It makes it more flexible and easy to implement a new protocol or a network driver. Implementing a new protocol eliminates the need to consider other driver factors as before. When an application program wants to send a data, the IP layer sends the data packet to the MUX layer instead of the driver program as the original protocol; similarly, when a packet is to be received, the END receives data from the network and sends it to the MUX layer, which communicates with the IP layer according to different service types. The VxWorks network application program cannot directly communicate between a link layer and a network layer, and data interaction can be carried out only through a MUX layer.
The network protocol stack of VxWorks has the basic characteristics similar to the traditional TCP/IP protocol, and the network protocol stack of VxWorks has the biggest characteristic that a MUX layer is added between a data link layer and a network protocol layer. In the Network protocol stack of VxWorks, a driver of a Network interface is called end (enhanced Network driver), namely an enhanced Network driver, and is located at a data link layer. The IP layer and TCP/UDP layer are referred to as the network protocol layer. Between the data link layer and the network protocol layer there is an Application Program Interface (API), which is called mux (multiplexer) interface in the network protocol stack of VxWorks.
Fig. 1 shows a flowchart of an interception method based on a vxworks system network according to an embodiment of the present disclosure. The method is mainly realized by utilizing a MUX layer routine library of a VxWorks operating system, network interception is carried out on the MUX layer, and a network data packet is captured. As shown in fig. 1, the method may include:
step S1: and utilizing an API function of a network MUX layer of the vxworks system to bind a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol for the network card of the interception device. The user can bind the corresponding protocol according to the needs of the user. Wherein the MUX _ PROTO _ SNARF protocol is a receive function that calls the user before all standard protocols.
Step S2: and binding the interception interface function of the interception equipment as the parameter of the muxBind of the MUX layer by utilizing the network MUX layer API function. The method comprises the steps that an interception interface function written by a user is bound as a parameter of a MUX routine function muxBind by utilizing an API function of a MUX layer, and after the binding is successful, when a data packet is received by a hardware driving function of a bottom layer, the user function can be automatically called.
Step S3: and setting the working mode of the network card of the interception equipment into a promiscuous mode to capture a data packet, and analyzing and processing the data packet to realize data interception based on the vxworks system network.
The setting of the working mode of the network card of the monitoring device into the promiscuous mode specifically includes: and using a MUX layer control function to firstly acquire the current working mode word of the network card of the monitoring equipment, adding a hybrid mode into the previous working mode word, and then writing the working mode word to set the hybrid mode.
The packet content may include: data source, data type, data length, and data IP address. According to the needs of users, the required data packets can be analyzed and processed, and the information of data source, type, length, IP address and the like of the data packets is mainly displayed. In addition, the user can write codes according to the needs of the user, and the functions of message content conversion, printing, disk storage and the like can be expanded.
The interception method based on the vxworks system network can realize the functions of grabbing and analyzing the Ethernet network data packets of the vxworks operating system, and receive and process all the Ethernet data packets received by the equipment network card driving function in real time.
According to another aspect of the disclosure, an interception system based on a vxworks system network is provided, and the system adopts the above interception method based on the vxworks system network. The interception system may include:
the system comprises an industrial personal computer, a network card and a monitoring software, wherein the industrial personal computer is provided with a vxworks system, three network cards and monitoring software, and the network cards are bound by a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol, and a promiscuous mode is set;
the system comprises an upper computer, a network test software and a data packet transmission module, wherein the upper computer is provided with a Windows XP system and is used for running the network test software to transmit the data packet;
and the HUB is used for connecting the network card of the industrial personal computer and the upper computer and limiting the industrial personal computer and the upper computer in the same local area network.
For example, an operating environment consisting of three computers and a HUB is described as an example.
The industrial personal computer is provided with a vxworks operating system, a Pentium CPU and 3 network cards (such as all produced by Intel), and the hardware driving programs of the 3 network cards are the same and have the same mux layer. And operating interception software written by an interception method based on the vxworks system network on the industrial personal computer.
Because the industrial personal computer has three network cards, the MUX _ PROTO _ SNARF protocol, the MUX _ PROTO _ PROMISC protocol or the MUX _ PROTO _ OUTPUT protocol binding and receiving function binding are required to be carried out on each network card, and the working mode of each network card is respectively set to be the mixed mode (IFF _ PROMISC).
The upper computer is provided with a Windows XP system which can run various network test software and is used for sending network data packets. The host computer may be an office desktop computer, a notebook computer, or the like, which is not limited herein. The number of the upper computers can be 1 or two, and the example takes two office desktops as the upper computers for explanation. Of course, the user can also adopt the upper computers with the number of bus units as required, and only needs to send various data packets by using sniffer, ping and self-writing network test software for testers.
And the HUB is used for connecting three network cards on the industrial personal computer and the network cards of the two upper computers on the HUB through network cables, and limiting the industrial personal computer and the upper computers in the same local area network.
When the system is used for operation, the specific operation process is as follows: all the devices are started, the industrial personal computer firstly runs the monitoring software, the two office desktops run the network testing software, and the network data packet is sent. When the industrial personal computer captures a data packet, the industrial personal computer firstly identifies which network card of the industrial personal computer receives the data packet, and then displays the message content of the data packet. The monitoring software of the industrial personal computer can capture the data in real time, and the analysis is correct. And stability test is also carried out, the interception software has stable motion and normal work, and the use requirement is met.
The interception system based on the vxworks system network can identify the function of a data packet source (such as a network card from which the data packet source comes), can be used for equipment with one machine and multiple cards, and can also be used as a debugging means of network application software to improve the development efficiency of the application software
Although the embodiments of the present invention have been described above, the above descriptions are only for the convenience of understanding the present invention, and are not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (6)

1. An interception method based on a vxworks system network is characterized by comprising the following steps:
utilizing an API function of a network MUX layer of a vxworks system to bind a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol for a network card of the interception equipment;
binding a monitoring interface function of the monitoring equipment as a muxBind parameter of the MUX layer by using the network MUX layer API function;
and setting the working mode of the network card of the interception equipment into a promiscuous mode to capture a data packet, and analyzing and processing the data packet to realize data interception based on the vxworks system network.
2. The interception method according to claim 1, wherein said setting the operation mode of the network card of the interception device to promiscuous mode comprises:
and using a MUX layer control function to firstly acquire the current working mode word of the network card of the monitoring equipment, adding a hybrid mode into the previous working mode word, and then writing the working mode word to set the hybrid mode.
3. The interception method according to claim 1, wherein said data packet comprises: data source, data type, data length, and data IP address.
4. An interception system based on a vxworks system network, wherein the system adopts the vxworks system network-based interception method of claims 1 to 3, and the system comprises:
the system comprises an industrial personal computer, a network card and a monitoring software, wherein the industrial personal computer is provided with a vxworks system, three network cards and monitoring software, and the network cards are bound by a MUX _ PROTO _ SNARF protocol, a MUX _ PROTO _ PROMISC protocol or a MUX _ PROTO _ OUTPUT protocol, and are set in a promiscuous mode;
the system comprises an upper computer, a network test software and a data packet, wherein the upper computer is provided with a Windows XP system and is used for running the network test software to send the data packet;
and the HUB is used for connecting the network cards of the industrial personal computer and the upper computer and limiting the industrial personal computer and the upper computer in the same local area network.
5. The interception system according to claim 4, wherein there are two of said upper computers.
6. The interception system of claim 4 or 5, wherein the industrial personal computer and the network card of the upper computer are connected to the HUB through a network cable.
CN202111238335.3A 2021-10-25 2021-10-25 Interception method and system based on vxworks system network Pending CN114124457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111238335.3A CN114124457A (en) 2021-10-25 2021-10-25 Interception method and system based on vxworks system network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111238335.3A CN114124457A (en) 2021-10-25 2021-10-25 Interception method and system based on vxworks system network

Publications (1)

Publication Number Publication Date
CN114124457A true CN114124457A (en) 2022-03-01

Family

ID=80376473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111238335.3A Pending CN114124457A (en) 2021-10-25 2021-10-25 Interception method and system based on vxworks system network

Country Status (1)

Country Link
CN (1) CN114124457A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891001A (en) * 2019-11-14 2020-03-17 天津津航计算技术研究所 Ethernet packet capturing method for VxWorks operating system
CN112165446A (en) * 2020-08-17 2021-01-01 河北汉光重工有限责任公司 Network interception method of VxWorks system
CN112688924A (en) * 2020-12-15 2021-04-20 中国海洋大学 Network protocol analysis system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110891001A (en) * 2019-11-14 2020-03-17 天津津航计算技术研究所 Ethernet packet capturing method for VxWorks operating system
CN112165446A (en) * 2020-08-17 2021-01-01 河北汉光重工有限责任公司 Network interception method of VxWorks system
CN112688924A (en) * 2020-12-15 2021-04-20 中国海洋大学 Network protocol analysis system

Similar Documents

Publication Publication Date Title
US7957402B2 (en) UDP to TCP bridge
CN101841441B (en) Test method and system for flow control device and data stream playback device
US7418006B2 (en) Virtual endpoints
WO2019019864A1 (en) Communication system, method and apparatus for embedded self-service terminal
CN106708748B (en) Method and system for improving mounting performance of OpenStack block storage volume
US20170311224A1 (en) Method and apparatus for implementing network sharing
CN108984363A (en) A kind of method and system of concurrent testing
CN109787864A (en) A kind of network automatic test approach, device, terminal and storage medium based on Netperf
CN102426548A (en) Debugging method, debugger and debugging system for embedded system
CN111651232A (en) One-machine multi-control method, device and system and electronic equipment
CN110730112A (en) Method, system, equipment and storage medium for testing network running speed
EP1562115A2 (en) Socket connections over a serial link
CN114124457A (en) Interception method and system based on vxworks system network
CN112165446A (en) Network interception method of VxWorks system
CN101355483A (en) Method and equipment for transmitting data packet by multiple network ports
CN110753363A (en) Intelligent device wireless debugging system and method
CN1609819B (en) Test method for computer external equipment interface
CN112148537A (en) Bus monitoring device and method, storage medium, and electronic device
CN107277107B (en) Application debugging method, device and system
CN113347161A (en) One-way transmission device for computer files
US9658970B1 (en) Interconnection of peripheral devices on different electronic devices
CN114490202B (en) Password equipment testing method and device, electronic equipment and storage medium
CN1071038C (en) Diagnosis device for debugging serial communication
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
US8468008B2 (en) Input/output processor (IOP) based emulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination