Questions tagged [c-ares]

c-ares is a C library for asynchronous DNS requests (including name resolves)

See also the c-ares home page: https://c-ares.org/

32 questions
1
vote
0 answers

using multiple c-ares channels in a select() loop

I'm new to the c-ares library and I want to extend the example below such that I can simultaneously wait for multiple queries to complete. Here is a working example: void processChannelBlocking(Channel &c) { int nfds, count; fd_set readers,…
Chris H
  • 6,433
  • 5
  • 33
  • 51
1
vote
1 answer

Building ares library for Win CE

I am trying to build c-ares library for Win CE as a part of porting node js to windows CE. I have run into some blockers in the process. While compiling ares_platform.c file I get the error: Error 158 error C2065: 'OSVERSIONINFOEX' : undeclared…
Shaik Syed Ali
  • 3,359
  • 3
  • 17
  • 22
0
votes
1 answer

When does c-ares use multiple sockets in parallel in a single channel?

I'm trying to reproduce a crash happening on a user's machine. My code assumed that there could only be a single socket fd used by c-ares, but apparently that is not always true. I'm working on a fix, but for that I'd like to be able to reproduce…
chakaz
  • 261
  • 2
  • 13
0
votes
0 answers

Can't pip install pycares

I need help installing pycares on my Android device. I am getting error codes when I try to use pip to install it Specs: termux pixel 6 pro rooted pycares failing to install with lots of errors, here is the output requesting assistance thank…
frost
  • 1
0
votes
0 answers

Problem in cmake when using gRPC and Drogon together

I use cmake for my drogon app as that is default for that. It all worked fine but when I added gRPC, the problem started. As both use c-ares. First when I added gRPC. This showed up.. CMake Error at CMakeLists.txt:21 (add_executable): Target…
MohammadArik
  • 71
  • 1
  • 9
0
votes
0 answers

c-ares multi channel/ thread reverse lookup

I am facing race conditions when using c-ares to perform reverse DNS lookups in multiple threads. Code can be found below. static void callback(void * arg, int status, int, struct hostent * host) { auto * ptr_records =…
0
votes
1 answer

How to try all servers in dns using libcurl?

I need to regularly and randomly test with Linux/C++/libcurl the responses of several servers that are available through a single DNS name, such as $ host example.com n1.example.com 1.2.3.4 n2.example.com 1.2.3.5 n3.example.com 1.2.3.6 The list…
0
votes
0 answers

Building gRPC from source using CMake in WSL (Ubuntu 18.04) yields missing `winsock2.h`

I am following this guide to install gRPC using CMake. First, it is actually not usable from a CMake project without tweaking the CMake command according to this other post. So I did, the configuration part works. When I run make though, it fails…
Julien Debache
  • 319
  • 5
  • 13
0
votes
1 answer

Can't build project with gRPC on Linux x64 Release configuration

I have a project that use gRPC. It successful build on any configuration on Windows(Debug\Release) and on Debug configuration on Linux. But in Release mode I have next error: ld: cannot find -lnsl In CMake output(link.txt): #debug build ... …
hdnn
  • 1,807
  • 3
  • 13
  • 20
0
votes
1 answer

aiodns can't contact DNS servers error when running in OS X terminal

Following code snippet fetches multiple public DNS servers asynchronously. If script is executed in PyCharm it works perfectly and resolves all given resolvers with very few errors (~14 errors in 1078 requests). However if I run exactly same script…
Petr Javorik
  • 1,695
  • 19
  • 25
0
votes
1 answer

bitbake grpc cross compile/configure failing with error c-ares::cares references the file /usr/lib/libcares.so.2.2.0

I am having issues with finding c-ares dependencies when building grpc in open-embedded.Error in the log when looking for the dependency c-ares during configure is shown in the log as - -- Found ZLIB:…
CyA
  • 41
  • 6
0
votes
1 answer

build libcurl with c-ares

I want to build libcurl with c-ares,but come across a problem. ./configure --enable-ares and get output: checking for perl... /home/liuwenyi/.jumbo/bin/perl checking for gnroff... /usr/bin/gnroff checking how to use *nroff to get plain text from man…
wenyi liu
  • 71
  • 6
0
votes
1 answer

Is it possible to query different DNS nameservers programmatically in C++, ignoring system settings?

For my task, I need to block some hostnames, but since some websites may reply with different IP addresses to different DNS queries (for example, Google DNS and any other DNS server), I'd like to resolve same hostname using different DNS servers to…
Groosha
  • 2,897
  • 2
  • 22
  • 38
0
votes
1 answer

Installing gRPC : ld: warning: directory not found for option '-L//grpc/libs/opt/c-ares'

OS -> OSX El Captain Version 10.11.6 Tried to install gRPC using the below commands: git clone-b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc cd grpc git submodule update --init make I got the below error: [HOSTCXX]…
Akshay
  • 1
  • 4
0
votes
2 answers

C-Ares callback doesnt receive arg from query

I'm using the c-ares library to perform dns lookups on a set of domains stored in a file. Something like this. char *line = NULL; while ((read = getline(&line, &len, fp)) != -1) { if (line && line[strlen(line)-1]=='\n')…
user5570448