Development Introduction

Getting started with coding

Contents

Windows note

For Windows users it is recommended to compile and install everything inside a MinGW + MSYS environment.

The environment

Most developers are using Code::Blocks as the editor. In the SVN trunk you'll find a Code::Blocks project file. However, you'll need to compile and run Net Responsibility in a regular terminal. This is because several steps in the installation process doesn't run if built and run through Code::Blocks. There is no need to use Code::Blocks, since you're able to edit any file in your favorite text editor.

Get all libraries

POCO

Net Responsibility heavily relies on the POCO C++ libraries. The first thing to do is download and install Poco. Note that the version needs to be 1.4 or later. Start by downloading the complete edition. Unpack it and open a terminal. cd yourself to the dir you unpacked Poco to. There you configure, compile and install. The procedure should look like this:

cd poco-*
./configure --shared --no-tests --no-samples
make
sudo make install

More information on installing Poco may be found here in this tutorial.

Libpcap

When you've installed the Poco libs, you also need libpcap. Many systems either have it installed by default, or provides packages for libpcap. Note that you'll need the developer's package. It is usually called libpcap-dev.

Download and compile

Now finally, it's time to compile Net Responsibility itself. It's recommended for developers to download the SVN trunk. It is easily done in a terminal like:

svn checkout https://responsibility.svn.sourceforge.net/svnroot/responsibility/trunk/

To be able to commit any changes to the SVN repository, you'll need additional permissions. Let us know if you're interested.

When you've downloaded the trunk, just run this make-chain:

cd trunk
autoreconf -i
./configure
make
sudo make install

In the last step you will also be prompted to type your username and password, if it's the first time you install. Note that you'll need autoreconf and libtool installed.

If you got this far Net Responsibility should be installed. When running "ps -ef|grep net-responsibility" you should get an output line similar to "net-responsibility —daemon".

Understanding the program structure

The Program's structure is described in another guide. It is recommended to read it to understand the concept and different steps Net Responsibility is built around.

Where to start digging

Now you're ready for the fun part - the coding. The two main areas to lay your hands on are bugs and feature requests. You may find bugs in our bug tracker. Grab one that sounds interesting and provide a solution. You may also look through all feature requests to see if there's anything you'd rather implement there. If you'd rather work on a bug or feature request that are not present in the lists, please add an entry about it, and a note that you're working on it.

Submit source code changes

When you've created a solution or implemented a new feature, you don't want to keep it for yourself, do you? One of the best things with open source projects is the ability to contribute. For more information about how to contribute with source code, view Source Code Management.