GithubHelp home page GithubHelp logo

5l1v3r1 / firedns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rofl0r/firedns

0.0 1.0 0.0 198 KB

relatively sane looking dns library. forked and splitted source into one C file per function for smaller linkage.

C 98.82% Makefile 1.18%

firedns's Introduction

FireDNS Library
---------------
(c) 2002 Ian Gulliver, (C) 2011, 2013 rofl0r

GNU Public License, Version 2 or 3 at the users choice.

with written permission of 2013-12-17 by Ian Gulliver:

"I hereby grant a public, irrevocable license to use any and all versions of
 the firedns library under the terms of the GNU Public License version 2 or
 version 3, at the option of the user."

See GPL for more details.

the code written by rofl0r is dual-licensed under LGPL 2.1+,
and GPL2+.

libfiredns is a library for handling asynchronous DNS
requests.  It provides a very simple interface for sending
requests and parsing reponses, as well as low-timeout
blocking functions.  libfiredns functions have much lower
timeouts than the stock functions and tend to be faster
because they send requests to all configured system
nameservers at the same time.

this version here differs from the original in several ways:
1) doesn't depend on firestring and firemake
2) no global state
3) factored and optimized for small static linkage
4) can be combined with libulz for even smaller static linkage (optional)
5) no dynamic allocation to avoid linking in malloc implementations
   (the code in firedns_add_servers_from_resolv_conf(), unless USE_LIBULZ
    is defined, uses FILE* based stdio functions though which cannot be
    implemented without malloc().
    if you want to avoid the dependency, you can add your own servers
    instead of parsing resolv.conf, for example 8.8.8.8)
6) allows to define the used nameservers manually instead of relying on
   an existing resolv.conf.

when to use it ?
- if you feel your libc's DNS implementation is too slow for you,
- if you feel your libc's DNS implementation pulls in too much code 
  into static binaries,
- if you need additional functionality such as MX records,
...

compilation:
there are 2 ways to build firedns,
- using GNU make
  just type "make" to compile and "make prefix=/usr/local DESTDIR=test install"
  to install.
  if you want to add custom CFLAGS, put them into a file called config.mak
  for example:
  CFLAGS += -DUSE_LIBULZ
  LDFLAGS = -static -lulz

#  WARNING: currently some stuff of the library (including in the headers) is
#  only compiled in when -DHAVE_IPV6 is in CFLAGS!
#  programs linked against firedns require to use the same setting.
#  if HAVE_IPV6 is used in the one, but not the other, it will crash
#  (see issue #1).
#  the library was heavily optimized for minimal linkage (in the order of 1-2KB
#  added for a program using it), and is designed to be used as source via RcB2.

- using RcB2 ( https://github.com/rofl0r/rcb2 )
  the code has the necessary RcB2 tags so RcB2 finds all required TUs
  automatically when pointing it at the main.c file.


contact:
Quote from original author:
If you have questions or comments, you can reach me at
[email protected].

whether that email address still works, is another question.
for this project, use the github issue tracker for communication.

firedns's People

Contributors

rofl0r avatar

Watchers

 avatar

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.