<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=WinPcap%3A%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8</id>
	<title>WinPcap:获取网卡列表 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=WinPcap%3A%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8"/>
	<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=WinPcap:%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8&amp;action=history"/>
	<updated>2026-06-02T21:26:25Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=WinPcap:%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8&amp;diff=1253&amp;oldid=prev</id>
		<title>imported&gt;Soleverlee：​/* 使用VS开发 */</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=WinPcap:%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8&amp;diff=1253&amp;oldid=prev"/>
		<updated>2016-09-01T10:10:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;使用VS开发&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2016年9月1日 (四) 10:10的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l39&quot;&gt;第39行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第39行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;然后编译时注意，因为选择链接的x64的库，编译时需要新建x64的平台。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;然后编译时注意，因为选择链接的x64的库，编译时需要新建x64的平台。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programe]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Soleverlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=WinPcap:%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8&amp;diff=1252&amp;oldid=prev</id>
		<title>imported&gt;Soleverlee：​以“参见教程：http://www.winpcap.org/docs/default.htm  ==使用VS开发== 首先配置环境，需要下载WinPcap的开发包，以及WinPcap可执行文件（安...”为内容创建页面</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=WinPcap:%E8%8E%B7%E5%8F%96%E7%BD%91%E5%8D%A1%E5%88%97%E8%A1%A8&amp;diff=1252&amp;oldid=prev"/>
		<updated>2015-06-30T09:52:53Z</updated>

		<summary type="html">&lt;p&gt;以“参见教程：http://www.winpcap.org/docs/default.htm  ==使用VS开发== 首先配置环境，需要下载WinPcap的开发包，以及WinPcap可执行文件（安...”为内容创建页面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;参见教程：http://www.winpcap.org/docs/default.htm&lt;br /&gt;
&lt;br /&gt;
==使用VS开发==&lt;br /&gt;
首先配置环境，需要下载WinPcap的开发包，以及WinPcap可执行文件（安装）。下载后，新建VS空的控制台应用程序。下面设置WinPcap的库包含：&lt;br /&gt;
*C/C++-&amp;gt;常规-&amp;gt;附加包含目录 ：添加$(ProjectDir)\WpdPack\Include&lt;br /&gt;
*链接器-&amp;gt;常规-&amp;gt;附加库目录：添加$(ProjectDir)\WpdPack\Lib\x64&lt;br /&gt;
*链接器-&amp;gt;输入-&amp;gt;附加依赖性 ：添加Packet.lib;wpcap.lib&lt;br /&gt;
新建一个main.cpp：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#define HAVE_REMOTE  &lt;br /&gt;
#include &amp;lt;pcap.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
void getNetDevice(){&lt;br /&gt;
    pcap_if_t *allDevs;    &lt;br /&gt;
    char errBuff[PCAP_ERRBUF_SIZE];&lt;br /&gt;
&lt;br /&gt;
    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &amp;amp;allDevs, errBuff) == -1){&lt;br /&gt;
        std::cerr &amp;lt;&amp;lt; &amp;quot;Error in pcap_findalldevs_ex:&amp;quot; &amp;lt;&amp;lt; errBuff &amp;lt;&amp;lt; std::endl;        &lt;br /&gt;
        exit(1);&lt;br /&gt;
    }&lt;br /&gt;
    int i = 0;&lt;br /&gt;
    for (pcap_if_t *d = allDevs; d != NULL; d = d-&amp;gt;next){&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Device:&amp;quot; &amp;lt;&amp;lt; ++i &amp;lt;&amp;lt; &amp;quot;[&amp;quot; &amp;lt;&amp;lt; d-&amp;gt;name &amp;lt;&amp;lt; &amp;quot;]&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        if (d-&amp;gt;description)&lt;br /&gt;
            cout &amp;lt;&amp;lt; &amp;quot;\t&amp;quot; &amp;lt;&amp;lt; d-&amp;gt;description &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    pcap_freealldevs(allDevs);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv){&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;Running...&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    getNetDevice();&lt;br /&gt;
    return 1;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
然后编译时注意，因为选择链接的x64的库，编译时需要新建x64的平台。&lt;/div&gt;</summary>
		<author><name>imported&gt;Soleverlee</name></author>
	</entry>
</feed>