Argus on Windows
Frenky via Argus-info
argus-info at lists.andrew.cmu.edu
Tue May 3 08:13:56 EDT 2016
==================== Question ================
I need to install argus on Windows 10 for my project.
The installation consists of 2 parts:
1) ./configure
2) make
I have some issue with "./configure", because it can not find libpcap
libraries.
Below this, you can find a list of steps, which I have alredy done,
but with out success. Also you can find original install file from
argus called "INSTALL" in attachment.
-Does anybody know, where problem is?
-Shoud I build the WpdPack or just unzip?
-If I should build, how can I build? (problem with "-mno-cygwin")
-If not, what is wrong?
Thanks a lot!
František Střasák
CTU FEE, Czech republic, Prague
==================== My list of steps for installing Argus =================
---------------------------------------
--------- My requirements--------------
Operating system: Windows 10 (64bit)
Downloaded Argus: argus-3.0.8.1
Cygwin: cygwin 2.873 (32bit)
Inside the cygwin is: gcc5
---------------------------------------
---------------------------------------
I folowed argus installation file, where are information for linux
besides fow windows as well.
This is part for windows: (The entire file is in attachment)
"
CYGWIN
Argus has been ported to Cygwin, the RedHat Linux environment for Windows.
Cygwin can be found at http://www.cygwin.com. Install the latest version
of Cygwin, modifying the default install to include the
developement support.
As noted above, you will need bison and flex and optionally tcpwrappers,
which are available for Cygwin.
On CYGWIN, the libpcap function is provided by the WinPcap
Developers Pack.
The current version can be found at:
http://www.winpcap.org/devel.htm
Place the unzipped WpdPack folder in the same directory that you
untared argus, and the argus ./configure script will find it
and do the right thing. At this point, to make argus:
% ./configure
% make
That should make an argus binary that can be installed as a Windows
service, using the cygrunsrv() program.
Because interface names are so difficult to use on Windows, the Cygwin
port of argus allows you to specify an index for the interface you want
to monitor. By running argus without an interface specification, argus
will print out the available interfaces, with thier indexes. Use the
index number on the command line, or in the argus.conf file.
To setup argus as a system service under CYGWIN, use the cygrunsvc()
program. Argus will write its output to /var/log/argus.log, so check
there is you have any problems.
"
Works successfuly:
1. downloading and installing flex and bison => it is ok...during
argus installation configuration is able to find it.
Problems:
1. Problem with WinPcap => Argus canot find it during installation.
2. tcp_wrappers is downloaded on my cygwin => Argus canot find it
during installation.
My few last line from output, where is checked libpcap:
"
.
.
checking for local tcp_wrappers library... not found
checking for system tcp_wrappers library... checking tcpd.h
usability... no
checking tcpd.h presence... no
checking for tcpd.h... no
checking for local pcap library... not found
checking for pcap-config... no
checking for main in -lpcap... no
not found
checking for main in -lpcap... (cached) no
checking for local wpcap library... no
configure: error: see the INSTALL doc for more info
"
====== WinPcap =====
1. From http://www.winpcap.org/devel.htm I download WinPcap (it is
.exe file, which install some library).
2. According the argus install file I downloaded "WinPcap Developers
Pack" and I unzipped WpdPack folder in the same directory that I
untared argus, but argus ./configuration can not find it.
3. So I tried to find, if I should build the WpdPack. (It is not
written in argus install file, if it should be build (There is just:
"download and unzip")).
I found this solution for build WpdPack:
(http://stackoverflow.com/questions/2396251/help-installing-libpcap-on-cygwin)
"
Setup Winpcap
1.
Download and unzip the pack. We will use for this example
WpdPack_4_0_1.zip.
Copy libraries like this:
WpdPack\Lib\libpacket.a to cygwin\lib\
WpdPack\Lib\libwpcap.a to cygwin\lib\
Create a folder cygwin\usr\include\pcap\
Copy all headers from WpdPack\Include to cygwin\usr\include\winpcap\
Be sure you have installed Winpcap libraries and that they are in
your path by typing:
2.
which packet.dll
which wpcap.dll
For me they are in /cygdrive/c/WINDOWS/system32/
3.
Building example using Cygwin
Open a cygwin prompt to WpdPack\Examples-pcap\basic_dump\ and execute:
basic_dump:
CFLAGS="-g -Wall -mno-cygwin -I /usr/include/pcap"
LIBS="-lwpcap"
PROG="basic_dump"
gcc $CFLAGS -c $PROG.c
gcc $CFLAGS -o $PROG.exe $PROG.o $LIBS
./$PROG.exe
basic_dump_ex:
CFLAGS="-g -Wall -mno-cygwin -I /usr/include/pcap"
LIBS="-lwpcap"
PROG="basic_dump_ex"
gcc $CFLAGS -c $PROG.c
gcc $CFLAGS -o $PROG.exe $PROG.o $LIBS
./$PROG.exe
iflist:
CFLAGS="-g -Wall -mno-cygwin -I /usr/include/pcap"
LIBS="-lwpcap"
PROG="iflist"
gcc $CFLAGS -c $PROG.c
gcc $CFLAGS -o $PROG.exe $PROG.o $LIBS
./$PROG.exe
pcap_filter (and others):
I think you can catch the pattern ;) Only replace PROG=... by the
program name and it should compile.
UDPdump:
CFLAGS="-g -Wall -mno-cygwin -I /usr/include/pcap"
LIBS="-lwpcap -lwsock32"
PROG="UDPdump"
gcc $CFLAGS -c $PROG.c
gcc $CFLAGS -o $PROG.exe $PROG.o $LIBS
./$PROG.exe
"
First and second steps were ok. However third step about building does
not work. The problem is with "-mno-cygwin" because if I try to
compile this:
"
CFLAGS="-g -Wall -mno-cygwin -I /usr/include/pcap"
LIBS="-lwpcap"
PROG="basic_dump"
gcc $CFLAGS -c $PROG.c
gcc $CFLAGS -o $PROG.exe $PROG.o $LIBS
./$PROG.exe
"
It gives me:
"gcc: error: unrecognized command line option ‘-mno-cygwin’"
First I found out, that I could do by "min-gw", which could provide to
me compiling without "-mno-cygwin".
1. I compile with "-mno-cygwin". It says, that it does not know it.
2. With out "-mno-cygwin", nothing
After more searching, I found out, that "-mno-cygwin" was in gcc3 and
now in my cygwin32 is gcc5. And I could not switch to gcc3. If I look
at to cygwin installer,
there was no old version gcc for installation.
I could find, that in newer versions gcc I should use intead of
"-mno-cygwin" just "mingw". However it does not work, it gives me:
"gcc: error: mingw: No such file or directory".
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: INSTALL
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20160503/218a1426/attachment.ksh>
More information about the argus
mailing list