CN104125117A - Packet receiving and transmission testing method - Google Patents

Packet receiving and transmission testing method Download PDF

Info

Publication number
CN104125117A
CN104125117A CN201410379408.4A CN201410379408A CN104125117A CN 104125117 A CN104125117 A CN 104125117A CN 201410379408 A CN201410379408 A CN 201410379408A CN 104125117 A CN104125117 A CN 104125117A
Authority
CN
China
Prior art keywords
packet
transmitting
receiving
interface
capturing module
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
CN201410379408.4A
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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology Co 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410379408.4A priority Critical patent/CN104125117A/en
Publication of CN104125117A publication Critical patent/CN104125117A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a packet receiving and transmission testing method. The method comprises the following steps: adding a packet transmitting interface in a packet capturing module; compiling the packet capturing module to generate a packet receiving/transmitting interface which can be called by python; driving a specified network card to call the packet receiving/transmitting interface to perform packet receiving/transmitting testing, wherein python is an object-oriented programming language. By adopting the method, a packet transmitting module is added into the packet capturing module, the packet receiving/transmitting interface in the packet capturing module is called by driving the specified network card to perform packet receiving and transmission testing, and data flow is controlled within the network card packet receiving and transmission flow range, thereby avoiding long-time occupation of a testing instrument port in an automatic testing process, and solving the problem of resource waste.

Description

A kind of transmitting-receiving bag method of testing
Technical field
The present invention relates to network equipment detection technical field, relate in particular to a kind of transmitting-receiving bag method of testing.
Background technology
In today of network high-speed development, the development of the network equipment is with rapid changepl. never-ending changes and improvements equally, and the automatic test of the network equipment is also particularly important.The network equipment in the automatic test course of the network equipment, often can need the operation of transmitting-receiving bag.If all complete with tester, cost is higher.
In the automatic test course of the network equipment, may take for a long time rare tester port.But not each script needs use test instrument port to carry out the transmitting-receiving package operation of large flow.In data packet flow, not very large and in network interface card transmitting-receiving packet flow weight range, be necessary to provide a kind of network interface card that adopts receive and dispatch the method that bag is tested.
Summary of the invention
The technical problem that the present invention need solve is to overcome above-mentioned deficiency, and a kind of transmitting-receiving bag method of testing is provided, and comprising:
In packet capturing module, increase the interface of giving out a contract for a project;
Compile described packet capturing module, the receipts/interface of giving out a contract for a project that generation can be called for python;
Drive appointment network interface card to call the described receipts/interface of giving out a contract for a project and receive and dispatch bag test;
Wherein, python is a kind of OO programming language.
Further, the interface of giving out a contract for a project described in can repeat to send a plurality of specific data bags.
Further, revise the packet receiving interface in described packet capturing module, the packet of reception is saved in to file.
Further, in described packet receiving interface, increase packet filtering, the message that filtering is ineligible.
Further, described packet capturing module is pylibpcap.
Adopt after the inventive method, in packet capturing module, increase the module of giving out a contract for a project, then receipts/the interface of giving out a contract for a project that use drives the network interface card of appointment to call in described packet capturing module is received and dispatched bag test, in data traffic, in network interface card transmitting-receiving packet flow weight range, avoided because of long-time engaged test instrument port, causing the problem of the wasting of resources in automatic test course.
Accompanying drawing explanation
Fig. 1 is transmitting-receiving bag method of testing flow chart provided by the invention.
Embodiment
In order to make relevant technical staff in the field understand better technical scheme of the present invention, accompanying drawing below in conjunction with embodiment of the present invention, technical scheme in embodiment of the present invention is clearly and completely described, obviously, described execution mode is only the present invention's part execution mode, rather than whole execution modes.
Below in conjunction with drawings and embodiments, the invention will be further described.
Consulting Fig. 1, is the transmitting-receiving bag method of testing of a kind of execution mode provided by the invention, and this method comprises:
Step S100 increases the interface of giving out a contract for a project in packet capturing module;
In automatic test, particularly in the test of transmitting-receiving bag, the normal packet capturing module that adopts is carried out transceiving data bag.In the present embodiment, the packet capturing module Pylibpcap that employing can be called for python, wherein, python is a kind of OO programming language, pylibpcap is the packet capturing module that can be called by python of using C language compilation, but it does not comprise the interface of giving out a contract for a project, and packet receiving interface can not be preserved the packet of receiving.So need to increase the interface of giving out a contract for a project in packet capturing module, and revise packet receiving interface to meet user demand.
Step 200, compiles described packet capturing module, the receipts/interface of giving out a contract for a project that generation can be called for python;
As mentioned above, in packet capturing module, increased the module of giving out a contract for a project.Packet capturing module now has comprised packet receiving interface and the interface of giving out a contract for a project, and after compiling, the receipts/interface of giving out a contract for a project that generation can be called for python, facilitates python to call.
Step S300, drives appointment network interface card to call the described receipts/interface of giving out a contract for a project and receives and dispatches bag test.
When test, in the test of transmitting-receiving bag, drive and specify network interface card to give out a contract for a project, drive the network interface card packet receiving of another appointment, the destination address that the network interface card of giving out a contract for a project is given out a contract for a project is described packet receiving network interface card address.In the present embodiment, the main frame at packet receiving network interface card place, revises the packet receiving interface in packet capturing module, the packet receiving can be saved to file, for check analysis in the future.
In a preferred embodiment, in the test of transmitting-receiving bag, the interface of giving out a contract for a project can repeat to send the packet of a plurality of appointments.
In the test of transmitting-receiving bag, the stability that can test unavoidably transmitting-receiving bag, at this moment, by the interface of giving out a contract for a project, repeat to send a plurality of specific data bags, then open log folder, open the packet of preservation, can check all packets of receiving on this appointment network interface card, the convenient track and localization of problem later.
The present invention, for realizing and carry out packet sending and receiving and analytical system by network interface card based on pylibpcap, can directly call host network card and receive and dispatch message, makes platform not rely on tester, reduces testing cost.The invention provides open interface, can, by the language call of all support Socket programming, support cross-platform.
Adopt after the inventive method, in packet capturing module, increase the module of giving out a contract for a project, then receipts/the interface of giving out a contract for a project that use drives the network interface card of appointment to call in described packet capturing module is received and dispatched bag test, in data traffic in network interface card transmitting-receiving packet flow weight range, avoid long-time engaged test instrument port in automatic test course, caused the problem of the wasting of resources.
Below only expressed several execution mode of the present invention, it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (5)

