Lines Matching refs:ip_str
101 int tst_get_prefix(const char *ip_str, int is_ipv6)
106 prefix_str = strchr(ip_str, '/');
129 void tst_get_in_addr(const char *ip_str, struct in_addr *ip)
131 if (inet_pton(AF_INET, ip_str, ip) <= 0)
132 tst_brk_comment("bad IPv4 address: '%s'", ip_str);
135 void tst_get_in6_addr(const char *ip_str, struct in6_addr *ip6)
137 if (inet_pton(AF_INET6, ip_str, ip6) <= 0)
138 tst_brk_comment("bad IPv6 address: '%s'", ip_str);
179 void tst_init_sockaddr_inet(struct sockaddr_in *sa, const char *ip_str, uint16_t port)
184 tst_get_in_addr(ip_str, &sa->sin_addr);
195 void tst_init_sockaddr_inet6(struct sockaddr_in6 *sa, const char *ip_str, uint16_t port)
200 tst_get_in6_addr(ip_str, &sa->sin6_addr);