Some URL fixes
[senf.git] / doclib / Mainpage.dox
index 12fe04c..72d5142 100644 (file)
 
     To get started using this library, begin by checking out the code from the <a
     href="http://developer.berlios.de/svn/?group_id=7489">BerliOS SVN repository</a>. You may find
-    help on using the library at '\ref senf_usage'. If you are interested in SENF, feel free to subscribe
-    to the <a href="http://developer.berlios.de/mail/?group_id=7489">SENF mailing lists</a>. If you
-    want to contribute, read the docs and \e please adhere to the \ref senf_conventions.
+    help on using the library at '\ref senf_usage'. If you are interested in SENF, feel free to
+    subscribe to the <a href="http://developer.berlios.de/mail/?group_id=7489">SENF mailing
+    lists</a>. If you want to contribute, read the docs and \e please adhere to the \ref
+    senf_conventions.
 
     \see \ref senf_usage\n
          <a href="../../Examples/doc/html/index.html">Examples</a>
 
     \autotoc
 
+    \c senfutil helps setting up projects which utilize SENF. It will configure all necessary
+    compiler and linker options and additionally sets up some useful defaults and utilities.
+
+    \c senfutil really serves three roles
+
+    \li detect SENF and configure the build accordingly
+    \li make some SCons extensions used within SENF available to other projects
+    \li set default compilation options in the same way, they are set when compiling SENF proper.
+
+    The last two points are of course optional.
+
+    \section senfutil_tutorial Tutorial
+
+    To utilize \c senfutil you need to do two things:
+    \li Update your \c SConstruct file
+    \li add a bootstrap \c senfutil.py to \c site_scons
+
+    Lets start with the \c SConstruct file
+    \code
+    import senfutil
+
+    env = Environment()
+    senfutil.SetupForSENF(env)
+    senfutil.DefaultOptions(env)
+
+    env.SetDefault(
+        PROJECTNAME      = 'Example project',
+        PROJECTEMAIL     = 'developer@domain.com',
+        DOCLINKS         = [ ('Homepage', 'http://www.domain.com') ]
+    )
+
+    sources, tests = senfutil.Glob(env, exclude=['main.cc'])
+
+    objects = env.Object(sources)
+    example = env.Program('example', objects + ['main.cc'])
+    test    = env.BoostUnitTest('test', objects + tests)
+
+    env.Default(example)
+
+    senfutil.Doxygen(env)
+
+    senfutil.CleanGlob('all', [ '*~', '#*#' ])
+    \endcode
+
+    This simple sample already enables a lot of functionality:
+    \li support for different \e SENF flavors (debug/normal/final)
+    \li support for different \e build flavors (debug/normal/final)
+    \li sensible default compile options for the different flavors
+    \li support for extended command-line variables
+    \li building documentation with an auto-generated Doxyfile
+    \li running unit-tests
+    \li cleaning backup and temporary files
+
+    Here a very quick rundown of the important scons commands:
+    \li Build default target:
+        <pre>
+        $ scons
+        </pre>
+    \li Build documentation and unit-tests:
+        <pre>
+        $ scons doc test
+        </pre>
+    \li clean up everything
+        <pre>
+        $ scons -c all
+        </pre>
+    \li Pass custom options on the command-line
+        <pre>
+        $ scons CXXFLAGS+=-Wextra
+        </pre>
+
+    Since \c senfutil.py is not on the standard \c python or \c SCons path, some extra steps are
+    needed to find it.
+    \li Either add the possible directories to <tt>sys.path</tt> before importing \c senfutil:
+        \code
+        import sys
+        sys.path.extend(('/usr/local/lib/senf/site_scons', '/usr/lib/senf/site_scons'))
+        import senfutil
+        \endcode
+    \li Alternatively, install the following utility script as <tt>site_scons/senfutil.py</tt> into
+        your project. This script will search for <tt>site_scons/senfutil.py</tt> in a list of
+        directories and then load the real \c senfutil.py on top of itself. The directories searched
+        include: the current directory and all parents, subdirectories named <tt>senf/</tt>,
+        <tt>Senf/</tt> or <tt>SENF/</tt> thereof, and <tt>/usr/local/lib/senf/</tt> and
+        <tt>/usr/lib/senf/</tt>
+        \include senfutil.py
+
+    \section senfutil_features
+
     The \c senfutil utility for SCons helps setting up a project to compile against SENF:
 
     \li \c senfutil adds all necessary libraries to link against
     When building against a self-built SENF which will probably be in debug mode, the '-DSENF_DEBUG'
     option must be added to the compile command.
 
