httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: apr_sockaddr_t
Date Fri, 10 Nov 2000 15:08:25 GMT
> > >   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?  If we have "telnet\0" that's 7,
and is that the biggest?  I was thinking of port_str being used for known
ports as well as string representations (maybe I should change the comment?)
and I wasn't sure what the longest would be.  I see there is a define of
NI_MAXSERV at 32, so would 32 be a suitable value and do we want to go that
large?

david



Mime
View raw message