Lines Matching refs:proxy
593 android_read_hostent(FILE* proxy, struct hostent* hp, char* hbuf, size_t hbuflen, int *he) in android_read_hostent() argument
597 if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL; in android_read_hostent()
603 fread(&size, 1, sizeof(size), proxy); in android_read_hostent()
608 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; in android_read_hostent()
618 if (fread(ptr, 1, size, proxy) != size) return NULL; in android_read_hostent()
626 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; in android_read_hostent()
636 if (fread(ptr, 1, size, proxy) != size) return NULL; in android_read_hostent()
654 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; in android_read_hostent()
657 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; in android_read_hostent()
664 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL; in android_read_hostent()
673 if (fread(ptr, 1, size, proxy) != size) return NULL; in android_read_hostent()
820 FILE* proxy = android_open_proxy(); in gethostbyname_internal() local
821 if (proxy == NULL) { in gethostbyname_internal()
832 if (fprintf(proxy, "gethostbyname %u %s %d", in gethostbyname_internal()
836 fclose(proxy); in gethostbyname_internal()
840 if (fputc(0, proxy) == EOF || fflush(proxy) != 0) { in gethostbyname_internal()
841 fclose(proxy); in gethostbyname_internal()
845 struct hostent* result = android_read_hostent(proxy, hp, hbuf, hbuflen, errorp); in gethostbyname_internal()
846 fclose(proxy); in gethostbyname_internal()
928 FILE* proxy = android_open_proxy(); in android_gethostbyaddrfornet_proxy_internal() local
929 if (proxy == NULL) { in android_gethostbyaddrfornet_proxy_internal()
937 fclose(proxy); in android_gethostbyaddrfornet_proxy_internal()
943 if (fprintf(proxy, "gethostbyaddr %s %d %d %u", in android_gethostbyaddrfornet_proxy_internal()
945 fclose(proxy); in android_gethostbyaddrfornet_proxy_internal()
949 if (fputc(0, proxy) == EOF || fflush(proxy) != 0) { in android_gethostbyaddrfornet_proxy_internal()
950 fclose(proxy); in android_gethostbyaddrfornet_proxy_internal()
954 struct hostent *result = android_read_hostent(proxy, hp, hbuf, hbuflen, he); in android_gethostbyaddrfornet_proxy_internal()
955 fclose(proxy); in android_gethostbyaddrfornet_proxy_internal()