/*
- * "$Id: http-private.h 5049 2006-02-02 14:50:57Z mike $"
+ * "$Id: http-private.h 5504 2006-05-10 18:57:46Z mike $"
*
* Private HTTP definitions for the Common UNIX Printing System (CUPS).
*
* Include necessary headers...
*/
-# include "config.h"
+# include <stdlib.h>
+# include <config.h>
# ifdef __sun
/*
# include <Security/SecureTransport.h>
-typedef SSLConnectionRef http_tls_t;
+typedef struct /**** CDSA connection information ****/
+{
+ SSLContextRef session; /* CDSA session object */
+ CFArrayRef certsArray; /* Certificates array */
+} http_tls_t;
+
+typedef union _cdsa_conn_ref_u /**** CDSA Connection reference union
+ **** used to resolve 64-bit casting
+ **** warnings.
+ ****/
+{
+ SSLConnectionRef connection; /* SSL connection pointer */
+ int sock; /* Socket */
+} cdsa_conn_ref_t;
extern OSStatus _httpReadCDSA(SSLConnectionRef connection, void *data,
size_t *dataLength);
extern const char *hstrerror(int error);
# endif /* !HAVE_HSTRERROR */
+
+/*
+ * Some OS's don't have getifaddrs() and freeifaddrs()...
+ */
+
+# include <net/if.h>
+# ifdef HAVE_GETIFADDRS
+# include <ifaddrs.h>
+# else
+# include <sys/ioctl.h>
+# ifdef HAVE_SYS_SOCKIO_H
+# include <sys/sockio.h>
+# endif /* HAVE_SYS_SOCKIO_H */
+
+# ifdef ifa_dstaddr
+# undef ifa_dstaddr
+# endif /* ifa_dstaddr */
+# ifndef ifr_netmask
+# define ifr_netmask ifr_addr
+# endif /* !ifr_netmask */
+
+struct ifaddrs /**** Interface Structure ****/
+{
+ struct ifaddrs *ifa_next; /* Next interface in list */
+ char *ifa_name; /* Name of interface */
+ unsigned int ifa_flags; /* Flags (up, point-to-point, etc.) */
+ struct sockaddr *ifa_addr, /* Network address */
+ *ifa_netmask; /* Address mask */
+ union
+ {
+ struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
+ struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */
+ } ifa_ifu;
+
+ void *ifa_data; /* Interface statistics */
+};
+
+# ifndef ifa_broadaddr
+# define ifa_broadaddr ifa_ifu.ifu_broadaddr
+# endif /* !ifa_broadaddr */
+# ifndef ifa_dstaddr
+# define ifa_dstaddr ifa_ifu.ifu_dstaddr
+# endif /* !ifa_dstaddr */
+
+extern int _cups_getifaddrs(struct ifaddrs **addrs);
+# define getifaddrs _cups_getifaddrs
+extern void _cups_freeifaddrs(struct ifaddrs *addrs);
+# define freeifaddrs _cups_freeifaddrs
+# endif /* HAVE_GETIFADDRS */
+
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
/*
- * End of "$Id: http-private.h 5049 2006-02-02 14:50:57Z mike $".
+ * End of "$Id: http-private.h 5504 2006-05-10 18:57:46Z mike $".
*/