📄 group__remote__samp__methods.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>WinPcap: Sampling methods defined in the pcap_setsampling() function</title><link href="style.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</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> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div><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></td></tr><tr><td colspan="2"><br><h2>Defines</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#g1fc3a70120a1188f5ed4cc2af0ff0671">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="#g1fc3a70120a1188f5ed4cc2af0ff0671"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#g79bf88faf9851bf82ee30beb302e3b5f">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="#g79bf88faf9851bf82ee30beb302e3b5f"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__remote__samp__methods.html#g5a4ae1f017ece5c1d3b44c8a399d130b">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="#g5a4ae1f017ece5c1d3b44c8a399d130b"></a><br></td></tr></table><hr><h2>Define Documentation</h2><a class="anchor" name="g79bf88faf9851bf82ee30beb302e3b5f"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_1_EVERY_N" ref="g79bf88faf9851bf82ee30beb302e3b5f" 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>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>Definition at line <a class="el" href="remote-ext_8h-source.html#l00272">272</a> of file <a class="el" href="remote-ext_8h-source.html">remote-ext.h</a>.</div></div><p><a class="anchor" name="g5a4ae1f017ece5c1d3b44c8a399d130b"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_FIRST_AFTER_N_MS" ref="g5a4ae1f017ece5c1d3b44c8a399d130b" 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>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>Definition at line <a class="el" href="remote-ext_8h-source.html#l00282">282</a> of file <a class="el" href="remote-ext_8h-source.html">remote-ext.h</a>.</div></div><p><a class="anchor" name="g1fc3a70120a1188f5ed4cc2af0ff0671"></a><!-- doxytag: member="remote-ext.h::PCAP_SAMP_NOSAMP" ref="g1fc3a70120a1188f5ed4cc2af0ff0671" 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>In this case, no sampling algorithms are applied to the current capture. <p>Definition at line <a class="el" href="remote-ext_8h-source.html#l00262">262</a> of file <a class="el" href="remote-ext_8h-source.html">remote-ext.h</a>.</div></div><p><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-2007 CACE Technologies. All rights reserved.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -