1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
7 typedef struct DnssdService DnssdService
;
8 typedef struct DnssdTxtData DnssdTxtData
;
10 typedef struct Manager Manager
;
11 typedef struct DnsResourceRecord DnsResourceRecord
;
12 typedef struct DnsTxtItem DnsTxtItem
;
20 DnsResourceRecord
*rr
;
22 LIST_HEAD(DnsTxtItem
, txts
);
24 LIST_FIELDS(DnssdTxtData
, items
);
36 DnsResourceRecord
*ptr_rr
;
37 DnsResourceRecord
*srv_rr
;
39 /* Section 6.8 of RFC 6763 allows having service
40 * instances with multiple TXT resource records. */
41 LIST_HEAD(DnssdTxtData
, txt_data_items
);
49 DnssdService
*dnssd_service_free(DnssdService
*service
);
50 DnssdTxtData
*dnssd_txtdata_free(DnssdTxtData
*txt_data
);
51 DnssdTxtData
*dnssd_txtdata_free_all(DnssdTxtData
*txt_data
);
53 DEFINE_TRIVIAL_CLEANUP_FUNC(DnssdService
*, dnssd_service_free
);
54 DEFINE_TRIVIAL_CLEANUP_FUNC(DnssdTxtData
*, dnssd_txtdata_free
);
56 int dnssd_render_instance_name(Manager
*m
, DnssdService
*s
, char **ret
);
57 int dnssd_load(Manager
*manager
);
58 int dnssd_txt_item_new_from_string(const char *key
, const char *value
, DnsTxtItem
**ret_item
);
59 int dnssd_txt_item_new_from_data(const char *key
, const void *value
, const size_t size
, DnsTxtItem
**ret_item
);
60 int dnssd_update_rrs(DnssdService
*s
);
61 int dnssd_signal_conflict(Manager
*manager
, const char *name
);