X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FINet%2FINetProtocol.hh;h=89daa57301fc96e7f28a89965b79df351dfb3b1f;hb=6f50bf49e282c0528f51faa0a245bbfa2b867399;hp=49687c67474bf6c0160d36629fd821a6e0c83b49;hpb=9c67039f2a8d9c445ce21912ed814743f61b104c;p=senf.git diff --git a/Socket/Protocols/INet/INetProtocol.hh b/Socket/Protocols/INet/INetProtocol.hh index 49687c6..89daa57 100644 --- a/Socket/Protocols/INet/INetProtocol.hh +++ b/Socket/Protocols/INet/INetProtocol.hh @@ -1,9 +1,9 @@ // $Id$ // // 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 @@ -34,10 +34,10 @@ #define HH_INetProtocol_ 1 // Custom includes -#include "Socket/SocketProtocol.hh" +#include "../../../Socket/SocketProtocol.hh" #include "INetAddressing.hh" -#include "Socket/ClientSocketHandle.hh" -#include "Socket/CommunicationPolicy.hh" +#include "../../../Socket/ClientSocketHandle.hh" +#include "../../../Socket/CommunicationPolicy.hh" //#include "INetProtocol.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -47,6 +47,28 @@ namespace senf { /// \addtogroup protocol_facets_group /// @{ + class INetProtocol + : public virtual SocketProtocol + { + public: + void bindInterface(std::string const & iface) const; + ///< Bind socket to specific interface + /**< When a socket is bound to an interface, it will only + receive data received on that interface. If the + interface name is empty, the binding is removed. + + \param[in] iface name of interface to bind to or empty + to remove binding + + \implementation Sets the SO_BINDTODEVICE socket option + */ + std::string bindInterface(); ///< Get bound interface + /**< Returns the interface, the socket is currently bound + to. Returns the empty string, if not bound to any + interface. + \returns Bound interface name */ + }; + /** \brief Protocol facet providing IPv4 Addressing related API This protocol facet introduces all the socket api protocol members which are related to IPv4 @@ -62,14 +84,6 @@ namespace senf { : public virtual SocketProtocol { public: - void connect(INet4SocketAddress 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(INet4SocketAddress 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 */ }; /** \brief Protocol facet providing IPv6 Addressing related API @@ -81,14 +95,6 @@ namespace senf { : 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 */ }; /// @}