1 // $Id:PacketSocketHandle.hh 218 2007-03-20 14:39:32Z tho $
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief PacketProtocol and PacketSocketHandle public header
26 \todo Implement global promisc() helper based on ioctl() interface.
29 #ifndef HH_TunTapSocketHandle_
30 #define HH_TunTapSocketHandle_ 1
33 #include "../../../Socket/SocketPolicy.hh"
34 #include "../../../Socket/SocketProtocol.hh"
35 #include "../../../Socket/ProtocolClientSocketHandle.hh"
36 #include "../../../Socket/FramingPolicy.hh"
37 #include "../../../Socket/CommunicationPolicy.hh"
38 #include "../../../Socket/ReadWritePolicy.hh"
39 #include "../../../Socket/Protocols/BSDSocketProtocol.hh"
40 #include "LLAddressing.hh"
42 //#include "TunTapSocketHandle.mpp"
43 //#include "TunTapSocketHandle.ih"
44 ///////////////////////////////hh.p////////////////////////////////////////
48 /// \addtogroup concrete_protocol_group
51 typedef MakeSocketPolicy<
53 DatagramFramingPolicy,
54 ConnectedCommunicationPolicy,
57 >::policy Tap_Policy; ///< Policy for TAP
63 \par Socket Handle typedefs:
66 \par Policy Interface:
72 This class is utilized as the protocol class of the ProtocolClientSocketHandle via the
73 Socket Handle typedefs above.
76 : public ConcreteSocketProtocol<Tap_Policy>,
77 public BSDSocketProtocol,
78 public senf::pool_alloc_mixin<TapProtocol>
83 void init_client() const;
84 ///< Create TAP socket
85 /**< \todo document me */
86 /**< \note This member is implicitly called from the
87 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
89 void init_client(std::string const & interface_name, bool const NO_PI=true) const;
90 ///< Create TAP socket
91 /**< \todo document me
92 \param[in] address remote address to connect to */
93 /**< \note This member is implicitly called from the
94 ProtocolClientSocketHandle::ProtocolClientSocketHandle()
99 ///\name Abstract Interface Implementation
102 std::auto_ptr<SocketProtocol> clone() const;
103 unsigned available() const;
109 typedef ProtocolClientSocketHandle<TapProtocol> TapSocketHandle;
110 ///< SocketHandle of TapProtocol
111 /**< \related TapPrototol */
116 ///////////////////////////////hh.e////////////////////////////////////////
117 //#include "TunTapSocketHandle.cci"
118 //#include "TunTapSocketHandle.ct"
119 //#include "TunTapSocketHandle.cti"
120 //#include "TunTapSocketHandle.mpp"
127 // c-file-style: "senf"
128 // indent-tabs-mode: nil
129 // ispell-local-dictionary: "american"
130 // compile-command: "scons -u test"
131 // comment-column: 40