X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=main.c;h=da4b338faa3edba752ff6630cd718c4010cca019;hb=c77f4231ed850b90b9b6f337727e19b63418426f;hp=9bba48cfbf5601b8d53d68cf57d794d0fd6f6b94;hpb=33ccd714ea9469b5b7d3b36bbe468ba1b0f31dfc;p=catta diff --git a/main.c b/main.c index 9bba48c..da4b338 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ static GMainLoop *loop = NULL; -static gboolean timeout (gpointer data) { +static gboolean timeout(gpointer data) { g_main_loop_quit(loop); return FALSE; } @@ -14,14 +14,18 @@ static gboolean timeout (gpointer data) { int main(int argc, char *argv[]) { flxServer *flx; flxLocalAddrSource *l; - guint32 ip; + flxAddress a; + gchar *r; flx = flx_server_new(NULL); l = flx_local_addr_source_new(flx); - -/* ip = inet_addr("127.0.0.1"); */ -/* flx_server_add(flx, flx_server_get_next_id(flx), "foo.local", FLX_DNS_TYPE_A, &ip, sizeof(ip)); */ + + flx_address_parse("127.0.0.1", AF_INET, &a); + flx_server_add_address(flx, 0, 0, "localhost", &a); + + flx_address_parse("::1", AF_INET6, &a); + flx_server_add_address(flx, 0, 0, "ip6-localhost", &a); g_timeout_add(1000, timeout, NULL);