X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FINetProtocol.hh;h=bedf7a8b7eb16491b707f9515247eb6a68e3920a;hb=9a988902090d28007578e93bffd809f6bd913155;hp=a5a3cd60fb7af77e8c71e5ecfca5d2290d8f45a4;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/INetProtocol.hh b/Socket/INetProtocol.hh index a5a3cd6..bedf7a8 100644 --- a/Socket/INetProtocol.hh +++ b/Socket/INetProtocol.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -20,11 +20,15 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// TODO: what about OOB data? das OOB Data block receipt of normal data ? +/** \file + \brief IPv[46]Protocol public header -// TODO: Implement IP_RECVERR / MSG_ERRQUEUE. This should be placed -// into an additional protocol class since IP_RECVERR is only valid -// for SOCK_DGRAM (UDP) and not SOCK_STREAM (TCP) sockets + \todo what about OOB data? + + \todo Implement IP_RECVERR / MSG_ERRQUEUE. This should be placed + into an additional protocol facet since IP_RECVERR is only valid + for SOCK_DGRAM (UDP) and not SOCK_STREAM (TCP) sockets + */ #ifndef HH_INetProtocol_ #define HH_INetProtocol_ 1 @@ -38,43 +42,58 @@ //#include "INetProtocol.mpp" ///////////////////////////////hh.p//////////////////////////////////////// -namespace satcom { -namespace lib { +namespace senf { - class IPv4Protocol - : public virtual SocketProtocol - { - public: - void connect(INet4Address const & address) const; - void bind(INet4Address const & address) const; + /// \addtogroup protocol_facets_group + /// @{ - unsigned mcTTL() const; - void mcTTL(unsigned value) const; + /** \brief Protocol facet providing IPv4 Addressing related API - bool mcLoop() const; - void mcLoop(bool value) const; + This protocol facet introduces all the socket api protocol members which are related to IPv4 + addressing. - // TODO: Is it safe, not to allow setting the interface - // index on add/drop? what does it do (especially if - // the local addres is given ?) - - // TODO: move all multicast-methods into an extra - // IPv4MulticastProtocol class + \todo Is it safe, not to allow setting the interface index on add/drop? what does it do + (especially if the local address is given ?). What have I been thinking here ??? - void mcAddMembership(INet4Address const & mcAddr) const; - void mcAddMembership(INet4Address const & mcAddr, INet4Address const & localAddr) const; + \todo connect() is only available on stream sockets. We want to access bind() and connect() + via the ClientSocketHandle -> see SocketProtocol todo point + */ + class IPv4Protocol + : public virtual SocketProtocol + { + public: + void connect(INet4Address const & address) const; ///< Connect to remote address + /**< \todo make this obsolete by allowing access to the + ClientSocketHandle from ConcreateSocketProtocol + \param[in] address Address to connect to */ + void bind(INet4Address const & address) const; ///< Set local socket address + /**< \todo make this obsolete by allowing access to the + ClientSocketHandle from ConcreateSocketProtocol + \param[in] address Address to set */ + }; - void mcDropMembership(INet4Address const & mcAddr) const; - void mcDropMembership(INet4Address const & mcAddr, INet4Address const & localAddr) const; + /** \brief Protocol facet providing IPv6 Addressing related API - void mcIface(std::string iface = std::string()) const; - }; - + This protocol facet introduces all the socket api protocol members which are related to IPv6 + addressing. + */ class IPv6Protocol : public virtual SocketProtocol - {}; + { + public: + void connect(INet6SocketAddress const & address) const; ///< Connect to remote address + /**< \todo make this obsolete by allowing access to the + ClientSocketHandle from ConcreateSocketProtocol + \param[in] address Address to connect to */ + void bind(INet6SocketAddress const & address) const; ///< Set local socket address + /**< \todo make this obsolete by allowing access to the + ClientSocketHandle from ConcreateSocketProtocol + \param[in] address Address to set */ + }; + + /// @} -}} +} ///////////////////////////////hh.e//////////////////////////////////////// //#include "INetProtocol.cci" @@ -85,5 +104,8 @@ namespace lib { // Local Variables: // mode: c++ -// c-file-style: "satcom" +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: