X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Mainpage.dox;h=9438adb871b9d7a784950711a29fb2e560784c83;hb=5a66122a5731349c9361eccac4abaccc89be7d84;hp=02c250bbad63943018e5bdd849b87926c84a1323;hpb=8dfae1a53657036ad5dedadc77b91d2841266ba8;p=senf.git diff --git a/Mainpage.dox b/Mainpage.dox index 02c250b..9438adb 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -14,7 +14,7 @@ \li modular framework design \li utilizing the power of modern C++ \li very low overhead for frequently called members - \li extensible design + \li extensible design \li concise interface \section start Getting started @@ -29,14 +29,12 @@ mailing lists. \see \ref usage\n - \ref example\n - The BerliOS project page\n - The SENF Wiki at BerliOS + \ref example */ /** \page usage Using the SENF framework - The SENF Framework is a collection of lossly coupled + The SENF Framework is a collection of loosely coupled modules. The libraries are heavily object oriented and template based. For compatibility reasons, the libraries are therefore built together with every project making use of the framework. @@ -48,7 +46,8 @@ \see \ref build \n \ref components \n - \ref svnsetup + \ref svnsetup \n + \ref overview \section Preliminaries @@ -63,23 +62,18 @@ \li Doxygen (http://www.doxygen.org) \li The \c dia diagram editor (http://www.gnome.org/projects/dia/) + \li HTML \c tidy (http://tidy.sourceforge.net/) + \li The \c xsltproc XSLT processor (http://xmlsoft.org/XSLT/xsltproc2.html) The library is only tested with gcc-3.4 and 4.0 on Linux. On other POSIX platforms with a BSD Socket API, the library should be usable, possibly with some tweaking (except for the Scheduler, which relies on \c epoll) - - \todo - \li Preliminaries: SVN access, Dependencies - \li Building the library -> Configuration - \li Setting up a project using this library (svn:externals) - \li Library components - \li coding standards and patterns */ /** \page build Building the framework - + This procedure will test building the complete framework including the unit tests and the Sniffer test application. This build is \e not needed to use the framework since every project @@ -89,7 +83,7 @@ continue to setup your own project using SENF. \see \ref components \n - \ref svnsetup + \ref svnsetup \section checkout Getting the code @@ -97,8 +91,9 @@ repository. Change to your development directory and use the following subversion command -
-      $ svn checkout http://svn.berlios.de/svnroot/repos/senf/trunk senf
+
+    $ svn checkout http://svn.berlios.de/svnroot/repos/senf/trunk senf
+    
This will create a new directory \c senf within the current directory. For further documentation on the use of Subversion, see @@ -112,9 +107,10 @@ To build the library, execute all unit tests and build the Sniffer test application, use -
-      $ scons
-      $ scons all_tests
+
+    $ scons
+    $ scons all_tests
+    
in the \c senf directory. This assumes, that you want to build the library with your default gcc and requires the boost libraries to @@ -133,7 +129,7 @@ \see \ref build \n \ref svnsetup - + \section libSocket libSocket: C++ abstraction of the BSD socket API This library provides a high performance and object oriented @@ -172,13 +168,13 @@ miscellaneous tools and utilities. We have \li Simple functions to manage daemon processes - \li Standard exception classes - \li satcom::lib::intrusive_refcount to simplify the implementation - of classes usable with boost::intrusive_ptr + \li Standard exception classes + \li senf::intrusive_refcount to simplify the implementation + of classes usable with boost::intrusive_ptr \li boost::bind extensions - \li An interface to the \c g++ demangler integrated with type_info + \li An interface to the \c g++ demangler integrated with type_info \li Typedefs and rudimentary methods to simplify handling - high-resolution time values + high-resolution time values \see libUtils API reference @@ -191,16 +187,20 @@ environment. Included are a number of templates to help bootstrapping a new project or component. - \see SENFSCons + \see SENFSCons reference */ -/** \page svnsetup Setting up a new project using SENF via SVN - +/** \page svnsetup Setting up a new project using SENF + The preferred way to use SENF in a new project is to rely on Subversion and make use of the SENFSCons build environment. The following sections will describe, how this setup works. + \see \ref build \n + \ref components \n + \ref overview + \section svnext Setting up the project repository The most seamless integration is possible if you rely on @@ -221,13 +221,14 @@ \c svn:externals. This will instruct \c svn to auutomatically check out the needed directories from the BerliOS SENF repository. Change to the 'Foo' directory and type - -
-        $ svn propedit svn:externals .
+ +
+    $ svn propedit svn:externals .
+    
The default editor (probably VI) will be started with the current value of the svn:externals property (which will probably be - empty). Now add all the modules you want plus \c satscons and + empty). Now add all the modules you want plus \c senfscons and possibly \c doclib (if you want to build the documentation). You will almost certainly neeed the \c Utils module, since all other modules depend on it. @@ -235,48 +236,143 @@ For example, if you want to use the \c Scheduler and \c Socket module, the file will look like -
-        satscons http://svn.berlios.de/svnroot/repos/senf/trunk/satscons
-        Utils http://svn.berlios.de/svnroot/repos/senf/trunk/Utils
-        Scheduler http://svn.berlios.de/svnroot/repos/senf/trunk/Scheduler
-        Socket http://svn.berlios.de/svnroot/repos/senf/trunk/Socket
+
+    senfscons http://svn.berlios.de/svnroot/repos/senf/trunk/senfscons
+    Utils http://svn.berlios.de/svnroot/repos/senf/trunk/Utils
+    Scheduler http://svn.berlios.de/svnroot/repos/senf/trunk/Scheduler
+    Socket http://svn.berlios.de/svnroot/repos/senf/trunk/Socket
+    
exit the editor and the property will be set. Now run -
-        $ svn update
+
+    $ svn update
+    
and the code will be checked out into the corresponding - directories. + directories. - \todo \li Configuring and building -> reference to the SENFSCons - dok - */ + \section new_conf Configuring SENFSCons + + To set up the build environment, copy the + senfscons/SConstruct.template to SConstruct in + the project root. The default setup of this file is to build all + subdirectories (using the \c SConscript files of the + subdirectories). You can add additonal global targets and + configuration parameters here. + + If you want to use a non-default compiler or the boost library is + not installed in the system directories, you will have to copy + senfscons/SConfig.template to SConfig in the + project root and edit it there. You should \e never add \c SConfig + to the repository since it should only contain local settings + necessary for building on your local system. You should therefore + add \c SConfig to the list of files ignored by Subversion in the + project root. In the project root execute -/** \page example Sniffer: A simple Example application +
+    $ svn propedit svn:ignore .
+    
+ and add \c SConfig as a new line to the property. + + \section new_build Building the project + + You should now be able to build your project using + +
+    $ scons
+    
+ + If you have not changed the \c SConstruct file, this will build + all modules you have importet into your project. To build and + execute the unit tests, use + +
+    $ scons all_tests
+    
+ + you can also build only a subdirectory by changing to it and + running + +
+    $ scons -u [target]
+    
+ + \see SENFSCons reference \n + SCons documentation \n + Subversion online book \n + Subversion Homepage + */ + +/** \page overview 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 \e 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. + + \section 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 to + make use of SENF. + + When building a network Application with SENF, you will use + several modules: + + \li Use the Socket + library for network communication needs. This library + includes support for raw and packet sockets to allow low level + network access. + \li 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. + \li 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. + \li Go over the Utils + library. 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. + + \see \ref example \n + \ref components \n + \ref svnsetup \n + \ref build */ - \section code Coding practices - - The library heavily depends on the features of modern C++. As - such, it depends on a fairly recent and standards compliant C++ - compiler (the Library is developed using \c gcc with Version at - least 3.4). To meet the above defined goals, the library makes - quite heavy use of advanced templating techniques, so - understanding the implementation will require expertise in the - intricacies of C++ templates. However, it was deemed important to - keep the \e visible Interface of the Library as clean and simple - as possible without sacrificing the projects design goals. - - The library heavily depends on the \e Boost libraries (see - http://www.boost.org). The Boost libraries are an ever growing - collection of highest quality reusable C++ components. They are - designed with standardization in mind. Many of the libraries are - already in queue to be part of the next generation C++ standard. - // Local Variables: // mode: c++ +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// mode: flyspell +// mode: auto-fill // End: -