Lines Matching refs:cf
101 int Curl_blockread_all(struct Curl_cfilter *cf, in Curl_blockread_all() argument
122 if(SOCKET_READABLE(cf->conn->sock[cf->sockindex], timeout_ms) <= 0) { in Curl_blockread_all()
126 nread = Curl_conn_cf_recv(cf->next, data, buf, buffersize, &err); in Curl_blockread_all()
210 static CURLproxycode socks_state_send(struct Curl_cfilter *cf, in socks_state_send() argument
219 nwritten = Curl_conn_cf_send(cf->next, data, (char *)sx->outp, in socks_state_send()
241 static CURLproxycode socks_state_recv(struct Curl_cfilter *cf, in socks_state_recv() argument
250 nread = Curl_conn_cf_recv(cf->next, data, (char *)sx->outp, in socks_state_recv()
283 static CURLproxycode do_SOCKS4(struct Curl_cfilter *cf, in do_SOCKS4() argument
287 struct connectdata *conn = cf->conn; in do_SOCKS4()
456 presult = socks_state_send(cf, sx, data, CURLPX_SEND_CONNECT, in do_SOCKS4()
472 presult = socks_state_recv(cf, sx, data, CURLPX_RECV_CONNECT, in do_SOCKS4()
560 static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf, in do_SOCKS5() argument
580 struct connectdata *conn = cf->conn; in do_SOCKS5()
633 presult = socks_state_send(cf, sx, data, CURLPX_SEND_CONNECT, in do_SOCKS5()
644 presult = socks_state_send(cf, sx, data, CURLPX_SEND_CONNECT, in do_SOCKS5()
659 presult = socks_state_recv(cf, sx, data, CURLPX_RECV_CONNECT, in do_SOCKS5()
684 result = Curl_SOCKS5_gssapi_negotiate(cf, data); in do_SOCKS5()
764 presult = socks_state_send(cf, sx, data, CURLPX_SEND_AUTH, in do_SOCKS5()
777 presult = socks_state_recv(cf, sx, data, CURLPX_RECV_AUTH, in do_SOCKS5()
958 presult = socks_state_send(cf, sx, data, CURLPX_SEND_REQUEST, in do_SOCKS5()
977 presult = socks_state_recv(cf, sx, data, CURLPX_RECV_REQACK, in do_SOCKS5()
1067 presult = socks_state_recv(cf, sx, data, CURLPX_RECV_ADDRESS, in do_SOCKS5()
1082 static CURLcode connect_SOCKS(struct Curl_cfilter *cf, in connect_SOCKS() argument
1088 struct connectdata *conn = cf->conn; in connect_SOCKS()
1093 pxresult = do_SOCKS5(cf, sxstate, data); in connect_SOCKS()
1098 pxresult = do_SOCKS4(cf, sxstate, data); in connect_SOCKS()
1113 static void socks_proxy_cf_free(struct Curl_cfilter *cf) in socks_proxy_cf_free() argument
1115 struct socks_state *sxstate = cf->ctx; in socks_proxy_cf_free()
1118 cf->ctx = NULL; in socks_proxy_cf_free()
1129 static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf, in socks_proxy_cf_connect() argument
1134 struct connectdata *conn = cf->conn; in socks_proxy_cf_connect()
1135 int sockindex = cf->sockindex; in socks_proxy_cf_connect()
1136 struct socks_state *sx = cf->ctx; in socks_proxy_cf_connect()
1138 if(cf->connected) { in socks_proxy_cf_connect()
1143 result = cf->next->cft->do_connect(cf->next, data, blocking, done); in socks_proxy_cf_connect()
1151 cf->ctx = sx; in socks_proxy_cf_connect()
1175 result = connect_SOCKS(cf, sx, data); in socks_proxy_cf_connect()
1177 cf->connected = TRUE; in socks_proxy_cf_connect()
1178 Curl_verboseconnect(data, conn, cf->sockindex); in socks_proxy_cf_connect()
1179 socks_proxy_cf_free(cf); in socks_proxy_cf_connect()
1182 *done = cf->connected; in socks_proxy_cf_connect()
1186 static void socks_cf_adjust_pollset(struct Curl_cfilter *cf, in socks_cf_adjust_pollset() argument
1190 struct socks_state *sx = cf->ctx; in socks_cf_adjust_pollset()
1192 if(!cf->connected && sx) { in socks_cf_adjust_pollset()
1195 curl_socket_t sock = Curl_conn_cf_get_socket(cf, data); in socks_cf_adjust_pollset()
1211 static void socks_proxy_cf_close(struct Curl_cfilter *cf, in socks_proxy_cf_close() argument
1215 DEBUGASSERT(cf->next); in socks_proxy_cf_close()
1216 cf->connected = FALSE; in socks_proxy_cf_close()
1217 socks_proxy_cf_free(cf); in socks_proxy_cf_close()
1218 cf->next->cft->do_close(cf->next, data); in socks_proxy_cf_close()
1221 static void socks_proxy_cf_destroy(struct Curl_cfilter *cf, in socks_proxy_cf_destroy() argument
1225 socks_proxy_cf_free(cf); in socks_proxy_cf_destroy()
1228 static void socks_cf_get_host(struct Curl_cfilter *cf, in socks_cf_get_host() argument
1235 if(!cf->connected) { in socks_cf_get_host()
1236 *phost = cf->conn->socks_proxy.host.name; in socks_cf_get_host()
1237 *pdisplay_host = cf->conn->http_proxy.host.dispname; in socks_cf_get_host()
1238 *pport = (int)cf->conn->socks_proxy.port; in socks_cf_get_host()
1241 cf->next->cft->get_host(cf->next, data, phost, pdisplay_host, pport); in socks_cf_get_host()
1267 struct Curl_cfilter *cf; in Curl_cf_socks_proxy_insert_after() local
1271 result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, NULL); in Curl_cf_socks_proxy_insert_after()
1273 Curl_conn_cf_insert_after(cf_at, cf); in Curl_cf_socks_proxy_insert_after()