]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/af-list.h
Fix reference to FileDescriptorStoreMax= directive
[thirdparty/systemd.git] / src / basic / af-list.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
4298d0b5
LP
2#pragma once
3
dccca82b
LP
4#include <sys/socket.h>
5
202b76ae
ZJS
6#include "string-util.h"
7
bfd5a068 8const char* af_to_name(int id);
4298d0b5
LP
9int af_from_name(const char *name);
10
202b76ae
ZJS
11static inline const char* af_to_name_short(int id) {
12 const char *f;
13
14 if (id == AF_UNSPEC)
15 return "*";
16
17 f = af_to_name(id);
18 if (!f)
19 return "unknown";
20
21 assert(startswith(f, "AF_"));
22 return f + 3;
23}
24
23118193
LP
25const char* af_to_ipv4_ipv6(int id);
26int af_from_ipv4_ipv6(const char *af);
27
4298d0b5 28int af_max(void);