File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2147,6 +2147,8 @@ fn test_android(target: &str) {
21472147 ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
21482148 // signalfd had SIGSYS fields added in Android 4.19, but CI does not have that version yet.
21492149 ( struct_ == "signalfd_siginfo" && field == "ssi_call_addr" ) ||
2150+ // FIXME: `h_proto` is of type __be16 big endian version of __u16
2151+ ( struct_ == "ethhdr" && field == "h_proto" ) ||
21502152 // FIXME(android): Seems the type has been changed on NDK r26b
21512153 ( struct_ == "flock64" && ( field == "l_start" || field == "l_len" ) )
21522154 } ) ;
@@ -4461,6 +4463,8 @@ fn test_linux(target: &str) {
44614463 ( union_ == "ptp_perout_request" && field == "anonymous_1" ) ||
44624464 // `anonymous_2` is an anonymous union
44634465 ( union_ == "ptp_perout_request" && field == "anonymous_2" ) ||
4466+ // FIXME: `h_proto` is of type __be16 big endian version of __u16
4467+ ( union_ == "ethhdr" && field == "h_proto" ) ||
44644468 // FIXME(linux): `adjust_phase` requires >= 5.7 kernel headers
44654469 // FIXME(linux): `max_phase_adj` requires >= 5.19 kernel headers
44664470 // the rsv field shrunk when those fields got added, so is omitted too
Original file line number Diff line number Diff line change @@ -3423,6 +3423,7 @@ epoll_create1
34233423epoll_ctl
34243424epoll_event
34253425epoll_wait
3426+ ethhdr
34263427eventfd
34273428eventfd_read
34283429eventfd_write
Original file line number Diff line number Diff line change @@ -593,6 +593,7 @@ dlvsym
593593eaccess
594594endutxent
595595epoll_pwait2
596+ ethhdr
596597euidaccess
597598execveat
598599explicit_bzero
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ pub type __u16 = c_ushort;
4747pub type __s16 = c_short ;
4848pub type __u32 = c_uint ;
4949pub type __s32 = c_int ;
50+ pub type __be16 = __u16 ;
5051
5152// linux/elf.h
5253
@@ -620,6 +621,15 @@ s_no_extra_traits! {
620621 pub ifc_len: c_int,
621622 pub ifc_ifcu: __c_anonymous_ifc_ifcu,
622623 }
624+
625+ // linux/if_ether.h
626+
627+ #[ repr( C , packed) ]
628+ pub struct ethhdr {
629+ pub h_dest: [ c_uchar; crate :: ETH_ALEN as usize ] ,
630+ pub h_source: [ c_uchar; crate :: ETH_ALEN as usize ] ,
631+ pub h_proto: crate :: __be16,
632+ }
623633}
624634
625635cfg_if ! {
@@ -857,15 +867,6 @@ cfg_if! {
857867 self . absflat. hash( state) ;
858868 }
859869 }
860-
861- impl PartialEq for prop_info {
862- fn eq( & self , other: & prop_info) -> bool {
863- self . __name == other. __name
864- && self . __serial == other. __serial
865- && self . __value == other. __value
866- }
867- }
868- impl Eq for prop_info { }
869870 }
870871}
871872
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ pub type __rlimit_resource_t = c_uint;
77pub type Lmid_t = c_long ;
88pub type regoff_t = c_int ;
99pub type __kernel_rwf_t = c_int ;
10+ pub type __be16 = crate :: __u16 ;
1011
1112cfg_if ! {
1213 if #[ cfg( doc) ] {
@@ -379,6 +380,15 @@ s_no_extra_traits! {
379380 __pad: [ c_char; 4 ] ,
380381 __glibc_reserved: [ c_char; 32 ] ,
381382 }
383+
384+ // linux/if_ether.h
385+
386+ #[ repr( C , packed) ]
387+ pub struct ethhdr {
388+ pub h_dest: [ c_uchar; crate :: ETH_ALEN as usize ] ,
389+ pub h_source: [ c_uchar; crate :: ETH_ALEN as usize ] ,
390+ pub h_proto: crate :: __be16,
391+ }
382392}
383393
384394// Internal, for casts to access union fields
You can’t perform that action at this time.
0 commit comments