#include <ipaddress_interface.h>
Public Types | |
typedef ConexusPointer < IPAddressInterface > | pointer |
Public Member Functions | |
IPAddressInterface () | |
virtual | ~IPAddressInterface () |
virtual std::string | host_string () const =0 |
Returns the host as a string. | |
virtual std::string | subnet_mask_string () const =0 |
Returns the netmask associated with this address as a string. | |
virtual unsigned | prefix_length () const =0 |
Returns the prefix length of the subnet mask associated with this address. | |
virtual std::string | prefix_length_string () const =0 |
Returns the prefix length of the subnet mask associated with this address as a string. | |
virtual std::string | host_subnet_mask_string () const =0 |
Returns the host as an host/subnetmask string. | |
virtual std::string | cidr_host_string () const =0 |
Returns the host as a CIDR host/prefixlen string. | |
virtual std::string | prefix_string () const =0 |
Returns the prefix part of this address as a string. | |
virtual std::string | local_address_string () const =0 |
Returns the local part of this address as a string. | |
virtual uint16_t | port () const =0 |
Returns the port number associated with this address. | |
virtual std::string | port_string () const =0 |
Returns the port number associated with this address as a string. | |
virtual void | set_host (const std::string &host)=0 |
Sets the host to the specified value. | |
virtual void | set_host (const std::string &host, uint16_t port)=0 |
Sets the host and port to the specified value. | |
virtual void | set_prefix_length (unsigned prefix_length)=0 |
Sets the prefix length to the specified value. | |
virtual void | set_prefix_length (const std::string &prefix_length)=0 |
Sets the prefix length to the specified value. | |
virtual void | set_port (uint16_t port)=0 |
Sets the port portion of this address. | |
virtual void | set_port (const std::string &port)=0 |
Sets the port to the specified value. | |
virtual std::string | hostname () const =0 |
Performs a DNS query on the currently set host and returns the hostname string. | |
virtual std::string | servicename () const =0 |
Performs a service name lookup on the currently set port and returns the servicename string. | |
virtual bool | is_multicast () const =0 |
True if this is a multicast address. | |
virtual bool | is_any () const =0 |
True if this is the any address. | |
virtual bool | is_loopback () const =0 |
True if this is the loopback address. | |
virtual sigc::signal< void > & | signal_changed ()=0 |
virtual sigc::signal< void > & | signal_host_changed ()=0 |
virtual sigc::signal< void > & | signal_port_changed ()=0 |
virtual sigc::signal< void > & | signal_prefix_changed ()=0 |
virtual bool | is_ipv4 ()=0 |
virtual bool | is_ipv6 ()=0 |
This class represents an IP address string based interface to both IPv4 and IPv6 addresses which are further implemented in IPv4::Address and IPv6::Address.
typedef ConexusPointer<IPAddressInterface> Conexus::IPAddressInterface::pointer |
Reimplemented in Conexus::IPv4::Address.
Conexus::IPAddressInterface::IPAddressInterface | ( | ) | [inline] |
virtual Conexus::IPAddressInterface::~IPAddressInterface | ( | ) | [inline, virtual] |
virtual std::string Conexus::IPAddressInterface::cidr_host_string | ( | ) | const [pure virtual] |
virtual std::string Conexus::IPAddressInterface::host_string | ( | ) | const [pure virtual] |
virtual std::string Conexus::IPAddressInterface::host_subnet_mask_string | ( | ) | const [pure virtual] |
virtual std::string Conexus::IPAddressInterface::hostname | ( | ) | const [pure virtual] |
Performs a DNS query on the currently set host and returns the hostname string.
Implemented in Conexus::IPv4::Address.
virtual bool Conexus::IPAddressInterface::is_any | ( | ) | const [pure virtual] |
virtual bool Conexus::IPAddressInterface::is_ipv4 | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::Address.
virtual bool Conexus::IPAddressInterface::is_ipv6 | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::Address.
virtual bool Conexus::IPAddressInterface::is_loopback | ( | ) | const [pure virtual] |
virtual bool Conexus::IPAddressInterface::is_multicast | ( | ) | const [pure virtual] |
virtual std::string Conexus::IPAddressInterface::local_address_string | ( | ) | const [pure virtual] |
virtual uint16_t Conexus::IPAddressInterface::port | ( | ) | const [pure virtual] |
Returns the port number associated with this address.
Implemented in Conexus::IPv4::Address.
Referenced by Conexus::Gtk::PortEntry::on_controlled_port_changed().
virtual std::string Conexus::IPAddressInterface::port_string | ( | ) | const [pure virtual] |
Returns the port number associated with this address as a string.
Implemented in Conexus::IPv4::Address.
virtual unsigned Conexus::IPAddressInterface::prefix_length | ( | ) | const [pure virtual] |
Returns the prefix length of the subnet mask associated with this address.
Implemented in Conexus::IPv4::Address.
virtual std::string Conexus::IPAddressInterface::prefix_length_string | ( | ) | const [pure virtual] |
Returns the prefix length of the subnet mask associated with this address as a string.
Implemented in Conexus::IPv4::Address.
virtual std::string Conexus::IPAddressInterface::prefix_string | ( | ) | const [pure virtual] |
virtual std::string Conexus::IPAddressInterface::servicename | ( | ) | const [pure virtual] |
Performs a service name lookup on the currently set port and returns the servicename string.
Implemented in Conexus::IPv4::Address.
virtual void Conexus::IPAddressInterface::set_host | ( | const std::string & | host, | |
uint16_t | port | |||
) | [pure virtual] |
virtual void Conexus::IPAddressInterface::set_host | ( | const std::string & | host | ) | [pure virtual] |
Sets the host to the specified value.
Implemented in Conexus::IPv4::Address.
Referenced by Conexus::Gtk::HostEntry::apply().
virtual void Conexus::IPAddressInterface::set_port | ( | const std::string & | port | ) | [pure virtual] |
virtual void Conexus::IPAddressInterface::set_port | ( | uint16_t | port | ) | [pure virtual] |
Sets the port portion of this address.
Implemented in Conexus::IPv4::Address.
Referenced by Conexus::Gtk::PortEntry::apply().
virtual void Conexus::IPAddressInterface::set_prefix_length | ( | const std::string & | prefix_length | ) | [pure virtual] |
virtual void Conexus::IPAddressInterface::set_prefix_length | ( | unsigned | prefix_length | ) | [pure virtual] |
virtual sigc::signal<void>& Conexus::IPAddressInterface::signal_changed | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::Address.
virtual sigc::signal<void>& Conexus::IPAddressInterface::signal_host_changed | ( | ) | [pure virtual] |
virtual sigc::signal<void>& Conexus::IPAddressInterface::signal_port_changed | ( | ) | [pure virtual] |
virtual sigc::signal<void>& Conexus::IPAddressInterface::signal_prefix_changed | ( | ) | [pure virtual] |
Implemented in Conexus::IPv4::Address.
virtual std::string Conexus::IPAddressInterface::subnet_mask_string | ( | ) | const [pure virtual] |
Returns the netmask associated with this address as a string.
Implemented in Conexus::IPv4::Address.