| 180 | } |
| 181 | |
| 182 | void wireaddr_from_ipv6(struct wireaddr *addr, |
| 183 | const struct in6_addr *ip6, |
| 184 | const u16 port) |
| 185 | { |
| 186 | addr->type = ADDR_TYPE_IPV6; |
| 187 | addr->addrlen = sizeof(*ip6); |
| 188 | addr->port = port; |
| 189 | memset(addr->addr, 0, sizeof(addr->addr)); |
| 190 | memcpy(&addr->addr, ip6, addr->addrlen); |
| 191 | } |
| 192 | |
| 193 | bool wireaddr_to_ipv4(const struct wireaddr *addr, struct sockaddr_in *s4) |
| 194 | { |
no outgoing calls
no test coverage detected