~ubuntu-branches/ubuntu/saucy/openvpn/saucy-proposed

« back to all changes in this revision

Viewing changes to syshead.h

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2013-05-24 17:42:45 UTC
  • mfrom: (1.1.19) (10.2.22 sid)
  • Revision ID: package-import@ubuntu.com-20130524174245-g9y6wlforycufqy5
Tags: 2.3.1-2ubuntu1
* Merge from Debian unstable. Remaining changes:
  - debian/openvpn.init.d:
    + Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    + Show per-VPN result messages.
    + Add "--script-security 2" by default for backwards compatabliity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  OpenVPN -- An application to securely tunnel IP networks
3
 
 *             over a single UDP port, with support for SSL/TLS-based
4
 
 *             session authentication and key exchange,
5
 
 *             packet encryption, packet authentication, and
6
 
 *             packet compression.
7
 
 *
8
 
 *  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
9
 
 *
10
 
 *  This program is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License version 2
12
 
 *  as published by the Free Software Foundation.
13
 
 *
14
 
 *  This program is distributed in the hope that it will be useful,
15
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 *  GNU General Public License for more details.
18
 
 *
19
 
 *  You should have received a copy of the GNU General Public License
20
 
 *  along with this program (see the file COPYING included with this
21
 
 *  distribution); if not, write to the Free Software Foundation, Inc.,
22
 
 *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 
 */
24
 
 
25
 
#ifndef SYSHEAD_H
26
 
#define SYSHEAD_H
27
 
 
28
 
/*
29
 
 * Only include if not during configure
30
 
 */
31
 
#ifdef WIN32
32
 
/* USE_PF_INET6: win32 ipv6 exists only after 0x0501 (XP) */
33
 
#define WINVER 0x0501
34
 
#endif
35
 
#ifndef PACKAGE_NAME
36
 
#include "config.h"
37
 
#endif
38
 
 
39
 
/* branch prediction hints */
40
 
#if defined(__GNUC__)
41
 
# define likely(x)       __builtin_expect((x),1)
42
 
# define unlikely(x)     __builtin_expect((x),0)
43
 
#else
44
 
# define likely(x)      (x)
45
 
# define unlikely(x)    (x)
46
 
#endif
47
 
 
48
 
#if defined(_WIN32) && !defined(WIN32)
49
 
#define WIN32
50
 
#endif
51
 
 
52
 
#ifdef WIN32
53
 
#include <windows.h>
54
 
#include <winsock2.h>
55
 
#define sleep(x) Sleep((x)*1000)
56
 
#define random rand
57
 
#define srandom srand
58
 
#endif
59
 
 
60
 
#ifdef HAVE_SYS_TYPES_H
61
 
#include <sys/types.h>
62
 
#endif
63
 
 
64
 
#ifdef HAVE_SYS_WAIT_H
65
 
# include <sys/wait.h>
66
 
#endif
67
 
 
68
 
#ifndef WIN32
69
 
#ifndef WEXITSTATUS
70
 
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
71
 
#endif
72
 
#ifndef WIFEXITED
73
 
# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
74
 
#endif
75
 
#endif
76
 
 
77
 
#ifdef TIME_WITH_SYS_TIME
78
 
# include <sys/time.h>
79
 
# include <time.h>
80
 
#else
81
 
# ifdef HAVE_SYS_TIME_H
82
 
#  include <sys/time.h>
83
 
# else
84
 
#  include <time.h>
85
 
# endif
86
 
#endif
87
 
 
88
 
#ifdef HAVE_SYS_SOCKET_H
89
 
# if defined(TARGET_LINUX) && !defined(_GNU_SOURCE)
90
 
   /* needed for peercred support on glibc-2.8 */
91
 
#  define _GNU_SOURCE
92
 
# endif
93
 
#include <sys/socket.h>
94
 
#endif
95
 
 
96
 
#ifdef HAVE_SYS_UN_H
97
 
#include <sys/un.h>
98
 
#endif
99
 
 
100
 
#ifdef HAVE_SYS_IOCTL_H
101
 
#include <sys/ioctl.h>
102
 
#endif
103
 
 
104
 
#ifdef HAVE_SYS_STAT_H
105
 
#include <sys/stat.h>
106
 
