X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=dns-test.c;h=d8c7b531360151c8e41a3c8f0c8f69755b62139b;hb=7dce450bdc23ea306a61e00f914481e29ebcb176;hp=a6cac23db48772e9d22eabd5c29ae1bdf2db1a18;hpb=4c8155fa9c85c7ece92182d0ab53f99a982a4abf;p=catta diff --git a/dns-test.c b/dns-test.c index a6cac23..d8c7b53 100644 --- a/dns-test.c +++ b/dns-test.c @@ -3,33 +3,33 @@ int main(int argc, char *argv[]) { gchar t[256], *a, *b, *c, *d; - flxDnsPacket *p; + AvahiDnsPacket *p; - p = flx_dns_packet_new(8000); + p = avahi_dns_packet_new(8000); - flx_dns_packet_append_name(p, a = "hello.hello.hello.de."); - flx_dns_packet_append_name(p, b = "this is a test.hello.de."); - flx_dns_packet_append_name(p, c = "this\\.is\\.a\\.test\\.with\\.dots.hello.de."); - flx_dns_packet_append_name(p, d = "this\\\\is another\\ \\test.hello.de."); + avahi_dns_packet_append_name(p, a = "hello.hello.hello.de."); + avahi_dns_packet_append_name(p, b = "this is a test.hello.de."); + avahi_dns_packet_append_name(p, c = "this\\.is\\.a\\.test\\.with\\.dots.hello.de."); + avahi_dns_packet_append_name(p, d = "this\\\\is another\\ \\test.hello.de."); - flx_hexdump(FLX_DNS_PACKET_DATA(p), p->size); + avahi_hexdump(AVAHI_DNS_PACKET_DATA(p), p->size); - flx_dns_packet_consume_name(p, t, sizeof(t)); + avahi_dns_packet_consume_name(p, t, sizeof(t)); g_message(">%s<", t); - g_assert(flx_domain_equal(a, t)); + g_assert(avahi_domain_equal(a, t)); - flx_dns_packet_consume_name(p, t, sizeof(t)); + avahi_dns_packet_consume_name(p, t, sizeof(t)); g_message(">%s<", t); - g_assert(flx_domain_equal(b, t)); + g_assert(avahi_domain_equal(b, t)); - flx_dns_packet_consume_name(p, t, sizeof(t)); + avahi_dns_packet_consume_name(p, t, sizeof(t)); g_message(">%s<", t); - g_assert(flx_domain_equal(c, t)); + g_assert(avahi_domain_equal(c, t)); - flx_dns_packet_consume_name(p, t, sizeof(t)); + avahi_dns_packet_consume_name(p, t, sizeof(t)); g_message(">%s<", t); - g_assert(flx_domain_equal(d, t)); + g_assert(avahi_domain_equal(d, t)); - flx_dns_packet_free(p); + avahi_dns_packet_free(p); return 0; }