netmon, a portable TCP probing program ====================================== $Date: 2013-06-29 18:09:00 +0200 (sam. 29 juin 2013) $ Contents: I. WHAT IS NETMON? II. WHY NETMON? III. LICENCE IV. COMPILATION AND INSTALLATION I. WHAT IS NETMON? netmon is meant to do TCP connection tests at regular intervals, and publish the status in an HTML page. netmon provides a minimalistic web server to render this page in a browser. The check can also be an external program, as per NAGIOS standard. It can raise alerts when a check fails. Compatible with SSL/TLS. II. WHY NETMON? I wanted a minimalistic program compatible with Windows and Linux out of the box. Also I wanted something small and very simple to configure. III. LICENCE See COPYING file that comes along with the package the program belongs to. IV. COMPILATION AND INSTALLATION - Linux The file of name INSTALL, distributed with netmon source files, gives instructions to compile and install the program, using the usual ./configure make make install sequence. This INSTALL file is the one provided by default by autotools. Note about SSL The SSL feature requires SSL development library to be available on the system you compile on. The package name is libssl-dev for DEB packages and openssl-devel (not tested) in RPM ones. For example under Ubuntu, execute: sudo apt-get install libssl-dev - Windows 1) You have to install Mingw and run mingw32-make.exe -f makefile.gcc Mingw is licensed under GPL mostly (as of beginning of 2012), its homepage is http://www.mingw.org 2) openssl must be available for static linking in c:\openssl, see below for instructions as to how to build it. To be more precise: Libs in c:\openssl\lib Includes in c:\openssl\include 3) OBSOLETE - pthreads must be available for static linking in c:\pthreads, see below for instructions as to how to build it. To be more precise: Libs in c:\pthreads Includes in c:\pthreads *IMPORTANT* pthread library is no longer used in netmon, pthread mention is left for history. If openssl (or pthreads for old netmon versions) is not available in the directories mentionned above, see below the paragraph "Mingw makefile generation" to rebuild makefile. Borland was not tested, neither Visual C++. If ever used, one showstopper to fix will be the getopt library, used to parse long options. Mingw makefile generation There is no need to recreate makefile.gcc, if ever you wish to do it any way, you have to install Bakefile and run the batch gen-win-makefile.cmd Bakefile is a system allowing multi-platforms control of compilation, you can find it here: http://www.bakefile.org To build a static version of openssl with mingw, see the following URLs: http://stackoverflow.com/questions/9379363/how-to-build-openssl-with-mingw-in-windows http://www.wagner.pp.ru/~vitus/articles/openssl-mingw.html http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-February/001644.html Instructions: 1. Download the source from there and extract it: http://www.openssl.org/source/openssl-1.0.1e.tar.gz Below we assume you extracted it into C:\openssl 2. Open a MSYS window (execute MinGW\msys\1.0\msys.bat) and cd to /c/openssl 3. Run the command (32 bits) perl Configure mingw no-shared no-asm --prefix=/c/openssl Or (64 bits) perl Configure mingw64 no-shared no-asm --prefix=/c/openssl-x64 4. Run make make install 5. Under the directory you built openssl in, you will find the libraries, example: C:\openssl\lib\libcrypto.a C:\openssl\lib\libssl.a To build a static version of pthreads with mingw, see the following URL: http://www.sourceware.org/pthreads-win32/ *IMPORTANT* pthread library is no longer used in netmon, this note is left here for history. Instructions: 1. Download the source from here and extract it: ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz 2. Open a MSYS window (from MinGW\msys\1.0\msys.bat) 3. Run the command make GC-static The compiled code linked against static libpthreads MUST be compiled with the defined macro -DPTW32_STATIC_LIB You're done!