#endif
107
 
 
108
 
#ifdef HAVE_FCNTL_H
109
 
#include <fcntl.h>
110
 
#endif
111
 
 
112
 
#ifdef HAVE_SYS_FILE_H
113
 
#include <sys/file.h>
114
 
#endif
115
 
 
116
 
#ifdef HAVE_STDLIB_H
117
 
#include <stdlib.h>
118
 
#endif
119
 
 
120
 
#ifdef HAVE_STDINT_H
121
 
#include <stdint.h>
122
 
#endif
123
 
 
124
 
#ifdef HAVE_STDARG_H
125
 
#include <stdarg.h>
126
 
#endif
127
 
 
128
 
#ifdef HAVE_UNISTD_H
129
 
#include <unistd.h>
130
 
#endif
131
 
 
132
 
#ifdef HAVE_SIGNAL_H
133
 
#include <signal.h>
134
 
#endif
135
 
 
136
 
#ifdef HAVE_STDIO_H
137
 
#include <stdio.h>
138
 
#endif
139
 
 
140
 
#ifdef HAVE_CTYPE_H
141
 
#include <ctype.h>
142
 
#endif
143
 
 
144
 
#ifdef HAVE_ERRNO_H
145
 
#include <errno.h>
146
 
#endif
147
 
 
148
 
#ifdef HAVE_ERR_H
149
 
#include <err.h>
150
 
#endif
151
 
 
152
 
#ifdef HAVE_SYSLOG_H
153
 
#include <syslog.h>
154
 
#endif
155
 
 
156
 
#ifdef HAVE_PWD_H
157
 
#include <pwd.h>
158
 
#endif
159
 
 
160
 
#ifdef HAVE_GRP_H
161
 
#include <grp.h>
162
 
#endif
163
 
 
164
 
#ifdef USE_LIBDL
165
 
#include <dlfcn.h>
166
 
#endif
167
 
 
168
 
#ifdef HAVE_NETDB_H
169
 
#include <netdb.h>
170
 
#endif
171
 
 
172
 
#ifdef HAVE_NETINET_IN_H
173
 
#include <netinet/in.h>
174
 
#endif
175
 
 
176
 
#ifdef HAVE_RESOLV_H
177
 
#include <resolv.h>
178
 
#endif
179
 
 
180
 
#ifdef HAVE_SYS_POLL_H
181
 
#include <sys/poll.h>
182
 
#endif
183
 
 
184
 
#ifdef HAVE_SYS_EPOLL_H
185
 
#include <sys/epoll.h>
186
 
#endif
187
 
 
188
 
#ifdef HAVE_SETCON
189
 
#include <selinux/selinux.h>
190
 
#endif
191
 
 
192
 
#ifdef TARGET_SOLARIS
193
 
#ifdef HAVE_STRINGS_H
194
 
#include <strings.h>
195
 
#endif
196
 
#else
197
 
#ifdef HAVE_STRING_H
198
 
#include <string.h>
199
 
#endif
200
 
#endif
201
 
 
202
 
#ifdef HAVE_ARPA_INET_H
203
 
#include <arpa/inet.h>
204
 
#endif
205
 
 
206
 
#ifdef HAVE_NET_IF_H
207
 
#include <net/if.h>
208
 
#endif
209
 
 
210
 
#ifdef TARGET_LINUX
211
 
 
212
 
#if defined(HAVE_NETINET_IF_ETHER_H)
213
 
#include <netinet/if_ether.h>
214
 
#endif
215
 
 
216
 
#ifdef HAVE_LINUX_IF_TUN_H
217
 
#include <linux/if_tun.h>
218
 
#endif
219
 
 
220
 
#ifdef HAVE_NETINET_IP_H
221
 
#include <netinet/ip.h>
222
 
#endif
223
 
 
224
 
#ifdef HAVE_LINUX_SOCKIOS_H
225
 
#include <linux/sockios.h>
226
 
#endif
227
 
 
228
 
#ifdef HAVE_LINUX_TYPES_H
229
 
#include <linux/types.h>
230
 
#endif
231
 
 
232
 
#ifdef HAVE_LINUX_ERRQUEUE_H
233
 
#include <linux/errqueue.h>
234
 
#endif
235
 
 
236
 
