diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-22 11:29:42 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-11-22 22:18:34 +0100 |
commit | c1b91f06b93ba29eafbf50f4858aedfb6ded4ff1 (patch) | |
tree | 36defe3e0dfca65359a66d5814b76b8f3bea4de1 /src/basic/socket-util.h | |
parent | f96b500eced522adb56e4e79a876c6a9471bb134 (diff) | |
download | systemd-c1b91f06b93ba29eafbf50f4858aedfb6ded4ff1.tar.gz |
socket-util: add helper for generically initializing sockaddr_union from in_addr_union
Diffstat (limited to 'src/basic/socket-util.h')
-rw-r--r-- | src/basic/socket-util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h index c4fafa084b..57e655154c 100644 --- a/src/basic/socket-util.h +++ b/src/basic/socket-util.h @@ -15,6 +15,7 @@ #include <sys/un.h> #include "errno-util.h" +#include "in-addr-util.h" #include "macro.h" #include "missing_network.h" #include "missing_socket.h" @@ -106,6 +107,7 @@ bool socket_ipv6_is_enabled(void); int sockaddr_port(const struct sockaddr *_sa, unsigned *port); const union in_addr_union *sockaddr_in_addr(const struct sockaddr *sa); +int sockaddr_set_in_addr(union sockaddr_union *u, int family, const union in_addr_union *a, uint16_t port); int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret); int getpeername_pretty(int fd, bool include_port, char **ret); |