?? group__wpcapfunc.html
字號:
<tr><td class="mdescLeft"> </td><td class="mdescRight">Parse the source string and returns the pieces in which the source can be split. <a href="#g090e0afd3f463b4b60a64c47eddc1ba2"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__wpcap__def.html#g4711d025f83503ce692efa5e45ec60a7">pcap_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g2b64c7b6490090d1d37088794f1f1791">pcap_open</a> (const char *source, int snaplen, int flags, int read_timeout, struct <a class="el" href="structpcap__rmtauth.html">pcap_rmtauth</a> *auth, char *errbuf)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Open a generic source in order to capture / send (WinPcap only) traffic. <a href="#g2b64c7b6490090d1d37088794f1f1791"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">struct <a class="el" href="structpcap__samp.html">pcap_samp</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g84c7d55f5b0e7d545b38d6b8e7bde005">pcap_setsampling</a> (<a class="el" href="group__wpcap__def.html#g4711d025f83503ce692efa5e45ec60a7">pcap_t</a> *p)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Define a sampling method for packet capture. <a href="#g84c7d55f5b0e7d545b38d6b8e7bde005"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">SOCKET </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g5495943cc8262db57f726e2a23f837dd">pcap_remoteact_accept</a> (const char *address, const char *port, const char *hostlist, char *connectinghost, struct <a class="el" href="structpcap__rmtauth.html">pcap_rmtauth</a> *auth, char *errbuf)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Block until a network connection is accepted (active mode only). <a href="#g5495943cc8262db57f726e2a23f837dd"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g6a84e03497f946d61c440696e57e2c95">pcap_remoteact_close</a> (const char *<a class="el" href="wpcap__remote_8htm.html#3c46d79c790748a5942fb43baa6b3073">host</a>, char *errbuf)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Drop an active connection (active mode only). <a href="#g6a84e03497f946d61c440696e57e2c95"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g7b022e0a67f5ff62fd13df5c688d6d82">pcap_remoteact_cleanup</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Clean the socket that is currently used in waiting active connections. <a href="#g7b022e0a67f5ff62fd13df5c688d6d82"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__wpcapfunc.html#g7ee8f666bff537aa457b7c05651cf815">pcap_remoteact_list</a> (char *hostlist, char sep, int size, char *errbuf)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Return the hostname of the host that have an active connection with us (active mode only). <a href="#g7ee8f666bff537aa457b7c05651cf815"></a><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Functions exported by wpcap.dll <hr><h2>Typedef Documentation</h2><a class="anchor" name="gbcba231c099919ecd9300d7160b19878"></a><!-- doxytag: member="funcs/pcap.h::pcap_handler" ref="gbcba231c099919ecd9300d7160b19878" args=")(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef void(* <a class="el" href="group__wpcapfunc.html#gbcba231c099919ecd9300d7160b19878">pcap_handler</a>)(u_char *user, const struct <a class="el" href="structpcap__pkthdr.html">pcap_pkthdr</a> *pkt_header, const u_char *pkt_data) </td> </tr> </table></div><div class="memdoc"><p>Prototype of the callback function that receives the packets. <p>When <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> or <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> are called by the user, the packets are passed to the application by means of this callback. user is a user-defined parameter that contains the state of the capture session, it corresponds to the <em>user</em> parameter of <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> and <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a>. pkt_header is the header associated by the capture driver to the packet. It is NOT a protocol header. pkt_data points to the data of the packet, including the protocol headers. <p>Definition at line <a class="el" href="funcs_2pcap_8h-source.html#l00027">27</a> of file <a class="el" href="funcs_2pcap_8h-source.html">funcs/pcap.h</a>.</p></div></div><p><hr><h2>Function Documentation</h2><a class="anchor" name="ge0dc50910fabbd375fab8a1352a6cf33"></a><!-- doxytag: member="funcs/pcap.h::pcap_breakloop" ref="ge0dc50910fabbd375fab8a1352a6cf33" args="(pcap_t *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pcap_breakloop </td> <td>(</td> <td class="paramtype"><a class="el" href="group__wpcap__def.html#g4711d025f83503ce692efa5e45ec60a7">pcap_t</a> * </td> <td class="paramname"> </td> <td> ) </td> <td></td> </tr> </table></div><div class="memdoc"><p>set a flag that will force <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> or <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> to return rather than looping. <p>They will return the number of packets that have been processed so far, or -2 if no packets have been processed so far. This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, as it merely sets a flag that is checked within the loop. The flag is checked in loops reading packets from the OS - a signal by itself will not necessarily terminate those loops - as well as in loops processing a set of packets returned by the OS. Note that if you are catching signals on UNIX systems that support restarting system calls after a signal, and calling <a class="el" href="group__wpcapfunc.html#ge0dc50910fabbd375fab8a1352a6cf33" title="set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping...">pcap_breakloop()</a> in the signal handler, you must specify, when catching those signals, that system calls should NOT be restarted by that signal. Otherwise, if the signal interrupted a call reading packets in a live capture, when your signal handler returns after calling <a class="el" href="group__wpcapfunc.html#ge0dc50910fabbd375fab8a1352a6cf33" title="set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping...">pcap_breakloop()</a>, the call will be restarted, and the loop will not terminate until more packets arrive and the call completes. <dl class="note" compact><dt><b>Note:</b></dt><dd><a class="el" href="group__wpcapfunc.html#gdf60257f650aaf869671e0a163611fc3" title="Return the next available packet.">pcap_next()</a> will, on some platforms, loop reading packets from the OS; that loop will not necessarily be terminated by a signal, so <a class="el" href="group__wpcapfunc.html#ge0dc50910fabbd375fab8a1352a6cf33" title="set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping...">pcap_breakloop()</a> should be used to terminate packet processing even if <a class="el" href="group__wpcapfunc.html#gdf60257f650aaf869671e0a163611fc3" title="Return the next available packet.">pcap_next()</a> is being used. <a class="el" href="group__wpcapfunc.html#ge0dc50910fabbd375fab8a1352a6cf33" title="set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping...">pcap_breakloop()</a> does not guarantee that no further packets will be processed by <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> or <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a> after it is called; at most one more packet might be processed. If -2 is returned from <a class="el" href="group__wpcapfunc.html#g60ce104cdf28420d3361cd36d15be44c" title="Collect a group of packets.">pcap_dispatch()</a> or <a class="el" href="group__wpcapfunc.html#g6bcb7c5c59d76ec16b8a699da136b5de" title="Collect a group of packets.">pcap_loop()</a>, the flag is cleared, so a subsequent call will resume reading packets. If a positive number is returned, the flag is not cleared, so a subsequent call will return -2 and clear the flag. </dd></dl></div></div><p><a class="anchor" name="ga45a5e1a4ba9925bb3586dcbeec78560"></a><!-- doxytag: member="funcs/pcap.h::pcap_close" ref="ga45a5e1a4ba9925bb3586dcbeec78560" args="(pcap_t *p)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void pcap_close </td> <td>(</td> <td class="paramtype"><a class="el" href="group__wpcap__def.html#g4711d025f83503ce692efa5e45ec60a7">pcap_t</a> * </td> <td class="paramname"> <em>p</em> </td> <td> ) </td> <td></td> </tr> </table></div><div class="memdoc"><p>close the files associated with p and deallocates resources. <p><dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__wpcapfunc.html#gae6abe06e15c87b803f69773822beca8" title="Open a live capture from the network.">pcap_open_live()</a>, <a class="el" href="group__wpcapfunc.html#g91078168a13de8848df2b7b83d1f5b69" title="Open a savefile in the tcpdump/libpcap format to read packets.">pcap_open_offline()</a>, <a class="el" href="group__wpcapfunc.html#g6445eeb76f2757b9fa088b276eea2845" title="Create a pcap_t structure without starting a capture.">pcap_open_dead()</a> </dd></dl></div></div><p><a class="anchor" name="g363bdc6f6b39b4979ddcf15ecb830c5c"></a><!-- doxytag: member="funcs/pcap.h::pcap_compile" ref="g363bdc6f6b39b4979ddcf15ecb830c5c" args="(pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int pcap_compile </td> <td>(</td> <td class="paramtype"><a class="el" href="group__wpcap__def.html#g4711d025f83503ce692efa5e45ec60a7">pcap_t</a> * </td> <td class="paramname"> <em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -