removed some useless spaces; not very important, I know :)
[senf.git] / Socket / Protocols / Raw / PacketSocketHandle.hh
index 873b7ef..4869214 100644 (file)
@@ -1,9 +1,9 @@
 // $Id:PacketSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 
 /** \file
     \brief PacketProtocol and PacketSocketHandle public header
-
-    \todo Implement global promisc() helper based on ioctl() interface.
  */
 
 #ifndef HH_PacketSocketHandle_
 #define HH_PacketSocketHandle_ 1
 
 // Custom includes
-#include "Socket/SocketPolicy.hh"
-#include "Socket/SocketProtocol.hh"
-#include "Socket/ProtocolClientSocketHandle.hh"
-#include "Socket/FramingPolicy.hh"
-#include "Socket/CommunicationPolicy.hh"
-#include "Socket/ReadWritePolicy.hh"
-#include "Socket/BufferingPolicy.hh"
-#include "Socket/Protocols/BSDSocketProtocol.hh"
+#include "../../../Socket/SocketPolicy.hh"
+#include "../../../Socket/SocketProtocol.hh"
+#include "../../../Socket/ProtocolClientSocketHandle.hh"
+#include "../../../Socket/FramingPolicy.hh"
+#include "../../../Socket/CommunicationPolicy.hh"
+#include "../../../Socket/ReadWritePolicy.hh"
+#include "../../../Socket/Protocols/BSDSocketProtocol.hh"
 #include "LLAddressing.hh"
 
 //#include "PacketSocketHandle.mpp"
-#include "PacketSocketHandle.ih"
+//#include "PacketSocketHandle.ih"
 ///////////////////////////////hh.p////////////////////////////////////////
 
 namespace senf {
@@ -54,8 +51,7 @@ namespace senf {
         DatagramFramingPolicy,
         UnconnectedCommunicationPolicy,
         ReadablePolicy,
-        WriteablePolicy,
-        SocketBufferingPolicy
+        WriteablePolicy
         >::policy Packet_Policy;        ///< Policy of PacketProtocol
 
     /** \brief Raw Packet-Socket access (Linux)
@@ -79,9 +75,8 @@ namespace senf {
         Socket Handle typedefs above.
      */
     class PacketProtocol
-        : public ConcreteSocketProtocol<Packet_Policy>,
-          public BSDSocketProtocol,
-          public senf::pool_alloc_mixin<PacketProtocol>
+        : public ConcreteSocketProtocol<Packet_Policy, PacketProtocol>,
+          public BSDSocketProtocol
     {
     public:
         enum SocketType { RawSocket, DatagramSocket };
@@ -114,41 +109,27 @@ namespace senf {
         ///\name Protocol Interface
         ///@{
 
-        // See LLSocketAddress for a discussion/rationale for ForwardRange here
-        template <class ForwardRange>
-        void mcAdd(std::string interface, ForwardRange const & address) const;
+        void mcAdd(std::string const & interface, MACAddress const & address) const;
                                         ///< Enable reception of a multicast group
-                                        /**< mcAdd will join a new multicast group. The address
-                                             parameter is specified as an arbitrary forward range
-                                             (see <a
-                                             href="http://www.boost.org/libs/range/index.html">Boost.Range</a>)
-                                             of up to 8 bytes. This  allows to initialize the
-                                             address from an arbitrary sources without excessive
-                                             copying.
+                                        /**< mcAdd will join a new multicast group.
 
                                              \param[in] interface interface with which to join
                                              \param[in] address multicast address to join
 
                                              \see \ref LLSocketAddress */
-        template <class ForwardRange>
-        void mcDrop(std::string interface, ForwardRange const & address) const;
+        void mcDrop(std::string const & interface, MACAddress const & address) const;
                                         ///< Disable reception of a multicast group
                                         /**< \see \ref mcAdd() */
+
         ///@}
 
         ///\name Abstract Interface Implementation
         ///@{
 
-        std::auto_ptr<SocketProtocol> clone() const;
         unsigned available() const;
         bool eof() const;
 
         ///@}
-
-    private:
-        template<class ForwardRange>
-        void do_mc(std::string interface, ForwardRange const & address, bool add) const;
-        void do_mc_i(std::string interface, detail::LLAddressCopier const & copier, bool add) const;
     };
 
     typedef ProtocolClientSocketHandle<PacketProtocol> PacketSocketHandle;
@@ -160,8 +141,8 @@ namespace senf {
 
 ///////////////////////////////hh.e////////////////////////////////////////
 //#include "PacketSocketHandle.cci"
-#include "PacketSocketHandle.ct"
-#include "PacketSocketHandle.cti"
+//#include "PacketSocketHandle.ct"
+//#include "PacketSocketHandle.cti"
 //#include "PacketSocketHandle.mpp"
 #endif