logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

nsfs.h (1675B)


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