debian/libconexus-dev/usr/include/conexus-0.5/conexus/ipv4_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_IPV4IP_H
00020 #define CONEXUS_IPV4IP_H
00021 
00022 #include <conexus/ip.h>
00023 #include <conexus/ipv4_address.h>
00024 
00029 namespace Conexus
00030   {
00031 
00032   namespace IPv4
00033     {
00055     class IP : public Conexus::IP
00056       {
00057       public:
00062         IP(int type=-1, int protocol=0);
00063 
00064         virtual ~IP() throw();
00065 
00069         virtual void bind() throw (bind_exception);
00070 
00071         virtual Address& local_interface();
00072 
00073         virtual Address& remote_address();
00074 
00075         virtual IPAddress& generic_local_interface();
00076 
00077         virtual IPAddress& 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::IPv4::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_exception);
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 
00106 #endif

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