conexus logo

ipv6_ip.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the conexus library.                             *
00006  *                                                                         *
00007  *   The conexus library is free software; you can redistribute it and/or  *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The conexus library is distributed in the hope that it will be        *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef CONEXUS_IPV6IP_H
00020 #define CONEXUS_IPV6IP_H
00021 
00022 #include <conexus/ip.h>
00023 #include <conexus/ipv6_address.h>
00024 
00025 namespace Conexus
00026 {
00027 
00028   namespace IPv6
00029   {
00053     class IP : public Conexus::IP
00054     {
00055 
00056       protected:
00057 
00062         IP( int type = -1, int protocol = 0 );
00063 
00064       public:
00066         typedef ConexusPointer<IP> pointer;
00067 
00068         virtual ~IP() throw();
00069 
00073         virtual void bind() throw ( bind_exception );
00074 
00075         virtual void bind( const Conexus::Address& a ) throw ( bind_exception );
00076 
00077         virtual void connect() throw ( connect_exception );
00078 
00079         virtual void connect( const Address& a ) throw ( connect_exception );
00080 
00081         virtual Address& local_address();
00082 
00083         virtual Address& remote_address();
00084 
00085         virtual IPAddressInterface& generic_local_address();
00086 
00087         virtual IPAddressInterface& generic_remote_address();
00088 
00089         virtual void set_remote_address( const Address& addr );
00090 
00091         virtual void set_remote_address( uint32_t addr, uint16_t port );
00092 
00093         virtual void set_remote_address( const struct in6_addr& addr, uint16_t port );
00094 
00095         virtual void set_remote_address( const std::string& addr, uint16_t port );
00096 
00097         virtual void unset_remote_address();
00098 
00099         virtual void set_local_address( const Address& addr );
00100 
00101         virtual void set_local_address( uint32_t addr, uint16_t port );
00102 
00103         virtual void set_local_address( const struct in6_addr& addr, uint16_t port );
00104 
00105         virtual void set_local_address( const std::string& addr, uint16_t port );
00106 
00107       protected:
00108         Address m_local_address;
00109         Address m_remote_address;
00110         bool m_remote_address_set;
00111 
00112         virtual void on_local_address_changed( );
00113         virtual void on_remote_address_changed( );
00114 
00115         void on_local_address_changed_proxy( );
00116         void on_remote_address_changed_proxy( );
00117     };
00118 
00119   }
00120 
00121 }
00122 
00123 #endif

Generated on Wed Jul 8 15:50:07 2009 for conexus by doxygen 1.5.8