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:
parent
effc34c86f
commit
29ba0d214b
2 changed files with 16 additions and 5 deletions
|
@ -30,8 +30,9 @@ namespace ircd::net
|
|||
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(const mutable_buffer &out, const uint128_t &);
|
||||
string_view string_ip4(const mutable_buffer &out, const uint32_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
|
||||
|
|
16
ircd/net.cc
16
ircd/net.cc
|
@ -3687,7 +3687,17 @@ ircd::net::ipport::ipport(const uint128_t &ip,
|
|||
|
||||
ircd::string_view
|
||||
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
|
||||
{
|
||||
|
@ -3698,8 +3708,8 @@ ircd::net::string(const mutable_buffer &buf,
|
|||
}
|
||||
|
||||
ircd::string_view
|
||||
ircd::net::string(const mutable_buffer &buf,
|
||||
const uint128_t &ip)
|
||||
ircd::net::string_ip6(const mutable_buffer &buf,
|
||||
const uint128_t &ip)
|
||||
{
|
||||
const auto &pun
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue