]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/af-list.h
resolve: voidify sd_event_add_signal() and sd_event_set_watchdog()
[thirdparty/systemd.git] / src / basic / af-list.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <sys/socket.h>
5
6 #include "string-util.h"
7
8 const char *af_to_name(int id);
9 int af_from_name(const char *name);
10
11 static 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
25 int af_max(void);