]>
Commit | Line | Data |
---|---|---|
44e7b949 LP |
1 | #pragma once |
2 | ||
be32eb9b TG |
3 | /*** |
4 | This file is part of systemd. | |
5 | ||
6 | Copyright (C) 2013 Tom Gundersen <teg@jklm.no> | |
7 | ||
8 | systemd is free software; you can redistribute it and/or modify it | |
9 | under the terms of the GNU Lesser General Public License as published by | |
10 | the Free Software Foundation; either version 2.1 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | systemd is distributed in the hope that it will be useful, but | |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | Lesser General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU Lesser General Public License | |
19 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
20 | ***/ | |
21 | ||
b3e01314 | 22 | #include <stdbool.h> |
be32eb9b | 23 | |
f8693fc7 BG |
24 | #include "sd-dhcp-lease.h" |
25 | ||
134e56dc | 26 | #include "condition.h" |
71d35b6b | 27 | #include "udev.h" |
2cc412b5 | 28 | |
be32eb9b | 29 | bool net_match_config(const struct ether_addr *match_mac, |
5256e00e TG |
30 | char * const *match_path, |
31 | char * const *match_driver, | |
32 | char * const *match_type, | |
33 | char * const *match_name, | |
2cc412b5 TG |
34 | Condition *match_host, |
35 | Condition *match_virt, | |
36 | Condition *match_kernel, | |
edbb03e9 | 37 | Condition *match_arch, |
505f8da7 | 38 | const struct ether_addr *dev_mac, |
b3e01314 | 39 | const char *dev_path, |
bf175aaf | 40 | const char *dev_parent_driver, |
b3e01314 TG |
41 | const char *dev_driver, |
42 | const char *dev_type, | |
32bc8adc | 43 | const char *dev_name); |
be32eb9b | 44 | |
2cc412b5 TG |
45 | int config_parse_net_condition(const char *unit, const char *filename, unsigned line, |
46 | const char *section, unsigned section_line, const char *lvalue, | |
47 | int ltype, const char *rvalue, void *data, void *userdata); | |
48 | ||
be32eb9b | 49 | int config_parse_hwaddr(const char *unit, const char *filename, unsigned line, |
71a61510 TG |
50 | const char *section, unsigned section_line, const char *lvalue, |
51 | int ltype, const char *rvalue, void *data, void *userdata); | |
be32eb9b TG |
52 | |
53 | int config_parse_ifname(const char *unit, const char *filename, unsigned line, | |
71a61510 TG |
54 | const char *section, unsigned section_line, const char *lvalue, |
55 | int ltype, const char *rvalue, void *data, void *userdata); | |
5256e00e TG |
56 | |
57 | int config_parse_ifnames(const char *unit, const char *filename, unsigned line, | |
58 | const char *section, unsigned section_line, const char *lvalue, | |
59 | int ltype, const char *rvalue, void *data, void *userdata); | |
f5284182 | 60 | |
d2df0d0e | 61 | int config_parse_ifalias(const char *unit, const char *filename, unsigned line, |
71a61510 TG |
62 | const char *section, unsigned section_line, const char *lvalue, |
63 | int ltype, const char *rvalue, void *data, void *userdata); | |
413708d1 VK |
64 | |
65 | int config_parse_iaid(const char *unit, const char *filename, unsigned line, | |
66 | const char *section, unsigned section_line, const char *lvalue, | |
67 | int ltype, const char *rvalue, void *data, void *userdata); | |
d2df0d0e | 68 | |
dbe81cbd | 69 | int net_get_unique_predictable_data(struct udev_device *device, uint64_t *result); |
fc541430 | 70 | const char *net_get_name(struct udev_device *device); |
7951dea2 | 71 | |
b0e39c82 | 72 | void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size); |
a2ba62c7 | 73 | int deserialize_in_addrs(struct in_addr **addresses, const char *string); |
b729fa14 PF |
74 | void serialize_in6_addrs(FILE *f, const struct in6_addr *addresses, |
75 | size_t size); | |
a2ba62c7 | 76 | int deserialize_in6_addrs(struct in6_addr **addresses, const char *string); |
e1ea665e EY |
77 | |
78 | /* don't include "dhcp-lease-internal.h" as it causes conflicts between netinet/ip.h and linux/ip.h */ | |
79 | struct sd_dhcp_route; | |
80 | ||
f8693fc7 | 81 | void serialize_dhcp_routes(FILE *f, const char *key, sd_dhcp_route **routes, size_t size); |
e1ea665e | 82 | int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t *ret_allocated, const char *string); |
a073309f | 83 | |
e4735228 LP |
84 | int serialize_dhcp_option(FILE *f, const char *key, const void *data, size_t size); |
85 | int deserialize_dhcp_option(void **data, size_t *data_len, const char *string); |