diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-11-05 14:31:20 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-11-05 14:31:20 +0100 |
commit | 95081e08d78d3f9590f46a71a1e9ece77002d38c (patch) | |
tree | 1f81b057f5d90e5c6ab6622ec2a81cac04e778e2 /src/network/networkd-radv.h | |
parent | Merge pull request #13939 from yuwata/network-fix-memleak-and-13938 (diff) | |
download | systemd-95081e08d78d3f9590f46a71a1e9ece77002d38c.tar.xz systemd-95081e08d78d3f9590f46a71a1e9ece77002d38c.zip |
network: split struct Prefix into Prefix and RoutePrefix
Diffstat (limited to 'src/network/networkd-radv.h')
-rw-r--r-- | src/network/networkd-radv.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/network/networkd-radv.h b/src/network/networkd-radv.h index 2f60b285ae..21b323e83e 100644 --- a/src/network/networkd-radv.h +++ b/src/network/networkd-radv.h @@ -11,6 +11,7 @@ #include "networkd-util.h" typedef struct Prefix Prefix; +typedef struct RoutePrefix RoutePrefix; typedef enum RADVPrefixDelegation { RADV_PREFIX_DELEGATION_NONE, @@ -26,21 +27,26 @@ struct Prefix { NetworkConfigSection *section; sd_radv_prefix *radv_prefix; - sd_radv_route_prefix *radv_route_prefix; LIST_FIELDS(Prefix, prefixes); - LIST_FIELDS(Prefix, route_prefixes); }; -int prefix_new(Prefix **ret); +struct RoutePrefix { + Network *network; + NetworkConfigSection *section; + + sd_radv_route_prefix *radv_route_prefix; + + LIST_FIELDS(RoutePrefix, route_prefixes); +}; + void prefix_free(Prefix *prefix); DEFINE_NETWORK_SECTION_FUNCTIONS(Prefix, prefix_free); -int route_prefix_new(Prefix **ret); -void route_prefix_free(Prefix *prefix); +void route_prefix_free(RoutePrefix *prefix); -DEFINE_NETWORK_SECTION_FUNCTIONS(Prefix, route_prefix_free); +DEFINE_NETWORK_SECTION_FUNCTIONS(RoutePrefix, route_prefix_free); int radv_emit_dns(Link *link); int radv_configure(Link *link); |