under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
You should have received a copy of the GNU Lesser General Public
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
Public License for more details.
You should have received a copy of the GNU Lesser General Public
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
- printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
- printf("%i\n", avahi_domain_equal("A", "a"));
+ printf("%i\n", catta_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff"));
+ printf("%i\n", catta_domain_equal("A", "a"));
- printf("%u = %u\n", avahi_domain_hash("ccc\\065aa.aa\\.b\\\\."), avahi_domain_hash("cccAaa.aa\\.b\\\\"));
+ printf("%u = %u\n", catta_domain_hash("ccc\\065aa.aa\\.b\\\\."), catta_domain_hash("cccAaa.aa\\.b\\\\"));
- avahi_service_name_join(t, sizeof(t), "foo.foo.foo \\.", "_http._tcp", "test.local");
+ catta_service_name_join(t, sizeof(t), "foo.foo.foo \\.", "_http._tcp", "test.local");
- avahi_service_name_split(t, name, sizeof(name), type, sizeof(type), domain, sizeof(domain));
+ catta_service_name_split(t, name, sizeof(name), type, sizeof(type), domain, sizeof(domain));
printf("name: <%s>; type: <%s>; domain <%s>\n", name, type, domain);
printf("name: <%s>; type: <%s>; domain <%s>\n", name, type, domain);
- avahi_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\\. .local");
+ catta_service_name_join(t, sizeof(t), NULL, "_http._tcp", "one.two\\. .local");
- avahi_service_name_split(t, NULL, 0, type, sizeof(type), domain, sizeof(domain));
+ catta_service_name_split(t, NULL, 0, type, sizeof(type), domain, sizeof(domain));
printf("name: <>; type: <%s>; domain <%s>\n", type, domain);
p = "--:---\\\\\\123\\065_äöü\\064\\.\\\\sjöödfhh.sdfjhskjdf";
printf("name: <>; type: <%s>; domain <%s>\n", type, domain);
p = "--:---\\\\\\123\\065_äöü\\064\\.\\\\sjöödfhh.sdfjhskjdf";
- printf("unescaped: <%s>, rest: %s\n", avahi_unescape_label(&p, t, sizeof(t)), p);
+ printf("unescaped: <%s>, rest: %s\n", catta_unescape_label(&p, t, sizeof(t)), p);
- printf("escaped: <%s>\n", avahi_escape_label(t, strlen(t), &s, &size));
+ printf("escaped: <%s>\n", catta_escape_label(t, strlen(t), &s, &size));
- printf("unescaped: <%s>\n", avahi_unescape_label(&p, t, sizeof(t)));
+ printf("unescaped: <%s>\n", catta_unescape_label(&p, t, sizeof(t)));
- assert(avahi_is_valid_service_type_generic("_foo._bar._waldo"));
- assert(!avahi_is_valid_service_type_strict("_foo._bar._waldo"));
- assert(!avahi_is_valid_service_subtype("_foo._bar._waldo"));
+ assert(catta_is_valid_service_type_generic("_foo._bar._waldo"));
+ assert(!catta_is_valid_service_type_strict("_foo._bar._waldo"));
+ assert(!catta_is_valid_service_subtype("_foo._bar._waldo"));
- assert(avahi_is_valid_service_type_generic("_foo._tcp"));
- assert(avahi_is_valid_service_type_strict("_foo._tcp"));
- assert(!avahi_is_valid_service_subtype("_foo._tcp"));
+ assert(catta_is_valid_service_type_generic("_foo._tcp"));
+ assert(catta_is_valid_service_type_strict("_foo._tcp"));
+ assert(!catta_is_valid_service_subtype("_foo._tcp"));
- assert(!avahi_is_valid_service_type_generic("_foo._bar.waldo"));
- assert(!avahi_is_valid_service_type_strict("_foo._bar.waldo"));
- assert(!avahi_is_valid_service_subtype("_foo._bar.waldo"));
+ assert(!catta_is_valid_service_type_generic("_foo._bar.waldo"));
+ assert(!catta_is_valid_service_type_strict("_foo._bar.waldo"));
+ assert(!catta_is_valid_service_subtype("_foo._bar.waldo"));
- assert(!avahi_is_valid_service_type_generic(""));
- assert(!avahi_is_valid_service_type_strict(""));
- assert(!avahi_is_valid_service_subtype(""));
+ assert(!catta_is_valid_service_type_generic(""));
+ assert(!catta_is_valid_service_type_strict(""));
+ assert(!catta_is_valid_service_subtype(""));
- assert(avahi_is_valid_service_type_generic("_foo._sub._bar._tcp"));
- assert(!avahi_is_valid_service_type_strict("_foo._sub._bar._tcp"));
- assert(avahi_is_valid_service_subtype("_foo._sub._bar._tcp"));
+ assert(catta_is_valid_service_type_generic("_foo._sub._bar._tcp"));
+ assert(!catta_is_valid_service_type_strict("_foo._sub._bar._tcp"));
+ assert(catta_is_valid_service_subtype("_foo._sub._bar._tcp"));
- assert(!avahi_is_valid_host_name("sf.ooo."));
- assert(avahi_is_valid_host_name("sfooo."));
- assert(avahi_is_valid_host_name("sfooo"));
+ assert(!catta_is_valid_host_name("sf.ooo."));
+ assert(catta_is_valid_host_name("sfooo."));
+ assert(catta_is_valid_host_name("sfooo"));
- assert(avahi_normalize_name(".", t, sizeof(t)));
- assert(avahi_normalize_name("", t, sizeof(t)));
+ assert(catta_normalize_name(".", t, sizeof(t)));
+ assert(catta_normalize_name("", t, sizeof(t)));
- assert(!avahi_is_valid_fqdn("."));
- assert(!avahi_is_valid_fqdn(""));
- assert(!avahi_is_valid_fqdn("foo"));
- assert(avahi_is_valid_fqdn("foo.bar"));
- assert(avahi_is_valid_fqdn("foo.bar."));
- assert(avahi_is_valid_fqdn("gnurz.foo.bar."));
- assert(!avahi_is_valid_fqdn("192.168.50.1"));
- assert(!avahi_is_valid_fqdn("::1"));
- assert(!avahi_is_valid_fqdn(".192.168.50.1."));
+ assert(!catta_is_valid_fqdn("."));
+ assert(!catta_is_valid_fqdn(""));
+ assert(!catta_is_valid_fqdn("foo"));
+ assert(catta_is_valid_fqdn("foo.bar"));
+ assert(catta_is_valid_fqdn("foo.bar."));
+ assert(catta_is_valid_fqdn("gnurz.foo.bar."));
+ assert(!catta_is_valid_fqdn("192.168.50.1"));
+ assert(!catta_is_valid_fqdn("::1"));
+ assert(!catta_is_valid_fqdn(".192.168.50.1."));