Installing winpcap and configure it with cygwin


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Installing winpcap and configure it with cygwin
# 1  
Old 04-04-2016
Installing winpcap and configure it with cygwin

When I put the ./configure command in my Cygwin terminal to compile a source code program , I got this error :

ERROR! Libpcap library/headers not found.
TCPDUMP/LIBPCAP public repository is a good place to fetch one
if libpcap library is installed, use the --with-libpcap-* options
to specify pathes to include and library files locations.

So , because I have windows xp as an operating system , I downloaded winpcap from this link :

WinPcap · Developer Resources

I extracted it to Cygwin directory which is C:\cygwin , then followed this link to configure winpcap with cygwin :

help installing libpcap on cygwin - Stack Overflow

In the second link , someone talked about installing some libraries :

"

  1. Be sure you have installed Winpcap libraries and that they are in your path by typing:
    which packet.dll which wpcap.dll
because I do not have both dll , I downloaded both of them from this link :


wpcap.dll download missing file - DllDump


then put them in C:\WINDOWS\system32 .Moreover , I did exactly what second link said :


  1. Copy libraries like this:
    • WpdPack\Lib\libpacket.a to cygwin\lib\
    • WpdPack\Lib\libwpcap.a to cygwin\lib\
  2. Create a folder cygwin\usr\include\pcap\
  3. Copy all headers from WpdPack\Include to cygwin\usr\include\winpcap\
  4. Be sure you have installed Winpcap libraries and that they are in your path by typing:
    which packet.dll which wpcap.dll
But when I followed the rest which is :




Building example using Cygwin
Open a cygwin prompt to WpdPack\Examples-pcap\basic_dump\ and execute:
basic_dump:


and tried to execute the basic_dump, basic_dump_ex and iflist commands , I got basic_dump : command not found
basic_dump_ex : command not found
iflist : command not found


So I added path C:\cygwin\WpdPack\Examples-pcap\basic_dump in windows environment variable

but to my surprise I still got command not found when I run the command above
What should I do ? or what I am missing ?











# 2  
Old 04-04-2016
Try this:-
Open up CygWin.
From the prompt type:-

echo $PATH

You will notice the PATH contains nothing like your...

C:\cygwin\WpdPack\Examples-pcap\basic_dump

...inside it, instead will look someting like:-

......:/cygdrive/c/cygwin/WpdPack/Examples-pcap/basic_dump......

If you don't have something like this somewhere in CygWin's PATH then you might need to reboot XP to ensure the correct Windows PATH is initialised...

Also try from the correct directory:-

./basic_dump
# 3  
Old 04-04-2016
I put the WpdPack folder outside Cygwin in C:\ then I added its path to windows

like this : C:\WpdPack\Examples-pcap\basic_dump environment after that I

reboot my computer and run the command :

echo $PATH and this is what I got so far :

/cygdrive/c/WpdPack/Examples-pcap/basic_dump

then I tried to run :

./basic_dump

However it did not work :

-bash: ./basic_dump: No such file or directory

and with this command

basic_dump

-bash: basic_dump: command not found

I am stuck Smilie
# 4  
Old 04-05-2016
Hi steve120...

Right so the directory/folder/drawer exists.
From the fact the you have already tried './basic_dump' then it probably is not there; however, assuming you are using CygWin......

Have you listed the directory to see if the executable exists?
(Note - IF it exists, assuming it is NOT a batch file, it WILL have the extension <file>.exe .)

cd /cygdrive/c/WpdPack/Examples-pcap/basic_dump

ls -l basic_dump.*

If it does show up then check 'rwx' access rights.
(Also check directory, (per level), access rights too.)

If it doesn't then use 'find' to search for it.

cd /cygdrive/c/WpdPack/

find . -name "basic_dump.*"

Hope this helps...
# 5  
Old 04-05-2016
Hello wisecracker and thank you for your reply

Quote:
Have you listed the directory to see if the executable exists?
I listed all the files in this directory /cygdrive/c/WpdPack/Examples-pcap/basic_dump and this is what I got :

basic_dump.c basic_dump.dsp basic_dump.dsw basic_dump.vcproj GNUmakefile

As you can see there is NO basic_dump with .exe extension

the command : ls -l basic_dump.*
gives me this :

