wpcap_tut2.txt

来自「用来监视网络通信数据的源代码和应用程序,方便网络程序底层开发.」· 文本 代码 · 共 18 行

TXT
18
字号
/** @ingroup wpcap_tut
 */

/** @defgroup wpcap_tut2 Obtaining advanced information about installed devices
 *  @{

Lesson 1 (\ref wpcap_tut1) showed how to get basic information (i.e. device name and description) about available adapters. Actually, WinPcap provides also other advanced information. In particular, every pcap_if structure returned by pcap_findalldevs() contains also a list of pcap_addr structures, with:
- a list of addresses for that interface.
- a list of netmasks (each of which corresponds to an entry in the addresses list).
- a list of broadcast addresses (each of which corresponds to an entry in the addresses list).
- a list of destination addresses (each of which corresponds to an entry in the addresses list).

The following sample provides an ifprint() function that prints the whole content of a pcap_if structure. It is invoked by the program for every entry returned by pcap_findalldevs().

\include iflist/iflist.c

@}*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?