Lines Matching refs:ent
914 struct servent *ent = getservbyname(servname, protocol); in evutil_parse_servname() local
915 if (ent) { in evutil_parse_servname()
916 return ntohs(ent->s_port); in evutil_parse_servname()
942 struct protoent *ent = getprotobynumber(proto); in evutil_unparse_protoname() local
943 if (ent) in evutil_unparse_protoname()
944 return ent->p_name; in evutil_unparse_protoname()
1173 addrinfo_from_hostent(const struct hostent *ent, in addrinfo_from_hostent() argument
1184 if (ent->h_addrtype == PF_INET) { in addrinfo_from_hostent()
1191 if (ent->h_length != sizeof(sin.sin_addr)) { in addrinfo_from_hostent()
1195 } else if (ent->h_addrtype == PF_INET6) { in addrinfo_from_hostent()
1202 if (ent->h_length != sizeof(sin6.sin6_addr)) { in addrinfo_from_hostent()
1209 for (i = 0; ent->h_addr_list[i]; ++i) { in addrinfo_from_hostent()
1210 memcpy(addrp, ent->h_addr_list[i], ent->h_length); in addrinfo_from_hostent()
1219 if (res && ((hints->ai_flags & EVUTIL_AI_CANONNAME) && ent->h_name)) { in addrinfo_from_hostent()
1220 res->ai_canonname = mm_strdup(ent->h_name); in addrinfo_from_hostent()
1480 struct hostent *ent = NULL; in evutil_getaddrinfo()
1506 r = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), &ent, in evutil_getaddrinfo()
1511 ent = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), in evutil_getaddrinfo()
1518 ent = err ? NULL : &hostent; in evutil_getaddrinfo()
1522 ent = gethostbyname(nodename); in evutil_getaddrinfo()
1531 if (!ent) { in evutil_getaddrinfo()
1549 if (ent->h_addrtype != hints.ai_family && in evutil_getaddrinfo()
1558 if (ent->h_length == 0) in evutil_getaddrinfo()
1563 if (ent->h_addrtype != PF_INET && ent->h_addrtype != PF_INET6) in evutil_getaddrinfo()
1566 *res = addrinfo_from_hostent(ent, port, &hints); in evutil_getaddrinfo()