Lines Matching defs:proxy
593 android_read_hostent(FILE* proxy, struct hostent* hp, char* hbuf, size_t hbuflen, int *he)
597 if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL;
603 fread(&size, 1, sizeof(size), proxy);
608 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
618 if (fread(ptr, 1, size, proxy) != size) return NULL;
626 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
636 if (fread(ptr, 1, size, proxy) != size) return NULL;
654 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
657 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
664 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
673 if (fread(ptr, 1, size, proxy) != size) return NULL;
815 // very similar in proxy-ness to android_getaddrinfo_proxy
820 FILE* proxy = android_open_proxy();
821 if (proxy == NULL) {
822 // Either we're not supposed to be using the proxy or the proxy is unavailable.
832 if (fprintf(proxy, "gethostbyname %u %s %d",
836 fclose(proxy);
840 if (fputc(0, proxy) == EOF || fflush(proxy) != 0) {
841 fclose(proxy);
845 struct hostent* result = android_read_hostent(proxy, hp, hbuf, hbuflen, errorp);
846 fclose(proxy);
928 FILE* proxy = android_open_proxy();
929 if (proxy == NULL) {
930 // Either we're not supposed to be using the proxy or the proxy is unavailable.
937 fclose(proxy);
943 if (fprintf(proxy, "gethostbyaddr %s %d %d %u",
945 fclose(proxy);
949 if (fputc(0, proxy) == EOF || fflush(proxy) != 0) {
950 fclose(proxy);
954 struct hostent *result = android_read_hostent(proxy, hp, hbuf, hbuflen, he);
955 fclose(proxy);