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
10namespace fz {
11
18std::string FZ_PUBLIC_SYMBOL get_ipv6_long_form(std::string_view const& short_address);
19std::wstring FZ_PUBLIC_SYMBOL get_ipv6_long_form(std::wstring_view const& short_address);
20
37bool FZ_PUBLIC_SYMBOL is_routable_address(std::string_view const& address);
38bool FZ_PUBLIC_SYMBOL is_routable_address(std::wstring_view const& address);
39
40enum class address_type
41{
42 unknown,
43 ipv4,
44 ipv6
45};
46
48address_type FZ_PUBLIC_SYMBOL get_address_type(std::string_view const& address);
49address_type FZ_PUBLIC_SYMBOL get_address_type(std::wstring_view const& address);
50
51}
52
53#endif
Sets some global macros and further includes string.hpp.
The namespace used by libfilezilla.
Definition: apply.hpp:17
address_type get_address_type(std::string_view const &address)
Gets the type of the passed IP address.
bool is_routable_address(std::string_view const &address)
Tests whether the passed IP address is routable on the public Internet.
std::string get_ipv6_long_form(std::string_view const &short_address)
Given a shortened IPv6 address, returns the full, unshortened address.