You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by David Reid <dr...@jetnet.co.uk> on 2000/11/19 13:22:11 UTC
apr_getservbyname
The servent structure returns a proto argument as well as name/port, so
should we be looking to return it as well? Are we going to abstract out the
protocols as well? APR_TCP, APR_UDP anyone?
apr_status_t apr_getservbyname(apr_port_t *port, int *proto, const char
*servname);
However, should this be tied to an apr_sockaddr_t?
apr_status_t apr_getservbyname(apr_sockaddr_t *sa, const char *servname);
Also, what should we be doing on a system where getservbyname isn't
available? Are there any such systems?
david
Re: apr_getservbyname
Posted by Jeff Trawick <tr...@bellsouth.net>.
"David Reid" <dr...@jetnet.co.uk> writes:
> The servent structure returns a proto argument as well as name/port, so
> should we be looking to return it as well? Are we going to abstract out the
> protocols as well? APR_TCP, APR_UDP anyone?
It can't work in general without telling it TCP or UDP, since services
are protocol specific.
> apr_status_t apr_getservbyname(apr_port_t *port, int *proto, const char
> *servname);
proto is input, not output
> However, should this be tied to an apr_sockaddr_t?
Probably; the normal use would be to fill in the port number in the apr_sockaddr_t.
> apr_status_t apr_getservbyname(apr_sockaddr_t *sa, const char *servname);
> Also, what should we be doing on a system where getservbyname isn't
> available? Are there any such systems?
I dunno
--
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...