]>
Commit | Line | Data |
---|---|---|
fc2f9534 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #pragma once | |
4 | ||
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2013 Tom Gundersen <teg@jklm.no> | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
24 | #include "macro.h" | |
25 | ||
26 | typedef enum AddressFamilyBoolean { | |
27 | /* This is a bitmask, though it usually doesn't feel that way! */ | |
28 | ADDRESS_FAMILY_NO = 0, | |
29 | ADDRESS_FAMILY_IPV4 = 1, | |
30 | ADDRESS_FAMILY_IPV6 = 2, | |
31 | ADDRESS_FAMILY_YES = 3, | |
32 | _ADDRESS_FAMILY_BOOLEAN_MAX, | |
33 | _ADDRESS_FAMILY_BOOLEAN_INVALID = -1, | |
34 | } AddressFamilyBoolean; | |
35 | ||
fc2f9534 LP |
36 | 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); |
37 | 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); | |
38 | ||
fc2f9534 LP |
39 | const char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_; |
40 | AddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_; |