Home | History | Annotate | Download | only in avahi-core

Lines Matching full:record

66                 e->record->key->clazz == AVAHI_DNS_CLASS_IN &&
67 avahi_domain_equal(name, e->record->key->name))
68 callback(s, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, userdata);
79 callback(s, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, userdata);
110 avahi_record_list_push(s->record_list, e->record, e->flags & AVAHI_PUBLISH_UNIQUE, unicast_response, auxiliary);
118 /* Push all records that match the specified key to the record list */
126 if (!e->dead && avahi_key_pattern_match(k, e->record->key) && avahi_entry_is_registered(s, e, i))
196 static void incoming_probe(AvahiServer *s, AvahiRecord *record, AvahiInterface *i) {
201 assert(record);
206 for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = n) {
213 if ((cmp = avahi_record_lexicographical_compare(e->record, record)) == 0) {
228 char *t = avahi_record_to_string(record);
234 withdraw_rrset(s, record->key);
241 static int handle_conflict(AvahiServer *s, AvahiInterface *i, AvahiRecord *record, int unique) {
247 assert(record);
249 /* Check whether an incoming record conflicts with one of our own */
251 for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = n) {
257 /* Check if the incoming is a goodbye record */
258 if (avahi_record_is_goodbye(record)) {
260 if (avahi_record_equal_no_ttl(e->record, record)) {
264 t = avahi_record_to_string(record);
265 avahi_log_debug("Received goodbye record for one of our records [%s]. Refreshing.", t);
266 avahi_server_prepare_matching_responses(s, i, e->record->key, 0);
282 if (avahi_record_equal_no_ttl(e->record, record)) {
283 ours = 1; /* We have an identical record, so this is no conflict */
286 if (record->ttl <= e->record->ttl/2 &&
290 t = avahi_record_to_string(record);
292 avahi_log_debug("Received record with bad TTL [%s]. Refreshing.", t);
293 avahi_server_prepare_matching_responses(s, i, e->record->key, 0);
312 /* We are currently registering a matching record, but
326 t = avahi_record_to_string(record);
329 avahi_log_debug("Received conflicting record [%s] with local record to be. Withdrawing.", t);
330 withdraw_rrset(s, record->key);
333 avahi_log_debug("Received conflicting record [%s]. Resetting our record.", t);
384 avahi_log_warn("Record [%s] not fitting in legacy unicast packet, dropping.", t);
412 * packet AND it is not an auxiliary record AND all other
413 * responses for this record are unique too. */
420 /* Due to some reasons the record has not been scheduled.
437 /* Appending this record succeeded, so incremeant
447 /* The record is too large for one packet, so create a larger packet */
457 /* Appending this record succeeded, so incremeant
473 avahi_log_warn("Record [%s] too large, doesn't fit in any packet!", t);
479 /* Appending the record didn't succeeed, so let's send this packet, and create a new one */
524 r = e->record;
530 avahi_record_list_push(s->record_list, e->record, e->cache_flush, 0, 0);
614 AvahiRecord *record;
617 if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
618 avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
622 avahi_response_scheduler_suppress(i->response_scheduler, record, a);
623 avahi_record_list_drop(s->record_list, record);
624 avahi_cache_stop_poof(i->cache, record, a);
626 avahi_record_unref(record);
629 /* Probe record */
631 AvahiRecord *record;
634 if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
635 avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
639 if (!avahi_key_is_pattern(record->key)) {
641 reflect_probe(s, i, record);
642 incoming_probe(s, record, i);
645 avahi_record_unref(record);
668 AvahiRecord *record;
671 if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
672 avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
676 if (!avahi_key_is_pattern(record->key)) {
678 if (handle_conflict(s, i, record, cache_flush)) {
679 if (!from_local_iface && !avahi_record_is_link_local_address(record))
680 reflect_response(s, i, record, cache_flush);
681 avahi_cache_update(i->cache, record, cache_flush, a);
682 avahi_response_scheduler_incoming(i->response_scheduler, record, cache_flush);
686 avahi_record_unref(record);
689 /* If the incoming response contained a conflicting record, some
1160 avahi_log_info("Registering HINFO record with values '%s'/'%s'.", r->data.hinfo.cpu, r->data.hinfo.os);
1754 return avahi_domain_equal(s->host_name_fqdn, e->record->data.srv.name);
1757 int avahi_server_is_record_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *record) {
1761 assert(record);
1763 for (e = avahi_hashmap_lookup(s->entries_by_key, record->key); e; e = e->by_key_next)
1768 avahi_record_equal_no_ttl(record, e->record))