some very small fixes
tho [Thu, 29 Mar 2007 09:31:54 +0000 (09:31 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@223 270642c3-0616-0410-b53a-bc976706d245

Examples/MCSniffer/MCSniffer.cc
Examples/MCSniffer/mcsniffer [deleted file]
Examples/Mainpage.dox
Examples/Sniffer/Sniffer.cc
Scheduler/Scheduler.hh
Socket/SocketHandle.hh

index 3c85556..7eecb55 100644 (file)
 // 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 <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 "Sniffer.mpp"
+//#include "MCSniffer.mpp"
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
 
diff --git a/Examples/MCSniffer/mcsniffer b/Examples/MCSniffer/mcsniffer
deleted file mode 100755 (executable)
index 4a70ab8..0000000
Binary files a/Examples/MCSniffer/mcsniffer and /dev/null differ
index 2bd029c..002b0e1 100644 (file)
@@ -1,5 +1,4 @@
 /** \mainpage Examples
-    \anchor Examples_Main
     
     \ref sniffer
 */
index 40aec9c..9cf1883 100644 (file)
@@ -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<senf::EthernetPacket>(
-                    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<senf::EthernetPacket>(
+                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[])
index aac4671..1887f5d 100644 (file)
@@ -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.
index 3f3f88c..8cd567f 100644 (file)
@@ -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. */