
scott at renfro
Nov 8, 2001, 8:01 PM
Post #1 of 2
(124 views)
Permalink
|
|
ntop win32-mingw patch and notes
|
|
Enclosed is a patch to ntop-01-11-06.tgz that can be used to build ntop on win2k with the MinGW compiler suite (gcc linked against the MS runtime). Since the patch shouldn't interfere with other platforms (though it does need to be tested under non-mingw32 builds), it may be worth checking in to the repository. The remainder of this note describes how to build ntop on win2k using the MinGW toolchain (MinGW allows you to build native win32 binaries linked against the Microsoft runtime and not the cygwin runtime). This was last tested against the 2001-11-06 snapshot from http://snapshot.ntop.org. Prerequistes: 1) MinGW (available from http://www.mingw.org) This was tested against MinGW-1.1.tar.gz 2) GNU Make (available from http://www.mingw.org) This was tested with GNU Make v3.79.1, (comes with MinGW-1.1) 2) WinPCAP developer's pack (available from http://netgroup-serv.polito.it/winpcap/install/bin/WPdpack.zip) This was tested with Release 2.2 of WinPcap 3) gdbm for win32/mingw (from http://sourceforge.net/projects/mingwrep) This was tested with gdbm-1.8.0-20010430.zip 4) ntop (available from http://www.ntop.org) This was tested with http://snapshot.ntop.org/tgz/ntop-01-11-06.tgz Steps 1) Install all prerequisites 2) Apply the patch distributed with these notes. This patch adds the appropriate Makefiles and redefines a few preprocessor conditionals to values more appropriate for MinGW. 2) Edit the ntop/Makefile.mingw and fill in the following values: INC_GDBM (where the gdbm header files can be found) INC_WPDPACK (where the winpcap header files can be found) LIB_GDBM (where libgdbm.a is found) LIB_WPDPACK (where libpcap.a is found) If you're using a separate gdchart, gd, libpng, or libz, you'll also need to change the include and library paths for these as well. 3) Build the sub-components (starting from the ntop-current directory) 3a) Build zlib cd gdchart0.94c/zlib1.1.3 make -f Makefile.mingw cd ../.. 3b) Build libpng cd gdchart0.94c/gd-1.8.3/libpng-1.0.8 make -f scripts/makefile.mingw cd ../../../ 3c) Build gd cd gdchart0.94c/gd-1.8.3 make -f Makefile.mingw cd ../.. 3d) Build gdchart cd gdchart0.94c make -f Makefile.mingw 4) Build ntop itself cd ntop make -f Makefile.mingw 5) Package ntop and the dependent files Into the install directory, copy ntop.exe and the html subdirectory hierarchy. Ensure that the appropriate DLL's are in your path. For this build, that includes libgdbm-2.dll and wpcap.dll. 6) Use it Execute ntop.exe from the install directory. You can get command line help by running ntop.exe -h cheers, --Scott -- Scott Renfro <scott [at] renfro>
|