blob: 10037d3fa1342f6b2278b406a97de440651582df (
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
|
<!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: Sampling methods defined in the pcap_setsampling() function</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 Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Sampling methods defined in the pcap_setsampling() function<br/>
<small>
[<a class="el" href="group__remote__struct.html">Exported Structures and Definitions</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 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#ga1fc3a70120a1188f5ed4cc2af0ff0671">PCAP_SAMP_NOSAMP</a> 0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">No sampling has to be done on the current capture. <a href="#ga1fc3a70120a1188f5ed4cc2af0ff0671"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#ga79bf88faf9851bf82ee30beb302e3b5f">PCAP_SAMP_1_EVERY_N</a> 1</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">It defines that only 1 out of N packets must be returned to the user. <a href="#ga79bf88faf9851bf82ee30beb302e3b5f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#ga5a4ae1f017ece5c1d3b44c8a399d130b">PCAP_SAMP_FIRST_AFTER_N_MS</a> 2</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">It defines that we have to return 1 packet every N milliseconds. <a href="#ga5a4ae1f017ece5c1d3b44c8a399d130b"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga79bf88faf9851bf82ee30beb302e3b5f"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_1_EVERY_N" ref="ga79bf88faf9851bf82ee30beb302e3b5f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PCAP_SAMP_1_EVERY_N 1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>It defines that only 1 out of N packets must be returned to the user. </p>
<p>In this case, the 'value' field of the 'pcap_samp' structure indicates the number of packets (minus 1) that must be discarded before one packet got accepted. In other words, if 'value = 10', the first packet is returned to the caller, while the following 9 are discarded. </p>
<p>Definition at line <a class="el" href="remote-ext_8h_source.html#l00275">275</a> of file <a class="el" href="remote-ext_8h_source.html">remote-ext.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga5a4ae1f017ece5c1d3b44c8a399d130b"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_FIRST_AFTER_N_MS" ref="ga5a4ae1f017ece5c1d3b44c8a399d130b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PCAP_SAMP_FIRST_AFTER_N_MS 2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>It defines that we have to return 1 packet every N milliseconds. </p>
<p>In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting time' in milliseconds before one packet got accepted. In other words, if 'value = 10', the first packet is returned to the caller; the next returned one will be the first packet that arrives when 10ms have elapsed. </p>
<p>Definition at line <a class="el" href="remote-ext_8h_source.html#l00285">285</a> of file <a class="el" href="remote-ext_8h_source.html">remote-ext.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga1fc3a70120a1188f5ed4cc2af0ff0671"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_NOSAMP" ref="ga1fc3a70120a1188f5ed4cc2af0ff0671" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PCAP_SAMP_NOSAMP 0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>No sampling has to be done on the current capture. </p>
<p>In this case, no sampling algorithms are applied to the current capture. </p>
<p>Definition at line <a class="el" href="remote-ext_8h_source.html#l00265">265</a> of file <a class="el" href="remote-ext_8h_source.html">remote-ext.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>
|