Sure, use pcap_compile() and check for errors, then apply your filter
with pcap_setfilter().
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
use a filter string something like "!= ether src xx:xx:xx:xx:xx:xx" or
"ether src != xx:xx:xx:xx:xx:xx"
Regards
Helmut
fly_2u schrieb:
Thanks Helmut. Could the filter be positioned on the Driver layer? If
could, how to write the filter string and then pcap_setfilter(...)?
??2010-03-01 20:01:36??"HelmutVaupotitsch"<[email protected]> ??????
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.
Best regards
Helmut
fly_2u schrieb:
Hi experts,
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!
BR.
Sam
------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users
--
----------------------------------------------------------------
Ing. Helmut Vaupotitsch Phone: +43 (0)3133 3780 16
ITEC Tontechnik und Fax: +43 (0)3133 3780 9
Industrieelektronik GmbH E-mail: [email protected]
A-8200 Lassnitzthal 300 URL: http://www.itec-audio.com
----------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users
--
----------------------------------------------------------------
Ing. Helmut Vaupotitsch Phone: +43 (0)3133 3780 16
ITEC Tontechnik und Fax: +43 (0)3133 3780 9
Industrieelektronik GmbH E-mail: [email protected]
A-8200 Lassnitzthal 300 URL: http://www.itec-audio.com
----------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users