summaryrefslogtreecommitdiffstats
path: root/src/basic/namespace-util.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/basic/namespace-util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/basic/namespace-util.h b/src/basic/namespace-util.h
new file mode 100644
index 0000000000..8c17ce91b2
--- /dev/null
+++ b/src/basic/namespace-util.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <sys/types.h>
+
+int namespace_open(pid_t pid, int *pidns_fd, int *mntns_fd, int *netns_fd, int *userns_fd, int *root_fd);
+int namespace_enter(int pidns_fd, int mntns_fd, int netns_fd, int userns_fd, int root_fd);
+
+int fd_is_network_ns(int fd);