Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Get the API of the device list

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Typically, the first thing you do when writing WinPcap-based applications is to get a list of connected network adapters. Both libpcap and WinPcap provide the pcap_findalldevs_ex () function to do this: this function returns a linked list of pcap_if structures, each of which contains the details of an adapter. It is worth noting that the data fields name and description represent an adapter name and a description that people can understand.

To debug code in vs2008:

Runtime environment preparation: WpdPack_4_1_2 installation package

1: extract the WpdPack_4_1_2 and put it in the root directory of disk c, open Microsoft Visual Studio 2010, and copy the API code that gets the list of devices to the work panel, as follows

1234567891011121314151617 but can run when writing We need to configure some items-- > * * attribute (alt+F7) configuration property-- > inventory tool-- > input and output-- > embed list-- > No item-- > * * attribute (alt+F7) configuration property-- > CAccord Category configuration property-- > General-- > additional include directory-- > include (WpdPack_4_1_2 under disk c)-- > * * alt+F7 configuration properties-- > linker-- > general-- > additional library directory-- > lib (WpdPack_4_1_2 under disk c) items-- > * * properties (alt+F7) configuration properties-- > linker-- > input-- > additional dependencies-- > supplement " Packet.lib;wpcap.lib "Project-- > * * attribute (alt+F7) configuration property-- > Cmax Cleavage color color-- > preprocessor-- > preprocessor definition-- > supplement"; HAVE_REMOTE "

+ + +

In this way, the compilation does not report an error, and the compilation results can be seen.

This is a success!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report