Fix SCons 1.2.0 build failure
[senf.git] / Socket / Protocols / INet / INetSocketProtocol.hh
1 // $Id$
2 //
3 // Copyright (C) 2006
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
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.
12 //
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.
17 //
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.
22
23 /** \file
24     \brief IPv[46]Protocol public header
25
26     \todo what about OOB data?
27
28     \todo Implement IP_RECVERR / MSG_ERRQUEUE. This should be placed
29     into an additional protocol facet since IP_RECVERR is only valid
30     for SOCK_DGRAM (UDP) and not SOCK_STREAM (TCP) sockets
31  */
32
33 #ifndef HH_SENF_Socket_Protocols_INet_INetSocketProtocol_
34 #define HH_SENF_Socket_Protocols_INet_INetSocketProtocol_ 1
35
36 // Custom includes
37 #include "../../../Socket/SocketProtocol.hh"
38 #include "INetAddressing.hh"
39 #include "../../../Socket/ClientSocketHandle.hh"
40 #include "../../../Socket/CommunicationPolicy.hh"
41
42 //#include "INetSocketProtocol.mpp"
43 ///////////////////////////////hh.p////////////////////////////////////////
44
45 namespace senf {
46
47     /// \addtogroup protocol_facets_group
48     /// @{
49
50     /** \brief Generic addressing type independent INet protocol facet
51      */
52     class INetSocketProtocol
53         : public virtual SocketProtocol
54     {
55     public:
56         void bindInterface(std::string const & iface) const;
57                                         ///< Bind socket to specific interface
58                                         /**< When a socket is bound to an interface, it will only
59                                              receive data received on that interface. If the
60                                              interface name is empty, the binding is removed.
61
62                                              \param[in] iface name of interface to bind to or empty
63                                                  to remove binding
64
65                                              \implementation Sets the SO_BINDTODEVICE socket option
66                                           */
67         std::string bindInterface();    ///< Get bound interface
68                                         /**< Returns the interface, the socket is currently bound
69                                              to. Returns the empty string, if not bound to any
70                                              interface.
71                                              \returns Bound interface name */
72     };
73
74     /// @}
75
76 }
77
78 ///////////////////////////////hh.e////////////////////////////////////////
79 //#include "INetSocketProtocol.cci"
80 //#include "INetSocketProtocol.ct"
81 //#include "INetSocketProtocol.cti"
82 #endif
83
84 \f
85 // Local Variables:
86 // mode: c++
87 // fill-column: 100
88 // c-file-style: "senf"
89 // indent-tabs-mode: nil
90 // ispell-local-dictionary: "american"
91 // compile-command: "scons -u test"
92 // comment-column: 40
93 // End: