]>
Commit | Line | Data |
---|---|---|
fc2f9534 LP |
1 | #pragma once |
2 | ||
3 | /*** | |
4 | This file is part of systemd. | |
5 | ||
6 | Copyright 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 | ||
22 | #include "macro.h" | |
23 | ||
24 | typedef enum AddressFamilyBoolean { | |
25 | /* This is a bitmask, though it usually doesn't feel that way! */ | |
26 | ADDRESS_FAMILY_NO = 0, | |
27 | ADDRESS_FAMILY_IPV4 = 1, | |
28 | ADDRESS_FAMILY_IPV6 = 2, | |
29 | ADDRESS_FAMILY_YES = 3, | |
30 | _ADDRESS_FAMILY_BOOLEAN_MAX, | |
31 | _ADDRESS_FAMILY_BOOLEAN_INVALID = -1, | |
32 | } AddressFamilyBoolean; | |
33 | ||
fc2f9534 LP |
34 | int config_parse_address_family_boolean(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); |
35 | int config_parse_address_family_boolean_with_kernel(const char* unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); | |
36 | ||
fc2f9534 LP |
37 | const char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_; |
38 | AddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_; |