Lines Matching defs:servname
305 "hostname or servname not provided or not known", /* EAI_NONAME */
306 "servname not supported for ai_socktype", /* EAI_SERVICE */
454 getaddrinfo(const char *hostname, const char *servname,
469 /* servname is allowed to be NULL */
487 if (hostname == NULL && servname == NULL)
532 * check for special cases. (1) numeric servname is disallowed if
533 * socktype/protocol are left unspecified. (2) servname is disallowed
550 error = get_portmatch(pai, servname, &svd);
585 error = explore_null(pai, servname, &cur->ai_next,
588 error = explore_numeric_scope(pai, hostname, servname,
646 error = explore_fqdn(pai, hostname, servname, &cur->ai_next,
1156 const char *servname, struct addrinfo **res, struct servent_data *svd)
1170 /* servname may be NULL */
1176 * if the servname does not match socktype/protocol, ignore it.
1178 if (get_portmatch(pai, servname, svd) != 0)
1182 default_dns_files, hostname, pai, servname)) {
1198 GET_PORT(cur, servname, svd);
1220 explore_null(const struct addrinfo *pai, const char *servname,
1230 /* servname may be NULL */
1249 * if the servname does not match socktype/protocol, ignore it.
1251 if (get_portmatch(pai, servname, svd) != 0)
1263 GET_PORT(cur->ai_next, servname, svd);
1269 GET_PORT(cur->ai_next, servname, svd);
1287 const char *servname, struct addrinfo **res, const char *canonname,
1298 /* servname may be NULL */
1306 * if the servname does not match socktype/protocol, ignore it.
1308 if (get_portmatch(pai, servname, svd) != 0)
1336 GET_PORT(cur->ai_next, servname, svd);
1356 GET_PORT(cur->ai_next, servname, svd);
1388 const char *servname, struct addrinfo **res, struct servent_data *svd)
1391 return explore_numeric(pai, hostname, servname, res, hostname, svd);
1402 /* servname may be NULL */
1406 * if the servname does not match socktype/protocol, ignore it.
1408 if (get_portmatch(pai, servname, svd) != 0)
1416 return explore_numeric(pai, hostname, servname, res, hostname,
1421 return explore_numeric(pai, hostname, servname, res, hostname,
1435 error = explore_numeric(pai, addr, servname, res, hostname, svd);
1517 get_portmatch(const struct addrinfo *ai, const char *servname,
1522 /* servname may be NULL */
1524 return get_port(ai, servname, 1, svd);
1528 get_port(const struct addrinfo *ai, const char *servname, int matchonly,
1537 /* servname may be NULL */
1539 if (servname == NULL)
1570 port = str2number(servname);
1594 sp = getservbyname_r(servname, proto, &sv, svd);
2093 _dns_srv_lookup(const char *name, const char *servname,
2131 serv = getservbyname_r(servname, srvprotos[i], &sv, &svd);
2227 const char *name, *servname;
2232 servname = va_arg(ap, char *);
2237 if (servname
2242 && str2number(servname) == -1) {
2247 ai = _dns_srv_lookup(name, servname, pai);