+ case XML_TAG_PROTOCOL: {
+ int protocol;
+ assert(u->service);
+
+ if (u->buf && strcasecmp (u->buf, "ipv4") == 0) {
+ protocol = AVAHI_PROTO_INET;
+ } else if (u->buf && strcasecmp (u->buf, "ipv6") == 0) {
+ protocol = AVAHI_PROTO_INET6;
+ } else if (u->buf && strcasecmp (u->buf, "any") == 0) {
+ protocol = AVAHI_PROTO_UNSPEC;
+ } else {
+ avahi_log_error("%s: parse failure: invalid protocol specification \"%s\".", u->group->filename, u->buf);
+ u->failed = 1;
+ return;
+ }
+
+ u->service->protocol = protocol;
+ u->current_tag = XML_TAG_SERVICE;
+ break;
+ }
+