Lines Matching defs:host
5 /* split string into host and port, destroy string
9 /* const char *host_port(string, host, def_host, port, def_service)
11 /* char **host;
16 /* host_port() splits a string into substrings with the host
25 /* [host]:port, [host]:, [host]
27 /* host:port, host:, host
49 /* if ((parse_error = host_port(buf, &host, NULL, &port, defport)) != 0)
51 /* if ((aierr = hostname_to_sockaddr(host, port, SOCK_STREAM, &res)) != 0)
57 /* Typical server usage allows the user to omit the host, meaning
63 /* if ((parse_error = host_port(buf, &host, "", &port, NULL)) != 0)
65 /* if (*host == 0)
66 /* host = 0;
67 /* if ((aierr = hostname_to_sockaddr(host, port, SOCK_STREAM, &res)) != 0)
110 /* host_port - parse string into host and port, destroy string */
112 const char *host_port(char *buf, char **host, char *def_host,
119 * [host]:port, [host]:, [host].
126 *host = cp;
131 if (ipv6 && !valid_ipv6_hostaddr(*host, DONT_GRIPE))
137 * host:port, host:, host, :port, port.
141 *host = *buf ? buf : def_host;
144 *host = def_host ? def_host : (*buf ? buf : 0);
148 if (*host == 0)
149 return ("missing host information");
157 if (*host != def_host && !valid_hostname(*host, DONT_GRIPE)
158 && !valid_hostaddr(*host, DONT_GRIPE))
177 char *host;
187 if ((err = host_port(STR(parse_buf), &host, (char *) 0, &port, "default-service")) != 0) {
190 vstream_printf("host %s port %s\n", host, port);