X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FRaw%2FPacketSocketHandle.hh;h=0ee1f8d7f37c52360c6008b134b0800742b19f49;hb=6f50bf49e282c0528f51faa0a245bbfa2b867399;hp=873b7ef5a3f8cb4b6cd3bfb6dd922744698f434e;hpb=6bb3fa3caaa41dab4d5b451ca27e70f9e55e49d6;p=senf.git diff --git a/Socket/Protocols/Raw/PacketSocketHandle.hh b/Socket/Protocols/Raw/PacketSocketHandle.hh index 873b7ef..0ee1f8d 100644 --- a/Socket/Protocols/Raw/PacketSocketHandle.hh +++ b/Socket/Protocols/Raw/PacketSocketHandle.hh @@ -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 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -30,18 +30,17 @@ #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 +53,7 @@ namespace senf { DatagramFramingPolicy, UnconnectedCommunicationPolicy, ReadablePolicy, - WriteablePolicy, - SocketBufferingPolicy + WriteablePolicy >::policy Packet_Policy; ///< Policy of PacketProtocol /** \brief Raw Packet-Socket access (Linux) @@ -79,9 +77,8 @@ namespace senf { Socket Handle typedefs above. */ class PacketProtocol - : public ConcreteSocketProtocol, - public BSDSocketProtocol, - public senf::pool_alloc_mixin + : public ConcreteSocketProtocol, + public BSDSocketProtocol { public: enum SocketType { RawSocket, DatagramSocket }; @@ -114,41 +111,27 @@ namespace senf { ///\name Protocol Interface ///@{ - // See LLSocketAddress for a discussion/rationale for ForwardRange here - template - 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 Boost.Range) - 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 - 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 clone() const; unsigned available() const; bool eof() const; ///@} - - private: - template - 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 PacketSocketHandle; @@ -160,8 +143,8 @@ namespace senf { ///////////////////////////////hh.e//////////////////////////////////////// //#include "PacketSocketHandle.cci" -#include "PacketSocketHandle.ct" -#include "PacketSocketHandle.cti" +//#include "PacketSocketHandle.ct" +//#include "PacketSocketHandle.cti" //#include "PacketSocketHandle.mpp" #endif