Add a host_t constructor from string, but with a specific family

This commit is contained in:
Martin Willi
2012-11-29 10:22:51 +01:00
parent d88597f0dd
commit f5fe52bf9a
2 changed files with 48 additions and 35 deletions
+11
View File
@@ -159,6 +159,17 @@ struct host_t {
*/
host_t *host_create_from_string(char *string, u_int16_t port);
/**
* Same as host_create_from_string(), but with the option to enforce a family.
*
* @param string string of an address
* @param family address family, or AF_UNSPEC
* @param port port number
* @return host_t, NULL if string not an address.
*/
host_t *host_create_from_string_and_family(char *string, int family,
u_int16_t port);
/**
* Constructor to create a host_t from a DNS name.
*