diff --git a/Packets/Packet.hh b/Packets/Packet.hh index 124e8bd73a638a8417a17094373dc5c7008bc30c..bb2ac904cf3bd0c0e24d422c74cbb71cbb4d8422 100644 --- a/Packets/Packet.hh +++ b/Packets/Packet.hh @@ -339,7 +339,8 @@ namespace senf { If an annotation is \e not a POD type (more specifically, if it's constructor or destructor is not - trivial), the \a Annotation type \e must inherit from + trivial including base classes and members), the \a + Annotation type \e must inherit from senf::ComplexAnnotation. Failing to follow this rule will result in undefined behavior and will probably lead to a program crash. @@ -349,6 +350,7 @@ namespace senf { std::string value; }; \endcode + (This type is not POD since \c std::string is not POD) \implementation The annotation system is implemented quite efficiently since annotations are stored diff --git a/Packets/PacketImpl.hh b/Packets/PacketImpl.hh index 92738a46277fe02446ebb17740e96c600867fb54..4aa2d8c1f63065a5963c48fe893304743532f326 100644 --- a/Packets/PacketImpl.hh +++ b/Packets/PacketImpl.hh @@ -40,6 +40,22 @@ namespace senf { + /** \brief Marker base-class for complex annotations + + This class is used as a base class to mark an annotation type as complex. A complex + annotation will have it's constructor/destructor called. Non-complex annotations will not + have their constructor called, they will be zero initialized. The destructor of non-complex + annotations is never called. + + An annotation must be marked as complex if it is not <a + href="http://en.wikipedia.org/wiki/Plain_Old_Data_Structures">POD</a>. Simplified, an + annotation must be marked as ComplexAnnotation, if + + \li it has a (user defined) constructor or destructor + \li it has any data members which have (user defined) constructors or destructors + + \see \ref packet_usage_annotation + */ struct ComplexAnnotation {}; namespace detail { diff --git a/Utils/Logger/SyslogTarget.hh b/Utils/Logger/SyslogTarget.hh index 70cf4e322e1965692463617eac10bc8ae7c9be3a..3de11ec78358dba355fa714e5b5dcbeafb3eb02d 100644 --- a/Utils/Logger/SyslogTarget.hh +++ b/Utils/Logger/SyslogTarget.hh @@ -50,6 +50,17 @@ namespace log { The default facility is <tt>LOG_USER</tt>. + The SENF log levels are mapped to syslog levels in the following way: + + <table class="senf fixedcolumn"> + <tr><td>senf::log::VERBOSE</td> <td>\c LOG_DEBUG</td></tr> + <tr><td>senf::log::NOTICE</td> <td>\c LOG_INFO</td></tr> + <tr><td>senf::log::MESSAGE</td> <td>\c LOG_NOTICE</td></tr> + <tr><td>senf::log::IMPORTANT</td> <td>\c LOG_WARNING</td></tr> + <tr><td>senf::log::CRITICAL</td> <td>\c LOG_CRIT</td></tr> + <tr><td>senf::log::FATAL</td> <td>\c LOG_EMERG</td></tr> + </table> + \ingroup targets */ class SyslogTarget diff --git a/senf.dict b/senf.dict index b34ca696820fe7f744a2cf6819db64d6a8a01adf..807bc7fbafc40f6a82506002cb8721744585237e 100644 --- a/senf.dict +++ b/senf.dict @@ -30,6 +30,7 @@ ArrayParser async attr Augustin +AUTHPRIV autoadd autoparse autoThrottling @@ -88,6 +89,7 @@ CPPPATH createAfter createBefore cref +CRON ct cti CXXFLAGS @@ -289,6 +291,7 @@ ListPolicy localAddr localhost loopback +LPR mac MACAddress MACAddressParser @@ -551,6 +554,8 @@ svnbook svnroot SyntaxErrorException SyntaxException +syslog +SyslogTarget SystemException TapSocketHandle td