Systemd/src/libsystemd-network
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
..
arp-util.c libsystemd-network: fix endianness in ARP BPF filter (#8255) 2018-02-22 18:09:33 +01:00
arp-util.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-identifier.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-identifier.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-internal.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-lease-internal.h networkd: ignore Static Routes option when Classless Static Routes is given (#7807) 2018-01-20 08:42:45 +09:00
dhcp-network.c libsystemd-network: fix unaligned loads (issue #7654) 2017-12-18 13:02:07 -08:00
dhcp-option.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
dhcp-packet.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-protocol.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp-server-internal.h dhcp-server: introduce log_dhcp_server_errno() 2018-03-21 20:28:01 +01:00
dhcp6-internal.h dhcp6: Add function appending an IA PD to the DHCP6 message 2018-01-04 15:22:44 +02:00
dhcp6-lease-internal.h dhcp6: Add function to iterate and fetch delegated prefixes 2018-01-04 15:22:44 +02:00
dhcp6-network.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
dhcp6-option.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
dhcp6-protocol.h dhcp6: Sanitize DHCPv6 IA option parsing 2018-01-04 15:22:43 +02:00
icmp6-util.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
icmp6-util.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
lldp-internal.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
lldp-neighbor.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
lldp-neighbor.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
lldp-network.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
lldp-network.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
meson.build Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
ndisc-internal.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
ndisc-router.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
ndisc-router.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
network-internal.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
network-internal.h core,udev,networkd: add ConditionKernelVersion= 2017-12-26 17:39:44 +01:00
radv-internal.h radv: Add prefixes with dynamically updated lifetimes 2018-01-04 15:22:44 +02:00
sd-dhcp-client.c dhcp4: introduce new option 'duid-only' for ClientIdentifier= (#8350) 2018-03-12 17:18:07 +01:00
sd-dhcp-lease.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
sd-dhcp-server.c dhcp-server: don't propagate erros up the event loop 2018-03-21 20:32:52 +01:00
sd-dhcp6-client.c sd-dhcp6: fix check if serverid is set 2018-02-15 10:04:02 +01:00
sd-dhcp6-lease.c sd-dhcp6: fix check if serverid is set 2018-02-15 10:04:02 +01:00
sd-ipv4acd.c tree-wide: adjust fall through comments so that gcc is happy 2017-11-20 13:06:25 -08:00
sd-ipv4ll.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
sd-lldp.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
sd-ndisc.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
sd-radv.c Merge pull request #7582 from pfl/dhcp6_prefix_delegation 2018-01-15 12:02:37 +01:00
test-acd.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-dhcp-client.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-dhcp-option.c Merge pull request #2589 from keszybz/resolve-tool-2 2016-02-13 11:15:41 +01:00
test-dhcp-server.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-dhcp6-client.c test: free memory 2018-01-15 23:37:02 +09:00
test-ipv4ll-manual.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-ipv4ll.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-lldp.c test-lldp: use `memcmp` to compare bytes (#8054) 2018-01-31 09:54:37 +01:00
test-ndisc-ra.c radv: Add prefixes with dynamically updated lifetimes 2018-01-04 15:22:44 +02:00
test-ndisc-rs.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-sd-dhcp-lease.c network: Implement DHCP Option 119 (Domain Search List) (#5932) 2017-05-13 10:19:32 -04:00