From 5a12f4f892685adcbbeecbdc406a297152d0dad1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 5 Dec 2004 17:36:46 +0000 Subject: rename some stuff git-svn-id: file:///home/lennart/svn/public/nss-mdns/trunk@53 0ee8848e-81ea-0310-a63a-f631d1a40d77 --- src/main.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/main.c (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c deleted file mode 100644 index 5681204..0000000 --- a/src/main.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -#include "query.h" - -static void ipv4_func(const ipv4_address_t *ipv4, void *userdata) { - fprintf(stderr, "IPV4: %s\n", inet_ntoa(*(struct in_addr*) &ipv4->address)); -} - -static void ipv6_func(const ipv6_address_t *ipv6, void *userdata) { -} - -static void name_func(const char *name, void *userdata) { - fprintf(stderr, "NAME: %s\n", name); -} - -int main(int argc, char *argv[]) { - int ret = 1, fd = -1; - ipv4_address_t ipv4; - - if ((fd = mdns_open_socket()) < 0) - goto finish; - -/* if (mdns_query_name(fd, argc > 1 ? argv[1] : "ecstasy.local", &ipv4_func, &ipv6_func, NULL) < 0) */ -/* goto finish; */ - - ipv4.address = inet_addr(argc > 1 ? argv[1] : "192.168.100.1"); - - if (mdns_query_ipv4(fd, &ipv4, name_func, NULL) < 0) - goto finish; - - ret = 0; - -finish: - - if (fd >= 0) - close(fd); - - return ret; -} -- cgit