Lines Matching refs:servname
860 parse_numeric_servname(const char *servname)
864 n = (int) strtol(servname, &endptr, 10);
865 if (n>=0 && n <= 65535 && servname[0] && endptr && !endptr[0])
871 /** Parse a service name in 'servname', which can be a decimal port.
875 evutil_parse_servname(const char *servname, const char *protocol,
878 int n = parse_numeric_servname(servname);
883 struct servent *ent = getservbyname(servname, protocol);
951 * - Look up the port based on 'servname', and store it in *portnum,
962 evutil_getaddrinfo_common_(const char *nodename, const char *servname,
968 if (nodename == NULL && servname == NULL)
980 if (servname) {
983 port = evutil_parse_servname(servname, pname, hints);
1227 - If nodename==NULL and servname is numeric, we build an answer
1230 - If nodename!=NULL and servname is numeric, then we set
1231 servname=NULL when calling getaddrinfo, and post-process the
1352 evutil_getaddrinfo(const char *nodename, const char *servname,
1377 if (servname && parse_numeric_servname(servname)<0)
1396 err = evutil_getaddrinfo_common_(nodename,servname,&hints,
1408 need_np_hack = need_numeric_port_hack() && servname && !hints.ai_socktype
1409 && ((portnum=parse_numeric_servname(servname)) >= 0);
1413 NULL,servname,&hints, res, &portnum);
1414 servname = NULL;
1433 err = getaddrinfo(nodename, servname, &hints, res);
1459 err = evutil_getaddrinfo_common_(nodename, servname, &hints, res, &port);
1582 const char *nodename, const char *servname,
1588 dns_base, nodename, servname, hints_in, cb, arg);
1592 err = evutil_getaddrinfo(nodename, servname, hints_in, &ai);
1632 return "nodename nor servname provided, or not known";
1634 return "servname not supported for ai_socktype";