X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fcups.git;a=blobdiff_plain;f=cups%2Fhttp-private.h;h=bef934ed92e2cbed8cccd2dec17b113425360c45;hp=0f66ed8c6b8e36016c8388703edf6000824b3f9e;hb=f7faf1f5c3235dfa4f883522da7dc6446f028247;hpb=4400e98de24bd267328aa20d57951fb6678297fe diff --git a/cups/http-private.h b/cups/http-private.h index 0f66ed8c6..bef934ed9 100644 --- a/cups/http-private.h +++ b/cups/http-private.h @@ -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 +# include # ifdef __sun /* @@ -98,7 +99,20 @@ typedef struct # include -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 +# ifdef HAVE_GETIFADDRS +# include +# else +# include +# ifdef HAVE_SYS_SOCKIO_H +# include +# 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 $". */