1. a transmitting-receiving bag method of testing, is characterized in that, comprising:
In packet capturing module, increase the interface of giving out a contract for a project;
Compile described packet capturing module, the receipts/interface of giving out a contract for a project that generation can be called for python;
Drive appointment network interface card to call the described receipts/interface of giving out a contract for a project and receive and dispatch bag test;
Wherein, python is a kind of OO programming language.
2. transmitting-receiving bag method of testing according to claim 1, is characterized in that, described in the interface of giving out a contract for a project can repeat to send a plurality of specific data bags.
3. transmitting-receiving bag method of testing according to claim 1, is characterized in that, revises the packet receiving interface in described packet capturing module, and the packet of reception is saved in to file.
4. transmitting-receiving bag method of testing according to claim 1, is characterized in that, increases packet filtering, the message that filtering is ineligible in described packet receiving interface.
5. transmitting-receiving bag method of testing according to claim 4, is characterized in that, described packet capturing module is pylibpcap.
CN201410379408.4A 2014-08-04 2014-08-04 Packet receiving and transmission testing method Pending CN104125117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410379408.4A CN104125117A (en) 2014-08-04 2014-08-04 Packet receiving and transmission testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410379408.4A CN104125117A (en) 2014-08-04 2014-08-04 Packet receiving and transmission testing method

Publications (1)

Publication Number Publication Date
CN104125117A true CN104125117A (en) 2014-10-29

Family

ID=51770386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410379408.4A Pending CN104125117A (en) 2014-08-04 2014-08-04 Packet receiving and transmission testing method

Country Status (1)

