Lines Matching defs:proxy
597 android_read_hostent(FILE* proxy, struct hostent* hp, char* hbuf, size_t hbuflen, int *he)
601 if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL;
607 fread(&size, 1, sizeof(size), proxy);
612 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
622 if (fread(ptr, 1, size, proxy) != size) return NULL;
630 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
640 if (fread(ptr, 1, size, proxy) != size) return NULL;
658 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
661 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
668 if (fread(&size, 1, sizeof(size), proxy) != sizeof(size)) return NULL;
677 if (fread(ptr, 1, size, proxy) != size) return NULL;
819 // very similar in proxy-ness to android_getaddrinfo_proxy
824 FILE* proxy = android_open_proxy();
825 if (proxy == NULL) {
826 // Either we're not supposed to be using the proxy or the proxy is unavailable.
835 if (fprintf(proxy, "gethostbyname %u %s %d",
839 fclose(proxy);
843 if (fputc(0, proxy) == EOF || fflush(proxy) != 0) {
844 fclose(proxy);
848 struct hostent* result = android_read_hostent(proxy, hp, hbuf, hbuflen, errorp);
849 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);
1588 // - In the proxy client context (proxy != NULL), |netid| is |app_netid|.
1589 // - In the proxy listener context (proxy == NULL), |netid| is |dns_netid|.
1592 // |proxy == NULL|, and use that info to query the field that matches the caller's intent.