⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__npf__ioctl.html

📁 Winpcap是一个强大的网络开发库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<p>Command used to send a buffer of packets in a single system call. Every packet in the buffer is preceded by a <a class="el" href="structsf__pkthdr.html" title="Header associated to a packet in the driver&#39;s buffer when the driver is in dump...">sf_pkthdr</a> structure. The timestamps of the packets are used to synchronize the write, i.e. the packets are sent to the network respecting the intervals specified in the <a class="el" href="structsf__pkthdr.html" title="Header associated to a packet in the driver&#39;s buffer when the driver is in dump...">sf_pkthdr</a> structure assiciated with each packet. <a class="el" href="group__NPF__code.html#g9a97dd25ae757da4bfed3723a4eb4bce" title="Writes a buffer of raw packets to the network.">NPF_BufferedWrite()</a> function is invoked to send the packets. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00156">156</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="g71817d3a52bf0ec819934a5f688a172c"></a><!-- doxytag: member="ioctls.h::BIOCSETBUFFERSIZE" ref="g71817d3a52bf0ec819934a5f688a172c" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETBUFFERSIZE&nbsp;&nbsp;&nbsp;9592          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set kernel buffer size. <p>This IOCTL is used to set a new size of the circular buffer associated with an instance of NPF. When a BIOCSETBUFFERSIZE command is received, the driver frees the old buffer, allocates the new one and resets all the parameters associated with the buffer in the OPEN_INSTANCE structure. The currently buffered packets are lost. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00055">55</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="gc8b51f8abae12f57a2ea8e8e4c0cd53c"></a><!-- doxytag: member="ioctls.h::BIOCSETDUMPFILENAME" ref="gc8b51f8abae12f57a2ea8e8e4c0cd53c" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETDUMPFILENAME&nbsp;&nbsp;&nbsp;9029          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set the name of a the file used by kernel dump mode. <p>This command opens a file whose name is contained in the IOCTL buffer and associates it with current NPf instance. The dump thread uses it to copy the content of the circular buffer to file. If a file was already opened, the driver closes it before opening the new one. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00129">129</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="g3205efe3271948f253c4da5abf0e12c6"></a><!-- doxytag: member="ioctls.h::BIOCSETDUMPLIMITS" ref="g3205efe3271948f253c4da5abf0e12c6" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETDUMPLIMITS&nbsp;&nbsp;&nbsp;9034          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: Set the dump file limits. <p>This IOCTL sets the limits (maximum size and maximum number of packets) of the dump file created when the driver works in dump mode. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00164">164</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="g31c73f09a27bb38a6040a5841096576a"></a><!-- doxytag: member="ioctls.h::BIOCSETEVENTHANDLE" ref="g31c73f09a27bb38a6040a5841096576a" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETEVENTHANDLE&nbsp;&nbsp;&nbsp;7920          </td>        </tr>      </table></div><div class="memdoc"><p>This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level. <p>Parameter: HANDLE Parameter size: sizeof(HANDLE). If the caller is 32 bit, the parameter size is 4 bytes, even if sizeof(HANDLE) at kernel level is 8 bytes. That's why in this IOCTL code handler we detect a 32bit calling process and do the necessary thunking.<p>TODO GV:I will go to hell for this ugly IOCTL definition. We should use CTL_CODE!! <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00190">190</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="gf85f500f68404076ac60ffe6e08818da"></a><!-- doxytag: member="ioctls.h::BIOCSETF" ref="gf85f500f68404076ac60ffe6e08818da" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETF&nbsp;&nbsp;&nbsp;9030          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set packet filtering program. <p>This IOCTL sets a new packet filter in the driver. Before allocating any memory for the new filter, the bpf_validate() function is called to check the correctness of the filter. If this function returns TRUE, the filter is copied to the driver's memory, its address is stored in the bpfprogram field of the OPEN_INSTANCE structure associated with current instance of the driver, and the filter will be applied to every incoming packet. This command also empties the circular buffer used by current instance to store packets. This is done to avoid the presence in the buffer of packets that do not match the filter. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00067">67</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="gbf9a4779fd5281607510edc8b5d766dd"></a><!-- doxytag: member="ioctls.h::BIOCSETOID" ref="gbf9a4779fd5281607510edc8b5d766dd" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSETOID&nbsp;&nbsp;&nbsp;0x80000000          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set an OID value. <p>This IOCTL is used to perform an OID set operation on the NIC driver. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00113">113</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="ga827e3441e3f84abc7df5e30fcee96d1"></a><!-- doxytag: member="ioctls.h::BIOCSMINTOCOPY" ref="ga827e3441e3f84abc7df5e30fcee96d1" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSMINTOCOPY&nbsp;&nbsp;&nbsp;7414          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call. <p>This command sets the <a class="el" href="struct__OPEN__INSTANCE.html#263f7d6f5db5625541d275380685f0b1">OPEN_INSTANCE::MinToCopy</a> member. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00106">106</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="gd1012b82859d09864d246b1fa99d48d6"></a><!-- doxytag: member="ioctls.h::BIOCSMODE" ref="gd1012b82859d09864d246b1fa99d48d6" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSMODE&nbsp;&nbsp;&nbsp;7412          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set working mode. <p>This IOCTL can be used to set the working mode of a NPF instance. The new mode, received by the driver in the buffer associated with the IOCTL command, can be <a class="el" href="group__wpcap__def.html#gc93c0a6ad1d2a3143b1115bdab3ac04d" title="Capture mode, to be used when calling pcap_setmode().">MODE_CAPT</a> for capture mode (the default), <a class="el" href="group__wpcap__def.html#g503326906a62e96c147ae6af31fb5659" title="Statistical mode, to be used when calling pcap_setmode().">MODE_STAT</a> for statistical mode or <a class="el" href="group__NPF__include.html#g89853f93dc8cc890b0665629d16d2831" title="Kernel dump working mode.">MODE_DUMP</a> for dump mode. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00091">91</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="g327015c2b2e347212b571d1fa3aa2f54"></a><!-- doxytag: member="ioctls.h::BIOCSRTIMEOUT" ref="g327015c2b2e347212b571d1fa3aa2f54" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSRTIMEOUT&nbsp;&nbsp;&nbsp;7416          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set the read timeout. <p>This command sets the maximum timeout after which a read is released, also if no data packets were received. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00082">82</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p><a class="anchor" name="g1436997ce2947bbbe22b5400254438a1"></a><!-- doxytag: member="ioctls.h::BIOCSWRITEREP" ref="g1436997ce2947bbbe22b5400254438a1" args="" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">#define BIOCSWRITEREP&nbsp;&nbsp;&nbsp;7413          </td>        </tr>      </table></div><div class="memdoc"><p>IOCTL code: set number of physical repetions of every packet written by the app. <p>Sets the number of times a single write call must be repeated. This command sets the <a class="el" href="struct__OPEN__INSTANCE.html#f6b5b0a348f7a40d795b554b0eceed73">OPEN_INSTANCE::Nwrites</a> member, and is used to implement the 'multiple write' feature of the driver. <p>Definition at line <a class="el" href="ioctls_8h-source.html#l00099">99</a> of file <a class="el" href="ioctls_8h-source.html">ioctls.h</a>.</p></div></div><p></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 + -