<DIV>hi Gianluca..</DIV> <DIV>sorry for replying soo late..had exams..</DIV> <DIV>so the code i was using was actually the example given in documentation of winpcap.</DIV> <DIV>and also the problems regarding pcap_if_src_string not identified and others like this were solved when i used remote-ext.h header file...</DIV> <DIV>anyway there was a runtime exception....which i couldn't understand hope u can help..</DIV> <DIV>here is the code i was using..>>></DIV> <DIV> </DIV> <DIV><SPAN class=preprocessor>#include "pcap.h"</SPAN><BR>#include <remote-ext.h><BR>main()<BR>{<BR> <A class=code href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html">pcap_if_t</A> *alldevs;<BR> <A class=code href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html">pcap_if_t</A> *d;<BR> <SPAN class=keywordtype>int</SPAN> i=0;<BR> <SPAN class=keywordtype>char</SPAN> errbuf[<A class=code
href="http://www.winpcap.org/docs/docs32a1/html/group__wpcap__def.html#ga8">PCAP_ERRBUF_SIZE</A>];<BR> <BR> <SPAN class=comment>/* Retrieve the device list from the local machine */</SPAN><BR> <SPAN class=keywordflow>if</SPAN> (<A class=code href="http://www.winpcap.org/docs/docs32a1/html/group__wpcapfunc.html#ga55">pcap_findalldevs_ex</A>(PCAP_SRC_IF_STRING, NULL <SPAN class=comment>/* auth is not needed */</SPAN>, &alldevs, errbuf) == -1)<BR> {<BR> fprintf(stderr,<SPAN class=stringliteral>"Error in pcap_findalldevs_ex: %s\n"</SPAN>, errbuf);<BR> exit(1);<BR> }<BR> <BR> <SPAN class=comment>/* Print the list */</SPAN><BR> <SPAN class=keywordflow>for</SPAN>(d= alldevs; d != NULL; d= d-><A class=code
href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html#o0">next</A>)<BR> {<BR> printf(<SPAN class=stringliteral>"%d. %s"</SPAN>, ++i, d-><A class=code href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html#o1">name</A>);<BR> <SPAN class=keywordflow>if</SPAN> (d-><A class=code href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html#o2">description</A>)<BR> printf(<SPAN class=stringliteral>" (%s)\n"</SPAN>, d-><A class=code href="http://www.winpcap.org/docs/docs32a1/html/structpcap__if.html#o2">description</A>);<BR> <SPAN class=keywordflow>else</SPAN><BR> printf(<SPAN class=stringliteral>" (No description available)\n"</SPAN>);<BR>
}<BR> <BR> <SPAN class=keywordflow>if</SPAN> (i == 0)<BR> {<BR> printf(<SPAN class=stringliteral>"\nNo interfaces found! Make sure WinPcap is installed.\n"</SPAN>);<BR> <SPAN class=keywordflow>return</SPAN>;<BR> }<BR><BR> <SPAN class=comment>/* We don't need any more the device list. Free it */</SPAN><BR> <A class=code href="http://www.winpcap.org/docs/docs32a1/html/group__wpcapfunc.html#ga8">pcap_freealldevs</A>(alldevs);<BR>}<BR></DIV> <DIV> </DIV> <DIV>and the error i got was..</DIV> <DIV>typeload.exception..</DIV> <DIV>could not load pcap assembly from netmonui(that's the name of my project)..</DIV> <DIV>if u need any more details jus tell me,,...</DIV> <DIV>take care..</DIV> <DIV>ashish</DIV><p>
        
        
                <hr size=1>
Jiyo cricket on <a href="http://us.rd.yahoo.com/mail/in/mailcricket/*http://in.sports.yahoo.com/cricket/">Yahoo! India cricket</a>