]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/http-private.h
Load cups into easysw/current.
[thirdparty/cups.git] / cups / http-private.h
index 0f66ed8c6b8e36016c8388703edf6000824b3f9e..bef934ed92e2cbed8cccd2dec17b113425360c45 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -31,7 +31,8 @@
  * Include necessary headers...
  */
 
-#  include "config.h"
+#  include <stdlib.h>
+#  include <config.h>
 
 #  ifdef __sun
 /*
@@ -98,7 +99,20 @@ typedef struct
 
 #    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);
@@ -120,8 +134,58 @@ extern const char *_cups_hstrerror(int error);
 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 $".
  */