| 73 | } |
| 74 | |
| 75 | static inline char* Ip6ToString(const TIp6& ip, char* buf, size_t len) { |
| 76 | if (!inet_ntop(AF_INET6, (void*)&ip.Data, buf, (socklen_t)len)) { |
| 77 | ythrow TSystemError() << "Failed to get ipv6 address string"; |
| 78 | } |
| 79 | |
| 80 | return buf; |
| 81 | } |
| 82 | |
| 83 | static inline TString Ip6ToString(const TIp6& ip) { |
| 84 | char buf[INET6_ADDRSTRLEN]; |
no test coverage detected