summaryrefslogtreecommitdiff
path: root/src/basic/fd-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/fd-util.h')
-rw-r--r--src/basic/fd-util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index fe92b76c4..eeded4417 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
/***
@@ -79,6 +80,18 @@ bool fdname_is_valid(const char *s);
int fd_get_path(int fd, char **ret);
#endif // 0
+int move_fd(int from, int to, int cloexec);
+
+enum {
+ ACQUIRE_NO_DEV_NULL = 1 << 0,
+ ACQUIRE_NO_MEMFD = 1 << 1,
+ ACQUIRE_NO_PIPE = 1 << 2,
+ ACQUIRE_NO_TMPFILE = 1 << 3,
+ ACQUIRE_NO_REGULAR = 1 << 4,
+};
+
+int acquire_data_fd(const void *data, size_t size, unsigned flags);
+
/* Hint: ENETUNREACH happens if we try to connect to "non-existing" special IP addresses, such as ::5 */
#define ERRNO_IS_DISCONNECT(r) \
IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE, ENETUNREACH)