lokinet/llarp/net/interface_info.cpp
Jason Rhinelander bc071231c8
Add a net::ToString() to help stringify ipaddr_t
Android, in particular, has problems with fmt's built-in variant
handling for this type for some reason.
2022-10-06 22:21:41 -03:00

16 lines
311 B
C++

#include "interface_info.hpp"
namespace llarp::net
{
std::string
InterfaceInfo::ToString() const
{
return fmt::format(
"{}[i={}; addrs={}; gw={}]",
name,
index,
fmt::join(addrs, ","),
gateway ? net::ToString(*gateway) : "none");
}
} // namespace llarp::net