-    The most simple way to build using SENF is to use a very simple SCons helper which automatically
-    supports debug and final builds, uses SENF either centrally installed or locally built and has
-    some other nice features. See <a
-    href="../../senfscons/doc/html/index.html#senfutil_overview">Building Projects using SENF</a>
-    for more info and an example for this utility.
-
     \see \ref senf_components \n
          \ref senf_overview
  */
     oriented network applications. The library provides a large set of pre-defined modules as well
     as the necessary helpers to implement application specific processing modules.
 
-    \see <a href="../../PPI/doc/html/index.html">libPPI API reference</a>
+    \see <a href="../../senf/PPI/doc/html/index.html">libPPI API reference</a>
 
     \section libSocket libSocket: C++ abstraction of the BSD socket API
 
     API. It utilizes a flexible and extensible policy based design. The library provides predefined
     types for the important socket types (UDP and TCP sockets etc) including raw and packet sockets.
 
-    \see <a href="../../Socket/doc/html/index.html">libSocket API reference</a>
+    \see <a href="../../senf/Socket/doc/html/index.html">libSocket API reference</a>
 
     \section libPackets libPackets: Network packet manipulation
 
     packetized network data. Included is a library of several protocol parsers covering the basic
     IPv4 and IPv6 network protocols down to the Ethernet layer.
 
-    \see <a href="../../Packets/doc/html/index.html">libPackets API reference</a>
+    \see <a href="../../senf/Packets/doc/html/index.html">libPackets API reference</a>
 
     \section libScheduler libScheduler: Asynchronous event handling
 
     event dispatcher. It is based on the high performance \c epoll system call. It provides support
     for read/write events as well as simple timer based events.
 
-    \see <a href="../../Scheduler/doc/html/index.html">libScheduler API reference</a>
+    \see <a href="../../senf/Scheduler/doc/html/index.html">libScheduler API reference</a>
 
     \section libUtils libUtils: Collection of arbitrary utilities
 
     \li An interface to the \c g++ de-mangler integrated with type_info
     \li Typedefs and rudimentary methods to simplify handling high-resolution time values
 
-    \see <a href="../../Utils/doc/html/index.html">libUtils API reference</a>
+    \see <a href="../../senf/Utils/doc/html/index.html">libUtils API reference</a>
 
     \section senfscons SENFSCons, the SENF build environment
 
     \section senf_startup Getting starting developing with SENF
 
     To introduce the framework and it's general structure, a simple example application is provided
-    in the SENF repository in the \c Sniffer module. Peruse this example to get a first look at how
+    in the SENF repository in the \c %Sniffer module. Peruse this example to get a first look at how
     to make use of SENF.
 
     When building a network Application with SENF, you will use several modules:
 
-    \li Use the <a href="../../Socket/doc/html/index.html">Socket library</a> for network
+    \li Use the <a href="../../senf/Socket/doc/html/index.html">Socket library</a> for network
         communication needs. This library includes support for raw and packet sockets to allow low
         level network access.
-    \li Use the <a href="../../Scheduler/doc/html/index.html">Scheduler library</a> to coordinate
-        the asynchronous event processing. This drastically reduces the number of threads needed in
-        your application and will greatly enhance the overall responsiveness.
+    \li Use the <a href="../../senf/Scheduler/doc/html/index.html">Scheduler library</a> to
+        coordinate the asynchronous event processing. This drastically reduces the number of threads
+        needed in your application and will greatly enhance the overall responsiveness.
     \li To interpret low level network packets, use the <a
-        href="../../Packets/doc/html/index.html">Packets library</a>. This library will provide
+        href="../../senf/Packets/doc/html/index.html">Packets library</a>. 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.
-    \li Go over the <a href="../../Utils/doc/html/index.html">Utils library</a>. It contains small
+    \li Go over the <a href="../../senf/Utils/doc/html/index.html">Utils library</a>. It contains
+        small
         helpers to simplify tasks like daemonization, exception handling, debugging and so on.
 
     The simplest way to get started is: copy the Sniffer application and start to modify it.