|
3 weeks ago | |
---|---|---|
src | 2 years ago | |
tests_cmp | 2 years ago | |
tests_mock | 2 years ago | |
Makefile | 3 weeks ago | |
README.md | 3 weeks ago | |
hostbyname.s | 2 years ago |
Small x86_64 linux assembly library for ultra basic DNS resolution.
Supports AAAA (ipv6) and A (ipv4) requests and export some utility function, handy when working with string representation of IP addresses and struct sockaddr.
The library is shipped with a hostbyname
demo program.
Run make lib
and the static library src/libsockaddrbyname.a
should be available.
Run make
Run make -j4 tests
(adapt the -j4
flag to your machine).
./hostbyname gnu.org 1.1.1.1
Exported functions can be found in src/*.s
files header. The main function
are found in src/getsockaddrbyname.s
.
With libsockaddrbyname.a
in a /PATH/TO/
directory.
ld -s -melf_x86_64 -o foo.bin main.o files.o /PATH/TO/libsockaddrbyname.a
or
ld -s -melf_x86_64 -L /PATH/TO/ -o foo.bin main.o files.o -lsockaddrbyname