2 * "$Id: http-private.h 4800 2005-10-18 18:06:20Z mike $"
4 * Private HTTP definitions for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2005 by Easy Software Products, all rights reserved.
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
24 * This file is subject to the Apple OS-Developed Software exception.
27 #ifndef _CUPS_HTTP_PRIVATE_H_
28 # define _CUPS_HTTP_PRIVATE_H_
31 * Include necessary headers...
38 * Define FD_SETSIZE to CUPS_MAX_FDS on Solaris to get the correct version of
39 * select() for large numbers of file descriptors.
42 # define FD_SETSIZE CUPS_MAX_FDS
43 # include <sys/select.h>
49 # include <winsock2.h>
53 # include <sys/socket.h>
54 # define closesocket(f) close(f)
59 * IRIX does not define socklen_t, and in fact uses an int instead of
60 * unsigned type for length values...
63 typedef int socklen_t
;
68 # if defined HAVE_LIBSSL
70 * The OpenSSL library provides its own SSL/TLS context structure for its
71 * IO and protocol management...
74 # include <openssl/err.h>
75 # include <openssl/rand.h>
76 # include <openssl/ssl.h>
78 typedef SSL http_tls_t
;
80 # elif defined HAVE_GNUTLS
82 * The GNU TLS library is more of a "bare metal" SSL/TLS library...
84 # include <gnutls/gnutls.h>
88 gnutls_session session
; /* GNU TLS session object */
89 void *credentials
; /* GNU TLS credentials object */
92 # elif defined(HAVE_CDSASSL)
94 * Darwin's Security framework provides its own SSL/TLS context structure
95 * for its IO and protocol management...
98 # include <Security/SecureTransport.h>
100 typedef SSLConnectionRef http_tls_t
;
102 extern OSStatus
_httpReadCDSA(SSLConnectionRef connection
, void *data
,
104 extern OSStatus
_httpWriteCDSA(SSLConnectionRef connection
, const void *data
,
106 # endif /* HAVE_LIBSSL */
109 * Some OS's don't have hstrerror(), most notably Solaris...
112 # ifndef HAVE_HSTRERROR
113 extern const char *_cups_hstrerror(int error
);
114 # define hstrerror _cups_hstrerror
115 # elif defined(_AIX) || defined(__osf__)
117 * AIX and Tru64 UNIX don't provide a prototype but do provide the function...
119 extern const char *hstrerror(int error
);
120 # endif /* !HAVE_HSTRERROR */
122 #endif /* !_CUPS_HTTP_PRIVATE_H_ */
125 * End of "$Id: http-private.h 4800 2005-10-18 18:06:20Z mike $".