Super Light DNS Resolver http://cesanta.com
SLDR is a tiny asynchronous DNS resolver written in C. It is capable of doing A, AAAA and MX requests. SLDR is supposed to be used on embedded systems and in applications that performs large amount of DNS requests. SLDR keeps query cache, therefore subsequent calls to resolve the same host hit the cache, saving time and traffic.
Using SLDR as a command line tool
SLDR could be built as a command line tool:
cc -o sldr sldr.c -DSLDR_CLI # On Unix(第一次看到cc命令也可生成可执行文件。gcc是可以做到的。)
cl sldr.c /DSLDR_CLI # On Windows
Then, one can send queries like:
$ ./sldr google.com
google.com: 74.125.24.113
$ ./sldr google.com aaaa
google.com: 2a00:1450:400b:0c02:0000:0000:0000:0066
$ ./sldr google.com mx
alt3.aspmx.l.google.com
from
https://github.com/CesiumComputer/sldr
No comments:
Post a Comment