0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd::net: Reinterface string(ippaddr) related.

This commit is contained in:
Jason Volk 2019-03-18 12:39:21 -07:00
parent effc34c86f
commit 29ba0d214b
2 changed files with 16 additions and 5 deletions

View file

@ -30,8 +30,9 @@ namespace ircd::net
bool operator<(const ipaddr &, const ipaddr &); bool operator<(const ipaddr &, const ipaddr &);
bool operator==(const ipaddr &, const ipaddr &); bool operator==(const ipaddr &, const ipaddr &);
string_view string(const mutable_buffer &out, const uint32_t &); string_view string_ip4(const mutable_buffer &out, const uint32_t &);
string_view string(const mutable_buffer &out, const uint128_t &); string_view string_ip6(const mutable_buffer &out, const uint128_t &);
string_view string(const mutable_buffer &out, const ipaddr &);
} }
union ircd::net::ipaddr union ircd::net::ipaddr

View file

@ -3687,7 +3687,17 @@ ircd::net::ipport::ipport(const uint128_t &ip,
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &buf, ircd::net::string(const mutable_buffer &buf,
const uint32_t &ip) const ipaddr &ipaddr)
{
throw not_implemented
{
"string(ipaddr): not implemented yet"
};
}
ircd::string_view
ircd::net::string_ip4(const mutable_buffer &buf,
const uint32_t &ip)
{ {
const auto len const auto len
{ {
@ -3698,8 +3708,8 @@ ircd::net::string(const mutable_buffer &buf,
} }
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &buf, ircd::net::string_ip6(const mutable_buffer &buf,
const uint128_t &ip) const uint128_t &ip)
{ {
const auto &pun const auto &pun
{ {