Country Link
CN (1) CN104125117A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468281A (en) * 2014-12-24 2015-03-25 上海斐讯数据通信技术有限公司 Routing information protocol simulator and routing information protocol communication test method thereof
CN113872826A (en) * 2021-08-31 2021-12-31 苏州浪潮智能科技有限公司 Network card port stability testing method, system, terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
US20120102309A1 (en) * 2010-10-26 2012-04-26 Hon Hai Precision Industry Co., Ltd. Preboot execution environment test device and method
CN102468993A (en) * 2010-11-17 2012-05-23 大唐移动通信设备有限公司 Terminal test equipment and method
CN102571283A (en) * 2012-01-19 2012-07-11 神州数码网络(北京)有限公司 Method and system for testing message of wireless network device
CN102916848A (en) * 2012-07-13 2013-02-06 北京航空航天大学 Automatic test method of Ethernet interface equipment based on script technology
CN103078772A (en) * 2013-02-26 2013-05-01 南京理工大学常熟研究院有限公司 Depth packet inspection (DPI) sampling peer-to-peer (P2P) flow detection system based on credibility
CN103281335A (en) * 2013-06-18 2013-09-04 东华大学 Embedded network protocol stack development method based on WinPcap

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
US20120102309A1 (en) * 2010-10-26 2012-04-26 Hon Hai Precision Industry Co., Ltd. Preboot execution environment test device and method
CN102468993A (en) * 2010-11-17 2012-05-23 大唐移动通信设备有限公司 Terminal test equipment and method
CN102571283A (en) * 2012-01-19 2012-07-11 神州数码网络(北京)有限公司 Method and system for testing message of wireless network device
CN102916848A (en) * 2012-07-13 2013-02-06 北京航空航天大学 Automatic test method of Ethernet interface equipment based on script technology
CN103078772A (en) * 2013-02-26 2013-05-01 南京理工大学常熟研究院有限公司 Depth packet inspection (DPI) sampling peer-to-peer (P2P) flow detection system based on credibility
CN103281335A (en) * 2013-06-18 2013-09-04 东华大学 Embedded network protocol stack development method based on WinPcap

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468281A (en) * 2014-12-24 2015-03-25 上海斐讯数据通信技术有限公司 Routing information protocol simulator and routing information protocol communication test method thereof
CN113872826A (en) * 2021-08-31 2021-12-31 苏州浪潮智能科技有限公司 Network card port stability testing method, system, terminal and storage medium
CN113872826B (en) * 2021-08-31 2023-02-28 苏州浪潮智能科技有限公司 Network card port stability testing method, system, terminal and storage medium

Similar Documents

Publication Publication Date Title
CN103959691B (en) Dispatching down link resource
CN110351156A (en) A kind of test method and device
US20120230206A1 (en) Placement of wireless repeaters in a wireless communication network
CN101316196B (en) Method and apparatus for implementing simulation test of service on distributed platform
US10602401B2 (en) Apparatus and method aggregation at one or more layers
CN102316505A (en) Air interface protocol test method, device and system for base station
CN106658756A (en) Method and device for recognizing connection between terminal device and hotspot
CN106452978A (en) Method and device for detecting communication abnormity
CN109669787B (en) Data transmission method and device, storage medium and electronic equipment
KR100882814B1 (en) Dual processing system for ensuring realtime of protocol test
CN104394544A (en) Automatic radio frequency test method for WiFi (Wireless Fidelity) product
CN104125117A (en) Packet receiving and transmission testing method
CN101316203A (en) Method for monitoring embedded IP terminal internetwork connection condition
CN103281335A (en) Embedded network protocol stack development method based on WinPcap
CN102315981B (en) Equipment and method for testing evolved packet core network equipment
CN106162678A (en) The test device of connection mode and method of testing thereof
CN101895441A (en) Service debugging device and method for JAVA application of terminal of Internet of things
CN106934544A (en) Garbage recovery device, system and method
CN102299779B (en) Method and system for detecting RLC (Radio Link Control) layer retransmitted data packet
CN106603260A (en) WCF service test method
CN104468190A (en) Wifi data package capturing method and device and intelligent terminal
CN104065468A (en) Multipath-based data transmission method, path selection method and path selection device in wireless apparatus
CN107316377A (en) A kind of invoice checking method applied based on mobile phone
CN113220580A (en) Test method and device, equipment and storage medium
CN104883744A (en) Method and device for processing responses

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141029

RJ01 Rejection of invention patent application after publication