@@ -12,6 +12,56 @@ pub(crate) const PROC_SUPER_MAGIC: u32 = 0x0000_9fa0;
12
12
#[ cfg( all( linux_kernel, target_env = "musl" ) ) ]
13
13
pub ( crate ) const NFS_SUPER_MAGIC : u32 = 0x0000_6969 ;
14
14
15
+ // Submitted upstream in https://github.com/rust-lang/libc/pull/3272.
16
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
17
+ pub ( crate ) const IPPROTO_ETHERNET : c_int = linux_raw_sys:: net:: IPPROTO_ETHERNET as _ ;
18
+
19
+ // TODO: Upstream these.
20
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
21
+ pub ( crate ) const ETH_P_TSN : c_int = linux_raw_sys:: if_ether:: ETH_P_TSN as _ ;
22
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
23
+ pub ( crate ) const ETH_P_ERSPAN2 : c_int = linux_raw_sys:: if_ether:: ETH_P_ERSPAN2 as _ ;
24
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
25
+ pub ( crate ) const ETH_P_ERSPAN : c_int = linux_raw_sys:: if_ether:: ETH_P_ERSPAN as _ ;
26
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
27
+ pub ( crate ) const ETH_P_PROFINET : c_int = linux_raw_sys:: if_ether:: ETH_P_PROFINET as _ ;
28
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
29
+ pub ( crate ) const ETH_P_REALTEK : c_int = linux_raw_sys:: if_ether:: ETH_P_REALTEK as _ ;
30
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
31
+ pub ( crate ) const ETH_P_ETHERCAT : c_int = linux_raw_sys:: if_ether:: ETH_P_ETHERCAT as _ ;
32
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
33
+ pub ( crate ) const ETH_P_PREAUTH : c_int = linux_raw_sys:: if_ether:: ETH_P_PREAUTH as _ ;
34
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
35
+ pub ( crate ) const ETH_P_LLDP : c_int = linux_raw_sys:: if_ether:: ETH_P_LLDP as _ ;
36
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
37
+ pub ( crate ) const ETH_P_MRP : c_int = linux_raw_sys:: if_ether:: ETH_P_MRP as _ ;
38
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
39
+ pub ( crate ) const ETH_P_NCSI : c_int = linux_raw_sys:: if_ether:: ETH_P_NCSI as _ ;
40
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
41
+ pub ( crate ) const ETH_P_CFM : c_int = linux_raw_sys:: if_ether:: ETH_P_CFM as _ ;
42
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
43
+ pub ( crate ) const ETH_P_IBOE : c_int = linux_raw_sys:: if_ether:: ETH_P_IBOE as _ ;
44
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
45
+ pub ( crate ) const ETH_P_HSR : c_int = linux_raw_sys:: if_ether:: ETH_P_HSR as _ ;
46
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
47
+ pub ( crate ) const ETH_P_NSH : c_int = linux_raw_sys:: if_ether:: ETH_P_NSH as _ ;
48
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
49
+ pub ( crate ) const ETH_P_DSA_8021Q : c_int = linux_raw_sys:: if_ether:: ETH_P_DSA_8021Q as _ ;
50
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
51
+ pub ( crate ) const ETH_P_DSA_A5PSW : c_int = linux_raw_sys:: if_ether:: ETH_P_DSA_A5PSW as _ ;
52
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
53
+ pub ( crate ) const ETH_P_IFE : c_int = linux_raw_sys:: if_ether:: ETH_P_IFE as _ ;
54
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
55
+ pub ( crate ) const ETH_P_CAN : c_int = linux_raw_sys:: if_ether:: ETH_P_CAN as _ ;
56
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
57
+ pub ( crate ) const ETH_P_CANXL : c_int = linux_raw_sys:: if_ether:: ETH_P_CANXL as _ ;
58
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
59
+ pub ( crate ) const ETH_P_XDSA : c_int = linux_raw_sys:: if_ether:: ETH_P_XDSA as _ ;
60
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
61
+ pub ( crate ) const ETH_P_MAP : c_int = linux_raw_sys:: if_ether:: ETH_P_MAP as _ ;
62
+ #[ cfg( all( linux_kernel, feature = "net" ) ) ]
63
+ pub ( crate ) const ETH_P_MCTP : c_int = linux_raw_sys:: if_ether:: ETH_P_MCTP as _ ;
64
+
15
65
#[ cfg( all(
16
66
linux_kernel,
17
67
any(
0 commit comments