亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? group__wpcap__tut2.html

?? Winpcap是一個強大的網絡開發庫
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>WinPcap: Obtaining advanced information about installed devices</title><link href="style.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.6 --><div class="navigation" id="top">  <div class="tabs">    <ul>      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>      <li><a href="modules.html"><span>Modules</span></a></li>      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>      <li><a href="files.html"><span>Files</span></a></li>    </ul>  </div></div><div class="contents"><h1>Obtaining advanced information about installed devices</h1><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>Lesson 1 (<a class="el" href="group__wpcap__tut1.html">Obtaining the device list</a>) demonstrated how to get basic information (i.e. device name and description) about available adapters. Actually, WinPcap provides also other advanced information. In particular, every <a class="el" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if</a> structure returned by <a class="el" href="group__wpcapfunc.html#g98f36e62c95c6ad81eaa8b2bbeb8f16e" title="Create a list of network devices that can be opened with pcap_open().">pcap_findalldevs_ex()</a> contains also a list of <a class="el" href="structpcap__addr.html" title="Representation of an interface address, used by pcap_findalldevs().">pcap_addr</a> structures, with:<ul><li>a list of addresses for that interface.</li><li>a list of netmasks (each of which corresponds to an entry in the addresses list).</li><li>a list of broadcast addresses (each of which corresponds to an entry in the addresses list).</li><li>a list of destination addresses (each of which corresponds to an entry in the addresses list).</li></ul><p>Additionally, <a class="el" href="group__wpcapfunc.html#g98f36e62c95c6ad81eaa8b2bbeb8f16e" title="Create a list of network devices that can be opened with pcap_open().">pcap_findalldevs_ex()</a> can also return remote adapters and a list of pcap files that are located in a given local folder.<p>The following sample provides an ifprint() function that prints the complete contents of a <a class="el" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if</a> structure. It is invoked by the program for every entry returned by <a class="el" href="group__wpcapfunc.html#g98f36e62c95c6ad81eaa8b2bbeb8f16e" title="Create a list of network devices that can be opened with pcap_open().">pcap_findalldevs_ex()</a>.<p><div class="fragment"><pre class="fragment"><span class="comment">/*</span><span class="comment"> * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)</span><span class="comment"> * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)</span><span class="comment"> * All rights reserved.</span><span class="comment"> *</span><span class="comment"> * Redistribution and use in source and binary forms, with or without</span><span class="comment"> * modification, are permitted provided that the following conditions</span><span class="comment"> * are met:</span><span class="comment"> *</span><span class="comment"> * 1. Redistributions of source code must retain the above copyright</span><span class="comment"> * notice, this list of conditions and the following disclaimer.</span><span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span><span class="comment"> * notice, this list of conditions and the following disclaimer in the</span><span class="comment"> * documentation and/or other materials provided with the distribution.</span><span class="comment"> * 3. Neither the name of the Politecnico di Torino, CACE Technologies </span><span class="comment"> * nor the names of its contributors may be used to endorse or promote </span><span class="comment"> * products derived from this software without specific prior written </span><span class="comment"> * permission.</span><span class="comment"> *</span><span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span><span class="comment"> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span><span class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span><span class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span><span class="comment"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span><span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span><span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span><span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span><span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span><span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span><span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span><span class="comment"> *</span><span class="comment"> */</span><span class="preprocessor">#include &lt;stdio.h&gt;</span><span class="preprocessor">#include "pcap.h"</span><span class="preprocessor">#ifndef WIN32</span><span class="preprocessor"></span><span class="preprocessor">    #include &lt;sys/socket.h&gt;</span><span class="preprocessor">    #include &lt;netinet/in.h&gt;</span><span class="preprocessor">#else</span><span class="preprocessor"></span><span class="preprocessor">    #include &lt;winsock.h&gt;</span><span class="preprocessor">#endif</span><span class="preprocessor"></span><span class="comment">// Function prototypes</span><span class="keywordtype">void</span> ifprint(<a class="code" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if_t</a> *d);<span class="keywordtype">char</span> *iptos(u_long in);<span class="keywordtype">char</span>* ip6tos(<span class="keyword">struct</span> sockaddr *sockaddr, <span class="keywordtype">char</span> *address, <span class="keywordtype">int</span> addrlen);<span class="keywordtype">int</span> main(){  <a class="code" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if_t</a> *alldevs;  <a class="code" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if_t</a> *d;  <span class="keywordtype">char</span> errbuf[<a class="code" href="group__wpcap__def.html#gcd448353957d92c98fccc29e1fc8d927" title="Size to use when allocating the buffer that contains the libpcap errors.">PCAP_ERRBUF_SIZE</a>+1];  <span class="keywordtype">char</span> source[<a class="code" href="group__wpcap__def.html#gcd448353957d92c98fccc29e1fc8d927" title="Size to use when allocating the buffer that contains the libpcap errors.">PCAP_ERRBUF_SIZE</a>+1];  printf(<span class="stringliteral">"Enter the device you want to list:\n"</span>            <span class="stringliteral">"rpcap://              ==&gt; lists interfaces in the local machine\n"</span>            <span class="stringliteral">"rpcap://hostname:port ==&gt; lists interfaces in a remote machine\n"</span>            <span class="stringliteral">"                          (rpcapd daemon must be up and running\n"</span>            <span class="stringliteral">"                           and it must accept 'null' authentication)\n"</span>            <span class="stringliteral">"file://foldername     ==&gt; lists all pcap files in the give folder\n\n"</span>            <span class="stringliteral">"Enter your choice: "</span>);  fgets(source, <a class="code" href="group__wpcap__def.html#gcd448353957d92c98fccc29e1fc8d927" title="Size to use when allocating the buffer that contains the libpcap errors.">PCAP_ERRBUF_SIZE</a>, stdin);  source[<a class="code" href="group__wpcap__def.html#gcd448353957d92c98fccc29e1fc8d927" title="Size to use when allocating the buffer that contains the libpcap errors.">PCAP_ERRBUF_SIZE</a>] = <span class="charliteral">'\0'</span>;  <span class="comment">/* Retrieve the interfaces list */</span>  <span class="keywordflow">if</span> (<a class="code" href="group__wpcapfunc.html#g98f36e62c95c6ad81eaa8b2bbeb8f16e" title="Create a list of network devices that can be opened with pcap_open().">pcap_findalldevs_ex</a>(source, NULL, &amp;alldevs, errbuf) == -1)  {    fprintf(stderr,<span class="stringliteral">"Error in pcap_findalldevs: %s\n"</span>,errbuf);    exit(1);  }  <span class="comment">/* Scan the list printing every entry */</span>  <span class="keywordflow">for</span>(d=alldevs;d;d=d-&gt;<a class="code" href="structpcap__if.html#81508e6e4e41ca4235c8d6b51913c536" title="if not NULL, a pointer to the next element in the list; NULL for the last element...">next</a>)  {    ifprint(d);  }  <a class="code" href="group__wpcapfunc.html#g346b4b0b7fd1cda4abb9a39f767dbeb1" title="Free an interface list returned by pcap_findalldevs().">pcap_freealldevs</a>(alldevs);  <span class="keywordflow">return</span> 1;}<span class="comment">/* Print all the available information on the given interface */</span><span class="keywordtype">void</span> ifprint(<a class="code" href="structpcap__if.html" title="Item in a list of interfaces, used by pcap_findalldevs().">pcap_if_t</a> *d){  <a class="code" href="structpcap__addr.html" title="Representation of an interface address, used by pcap_findalldevs().">pcap_addr_t</a> *a;  <span class="keywordtype">char</span> ip6str[128];  <span class="comment">/* Name */</span>  printf(<span class="stringliteral">"%s\n"</span>,d-&gt;<a class="code" href="structpcap__if.html#5ac083a645d964373f022d03df4849c8" title="a pointer to a string giving a name for the device to pass to pcap_open_live()">name</a>);  <span class="comment">/* Description */</span>  <span class="keywordflow">if</span> (d-&gt;<a class="code" href="structpcap__if.html#8444d6e0dfe2bbab0b5e7b24308f1559" title="if not NULL, a pointer to a string giving a human-readable description of the device...">description</a>)    printf(<span class="stringliteral">"\tDescription: %s\n"</span>,d-&gt;<a class="code" href="structpcap__if.html#8444d6e0dfe2bbab0b5e7b24308f1559" title="if not NULL, a pointer to a string giving a human-readable description of the device...">description</a>);  <span class="comment">/* Loopback Address*/</span>  printf(<span class="stringliteral">"\tLoopback: %s\n"</span>,(d-&gt;<a class="code" href="structpcap__if.html#304e038dd1326c14b31a206cbad18756" title="PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that...">flags</a> &amp; <a class="code" href="group__wpcap__def.html#g43a6601bfd438efc02b0ba71c5439647" title="interface is loopback">PCAP_IF_LOOPBACK</a>)?<span class="stringliteral">"yes"</span>:<span class="stringliteral">"no"</span>);  <span class="comment">/* IP addresses */</span>  <span class="keywordflow">for</span>(a=d-&gt;<a class="code" href="structpcap__if.html#3910004677550db6d9b09792ba3e2cca" title="a pointer to the first element of a list of addresses for the interface">addresses</a>;a;a=a-&gt;<a class="code" href="structpcap__addr.html#b151e8e96bdb23ae8dd8d644de561999" title="if not NULL, a pointer to the next element in the list; NULL for the last element...">next</a>) {    printf(<span class="stringliteral">"\tAddress Family: #%d\n"</span>,a-&gt;<a class="code" href="structpcap__addr.html#4863f5b8767cd19fe6ea4db75456e5df" title="a pointer to a struct sockaddr containing an address">addr</a>-&gt;sa_family);      <span class="keywordflow">switch</span>(a-&gt;<a class="code" href="structpcap__addr.html#4863f5b8767cd19fe6ea4db75456e5df" title="a pointer to a struct sockaddr containing an address">addr</a>-&gt;sa_family)    {      <span class="keywordflow">case</span> AF_INET:        printf(<span class="stringliteral">"\tAddress Family Name: AF_INET\n"</span>);        <span class="keywordflow">if</span> (a-&gt;<a class="code" href="structpcap__addr.html#4863f5b8767cd19fe6ea4db75456e5df" title="a pointer to a struct sockaddr containing an address">addr</a>)          printf(<span class="stringliteral">"\tAddress: %s\n"</span>,iptos(((<span class="keyword">struct</span> sockaddr_in *)a-&gt;<a class="code" href="structpcap__addr.html#4863f5b8767cd19fe6ea4db75456e5df" title="a pointer to a struct sockaddr containing an address">addr</a>)-&gt;sin_addr.s_addr));        <span class="keywordflow">if</span> (a-&gt;<a class="code" href="structpcap__addr.html#c43963e42e4d901e55e433ab9c3ea686" title="if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding...">netmask</a>)          printf(<span class="stringliteral">"\tNetmask: %s\n"</span>,iptos(((<span class="keyword">struct</span> sockaddr_in *)a-&gt;<a class="code" href="structpcap__addr.html#c43963e42e4d901e55e433ab9c3ea686" title="if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding...">netmask</a>)-&gt;sin_addr.s_addr));        <span class="keywordflow">if</span> (a-&gt;<a class="code" href="structpcap__addr.html#0077647e1560caa72d457120b36c248c" title="if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品拍天天在线| 中文字幕中文字幕中文字幕亚洲无线| ●精品国产综合乱码久久久久| av午夜一区麻豆| 亚洲成人午夜影院| 日韩欧美国产综合一区| 福利一区在线观看| 青青草国产成人av片免费| 国产精品久久三| 国产精品福利在线播放| 综合网在线视频| 欧美刺激午夜性久久久久久久 | 日韩欧美综合在线| 成人免费毛片a| 蜜桃精品在线观看| 亚洲精品第1页| 国产欧美一区二区精品婷婷| 欧美三级乱人伦电影| 99久久免费精品| 国产精品一级在线| 蜜桃av一区二区| 国产一区二区在线视频| 日韩高清中文字幕一区| 亚洲欧美另类图片小说| 中文字幕欧美国产| www一区二区| 欧美一级免费观看| 欧美日韩国产精品成人| 91麻豆国产在线观看| av在线播放一区二区三区| 91久久国产最好的精华液| 91在线视频免费观看| 欧美日韩黄色影视| 国产欧美精品一区二区色综合 | 午夜精品久久久久影视| 亚洲精品中文字幕乱码三区| 五月天婷婷综合| 国产激情视频一区二区在线观看 | 亚洲国产精品v| 亚洲成在人线免费| 91小宝寻花一区二区三区| 欧美三区在线视频| 久久九九影视网| 精品成人在线观看| 国产清纯在线一区二区www| 亚洲永久免费视频| 午夜精品久久久久久久99水蜜桃| 精品夜夜嗨av一区二区三区| 国产一区二区三区久久久| 91亚洲资源网| 久久精品视频在线看| 天使萌一区二区三区免费观看| 亚洲一区二区三区在线看| 国产福利精品导航| 欧美一区二区久久久| 色综合久久中文综合久久97| 中文字幕在线观看不卡| 欧美日韩在线播放| 精品国产污网站| 亚洲高清不卡在线| 天天亚洲美女在线视频| 91同城在线观看| 国产婷婷色一区二区三区在线| 男女性色大片免费观看一区二区| 91女人视频在线观看| 亚洲国产成人自拍| 国产福利精品一区二区| 久久蜜桃一区二区| 亚洲色大成网站www久久九九| 国产精品一级二级三级| 久久婷婷久久一区二区三区| 精品一区二区三区在线播放| 91精品国产高清一区二区三区蜜臀| 夜夜精品视频一区二区| 久久精品噜噜噜成人88aⅴ | 免费看黄色91| 制服丝袜日韩国产| 国产精品免费av| 丁香另类激情小说| 国产精品免费人成网站| 丁香五精品蜜臀久久久久99网站| 国产偷国产偷精品高清尤物| 国产不卡视频在线播放| 国产精品夫妻自拍| 色综合久久久久综合体| 亚洲一区二区三区不卡国产欧美| 色又黄又爽网站www久久| 一区二区三区视频在线看| 在线一区二区视频| 亚洲国产日韩精品| 欧美人妖巨大在线| 精品一区二区三区免费播放| ww亚洲ww在线观看国产| 99热99精品| 亚洲777理论| 337p粉嫩大胆噜噜噜噜噜91av| 国产精品一区一区| 一区二区三区在线视频观看58| 欧美色成人综合| 国产美女娇喘av呻吟久久| 亚洲同性同志一二三专区| 欧美性猛交xxxx乱大交退制版| 欧美国产1区2区| 欧美亚洲图片小说| 日本大胆欧美人术艺术动态| 久久亚洲精品小早川怜子| 成人黄色av电影| 国产嫩草影院久久久久| 欧美亚洲一区二区三区四区| 国产在线精品一区二区不卡了 | 91丨九色丨蝌蚪丨老版| 午夜免费久久看| 国产日产欧产精品推荐色 | 在线一区二区三区做爰视频网站| 日本视频中文字幕一区二区三区| 欧美国产日韩精品免费观看| 欧美日韩一区小说| 国产精品一二三四五| 亚洲国产成人91porn| 久久精品欧美一区二区三区麻豆| 91精品办公室少妇高潮对白| 久久成人综合网| 亚洲一区二区三区在线播放| 久久婷婷综合激情| 4438成人网| 欧洲国内综合视频| 亚洲国产另类精品专区| 国产人妖乱国产精品人妖| 在线播放视频一区| 九九精品一区二区| 亚洲国产成人tv| 中文字幕中文字幕中文字幕亚洲无线| 欧美一区二区国产| 欧美日韩在线不卡| 91在线国产福利| 成人手机在线视频| 国产福利视频一区二区三区| 蜜臀av性久久久久av蜜臀妖精| 亚洲精品五月天| 国产精品久久久久久妇女6080 | 欧美国产成人精品| 26uuu国产日韩综合| 日韩欧美一级二级三级| 欧美三级在线视频| 91丨九色丨蝌蚪丨老版| 91在线云播放| 99精品久久99久久久久| 不卡的电影网站| 成人深夜在线观看| 成人免费看视频| 成人av在线资源| 成人久久视频在线观看| 国产99久久久精品| 大白屁股一区二区视频| 国产福利91精品一区二区三区| 激情文学综合网| 亚洲女同女同女同女同女同69| 亚洲国产精品成人久久综合一区| 国产欧美视频在线观看| 国产网站一区二区| 国产精品国产a| 天堂影院一区二区| 亚洲综合丁香婷婷六月香| 亚洲精品乱码久久久久久久久 | 麻豆一区二区99久久久久| 奇米色777欧美一区二区| 免费观看在线色综合| 蜜桃在线一区二区三区| 国产精品69毛片高清亚洲| 国产成人精品一区二区三区四区| 国产69精品久久99不卡| 99re这里只有精品视频首页| 色综合久久久久久久久| 欧美久久婷婷综合色| 精品免费视频一区二区| 中文av字幕一区| 亚洲国产精品一区二区久久恐怖片 | 1区2区3区国产精品| 亚洲精品国产品国语在线app| 亚洲国产aⅴ天堂久久| 久久精品久久精品| 9久草视频在线视频精品| 精品视频在线免费看| 久久网站热最新地址| 一区二区三区不卡视频在线观看| 日本视频中文字幕一区二区三区 | 中文字幕在线不卡视频| 又紧又大又爽精品一区二区| 日韩高清电影一区| 成人做爰69片免费看网站| 欧美午夜一区二区三区| 久久午夜色播影院免费高清| 日韩一区欧美一区| 老汉av免费一区二区三区| 91视频在线观看| 欧美精品一区二区三区蜜桃 | 午夜视频久久久久久| 国产精品99久久久久久似苏梦涵 | 91精品一区二区三区在线观看| 久久久精品国产免大香伊|