firedns.h: always make ipv6 members available in state struct
[rofl0r-firedns.git] / README
blobaa1f9892d9387cfd80713c5d75c620c747d3aa78
1 FireDNS Library
2 ---------------
3 (c) 2002 Ian Gulliver, (C) 2011, 2013 rofl0r
5 GNU Public License, Version 2 or 3 at the users choice.
7 with written permission of 2013-12-17 by Ian Gulliver:
9 "I hereby grant a public, irrevocable license to use any and all versions of
10  the firedns library under the terms of the GNU Public License version 2 or
11  version 3, at the option of the user."
13 See GPL for more details.
15 the code written by rofl0r is dual-licensed under LGPL 2.1+,
16 and GPL2+.
18 libfiredns is a library for handling asynchronous DNS
19 requests.  It provides a very simple interface for sending
20 requests and parsing reponses, as well as low-timeout
21 blocking functions.  libfiredns functions have much lower
22 timeouts than the stock functions and tend to be faster
23 because they send requests to all configured system
24 nameservers at the same time.
26 this version here differs from the original in several ways:
27 1) doesn't depend on firestring and firemake
28 2) no global state
29 3) factored and optimized for small static linkage
30 4) can be combined with libulz for even smaller static linkage (optional)
31 5) no dynamic allocation to avoid linking in malloc implementations
32    (the code in firedns_add_servers_from_resolv_conf(), unless USE_LIBULZ
33     is defined, uses FILE* based stdio functions though which cannot be
34     implemented without malloc().
35     if you want to avoid the dependency, you can add your own servers
36     instead of parsing resolv.conf, for example 8.8.8.8)
37 6) allows to define the used nameservers manually instead of relying on
38    an existing resolv.conf.
40 when to use it ?
41 - if you feel your libc's DNS implementation is too slow for you,
42 - if you feel your libc's DNS implementation pulls in too much code 
43   into static binaries,
44 - if you need additional functionality such as MX records,
45 ...
47 compilation:
48 there are 2 ways to build firedns,
49 - using GNU make
50   just type "make" to compile and "make prefix=/usr/local DESTDIR=test install"
51   to install.
52   if you want to add custom CFLAGS, put them into a file called config.mak
53   for example:
54   CFLAGS += -DUSE_LIBULZ
55   LDFLAGS = -static -lulz
57 #  WARNING: currently some stuff of the library (including in the headers) is
58 #  only compiled in when -DHAVE_IPV6 is in CFLAGS!
59 #  programs linked against firedns require to use the same setting.
60 #  if HAVE_IPV6 is used in the one, but not the other, it will crash
61 #  (see issue #1).
62 #  the library was heavily optimized for minimal linkage (in the order of 1-2KB
63 #  added for a program using it), and is designed to be used as source via RcB2.
65 - using RcB2 ( https://github.com/rofl0r/rcb2 )
66   the code has the necessary RcB2 tags so RcB2 finds all required TUs
67   automatically when pointing it at the main.c file.
70 contact:
71 Quote from original author:
72 If you have questions or comments, you can reach me at
73 ian@penguinhosting.net.
75 whether that email address still works, is another question.
76 for this project, use the github issue tracker for communication.