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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
use Error;
use RawFd;
/// A dummy implementation of BPF program for non-Linux systems.
///
/// On systems that don't support BPF filters, this provides API compatibility
/// without any actual filtering functionality.
;
/// A dummy implementation of BPF operation for non-Linux systems.
///
/// This struct mirrors the Linux implementation but doesn't provide any
/// actual filtering functionality on non-Linux systems.
/// Macro for creating dummy BPF programs on non-Linux systems.
///
/// This macro provides API compatibility with the Linux version, but creates
/// a dummy program that doesn't perform any actual filtering on non-Linux systems.
///
/// # Parameters
///
/// * `$count` - The number of operations in the program (ignored)
/// * `$code $jt $jf $k` - Repeated tuples of operation parameters (ignored)
/// Attaches a BPF filter program to a socket (dummy implementation).
///
/// On non-Linux systems, this function does nothing and always returns success.
/// It provides API compatibility with the Linux version.
///
/// # Parameters
///
/// * `fd` - Raw file descriptor of the socket (ignored)
/// * `prog` - The BPF program to attach (ignored)
///
/// # Returns
///
/// Always returns `Ok(())` on non-Linux systems.
/// Detaches any BPF filter program from a socket (dummy implementation).
///
/// On non-Linux systems, this function does nothing and always returns success.
/// It provides API compatibility with the Linux version.
///
/// # Parameters
///
/// * `fd` - Raw file descriptor of the socket (ignored)
///
/// # Returns
///
/// Always returns `Ok(())` on non-Linux systems.
/// Locks the BPF filter on a socket (dummy implementation).
///
/// On non-Linux systems, this function does nothing and always returns success.
/// It provides API compatibility with the Linux version.
///
/// # Parameters
///
/// * `fd` - Raw file descriptor of the socket (ignored)
///
/// # Returns
///
/// Always returns `Ok(())` on non-Linux systems.