mame/3rdparty/winpcap/docs/html/Win32-Extensions_8h_source.html
2015-01-10 12:21:12 +01:00

140 lines
18 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>WinPcap: Win32-Extensions.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<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 class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<h1>Win32-Extensions.h</h1><a href="Win32-Extensions_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)</span>
<a name="l00004"></a>00004 <span class="comment"> * All rights reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00008"></a>00008 <span class="comment"> * are met:</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00011"></a>00011 <span class="comment"> * notice, this list of conditions and the following disclaimer.</span>
<a name="l00012"></a>00012 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00013"></a>00013 <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span>
<a name="l00014"></a>00014 <span class="comment"> * documentation and/or other materials provided with the distribution.</span>
<a name="l00015"></a>00015 <span class="comment"> * 3. Neither the name of the Politecnico di Torino, CACE Technologies </span>
<a name="l00016"></a>00016 <span class="comment"> * nor the names of its contributors may be used to endorse or promote </span>
<a name="l00017"></a>00017 <span class="comment"> * products derived from this software without specific prior written </span>
<a name="l00018"></a>00018 <span class="comment"> * permission.</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span>
<a name="l00021"></a>00021 <span class="comment"> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span>
<a name="l00022"></a>00022 <span class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span>
<a name="l00023"></a>00023 <span class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span>
<a name="l00024"></a>00024 <span class="comment"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
<a name="l00025"></a>00025 <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span>
<a name="l00026"></a>00026 <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span>
<a name="l00027"></a>00027 <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span>
<a name="l00028"></a>00028 <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00029"></a>00029 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
<a name="l00030"></a>00030 <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00031"></a>00031 <span class="comment"> *</span>
<a name="l00032"></a>00032 <span class="comment"> */</span>
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="preprocessor">#ifndef __WIN32_EXTENSIONS_H__</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define __WIN32_EXTENSIONS_H__</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00039"></a>00039 <span class="preprocessor">#endif</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="comment">/* Definitions */</span>
<a name="l00042"></a>00042
<a name="l00046"></a><a class="code" href="structpcap__send__queue.html">00046</a> <span class="keyword">struct </span><a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>
<a name="l00047"></a>00047 {
<a name="l00048"></a><a class="code" href="structpcap__send__queue.html#a30305e6f9a9069760edf175b138e445d">00048</a> u_int <a class="code" href="structpcap__send__queue.html#a30305e6f9a9069760edf175b138e445d" title="Maximum size of the the queue, in bytes. This variable contains the size of the buffer...">maxlen</a>;
<a name="l00049"></a><a class="code" href="structpcap__send__queue.html#ab4853420730b2b590cd3ad0e72fa80ca">00049</a> u_int <a class="code" href="structpcap__send__queue.html#ab4853420730b2b590cd3ad0e72fa80ca" title="Current size of the queue, in bytes.">len</a>;
<a name="l00050"></a><a class="code" href="structpcap__send__queue.html#aff2566f4c366b48d73479bef43ee4d2e">00050</a> <span class="keywordtype">char</span> *<a class="code" href="structpcap__send__queue.html#aff2566f4c366b48d73479bef43ee4d2e" title="Buffer containing the packets to be sent.">buffer</a>;
<a name="l00051"></a>00051 };
<a name="l00052"></a>00052
<a name="l00053"></a><a class="code" href="Win32-Extensions_8h.html#a59f37277a1b82cbf46112f0e97485696">00053</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a> <a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>;
<a name="l00054"></a>00054
<a name="l00058"></a>00058 <span class="preprocessor">#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)</span>
<a name="l00059"></a><a class="code" href="Win32-Extensions_8h.html#ac635b6b5d4d6d9958cfb72d44550bd36">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_</span>
<a name="l00060"></a><a class="code" href="Win32-Extensions_8h.html#aadfdcc0e37082d8f6b28a43ec9a0bccf">00060</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>_AirpcapHandle *<a class="code" href="Win32-Extensions_8h.html#aadfdcc0e37082d8f6b28a43ec9a0bccf">PAirpcapHandle</a>;
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a><a class="code" href="Win32-Extensions_8h.html#a8b0c82df581e67530cb69b0c737f6d13">00063</a> <span class="preprocessor">#define BPF_MEM_EX_IMM 0xc0</span>
<a name="l00064"></a><a class="code" href="Win32-Extensions_8h.html#ae9464818b3ae1e14e27bf7dc2a7d0a55">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_MEM_EX_IND 0xe0</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00066"></a>00066 <span class="comment">/*used for ST*/</span>
<a name="l00067"></a><a class="code" href="Win32-Extensions_8h.html#a5be0e4575ff0738e013bf0f3b76dc7be">00067</a> <span class="preprocessor">#define BPF_MEM_EX 0xc0</span>
<a name="l00068"></a><a class="code" href="Win32-Extensions_8h.html#ad7d6cc253b9b7d72ff13f80370a52490">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_TME 0x08</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00070"></a><a class="code" href="Win32-Extensions_8h.html#a5e77fbb97cf270c27c430722a1e6fa3b">00070</a> <span class="preprocessor">#define BPF_LOOKUP 0x90 </span>
<a name="l00071"></a><a class="code" href="Win32-Extensions_8h.html#a7b833a1802fa10b0d550c6eb3e724d75">00071</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_EXECUTE 0xa0</span>
<a name="l00072"></a><a class="code" href="Win32-Extensions_8h.html#aab18fbabe4f6a84757afb8088827e82f">00072</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_INIT 0xb0</span>
<a name="l00073"></a><a class="code" href="Win32-Extensions_8h.html#a52afa333263879b18b8ef1278e9d9c38">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_VALIDATE 0xc0</span>
<a name="l00074"></a><a class="code" href="Win32-Extensions_8h.html#a54a2fb014f7f0ff0dbec7b8c9c319322">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_ACTIVE 0xd0</span>
<a name="l00075"></a><a class="code" href="Win32-Extensions_8h.html#abb2e97aac5a34caa5ceb0d8495ca7d8c">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_RESET 0xe0</span>
<a name="l00076"></a><a class="code" href="Win32-Extensions_8h.html#a53c19e47ce08fe540a1e1323b1d5eb04">00076</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_MEMORY 0x80</span>
<a name="l00077"></a><a class="code" href="Win32-Extensions_8h.html#ae234c1f999720a0167b71235dd9efbd3">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_GET_REGISTER_VALUE 0x70</span>
<a name="l00078"></a><a class="code" href="Win32-Extensions_8h.html#afcf6a0cd9b0e14f9456d643888ae958f">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_REGISTER_VALUE 0x60</span>
<a name="l00079"></a><a class="code" href="Win32-Extensions_8h.html#aa2cac9008111e31a231a0183e2af0525">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_WORKING 0x50</span>
<a name="l00080"></a><a class="code" href="Win32-Extensions_8h.html#a2beb870e2a5cd292a00b8bc243c0ab78">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_ACTIVE_READ 0x40</span>
<a name="l00081"></a><a class="code" href="Win32-Extensions_8h.html#a60cf9b2aab2c973697939bdc85ff4f2d">00081</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SET_AUTODELETION 0x30</span>
<a name="l00082"></a><a class="code" href="Win32-Extensions_8h.html#ac6ebbf4ea8c29d48aa9ebe282544f467">00082</a> <span class="preprocessor"></span><span class="preprocessor">#define BPF_SEPARATION 0xff</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a>00084 <span class="comment">/* Prototypes */</span>
<a name="l00085"></a>00085 <a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>* <a class="code" href="group__wpcapfunc.html#gab940e69631b7cc7f2232a69ea02b86d9" title="Allocate a send queue.">pcap_sendqueue_alloc</a>(u_int memsize);
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="keywordtype">void</span> <a class="code" href="group__wpcapfunc.html#ga72624f7a9932cc2124abf661001e0aa4" title="Destroy a send queue.">pcap_sendqueue_destroy</a>(<a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>* queue);
<a name="l00088"></a>00088
<a name="l00089"></a>00089 <span class="keywordtype">int</span> <a class="code" href="group__wpcapfunc.html#ga4c57ea320d71dbfe55c5665af9db1297" title="Add a packet to a send queue.">pcap_sendqueue_queue</a>(<a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>* queue, <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> *pkt_header, <span class="keyword">const</span> u_char *pkt_data);
<a name="l00090"></a>00090
<a name="l00091"></a>00091 u_int <a class="code" href="group__wpcapfunc.html#gaa4d55eb047a1cccc0e28397ce04ee097" title="Send a queue of raw packets to the network.">pcap_sendqueue_transmit</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p, <a class="code" href="structpcap__send__queue.html" title="A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()...">pcap_send_queue</a>* queue, <span class="keywordtype">int</span> sync);
<a name="l00092"></a>00092
<a name="l00093"></a>00093 HANDLE <a class="code" href="group__wpcapfunc.html#ga2c415e9192c7b18a81a02300ae6f2c02" title="Return the handle of the event associated with the interface p.">pcap_getevent</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p);
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="keyword">struct </span><a class="code" href="structpcap__stat.html" title="Structure that keeps statistical values on an interface.">pcap_stat</a> *<a class="code" href="group__wpcapfunc.html#ga8050f7829956aabd243cc32b3cfabbd6" title="Return statistics on current capture.">pcap_stats_ex</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p, <span class="keywordtype">int</span> *pcap_stat_size);
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="keywordtype">int</span> <a class="code" href="Win32-Extensions_8h.html#a9b68e06df888cb005ddb92117227e0a6">pcap_setuserbuffer</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p, <span class="keywordtype">int</span> size);
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="keywordtype">int</span> <a class="code" href="group__wpcapfunc.html#gaedef54159d918b22a7de8e75b8a3ef4d" title="Save a capture to file.">pcap_live_dump</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p, <span class="keywordtype">char</span> *filename, <span class="keywordtype">int</span> maxsize, <span class="keywordtype">int</span> maxpacks);
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <span class="keywordtype">int</span> <a class="code" href="group__wpcapfunc.html#gafe8a334f3a7ae2dc7f52e96523da39be" title="Return the status of the kernel dump process, i.e. tells if one of the limits defined...">pcap_live_dump_ended</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p, <span class="keywordtype">int</span> sync);
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="keywordtype">int</span> <a class="code" href="group__wpcapfunc.html#gae92f11bfb001c19b2d0fbcd6821d222a" title="Returns if a given filter applies to an offline packet.">pcap_offline_filter</a>(<span class="keyword">struct</span> bpf_program *prog, <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);
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="keywordtype">int</span> <a class="code" href="Win32-Extensions_8h.html#a6455abf1f09abfd5493e2e0e914aa612">pcap_start_oem</a>(<span class="keywordtype">char</span>* err_str, <span class="keywordtype">int</span> flags);
<a name="l00106"></a>00106
<a name="l00107"></a>00107 PAirpcapHandle <a class="code" href="group__wpcapfunc.html#ga4c8f8d1b9238c74faa156494a6b98670" title="Returns the AirPcap handler associated with an adapter. This handler can be used...">pcap_get_airpcap_handle</a>(<a class="code" href="group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7" title="Descriptor of an open capture instance. This structure is opaque to the user, that...">pcap_t</a> *p);
<a name="l00108"></a>00108
<a name="l00109"></a>00109 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span>}
<a name="l00111"></a>00111 <span class="preprocessor">#endif</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00113"></a>00113 <span class="preprocessor">#endif //__WIN32_EXTENSIONS_H__</span>
</pre></div></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-2009
CACE Technologies. All rights reserved.</p>