Coder Social home page Coder Social logo

libudns's People

Contributors

madeye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

libudns's Issues

Compile error

root@Eta:~/libudns# ./configure --disable-assert
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for what kind of host... Linux
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for ssize_t... yes
checking whether to enable assertions... no
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... (cached) yes
checking for uint16_t... yes
checking for uint8_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking return type of signal handlers... void
checking for memset... yes
checking for select... yes
checking for setresuid... yes
checking for setreuid... yes
checking for strerror... yes
checking for getpwnam_r... yes
checking for setrlimit... yes
checking for malloc... yes
checking for memset... (cached) yes
checking for socket... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
root@Eta:~/libudns# make
make  all-am
make[1]: Entering directory '/root/libudns'
  CC       udns_dn.lo
  CC       udns_dntosp.lo
  CC       udns_parse.lo
  CC       udns_resolver.lo
  CC       udns_init.lo
  CC       udns_misc.lo
  CC       udns_XtoX.lo
udns_XtoX.c:47:58: fatal error: winsock2.h: No such file or directory
 #include <winsock2.h>          /* includes <windows.h> */
                                                          ^
compilation terminated.
Makefile:484: recipe for target 'udns_XtoX.lo' failed
make[1]: *** [udns_XtoX.lo] Error 1
make[1]: Leaving directory '/root/libudns'
Makefile:352: recipe for target 'all' failed
make: *** [all] Error 2
root@Eta:~/libudns#

how to use it

why udns has dns_ctx with no definition in header file

there noway I could provide dns_ctx definition, I already linked udns dynamic library

udns.h

// that's it, no more definition
struct dns_ctx;

main.c

#include <udns.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>

int main() {
    struct in_addr add;
    char* a [520];

    struct dns_ctx dc;

    dns_submit_a4(&dc, "google.com", 0, 0, a);
    printf("%u", add.s_addr);
}
➜  tests clang -ludns main.c 
main.c:11:20: error: variable has incomplete type 'struct dns_ctx'
    struct dns_ctx dc;
                   ^
/usr/include/udns.h:64:8: note: forward declaration of 'struct dns_ctx'
struct dns_ctx;
       ^
1 error generated.

here is the lib files

➜  tests sudo pacman -Ql udns
udns /usr/
udns /usr/bin/
udns /usr/bin/dnsget
udns /usr/bin/ex-rdns
udns /usr/bin/rblcheck
udns /usr/include/
udns /usr/include/udns.h
udns /usr/lib/
udns /usr/lib/libudns.so
udns /usr/lib/libudns.so.0
udns /usr/share/
udns /usr/share/man/
udns /usr/share/man/man1/
udns /usr/share/man/man1/dnsget.1.gz
udns /usr/share/man/man1/rblcheck.1.gz
udns /usr/share/man/man3/
udns /usr/share/man/man3/udns.3.gz

tried &dns_defctx

int main() {
    struct in_addr add;
    char* a [520];

    struct dns_ctx* dc = dns_new(&dns_defctx);
    dns_init(dc, 1);

    struct dns_rr_a4* result = dns_resolve_a4(dc, "google.com", 0);

    printf("%s", result->dnsa4_cname);
}
a.out: udns_resolver.c:457: dns_new: Assertion `CTXINITED(copy)' failed.
[1]    28554 abort (core dumped)  ./a.out

is there any examples code to read, the document don't have, it makes me so confuse. and the document don't have information about Assertion `CTXINITED(copy), how could I resolve this error

How do I use this with shadowsocksrust?

I am successfully routing most of the traffic including dns requests using basic shadowsocks config.

However having issues with SRV domains.

Do you know how this lib can be set up to be used with shadowsocks? Rust or go?

Complie with mingw32 error

./autogen.sh
./configure --prefix="$HOME/prebuilt" --exec-prefix="$HOME/prebuilt" --host=i686-w64-mingw32

Reporting Warning and can't compile with shadowsocks-libev
CC udns_dn.lo
CC udns_dntosp.lo
CC udns_parse.lo
CC udns_resolver.lo
CC udns_init.lo
CC udns_misc.lo
CC udns_XtoX.lo
CC udns_rr_a.lo
CC udns_rr_ptr.lo
CC udns_rr_mx.lo
CC udns_rr_txt.lo
CC udns_bl.lo
CC udns_rr_srv.lo
CC udns_rr_naptr.lo
CC udns_codes.lo
CC udns_jran.lo
CCLD libudns.la
libtool: warning: undefined symbols not allowed in i686-w64-mingw32 shared libraries; building static only
i686-w64-mingw32-ar: u' modifier ignored since D' is the default (see `U')

Makefile for openwrt (LEDE) SDK please, building error: Couldn't find libudns

Hi,
I 'd like to compile the latest shadowsocks-libev( 2.6.3) on LEDE SDK.
libev and libsodium are available on LDED sdk, but not libudns.

Please help on this, how can I port libudns to lede (openwrt) ?

Thanks
HQ

checking for malloc... yes
checking for memset... (cached) yes
checking for socket... yes
checking udns.h usability... no
checking udns.h presence... no
checking for udns.h... no
configure: error: Couldn't find libudns. Try installing libudns-dev or udns-devel.
Makefile:85: recipe for target '/home/hqo/source/build_dir/target-mips_24kc_musl-1.1.16/shadowsocks-libev/openssl/shadowsocks-libev-2017-01-25/.configured_yyyyyyy' failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.