diff --git a/PPI/SocketSource.ct b/PPI/SocketSource.ct index a5738583189ed6d87dd6e6fe9738dca2dcc290a9..e2256615beb51967c7cecad0a5ef87463ae1d4c6 100644 --- a/PPI/SocketSource.ct +++ b/PPI/SocketSource.ct @@ -60,8 +60,7 @@ prefix_ senf::ppi::module::ActiveSocketSource<Reader>::ActiveSocketSource(Reader } template <class Reader> -prefix_ senf::ppi::module::ActiveSocketSource<Reader>:: -ActiveSocketSource(Handle handle) +prefix_ senf::ppi::module::ActiveSocketSource<Reader>::ActiveSocketSource(Handle handle) : handle_(handle), event_(handle_, IOEvent::Read) { registerEvent( event_, &ActiveSocketSource::read ); diff --git a/Packets/DefaultBundle/ICMPv6Packet.cc b/Packets/DefaultBundle/ICMPv6Packet.cc index 0556fec61df87779f3da8a48ab1e2841bcba1298..9d5d104b51770342bdfd7f215401c43d662d7bbe 100644 --- a/Packets/DefaultBundle/ICMPv6Packet.cc +++ b/Packets/DefaultBundle/ICMPv6Packet.cc @@ -20,14 +20,19 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Custom includes -#include "../../Packets/Packets.hh" +/** \file + \brief ICMPv6Packet non-inline non-template implementation */ + #include "ICMPv6Packet.hh" +//#include "ICMPv6Packet.ih" + +// Custom includes #include <boost/io/ios_state.hpp> #include "../../Packets/DefaultBundle/IPv6Packet.hh" #include "../../Utils/IpChecksum.hh" #define prefix_ +///////////////////////////////cc.p//////////////////////////////////////// namespace { senf::PacketRegistry<senf::IpTypes>::RegistrationProxy<senf::ICMPv6Packet> @@ -74,6 +79,7 @@ prefix_ void senf::ICMPv6PacketType::dump(packet p, std::ostream &os) << "Checksum : " << p->checksum() << "\n"; } +///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ diff --git a/Packets/DefaultBundle/ICMPv6Packet.hh b/Packets/DefaultBundle/ICMPv6Packet.hh index de33eadf2d813af97dd5143276c5511b311b5642..032bfa32f1803caaacccaa4dfdcd8121b7a05cc5 100644 --- a/Packets/DefaultBundle/ICMPv6Packet.hh +++ b/Packets/DefaultBundle/ICMPv6Packet.hh @@ -20,16 +20,19 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/** \file + \brief ICMPv6Packet public header */ + #ifndef HH_SENF_Packets_DefaultBundle_ICMPv6Packet_ #define HH_SENF_Packets_DefaultBundle_ICMPv6Packet_ 1 // Custom includes #include "../../Packets/Packets.hh" -#include "../../Packets/DefaultBundle/IPv6Packet.hh" +//#include "ICMPv6Packet.mpp" +///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - struct ICMPv6PacketParser : public PacketParserBase { # include SENF_FIXED_PARSER() @@ -76,7 +79,7 @@ namespace senf static void dump(packet p, std::ostream & os); - static IpTypes::key_t nextPacketKey(packet p) { + static key_t nextPacketKey(packet p) { return p->type(); } @@ -89,6 +92,12 @@ namespace senf typedef ConcretePacket<ICMPv6PacketType> ICMPv6Packet; } +///////////////////////////////hh.e//////////////////////////////////////// +#endif +#ifndef SENF_PACKETS_DECL_ONLY +//#include "IPv4Packet.cci" +//#include "IPv4Packet.ct" +//#include "IPv4Packet.cti" #endif @@ -101,3 +110,4 @@ namespace senf // compile-command: "scons -u test" // comment-column: 40 // End: + diff --git a/Packets/DefaultBundle/ICMPv6Packet.test.cc b/Packets/DefaultBundle/ICMPv6Packet.test.cc index 497d2dcd40b7593782f98669952f68b5f6acc3b1..a1b9b8c45e826c9fff17149f92e12b563f395072 100644 --- a/Packets/DefaultBundle/ICMPv6Packet.test.cc +++ b/Packets/DefaultBundle/ICMPv6Packet.test.cc @@ -20,17 +20,16 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// Definition of non-inline non-template functions - /** \file \brief ICMPv6Packet unit tests */ // Custom includes +#include "ICMPv6Packet.hh" +#include "ICMPv6TypePacket.hh" #include "../../Utils/auto_unit_test.hh" #include <boost/test/test_tools.hpp> -#include "ICMPv6Packet.hh" -#include "ICMPv6TypePacket.hh" + BOOST_AUTO_UNIT_TEST(ICMPv6Packet_packet) { diff --git a/Packets/DefaultBundle/ICMPv6TypePacket.hh b/Packets/DefaultBundle/ICMPv6TypePacket.hh index 7196f4fdc2f4a6d89b18c4df5717184e3e24a4df..47834a11be12b707e0e78250f2e5377ba9cc6149 100644 --- a/Packets/DefaultBundle/ICMPv6TypePacket.hh +++ b/Packets/DefaultBundle/ICMPv6TypePacket.hh @@ -26,7 +26,8 @@ #define HH_SENF_Packets_DefaultBundle_ICMPv6TypePacket_ 1 // Custom includes -#include "../../Packets/Packets.hh" +#include "../Packets.hh" +#include "IPv6Packet.hh" #include "ICMPv6Packet.hh" namespace senf { diff --git a/Utils/Console/Config.hh b/Utils/Console/Config.hh index 64d9802f0609f42f9dadd32e2d6a8c27db4f5268..5bd384c1d318beb89c2e62d65abf5ccf1c33bfd4 100644 --- a/Utils/Console/Config.hh +++ b/Utils/Console/Config.hh @@ -67,7 +67,7 @@ namespace console { ///\name Structors and default members ///@{ - ConfigBundle(); + ConfigBundle(); ///< root node is set to console::root() ConfigBundle(DirectoryNode & root); ///< Set custom root node ///@} @@ -77,18 +77,18 @@ namespace console { Source & add(boost::intrusive_ptr<Source> source); ///< Add configuration source - void parse(); ///< Parse config file + void parse(); ///< Parse config bundle /**< All nodes already parsed are skipped */ - void parse(DirectoryNode & restrict); ///< Parse config file under \a restrict + void parse(DirectoryNode & restrict); ///< Parse config bundle under \a restrict /**< Only nodes which are children of \a restrict are - parsed. */ + parsed. */ bool complete() const; ///< \c true, if all nodes have been parsed bool parsed(GenericNode & node) const; ///< \c true. if \a node has been parsed void reset(); ///< Reset node parse info state /**< After a call to reset(), all information about already parsed nodes is cleared. Calling parse() will parse the - complete config file again. */ + complete config bundle again. */ protected: diff --git a/Utils/Console/Node.hh b/Utils/Console/Node.hh index 3e796ecb785f65c9b18328bc4876649e9b42a0f5..9a44c5af43fe5bba92576f9d82f7e8e7f54ccbf1 100644 --- a/Utils/Console/Node.hh +++ b/Utils/Console/Node.hh @@ -278,7 +278,7 @@ namespace console { bool active() const; ///< \c true, if node is attached to the root() node - void help(std::ostream & output) const; /// Write help info to \a output + void help(std::ostream & output) const; ///< Write help info to \a output ptr thisptr(); ///< Get smart pointer to node cptr thisptr() const; ///< Get smart pointer to node (const) diff --git a/Utils/Exception.cc b/Utils/Exception.cc index b2c750f383c55a27d449c0853fdec59a085b4fa2..737214da96347dc62763ff4750117b18d406902a 100644 --- a/Utils/Exception.cc +++ b/Utils/Exception.cc @@ -48,7 +48,7 @@ prefix_ void senf::ExceptionMixin::addBacktrace() ss << "\nException at\n"; formatBacktrace(ss, entries, nEntries); ss << "-- \n" << message_; - message_ = ss.str(); + what_ = ss.str(); } #endif @@ -62,7 +62,7 @@ prefix_ senf::Exception::~Exception() prefix_ char const * senf::Exception::what() const throw() { - return message().c_str(); + return what_.c_str(); } /////////////////////////////////////////////////////////////////////////// diff --git a/Utils/Exception.cci b/Utils/Exception.cci index 189c2f1e24f21f47ff8433f24eaad4494fd6d546..3366fe23467d20109a35c3d00a3e941169c142ea 100644 --- a/Utils/Exception.cci +++ b/Utils/Exception.cci @@ -31,7 +31,8 @@ // senf::ExceptionMixin prefix_ senf::ExceptionMixin::ExceptionMixin(std::string const & description) - : message_(description) + : what_(description), + message_(description) { #ifdef SENF_DEBUG addBacktrace(); @@ -47,6 +48,7 @@ prefix_ std::string const & senf::ExceptionMixin::message() prefix_ void senf::ExceptionMixin::append(std::string text) { message_ += text; + what_ += text; } /////////////////////////////////////////////////////////////////////////// diff --git a/Utils/Exception.cti b/Utils/Exception.cti index ea123701100f23b8a71f46539b020a5a3dd201fe..4fb5379f817e2c6a42bc57db323c1d5e08f5d996 100644 --- a/Utils/Exception.cti +++ b/Utils/Exception.cti @@ -56,7 +56,7 @@ template <class BaseException> prefix_ char const * senf::WrapException<BaseException>::what() const throw() { - return message().c_str(); + return what_.c_str(); } /////////////////////////////cti.e/////////////////////////////////////// diff --git a/Utils/Exception.hh b/Utils/Exception.hh index cc23ae350d1157c5fde9d9e76ea17e0726207819..a91b157d20c3682634d6556dac6a56636abb3039 100644 --- a/Utils/Exception.hh +++ b/Utils/Exception.hh @@ -140,9 +140,9 @@ namespace senf { class ExceptionMixin { public: - std::string const & message() const; + std::string const & message() const; ///< get exception description - void append(std::string text); ///< Extend exception description + void append(std::string text); ///< Extend exception description /**< Adds \a text to the description text. */ protected: @@ -152,7 +152,7 @@ namespace senf { string. This should probably be a string constant describing the exception for most derived exceptions. */ - + std::string what_; private: #ifdef SENF_DEBUG void addBacktrace(); @@ -177,6 +177,9 @@ namespace senf { virtual ~Exception() throw(); virtual char const * what() const throw(); + ///< get exception description and backtrace if available + /**< get description of the exception (message()) and backtrace + information if SENF is compiled with \c SENF_DEBUG */ protected: explicit Exception(std::string const & description = ""); @@ -299,7 +302,6 @@ namespace senf { void init(std::string const & descr, int code _SENF_EXC_DEBUG_ARGS_ND); int code_; - std::string what_; }; # ifdef SENF_DEBUG diff --git a/Utils/Logger/SyslogUDPTarget.hh b/Utils/Logger/SyslogUDPTarget.hh index 25bb8930c0657d9248206a1e7dbd4f4c7739b645..71732d5ae9fa8269f973f6c751c5a77193b93dd3 100644 --- a/Utils/Logger/SyslogUDPTarget.hh +++ b/Utils/Logger/SyslogUDPTarget.hh @@ -43,9 +43,9 @@ namespace log { /** \brief Log target writing UDP syslog packets - The SyslogUDPTarget will send all log messages directly via UDP to a target host. This host - should have a syslog daemon or relay running. The protocol is defined in <a - href="ttp://tools.ietf.org/html/rfc3164">RFC-3164</a>. + The SyslogUDPTarget will send all %log messages directly via UDP to a target host. This + host should have a syslog daemon or relay running. The protocol is defined in <a + href="http://tools.ietf.org/html/rfc3164">RFC-3164</a>. This log target has some important benefits: @@ -66,7 +66,7 @@ namespace log { the default facility is <tt>LOG_USER</tt> - The SENF log levels are mapped to syslog levels in the following way: + 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> @@ -78,8 +78,8 @@ namespace log { </table> \note Since the UDP syslog packets are limited to 1024 characters and there must be some - space left so a relay may optionally add a timestamp and hostname section, the log - messages are split after 896 characters. Additionally the log messages are split at each + space left so a relay may optionally add a timestamp and hostname section, the %log + messages are split after 896 characters. Additionally the %log messages are split at each newline char since non-printable characters are not allowed. \implementation The RFC only \e recommends the exact message format. This allows us to @@ -119,7 +119,7 @@ namespace log { /**< When syslog format is disabled, messages are not formated as valid syslog messages but sent using plain UDP. */ - void syslog(bool enabled=true); /// Set syslog format + void syslog(bool enabled=true); ///< Set syslog format private: void init(); diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index 6f26ddd7a4fda22b5f7a7e990a82fdce79d73e32..f08ceb1f263f663200dbb4918494e8432e49c036 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -78,12 +78,12 @@ namespace log { stream \li (optional) \e area. If the area is specified, only messages directed at that area are matched, otherwise any area will be allowed - \li (optional) \e level. If the log level is specified, messages will be accepted if their + \li (optional) \e level. If the %log level is specified, messages will be accepted if their level is at least that value. If the value is not specified, the limit will be taken from the stream's default value. Each parameter (stream, area and level) has two representations: A static (compile time - constant) representation, which is the representation also used in the log statements, and a + constant) representation, which is the representation also used in the %log statements, and a dynamic representation, which may be used for manipulating the routing table. The static representation is used, when passing routing parameters via template arguments: diff --git a/Utils/Termlib/AbstractTerminal.hh b/Utils/Termlib/AbstractTerminal.hh index 22b3e0cce81897d8ba88f76a3c4ae219431be238..b3f396d0576708cdce4a112c8d6fad8687d2ecee 100644 --- a/Utils/Termlib/AbstractTerminal.hh +++ b/Utils/Termlib/AbstractTerminal.hh @@ -66,7 +66,7 @@ namespace term { virtual ~AbstractTerminal() {} - virtual void setCallbacks(Callbacks & cb) = 0; /// Register terminal callbacks + virtual void setCallbacks(Callbacks & cb) = 0; ///< Register terminal callbacks virtual std::string terminalType() = 0; ///< Get the terminal type virtual unsigned width() = 0; ///< Get current terminal window width