#ifdef HAVE_NETINET_TCP_H
237
 
#include <netinet/tcp.h>
238
 
#endif
239
 
 
240
 
#endif /* TARGET_LINUX */
241
 
 
242
 
#ifdef TARGET_SOLARIS
243
 
 
244
 
#ifdef HAVE_STROPTS_H
245
 
#include <stropts.h>
246
 
#undef S_ERROR
247
 
#endif
248
 
 
249
 
#ifdef HAVE_NET_IF_TUN_H
250
 
#include <net/if_tun.h>
251
 
#endif
252
 
 
253
 
#ifdef HAVE_SYS_SOCKIO_H
254
 
#include <sys/sockio.h>
255
 
#endif
256
 
 
257
 
#ifdef HAVE_NETINET_IN_SYSTM_H
258
 
#include <netinet/in_systm.h>
259
 
#endif
260
 
 
261
 
#ifdef HAVE_NETINET_IP_H
262
 
#include <netinet/ip.h>
263
 
#endif
264
 
 
265
 
#ifdef HAVE_NETINET_TCP_H
266
 
#include <netinet/tcp.h>
267
 
#endif
268
 
 
269
 
#endif /* TARGET_SOLARIS */
270
 
 
271
 
#ifdef TARGET_OPENBSD
272
 
 
273
 
#ifdef HAVE_SYS_UIO_H
274
 
#include <sys/uio.h>
275
 
#endif
276
 
 
277
 
#ifdef HAVE_NETINET_IN_SYSTM_H
278
 
#include <netinet/in_systm.h>
279
 
#endif
280
 
 
281
 
#ifdef HAVE_NETINET_IP_H
282
 
#include <netinet/ip.h>
283
 
#endif
284
 
 
285
 
#ifdef HAVE_NET_IF_TUN_H
286
 
#include <net/if_tun.h>
287
 
#endif
288
 
 
289
 
#endif /* TARGET_OPENBSD */
290
 
 
291
 
#ifdef TARGET_FREEBSD
292
 
 
293
 
#ifdef HAVE_SYS_UIO_H
294
 
#include <sys/uio.h>
295
 
#endif
296
 
 
297
 
#ifdef HAVE_NETINET_IN_SYSTM_H
298
 
#include <netinet/in_systm.h>
299
 
#endif
300
 
 
301
 
#ifdef HAVE_NETINET_IP_H
302
 
#include <netinet/ip.h>
303
 
#endif
304
 
 
305
 
#ifdef HAVE_NET_IF_TUN_H
306
 
#include <net/if_tun.h>
307
 
#endif
308
 
 
309
 
#endif /* TARGET_FREEBSD */
310
 
 
311
 
#ifdef TARGET_NETBSD
312
 
 
313
 
#ifdef HAVE_NET_IF_TUN_H
314
 
#include <net/if_tun.h>
315
 
#endif
316
 
 
317
 
#ifdef HAVE_NETINET_TCP_H
318
 
#include <netinet/tcp.h>
319
 
#endif
320
 
 
321
 
#endif /* TARGET_NETBSD */
322
 
 
323
 
#ifdef TARGET_DRAGONFLY
324
 
 
325
 
#ifdef HAVE_SYS_UIO_H
326
 
#include <sys/uio.h>
327
 
#endif
328
 
 
329
 
#ifdef HAVE_NETINET_IN_SYSTM_H
330
 
#include <netinet/in_systm.h>
331
 
#endif
332
 
 
333
 
#ifdef HAVE_NETINET_IP_H
334
 
#include <netinet/ip.h>
335
 
#endif
336
 
 
337
 
#ifdef HAVE_NET_TUN_IF_TUN_H
338
 
#include <net/tun/if_tun.h>
339
 
#endif
340
 
 
341
 
#endif /* TARGET_DRAGONFLY */
342
 
 
343
 
#ifdef WIN32
344
 
#include <iphlpapi.h>
345
 
#include <wininet.h>
346
 
/* The following two headers are needed of USE_PF_INET6 */
347
 
#include <winsock2.h>
348
 
#include <ws2tcpip.h>
349
 
#endif
350
 
 
351
 
#ifdef HAVE_SYS_MMAN_H
352
 
#ifdef TARGET_DARWIN
353
 
