inet_pton works on in_addrs not sockaddrs so replace the use of it with a new function, string_to_ip