Lines Matching defs:host
40 * Simple utility to map host name to dotted IP address. Ignores aliases.
43 char *host2ip(char *host);
47 int ipv6_ip(char *host);
48 int dotted_ip(char *host, int partial);
62 int connect_tcp(char *host, int port);
68 char *host2ip(char *host) {
77 hp = gethostbyname(host);
139 char *p, *host, a[2];
143 host = host_in + 1;
145 host = host_in;
148 if (strstr(host, "::ffff:") == host || strstr(host, "::FFFF:") == host) {
149 return dotted_ip(host + strlen("::ffff:"), 0);
154 p = host;
175 int dotted_ip(char *host, int partial) {
177 char *p = host;
179 if (!host) {
183 if (!isdigit((unsigned char) host[0])) {
187 len = strlen(host);
188 if (!partial && !isdigit((unsigned char) host[len-1])) {
318 if ((sock = connect_tcp(client->host, 113)) < 0) {
329 } else if ((sock = connect_tcp(client->host, 113)) < 0) {
331 client->host, 113);
406 newhost = ip2host(client->host);
713 int connect_tcp(char *host, int port) {
721 rfbLog("connect_tcp: trying: %s %d\n", host, port);
728 fd = rfbConnectToTcpAddr(host, port);
737 rfbLog("connect_tcp: re-trying %s %d\n", host, port);
740 fd = rfbConnectToTcpAddr(host, port);
754 rfbLog("connect_tcp: trying IPv6 %s %d\n", host, port);
764 if(ipv6_ip(host)) {
766 rfbLog("connect_tcp[ipv6]: setting AI_NUMERICHOST for %s\n", host);
774 if (!strcmp(host, "127.0.0.1")) {
776 } else if (host[0] == '[') {
777 host2 = strdup(host+1);
779 host2 = strdup(host);
868 if (host[0] == '[') {
869 host2 = strdup(host+1);
871 host2 = strdup(host);