00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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