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

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

?? group__wpcap__tut3.html

?? Winpcap是一個強大的網絡開發庫
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
        <span class="comment">/* Free the device list */</span>        <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">/* Jump to the selected adapter */</span>    <span class="keywordflow">for</span>(d=alldevs, i=0; i&lt; inum-1 ;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>, i++);        <span class="comment">/* Open the device */</span>    <span class="keywordflow">if</span> ( (adhandle= <a class="code" href="group__wpcapfunc.html#g2b64c7b6490090d1d37088794f1f1791" title="Open a generic source in order to capture / send (WinPcap only) traffic.">pcap_open</a>(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">// name of the device</span>                              65536,            <span class="comment">// portion of the packet to capture</span>                                                <span class="comment">// 65536 guarantees that the whole packet will be captured on all the link layers</span>                              <a class="code" href="group__remote__open__flags.html#g9134ce51a9a6a7d497c3dee5affdc3b9" title="Defines if the adapter has to go in promiscuous mode.">PCAP_OPENFLAG_PROMISCUOUS</a>,    <span class="comment">// promiscuous mode</span>                              1000,             <span class="comment">// read timeout</span>                              NULL,             <span class="comment">// authentication on the remote machine</span>                              errbuf            <span class="comment">// error buffer</span>                              ) ) == NULL)    {        fprintf(stderr,<span class="stringliteral">"\nUnable to open the adapter. %s is not supported by WinPcap\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">/* Free the device list */</span>        <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;    }        printf(<span class="stringliteral">"\nlistening on %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">/* At this point, we don't need any more the device list. Free it */</span>    <a class="code" href="group__wpcapfunc.html#g346b4b0b7fd1cda4abb9a39f767dbeb1" title="Free an interface list returned by pcap_findalldevs().">pcap_freealldevs</a>(alldevs);        <span class="comment">/* start the capture */</span>    <a class="code" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop</a>(adhandle, 0, packet_handler, NULL);        <span class="keywordflow">return</span> 0;}<span class="comment">/* Callback function invoked by libpcap for every incoming packet */</span><span class="keywordtype">void</span> packet_handler(u_char *param, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structpcap__pkthdr.html" title="Header of a packet in the dump file.">pcap_pkthdr</a> *header, <span class="keyword">const</span> u_char *pkt_data){    <span class="keyword">struct </span>tm ltime;    <span class="keywordtype">char</span> timestr[16];    time_t local_tv_sec;    <span class="comment">/*</span><span class="comment">     * unused variables</span><span class="comment">     */</span>    (VOID)(param);    (VOID)(pkt_data);    <span class="comment">/* convert the timestamp to readable format */</span>    local_tv_sec = header-&gt;<a class="code" href="structpcap__pkthdr.html#21be78b2818c91cb205885b8a6f5aed8" title="time stamp">ts</a>.tv_sec;    localtime_s(&amp;ltime, &amp;local_tv_sec);    strftime( timestr, <span class="keyword">sizeof</span> timestr, <span class="stringliteral">"%H:%M:%S"</span>, &amp;ltime);        printf(<span class="stringliteral">"%s,%.6d len:%d\n"</span>, timestr, header-&gt;<a class="code" href="structpcap__pkthdr.html#21be78b2818c91cb205885b8a6f5aed8" title="time stamp">ts</a>.tv_usec, header-&gt;<a class="code" href="structpcap__pkthdr.html#728f264db4f5cc304742565a2bcdbeea" title="length this packet (off wire)">len</a>);    }</pre></div><p>Once the adapter is opened, the capture can be started with <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> or <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a>. These two functions are very similar, the difference is that pcap_ dispatch() returns (although not guaranteed) when the timeout expires while <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> doesn't return until <em>cnt</em> packets have been captured, so it can block for an arbitrary period on an under-utilized network. <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> is enough for the purpose of this sample, while <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> is normally used in a more complex program.<p>Both of these functions have a <em>callback</em> parameter, <em>packet_handler</em>, pointing to a function that will receive the packets. This function is invoked by libpcap for every new packet coming from the network and receives a generic status (corresponding to the <em>user</em> parameter of <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> and <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a>), a header with some information on the packet like the timestamp and the length and the actual data of the packet including all the protocol headers. Note that the frame CRC is normally not present, because it is removed by the network adapter after frame validation. Note also that most adapters discard packets with wrong CRCs, therefore WinPcap is normally not able to capture them.<p>The above example extracts the timestamp and the length of every packet from the <a class="el" href="structpcap__pkthdr.html" title="Header of a packet in the dump file.">pcap_pkthdr</a> header and prints them on the screen.<p>Please note that there may be a drawback using <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> mainly related to the fact that the handler is called by the packet capture driver; therefore the user application does not have direct control over it. Another approach (and to have more readable programs) is to use the <a class="el" href="group__wpcapfunc.html#g439439c2eae61161dc1efb1e03a81133" title="Read a packet from an interface or from an offline capture.">pcap_next_ex()</a> function, which is presented in the next example (<a class="el" href="group__wpcap__tut4.html">Capturing the packets without the callback</a>).<p><a class="el" href="group__wpcap__tut2.html">&lt;&lt;&lt; Previous</a> <a class="el" href="group__wpcap__tut4.html">Next &gt;&gt;&gt;</a> </div><hr><p align="right"><img border="0" src="winpcap_small.gif" align="absbottom" width="91" height="27">documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2008CACE Technologies. All rights reserved.</p>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷国产在线综合| 亚洲在线成人精品| 精品国产伦一区二区三区观看体验| 在线观看亚洲成人| 欧美色网站导航| 91精品国产入口在线| 欧美一区二区三区的| 欧美mv日韩mv国产网站| 国产视频一区二区在线| 日本一区二区动态图| 亚洲欧洲精品天堂一级| 亚洲国产精品久久久久婷婷884 | 久久精品人人做人人综合 | 亚洲精品在线观看视频| 国产视频在线观看一区二区三区 | 国产成人精品影院| 成人丝袜视频网| 欧美性生活一区| 欧美变态凌虐bdsm| 亚洲欧洲中文日韩久久av乱码| 亚洲午夜一区二区| 久草精品在线观看| 99精品视频在线播放观看| 欧美视频一区二区三区| 欧美精品一区男女天堂| 亚洲天堂网中文字| 亚洲va天堂va国产va久| 国产成人在线影院| 欧美日韩国产首页| 久久这里都是精品| 亚洲在线成人精品| 国产乱码字幕精品高清av| 色婷婷国产精品| 久久久影视传媒| 丝袜美腿成人在线| 91丨九色丨黑人外教| 欧美mv日韩mv国产网站app| 亚洲精品成人a在线观看| 精品一区二区免费| 欧美日韩卡一卡二| 亚洲精品久久嫩草网站秘色| 极品尤物av久久免费看| 欧美在线小视频| 欧美国产日本视频| 激情综合网av| 7777女厕盗摄久久久| 中文字幕一区二区不卡| 国产精品中文欧美| 日韩一区二区三区在线视频| 亚洲美女在线国产| 99视频超级精品| 国产女同性恋一区二区| 麻豆91在线观看| 这里只有精品99re| 亚洲va韩国va欧美va| 91精彩视频在线| 亚洲欧洲成人精品av97| 国产精品1区2区3区| 精品久久久影院| 秋霞午夜av一区二区三区| 欧美少妇xxx| 亚洲成人先锋电影| 在线欧美小视频| 一区二区在线看| 91麻豆国产福利在线观看| 国产精品免费视频观看| 国产乱理伦片在线观看夜一区| 日韩欧美国产不卡| 久久99九九99精品| 精品国产乱码久久久久久闺蜜| 日本欧美一区二区三区乱码| 欧美视频一区二区三区| 日韩经典中文字幕一区| 91麻豆精品国产91久久久久久| 亚洲图片自拍偷拍| 欧美一区二区在线免费播放| 天堂午夜影视日韩欧美一区二区| 欧美在线影院一区二区| 亚洲超丰满肉感bbw| 欧美一区二区在线播放| 精品在线免费视频| 久久精品日韩一区二区三区| 国产成人精品网址| 中文字幕日韩av资源站| 91丨九色丨黑人外教| 亚洲福利视频一区| 日韩三级av在线播放| 国产一区二区日韩精品| 国产精品热久久久久夜色精品三区| 国产不卡在线一区| 亚洲精品高清在线| 91精品国产综合久久香蕉麻豆| 秋霞午夜av一区二区三区| 久久夜色精品国产欧美乱极品| 国产成人免费xxxxxxxx| 亚洲精品国产品国语在线app| 欧美精三区欧美精三区| 国产黄色精品视频| 亚洲在线视频一区| 精品噜噜噜噜久久久久久久久试看 | 色婷婷综合中文久久一本| 亚洲欧美日韩国产成人精品影院| 夜夜嗨av一区二区三区| 国内精品国产成人国产三级粉色 | 九九精品一区二区| 日韩视频一区二区三区| 日本不卡在线视频| 色94色欧美sute亚洲线路一ni| 99九九99九九九视频精品| 亚洲一区二区三区四区在线免费观看| 欧美精品日日鲁夜夜添| 国产麻豆欧美日韩一区| 伊人一区二区三区| 久久久久成人黄色影片| 在线观看日韩国产| 成人午夜精品一区二区三区| 一区二区三区欧美日韩| 国产欧美一区二区三区在线老狼 | 奇米影视在线99精品| 中文字幕免费不卡| 91精品久久久久久久91蜜桃| 99精品欧美一区| 国产综合久久久久久鬼色| 精品一区二区在线播放| 久久这里只有精品视频网| 欧美怡红院视频| 成人污污视频在线观看| 狠狠色丁香婷综合久久| 亚洲成人av福利| 欧美精品一区视频| 日韩欧美久久久| 欧美性猛交xxxxxx富婆| av一区二区三区在线| 国产一区二区在线观看视频| 日韩黄色片在线观看| 亚洲一区自拍偷拍| 亚洲欧美日韩国产一区二区三区| 国产午夜精品久久久久久久 | 性做久久久久久免费观看欧美| 日本一区二区成人| 国产亚洲一区字幕| 国产亚洲福利社区一区| 欧美精品一区在线观看| 日韩午夜激情电影| 日韩区在线观看| 欧美sm极限捆绑bd| 欧美xfplay| 精品欧美黑人一区二区三区| 91精品国产综合久久国产大片| 欧美日韩国产一级二级| 欧美老肥妇做.爰bbww视频| 欧美色成人综合| 欧美裸体一区二区三区| 欧美日韩免费高清一区色橹橹| 欧美影视一区二区三区| 正在播放亚洲一区| 亚洲精品在线观看网站| 久久久www免费人成精品| 久久久久久免费| 综合中文字幕亚洲| 亚洲一区二区三区在线看| 日韩av一级电影| 免费观看久久久4p| 国产成人综合在线| 91丨九色porny丨蝌蚪| 欧美日韩亚州综合| 日韩精品一区二区三区在线观看 | 日韩视频在线一区二区| 亚洲精品一区二区精华| 国产精品你懂的| 亚洲一区二区影院| 免费成人av在线播放| 国产成人一区在线| 91豆麻精品91久久久久久| 91精品国产欧美一区二区成人| 久久久久高清精品| 一区二区三区日韩| 九色|91porny| 97国产一区二区| 3d成人h动漫网站入口| 国产亚洲一区二区三区四区| 亚洲精选一二三| 九九视频精品免费| 色噜噜狠狠色综合欧洲selulu| 欧美日本精品一区二区三区| 国产日韩欧美高清在线| 一区2区3区在线看| 国产成人精品aa毛片| 欧美日本在线看| 国产欧美视频一区二区三区| 婷婷中文字幕综合| 91免费在线看| 26uuu久久天堂性欧美| 亚洲一二三四在线观看| 国产成人在线色| 日韩限制级电影在线观看| 亚洲精品日韩综合观看成人91| 国内精品国产成人国产三级粉色 | 91精品福利在线一区二区三区 | 欧美三级三级三级|