Last active
April 3, 2025 09:35
-
-
Save williballenthin/2c96b3f760b5bbd270c3f23add020617 to your computer and use it in GitHub Desktop.
curl options as a C enum (via https://docwiki.embarcadero.com/Libraries/Athens/en/System.Curl.CURLoption and Gemini)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Enumeration of options for curl_easy_setopt() based on libcurl. | |
* | |
* Note: The explicit integer values match those used by libcurl. | |
* Options without explicit values increment from the previous one. | |
*/ | |
typedef enum { | |
/* Options expecting a long */ | |
CURLOPT_PORT = 3, | |
CURLOPT_TIMEOUT = 13, | |
CURLOPT_INFILESIZE = 14, // Implicitly 13 + 1 | |
CURLOPT_LOW_SPEED_LIMIT = 19, | |
CURLOPT_LOW_SPEED_TIME = 20, // Implicitly 19 + 1 | |
CURLOPT_RESUME_FROM = 21, // Implicitly 20 + 1 | |
CURLOPT_CRLF = 27, | |
CURLOPT_SSLVERSION = 32, | |
CURLOPT_TIMECONDITION = 33, // Implicitly 32 + 1 | |
CURLOPT_TIMEVALUE = 34, // Implicitly 33 + 1 | |
CURLOPT_VERBOSE = 41, | |
CURLOPT_HEADER = 42, // Implicitly 41 + 1 | |
CURLOPT_NOPROGRESS = 43, // Implicitly 42 + 1 | |
CURLOPT_NOBODY = 44, // Implicitly 43 + 1 | |
CURLOPT_FAILONERROR = 45, // Implicitly 44 + 1 | |
CURLOPT_UPLOAD = 46, // Implicitly 45 + 1 | |
CURLOPT_POST = 47, // Implicitly 46 + 1 | |
CURLOPT_DIRLISTONLY = 48, // Implicitly 47 + 1 | |
CURLOPT_APPEND = 50, | |
CURLOPT_NETRC = 51, // Implicitly 50 + 1 | |
CURLOPT_FOLLOWLOCATION = 52, // Implicitly 51 + 1 | |
CURLOPT_TRANSFERTEXT = 53, // Implicitly 52 + 1 | |
CURLOPT_PUT = 54, // Implicitly 53 + 1 | |
CURLOPT_AUTOREFERER = 58, | |
CURLOPT_PROXYPORT = 59, // Implicitly 58 + 1 | |
CURLOPT_POSTFIELDSIZE = 60, // Implicitly 59 + 1 | |
CURLOPT_HTTPPROXYTUNNEL = 61, // Implicitly 60 + 1 | |
CURLOPT_SSL_VERIFYPEER = 64, | |
CURLOPT_MAXREDIRS = 68, | |
CURLOPT_FILETIME = 69, // Implicitly 68 + 1 | |
CURLOPT_MAXCONNECTS = 71, | |
CURLOPT_CLOSEPOLICY = 72, // Implicitly 71 + 1 (Deprecated) | |
CURLOPT_FRESH_CONNECT = 74, | |
CURLOPT_FORBID_REUSE = 75, // Implicitly 74 + 1 | |
CURLOPT_CONNECTTIMEOUT = 78, | |
CURLOPT_HTTPGET = 80, | |
CURLOPT_SSL_VERIFYHOST = 81, // Implicitly 80 + 1 | |
CURLOPT_HTTP_VERSION = 84, | |
CURLOPT_FTP_USE_EPSV = 85, // Implicitly 84 + 1 | |
CURLOPT_SSLENGINE_DEFAULT = 90, | |
CURLOPT_DNS_USE_GLOBAL_CACHE = 91, // Implicitly 90 + 1 (Deprecated) | |
CURLOPT_DNS_CACHE_TIMEOUT = 92, // Implicitly 91 + 1 | |
CURLOPT_COOKIESESSION = 96, | |
CURLOPT_BUFFERSIZE = 98, | |
CURLOPT_NOSIGNAL = 99, // Implicitly 98 + 1 | |
CURLOPT_PROXYTYPE = 101, | |
CURLOPT_UNRESTRICTED_AUTH = 105, | |
CURLOPT_FTP_USE_EPRT = 106, // Implicitly 105 + 1 | |
CURLOPT_HTTPAUTH = 107, // Implicitly 106 + 1 | |
CURLOPT_FTP_CREATE_MISSING_DIRS = 110, | |
CURLOPT_PROXYAUTH = 111, // Implicitly 110 + 1 | |
CURLOPT_FTP_RESPONSE_TIMEOUT = 112, | |
CURLOPT_SERVER_RESPONSE_TIMEOUT = 113, // Implicitly 112 + 1 (Renamed, use CURLOPT_FTP_RESPONSE_TIMEOUT) | |
CURLOPT_IPRESOLVE = 113, // Implicitly 112 + 1 | |
CURLOPT_MAXFILESIZE = 114, // Implicitly 113 + 1 | |
CURLOPT_USE_SSL = 119, // Deprecated, use CURLOPT_SSL_ENABLE_ALPN / NPN or specific SSL versions | |
CURLOPT_TCP_NODELAY = 121, | |
CURLOPT_FTPSSLAUTH = 129, | |
CURLOPT_IGNORE_CONTENT_LENGTH = 136, | |
CURLOPT_FTP_SKIP_PASV_IP = 137, // Implicitly 136 + 1 | |
CURLOPT_FTP_FILEMETHOD = 138, // Implicitly 137 + 1 | |
CURLOPT_LOCALPORT = 139, // Implicitly 138 + 1 | |
CURLOPT_LOCALPORTRANGE = 140, // Implicitly 139 + 1 | |
CURLOPT_CONNECTONLY = 141, // Implicitly 140 + 1 | |
CURLOPT_SSL_SESSIONID_CACHE = 150, | |
CURLOPT_SSH_AUTH_TYPES = 151, // Implicitly 150 + 1 | |
CURLOPT_FTP_SSL_CCC = 154, | |
CURLOPT_TIMEOUT_MS = 155, // Implicitly 154 + 1 | |
CURLOPT_CONNECTTIMEOUT_MS = 156, // Implicitly 155 + 1 | |
CURLOPT_HTTP_TRANSFER_DECODING = 157, // Implicitly 156 + 1 | |
CURLOPT_HTTP_CONTENT_DECODING = 158, // Implicitly 157 + 1 | |
CURLOPT_NEW_FILE_PERMS = 159, // Implicitly 158 + 1 | |
CURLOPT_NEW_DIRECTORY_PERMS = 160, // Implicitly 159 + 1 | |
CURLOPT_POSTREDIR = 161, // Implicitly 160 + 1 | |
CURLOPT_PROXY_TRANSFER_MODE = 166, | |
CURLOPT_ADDRESS_SCOPE = 171, | |
CURLOPT_CERTINFO = 172, // Implicitly 171 + 1 | |
CURLOPT_TFTP_BLKSIZE = 178, | |
CURLOPT_SOCKS5_GSSAPI_NEC = 180, | |
CURLOPT_PROTOCOLS = 181, // Implicitly 180 + 1 | |
CURLOPT_REDIR_PROTOCOLS = 182, // Implicitly 181 + 1 | |
CURLOPT_FTP_USE_PRET = 188, | |
CURLOPT_RTSP_REQUEST = 189, // Implicitly 188 + 1 | |
CURLOPT_RTSP_CLIENT_CSEQ = 193, | |
CURLOPT_RTSP_SERVER_CSEQ = 194, // Implicitly 193 + 1 | |
CURLOPT_WILDCARDMATCH = 197, | |
CURLOPT_TRANSFER_ENCODING = 207, | |
CURLOPT_GSSAPI_DELEGATION = 210, | |
CURLOPT_ACCEPTTIMEOUT_MS = 212, | |
CURLOPT_TCP_KEEPALIVE = 213, // Implicitly 212 + 1 | |
CURLOPT_TCP_KEEPIDLE = 214, // Implicitly 213 + 1 | |
CURLOPT_TCP_KEEPINTVL = 215, // Implicitly 214 + 1 | |
CURLOPT_SSL_OPTIONS = 216, // Implicitly 215 + 1 | |
CURLOPT_SASL_IR = 218, | |
CURLOPT_SSL_ENABLE_NPN = 225, // Deprecated | |
CURLOPT_SSL_ENABLE_ALPN = 226, // Implicitly 225 + 1 | |
CURLOPT_EXPECT_100_TIMEOUT_MS = 227, // Implicitly 226 + 1 | |
CURLOPT_HEADEROPT = 229, | |
CURLOPT_SSL_VERIFYSTATUS = 232, | |
CURLOPT_SSL_FALSESTART = 233, // Implicitly 232 + 1 | |
CURLOPT_PATH_AS_IS = 234, // Implicitly 233 + 1 | |
CURLOPT_PIPEWAIT = 237, | |
CURLOPT_STREAM_WEIGHT = 239, | |
/* Options expecting a pointer */ | |
CURLOPT_WRITEDATA = 10001, | |
CURLOPT_URL = 10002, // Implicitly 10001 + 1 | |
CURLOPT_PROXY = 10004, | |
CURLOPT_USERPWD = 10005, // Implicitly 10004 + 1 | |
CURLOPT_PROXYUSERPWD = 10006, // Implicitly 10005 + 1 | |
CURLOPT_RANGE = 10007, // Implicitly 10006 + 1 | |
CURLOPT_READDATA = 10009, | |
CURLOPT_ERRORBUFFER = 10010, // Implicitly 10009 + 1 | |
CURLOPT_POSTFIELDS = 10015, | |
CURLOPT_REFERER = 10016, // Implicitly 10015 + 1 | |
CURLOPT_FTPPORT = 10017, // Implicitly 10016 + 1 | |
CURLOPT_USERAGENT = 10018, // Implicitly 10017 + 1 | |
CURLOPT_COOKIE = 10022, | |
CURLOPT_HTTPHEADER = 10023, // Implicitly 10022 + 1 (curl_slist *) | |
CURLOPT_HTTPPOST = 10024, // Implicitly 10023 + 1 (curl_httppost *) | |
CURLOPT_SSLCERT = 10025, // Implicitly 10024 + 1 | |
CURLOPT_KEYPASSWD = 10026, // Implicitly 10025 + 1 | |
CURLOPT_QUOTE = 10028, // (curl_slist *) | |
CURLOPT_HEADERDATA = 10029, // Implicitly 10028 + 1 (Same as CURLOPT_WRITEDATA) | |
CURLOPT_COOKIEFILE = 10031, | |
CURLOPT_CUSTOMREQUEST = 10036, | |
CURLOPT_STDERR = 10037, // Implicitly 10036 + 1 (FILE *) | |
CURLOPT_POSTQUOTE = 10039, // (curl_slist *) | |
CURLOPT_OBSOLETE40 = 10040, // Implicitly 10039 + 1 (No longer used) | |
CURLOPT_PROGRESSDATA = 10057, | |
CURLOPT_INTERFACE = 10062, | |
CURLOPT_KRBLEVEL = 10063, // Implicitly 10062 + 1 | |
CURLOPT_CAINFO = 10065, | |
CURLOPT_TELNETOPTIONS = 10070, // (curl_slist *) | |
CURLOPT_RANDOM_FILE = 10076, | |
CURLOPT_EGDSOCKET = 10077, // Implicitly 10076 + 1 | |
CURLOPT_COOKIEJAR = 10082, | |
CURLOPT_SSL_CIPHER_LIST = 10083, // Implicitly 10082 + 1 | |
CURLOPT_SSLCERTTYPE = 10086, | |
CURLOPT_SSLKEY = 10087, // Implicitly 10086 + 1 | |
CURLOPT_SSLKEYTYPE = 10088, // Implicitly 10087 + 1 | |
CURLOPT_SSLENGINE = 10089, // Implicitly 10088 + 1 | |
CURLOPT_PREQUOTE = 10093, // (curl_slist *) | |
CURLOPT_DEBUGDATA = 10094, // Implicitly 10093 + 1 | |
CURLOPT_CAPATH = 10097, | |
CURLOPT_SHARE = 10100, // (CURLSH *) | |
CURLOPT_ENCODING = 10102, // Renamed, use CURLOPT_ACCEPT_ENCODING | |
CURLOPT_PRIVATE = 10103, // Implicitly 10102 + 1 | |
CURLOPT_HTTP200ALIASES = 10104, // Implicitly 10103 + 1 (curl_slist *) | |
CURLOPT_SSL_CTX_DATA = 10109, | |
CURLOPT_NETRC_FILE = 10118, | |
CURLOPT_SOURCE_USERPWD = 10123, // Removed | |
CURLOPT_SOURCE_PREQUOTE = 10127, // Removed | |
CURLOPT_SOURCE_POSTQUOTE = 10128, // Implicitly 10127 + 1 (Removed) | |
CURLOPT_IOCTLDATA = 10130, // Implicitly 10128 + 2 (Removed) | |
CURLOPT_SOURCE_URL = 10132, // Implicitly 10130 + 2 (Removed) | |
CURLOPT_SOURCE_QUOTE = 10133, // Implicitly 10132 + 1 (Removed) | |
CURLOPT_FTP_ACCOUNT = 10134, // Implicitly 10133 + 1 | |
CURLOPT_COOKIELIST = 10135, // Implicitly 10134 + 1 | |
CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147, | |
CURLOPT_SOCKOPTDATA = 10148, // Implicitly 10147 + 1 | |
CURLOPT_SSH_PUBLIC_KEYFILE = 10152, | |
CURLOPT_SSH_PRIVATE_KEYFILE = 10153, // Implicitly 10152 + 1 | |
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162, | |
CURLOPT_OPENSOCKETDATA = 10163, // Implicitly 10162 + 1 | |
CURLOPT_COPYPOSTFIELDS = 10165, // Implicitly 10163 + 2 | |
CURLOPT_SEEKDATA = 10167, // Implicitly 10165 + 2 | |
CURLOPT_CRLFILE = 10169, // Implicitly 10167 + 2 | |
CURLOPT_ISSUERCERT = 10170, // Implicitly 10169 + 1 | |
CURLOPT_USERNAME = 10173, | |
CURLOPT_PASSWORD = 10174, // Implicitly 10173 + 1 | |
CURLOPT_PROXYUSERNAME = 10175, // Implicitly 10174 + 1 | |
CURLOPT_PROXYPASSWORD = 10176, // Implicitly 10175 + 1 | |
CURLOPT_NOPROXY = 10177, // Implicitly 10176 + 1 | |
CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179, | |
CURLOPT_SSH_KNOWNHOSTS = 10183, | |
CURLOPT_SSH_KEYDATA = 10185, | |
CURLOPT_MAIL_FROM = 10186, // Implicitly 10185 + 1 | |
CURLOPT_MAIL_RCPT = 10187, // Implicitly 10186 + 1 (curl_slist *) | |
CURLOPT_RTSP_SESSION_ID = 10190, | |
CURLOPT_RTSP_STREAM_URI = 10191, // Implicitly 10190 + 1 | |
CURLOPT_RTSP_TRANSPORT = 10192, // Implicitly 10191 + 1 | |
CURLOPT_INTERLEAVEDATA = 10194, // Implicitly 10192 + 2 | |
CURLOPT_CHUNK_DATA = 10198, // Implicitly 10194 + 4 | |
CURLOPT_FNMATCH_DATA = 10200, // Implicitly 10198 + 2 | |
CURLOPT_RESOLVE = 10203, // Implicitly 10200 + 3 (curl_slist *) | |
CURLOPT_TLSAUTH_USERNAME = 10204, // Implicitly 10203 + 1 | |
CURLOPT_TLSAUTH_PASSWORD = 10205, // Implicitly 10204 + 1 | |
CURLOPT_TLSAUTH_TYPE = 10206, // Implicitly 10205 + 1 | |
CURLOPT_CLOSESOCKETDATA = 10208, // Implicitly 10206 + 2 | |
CURLOPT_DNS_SERVERS = 10211, | |
CURLOPT_MAIL_AUTH = 10217, | |
CURLOPT_XOAUTH2_BEARER = 10220, | |
CURLOPT_DNS_INTERFACE = 10221, // Implicitly 10220 + 1 | |
CURLOPT_DNS_LOCAL_IP4 = 10222, // Implicitly 10221 + 1 | |
CURLOPT_DNS_LOCAL_IP6 = 10223, // Implicitly 10222 + 1 | |
CURLOPT_LOGIN_OPTIONS = 10224, // Implicitly 10223 + 1 | |
CURLOPT_PROXYHEADER = 10228, // (curl_slist *) | |
CURLOPT_PINNEDPUBLICKEY = 10230, | |
CURLOPT_UNIX_SOCKET_PATH = 10231, // Implicitly 10230 + 1 | |
CURLOPT_PROXY_SERVICE_NAME = 10234, // Implicitly 10231 + 3 | |
CURLOPT_SERVICE_NAME = 10235, // Implicitly 10234 + 1 | |
CURLOPT_DEFAULT_PROTOCOL = 10238, | |
CURLOPT_STREAM_DEPENDS = 10240, // (CURL *) | |
CURLOPT_STREAM_DEPENDS_E = 10241, // Implicitly 10240 + 1 (CURL *) | |
/* Options expecting a function pointer */ | |
CURLOPT_WRITEFUNCTION = 20011, | |
CURLOPT_READFUNCTION = 20012, // Implicitly 20011 + 1 | |
CURLOPT_PROGRESSFUNCTION = 20056, | |
CURLOPT_HEADERFUNCTION = 20079, | |
CURLOPT_DEBUGFUNCTION = 20094, | |
CURLOPT_SSL_CTX_FUNCTION = 20108, | |
CURLOPT_IOCTLFUNCTION = 20130, // Removed | |
CURLOPT_CONV_FROM_NETWORK_FUNCTION = 20142, | |
CURLOPT_CONV_TO_NETWORK_FUNCTION = 20143, // Implicitly 20142 + 1 | |
CURLOPT_CONV_FROM_UTF8_FUNCTION = 20144, // Implicitly 20143 + 1 | |
CURLOPT_SOCKOPTFUNCTION = 20148, | |
CURLOPT_OPENSOCKETFUNCTION = 20163, | |
CURLOPT_SEEKFUNCTION = 20167, | |
CURLOPT_SSH_KEYFUNCTION = 20184, | |
CURLOPT_INTERLEAVEFUNCTION = 20196, | |
CURLOPT_CHUNK_BGN_FUNCTION = 20198, | |
CURLOPT_CHUNK_END_FUNCTION = 20199, // Implicitly 20198 + 1 | |
CURLOPT_FNMATCH_FUNCTION = 20200, // Implicitly 20199 + 1 | |
CURLOPT_CLOSESOCKETFUNCTION = 20208, | |
CURLOPT_XFERINFOFUNCTION = 20219, | |
/* Options expecting a curl_off_t */ | |
CURLOPT_INFILESIZE_LARGE = 30114, // Implicitly 20219 + 9895 | |
CURLOPT_RESUME_FROM_LARGE = 30116, // Implicitly 30114 + 2 | |
CURLOPT_MAXFILESIZE_LARGE = 30117, // Implicitly 30116 + 1 | |
CURLOPT_POSTFIELDSIZE_LARGE = 30120, | |
CURLOPT_MAX_SEND_SPEED_LARGE = 30145, | |
CURLOPT_MAX_RECV_SPEED_LARGE = 30146, // Implicitly 30145 + 1 | |
CURLOPT_LASTENTRY /* Never use! */ // Implicitly 30146 + 1 = 30147 | |
} CURLoption; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment