[zeromq-dev] AI_NUMERICSERV reason

Martin Lucina mato at kotelna.sk
Thu Jul 22 14:23:07 CEST 2010


sustrik at 250bpm.com said:
> hamster wrote:
> > Hello!
> > 
> > Could someone elaborate on using AI_NUMERICSERV option for getaddrinfo() in
> > ip.cpp? There is a comment saying "Avoid named services due to unclear socktype"
> > but it does not clear things...
> 
> Blame on the particular line points to Martin Lucina. He may be able to 
> elaborate on the point.

The comment is a bit misleading. I didn't write the original code, but the
idea is that requesting a named service, e.g. "telnet" can return either a
TCP or UDP socket based on the service definition. Plus, it will also
invoke NSS/NIS to resolve the service name to a numeric port + socket type.

In our case the point is kind of moot since 0MQ explicitly uses only
numeric port numbers so we don't want to allow named services anyway.

-mato



More information about the zeromq-dev mailing list