Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 17726 invoked by uid 500); 10 Nov 2000 01:40:02 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 17705 invoked from network); 10 Nov 2000 01:40:01 -0000 Date: Thu, 9 Nov 2000 17:41:09 -0800 (PST) From: rbb@covalent.net X-Sender: rbb@koj.rkbloom.net To: "Apache (new-httpd)" Subject: Re: apr_sockaddr_t In-Reply-To: <009101c04ab4$bc8ba150$641aa8c0@godzilla> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N ++1. Ryan > Index: include/apr_network_io.h > =================================================================== > RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v > retrieving revision 1.65 > diff -u -r1.65 apr_network_io.h > --- include/apr_network_io.h 2000/11/10 00:58:25 1.65 > +++ include/apr_network_io.h 2000/11/10 01:16:49 > @@ -119,6 +119,12 @@ > APR_REMOTE > } apr_interface_e; > > +/* Enum of the types of socket we can create... */ > +typedef enum { > + APR_TCP_V4, > + APR_TCP_V6 > +} apr_sockettype_e; > + > /* I guess not everybody uses inet_addr. This defines apr_inet_addr > * appropriately. > */ > @@ -136,6 +142,29 @@ > > /* use apr_uint16_t just in case some system has a short that isn't 16 > bits... */ > typedef apr_uint16_t apr_port_t; > + > +/* we're going to roll our own sockaddr type as we want to make sure > + * we have protocol independance for APR... > + * > + * It's defined here as I think it should all be platform safe... > + */ > +typedef struct { > + apr_pool_t *cont; /* The pool to use... */ > + char *hostname; /* The hostname */ > + char *port_str; /* String representation of port */ > + apr_port_t port; /* numeric port */ > + union { > + struct sockaddr_in sin; /* IPv4 sockaddr structure */ > +#if APR_HAVE_IPV6 > + struct sockaddr_in6 sin6; /* IPv6 sockaddr structure */ > +#endif > + } sa; > + apr_socklen_t sa_len; /* How big is the sockaddr we're using? > */ > + int addr_len; /* How big should the address buffer be? > + * 16 for v4 or 48 for v6 > + * used in inet_ntop... > + */ > +} apr_sockaddr_t; > > #if APR_HAS_SENDFILE > /* Define flags passed in on apr_sendfile() */ > > > _______________________________________________________________________________ Ryan Bloom rbb@apache.org 406 29th St. San Francisco, CA 94131 -------------------------------------------------------------------------------