summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/winpcap/docs/html/group__NPF__ioctl.html
blob: 254897431fcde61036d28157adf34a47001c1a70 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!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: NPF I/O control codes</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><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>NPF I/O control codes<br/>
<small>
[<a class="el" href="group__NPF.html">NPF driver internals manual</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga71817d3a52bf0ec819934a5f688a172c">BIOCSETBUFFERSIZE</a>&nbsp;&nbsp;&nbsp;9592</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set kernel buffer size.  <a href="#ga71817d3a52bf0ec819934a5f688a172c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gaf85f500f68404076ac60ffe6e08818da">BIOCSETF</a>&nbsp;&nbsp;&nbsp;9030</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set packet filtering program.  <a href="#gaf85f500f68404076ac60ffe6e08818da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga8ae8be8faa281644d8be1cda38b826bd">BIOCGSTATS</a>&nbsp;&nbsp;&nbsp;9031</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: get the capture stats.  <a href="#ga8ae8be8faa281644d8be1cda38b826bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga327015c2b2e347212b571d1fa3aa2f54">BIOCSRTIMEOUT</a>&nbsp;&nbsp;&nbsp;7416</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set the read timeout.  <a href="#ga327015c2b2e347212b571d1fa3aa2f54"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gad1012b82859d09864d246b1fa99d48d6">BIOCSMODE</a>&nbsp;&nbsp;&nbsp;7412</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set working mode.  <a href="#gad1012b82859d09864d246b1fa99d48d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga1436997ce2947bbbe22b5400254438a1">BIOCSWRITEREP</a>&nbsp;&nbsp;&nbsp;7413</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set number of physical repetions of every packet written by the app.  <a href="#ga1436997ce2947bbbe22b5400254438a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gaa827e3441e3f84abc7df5e30fcee96d1">BIOCSMINTOCOPY</a>&nbsp;&nbsp;&nbsp;7414</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.  <a href="#gaa827e3441e3f84abc7df5e30fcee96d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gabf9a4779fd5281607510edc8b5d766dd">BIOCSETOID</a>&nbsp;&nbsp;&nbsp;0x80000000</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set an OID value.  <a href="#gabf9a4779fd5281607510edc8b5d766dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga5a0ab3231052ff323817e288dab2f127">BIOCQUERYOID</a>&nbsp;&nbsp;&nbsp;0x80000004</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: get an OID value.  <a href="#ga5a0ab3231052ff323817e288dab2f127"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gac8b51f8abae12f57a2ea8e8e4c0cd53c">BIOCSETDUMPFILENAME</a>&nbsp;&nbsp;&nbsp;9029</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set the name of a the file used by kernel dump mode.  <a href="#gac8b51f8abae12f57a2ea8e8e4c0cd53c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gadd9e03a96d297a33d7cee4d750c34eff">BIOCGEVNAME</a>&nbsp;&nbsp;&nbsp;7415</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.  <a href="#gadd9e03a96d297a33d7cee4d750c34eff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gac50830dc08762383dcb203a66e5c853d">BIOCSENDPACKETSNOSYNC</a>&nbsp;&nbsp;&nbsp;9032</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps.  <a href="#gac50830dc08762383dcb203a66e5c853d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gab4d41e91e460bb101ef8ddb622a8e010">BIOCSENDPACKETSSYNC</a>&nbsp;&nbsp;&nbsp;9033</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps.  <a href="#gab4d41e91e460bb101ef8ddb622a8e010"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga3205efe3271948f253c4da5abf0e12c6">BIOCSETDUMPLIMITS</a>&nbsp;&nbsp;&nbsp;9034</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: Set the dump file limits.  <a href="#ga3205efe3271948f253c4da5abf0e12c6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga874d333aca88363bc6fdcb3e8b1af05b">BIOCISDUMPENDED</a>&nbsp;&nbsp;&nbsp;7411</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: Get the status of the kernel dump process.  <a href="#ga874d333aca88363bc6fdcb3e8b1af05b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#gae02ae71d6fe0bfb4b600f8027dc90ba3">BIOCISETLOBBEH</a>&nbsp;&nbsp;&nbsp;7410</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">IOCTL code: set the loopback behavior.  <a href="#gae02ae71d6fe0bfb4b600f8027dc90ba3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__NPF__ioctl.html#ga31c73f09a27bb38a6040a5841096576a">BIOCSETEVENTHANDLE</a>&nbsp;&nbsp;&nbsp;7920</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level.  <a href="#ga31c73f09a27bb38a6040a5841096576a"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gadd9e03a96d297a33d7cee4d750c34eff"></a><!-- doxytag: member="ioctls.h::BIOCGEVNAME" ref="gadd9e03a96d297a33d7cee4d750c34eff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCGEVNAME&nbsp;&nbsp;&nbsp;7415</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: get the name of the event that the driver signals when some data is present in the buffer. </p>
<p>Command used by the application to retrieve the name of the global event associated with a NPF instance. The event is signaled by the driver when the kernel buffer contains enough data for a transfer. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00137">137</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga8ae8be8faa281644d8be1cda38b826bd"></a><!-- doxytag: member="ioctls.h::BIOCGSTATS" ref="ga8ae8be8faa281644d8be1cda38b826bd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCGSTATS&nbsp;&nbsp;&nbsp;9031</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: get the capture stats. </p>
<p>This command returns to the application the number of packets received and the number of packets dropped by an instance of the driver. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00075">75</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga874d333aca88363bc6fdcb3e8b1af05b"></a><!-- doxytag: member="ioctls.h::BIOCISDUMPENDED" ref="ga874d333aca88363bc6fdcb3e8b1af05b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCISDUMPENDED&nbsp;&nbsp;&nbsp;7411</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: Get the status of the kernel dump process. </p>
<p>This command returns TRUE if the kernel dump is ended, i.e if one of the limits set with BIOCSETDUMPLIMITS (amount of bytes or number of packets) has been reached. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00172">172</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae02ae71d6fe0bfb4b600f8027dc90ba3"></a><!-- doxytag: member="ioctls.h::BIOCISETLOBBEH" ref="gae02ae71d6fe0bfb4b600f8027dc90ba3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCISETLOBBEH&nbsp;&nbsp;&nbsp;7410</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: set the loopback behavior. </p>
<p>This IOCTL sets the loopback behavior of the driver with packets sent by itself: capture or drop. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00179">179</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5a0ab3231052ff323817e288dab2f127"></a><!-- doxytag: member="ioctls.h::BIOCQUERYOID" ref="ga5a0ab3231052ff323817e288dab2f127" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCQUERYOID&nbsp;&nbsp;&nbsp;0x80000004</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: get an OID value. </p>
<p>This IOCTL is used to perform an OID get operation on the NIC driver. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00120">120</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="gac50830dc08762383dcb203a66e5c853d"></a><!-- doxytag: member="ioctls.h::BIOCSENDPACKETSNOSYNC" ref="gac50830dc08762383dcb203a66e5c853d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCSENDPACKETSNOSYNC&nbsp;&nbsp;&nbsp;9032</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps. </p>
<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 ignored, i.e. the packets are sent as fast as possible. The <a class="el" href="group__NPF__code.html#ga9a97dd25ae757da4bfed3723a4eb4bce" title="Writes a buffer of raw packets to the network.">NPF_BufferedWrite()</a> function is invoked to send the packets. </p>

<p>Definition at line <a class="el" href="ioctls_8h_source.html#l00146">146</a> of file <a class="el" href="ioctls_8h_source.html">ioctls.h</a>.</p>

</div>
</div>
<a class="anchor" id="gab4d41e91e460bb101ef8ddb622a8e010"></a><!-- doxytag: member="ioctls.h::BIOCSENDPACKETSSYNC" ref="gab4d41e91e460bb101ef8ddb622a8e010" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BIOCSENDPACKETSSYNC&nbsp;&nbsp;&nbsp;9033</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps. </p>
<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#ga9a97dd25ae757da4bfed3723a4eb4bce" title="Writes a buffer of raw packets to the network.">NPF_BufferedWrite()</a> function is invoked to send the packets. </p>

<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>
<a class="anchor" id="ga71817d3a52bf0ec819934a5f688a172c"></a><!-- doxytag: member="ioctls.h::BIOCSETBUFFERSIZE" ref="ga71817d3a52bf0ec819934a5f688a172c" 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>
<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>

<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>
<a class="anchor" id="gac8b51f8abae12f57a2ea8e8e4c0cd53c"></a><!-- doxytag: member="ioctls.h::BIOCSETDUMPFILENAME" ref="gac8b51f8abae12f57a2ea8e8e4c0cd53c" 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>
<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>

<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>
<a class="anchor" id="ga3205efe3271948f253c4da5abf0e12c6"></a><!-- doxytag: member="ioctls.h::BIOCSETDUMPLIMITS" ref="ga3205efe3271948f253c4da5abf0e12c6" 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>
<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>

<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>
<a class="anchor" id="ga31c73f09a27bb38a6040a5841096576a"></a><!-- doxytag: member="ioctls.h::BIOCSETEVENTHANDLE" ref="ga31c73f09a27bb38a6040a5841096576a" 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>
<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>
<p>TODO GV:I will go to hell for this ugly IOCTL definition. We should use CTL_CODE!! </p>

<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>
<a class="anchor" id="gaf85f500f68404076ac60ffe6e08818da"></a><!-- doxytag: member="ioctls.h::BIOCSETF" ref="gaf85f500f68404076ac60ffe6e08818da" 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>
<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>

<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>
<a class="anchor" id="gabf9a4779fd5281607510edc8b5d766dd"></a><!-- doxytag: member="ioctls.h::BIOCSETOID" ref="gabf9a4779fd5281607510edc8b5d766dd" 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>
<p>This IOCTL is used to perform an OID set operation on the NIC driver. </p>

<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>
<a class="anchor" id="gaa827e3441e3f84abc7df5e30fcee96d1"></a><!-- doxytag: member="ioctls.h::BIOCSMINTOCOPY" ref="gaa827e3441e3f84abc7df5e30fcee96d1" 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>
<p>This command sets the <a class="el" href="struct__OPEN__INSTANCE.html#a263f7d6f5db5625541d275380685f0b1">OPEN_INSTANCE::MinToCopy</a> member. </p>

<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>
<a class="anchor" id="gad1012b82859d09864d246b1fa99d48d6"></a><!-- doxytag: member="ioctls.h::BIOCSMODE" ref="gad1012b82859d09864d246b1fa99d48d6" 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>
<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#gac93c0a6ad1d2a3143b1115bdab3ac04d" 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#ga503326906a62e96c147ae6af31fb5659" 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#ga89853f93dc8cc890b0665629d16d2831" title="Kernel dump working mode.">MODE_DUMP</a> for dump mode. </p>

<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>
<a class="anchor" id="ga327015c2b2e347212b571d1fa3aa2f54"></a><!-- doxytag: member="ioctls.h::BIOCSRTIMEOUT" ref="ga327015c2b2e347212b571d1fa3aa2f54" 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>
<p>This command sets the maximum timeout after which a read is released, also if no data packets were received. </p>

<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>
<a class="anchor" id="ga1436997ce2947bbbe22b5400254438a1"></a><!-- doxytag: member="ioctls.h::BIOCSWRITEREP" ref="ga1436997ce2947bbbe22b5400254438a1" 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>
<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#af6b5b0a348f7a40d795b554b0eceed73">OPEN_INSTANCE::Nwrites</a> member, and is used to implement the 'multiple write' feature of the driver. </p>

<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>
</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>