// Definition of non-inline non-template functions
-//#include "Sniffer.hh"
-//#include "Sniffer.ih"
+//#include "MCSniffer.hh"
+//#include "MCSniffer.ih"
// Custom includes
-#include <string>
#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 <iostream>
#include <iomanip>
#include "Socket/UDPSocketHandle.hh"
#include "Scheduler/Scheduler.hh"
-#include "Utils/membind.hh"
#include "Packets/EthernetPacket.hh"
+#include "Utils/membind.hh"
//#include "MCSniffer.mpp"
}
-class MSniffer
+class MCSniffer
{
senf::UDPv4ClientSocketHandle sock;
std::ostream& stream;
public:
- MSniffer(senf::INet4Address addr, std::ostream& s)
+ MCSniffer(senf::INet4Address addr, std::ostream& s)
: stream(s)
{
sock.protocol().bind(addr);
sock.protocol().mcLoop(true);
sock.protocol().mcAddMembership(addr);
senf::Scheduler::instance().add(
- sock, senf::membind(&MSniffer::dumpPacket, this));
+ sock, senf::membind(&MCSniffer::dumpPacket, this));
}
private:
std::ofstream f1 ("233.132.152.1.txt");
std::ofstream f2 ("233.132.152.2.txt");
- MSniffer sniffer1 (
+ MCSniffer sniffer1 (
senf::INet4Address::INet4Address("233.132.152.1:22344"), f1);
- MSniffer sniffer2 (
+ MCSniffer sniffer2 (
senf::INet4Address::INet4Address("233.132.152.2:22344"), f2);
senf::Scheduler::instance().process();
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
-//#include "Sniffer.mpp"
+//#include "MCSniffer.mpp"
\f
// Local Variables:
\param[in] handle file descriptor or handle providing
the Handle interface defined above.
\param[in] maxSize maximum number of bytes to read
- \param[in] cb callback
+ \param[in] callback callback
\returns Smart pointer to new ReadHelper instance */
template <class Predicate>
the Handle interface defined above.
\param[in] maxSize maximum number of bytes to read
\param[in] predicate predicate to check
- \param[in] cb callback
+ \param[in] callback callback
\returns smart pointer to new ReadHelper instance */
///@}
\param[in] handle file descriptor or handle providing
the Handle interface defined above.
\param[in] data data to send
- \param[in] cb callback
+ \param[in] callback callback
\returns smart pointer to new WriteHelper instance */
///@}
-// $Id$
+// $Id:PacketSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
interface. The modes available are
<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
multicast groups</dd>
- <dt>\e AllMulticast</dt><dd>Additionally receive all
+ <dt><em>AllMulticast</em></dt><dd>Additionally receive all
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>
</dl>
-// $Id$
+// $Id:ServerSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
/** Depending on the type of \c Address, this will be either <tt>Address</tt> or <tt>Address
const &</tt>. See <a
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;
/// Corresponding client socket handle with the same policy
///< Accept new connection
/**< This variant will additionally return the remote
address of the client
- \param[out] client address
+ \param[out] addr address
\returns handle of new client connection
\see \ref accept() */
-// $Id$
+// $Id:SocketPolicy.hh 218 2007-03-20 14:39:32Z tho $
//
// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
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
- be derived from AddressingPolicyBase (respectively \i Policy \c Base).
+ be derived from AddressingPolicyBase (respectively \c Policy \c Base).
\see \ref policy_group
*/
terminal and start a new process group. */
void redirect_stdio(std::string const & path = "/dev/null"); ///< Redirect STDIN, STDOUT and STDERR
/**< 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 */
/// @}
\endcode
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
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
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
- <it>some-log-sttream</it> \c << <it>last-macro-arg</it>).
+ <i>some-log-sttream</i> \c << <i>last-macro-arg</i>).
\code
BOOST_LOG((parameters...)("log message " << args << ...));
\endcode