Compiling rpcapd for linux

Several years ago, I compiled rpcapd for linux. To achieve it, I had to comment the win32 specific code, so it compiled on linux.

I recently tried to compile the latest version, and it doesn’t need modifications anymore to successfully compile.

Here is a quick howto, based on debian 5:

Install the required tools

 apt-get install bison flex

Download and unzip winpcap

 wget http://www.winpcap.org/install/bin/WpcapSrc_4_1_2.zip
 unzip WpcapSrc_4_1_2.zip
 cd winpcap/wpcap/libpcap
 chmod +x configure runlex.sh

Configure libpcap to compile statically…

 CFLAGS=-static ./configure

…and compile

 make
 cd rpcapd/

edit the Makefile and add -static to CFLAGS, and finally

 make

Downloads:

amd64: rpcapd-4.1.2-amd64.gz
i386: rpcapd-4.1.2-i386.gz