<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=x-gbk" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Sure, use pcap_compile() and check for errors, then apply your
filter with pcap_setfilter().<br>
Maybe you want to test your filter with wireshark before (not ether src
xx:xx:xx:xx:xx:xx) I didn´t test it, but i think in pcap_compile() you
will have to<br>
use a filter string something like "!= ether src xx:xx:xx:xx:xx:xx" or
"ether src != xx:xx:xx:xx:xx:xx"<br>
<br>
Regards<br>
Helmut</tt><br>
<br>
fly_2u schrieb:
<blockquote
cite="mid:3cc75a.ab31.1271c9b6afd.Coremail.yu_single@163.com"
type="cite">
<div>Thanks Helmut. Could the filter be positioned on the Driver
layer? If could, how to write the filter string and then
pcap_setfilter(...)?<br>
</div>
<br>
ÔÚ2010-03-01 20:01:36£¬"Helmut Vaupotitsch" <a class="moz-txt-link-rfc2396E" href="mailto:hv@itec-audio.com"><hv@itec-audio.com></a> дµÀ£º<br>
<blockquote
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
id="isReplyContent"><small><tt>I just filter out unwanted packets (in
your case, packets sent by your app) by comparing ether.source with the
MAC address of the bound adapter.<br>
<br>
Best regards<br>
Helmut<br>
</tt></small><br>
fly_2u schrieb:
<blockquote
cite="mid:390db1b6.80a8.1270fbb9852.Coremail.fly_2u@126.com"
type="cite">
<div>Hi experts,</div>
<div> There is a problem about use pcap_next_ex(...) to receive
packet in Windows XP SP3. This function will be unexpected to receive
the packet sent by the function pcap_sendpacket(...) in the same port.
And when I use pcap_setdirection(m_pcapHandle, PCAP_D_IN) to set it, it
will return -1, the error info is "Setting direction is not implemented
on this platform". How could I implement the functionality that the
pcap_next_ex(...) don't receive packet sent by pcap_sendpacket? Any
help from you will be highly appreciated. Thanks!</div>
<div> </div>
<div>BR.</div>
<div>Sam</div>
<div> </div>
<br>
<br>
<span title="neteasefooter"></span>
<pre wrap=""><hr size="4" width="90%">
_______________________________________________
Winpcap-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="172">--
----------------------------------------------------------------
Ing. Helmut Vaupotitsch Phone: +43 (0)3133 3780 16
ITEC Tontechnik und Fax: +43 (0)3133 3780 9
Industrieelektronik GmbH E-mail: <a moz-do-not-send="true"
class="moz-txt-link-abbreviated" href="mailto:hv@itec-audio.com">hv@itec-audio.com</a>
A-8200 Lassnitzthal 300 URL: <a moz-do-not-send="true"
class="moz-txt-link-freetext" href="http://www.itec-audio.com/">http://www.itec-audio.com</a>
----------------------------------------------------------------</pre>
</blockquote>
<br>
<br>
<span title="neteasefooter"></span>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Winpcap-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a>
<a class="moz-txt-link-freetext" href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="172">--
----------------------------------------------------------------
Ing. Helmut Vaupotitsch Phone: +43 (0)3133 3780 16
ITEC Tontechnik und Fax: +43 (0)3133 3780 9
Industrieelektronik GmbH E-mail: <a class="moz-txt-link-abbreviated" href="mailto:hv@itec-audio.com">hv@itec-audio.com</a>
A-8200 Lassnitzthal 300 URL: <a class="moz-txt-link-freetext" href="http://www.itec-audio.com">http://www.itec-audio.com</a>
----------------------------------------------------------------</pre>
</body>
</html>