preliminary first fork-safe version

instead of allocating memory in the child, we now use the allocator
thread to do all the necessary allocations himself.
additionally we provide a clean API to query the ip <-> dns mapping.
these functions connect via a pipe to the allocator thread, and
exchange messages.

further cleanup is needed, but it seems to work so far.
thread-safety is not yet guaranteed.

closes #1
This commit is contained in:
rofl0r
2012-11-07 20:11:14 +01:00
parent 25afe98b20
commit d0abc93c74
10 changed files with 311 additions and 242 deletions

5
src/ip_type.c Normal file
View File

@ -0,0 +1,5 @@
#include "ip_type.h"
const ip_type ip_type_invalid = { .as_int = -1 };
const ip_type ip_type_localhost = { {127, 0, 0, 1} };