Files
systemd/src/shared/parse-socket-bind-item.h
T
Julia Kartseva 8bd095aa9a shared: add parser for SocketBind{Allow|Deny}=
Parse address family, ip protocol and ports, any of them can be
optional. If neither is specified, a special value 'any' is expected.
Helper is placed in shared to be reused in both fragment and dbus.
Add unit tests with valid and invalid examples.
2021-06-30 00:36:26 -07:00

13 lines
250 B
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdint.h>
int parse_socket_bind_item(
const char *str,
int *address_family,
int *ip_protocol,
uint16_t *nr_ports,
uint16_t *port_min);