Thanks GV, Ill try it out<br><br>Best Regards,<br><br>Xavier<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">Gianluca Varenni</b> <<a href="mailto:gianluca.varenni@cacetech.com">
gianluca.varenni@cacetech.com</a>><br>Date: Sep 15, 2007 7:32 AM<br>Subject: Re: I plead you Please Help me!!!!!!!!!!!!!!!<br>To: Varuna De Silva <<a href="mailto:varunax@gmail.com">varunax@gmail.com</a>><br><br>
</span>
<div bgcolor="#ffffff"><span class="q">
<div><font size="2"></font> </div>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="varunax@gmail.com" href="mailto:varunax@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Varuna De Silva</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="gianluca.varenni@cacetech.com" href="mailto:gianluca.varenni@cacetech.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
gianluca.varenni@cacetech.com</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Friday, September 14, 2007 5:39
AM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> I plead you Please Help
me!!!!!!!!!!!!!!!</div>
<div><font size="2"></font><br></div><pre>Hello GV,<br><br>I posted this on the winpcap mailing list without any reply, I know you people<br>are busy with the new release of libpcap, but whenever you get a chance please
<br>reply me, I am simply lost, without you peoples' help. </pre></blockquote></span>
<div dir="ltr"><font size="2">I usually answer (some of) the mails on winpcap-users
in my spare time at work, sometimes it happens that I answer every 3-4 days.
Usually sending private mails to me doesn't help much, I usually just forward
them to the winpcap-users or winpcap-bugs mailing list. The reason is that a
private answer to you helps you, only. It doesn't help other people that in the
future might have the same problem. </font></div>
<div dir="ltr"><font size="2"></font> </div>
<div dir="ltr"><font size="2">In any case, below you can find some hints on how to
solve your problem, please forward my answer on the the winpcap mailing lists
:-)</font></div>
<div dir="ltr"><font size="2"></font> </div>
<div dir="ltr"><font size="2">Have a nice day</font></div>
<div dir="ltr"><font size="2">GV</font></div><div><span class="e" id="q_11506e77c94f27ec_3">
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div><font size="2"></font> </div>
<div><font size="2"></font><font size="2"></font><br><br>We need to add support
for our device in libpcap, it is a USB device with a<br>custom
driver.<br><br><br> - I am in the Windows platform & Working with VS2005
(C++)<br> - I have downloaded WinPcap and compiled the packet.dll (Though
not<br> used) and then wpcap.dll from source successfully<br> - The build
configuration is Debug_REMOTE<br><br><br>As I was previously educated I wrote
my own program with including<br>pcap.hand other<br>necessary headers for the
driver. Within it I gave my device the name<br>"usb_ss7_if".<br>And next I
want to call the pcap_open_live() in libpcap.<br><br>What I did In my
program<br>I wrote my own program usb.c in VS2005 in a new project.<br>This
had the initialization of the device name and I
called<br>pcap_open_live().<br>I linked the wpcap.lib (and other necessary
libraries for the driver) in<br>winpcap\wpcap\LIB which is refreshed every
time I build wpcap entire<br>solution<br><br>What I did to
Pcap-win32.c<br><br> - I changed the project properties to include my own
preprocesser<br> directive HAVE_USBSS7_API in project window<br> - I
changed the pcap_open_live() in this c file as below
<br><br><br>pcap_open_live(const char *device, int snaplen, int promisc, int
to_ms, char<br>*ebuf)<br>{<br> register pcap_t *p;<br> NetType
type;<br><br><br>#ifdef HAVE_REMOTE<br> char host[PCAP_BUF_SIZE + 1];<br>
char port[PCAP_BUF_SIZE + 1];<br> char name[PCAP_BUF_SIZE + 1];<br> int
srctype;<br><br>#ifdef HAVE_USBSS7_API<br> printf("I am inside the Win32
\n");<br> return
NULL;<br>#endif<br><br>..............................................continued....
<br><br>I added my piece of code inside the HAVE_REMOTE because I am using
that<br>build configuration.<br>I just want to know when I call pcap_open_live
to which program does it get<br>called which has that<br>routine (In windows)
<br><br>I know that the routine gets called since I get an error message when
I call<br>pcap_open_live(),<br>But I doubt if it is the routine in
Pcap-win32.c<br><br>The error message<br>Error opening adapter: The system
cannot find the device specified. (20)<br><br>In seeing this message I just
changed the occurrence of this statement in<br>pcap-win32.c<br><br>if
(p->adapter == NULL)<br> {<br> free(p);<br> /* Adapter
detected but we are not able to open it. Return failure.<br>*/<br>
snprintf(ebuf, PCAP_ERRBUF_SIZE, "Error opening adapter ss7_usb:<br>%s",
pcap_win32strerror());<br> return NULL;<br> }<br><br>Just to see if
it works .... Unfortunately not:-) the error message stays<br>the
same<br></div></blockquote></span></div>
<div dir="ltr"><font size="2">I think the problem is that you are not using the
right version of wpcap.dll. As a matter of facts, the compilation of wpcap
generates two files, wpcap.lib and wpcap.dll. Since from my understanding you
didn't add new exported functions to wpcap.dll, wpcap.lib is always the same.
The important thing is that you need to copy the newly compiled wpcap.dll from
Debug_REMOTE to either the system folder (c:\windows\system32) or to the run
folder of your test application.</font></div><span class="q"><font size="2"></font>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><font size="2"></font>
<div><br><br>The error message is alright cause I have done nothing to open
the device,<br>But I want to know from where I get this message. Is it not
the<br>Pcap-win32.c in winpcap\libpcap<br><br>Does Pcap-win32.c.orig</div> has
anything to do with it ? I didnt mingled with it
<div><font size="2"></font> </div></blockquote></span>
<div dir="ltr"><font size="2">No. That file is a temp file that should have not been
released in the official winpcap sources. It comes from the fact that we
automatically patch some of the original libpcap files to add remote support.
The .orig file comes from that patching procedure.</font></div><span class="q">
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div><font size="2"></font> </div>
<div><font size="2"></font> </div><font size="2"></font></blockquote>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><font size="2"></font><font size="2"></font>
<div><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><br>since that is not is
the project tree.<br><br>Please Help me out with this....<br><br>I have no way
out from here!</div>
<div><font size="2"></font><br><br>I think it is a linking problem associated
with me trying to compile a VC++ </div></blockquote>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<br>project on Visual Studio. But I cant figure it out at all. <br><br>Thank
you all<br><br>Xavier</blockquote></span></div>