From: tho Date: Thu, 29 Mar 2007 09:31:54 +0000 (+0000) Subject: some very small fixes X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=493cb51085dccf46823d6e56947bb30d7129bf1b;p=senf.git some very small fixes git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@223 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Examples/MCSniffer/MCSniffer.cc b/Examples/MCSniffer/MCSniffer.cc index 3c85556..7eecb55 100644 --- a/Examples/MCSniffer/MCSniffer.cc +++ b/Examples/MCSniffer/MCSniffer.cc @@ -27,26 +27,21 @@ // Custom includes #include #include - #include #include #include #include -#include // - +#include #include #include #include #include "Socket/UDPSocketHandle.hh" #include "Scheduler/Scheduler.hh" #include "Utils/membind.hh" - #include "Packets/EthernetPacket.hh" - - -//#include "Sniffer.mpp" +//#include "MCSniffer.mpp" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// diff --git a/Examples/MCSniffer/mcsniffer b/Examples/MCSniffer/mcsniffer deleted file mode 100755 index 4a70ab8..0000000 Binary files a/Examples/MCSniffer/mcsniffer and /dev/null differ diff --git a/Examples/Mainpage.dox b/Examples/Mainpage.dox index 2bd029c..002b0e1 100644 --- a/Examples/Mainpage.dox +++ b/Examples/Mainpage.dox @@ -1,5 +1,4 @@ /** \mainpage Examples - \anchor Examples_Main \ref sniffer */ diff --git a/Examples/Sniffer/Sniffer.cc b/Examples/Sniffer/Sniffer.cc index 40aec9c..9cf1883 100644 --- a/Examples/Sniffer/Sniffer.cc +++ b/Examples/Sniffer/Sniffer.cc @@ -118,27 +118,30 @@ class Sniffer senf::PacketSocketHandle sock; public: - Sniffer(std::string const & interface) - { sock.bind(senf::LLSocketAddress(interface)); } + Sniffer(std::string const & interface) + { + sock.bind(senf::LLSocketAddress(interface)); + } - void run() - { - senf::Scheduler::instance().add(sock, senf::membind(&Sniffer::dumpPacket, this)); - senf::Scheduler::instance().process(); - } + void run() + { + senf::Scheduler::instance().add( + sock, senf::membind(&Sniffer::dumpPacket, this)); + senf::Scheduler::instance().process(); + } private: void dumpPacket(senf::FileHandle /* ignored */, senf::Scheduler::EventId event) - { - std::string data (sock.read()); - senf::EthernetPacket::ptr packet ( - senf::Packet::create( - data.begin(), data.end())); - packet->dump(std::cout); - hexdump(packet->last()->begin(), - packet->last()->end()); - std::cout << "\n\n"; - } + { + std::string data (sock.read()); + senf::EthernetPacket::ptr packet ( + senf::Packet::create( + data.begin(), data.end())); + packet->dump(std::cout); + hexdump(packet->last()->begin(), + packet->last()->end()); + std::cout << "\n\n"; + } }; int scheduler_main(int argc, char const * argv[]) diff --git a/Scheduler/Scheduler.hh b/Scheduler/Scheduler.hh index aac4671..1887f5d 100644 --- a/Scheduler/Scheduler.hh +++ b/Scheduler/Scheduler.hh @@ -128,7 +128,7 @@ namespace senf { callback will be called for the given type of event on the given arbitrary file-descriptor or handle-like object. If there already is a Callback - register ed for one of the events requested, the new + registered for one of the events requested, the new handler will replace the old one. \param[in] handle file descriptor or handle providing the Handle interface defined above. diff --git a/Socket/SocketHandle.hh b/Socket/SocketHandle.hh index 3f3f88c..8cd567f 100644 --- a/Socket/SocketHandle.hh +++ b/Socket/SocketHandle.hh @@ -1,4 +1,4 @@ -// $Id$ +// $Id:SocketHandle.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) @@ -135,6 +135,9 @@ namespace senf { /**< Formats the complete state map value and returns it as a single multi-line string. + param lod level of detail requested. The interpretation + of this value is protocol specific + \implementation This member will be re-implemented in every derived class. See the state() documentation. */