Systemd/src/resolve
Lennart Poettering ae2a15bc14 macro: introduce TAKE_PTR() macro
This macro will read a pointer of any type, return it, and set the
pointer to NULL. This is useful as an explicit concept of passing
ownership of a memory area between pointers.

This takes inspiration from Rust:

https://doc.rust-lang.org/std/option/enum.Option.html#method.take

and was suggested by Alan Jenkins (@sourcejedi).

It drops ~160 lines of code from our codebase, which makes me like it.
Also, I think it clarifies passing of ownership, and thus helps
readability a bit (at least for the initiated who know the new macro)
2018-03-22 20:21:42 +01:00
..
RFCs resolve: add support for RFC 8080 (#7600) 2017-12-12 16:30:12 +01:00
dns-type.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
dns-type.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dns_type-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
generate-dns_type-gperf.py tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
generate-dns_type-list.sed meson: build systemd using meson 2017-04-23 21:47:26 -04:00
meson.build resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
org.freedesktop.resolve1.conf resolved: add legacy dbus service and policy files 2014-07-16 03:41:39 +02:00
org.freedesktop.resolve1.policy meson: drop unnecessary "transformation" of policy files 2018-02-16 13:01:12 +01:00
org.freedesktop.resolve1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
resolv.conf resolved: synchronize introduction blurbs in all three resolv.conf files we provide 2017-12-08 17:25:08 +01:00
resolvconf-compat.c resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
resolvconf-compat.h resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
resolve-tool.c resolve: show more global settings in `systemd-resolve --status` 2018-03-20 00:44:47 +09:00
resolve-tool.h resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
resolved-bus.c resolve: expose global LLMNR, MulticastDNS, and DNSSEC settings as bus property 2018-03-20 00:44:44 +09:00
resolved-bus.h resolve: expose global LLMNR, MulticastDNS, and DNSSEC settings as bus property 2018-03-20 00:44:44 +09:00
resolved-conf.c resolved: support multiple TXT RRs per DNS-SD service 2017-12-08 14:29:27 +02:00
resolved-conf.h resolved: add enablers for DNS-SD 2017-12-08 14:29:27 +02:00
resolved-def.h resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
resolved-dns-answer.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-answer.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-cache.c tree-wide: add DEBUG_LOGGING macro that checks whether debug logging is on (#7645) 2017-12-15 11:09:00 +01:00
resolved-dns-cache.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-dnssec.c resolved: use _cleanup_ in one more place 2018-02-05 10:08:18 +01:00
resolved-dns-dnssec.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-packet.c resolve: fix build without gcrypt 2018-01-24 12:59:22 +09:00
resolved-dns-packet.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-query.c resolve: Adjust and unify D-Bus call timeout (#7847) 2018-01-23 09:53:31 +09:00
resolved-dns-query.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-question.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-question.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-rr.c resolved: fix confusion with generic data in unparsable packets 2018-01-18 20:28:38 +11:00
resolved-dns-rr.h resolve: add support for RFC 8080 (#7600) 2017-12-12 16:30:12 +01:00
resolved-dns-scope.c resolved: use DNS_ANSWER_FOREACH instead of for 2018-01-03 15:04:20 +02:00
resolved-dns-scope.h resolved: when a server consistently returns SERVFAIL, try another one 2017-12-12 12:10:08 +01:00
resolved-dns-search-domain.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-dns-search-domain.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-server.c resolve: Adjust and unify D-Bus call timeout (#7847) 2018-01-23 09:53:31 +09:00
resolved-dns-server.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-stream.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-stream.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-stub.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-stub.h resolve-tool: provide resolvconf(8) compatibility 2018-03-02 15:48:46 +01:00
resolved-dns-synthesize.c resolved: fix wrong error code (#7601) 2017-12-10 16:27:19 +01:00
resolved-dns-synthesize.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-transaction.c resolved: try a different server if server is too dumb to do DNSSEC 2017-12-12 12:10:08 +01:00
resolved-dns-transaction.h resolved: when a server consistently returns SERVFAIL, try another one 2017-12-12 12:10:08 +01:00
resolved-dns-trust-anchor.c Add set/hashmap helpers for non-trivial freeing and use where straighforward 2017-11-28 21:30:30 +01:00
resolved-dns-trust-anchor.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-dns-zone.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-dns-zone.h resolved: detect and handle mDNS race condition upon probing 2017-12-08 14:29:27 +02:00
resolved-dnssd-bus.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-dnssd-bus.h resolved: implement D-Bus API for DNS-SD 2017-12-08 14:29:27 +02:00
resolved-dnssd-gperf.gperf resolved: add enablers for DNS-SD 2017-12-08 14:29:27 +02:00
resolved-dnssd.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-dnssd.h resolved: support multiple TXT RRs per DNS-SD service 2017-12-08 14:29:27 +02:00
resolved-etc-hosts.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-etc-hosts.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-gperf.gperf tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
resolved-link-bus.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-link-bus.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-link.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-link.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-llmnr.c resolved: ignore our own LLMNR packets, the same way we ignore mDNS packets already 2017-12-06 12:45:39 +01:00
resolved-llmnr.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-manager.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
resolved-manager.h resolved: consult Polkit for privileges when manipulating DNS-SD 2017-12-08 14:29:27 +02:00
resolved-mdns.c resolved: detect and handle mDNS race condition upon probing 2017-12-08 14:29:27 +02:00
resolved-mdns.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved-resolv-conf.c resolved: debug log about resolv.conf lines we don't grok 2018-03-02 12:43:12 +01:00
resolved-resolv-conf.h resolved: don't make defines needlessly public 2017-12-08 17:25:08 +01:00
resolved.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
resolved.conf.in resolved: add global config option to control mDNS stack 2017-03-21 13:35:08 +09:00
test-dns-packet.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
test-dnssec-complex.c resolve: Adjust and unify D-Bus call timeout (#7847) 2018-01-23 09:53:31 +09:00
test-dnssec.c test-dnssec: Allow builds without libgcrypt (#7850) (#7850) 2018-01-11 12:28:32 +01:00
test-resolve-tables.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-resolved-packet.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00