VTA User's Guide: V1.0 for VTA 1.0

Chapter 2. Building and Configuring VTA



Building from Source under LINUX

1. Unpack the source from the vta-1.0-source.tar.gz file by using the following command:

    tar zxvf vta-1.0-source.tar.gz

2. Change directory to the VTA source directory. Here you will find the following five tar.gz files:

    vta-1.0.tar.gz -- vta graphical user interface with 'pcap' and 'getScok'
    vtaPcap.tar.gz --- files to generate root setuid binary 'pcap', which is used in vta
    vtaGetSock.tar.gz -- files to generate binary 'getSock',which is used in vta
    vtaLibpcap.tar.gz -- modified libpcap functions to be used for generating setuid binary 'pcap'
    vtaWrapper.tar.gz -- wrapper functions to capture application specific traffic

If you want to run VTA without using the wrapper to capture an application specific traffic, please skip step 8. If you want to run VTA without any modification to the source code, please skip steps 9, 10 and 11.

3. Unpack vta-1.0.tar.gz. Enter vta-1.0 directory. Launch Kdevelop (Under LINUX, type in kdevelop or go to program and find Kdevelop and click on it). Use the "Project" menu of Kdevelop to open the vta.kdevprj file in the vta-1.0 directory. In "Build" menu, choose "configure..." and supply the Qt library path, then choose "DistClean/Rebuild All" to build the sources into a binary.

Because of the complexity of compilation for using both Qt and pthread library, to use kdevelop to build the project is the best choice. You might get strange errors when running VTA if you did not build it correctly. g++ 2.96 is also recommended when you compile, other versions of g++ may cause you trouble.

4. Enter vta-1.0/vta directory, su root, chown root pcap, chmod 4111 pcap (to make it a root setuid program ). This step is not required if you are only using VTA to read an existing traffic dump file from local disk.

5. chmod a+x getSock. This is to let every user to be able to run getSock binary. This step does not need root access.

6. Set the VTAPATH to the vta-1.0 directory path. For example, assume vta-1.0 directory is in /home/john/. Then on tcsh, you can use this command to set the VTAPATH:

setenv VTAPATH /home/john/vta-1.0

If you don't set VTAPATH correctly, you will not be able to launch the packet capturing program successfully.

7. In vta-1.0/vta directory, type in ./vta to run VTA.

8. Unpack vtaWrapper.tar.gz. Enter wrapper directory. Build the vtaWrapper.a library with the make command.

9. Unpack vtaLibpcap.tar.gz. Enter libpcap-0.6.2 directory. Build libcap.a library with the make command.

10. Unpack vtaPcap.tar.gz. Enter vtaPcap directory. Build the pcap binary with the make command.

11. Unpack vtaGetSock.tar.gz. Enter vtaGetSock directory. Build the getSock binary with the make command.

Next Topic   Configuring the Binaries under Linux