conexus/ipv6_ip.h

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

Generated on Tue Mar 13 19:54:45 2007 by  doxygen 1.5.1