#define _P1003_1B_VISIBLE
354
 
#endif /* TARGET_DARWIN */
355
 
#include <sys/mman.h>
356
 
#endif
357
 
 
358
 
/*
359
 
 * Pedantic mode is meant to accomplish lint-style program checking,
360
 
 * not to build a working executable.
361
 
 */
362
 
#ifdef __STRICT_ANSI__
363
 
# define PEDANTIC 1
364
 
# undef HAVE_CPP_VARARG_MACRO_GCC
365
 
# undef HAVE_CPP_VARARG_MACRO_ISO
366
 
# undef EMPTY_ARRAY_SIZE
367
 
# define EMPTY_ARRAY_SIZE 1
368
 
# undef inline
369
 
# define inline
370
 
#else
371
 
# define PEDANTIC 0
372
 
#endif
373
 
 
374
 
/*
375
 
 * Do we have the capability to support the --passtos option?
376
 
 */
377
 
#if defined(IPPROTO_IP) && defined(IP_TOS) && defined(HAVE_SETSOCKOPT)
378
 
#define PASSTOS_CAPABILITY 1
379
 
#else
380
 
#define PASSTOS_CAPABILITY 0
381
 
#endif
382
 
 
383
 
/*
384
 
 * Do we have the capability to report extended socket errors?
385
 
 */
386
 
#if defined(HAVE_LINUX_TYPES_H) && defined(HAVE_LINUX_ERRQUEUE_H) && defined(HAVE_SOCK_EXTENDED_ERR) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(IP_RECVERR) && defined(MSG_ERRQUEUE) && defined(SOL_IP) && defined(HAVE_IOVEC)
387
 
#define EXTENDED_SOCKET_ERROR_CAPABILITY 1
388
 
#else
389
 
#define EXTENDED_SOCKET_ERROR_CAPABILITY 0
390
 
#endif
391
 
 
392
 
/*
393
 
 * Does this platform support linux-style IP_PKTINFO
394
 
 * or bsd-style IP_RECVDSTADDR ?
395
 
 */
396
 
#if defined(ENABLE_MULTIHOME) && ((defined(HAVE_IN_PKTINFO)&&defined(IP_PKTINFO)) || defined(IP_RECVDSTADDR)) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG)
397
 
#define ENABLE_IP_PKTINFO 1
398
 
#else
399
 
#define ENABLE_IP_PKTINFO 0
400
 
#endif
401
 
 
402
 
/*
403
 
 * Disable ESEC
404
 
 */
405
 
#if 0
406
 
#undef EXTENDED_SOCKET_ERROR_CAPABILITY
407
 
#define EXTENDED_SOCKET_ERROR_CAPABILITY 0
408
 
#endif
409
 
 
410
 
/*
411
 
 * Do we have a syslog capability?
412
 
 */
413
 
#if defined(HAVE_OPENLOG) && defined(HAVE_SYSLOG)
414
 
#define SYSLOG_CAPABILITY 1
415
 
#else
416
 
#define SYSLOG_CAPABILITY 0
417
 
#endif
418
 
 
419
 
/*
420
 
 * Does this OS draw a distinction between binary and ascii files?
421
 
 */
422
 
#ifndef O_BINARY
423
 
#define O_BINARY 0
424
 
#endif
425
 
 
426
 
/*
427
 
 * Directory separation char
428
 
 */
429
 
#ifdef WIN32
430
 
#define OS_SPECIFIC_DIRSEP '\\'
431
 
#else
432
 
#define OS_SPECIFIC_DIRSEP '/'
433
 
#endif
434
 
 
435
 
/*
436
 
 * Define a boolean value based
437
 
 * on Win32 status.
438
 
 */
439
 
#ifdef WIN32
440
 
#define WIN32_0_1 1
441
 
#else
442
 
#define WIN32_0_1 0
443
 
#endif
444
 
 
445
 
/*
446
 
 * Our socket descriptor type.
447
 
 */
448
 
#ifdef WIN32
449
 
#define SOCKET_UNDEFINED (INVALID_SOCKET)
450
 
typedef SOCKET socket_descriptor_t;
451
 
#else
452
 
#define SOCKET_UNDEFINED (-1)
453
 
typedef int socket_descriptor_t;
454
 
