1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Filesystem-backed Unix socket namespace hook.
//!
//! Abstract Unix socket names are managed inside ax-net. Path-based Unix socket
//! names are delegated to an optional filesystem provider through this trait.
//!
//! # Integration Boundary
//!
//! The network crate only needs to resolve, create, and remove bind slots for a
//! path. It does not own dentries, permissions, mount namespaces, or lifecycle
//! rules beyond unbinding the slot when the Unix socket transport is dropped.
//! Kernels that do not enable filesystem support can leave this provider
//! unregistered and still use unnamed or abstract Unix sockets.
use ;
use OnceLock;
use BindSlot;
use crate::;
/// Path-based Unix socket namespace provider.
///
/// Provides filesystem backing for Unix domain socket path bindings.
/// Abstract namespace sockets are handled separately within ax-net.
/// Callbacks run in sleepable task context: path lookup, creation, and removal
/// can perform filesystem I/O and wait for filesystem locks.
static UNIX_NS: = new;
/// Register Unix namespace provider.
///
/// Must be called before using path-based Unix sockets.
/// Access the registered Unix namespace.
///
/// Returns `NetError::Unsupported` if no filesystem-backed namespace is available.
pub