-rwxr-x---+ 1 Administrator None 2737 Dec 23 2008 basic_dump.c
-rwxr-x---+ 1 Administrator None 4558 May 20 2005 basic_dump.dsp
-rwxr-x---+ 1 Administrator None 543 May 20 2005 basic_dump.dsw
-rwxr-x---+ 1 Administrator None 7671 Jul 24 2009 basic_dump.vcproj

Quote:
If it doesn't then use 'find' to search for it


these commands :
cd /cygdrive/c/WpdPack/
find . -name "basic_dump.*"
give me this result:

./Examples-pcap/basic_dump/basic_dump.c
./Examples-pcap/basic_dump/basic_dump.dsp
./Examples-pcap/basic_dump/basic_dump.dsw
./Examples-pcap/basic_dump/basic_dump.vcproj
./Examples-remote/misc/basic_dump.c
./Examples-remote/misc/basic_dump.dsp
./Examples-remote/misc/basic_dump.vcproj

Moreover , I looked for an .exe file in all the folder of WpdPack but I could not find any file with .exe extension nothing special , the problem still persists Smilie



# 6  
Old 04-05-2016
Hi steve120...

This is a Visual Studio, (Visual C by the looks of things), project and well beyond my knowledge. I have never used Visual Studio so I can't help...

I might be better to ask in Windows forums or try to obtain the full source code for the UNIX like format so that the gcc suite can be used to compile the source...

I will have to back off now and let you research any Windows Visual Studio forums...
# 7  
Old 04-05-2016
Thank you anyway Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Gcc g++ on cygwin - configure: error: *** A compiler with support for C++11 language features is req

Hi, Apologies if I posted it in a wrong section as it is related to gcc on cygwin. Please move it to appropriate section. I'm trying to compile and build libsigc++-2.10.2 on cygwin with gcc 8.3.0. when I run ./configure, I get this: I couldn't fully understand what does... (13 Replies)
Discussion started by: prvnrk
13 Replies

2. Shell Programming and Scripting

opening new instance of cygwin from withing cygwin

I'm using cygwin on win7, What I would like to do is something like this: cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e I know I can start a new instance using either of these: mintty -e ... cygstart tail ... But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies

3. UNIX for Dummies Questions & Answers

Installing wfdb Java wrap for Cygwin

Basically, when I try swig and wrap into java, then it have something wrong with libtool? (in my attached picture) http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs510.snc3/26778_383195659802_506009802_3679547_3446065_n.jpg... (0 Replies)
Discussion started by: tiller
0 Replies

4. Ubuntu

Re Installing windows XP after installing KUBUNTU

Hi I have dual operating system i.e Win XP and KUBUNTU. Now my windows XP is corrupted and i want to reinstall Win XP. So i just want to know Shall i have to reinstall Linux also or i can only reinstall win xp without affecting linux installation. Thanks Sarbjit (3 Replies)
Discussion started by: sarbjit
3 Replies

5. Programming

cygwin

hello ... i am new with cygwin ... and i want you to help me. ... First of all, i want to determine the steady state stream function in a 2-D duct using a square mesh by using the finite-difference methodology and i want to simulate it....and i read a lot of information at... (1 Reply)
Discussion started by: mostafamagdy
1 Replies

6. UNIX for Dummies Questions & Answers

Cygwin X

I have managed a successful install of Cygwin (after a few tries), and like any sensible person am ignoring the console in favour of the xconsole. I have this set up how I want - tcsh, all hot-keys (including ^z for suspend) and et cetera, but find it awfully slow. Are there any good... (7 Replies)
Discussion started by: fulgura
7 Replies

7. Linux

Installing Firefox and now ended up installing latest glibc

Hi all, I wanted to install the latest version of firefox 2 but it seems when I attempt to install it, it seems to be saying it is looking for c libraries version 2.3? I believe I currently have an older version of the c libraries. I am currently running Sun's JDS Linux 2003. My Mozilla web... (1 Reply)
Discussion started by: scriptingmani
1 Replies

8. UNIX for Dummies Questions & Answers

Cygwin

Hi , I have software CYGWIN . Can i practice for shell script on that? Thanks sam71 (1 Reply)
Discussion started by: sam71
1 Replies
Login or Register to Ask a Question