<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=gb2312 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16490"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>Sam,</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>there is actually an easier way to do that (if you do
not need to support NT4). Open the device with pcap_open and use the flag <SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span><A
style="COLOR: rgb(26,65,168); FONT-WEIGHT: bold; TEXT-DECORATION: none" class=el
href="group__remote__open__flags.html#g337712d5c8d26a0d984d6bb702d0118d">PCAP_OPENFLAG_NOCAPTURE_LOCAL</A><FONT
size=3 face=Calibri>.</FONT></SPAN></SPAN></FONT></DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span></SPAN></SPAN></FONT> </DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span>The sample UserLevelBridge shows the usage of this
flag.</SPAN></SPAN></FONT></DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span></SPAN></SPAN></FONT> </DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span>Have a nice day</SPAN></SPAN></FONT></DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span>GV</SPAN></SPAN></FONT></DIV>
<DIV><FONT size=3 face=Calibri><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium 'Times New Roman'; WHITE-SPACE: normal; ORPHANS: 2; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="FONT-FAMILY: Verdana, Arial, Helvetica; FONT-SIZE: 13px"
class=Apple-style-span></SPAN></SPAN></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=fly_2u@126.com
href="">fly_2u</A> </DIV>
<DIV><B>Sent:</B> Monday, March 01, 2010 6:01 PM</DIV>
<DIV><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Winpcap-users] Problem about receive the packet sent
by self</DIV></DIV></DIV>
<DIV><BR></DIV>
<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>
<DIV></DIV><BR>ÔÚ2010-03-01 20:01:36£¬"Helmut Vaupotitsch" <<A
title="mailto:hv@itec-audio.com CTRL + Click to follow link"
href="mailto:hv@itec-audio.com">hv@itec-audio.com</A>> дµÀ£º<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; 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 class=moz-txt-link-abbreviated href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A>
<A class=moz-txt-link-freetext title="https://www.winpcap.org/mailman/listinfo/winpcap-users CTRL + Click to follow link" 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></BLOCKQUOTE><BR><BR><SPAN
title=neteasefooter></SPAN>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BODY></HTML>