Well, my goal has been to, at some point, make all of ink_inet.h available to plugins. This seems a reasonable start.
On Sep 14, 2017 6:09 PM, "Shu Kit Chan" <chanshu...@gmail.com> wrote: > Here is the PR for this. > > https://github.com/apache/trafficserver/pull/2520 > > Thanks. > > Kit > > On Wed, Sep 13, 2017 at 2:55 PM, Shu Kit Chan <chanshu...@gmail.com> > wrote: > > 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 >