httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: apr_sockaddr_t
Date Fri, 10 Nov 2000 15:22:18 GMT
"David Reid" <dreid@jetnet.co.uk> writes:

> > > >   Consider reserving space for the port string directly in the
> > > >   apr_sockaddr_t:
> > > >
> > > >       char port_str[6];
> > >
> > > This makes sense, but I wasn't sure what the biggest string we could
> have
> > > would be?  Is 6 big enough?
> >
> > the largest UDP or TCP port is 65535, so max string length is 5 decimal
> > digits + terminating '\0'
> 
> Yes, but what about for the named ports?  

I didn't realize this was for service names.  Forget my comments about
putting the string inline... 

Maybe you want to rename the field?  The parameter to getaddrinfo()
which has the same usage (i.e., a service name if available or a
decimal port number string otherwise) is called servname.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message