Hi all,

I would like to see if there is an interest to add a new API to
support parsing IP address into sockaddr. Here is the proposed
signature.

TSReturnCode TSIpAddrParse(const char *str, size_t str_len, sockaddr *addr)

This is going to be largely leveraging ats_ip_parse() and
ats_ip_pton() inside ink_inet.h . These are really handy functions
that can parse a string and identify whether it is ipv4 or ipv6 as
well as the port number to put it into the sockaddr struct.

I can submit the PR soon.

Thanks.

Kit

Reply via email to