nmsg_res nmsg_sock_parse(int af, const char *addr, unsigned port, struct sockaddr_in *sai, struct sockaddr_in6 *sai6, struct sockaddr **sa, socklen_t *salen)
Parse an IP address and port number into a sockaddr.
nmsg_res nmsg_sock_parse_sockspec(const char *sockspec, int *af, char **addr, unsigned *port_start, unsigned *port_end)
Parse a "socket spec" string.