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_ip.h>
00023 #include <conexus/ipv6_address.h>
00024 
00029 namespace Conexus
00030   {
00031 
00032   namespace IPv6
00033     {
00055     class IP : public IPBase::IPBase
00056       {
00057       public:
00062         IP(int type=-1, int protocol=0);
00063 
00064         virtual ~IP() throw();
00065 
00069         virtual void bind() throw (bind_error);
00070 
00071         virtual Address& local_interface();
00072 
00073         virtual Address& remote_address();
00074 
00075         virtual Conexus::IPBase::AddressBase& generic_local_interface();
00076 
00077         virtual Conexus::IPBase::AddressBase& generic_remote_address();
00078 
00079         virtual void set_remote_address(Address addr);
00080 
00081         virtual void unset_remote_address();
00082 
00083         virtual void set_local_interface(Address addr);
00084 
00085         virtual const std::string& object_type() { static std::string s("Conexus::IPv6::IP"); return s; }
00086 
00087         protected:
00088         Address m_local_interface;
00089         Address m_remote_address;
00090         bool m_remote_address_set;
00091 
00092         virtual void bind(Conexus::Address& a) throw (bind_error);
00093 
00094         virtual void on_local_interface_changed(unsigned which);
00095         virtual void on_remote_address_changed(unsigned which);
00096 
00097         void on_local_interface_changed_proxy(unsigned which);
00098         void on_remote_address_changed_proxy(unsigned which);
00099       };
00100 
00101   }
00102 
00103 }
00104 
00105 #endif

Generated on Sun Aug 6 12:16:57 2006 by  doxygen 1.4.6