1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef __LINUX_NSFS_H 3 #define __LINUX_NSFS_H 4 5 #include <linux/ioctl.h> 6 7 #define NSIO 0xb7 8 9 /* Returns a file descriptor that refers to an owning user namespace */ 10 #define NS_GET_USERNS _IO(NSIO, 0x1) 11 /* Returns a file descriptor that refers to a parent namespace */ 12 #define NS_GET_PARENT _IO(NSIO, 0x2) 13 /* Returns the type of namespace (CLONE_NEW* value) referred to by 14 file descriptor */ 15 #define NS_GET_NSTYPE _IO(NSIO, 0x3) 16 /* Get owner UID (in the caller's user namespace) for a user namespace */ 17 #define NS_GET_OWNER_UID _IO(NSIO, 0x4) 18 /* Get the id for a mount namespace */ 19 #define NS_GET_MNTNS_ID _IO(NSIO, 0x5) 20 /* Translate pid from target pid namespace into the caller's pid namespace. */ 21 #define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int) 22 /* Return thread-group leader id of pid in the callers pid namespace. */ 23 #define NS_GET_TGID_FROM_PIDNS _IOR(NSIO, 0x7, int) 24 /* Translate pid from caller's pid namespace into a target pid namespace. */ 25 #define NS_GET_PID_IN_PIDNS _IOR(NSIO, 0x8, int) 26 /* Return thread-group leader id of pid in the target pid namespace. */ 27 #define NS_GET_TGID_IN_PIDNS _IOR(NSIO, 0x9, int) 28 29 #endif /* __LINUX_NSFS_H */ 30