1 #include <sys/socket.h>
2 #include <netinet/in.h>
8 static GMainLoop *loop = NULL;
10 static gboolean timeout(gpointer data) {
11 g_main_loop_quit(loop);
15 int main(int argc, char *argv[]) {
20 flx = flx_server_new(NULL);
22 flx_server_add_text(flx, 0, 0, AF_UNSPEC, NULL, "hallo");
24 q.name = "campari.local.";
25 q.class = FLX_DNS_CLASS_IN;
26 q.type = FLX_DNS_TYPE_A;
27 flx_server_post_query_job(flx, 0, AF_UNSPEC, NULL, &q);
29 g_timeout_add(5000, timeout, NULL);
31 loop = g_main_loop_new(NULL, FALSE);
32 g_main_loop_run(loop);
33 g_main_loop_unref(loop);
35 flx_server_dump(flx, stdout);