Lines Matching refs:serv
123 struct server *serv; in search_servers() local
126 for (serv = daemon->servers; serv; serv=serv->next) in search_servers()
128 …if ((serv->flags & SERV_FOR_NODOTS) && *type != SERV_HAS_DOMAIN && !strchr(qdomain, '.') && namele… in search_servers()
130 unsigned short sflag = serv->addr.sa.sa_family == AF_INET ? F_IPV4 : F_IPV6; in search_servers()
132 if (serv->flags & SERV_NO_ADDR) in search_servers()
134 else if (serv->flags & SERV_LITERAL_ADDRESS) in search_servers()
139 if (serv->addr.sa.sa_family == AF_INET) in search_servers()
140 *addrpp = (struct all_addr *)&serv->addr.in.sin_addr; in search_servers()
143 *addrpp = (struct all_addr *)&serv->addr.in6.sin6_addr; in search_servers()
150 else if (serv->flags & SERV_HAS_DOMAIN) in search_servers()
152 unsigned int domainlen = strlen(serv->domain); in search_servers()
155 hostname_isequal(matchstart, serv->domain) && in search_servers()
157 (domainlen == 0 || namelen == domainlen || *(serv->domain) == '.' || *(matchstart-1) == '.' )) in search_servers()
159 unsigned short sflag = serv->addr.sa.sa_family == AF_INET ? F_IPV4 : F_IPV6; in search_servers()
161 *domain = serv->domain; in search_servers()
163 if (serv->flags & SERV_NO_ADDR) in search_servers()
165 else if (serv->flags & SERV_LITERAL_ADDRESS) in search_servers()
170 if (serv->addr.sa.sa_family == AF_INET) in search_servers()
171 *addrpp = (struct all_addr *)&serv->addr.in.sin_addr; in search_servers()
174 *addrpp = (struct all_addr *)&serv->addr.in6.sin6_addr; in search_servers()