#endif
455
 
 
456
 
static inline int
457
 
socket_defined (const socket_descriptor_t sd)
458
 
{
459
 
  return sd != SOCKET_UNDEFINED;
460
 
}
461
 
 
462
 
/*
463
 
 * Should statistics counters be 64 bits?
464
 
 */
465
 
#define USE_64_BIT_COUNTERS
466
 
 
467
 
/*
468
 
 * Should we enable the use of execve() for calling subprocesses,
469
 
 * instead of system()?
470
 
 */
471
 
#if defined(HAVE_EXECVE) && defined(HAVE_FORK)
472
 
#define ENABLE_EXECVE
473
 
#endif
474
 
 
475
 
/*
476
 
 * Do we have point-to-multipoint capability?
477
 
 */
478
 
 
479
 
#if defined(ENABLE_CLIENT_SERVER) && defined(USE_CRYPTO) && defined(USE_SSL) && defined(HAVE_GETTIMEOFDAY)
480
 
#define P2MP 1
481
 
#else
482
 
#define P2MP 0
483
 
#endif
484
 
 
485
 
#if P2MP && !defined(ENABLE_CLIENT_ONLY)
486
 
#define P2MP_SERVER 1
487
 
#else
488
 
#define P2MP_SERVER 0
489
 
#endif
490
 
 
491
 
/*
492
 
 * HTTPS port sharing capability
493
 
 */
494
 
#if defined(ENABLE_PORT_SHARE) && P2MP_SERVER && defined(SCM_RIGHTS) && defined(HAVE_MSGHDR) && defined(HAVE_CMSGHDR) && defined(HAVE_IOVEC) && defined(CMSG_FIRSTHDR) && defined(CMSG_NXTHDR) && defined(HAVE_RECVMSG) && defined(HAVE_SENDMSG)
495
 
#define PORT_SHARE 1
496
 
#else
497
 
#define PORT_SHARE 0
498
 
#endif
499
 
 
500
 
/*
501
 
 * Do we have a plug-in capability?
502
 
 */
503
 
#if defined(USE_LIBDL) || defined(USE_LOAD_LIBRARY)
504
 
#define ENABLE_PLUGIN
505
 
#endif
506
 
 
507
 
/*
508
 
 * Enable deferred authentication?
509
 
 */
510
 
#if defined(CONFIGURE_DEF_AUTH) && P2MP_SERVER && defined(ENABLE_PLUGIN)
511
 
#define PLUGIN_DEF_AUTH
512
 
#endif
513
 
#if defined(CONFIGURE_DEF_AUTH) && P2MP_SERVER && defined(ENABLE_MANAGEMENT)
514
 
#define MANAGEMENT_DEF_AUTH
515
 
#endif
516
 
#if defined(PLUGIN_DEF_AUTH) || defined(MANAGEMENT_DEF_AUTH)
517
 
#define ENABLE_DEF_AUTH
518
 
#endif
519
 
 
520
 
/*
521
 
 * Enable packet filter?
522
 
 */
523
 
#if defined(CONFIGURE_PF) && P2MP_SERVER && defined(ENABLE_PLUGIN) && defined(HAVE_STAT)
524
 
#define PLUGIN_PF
525
 
#endif
526
 
#if defined(CONFIGURE_PF) && P2MP_SERVER && defined(MANAGEMENT_DEF_AUTH)
527
 
#define MANAGEMENT_PF
528
 
#endif
529
 
#if defined(PLUGIN_PF) || defined(MANAGEMENT_PF)
530
 
#define ENABLE_PF
531
 
#endif
532
 
 
533
 
/*
534
 
 * Do we support Unix domain sockets?
535
 
 */
536
 
#if defined(PF_UNIX) && !defined(WIN32)
537
 
#define UNIX_SOCK_SUPPORT 1
538
 
#else
539
 
#define UNIX_SOCK_SUPPORT 0
540
 
#endif
541
 
 
542
 
/*
543
 
 * Compile the struct buffer_list code
544
 
 */
545
 
#define ENABLE_BUFFER_LIST
546
 
 
547
 
/*
548
 
 * Should we include OCC (options consistency check) code?
549
 
 */
550
 
#ifndef ENABLE_SMALL
551
 
