1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-24 02:46:36 +01:00
fastnetmon-rewritten/docs/FreeBSD_INSTALL.md
2015-06-25 19:24:31 +03:00

1.5 KiB

FreeBSD 9, 10, 11 and Dragonfly BSD 4.0

Install dependencies:

pkg install cmake git ncurses boost-all log4cpp

Update linker paths:

/etc/rc.d/ldconfig restart
mkdir /usr/local/src
cd /usr/local/src
git clone https://github.com/FastVPSEestiOu/fastnetmon.git
cd fastnetmon/src
mkdir build
cd build
cmake ..
make

Or you can try native FreeBSD port (will be added to port tree soon):

pkg install cmake git ncurses boost-all log4cpp
/etc/rc.d/ldconfig restart

mkdir /usr/local/src
cd /usr/local/src
git clone https://github.com/FastVPSEestiOu/fastnetmon.git
cd fastnetmon/src/FreeBSD_port/
make makesum
make install 

And please switch capture interface to promisc mode.

Add into /etc/rc.conf following line (for applying this option at boot time):

ifconfig_ix1="up promisc"

And switch it with ifconfig for already running system:

ifconfig ix1 promisc

Please put your networks in CIDR format here: /usr/local/etc/networks_list.

For netmap support you may need compile kernel manually with this manual.

On 32 bit FreeBSD you could hit this issue:

fastnetmon.cpp:(.text+0xc979): undefined reference to `__sync_fetch_and_add_8'

It could be fixed by this patch.

Please add this lines before line "post-patch" line:

.include <bsd.port.pre.mk>

# Port requires 64 bit atomics
#.if ${ARCH} == i386 && empty(MACHINE_CPU:Mi586)
CFLAGS+= -march=i586
#.endif

And replace last string .include <bsd.port.mk> by .include <bsd.port.post.mk>.