libfilezilla
iputils.hpp
Go to the documentation of this file.
1 #ifndef LIBFILEZILLA_IPUTILS_HEADER
2 #define LIBFILEZILLA_IPUTILS_HEADER
3 
4 #include "libfilezilla.hpp"
5 
10 namespace fz {
11 
18 std::string FZ_PUBLIC_SYMBOL get_ipv6_long_form(std::string const& short_address);
19 std::wstring FZ_PUBLIC_SYMBOL get_ipv6_long_form(std::wstring const& short_address);
20 
37 bool FZ_PUBLIC_SYMBOL is_routable_address(std::string const& address);
38 bool FZ_PUBLIC_SYMBOL is_routable_address(std::wstring const& address);
39 
40 enum class address_type
41 {
42  unknown,
43  ipv4,
44  ipv6
45 };
46 
48 address_type FZ_PUBLIC_SYMBOL get_address_type(std::string const& address);
49 address_type FZ_PUBLIC_SYMBOL get_address_type(std::wstring const& address);
50 
51 }
52 
53 #endif
std::string get_ipv6_long_form(std::string const &short_address)
Given a shortened IPv6 address, returns the full, unshortened address.
address_type get_address_type(std::string const &address)
Gets the type of the passed IP address.
The namespace used by libfilezilla.
Definition: apply.hpp:16
bool is_routable_address(std::string const &address)
Tests whether the passed IP address is routable on the public Internet.
Sets some global macros and further includes string.hpp.