Lines Matching defs:ent
879 struct servent *ent = getservbyname(servname, protocol);
880 if (ent) {
881 return ntohs(ent->s_port);
907 struct protoent *ent = getprotobynumber(proto);
908 if (ent)
909 return ent->p_name;
1135 addrinfo_from_hostent(const struct hostent *ent,
1146 if (ent->h_addrtype == PF_INET) {
1153 if (ent->h_length != sizeof(sin.sin_addr)) {
1157 } else if (ent->h_addrtype == PF_INET6) {
1164 if (ent->h_length != sizeof(sin6.sin6_addr)) {
1171 for (i = 0; ent->h_addr_list[i]; ++i) {
1172 memcpy(addrp, ent->h_addr_list[i], ent->h_length);
1181 if (res && ((hints->ai_flags & EVUTIL_AI_CANONNAME) && ent->h_name)) {
1182 res->ai_canonname = mm_strdup(ent->h_name);
1431 struct hostent *ent = NULL;
1457 r = gethostbyname_r(nodename, &hostent, buf, sizeof(buf), &ent,
1462 ent = gethostbyname_r(nodename, &hostent, buf, sizeof(buf),
1469 ent = err ? NULL : &hostent;
1473 ent = gethostbyname(nodename);
1481 /* Now we have either ent or err set. */
1482 if (!ent) {
1500 if (ent->h_addrtype != hints.ai_family &&
1509 if (ent->h_length == 0)
1514 if (ent->h_addrtype != PF_INET && ent->h_addrtype != PF_INET6)
1517 *res = addrinfo_from_hostent(ent, port, &hints);