Lines Matching refs:data
110 memset(&r->data, 0, sizeof(r->data));
155 avahi_free(r->data.srv.name);
161 avahi_free(r->data.ptr.name);
165 avahi_free(r->data.hinfo.cpu);
166 avahi_free(r->data.hinfo.os);
170 avahi_string_list_free(r->data.txt.string_list);
178 avahi_free(r->data.generic.data);
258 inet_ntop(AF_INET, &r->data.a.address.address, t = buf, sizeof(buf));
262 inet_ntop(AF_INET6, &r->data.aaaa.address.address, t = buf, sizeof(buf));
269 t = r->data.ptr.name;
273 t = d = avahi_string_list_to_string(r->data.txt.string_list);
278 snprintf(t = buf, sizeof(buf), "\"%s\" \"%s\"", r->data.hinfo.cpu, r->data.hinfo.os);
284 r->data.srv.priority,
285 r->data.srv.weight,
286 r->data.srv.port,
287 r->data.srv.name);
300 snprintf(t = buf, sizeof(buf), "\\# %u", r->data.generic.size);
304 for (c = r->data.generic.data, n = r->data.generic.size, i = 0;
375 a->data.srv.priority == b->data.srv.priority &&
376 a->data.srv.weight == b->data.srv.weight &&
377 a->data.srv.port == b->data.srv.port &&
378 avahi_domain_equal(a->data.srv.name, b->data.srv.name);
383 return avahi_domain_equal(a->data.ptr.name, b->data.ptr.name);
387 !strcmp(a->data.hinfo.cpu, b->data.hinfo.cpu) &&
388 !strcmp(a->data.hinfo.os, b->data.hinfo.os);
391 return avahi_string_list_equal(a->data.txt.string_list, b->data.txt.string_list);
394 return memcmp(&a->data.a.address, &b->data.a.address, sizeof(AvahiIPv4Address)) == 0;
397 return memcmp(&a->data.aaaa.address, &b->data.aaaa.address, sizeof(AvahiIPv6Address)) == 0;
400 return a->data.generic.size == b->data.generic.size &&
401 (a->data.generic.size == 0 || memcmp(a->data.generic.data, b->data.generic.data, a->data.generic.size) == 0);
435 if (!(copy->data.ptr.name = avahi_strdup(r->data.ptr.name)))
440 copy->data.srv.priority = r->data.srv.priority;
441 copy->data.srv.weight = r->data.srv.weight;
442 copy->data.srv.port = r->data.srv.port;
443 if (!(copy->data.srv.name = avahi_strdup(r->data.srv.name)))
448 if (!(copy->data.hinfo.os = avahi_strdup(r->data.hinfo.os)))
451 if (!(copy->data.hinfo.cpu = avahi_strdup(r->data.hinfo.cpu))) {
452 avahi_free(r->data.hinfo.os);
458 copy->data.txt.string_list = avahi_string_list_copy(r->data.txt.string_list);
462 copy->data.a.address = r->data.a.address;
466 copy->data.aaaa.address = r->data.aaaa.address;
470 if (!(copy->data.generic.data = avahi_memdup(r->data.generic.data, r->data.generic.size)))
472 copy->data.generic.size = r->data.generic.size;
505 n += strlen(r->data.ptr.name) + 1;
509 n += 6 + strlen(r->data.srv.name) + 1;
513 n += strlen(r->data.hinfo.os) + 1 + strlen(r->data.hinfo.cpu) + 1;
517 n += avahi_string_list_serialize(r->data.txt.string_list, NULL, 0);
529 n += r->data.generic.size;
581 return avahi_binary_domain_cmp(a->data.ptr.name, b->data.ptr.name);
584 if ((r = uint16_cmp(a->data.srv.priority, b->data.srv.priority)) == 0 &&
585 (r = uint16_cmp(a->data.srv.weight, b->data.srv.weight)) == 0 &&
586 (r = uint16_cmp(a->data.srv.port, b->data.srv.port)) == 0)
587 r = avahi_binary_domain_cmp(a->data.srv.name, b->data.srv.name);
594 if ((r = strcmp(a->data.hinfo.cpu, b->data.hinfo.cpu)) ||
595 (r = strcmp(a->data.hinfo.os, b->data.hinfo.os)))
607 asize = avahi_string_list_serialize(a->data.txt.string_list, NULL, 0);
608 bsize = avahi_string_list_serialize(b->data.txt.string_list, NULL, 0);
618 avahi_string_list_serialize(a->data.txt.string_list, ma, asize);
619 avahi_string_list_serialize(b->data.txt.string_list, mb, bsize);
637 return memcmp(&a->data.a.address, &b->data.a.address, sizeof(AvahiIPv4Address));
640 return memcmp(&a->data.aaaa.address, &b->data.aaaa.address, sizeof(AvahiIPv6Address));
643 return lexicographical_memcmp(a->data.generic.data, a->data.generic.size,
644 b->data.generic.data, b->data.generic.size);
679 return avahi_is_valid_domain_name(r->data.ptr.name);
682 return avahi_is_valid_domain_name(r->data.srv.name);
686 strlen(r->data.hinfo.os) <= 255 &&
687 strlen(r->data.hinfo.cpu) <= 255;
693 for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next)