00001 #ifndef HEADER_CURL_SOCKS_H 00002 #define HEADER_CURL_SOCKS_H 00003 /*************************************************************************** 00004 * _ _ ____ _ 00005 * Project ___| | | | _ \| | 00006 * / __| | | | |_) | | 00007 * | (__| |_| | _ <| |___ 00008 * \___|\___/|_| \_\_____| 00009 * 00010 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. 00011 * 00012 * This software is licensed as described in the file COPYING, which 00013 * you should have received as part of this distribution. The terms 00014 * are also available at https://curl.haxx.se/docs/copyright.html. 00015 * 00016 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 00017 * copies of the Software, and permit persons to whom the Software is 00018 * furnished to do so, under the terms of the COPYING file. 00019 * 00020 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 00021 * KIND, either express or implied. 00022 * 00023 ***************************************************************************/ 00024 00025 #include "curl_setup.h" 00026 00027 #ifdef CURL_DISABLE_PROXY 00028 #define Curl_SOCKS4(a,b,c,d,e) CURLE_NOT_BUILT_IN 00029 #define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN 00030 #else 00031 /* 00032 * Helper read-from-socket functions. Does the same as Curl_read() but it 00033 * blocks until all bytes amount of buffersize will be read. No more, no less. 00034 * 00035 * This is STUPID BLOCKING behaviour which we frown upon, but right now this 00036 * is what we have... 00037 */ 00038 int Curl_blockread_all(struct connectdata *conn, 00039 curl_socket_t sockfd, 00040 char *buf, 00041 ssize_t buffersize, 00042 ssize_t *n); 00043 00044 /* 00045 * This function logs in to a SOCKS4(a) proxy and sends the specifics to the 00046 * final destination server. 00047 */ 00048 CURLcode Curl_SOCKS4(const char *proxy_name, 00049 const char *hostname, 00050 int remote_port, 00051 int sockindex, 00052 struct connectdata *conn); 00053 00054 /* 00055 * This function logs in to a SOCKS5 proxy and sends the specifics to the 00056 * final destination server. 00057 */ 00058 CURLcode Curl_SOCKS5(const char *proxy_name, 00059 const char *proxy_password, 00060 const char *hostname, 00061 int remote_port, 00062 int sockindex, 00063 struct connectdata *conn); 00064 00065 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI) 00066 /* 00067 * This function handles the SOCKS5 GSS-API negotiation and initialisation 00068 */ 00069 CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex, 00070 struct connectdata *conn); 00071 #endif 00072 00073 #endif /* CURL_DISABLE_PROXY */ 00074 00075 #endif /* HEADER_CURL_SOCKS_H */ 00076