Commit graph

8 commits

Author SHA1 Message Date
Miroslav Lichvar
1b1384ccaa nameserv: set CLOEXEC flag on pipe file descriptors 2016-12-13 12:57:25 +01:00
Miroslav Lichvar
0a10545314 sched: rework file handling API
Replace SCH_*InputFileHandler() functions with more general
SCH_*FileHandler(), where events are specified as a new parameter and
which will later support other file events, e.g. file ready for ouput
and exception.

The file handlers have two new parameters: file descriptor and event.
2016-06-23 11:33:54 +02:00
Miroslav Lichvar
9b9d6ab150 privops: add support for privileged DNS_Name2IPAddress() 2016-01-13 11:25:45 +01:00
Miroslav Lichvar
c6554bfd30 nameserv: return at most 16 addresses from DNS_Name2IPAddress()
This is the same limit as in the asynchronous resolver. Use common macro
for all buffers storing IP addresses.
2016-01-13 11:25:26 +01:00
Miroslav Lichvar
4d1a754ec6 nameserv: add support for returning multiple addresses 2014-10-23 16:48:13 +02:00
Miroslav Lichvar
f955b46c13 nameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c 2014-09-22 13:14:16 +02:00
Miroslav Lichvar
5483567190 nameserv: add asynchronous resolving with POSIX threads
Run getaddrinfo()/gethostbyname() in separate thread to avoid blocking.
Only one resolving thread is running at one time, so this should work
also on systems where the functions are not thread-safe.
2014-04-29 15:19:06 +02:00
Miroslav Lichvar
ed96b4d49d nameserv: prepare for asynchronous resolving
Introduce a new function with callback to resolve names to IP addresses
asynchronously. For now, use a blocking wrapper around DNS_Name2IPAddress.
2014-04-29 12:07:38 +02:00