Introduction to the framework

The SENF framework is relatively complex and makes use of advanced features of the C++ language. To make the most efficient use of the framework, you should have at least a basic understanding of C++ templates and the standard library concepts.

The library implementation at places makes heavy use of advanced template techniques and relies on some very advanced template libraries from Boost. The aim was however for the external interface of the library to be as simple as possible without sacrificing important functionality or adversely impacting the runtime performance.

As already mentioned several times, the library relies on Boost (http://www.boost.org) as a generic library of high quality reusable C++ components. It also makes frequent use of the standard library. It is designed, to integrate well into both libraries and to use the same concepts and ideas.

Getting starting developing with SENF

To introduce the framework and it's general structure, some simple example applications are provided in the SENF repository. Peruse those examples to get a first look at how to make use of SENF.

When building a network Application with SENF, you will use several modules:

  • One of the central SENF libraries is the Packet Processing Infrastructure (PPI). Using this library, it is very simple to develop flexible packet networks of interconnected modules.
  • Use the Socket library for network communication needs. This library includes support for raw and packet sockets to allow low level network access.
  • Use the Scheduler library to coordinate the asynchronous event processing. This drastically reduces the number of threads needed in your application and will greatly enhance the overall responsiveness.
  • To interpret low level network packets, use the Packets library. This library will provide efficient and convenient access to all protocol fields. It supports parsing as well as modifying and creating packets. It has default support for the most important Internet protocols and is highly extensible with new protocols.
  • Go over the Utils library. It contains small helpers to simplify tasks like daemonization, exception handling, debugging and so on. Additionally, Utils contains several larger supplementary modules for Logging, Configuration (including interactive configuration via a network terminal) and Daemon management.

The simplest way to get started is: copy the Sniffer application and start to modify it.

See also
Examples
The SENF modules
SENF SCons build utility (senfutil.py)
Building the SENF framework

Dependencies

Before starting the development, make sure to fulfill the following requirements:

If you want to build the documentation, you additionally need

The library is tested and developed on Linux. It should be relatively simple to port SENF to other POSIX platforms.