-
Notifications
You must be signed in to change notification settings - Fork 329
Building
sudo apt-get install build-essential libssl-dev libpcap-dev libcurl4-openssl-dev
Embedded within the windows/
subdirectory.
Before building Joy, you must install the OpenSSL development headers. Run the following command to determine what version of OpenSSL you have:
openssl version
Download the appropriate tarball from openssl.org, extract it and prepare the header files.
You need the headers for OpenSSL 0.9.8zh.
curl -o openssl-0.9.8zh.tar.gz https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz
Once you have downloaded the OpenSSL tarball, extract it and run the configuration script.
tar zxf openssl-0.9.8zh.tar.gz
cd openssl-0.9.8zh
./config
If you use MacPorts or Brew, you might have a newer OpenSSL version. For example, for OpenSSL 1.0.2l, run the following:
curl -o openssl-1.0.2l.tar.gz https://www.openssl.org/source/old/1.0.2/openssl-1.0.2l.tar.gz
Once you have downloaded the OpenSSL tarball, extract it and run the configuration script.
tar zxf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
./config
Download the Joy source-code:
git clone https://github.com/cisco/joy.git
cd joy
To configure the package, run in the main directory:
[joy]$ ./configure --enable-gzip
Specify the location of the OpenSSL headers you downloaded above:
[joy]$ ./configure --enable-gzip --with-ssl-dir=/full/path/to/openssl-0.9.8zh/installed location
or
[joy]$ ./config --enable-gzip --with-ssl-dir=/full/path/to/openssl-1.0.2l/installed location
Resolve any dependencies that were not automatically found. Once resolved, re-run "./configure" to ensure all dependencies were discovered.
You may specify the compression library to be used, or turn compression entirely off. Only the chosen library will be linked to, i.e. if compression is turned off, the gzip (bzip2, etc.) library will not need to be installed. The default is set to gzip.
Example turning compression off (defaults to none):
[joy]$ ./configure
More configure options can be listed by entering ./configure --help.
To build the package, run "make clean;make" in the main directory:
[joy]$ make clean;make
This will cause the programs, including "joy", to be compiled, linked, stripped, and
copied into the bin
directory as appropriate and libjoy is added to lib
directory.
There are many tools that can be used to work with gzip-compressed output, such as zless, gunzip, etc.
The main program for extracting data features from pcap files or live packet captures is the program joy, which occupies the src/ subdirectory. It is copied into the bin/ directory after a successful build. It can be run from that directory, or installed so that it will automatically run as a daemon on Linux or Mac OSX.
Version 10.11 has more dependencies than 10.10; the OpenSSL header files are needed to build this package. You can install these header files via Mac Ports (https://www.macports.org/install.php) using the command sudo port install openssl
.
We have tried to make building on Windows as easy as possible. In the joy/win-joy directory there is a Visual Studio solution file. Open the solution file with Visual Studio 2015 (we have tested on VS 2013 as well) and it should load up all the defaults and source files required. Currently, the project is only setup to build 64-bit binaries. Once the project file loads, you can execute a "clean" and "build" of the code. All of the dependent libraries and headers files are in the joy/windows directory.
After you have the binary built, the required DLL files that are necessary for program execution are located in the joy/windows/64/DLL directory. You can place these DLL files alongside your binary in a directory to produce a package that can be dropped onto a windows based machine and execute correctly. If you want to run the binary directly within the Visual Studio IDE, then you may add this value to the project Properties->Debugging->Environment: PATH=%PATH%;$(ProjectDir)\..\..\windows\64\DLL
Execution of win-joy.exe has been tested on Windows 7, Windows 10 and Windows Server 2012.