X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FRaw%2FTunTapSocketHandle.hh;h=41c422fdac7ab8a83be24d8a055c917dbbe056d5;hb=9c33326f5d7f5ea2bd2231143427c2681158c55a;hp=340d2c738c2857c963da346a7b3e43bb63676679;hpb=14daa84b7c821626ae098bedd93ef07d98bf3a40;p=senf.git diff --git a/Socket/Protocols/Raw/TunTapSocketHandle.hh b/Socket/Protocols/Raw/TunTapSocketHandle.hh index 340d2c7..41c422f 100644 --- a/Socket/Protocols/Raw/TunTapSocketHandle.hh +++ b/Socket/Protocols/Raw/TunTapSocketHandle.hh @@ -1,8 +1,8 @@ // $Id:PacketSocketHandle.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// 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 @@ -21,11 +21,11 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief PacketProtocol and PacketSocketHandle public header + \brief PacketSocketProtocol and PacketSocketHandle public header */ -#ifndef HH_TunTapSocketHandle_ -#define HH_TunTapSocketHandle_ 1 +#ifndef HH_SENF_Socket_Protocols_Raw_TunTapSocketHandle_ +#define HH_SENF_Socket_Protocols_Raw_TunTapSocketHandle_ 1 // Custom includes #include "../../../Socket/SocketPolicy.hh" @@ -70,27 +70,27 @@ namespace senf { This class is utilized as the protocol class of the ProtocolClientSocketHandle via the Socket Handle typedefs above. */ - class TapProtocol - : public ConcreteSocketProtocol, + class TapSocketProtocol + : public ConcreteSocketProtocol, public BSDSocketProtocol { public: ///\name Constructors ///@{ - void init_client() const; + std::string init_client() const; ///< Create TAP socket /**< \todo document me */ /**< \note This member is implicitly called from the ProtocolClientSocketHandle::ProtocolClientSocketHandle() constructor */ - void init_client(std::string const & interface_name, bool const NO_PI=true) const; + std::string init_client(std::string const & interface_name, bool const NO_PI=true) const; ///< Create TAP socket /**< \todo document me \param[in] address remote address to connect to */ /**< \note This member is implicitly called from the ProtocolClientSocketHandle::ProtocolClientSocketHandle() constructor */ - + ///@} ///\name Abstract Interface Implementation @@ -98,12 +98,16 @@ namespace senf { unsigned available() const; bool eof() const; + unsigned int ifaceIndex() const; + std::string ifaceName() const; + private: + mutable unsigned int ifaceIndex_; ///@} }; - typedef ProtocolClientSocketHandle TapSocketHandle; - ///< SocketHandle of TapProtocol + typedef ProtocolClientSocketHandle TapSocketHandle; + ///< SocketHandle of TapSocketProtocol /**< \related TapPrototol */ /// @} @@ -116,7 +120,7 @@ namespace senf { //#include "TunTapSocketHandle.mpp" #endif - + // Local Variables: // mode: c++ // fill-column: 100