• Home
  • Raw
  • Download

Lines Matching refs:servname

261 int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints,  in getaddrinfo_numeric()  argument
273 return android_getaddrinfofornetcontext(hostname, servname, &hints, &netcontext, result, in getaddrinfo_numeric()
322 int android_getaddrinfofornetcontext(const char* hostname, const char* servname, in android_getaddrinfofornetcontext() argument
337 if (hostname == nullptr && servname == nullptr) { in android_getaddrinfofornetcontext()
353 error = get_portmatch(&tmp, servname); in android_getaddrinfofornetcontext()
374 error = explore_null(&tmp, servname, &cur->ai_next); in android_getaddrinfofornetcontext()
376 error = explore_numeric_scope(&tmp, hostname, servname, &cur->ai_next); in android_getaddrinfofornetcontext()
397 return resolv_getaddrinfo(hostname, servname, hints, netcontext, res, event); in android_getaddrinfofornetcontext()
409 int resolv_getaddrinfo(const char* _Nonnull hostname, const char* servname, const addrinfo* hints, in resolv_getaddrinfo() argument
412 if (hostname == nullptr && servname == nullptr) return EAI_NONAME; in resolv_getaddrinfo()
446 error = explore_fqdn(&tmp, hostname, servname, &cur->ai_next, netcontext, event); in resolv_getaddrinfo()
461 static int explore_fqdn(const addrinfo* pai, const char* hostname, const char* servname, in explore_fqdn() argument
473 if ((error = get_portmatch(pai, servname))) return error; in explore_fqdn()
485 if ((error = get_port(cur, servname, 0))) { in explore_fqdn()
499 static int explore_null(const struct addrinfo* pai, const char* servname, struct addrinfo** res) { in explore_null() argument
529 if (get_portmatch(pai, servname) != 0) return 0; in explore_null()
536 GET_PORT(cur->ai_next, servname); in explore_null()
539 GET_PORT(cur->ai_next, servname); in explore_null()
554 static int explore_numeric(const struct addrinfo* pai, const char* hostname, const char* servname, in explore_numeric() argument
574 if (get_portmatch(pai, servname) != 0) return 0; in explore_numeric()
582 GET_PORT(cur->ai_next, servname); in explore_numeric()
612 const char* servname, struct addrinfo** res) { in explore_numeric_scope() argument
629 if (get_portmatch(pai, servname) != 0) return 0; in explore_numeric_scope()
634 if (!afd->a_scoped) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
637 if (cp == NULL) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
649 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()
704 static int get_portmatch(const struct addrinfo* ai, const char* servname) { in get_portmatch() argument
708 return get_port(ai, servname, 1); in get_portmatch()
711 static int get_port(const struct addrinfo* ai, const char* servname, int matchonly) { in get_port() argument
720 if (servname == NULL) return 0; in get_port()
741 port = str2number(servname); in get_port()
761 if ((sp = getservbyname(servname, proto)) == NULL) return EAI_SERVICE; in get_port()