]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
44e7b949 LP |
2 | #pragma once |
3 | ||
5cdf13c7 | 4 | #include "forward.h" |
f8693fc7 | 5 | |
072320ea TH |
6 | size_t serialize_in_addrs(FILE *f, |
7 | const struct in_addr *addresses, | |
8 | size_t size, | |
d8bff5cc | 9 | bool *with_leading_space, |
072320ea | 10 | bool (*predicate)(const struct in_addr *addr)); |
a2ba62c7 | 11 | int deserialize_in_addrs(struct in_addr **addresses, const char *string); |
b729fa14 | 12 | void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses, |
d8bff5cc ZJS |
13 | size_t size, |
14 | bool *with_leading_space); | |
a2ba62c7 | 15 | int deserialize_in6_addrs(struct in6_addr **addresses, const char *string); |
e1ea665e | 16 | |
b0e71631 RP |
17 | int serialize_dnr(FILE *f, const sd_dns_resolver *dnr, size_t n_dnr, bool *with_leading_space); |
18 | int deserialize_dnr(sd_dns_resolver **ret, const char *string); | |
19 | ||
e1ea665e EY |
20 | /* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */ |
21 | struct sd_dhcp_route; | |
ef0daa11 | 22 | struct sd_dhcp_lease; |
e1ea665e | 23 | |
32f8a613 | 24 | void serialize_dhcp_routes(FILE *f, const char *key, struct sd_dhcp_route **routes, size_t size); |
319a4f4b | 25 | int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, const char *string); |
a073309f | 26 | |
ce088d6f | 27 | /* It is not necessary to add deserialize_dhcp_option(). Use unhexmem() instead. */ |
e4735228 | 28 | int serialize_dhcp_option(FILE *f, const char *key, const void *data, size_t size); |
ef0daa11 | 29 | |
041ea9f9 | 30 | int dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file); |
ef0daa11 | 31 | int dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file); |