<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Tahoma
}
</STYLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY class=hmmessage bgColor=#ffffff>
<DIV><FONT face="Courier New">You will need some heuristics to do that. If what
you are interested in is IP traffic, I would probably list the adapters with
their associated IP addresses. In the simple case (a machine with just one wired
or wireless connection), you will get two (or three) adapters and only one of
them will have a (valid) IP address associated to the adapter. And you will pick
that one.</FONT></DIV>
<DIV><FONT face="Courier New">Things get much more complicated if</FONT></DIV>
<DIV><FONT face="Courier New">1. the machine has more than one
adapter</FONT></DIV>
<DIV><FONT face="Courier New">2. (a special case of 1.) the machine has a wired
and a wireless adapter (all the modern laptops have both), and the user switches
often between the adapters (or use both of them at the same time). In this case
you will need to capture from both the adapters.</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">Hope it helps</FONT></DIV>
<DIV><FONT face="Courier New">GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=farhanhbk@hotmail.com href="mailto:farhanhbk@hotmail.com">*farhan
Khan*</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, November 13, 2007 11:29
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] how to auto
detect the interface</DIV>
<DIV><BR></DIV>hi,<BR>i am new user of this mail list, i would like to know
how can i detect which interface is the correct one to capture the packets on
TCP 8080/80 and 1080 etc. I want my application to select approperiate
interface automatically without user's input for the interface.... Is this
possible if yes then please let me know how can i do
that???<BR> <BR> <BR>Regards<BR>Farhan<BR><BR>
<HR>
Windows Live Hotmail and Microsoft Office Outlook – together at last. <A
href="http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033"
target=_new>Get it now!</A>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>