4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Stefan Bund <stefan.bund@fokus.fraunhofer.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 IPv[46]Protocol public header
26 \todo what about OOB data?
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
33 #ifndef HH_INetProtocol_
34 #define HH_INetProtocol_ 1
37 #include "Socket/SocketProtocol.hh"
38 #include "INetAddressing.hh"
39 #include "Socket/ClientSocketHandle.hh"
40 #include "Socket/CommunicationPolicy.hh"
42 //#include "INetProtocol.mpp"
43 ///////////////////////////////hh.p////////////////////////////////////////
47 /// \addtogroup protocol_facets_group
50 /** \brief Protocol facet providing IPv4 Addressing related API
52 This protocol facet introduces all the socket api protocol members which are related to IPv4
55 \todo Is it safe, not to allow setting the interface index on add/drop? what does it do
56 (especially if the local address is given ?). What have I been thinking here ???
58 \todo connect() is only available on stream sockets. We want to access bind() and connect()
59 via the ClientSocketHandle -> see SocketProtocol todo point
62 : public virtual SocketProtocol
65 void connect(INet4SocketAddress const & address) const; ///< Connect to remote address
66 /**< \todo make this obsolete by allowing access to the
67 ClientSocketHandle from ConcreateSocketProtocol
68 \param[in] address Address to connect to */
69 void bind(INet4SocketAddress const & address) const; ///< Set local socket address
70 /**< \todo make this obsolete by allowing access to the
71 ClientSocketHandle from ConcreateSocketProtocol
72 \param[in] address Address to set */
75 /** \brief Protocol facet providing IPv6 Addressing related API
77 This protocol facet introduces all the socket api protocol members which are related to IPv6
81 : public virtual SocketProtocol
84 void connect(INet6SocketAddress const & address) const; ///< Connect to remote address
85 /**< \todo make this obsolete by allowing access to the
86 ClientSocketHandle from ConcreateSocketProtocol
87 \param[in] address Address to connect to */
88 void bind(INet6SocketAddress const & address) const; ///< Set local socket address
89 /**< \todo make this obsolete by allowing access to the
90 ClientSocketHandle from ConcreateSocketProtocol
91 \param[in] address Address to set */
98 ///////////////////////////////hh.e////////////////////////////////////////
99 //#include "INetProtocol.cci"
100 //#include "INetProtocol.ct"
101 //#include "INetProtocol.cti"
108 // c-file-style: "senf"
109 // indent-tabs-mode: nil
110 // ispell-local-dictionary: "american"
111 // compile-command: "scons -u test"
112 // comment-column: 40