@@ -1376,6 +1376,13 @@ s! {
1376
1376
pub userns_fd: crate :: __u64,
1377
1377
}
1378
1378
1379
+ // linux/nsfs.h
1380
+ pub struct mnt_ns_info {
1381
+ pub size: crate :: __u32,
1382
+ pub nr_mounts: crate :: __u32,
1383
+ pub mnt_ns_id: crate :: __u64,
1384
+ }
1385
+
1379
1386
// linux/pidfd.h
1380
1387
1381
1388
pub struct pidfd_info {
@@ -3172,6 +3179,27 @@ pub const MREMAP_MAYMOVE: c_int = 1;
3172
3179
pub const MREMAP_FIXED : c_int = 2 ;
3173
3180
pub const MREMAP_DONTUNMAP : c_int = 4 ;
3174
3181
3182
+ // linux/nsfs.h
3183
+ const NSIO : c_uint = 0xb7 ;
3184
+
3185
+ pub const NS_GET_USERNS : c_uint = _IO ( NSIO , 0x1 ) ;
3186
+ pub const NS_GET_PARENT : c_uint = _IO ( NSIO , 0x2 ) ;
3187
+ pub const NS_GET_NSTYPE : c_uint = _IO ( NSIO , 0x3 ) ;
3188
+ pub const NS_GET_OWNER_UID : c_uint = _IO ( NSIO , 0x4 ) ;
3189
+
3190
+ pub const NS_GET_MNTNS_ID : c_uint = _IOR :: < __u64 > ( NSIO , 0x5 ) ;
3191
+
3192
+ pub const NS_GET_PID_FROM_PIDNS : c_uint = _IOR :: < c_int > ( NSIO , 0x6 ) ;
3193
+ pub const NS_GET_TGID_FROM_PIDNS : c_uint = _IOR :: < c_int > ( NSIO , 0x7 ) ;
3194
+ pub const NS_GET_PID_IN_PIDNS : c_uint = _IOR :: < c_int > ( NSIO , 0x8 ) ;
3195
+ pub const NS_GET_TGID_IN_PIDNS : c_uint = _IOR :: < c_int > ( NSIO , 0x9 ) ;
3196
+
3197
+ pub const MNT_NS_INFO_SIZE_VER0 : c_uint = 16 ;
3198
+
3199
+ pub const NS_MNT_GET_INFO : c_uint = _IOR :: < mnt_ns_info > ( NSIO , 10 ) ;
3200
+ pub const NS_MNT_GET_NEXT : c_uint = _IOR :: < mnt_ns_info > ( NSIO , 11 ) ;
3201
+ pub const NS_MNT_GET_PREV : c_uint = _IOR :: < mnt_ns_info > ( NSIO , 12 ) ;
3202
+
3175
3203
// linux/pidfd.h
3176
3204
pub const PIDFD_NONBLOCK : c_uint = O_NONBLOCK as c_uint ;
3177
3205
pub const PIDFD_THREAD : c_uint = O_EXCL as c_uint ;
0 commit comments