ReactOS  0.4.15-dev-2535-gcf6c191
internet.h
Go to the documentation of this file.
1 /*
2  * Wininet
3  *
4  * Copyright 1999 Corel Corporation
5  *
6  * Ulrich Czekalla
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22 
23 #ifndef _WINE_INTERNET_H_
24 #define _WINE_INTERNET_H_
25 
26 #include "wine/heap.h"
27 #include "wine/list.h"
28 
29 #include <time.h>
30 
31 #include "winineti.h"
32 
34 
35 typedef struct {
40  int addr_len;
41  char addr_str[INET6_ADDRSTRLEN];
42 
44  const WCHAR *host_port;
46 
48 
51 
52  struct list entry;
53  struct list conn_pool;
54 } server_t;
55 
58 
59 typedef enum {
65 
66 /* used for netconnection.c stuff */
67 typedef struct
68 {
69  int socket;
75  char *ssl_buf;
76  char *extra_buf;
77  size_t extra_len;
78  char *peek_msg;
79  char *peek_msg_mem;
80  size_t peek_len;
83 
86  struct list pool_entry;
87 } netconn_t;
88 
91 
92 static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len)
93 {
95 }
96 
98 {
99  LPWSTR ret = NULL;
100 
101  if(str) {
102  DWORD size;
103 
104  size = (lstrlenW(str)+1)*sizeof(WCHAR);
105  ret = heap_alloc(size);
106  if(ret)
107  memcpy(ret, str, size);
108  }
109 
110  return ret;
111 }
112 
113 static inline char *heap_strdupA(const char *str)
114 {
115  char *ret = NULL;
116 
117  if(str) {
118  DWORD size = strlen(str)+1;
119 
120  ret = heap_alloc(size);
121  if(ret)
122  memcpy(ret, str, size);
123  }
124 
125  return ret;
126 }
127 
128 static inline LPWSTR heap_strndupW(LPCWSTR str, UINT max_len)
129 {
130  LPWSTR ret;
131  UINT len;
132 
133  if(!str)
134  return NULL;
135 
136  for(len=0; len<max_len; len++)
137  if(str[len] == '\0')
138  break;
139 
140  ret = heap_alloc(sizeof(WCHAR)*(len+1));
141  if(ret) {
142  memcpy(ret, str, sizeof(WCHAR)*len);
143  ret[len] = '\0';
144  }
145 
146  return ret;
147 }
148 
149 static inline WCHAR *heap_strndupAtoW(const char *str, int len_a, DWORD *len_w)
150 {
151  WCHAR *ret = NULL;
152 
153  if(str) {
154  size_t len;
155  if(len_a < 0) len_a = strlen(str);
156  len = MultiByteToWideChar(CP_ACP, 0, str, len_a, NULL, 0);
157  ret = heap_alloc((len+1)*sizeof(WCHAR));
158  if(ret) {
159  MultiByteToWideChar(CP_ACP, 0, str, len_a, ret, len);
160  ret[len] = 0;
161  *len_w = len;
162  }
163  }
164 
165  return ret;
166 }
167 
168 static inline WCHAR *heap_strdupAtoW(const char *str)
169 {
170  LPWSTR ret = NULL;
171 
172  if(str) {
173  DWORD len;
174 
175  len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
176  ret = heap_alloc(len*sizeof(WCHAR));
177  if(ret)
178  MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
179  }
180 
181  return ret;
182 }
183 
184 static inline char *heap_strdupWtoA(LPCWSTR str)
185 {
186  char *ret = NULL;
187 
188  if(str) {
190  ret = heap_alloc(size);
191  if(ret)
193  }
194 
195  return ret;
196 }
197 
198 typedef struct {
199  const WCHAR *str;
200  size_t len;
201 } substr_t;
202 
203 static inline substr_t substr(const WCHAR *str, size_t len)
204 {
205  substr_t r = {str, len};
206  return r;
207 }
208 
209 static inline substr_t substrz(const WCHAR *str)
210 {
211  return substr(str, lstrlenW(str));
212 }
213 
215 {
216  dataA->dwFileAttributes = dataW->dwFileAttributes;
217  dataA->ftCreationTime = dataW->ftCreationTime;
218  dataA->ftLastAccessTime = dataW->ftLastAccessTime;
219  dataA->ftLastWriteTime = dataW->ftLastWriteTime;
220  dataA->nFileSizeHigh = dataW->nFileSizeHigh;
221  dataA->nFileSizeLow = dataW->nFileSizeLow;
222  dataA->dwReserved0 = dataW->dwReserved0;
223  dataA->dwReserved1 = dataW->dwReserved1;
224  WideCharToMultiByte(CP_ACP, 0, dataW->cFileName, -1,
225  dataA->cFileName, sizeof(dataA->cFileName),
226  NULL, NULL);
228  dataA->cAlternateFileName, sizeof(dataA->cAlternateFileName),
229  NULL, NULL);
230 }
231 
232 typedef enum
233 {
241 } WH_TYPE;
242 
243 #define INET_OPENURL 0x0001
244 #define INET_CALLBACKW 0x0002
245 
246 typedef struct
247 {
253 } req_file_t;
254 
256 
257 typedef struct {
258  void (*Destroy)(object_header_t*);
259  void (*CloseConnection)(object_header_t*);
260  DWORD (*QueryOption)(object_header_t*,DWORD,void*,DWORD*,BOOL);
261  DWORD (*SetOption)(object_header_t*,DWORD,void*,DWORD);
264  DWORD (*QueryDataAvailable)(object_header_t*,DWORD*,DWORD,DWORD_PTR);
266  DWORD (*LockRequestFile)(object_header_t*,req_file_t**);
267 } object_vtbl_t;
268 
269 #define INTERNET_HANDLE_IN_USE 1
270 
272 {
285  struct list entry;
286  struct list children;
287 };
288 
289 typedef struct
290 {
299 } appinfo_t;
300 
301 typedef struct
302 {
305  LPWSTR hostName; /* the final destination of the request */
308  INTERNET_PORT hostPort; /* the final destination port of the request */
313 
314 #define HDR_ISREQUEST 0x0001
315 #define HDR_COMMADELIMITED 0x0002
316 #define HDR_SEMIDELIMITED 0x0004
317 
318 typedef struct
319 {
325 
326 
327 struct HttpAuthInfo;
328 
330 
331 typedef struct {
333 } data_stream_t;
334 
335 typedef struct {
340 
341 #define READ_BUFFER_SIZE 8192
342 
343 typedef struct
344 {
361 
362  CRITICAL_SECTION headers_section; /* section to protect the headers array */
365 
372 
373  CRITICAL_SECTION read_section; /* section to protect the following fields */
374  ULONGLONG contentLength; /* total number of bytes to be read */
375  BOOL read_gzip; /* are we reading in gzip mode? */
376  DWORD read_pos; /* current read position in read_buf */
377  DWORD read_size; /* valid data size in read_buf */
378  BYTE read_buf[READ_BUFFER_SIZE]; /* buffer for already read but not returned data */
379 
383 
386 
388 {
391 };
392 
394 
399 
402 
404 
405 HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
406  INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
408  DWORD dwInternalFlags) DECLSPEC_HIDDEN;
409 
411  INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
413  DWORD dwInternalFlags, HINTERNET*) DECLSPEC_HIDDEN;
414 
416 
419 
424 
426  DWORD dwInternetStatus, LPVOID lpvStatusInfo,
427  DWORD dwStatusInfoLength) DECLSPEC_HIDDEN;
429 
432 void NETCON_unload(void) DECLSPEC_HIDDEN;
434 DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags,
435  int *sent /* out */) DECLSPEC_HIDDEN;
436 DWORD NETCON_recv(netconn_t*,void*,size_t,BOOL,int*) DECLSPEC_HIDDEN;
441 int sock_send(int fd, const void *msg, size_t len, int flags) DECLSPEC_HIDDEN;
442 int sock_recv(int fd, void *msg, size_t len, int flags) DECLSPEC_HIDDEN;
443 
445 
448 
449 static inline req_file_t *req_file_addref(req_file_t *req_file)
450 {
451  InterlockedIncrement(&req_file->ref);
452  return req_file;
453 }
454 
456 void free_urlcache(void) DECLSPEC_HIDDEN;
457 void free_cookie(void) DECLSPEC_HIDDEN;
459 
460 void init_winsock(void) DECLSPEC_HIDDEN;
461 
462 #define MAX_REPLY_LEN 0x5B4
463 
464 /* Used for debugging - maybe need to be shared in the Wine debugging code ? */
465 typedef struct
466 {
468  const char* name;
470 
471 /* Undocumented security flags */
472 #define _SECURITY_FLAG_CERT_REV_FAILED 0x00800000
473 #define _SECURITY_FLAG_CERT_INVALID_CA 0x01000000
474 #define _SECURITY_FLAG_CERT_INVALID_CN 0x02000000
475 #define _SECURITY_FLAG_CERT_INVALID_DATE 0x04000000
476 
477 #define _SECURITY_ERROR_FLAGS_MASK \
478  (_SECURITY_FLAG_CERT_REV_FAILED \
479  |_SECURITY_FLAG_CERT_INVALID_CA \
480  |_SECURITY_FLAG_CERT_INVALID_CN \
481  |_SECURITY_FLAG_CERT_INVALID_DATE)
482 
483 #endif /* _WINE_INTERNET_H_ */
size_t extra_len
Definition: internet.h:77
static void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
void * alloc_object(object_header_t *, const object_vtbl_t *, size_t) DECLSPEC_HIDDEN
Definition: internet.c:103
DWORD nFileSizeHigh
Definition: winbase.h:937
DWORD dwReserved1
Definition: winbase.h:928
Definition: pdh_main.c:93
CtxtHandle ssl_ctx
Definition: internet.h:72
BOOL is_https
Definition: internet.h:38
int sock_send(int fd, const void *msg, size_t len, int flags) DECLSPEC_HIDDEN
char hdr[14]
Definition: iptest.cpp:33
DWORD connect_timeout
Definition: internet.h:353
FILETIME last_modified
Definition: internet.h:366
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
CHAR cFileName[MAX_PATH]
Definition: winbase.h:929
#define DWORD_PTR
Definition: treelist.c:76
#define WideCharToMultiByte
Definition: compat.h:111
DWORD INTERNET_AsyncCall(task_header_t *) DECLSPEC_HIDDEN
Definition: internet.c:3915
DWORD INET_QueryOption(object_header_t *, DWORD, void *, DWORD *, BOOL) DECLSPEC_HIDDEN
Definition: internet.c:2654
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
void free_authorization_cache(void) DECLSPEC_HIDDEN
Definition: http.c:943
http_session_t * session
Definition: internet.h:346
netconn_stream_t netconn_stream
Definition: internet.h:381
FILETIME ftLastAccessTime
Definition: winbase.h:923
static substr_t substrz(const WCHAR *str)
Definition: internet.h:209
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG ref
Definition: internet.h:47
INTERNET_PORT hostPort
Definition: internet.h:308
WORD wCount
Definition: internet.h:323
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
LONG ref
Definition: internet.h:248
DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags, int *sent) DECLSPEC_HIDDEN
#define CP_ACP
Definition: compat.h:109
server_t * proxy
Definition: internet.h:348
static char * heap_strdupWtoA(LPCWSTR str)
Definition: internet.h:184
WCHAR * INTERNET_FindProxyForProtocol(LPCWSTR szProxy, LPCWSTR proto) DECLSPEC_HIDDEN
Definition: internet.c:384
VOID(CALLBACK * INTERNET_STATUS_CALLBACK)(_In_ HINTERNET, _In_opt_ DWORD_PTR, _In_ DWORD, _In_opt_ LPVOID, _In_ DWORD)
Definition: wininet.h:859
DWORD connect_timeout
Definition: internet.h:309
DWORD create_netconn(server_t *, DWORD, BOOL, DWORD, netconn_t **) DECLSPEC_HIDDEN
void INTERNET_SetLastError(DWORD dwError) DECLSPEC_HIDDEN
Definition: internet.c:3837
LPWSTR userName
Definition: internet.h:306
static req_file_t * req_file_addref(req_file_t *req_file)
Definition: internet.h:449
BOOL NETCON_is_alive(netconn_t *) DECLSPEC_HIDDEN
struct list children
Definition: internet.h:286
ULONGLONG contentLength
Definition: internet.h:374
const CERT_CHAIN_CONTEXT * cert_chain
Definition: internet.h:50
LPSTR INTERNET_GetResponseBuffer(void) DECLSPEC_HIDDEN
Definition: internet.c:3937
WCHAR cAlternateFileName[14]
Definition: winbase.h:942
DWORD dwReserved0
Definition: winbase.h:927
#define INTERNET_HANDLE_TYPE_CONNECT_GOPHER
Definition: wininet.h:804
FILETIME expires
Definition: internet.h:369
_In_opt_ LPSTR _In_opt_ LPSTR lpszPassword
Definition: winbase.h:2690
DWORD nFileSizeLow
Definition: winbase.h:926
static int fd
Definition: io.c:51
ULONGLONG content_read
Definition: internet.h:338
void * alloc_async_task(object_header_t *, async_task_proc_t, size_t) DECLSPEC_HIDDEN
Definition: internet.c:3894
size_t peek_len
Definition: internet.h:80
void(* async_task_proc_t)(task_header_t *)
Definition: internet.h:385
int NETCON_GetCipherStrength(netconn_t *) DECLSPEC_HIDDEN
static char * heap_strdupA(const char *str)
Definition: internet.h:113
char * LPSTR
Definition: xmlstorage.h:182
object_header_t * WININET_AddRef(object_header_t *info) DECLSPEC_HIDDEN
Definition: internet.c:169
BOOL collect_connections(collect_type_t) DECLSPEC_HIDDEN
Definition: http.c:235
#define lstrlenW
Definition: compat.h:609
#define BOOL
Definition: nt_native.h:43
_Check_return_ _CRTIMP char *__cdecl asctime(_In_ const struct tm *_Tm)
#define DWORD
Definition: nt_native.h:44
int socket
Definition: internet.h:69
DWORD create_req_file(const WCHAR *, req_file_t **) DECLSPEC_HIDDEN
Definition: internet.c:3988
LPWSTR proxyUsername
Definition: internet.h:295
VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext, DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwStatusInfoLength) DECLSPEC_HIDDEN
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
DWORD_PTR dwContext
Definition: internet.h:278
unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size)
Definition: deflate.c:1167
struct HTTPHEADERW * LPHTTPHEADERW
LPWSTR hostName
Definition: internet.h:305
static WCHAR * heap_strdupAtoW(const char *str)
Definition: internet.h:168
void free_urlcache(void) DECLSPEC_HIDDEN
Definition: urlcache.c:4130
WORD INTERNET_PORT
Definition: winhttp.h:38
FILETIME ftCreationTime
Definition: winbase.h:922
BOOL keep_alive
Definition: internet.h:84
void close_netconn(netconn_t *) DECLSPEC_HIDDEN
DWORD NETCON_recv(netconn_t *, void *, size_t, BOOL, int *) DECLSPEC_HIDDEN
HTTPHEADERW * custHeaders
Definition: internet.h:363
DWORD nFileSizeLow
Definition: winbase.h:938
INTERNET_PORT port
Definition: internet.h:37
DWORD INET_SetOption(object_header_t *, DWORD, void *, DWORD) DECLSPEC_HIDDEN
Definition: internet.c:2753
static LPWSTR heap_strndupW(LPCWSTR str, UINT max_len)
Definition: internet.h:128
HMODULE WININET_hModule
Definition: internet.c:73
const WCHAR * canon_host_port
Definition: internet.h:45
const object_vtbl_t * vtbl
Definition: internet.h:274
DWORD64 keep_until
Definition: internet.h:85
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOL GetAddress(const WCHAR *, INTERNET_PORT, SOCKADDR *, int *, char *) DECLSPEC_HIDDEN
Definition: utility.c:133
struct HttpAuthInfo * authInfo
Definition: internet.h:370
DWORD accessType
Definition: internet.h:297
req_file_t * req_file
Definition: internet.h:368
WH_TYPE
Definition: internet.h:232
object_header_t hdr
Definition: internet.h:345
const WCHAR * str
DWORD INTERNET_GetLastError(void) DECLSPEC_HIDDEN
Definition: internet.c:3858
DWORD receive_timeout
Definition: internet.h:311
appinfo_t * appInfo
Definition: internet.h:304
void free_netconn(netconn_t *) DECLSPEC_HIDDEN
LPWSTR version
Definition: internet.h:356
DWORD security_flags
Definition: internet.h:81
LPWSTR statusText
Definition: internet.h:358
HANDLE file_handle
Definition: internet.h:249
data_stream_t data_stream
Definition: internet.h:336
DWORD nCustHeaders
Definition: internet.h:364
BOOL secure
Definition: internet.h:70
netconn_t * netconn
Definition: internet.h:351
DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value) DECLSPEC_HIDDEN
time_t ConvertTimeString(LPCWSTR asctime) DECLSPEC_HIDDEN
Definition: utility.c:49
#define READ_BUFFER_SIZE
Definition: internet.h:341
LPWSTR proxyPassword
Definition: internet.h:296
void free_cookie(void) DECLSPEC_HIDDEN
Definition: cookie.c:1269
DWORD bytesWritten
Definition: internet.h:360
data_stream_t * data_stream
Definition: internet.h:380
BOOL init_urlcache(void) DECLSPEC_HIDDEN
Definition: urlcache.c:4112
GLsizeiptr size
Definition: glext.h:5919
DWORD get_cookie_header(const WCHAR *, const WCHAR *, WCHAR **) DECLSPEC_HIDDEN
Definition: cookie.c:646
#define GetProcessHeap()
Definition: compat.h:595
DWORD send_timeout
Definition: internet.h:310
LPWSTR verb
Definition: internet.h:350
BOOL is_blocking
Definition: internet.h:71
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN
object_header_t hdr
Definition: internet.h:303
ULONGLONG content_length
Definition: internet.h:337
DWORD HTTP_Connect(appinfo_t *, LPCWSTR, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, DWORD dwInternalFlags, HINTERNET *) DECLSPEC_HIDDEN
Definition: http.c:5836
uint64_t ULONGLONG
Definition: typedefs.h:67
INT WSAAPI send(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags)
Definition: send.c:23
HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, DWORD dwInternalFlags) DECLSPEC_HIDDEN
Definition: ftp.c:2428
struct list entry
Definition: internet.h:285
DWORD set_cookie(substr_t, substr_t, substr_t, substr_t, DWORD) DECLSPEC_HIDDEN
Definition: cookie.c:912
FILETIME ftLastWriteTime
Definition: winbase.h:924
DWORD security_flags
Definition: internet.h:49
unsigned short WORD
Definition: ntddk_ex.h:93
#define INTERNET_HANDLE_TYPE_FTP_FILE
Definition: wininet.h:808
unsigned long DWORD
Definition: ntddk_ex.h:95
const WCHAR * host_port
Definition: internet.h:44
WCHAR cFileName[MAX_PATH]
Definition: winbase.h:941
BOOL is_committed
Definition: internet.h:252
DWORD read_size
Definition: internet.h:377
GLbitfield flags
Definition: glext.h:7161
LPWSTR proxy
Definition: internet.h:293
server_t * get_server(substr_t, INTERNET_PORT, BOOL, BOOL) DECLSPEC_HIDDEN
Definition: http.c:198
FILETIME ftLastWriteTime
Definition: winbase.h:936
DWORD dwFileAttributes
Definition: winbase.h:921
object_header_t * hdr
Definition: internet.h:390
DWORD security_flags
Definition: internet.h:352
int ret
char * peek_msg_mem
Definition: internet.h:79
DWORD send_timeout
Definition: internet.h:354
GLenum const GLvoid * addr
Definition: glext.h:9621
Definition: msg.h:34
const WCHAR * str
Definition: internet.h:199
collect_type_t
Definition: internet.h:59
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
uint32_t entry
Definition: isohybrid.c:63
DWORD connect_timeout
Definition: internet.h:298
static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
Definition: internet.h:214
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
WCHAR * name
Definition: internet.h:36
FILETIME ftLastAccessTime
Definition: winbase.h:935
#define INTERNET_HANDLE_TYPE_CONNECT_FTP
Definition: wininet.h:803
Definition: _list.h:228
uint32_t DWORD_PTR
Definition: typedefs.h:65
LPWSTR lpszField
Definition: internet.h:320
unsigned char BYTE
Definition: xxhash.c:193
HINTERNET hInternet
Definition: internet.h:275
const data_stream_vtbl_t * vtbl
Definition: internet.h:332
const char * name
Definition: internet.h:468
#define INTERNET_HANDLE_TYPE_HTTP_REQUEST
Definition: wininet.h:814
server_t * server
Definition: internet.h:347
DWORD dwReserved0
Definition: winbase.h:939
void server_release(server_t *) DECLSPEC_HIDDEN
Definition: http.c:154
HANDLE hCacheFile
Definition: internet.h:367
DWORD status_code
Definition: internet.h:357
BOOL mask_errors
Definition: internet.h:82
HMODULE WININET_hModule DECLSPEC_HIDDEN
object_header_t hdr
Definition: internet.h:291
DWORD dwInternalFlags
Definition: internet.h:281
DWORD dwReserved1
Definition: winbase.h:940
#define InterlockedIncrement
Definition: armddk.h:53
uint64_t DWORD64
Definition: typedefs.h:67
DWORD read_pos
Definition: internet.h:376
BOOL is_valid_netconn(netconn_t *) DECLSPEC_HIDDEN
__kernel_time_t time_t
Definition: linux.h:252
WORD wFlags
Definition: internet.h:322
async_task_proc_t proc
Definition: internet.h:389
#define HeapReAlloc
Definition: compat.h:593
#define ReadFile(a, b, c, d, e)
Definition: compat.h:601
int sock_recv(int fd, void *msg, size_t len, int flags) DECLSPEC_HIDDEN
DWORD receive_timeout
Definition: internet.h:355
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
DWORD dwFileAttributes
Definition: winbase.h:933
struct HttpAuthInfo * proxyAuthInfo
Definition: internet.h:371
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define MultiByteToWideChar
Definition: compat.h:110
CRITICAL_SECTION read_section
Definition: internet.h:373
size_t len
Definition: internet.h:200
char * peek_msg
Definition: internet.h:78
#define msg(x)
Definition: auth_time.c:54
Definition: mem.c:156
CONST void * LPCVOID
Definition: windef.h:191
char * ssl_buf
Definition: internet.h:75
BOOL read_gzip
Definition: internet.h:375
void req_file_release(req_file_t *) DECLSPEC_HIDDEN
Definition: internet.c:4015
BOOL WININET_Release(object_header_t *info) DECLSPEC_HIDDEN
Definition: internet.c:211
int addr_len
Definition: internet.h:40
DWORD nFileSizeHigh
Definition: winbase.h:925
WCHAR * scheme_host_port
Definition: internet.h:43
#define INET6_ADDRSTRLEN
Definition: ws2ipdef.h:132
unsigned int ULONG
Definition: retypes.h:1
WCHAR * file_name
Definition: internet.h:250
void NETCON_unload(void) DECLSPEC_HIDDEN
INTERNET_STATUS_CALLBACK lpfnStatusCB
Definition: internet.h:284
static WCHAR * heap_strndupAtoW(const char *str, int len_a, DWORD *len_w)
Definition: internet.h:149
LPWSTR lpszValue
Definition: internet.h:321
static substr_t substr(const WCHAR *str, size_t len)
Definition: internet.h:203
WCHAR * url
Definition: internet.h:251
WCHAR * LPWSTR
Definition: xmlstorage.h:184
FILETIME ftCreationTime
Definition: winbase.h:934
LPWSTR password
Definition: internet.h:307
void server_addref(server_t *) DECLSPEC_HIDDEN
Definition: http.c:149
#define INTERNET_HANDLE_TYPE_INTERNET
Definition: wininet.h:802
char * extra_buf
Definition: internet.h:76
LPWSTR agent
Definition: internet.h:292
server_t * server
Definition: internet.h:74
LPWSTR proxyBypass
Definition: internet.h:294
object_header_t * get_handle_object(HINTERNET hinternet) DECLSPEC_HIDDEN
Definition: internet.c:176
WH_TYPE htype
Definition: internet.h:273
#define INTERNET_HANDLE_TYPE_CONNECT_HTTP
Definition: wininet.h:805
static LPWSTR heap_strdupW(LPCWSTR str)
Definition: internet.h:97
CRITICAL_SECTION headers_section
Definition: internet.h:362
DWORD NETCON_secure_connect(netconn_t *, server_t *) DECLSPEC_HIDDEN
SecPkgContext_StreamSizes ssl_sizes
Definition: internet.h:73
CHAR cAlternateFileName[14]
Definition: winbase.h:930
void init_winsock(void) DECLSPEC_HIDDEN
DWORD bytesToWrite
Definition: internet.h:359
#define INTERNET_HANDLE_TYPE_FTP_FIND
Definition: wininet.h:806
static void size_t len
Definition: internet.h:93
LPWSTR path
Definition: internet.h:349