1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <stdint.h>
5 
6 enum {
7         PATH_CHECK_FATAL    = 1 << 0,  /* If not set, then error message is appended with 'ignoring'. */
8         PATH_CHECK_ABSOLUTE = 1 << 1,
9         PATH_CHECK_RELATIVE = 1 << 2,
10 };
11 
12 int path_simplify_and_warn(
13                 char *path,
14                 unsigned flag,
15                 const char *unit,
16                 const char *filename,
17                 unsigned line,
18                 const char *lvalue);
19 
20 int parse_socket_bind_item(
21         const char *str,
22         int *address_family,
23         int *ip_protocol,
24         uint16_t *nr_ports,
25         uint16_t *port_min);
26