Skip to content
Snippets Groups Projects
Commit f3b5a277 authored by tho's avatar tho
Browse files

some small documentation fixes

parent f8be7089
No related branches found
No related tags found
No related merge requests found
...@@ -21,24 +21,17 @@ ...@@ -21,24 +21,17 @@
// Definition of non-inline non-template functions // Definition of non-inline non-template functions
//#include "Sniffer.hh" //#include "MCSniffer.hh"
//#include "Sniffer.ih" //#include "MCSniffer.ih"
// Custom includes // Custom includes
#include <string>
#include <fstream> #include <fstream>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include <linux/sockios.h>
#include <string> #include <string>
#include <iostream>
#include <iomanip> #include <iomanip>
#include "Socket/UDPSocketHandle.hh" #include "Socket/UDPSocketHandle.hh"
#include "Scheduler/Scheduler.hh" #include "Scheduler/Scheduler.hh"
#include "Utils/membind.hh"
#include "Packets/EthernetPacket.hh" #include "Packets/EthernetPacket.hh"
#include "Utils/membind.hh"
//#include "MCSniffer.mpp" //#include "MCSniffer.mpp"
...@@ -87,20 +80,20 @@ namespace { ...@@ -87,20 +80,20 @@ namespace {
} }
class MSniffer class MCSniffer
{ {
senf::UDPv4ClientSocketHandle sock; senf::UDPv4ClientSocketHandle sock;
std::ostream& stream; std::ostream& stream;
public: public:
MSniffer(senf::INet4Address addr, std::ostream& s) MCSniffer(senf::INet4Address addr, std::ostream& s)
: stream(s) : stream(s)
{ {
sock.protocol().bind(addr); sock.protocol().bind(addr);
sock.protocol().mcLoop(true); sock.protocol().mcLoop(true);
sock.protocol().mcAddMembership(addr); sock.protocol().mcAddMembership(addr);
senf::Scheduler::instance().add( senf::Scheduler::instance().add(
sock, senf::membind(&MSniffer::dumpPacket, this)); sock, senf::membind(&MCSniffer::dumpPacket, this));
} }
private: private:
...@@ -125,9 +118,9 @@ int main(int argc, char const * argv[]) ...@@ -125,9 +118,9 @@ int main(int argc, char const * argv[])
std::ofstream f1 ("233.132.152.1.txt"); std::ofstream f1 ("233.132.152.1.txt");
std::ofstream f2 ("233.132.152.2.txt"); std::ofstream f2 ("233.132.152.2.txt");
MSniffer sniffer1 ( MCSniffer sniffer1 (
senf::INet4Address::INet4Address("233.132.152.1:22344"), f1); senf::INet4Address::INet4Address("233.132.152.1:22344"), f1);
MSniffer sniffer2 ( MCSniffer sniffer2 (
senf::INet4Address::INet4Address("233.132.152.2:22344"), f2); senf::INet4Address::INet4Address("233.132.152.2:22344"), f2);
senf::Scheduler::instance().process(); senf::Scheduler::instance().process();
...@@ -141,7 +134,7 @@ int main(int argc, char const * argv[]) ...@@ -141,7 +134,7 @@ int main(int argc, char const * argv[])
///////////////////////////////cc.e//////////////////////////////////////// ///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_ #undef prefix_
//#include "Sniffer.mpp" //#include "MCSniffer.mpp"
// Local Variables: // Local Variables:
......
...@@ -90,7 +90,7 @@ namespace senf { ...@@ -90,7 +90,7 @@ namespace senf {
\param[in] handle file descriptor or handle providing \param[in] handle file descriptor or handle providing
the Handle interface defined above. the Handle interface defined above.
\param[in] maxSize maximum number of bytes to read \param[in] maxSize maximum number of bytes to read
\param[in] cb callback \param[in] callback callback
\returns Smart pointer to new ReadHelper instance */ \returns Smart pointer to new ReadHelper instance */
template <class Predicate> template <class Predicate>
...@@ -106,7 +106,7 @@ namespace senf { ...@@ -106,7 +106,7 @@ namespace senf {
the Handle interface defined above. the Handle interface defined above.
\param[in] maxSize maximum number of bytes to read \param[in] maxSize maximum number of bytes to read
\param[in] predicate predicate to check \param[in] predicate predicate to check
\param[in] cb callback \param[in] callback callback
\returns smart pointer to new ReadHelper instance */ \returns smart pointer to new ReadHelper instance */
///@} ///@}
......
...@@ -73,7 +73,7 @@ namespace senf { ...@@ -73,7 +73,7 @@ namespace senf {
\param[in] handle file descriptor or handle providing \param[in] handle file descriptor or handle providing
the Handle interface defined above. the Handle interface defined above.
\param[in] data data to send \param[in] data data to send
\param[in] cb callback \param[in] callback callback
\returns smart pointer to new WriteHelper instance */ \returns smart pointer to new WriteHelper instance */
///@} ///@}
......
// $Id$ // $Id:PacketSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
// //
// Copyright (C) 2006 // Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
...@@ -118,12 +118,12 @@ namespace senf { ...@@ -118,12 +118,12 @@ namespace senf {
interface. The modes available are interface. The modes available are
<dl> <dl>
<dt>\e None</dt><dd>No special mode set. Only receive <dt><em>None</em></dt><dd>No special mode set. Only receive
packets addressed to the interface or of joined packets addressed to the interface or of joined
multicast groups</dd> multicast groups</dd>
<dt>\e AllMulticast</dt><dd>Additionally receive all <dt><em>AllMulticast</em></dt><dd>Additionally receive all
multicast traffic</dd> multicast traffic</dd>
<dt>\e Promiscuous</dt><dd>Receive all packets on the <dt><em> Promiscuous</em></dt><dd>Receive all packets on the
wire</dd> wire</dd>
</dl> </dl>
......
// $Id$ // $Id:ServerSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
// //
// Copyright (C) 2006 // Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
...@@ -86,7 +86,7 @@ namespace senf { ...@@ -86,7 +86,7 @@ namespace senf {
/** Depending on the type of \c Address, this will be either <tt>Address</tt> or <tt>Address /** Depending on the type of \c Address, this will be either <tt>Address</tt> or <tt>Address
const &</tt>. See <a const &</tt>. See <a
href="http://www.boost.org/libs/utility/call_traits.htm">call_traits documentation in href="http://www.boost.org/libs/utility/call_traits.htm">call_traits documentation in
the Boost.Utility library\endlink.</a> the Boost.Utility library.</a>
*/ */
typedef typename boost::call_traits<Address>::param_type AddressParam; typedef typename boost::call_traits<Address>::param_type AddressParam;
/// Corresponding client socket handle with the same policy /// Corresponding client socket handle with the same policy
...@@ -182,7 +182,7 @@ namespace senf { ...@@ -182,7 +182,7 @@ namespace senf {
///< Accept new connection ///< Accept new connection
/**< This variant will additionally return the remote /**< This variant will additionally return the remote
address of the client address of the client
\param[out] client address \param[out] addr address
\returns handle of new client connection \returns handle of new client connection
\see \ref accept() */ \see \ref accept() */
......
// $Id$ // $Id:SocketPolicy.hh 218 2007-03-20 14:39:32Z tho $
// //
// Copyright (C) 2006 // Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
...@@ -429,7 +429,7 @@ namespace senf { ...@@ -429,7 +429,7 @@ namespace senf {
This template is an example of the \e Axis \c Is family of template metafunctions. It will This template is an example of the \e Axis \c Is family of template metafunctions. It will
check, whether \c Trait is a valid compatible Policy class of \c SocketPolicy. \c Trait must check, whether \c Trait is a valid compatible Policy class of \c SocketPolicy. \c Trait must
be derived from AddressingPolicyBase (respectively \i Policy \c Base). be derived from AddressingPolicyBase (respectively \c Policy \c Base).
\see \ref policy_group \see \ref policy_group
*/ */
......
...@@ -61,7 +61,7 @@ namespace senf { ...@@ -61,7 +61,7 @@ namespace senf {
terminal and start a new process group. */ terminal and start a new process group. */
void redirect_stdio(std::string const & path = "/dev/null"); ///< Redirect STDIN, STDOUT and STDERR void redirect_stdio(std::string const & path = "/dev/null"); ///< Redirect STDIN, STDOUT and STDERR
/**< All standard file-descriptors will be redirected to the /**< All standard file-descriptors will be redirected to the
given path defaulting to <tt>/dev/null</tg> given path defaulting to <tt>/dev/null</tt>
\param[in] path path to redirect to */ \param[in] path path to redirect to */
/// @} /// @}
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
\endcode \endcode
The last sequence element always is the log message. Before that we have a number of log The last sequence element always is the log message. Before that we have a number of log
parameters <it>in arbitrary order</it>. Since giving all the parameters in every log message is parameters <i>in arbitrary order</i>. Since giving all the parameters in every log message is
to verbose, there are two helpful constructs to reduce the verbosity. Using \ref SENF_LOG_DEFAULTS it to verbose, there are two helpful constructs to reduce the verbosity. Using \ref SENF_LOG_DEFAULTS it
is possible to define the default logging parameters to be used within a given scope. Using is possible to define the default logging parameters to be used within a given scope. Using
\ref SENF_LOG_DEF_ALIAS you can define an alias (which is a scoped symbol) as an arbitrary \ref SENF_LOG_DEF_ALIAS you can define an alias (which is a scoped symbol) as an arbitrary
...@@ -131,7 +131,7 @@ namespace senf { ...@@ -131,7 +131,7 @@ namespace senf {
This macro will write it's last argument to the log stream. The last argument must be an This macro will write it's last argument to the log stream. The last argument must be an
expression which will be placed after a streaming \c operator<< (like expression which will be placed after a streaming \c operator<< (like
<it>some-log-sttream</it> \c << <it>last-macro-arg</it>). <i>some-log-sttream</i> \c << <i>last-macro-arg</i>).
\code \code
BOOST_LOG((parameters...)("log message " << args << ...)); BOOST_LOG((parameters...)("log message " << args << ...));
\endcode \endcode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment