This makes most header files easier to look at. Also Emacs gets really slow when browsing through large sections of overly long prototypes, which is much improved by this macro. We should probably not do something similar with too many other cases, as macros like this might help readability for some, but make it worse for others. But I think given the complexity of this specific prototype and how often we use it, it's worth doing.
30 lines
877 B
C
30 lines
877 B
C
/* SPDX-License-Identifier: LGPL-2.1+ */
|
|
#pragma once
|
|
|
|
/***
|
|
This file is part of systemd.
|
|
|
|
Copyright 2013 Tom Gundersen <teg@jklm.no>
|
|
***/
|
|
|
|
#include "conf-parser.h"
|
|
#include "macro.h"
|
|
|
|
typedef enum AddressFamilyBoolean {
|
|
/* This is a bitmask, though it usually doesn't feel that way! */
|
|
ADDRESS_FAMILY_NO = 0,
|
|
ADDRESS_FAMILY_IPV4 = 1,
|
|
ADDRESS_FAMILY_IPV6 = 2,
|
|
ADDRESS_FAMILY_YES = 3,
|
|
_ADDRESS_FAMILY_BOOLEAN_MAX,
|
|
_ADDRESS_FAMILY_BOOLEAN_INVALID = -1,
|
|
} AddressFamilyBoolean;
|
|
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_address_family_boolean);
|
|
CONFIG_PARSER_PROTOTYPE(config_parse_address_family_boolean_with_kernel);
|
|
|
|
const char *address_family_boolean_to_string(AddressFamilyBoolean b) _const_;
|
|
AddressFamilyBoolean address_family_boolean_from_string(const char *s) _const_;
|
|
|
|
int kernel_route_expiration_supported(void);
|