#define ENABLE_OCC
552
 
#endif
553
 
 
554
 
/*
555
 
 * Should we include NTLM proxy functionality
556
 
 */
557
 
#if defined(USE_CRYPTO) && defined(ENABLE_HTTP_PROXY)
558
 
#define NTLM 1
559
 
#else
560
 
#define NTLM 0
561
 
#endif
562
 
 
563
 
/*
564
 
 * Should we include proxy digest auth functionality
565
 
 */
566
 
#if defined(USE_CRYPTO) && defined(ENABLE_HTTP_PROXY)
567
 
#define PROXY_DIGEST_AUTH 1
568
 
#else
569
 
#define PROXY_DIGEST_AUTH 0
570
 
#endif
571
 
 
572
 
/*
573
 
 * Should we include code common to all proxy methods?
574
 
 */
575
 
#if defined(ENABLE_HTTP_PROXY) || defined(ENABLE_SOCKS)
576
 
#define GENERAL_PROXY_SUPPORT
577
 
#endif
578
 
 
579
 
/*
580
 
 * Do we have PKCS11 capability?
581
 
 */
582
 
#if defined(USE_PKCS11) && defined(USE_CRYPTO) && defined(USE_SSL)
583
 
#define ENABLE_PKCS11
584
 
#endif
585
 
 
586
 
/*
587
 
 * Is poll available on this platform?
588
 
 */
589
 
#if defined(HAVE_POLL) && defined(HAVE_SYS_POLL_H)
590
 
#define POLL 1
591
 
#else
592
 
#define POLL 0
593
 
#endif
594
 
 
595
 
/*
596
 
 * Is epoll available on this platform?
597
 
 */
598
 
#if defined(HAVE_EPOLL_CREATE) && defined(HAVE_SYS_EPOLL_H)
599
 
#define EPOLL 1
600
 
#else
601
 
#define EPOLL 0
602
 
#endif
603
 
 
604
 
/* Disable EPOLL */
605
 
#if 0
606
 
#undef EPOLL
607
 
#define EPOLL 0
608
 
#endif
609
 
 
610
 
/*
611
 
 * Should we allow ca/cert/key files to be
612
 
 * included inline, in the configuration file?
613
 
 */
614
 
#define ENABLE_INLINE_FILES 1
615
 
 
616
 
/*
617
 
 * Support "connection" directive
618
 
 */
619
 
#if ENABLE_INLINE_FILES
620
 
#define ENABLE_CONNECTION 1
621
 
#endif
622
 
 
623
 
/*
624
 
 * Should we include http proxy fallback functionality
625
 
 */
626
 
#if defined(ENABLE_CONNECTION) && defined(ENABLE_MANAGEMENT) && defined(ENABLE_HTTP_PROXY)
627
 
#define HTTP_PROXY_FALLBACK 1
628
 
#else
629
 
#define HTTP_PROXY_FALLBACK 0
630
 
#endif
631
 
 
632
 
/*
633
 
 * Reduce sensitivity to system clock instability
634
 
 * and backtracks.
635
 
 */
636
 
#define TIME_BACKTRACK_PROTECTION 1
637
 
 
638
 
/*
639
 
 * Is non-blocking connect() supported?
640
 
 */
641
 
#if defined(HAVE_GETSOCKOPT) && defined(SOL_SOCKET) && defined(SO_ERROR) && defined(EINPROGRESS) && defined(ETIMEDOUT)
642
 
#define CONNECT_NONBLOCK
643
 
#endif
644
 
 
645
 
/*
646
 
 * Do we have the capability to support the AUTO_USERID feature? 
647
 
 */
648
 
#if defined(ENABLE_AUTO_USERID)
649
 
#define AUTO_USERID 1
650
 
#else
651
 
#define AUTO_USERID 0
652
 
#endif
653
 
 
654
 
/*
655
 
 * Do we support challenge/response authentication, as a console-based client?
656
 
 */
657
 
#define ENABLE_CLIENT_CR
658
 
 
659
 
/*
660
 
 * Do we support pushing peer info?
661
 
 */
662
 
#if defined(USE_CRYPTO) && defined(USE_SSL)
663
 
#define ENABLE_PUSH_PEER_INFO
664
 
#endif
665
 
 
666
 
#endif