Lines Matching refs:ent
730 struct servent *ent = getservbyname(servname, protocol);
731 if (ent) {
732 return ntohs(ent->s_port);
758 struct protoent *ent = getprotobynumber(proto);
759 if (ent)
760 return ent->p_name;
986 addrinfo_from_hostent(const struct hostent *ent,
997 if (ent->h_addrtype == PF_INET) {
1004 if (ent->h_length != sizeof(sin.sin_addr)) {
1008 } else if (ent->h_addrtype == PF_INET6) {
1015 if (ent->h_length != sizeof(sin6.sin6_addr)) {
1022 for (i = 0; ent->h_addr_list[i]; ++i) {
1023 memcpy(addrp, ent->h_addr_list[i], ent->h_length);
1032 if (res && ((hints->ai_flags & EVUTIL_AI_CANONNAME) && ent->h_name)) {
1033 res->ai_canonname = mm_strdup(ent->h_name);
1282 struct hostent *ent = NULL;
1308 r = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), &ent,
1313 ent = gethostbyname_r(nodename, &hostent, buf, sizeof(buf),
1320 ent = err ? NULL : &hostent;
1324 ent = gethostbyname(nodename);
1332 /* Now we have either ent or err set. */
1333 if (!ent) {
1351 if (ent->h_addrtype != hints.ai_family &&
1360 if (ent->h_length == 0)
1365 if (ent->h_addrtype != PF_INET && ent->h_addrtype != PF_INET6)
1368 *res = addrinfo_from_hostent(ent, port, &hints);