diff --git a/crates/shadowsocks-service/src/local/mod.rs b/crates/shadowsocks-service/src/local/mod.rs index 013cda15a025..f891116e62ad 100644 --- a/crates/shadowsocks-service/src/local/mod.rs +++ b/crates/shadowsocks-service/src/local/mod.rs @@ -142,6 +142,7 @@ impl Server { connect_opts.tcp.keepalive = config.keep_alive.or(Some(LOCAL_DEFAULT_KEEPALIVE_TIMEOUT)); connect_opts.tcp.mptcp = config.mptcp; connect_opts.udp.mtu = config.udp_mtu; + connect_opts.udp.allow_fragmentation = config.outbound_udp_allow_fragmentation; context.set_connect_opts(connect_opts); let mut accept_opts = AcceptOpts { diff --git a/crates/shadowsocks-service/src/local/redir/sys/unix/pfvar_bindgen_openbsd.rs b/crates/shadowsocks-service/src/local/redir/sys/unix/pfvar_bindgen_openbsd.rs index 28e5d3905918..17d8130185a0 100644 --- a/crates/shadowsocks-service/src/local/redir/sys/unix/pfvar_bindgen_openbsd.rs +++ b/crates/shadowsocks-service/src/local/redir/sys/unix/pfvar_bindgen_openbsd.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.69.4 */ +// automatically generated by rust-bindgen 0.69.4 pub const __ISO_C_VISIBLE: u32 = 2011; pub const __XPG_VISIBLE: u32 = 700; @@ -1118,22 +1118,12 @@ fn bindgen_test_layout_iovec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_base) - ) + concat!("Offset of field: ", stringify!(iovec), "::", stringify!(iov_base)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(iovec), - "::", - stringify!(iov_len) - ) + concat!("Offset of field: ", stringify!(iovec), "::", stringify!(iov_len)) ); } pub const uio_rw_UIO_READ: uio_rw = 0; @@ -1143,12 +1133,8 @@ pub const uio_seg_UIO_USERSPACE: uio_seg = 0; pub const uio_seg_UIO_SYSSPACE: uio_seg = 1; pub type uio_seg = ::std::os::raw::c_uint; extern "C" { - pub fn preadv( - arg1: ::std::os::raw::c_int, - arg2: *const iovec, - arg3: ::std::os::raw::c_int, - arg4: __off_t, - ) -> isize; + pub fn preadv(arg1: ::std::os::raw::c_int, arg2: *const iovec, arg3: ::std::os::raw::c_int, arg4: __off_t) + -> isize; } extern "C" { pub fn pwritev( @@ -1159,18 +1145,10 @@ extern "C" { ) -> isize; } extern "C" { - pub fn readv( - arg1: ::std::os::raw::c_int, - arg2: *const iovec, - arg3: ::std::os::raw::c_int, - ) -> isize; + pub fn readv(arg1: ::std::os::raw::c_int, arg2: *const iovec, arg3: ::std::os::raw::c_int) -> isize; } extern "C" { - pub fn writev( - arg1: ::std::os::raw::c_int, - arg2: *const iovec, - arg3: ::std::os::raw::c_int, - ) -> isize; + pub fn writev(arg1: ::std::os::raw::c_int, arg2: *const iovec, arg3: ::std::os::raw::c_int) -> isize; } pub type u_char = ::std::os::raw::c_uchar; pub type u_short = ::std::os::raw::c_ushort; @@ -1252,22 +1230,12 @@ fn bindgen_test_layout_linger() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_onoff) - ) + concat!("Offset of field: ", stringify!(linger), "::", stringify!(l_onoff)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(linger), - "::", - stringify!(l_linger) - ) + concat!("Offset of field: ", stringify!(linger), "::", stringify!(l_linger)) ); } #[repr(C)] @@ -1293,22 +1261,12 @@ fn bindgen_test_layout_timeval() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) + concat!("Offset of field: ", stringify!(timeval), "::", stringify!(tv_sec)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) + concat!("Offset of field: ", stringify!(timeval), "::", stringify!(tv_usec)) ); } #[repr(C)] @@ -1335,32 +1293,17 @@ fn bindgen_test_layout_splice() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp_fd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(splice), - "::", - stringify!(sp_fd) - ) + concat!("Offset of field: ", stringify!(splice), "::", stringify!(sp_fd)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp_max) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(splice), - "::", - stringify!(sp_max) - ) + concat!("Offset of field: ", stringify!(splice), "::", stringify!(sp_max)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sp_idle) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(splice), - "::", - stringify!(sp_idle) - ) + concat!("Offset of field: ", stringify!(splice), "::", stringify!(sp_idle)) ); } #[repr(C)] @@ -1387,32 +1330,17 @@ fn bindgen_test_layout_sockaddr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_len) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_len) - ) + concat!("Offset of field: ", stringify!(sockaddr), "::", stringify!(sa_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_family) - ) + concat!("Offset of field: ", stringify!(sockaddr), "::", stringify!(sa_family)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr), - "::", - stringify!(sa_data) - ) + concat!("Offset of field: ", stringify!(sockaddr), "::", stringify!(sa_data)) ); } #[repr(C)] @@ -1513,32 +1441,17 @@ fn bindgen_test_layout_sockpeercred() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sockpeercred), - "::", - stringify!(uid) - ) + concat!("Offset of field: ", stringify!(sockpeercred), "::", stringify!(uid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sockpeercred), - "::", - stringify!(gid) - ) + concat!("Offset of field: ", stringify!(sockpeercred), "::", stringify!(gid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sockpeercred), - "::", - stringify!(pid) - ) + concat!("Offset of field: ", stringify!(sockpeercred), "::", stringify!(pid)) ); } #[repr(C)] @@ -1569,52 +1482,27 @@ fn bindgen_test_layout_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_name) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_namelen) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_namelen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iov) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_iov)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_iovlen) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_iovlen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_control) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_control)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize }, @@ -1629,12 +1517,7 @@ fn bindgen_test_layout_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(msghdr), - "::", - stringify!(msg_flags) - ) + concat!("Offset of field: ", stringify!(msghdr), "::", stringify!(msg_flags)) ); } #[repr(C)] @@ -1660,22 +1543,12 @@ fn bindgen_test_layout_mmsghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_hdr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_hdr) - ) + concat!("Offset of field: ", stringify!(mmsghdr), "::", stringify!(msg_hdr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).msg_len) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(mmsghdr), - "::", - stringify!(msg_len) - ) + concat!("Offset of field: ", stringify!(mmsghdr), "::", stringify!(msg_len)) ); } #[repr(C)] @@ -1702,68 +1575,35 @@ fn bindgen_test_layout_cmsghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_len) - ) + concat!("Offset of field: ", stringify!(cmsghdr), "::", stringify!(cmsg_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_level) - ) + concat!("Offset of field: ", stringify!(cmsghdr), "::", stringify!(cmsg_level)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(cmsghdr), - "::", - stringify!(cmsg_type) - ) + concat!("Offset of field: ", stringify!(cmsghdr), "::", stringify!(cmsg_type)) ); } extern "C" { - pub fn accept( - arg1: ::std::os::raw::c_int, - arg2: *mut sockaddr, - arg3: *mut socklen_t, - ) -> ::std::os::raw::c_int; + pub fn accept(arg1: ::std::os::raw::c_int, arg2: *mut sockaddr, arg3: *mut socklen_t) -> ::std::os::raw::c_int; } extern "C" { - pub fn bind( - arg1: ::std::os::raw::c_int, - arg2: *const sockaddr, - arg3: socklen_t, - ) -> ::std::os::raw::c_int; + pub fn bind(arg1: ::std::os::raw::c_int, arg2: *const sockaddr, arg3: socklen_t) -> ::std::os::raw::c_int; } extern "C" { - pub fn connect( - arg1: ::std::os::raw::c_int, - arg2: *const sockaddr, - arg3: socklen_t, - ) -> ::std::os::raw::c_int; + pub fn connect(arg1: ::std::os::raw::c_int, arg2: *const sockaddr, arg3: socklen_t) -> ::std::os::raw::c_int; } extern "C" { - pub fn getpeername( - arg1: ::std::os::raw::c_int, - arg2: *mut sockaddr, - arg3: *mut socklen_t, - ) -> ::std::os::raw::c_int; + pub fn getpeername(arg1: ::std::os::raw::c_int, arg2: *mut sockaddr, arg3: *mut socklen_t) + -> ::std::os::raw::c_int; } extern "C" { - pub fn getsockname( - arg1: ::std::os::raw::c_int, - arg2: *mut sockaddr, - arg3: *mut socklen_t, - ) -> ::std::os::raw::c_int; + pub fn getsockname(arg1: ::std::os::raw::c_int, arg2: *mut sockaddr, arg3: *mut socklen_t) + -> ::std::os::raw::c_int; } extern "C" { pub fn getsockopt( @@ -1775,10 +1615,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn listen( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn listen(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn recv( @@ -1799,11 +1636,7 @@ extern "C" { ) -> isize; } extern "C" { - pub fn recvmsg( - arg1: ::std::os::raw::c_int, - arg2: *mut msghdr, - arg3: ::std::os::raw::c_int, - ) -> isize; + pub fn recvmsg(arg1: ::std::os::raw::c_int, arg2: *mut msghdr, arg3: ::std::os::raw::c_int) -> isize; } extern "C" { pub fn recvmmsg( @@ -1833,11 +1666,7 @@ extern "C" { ) -> isize; } extern "C" { - pub fn sendmsg( - arg1: ::std::os::raw::c_int, - arg2: *const msghdr, - arg3: ::std::os::raw::c_int, - ) -> isize; + pub fn sendmsg(arg1: ::std::os::raw::c_int, arg2: *const msghdr, arg3: ::std::os::raw::c_int) -> isize; } extern "C" { pub fn sendmmsg( @@ -1857,10 +1686,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn shutdown( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn shutdown(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn sockatmark(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; @@ -1889,11 +1715,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn getpeereid( - arg1: ::std::os::raw::c_int, - arg2: *mut uid_t, - arg3: *mut gid_t, - ) -> ::std::os::raw::c_int; + pub fn getpeereid(arg1: ::std::os::raw::c_int, arg2: *mut uid_t, arg3: *mut gid_t) -> ::std::os::raw::c_int; } extern "C" { pub fn getrtable() -> ::std::os::raw::c_int; @@ -1934,12 +1756,7 @@ fn bindgen_test_layout_if_nameindex() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).if_name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(if_nameindex), - "::", - stringify!(if_name) - ) + concat!("Offset of field: ", stringify!(if_nameindex), "::", stringify!(if_name)) ); } extern "C" { @@ -1980,22 +1797,12 @@ fn bindgen_test_layout_timespec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) + concat!("Offset of field: ", stringify!(timespec), "::", stringify!(tv_sec)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) + concat!("Offset of field: ", stringify!(timespec), "::", stringify!(tv_nsec)) ); } pub type __fd_mask = u32; @@ -2021,12 +1828,7 @@ fn bindgen_test_layout_fd_set() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) + concat!("Offset of field: ", stringify!(fd_set), "::", stringify!(fds_bits)) ); } pub type sigset_t = ::std::os::raw::c_uint; @@ -2082,12 +1884,7 @@ fn bindgen_test_layout_timezone() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tz_dsttime) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(timezone), - "::", - stringify!(tz_dsttime) - ) + concat!("Offset of field: ", stringify!(timezone), "::", stringify!(tz_dsttime)) ); } #[repr(C)] @@ -2123,12 +1920,7 @@ fn bindgen_test_layout_itimerval() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerval), - "::", - stringify!(it_value) - ) + concat!("Offset of field: ", stringify!(itimerval), "::", stringify!(it_value)) ); } #[repr(C)] @@ -2156,42 +1948,22 @@ fn bindgen_test_layout_clockinfo() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hz) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(clockinfo), - "::", - stringify!(hz) - ) + concat!("Offset of field: ", stringify!(clockinfo), "::", stringify!(hz)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tick) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(clockinfo), - "::", - stringify!(tick) - ) + concat!("Offset of field: ", stringify!(clockinfo), "::", stringify!(tick)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stathz) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(clockinfo), - "::", - stringify!(stathz) - ) + concat!("Offset of field: ", stringify!(clockinfo), "::", stringify!(stathz)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).profhz) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(clockinfo), - "::", - stringify!(profhz) - ) + concat!("Offset of field: ", stringify!(clockinfo), "::", stringify!(profhz)) ); } #[repr(C)] @@ -2227,12 +1999,7 @@ fn bindgen_test_layout_itimerspec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(itimerspec), - "::", - stringify!(it_value) - ) + concat!("Offset of field: ", stringify!(itimerspec), "::", stringify!(it_value)) ); } pub type locale_t = *mut ::std::os::raw::c_void; @@ -2268,112 +2035,57 @@ fn bindgen_test_layout_tm() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_sec) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_sec)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_min) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_min)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_hour) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_hour)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mday) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_mday)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_mon) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_mon)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_year) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_year)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_wday) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_wday)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_yday) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_yday)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_isdst) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_isdst)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_gmtoff) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_gmtoff)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(tm), - "::", - stringify!(tm_zone) - ) + concat!("Offset of field: ", stringify!(tm), "::", stringify!(tm_zone)) ); } extern "C" { @@ -2422,16 +2134,10 @@ extern "C" { ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn asctime_r( - arg1: *const tm, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn asctime_r(arg1: *const tm, arg2: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn ctime_r( - arg1: *const time_t, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn ctime_r(arg1: *const time_t, arg2: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn gmtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm; @@ -2510,10 +2216,7 @@ extern "C" { pub fn settimeofday(arg1: *const timeval, arg2: *const timezone) -> ::std::os::raw::c_int; } extern "C" { - pub fn utimes( - arg1: *const ::std::os::raw::c_char, - arg2: *const timeval, - ) -> ::std::os::raw::c_int; + pub fn utimes(arg1: *const ::std::os::raw::c_char, arg2: *const timeval) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2603,42 +2306,22 @@ fn bindgen_test_layout_if_rxring() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rxr_alive) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(if_rxring), - "::", - stringify!(rxr_alive) - ) + concat!("Offset of field: ", stringify!(if_rxring), "::", stringify!(rxr_alive)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rxr_cwm) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(if_rxring), - "::", - stringify!(rxr_cwm) - ) + concat!("Offset of field: ", stringify!(if_rxring), "::", stringify!(rxr_cwm)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rxr_lwm) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(if_rxring), - "::", - stringify!(rxr_lwm) - ) + concat!("Offset of field: ", stringify!(if_rxring), "::", stringify!(rxr_lwm)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rxr_hwm) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_rxring), - "::", - stringify!(rxr_hwm) - ) + concat!("Offset of field: ", stringify!(if_rxring), "::", stringify!(rxr_hwm)) ); } #[repr(C)] @@ -2777,32 +2460,17 @@ fn bindgen_test_layout_if_data() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_type) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_type) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_addrlen) as usize - ptr as usize }, 1usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_addrlen) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_addrlen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_hdrlen) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_hdrlen) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_hdrlen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_link_state) as usize - ptr as usize }, @@ -2817,82 +2485,42 @@ fn bindgen_test_layout_if_data() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_mtu) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_mtu) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_mtu)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_metric) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_metric) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_metric)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_rdomain) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_rdomain) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_rdomain)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_baudrate) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_baudrate) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_baudrate)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_ipackets) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_ipackets) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_ipackets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_ierrors) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_ierrors) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_ierrors)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_opackets) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_opackets) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_opackets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_oerrors) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_oerrors) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_oerrors)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_collisions) as usize - ptr as usize }, @@ -2907,72 +2535,37 @@ fn bindgen_test_layout_if_data() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_ibytes) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_ibytes) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_ibytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_obytes) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_obytes) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_obytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_imcasts) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_imcasts) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_imcasts)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_omcasts) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_omcasts) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_omcasts)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_iqdrops) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_iqdrops) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_iqdrops)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_oqdrops) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_oqdrops) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_oqdrops)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_noproto) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(if_data), - "::", - stringify!(ifi_noproto) - ) + concat!("Offset of field: ", stringify!(if_data), "::", stringify!(ifi_noproto)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifi_capabilities) as usize - ptr as usize }, @@ -3004,8 +2597,7 @@ pub struct if_status_description { } #[test] fn bindgen_test_layout_if_status_description() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -3081,12 +2673,7 @@ fn bindgen_test_layout_if_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_msglen) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_msglen) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_msglen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_version) as usize - ptr as usize }, @@ -3101,32 +2688,17 @@ fn bindgen_test_layout_if_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_type) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_type) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_hdrlen) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_hdrlen) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_hdrlen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_index) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_index) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_index)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_tableid) as usize - ptr as usize }, @@ -3141,62 +2713,32 @@ fn bindgen_test_layout_if_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_pad1) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_pad1) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_pad1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_pad2) as usize - ptr as usize }, 11usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_pad2) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_pad2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_addrs) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_addrs) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_addrs)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_flags) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_flags) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_xflags) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_xflags) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_xflags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_data) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(if_msghdr), - "::", - stringify!(ifm_data) - ) + concat!("Offset of field: ", stringify!(if_msghdr), "::", stringify!(ifm_data)) ); } #[repr(C)] @@ -3251,12 +2793,7 @@ fn bindgen_test_layout_ifa_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifam_type) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(ifa_msghdr), - "::", - stringify!(ifam_type) - ) + concat!("Offset of field: ", stringify!(ifa_msghdr), "::", stringify!(ifam_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifam_hdrlen) as usize - ptr as usize }, @@ -3291,22 +2828,12 @@ fn bindgen_test_layout_ifa_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifam_pad1) as usize - ptr as usize }, 10usize, - concat!( - "Offset of field: ", - stringify!(ifa_msghdr), - "::", - stringify!(ifam_pad1) - ) + concat!("Offset of field: ", stringify!(ifa_msghdr), "::", stringify!(ifam_pad1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifam_pad2) as usize - ptr as usize }, 11usize, - concat!( - "Offset of field: ", - stringify!(ifa_msghdr), - "::", - stringify!(ifam_pad2) - ) + concat!("Offset of field: ", stringify!(ifa_msghdr), "::", stringify!(ifam_pad2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifam_addrs) as usize - ptr as usize }, @@ -3670,8 +3197,7 @@ pub union ifg_req__bindgen_ty_1 { } #[test] fn bindgen_test_layout_ifg_req__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -3721,12 +3247,7 @@ fn bindgen_test_layout_ifg_req() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifgrq_ifgrqu) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifg_req), - "::", - stringify!(ifgrq_ifgrqu) - ) + concat!("Offset of field: ", stringify!(ifg_req), "::", stringify!(ifgrq_ifgrqu)) ); } #[repr(C)] @@ -3775,8 +3296,7 @@ pub union ifgroupreq__bindgen_ty_1 { } #[test] fn bindgen_test_layout_ifgroupreq__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -3836,22 +3356,12 @@ fn bindgen_test_layout_ifgroupreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifgr_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifgroupreq), - "::", - stringify!(ifgr_name) - ) + concat!("Offset of field: ", stringify!(ifgroupreq), "::", stringify!(ifgr_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifgr_len) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(ifgroupreq), - "::", - stringify!(ifgr_len) - ) + concat!("Offset of field: ", stringify!(ifgroupreq), "::", stringify!(ifgr_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifgr_ifgru) as usize - ptr as usize }, @@ -4005,22 +3515,12 @@ fn bindgen_test_layout_ifreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifr_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifreq), - "::", - stringify!(ifr_name) - ) + concat!("Offset of field: ", stringify!(ifreq), "::", stringify!(ifr_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifr_ifru) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(ifreq), - "::", - stringify!(ifr_ifru) - ) + concat!("Offset of field: ", stringify!(ifreq), "::", stringify!(ifr_ifru)) ); } #[repr(C)] @@ -4039,8 +3539,7 @@ pub union ifaliasreq__bindgen_ty_1 { } #[test] fn bindgen_test_layout_ifaliasreq__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -4090,12 +3589,7 @@ fn bindgen_test_layout_ifaliasreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifra_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifaliasreq), - "::", - stringify!(ifra_name) - ) + concat!("Offset of field: ", stringify!(ifaliasreq), "::", stringify!(ifra_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifra_ifrau) as usize - ptr as usize }, @@ -4120,12 +3614,7 @@ fn bindgen_test_layout_ifaliasreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifra_mask) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(ifaliasreq), - "::", - stringify!(ifra_mask) - ) + concat!("Offset of field: ", stringify!(ifaliasreq), "::", stringify!(ifra_mask)) ); } #[repr(C)] @@ -4156,12 +3645,7 @@ fn bindgen_test_layout_ifmediareq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifmediareq), - "::", - stringify!(ifm_name) - ) + concat!("Offset of field: ", stringify!(ifmediareq), "::", stringify!(ifm_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_current) as usize - ptr as usize }, @@ -4176,12 +3660,7 @@ fn bindgen_test_layout_ifmediareq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_mask) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(ifmediareq), - "::", - stringify!(ifm_mask) - ) + concat!("Offset of field: ", stringify!(ifmediareq), "::", stringify!(ifm_mask)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_status) as usize - ptr as usize }, @@ -4206,22 +3685,12 @@ fn bindgen_test_layout_ifmediareq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_count) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(ifmediareq), - "::", - stringify!(ifm_count) - ) + concat!("Offset of field: ", stringify!(ifmediareq), "::", stringify!(ifm_count)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifm_ulist) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(ifmediareq), - "::", - stringify!(ifm_ulist) - ) + concat!("Offset of field: ", stringify!(ifmediareq), "::", stringify!(ifm_ulist)) ); } #[repr(C)] @@ -4268,12 +3737,7 @@ fn bindgen_test_layout_ifkalivereq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ikar_cnt) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(ifkalivereq), - "::", - stringify!(ikar_cnt) - ) + concat!("Offset of field: ", stringify!(ifkalivereq), "::", stringify!(ikar_cnt)) ); } #[repr(C)] @@ -4340,22 +3804,12 @@ fn bindgen_test_layout_ifconf() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifc_len) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ifconf), - "::", - stringify!(ifc_len) - ) + concat!("Offset of field: ", stringify!(ifconf), "::", stringify!(ifc_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifc_ifcu) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ifconf), - "::", - stringify!(ifc_ifcu) - ) + concat!("Offset of field: ", stringify!(ifconf), "::", stringify!(ifc_ifcu)) ); } #[repr(C)] @@ -4394,12 +3848,7 @@ fn bindgen_test_layout_if_laddrreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_laddrreq), - "::", - stringify!(flags) - ) + concat!("Offset of field: ", stringify!(if_laddrreq), "::", stringify!(flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prefixlen) as usize - ptr as usize }, @@ -4414,22 +3863,12 @@ fn bindgen_test_layout_if_laddrreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(if_laddrreq), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(if_laddrreq), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstaddr) as usize - ptr as usize }, 280usize, - concat!( - "Offset of field: ", - stringify!(if_laddrreq), - "::", - stringify!(dstaddr) - ) + concat!("Offset of field: ", stringify!(if_laddrreq), "::", stringify!(dstaddr)) ); } #[repr(C)] @@ -4455,22 +3894,12 @@ fn bindgen_test_layout_if_afreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifar_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(if_afreq), - "::", - stringify!(ifar_name) - ) + concat!("Offset of field: ", stringify!(if_afreq), "::", stringify!(ifar_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifar_af) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_afreq), - "::", - stringify!(ifar_af) - ) + concat!("Offset of field: ", stringify!(if_afreq), "::", stringify!(ifar_af)) ); } #[repr(C)] @@ -4496,22 +3925,12 @@ fn bindgen_test_layout_if_parent() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifp_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(if_parent), - "::", - stringify!(ifp_name) - ) + concat!("Offset of field: ", stringify!(if_parent), "::", stringify!(ifp_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifp_parent) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_parent), - "::", - stringify!(ifp_parent) - ) + concat!("Offset of field: ", stringify!(if_parent), "::", stringify!(ifp_parent)) ); } #[repr(C)] @@ -4549,32 +3968,17 @@ fn bindgen_test_layout_if_sffpage() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sff_addr) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(if_sffpage), - "::", - stringify!(sff_addr) - ) + concat!("Offset of field: ", stringify!(if_sffpage), "::", stringify!(sff_addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sff_page) as usize - ptr as usize }, 17usize, - concat!( - "Offset of field: ", - stringify!(if_sffpage), - "::", - stringify!(sff_page) - ) + concat!("Offset of field: ", stringify!(if_sffpage), "::", stringify!(sff_page)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sff_data) as usize - ptr as usize }, 18usize, - concat!( - "Offset of field: ", - stringify!(if_sffpage), - "::", - stringify!(sff_data) - ) + concat!("Offset of field: ", stringify!(if_sffpage), "::", stringify!(sff_data)) ); } #[repr(C)] @@ -4603,52 +4007,27 @@ fn bindgen_test_layout_arphdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ar_hrd) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(arphdr), - "::", - stringify!(ar_hrd) - ) + concat!("Offset of field: ", stringify!(arphdr), "::", stringify!(ar_hrd)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ar_pro) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(arphdr), - "::", - stringify!(ar_pro) - ) + concat!("Offset of field: ", stringify!(arphdr), "::", stringify!(ar_pro)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ar_hln) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(arphdr), - "::", - stringify!(ar_hln) - ) + concat!("Offset of field: ", stringify!(arphdr), "::", stringify!(ar_hln)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ar_pln) as usize - ptr as usize }, 5usize, - concat!( - "Offset of field: ", - stringify!(arphdr), - "::", - stringify!(ar_pln) - ) + concat!("Offset of field: ", stringify!(arphdr), "::", stringify!(ar_pln)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ar_op) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(arphdr), - "::", - stringify!(ar_op) - ) + concat!("Offset of field: ", stringify!(arphdr), "::", stringify!(ar_op)) ); } #[repr(C)] @@ -4675,32 +4054,17 @@ fn bindgen_test_layout_arpreq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arp_pa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(arpreq), - "::", - stringify!(arp_pa) - ) + concat!("Offset of field: ", stringify!(arpreq), "::", stringify!(arp_pa)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arp_ha) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(arpreq), - "::", - stringify!(arp_ha) - ) + concat!("Offset of field: ", stringify!(arpreq), "::", stringify!(arp_ha)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arp_flags) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(arpreq), - "::", - stringify!(arp_flags) - ) + concat!("Offset of field: ", stringify!(arpreq), "::", stringify!(arp_flags)) ); } #[repr(C)] @@ -4732,32 +4096,17 @@ fn bindgen_test_layout_rb_type() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).t_compare) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rb_type), - "::", - stringify!(t_compare) - ) + concat!("Offset of field: ", stringify!(rb_type), "::", stringify!(t_compare)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).t_augment) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(rb_type), - "::", - stringify!(t_augment) - ) + concat!("Offset of field: ", stringify!(rb_type), "::", stringify!(t_augment)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).t_offset) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rb_type), - "::", - stringify!(t_offset) - ) + concat!("Offset of field: ", stringify!(rb_type), "::", stringify!(t_offset)) ); } #[repr(C)] @@ -4782,12 +4131,7 @@ fn bindgen_test_layout_rb_tree() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbt_root) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rb_tree), - "::", - stringify!(rbt_root) - ) + concat!("Offset of field: ", stringify!(rb_tree), "::", stringify!(rbt_root)) ); } #[repr(C)] @@ -4815,42 +4159,22 @@ fn bindgen_test_layout_rb_entry() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbt_parent) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rb_entry), - "::", - stringify!(rbt_parent) - ) + concat!("Offset of field: ", stringify!(rb_entry), "::", stringify!(rbt_parent)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbt_left) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(rb_entry), - "::", - stringify!(rbt_left) - ) + concat!("Offset of field: ", stringify!(rb_entry), "::", stringify!(rbt_left)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbt_right) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rb_entry), - "::", - stringify!(rbt_right) - ) + concat!("Offset of field: ", stringify!(rb_entry), "::", stringify!(rbt_right)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbt_color) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(rb_entry), - "::", - stringify!(rbt_color) - ) + concat!("Offset of field: ", stringify!(rb_entry), "::", stringify!(rbt_color)) ); } extern "C" { @@ -4891,62 +4215,31 @@ extern "C" { pub fn _rb_max(arg1: *const rb_type, arg2: *mut rb_tree) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_next( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + pub fn _rb_next(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_prev( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + pub fn _rb_prev(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_left( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + pub fn _rb_left(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_right( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + pub fn _rb_right(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_parent( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; + pub fn _rb_parent(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn _rb_set_left( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ); + pub fn _rb_set_left(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void, arg3: *mut ::std::os::raw::c_void); } extern "C" { - pub fn _rb_set_right( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ); + pub fn _rb_set_right(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void, arg3: *mut ::std::os::raw::c_void); } extern "C" { - pub fn _rb_set_parent( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ); + pub fn _rb_set_parent(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void, arg3: *mut ::std::os::raw::c_void); } extern "C" { - pub fn _rb_poison( - arg1: *const rb_type, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_ulong, - ); + pub fn _rb_poison(arg1: *const rb_type, arg2: *mut ::std::os::raw::c_void, arg3: ::std::os::raw::c_ulong); } extern "C" { pub fn _rb_check( @@ -4986,22 +4279,12 @@ fn bindgen_test_layout_lock_object() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lo_type) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(lock_object), - "::", - stringify!(lo_type) - ) + concat!("Offset of field: ", stringify!(lock_object), "::", stringify!(lo_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lo_name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(lock_object), - "::", - stringify!(lo_name) - ) + concat!("Offset of field: ", stringify!(lock_object), "::", stringify!(lo_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lo_witness) as usize - ptr as usize }, @@ -5016,12 +4299,7 @@ fn bindgen_test_layout_lock_object() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lo_flags) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(lock_object), - "::", - stringify!(lo_flags) - ) + concat!("Offset of field: ", stringify!(lock_object), "::", stringify!(lo_flags)) ); } #[repr(C)] @@ -5046,12 +4324,7 @@ fn bindgen_test_layout_lock_type() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lt_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(lock_type), - "::", - stringify!(lt_name) - ) + concat!("Offset of field: ", stringify!(lock_type), "::", stringify!(lt_name)) ); } #[repr(C)] @@ -5082,22 +4355,12 @@ fn bindgen_test_layout_rwlock() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rwl_owner) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rwlock), - "::", - stringify!(rwl_owner) - ) + concat!("Offset of field: ", stringify!(rwlock), "::", stringify!(rwl_owner)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rwl_name) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(rwlock), - "::", - stringify!(rwl_name) - ) + concat!("Offset of field: ", stringify!(rwlock), "::", stringify!(rwl_name)) ); } #[repr(C)] @@ -5123,22 +4386,12 @@ fn bindgen_test_layout_rrwlock() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rrwl_lock) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rrwlock), - "::", - stringify!(rrwl_lock) - ) + concat!("Offset of field: ", stringify!(rrwlock), "::", stringify!(rrwl_lock)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rrwl_wcnt) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rrwlock), - "::", - stringify!(rrwl_wcnt) - ) + concat!("Offset of field: ", stringify!(rrwlock), "::", stringify!(rrwl_wcnt)) ); } #[repr(C)] @@ -5164,22 +4417,12 @@ fn bindgen_test_layout_refcnt() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r_refs) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(refcnt), - "::", - stringify!(r_refs) - ) + concat!("Offset of field: ", stringify!(refcnt), "::", stringify!(r_refs)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r_traceidx) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(refcnt), - "::", - stringify!(r_traceidx) - ) + concat!("Offset of field: ", stringify!(refcnt), "::", stringify!(r_traceidx)) ); } #[repr(C)] @@ -5205,22 +4448,12 @@ fn bindgen_test_layout_circq() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(circq), - "::", - stringify!(next) - ) + concat!("Offset of field: ", stringify!(circq), "::", stringify!(next)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(circq), - "::", - stringify!(prev) - ) + concat!("Offset of field: ", stringify!(circq), "::", stringify!(prev)) ); } #[repr(C)] @@ -5252,82 +4485,42 @@ fn bindgen_test_layout_timeout() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_list) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_list) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_list)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_abstime) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_abstime) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_abstime)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_func) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_func) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_func)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_arg) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_arg) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_arg)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_process) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_process) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_process)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_time) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_time) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_time)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_flags) as usize - ptr as usize }, 60usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_flags) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to_kclock) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(timeout), - "::", - stringify!(to_kclock) - ) + concat!("Offset of field: ", stringify!(timeout), "::", stringify!(to_kclock)) ); } #[repr(C)] @@ -5393,12 +4586,7 @@ fn bindgen_test_layout_timeoutstat() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tos_late) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(timeoutstat), - "::", - stringify!(tos_late) - ) + concat!("Offset of field: ", stringify!(timeoutstat), "::", stringify!(tos_late)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tos_pending) as usize - ptr as usize }, @@ -5505,12 +4693,7 @@ fn bindgen_test_layout_in_addr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).s_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(in_addr), - "::", - stringify!(s_addr) - ) + concat!("Offset of field: ", stringify!(in_addr), "::", stringify!(s_addr)) ); } #[repr(C)] @@ -5539,12 +4722,7 @@ fn bindgen_test_layout_sockaddr_in() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin_len) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_in), - "::", - stringify!(sin_len) - ) + concat!("Offset of field: ", stringify!(sockaddr_in), "::", stringify!(sin_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin_family) as usize - ptr as usize }, @@ -5559,32 +4737,17 @@ fn bindgen_test_layout_sockaddr_in() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin_port) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_in), - "::", - stringify!(sin_port) - ) + concat!("Offset of field: ", stringify!(sockaddr_in), "::", stringify!(sin_port)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin_addr) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_in), - "::", - stringify!(sin_addr) - ) + concat!("Offset of field: ", stringify!(sockaddr_in), "::", stringify!(sin_addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin_zero) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(sockaddr_in), - "::", - stringify!(sin_zero) - ) + concat!("Offset of field: ", stringify!(sockaddr_in), "::", stringify!(sin_zero)) ); } #[repr(C)] @@ -5610,22 +4773,12 @@ fn bindgen_test_layout_ip_opts() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip_dst) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(ip_opts), - "::", - stringify!(ip_dst) - ) + concat!("Offset of field: ", stringify!(ip_opts), "::", stringify!(ip_dst)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip_opts) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ip_opts), - "::", - stringify!(ip_opts) - ) + concat!("Offset of field: ", stringify!(ip_opts), "::", stringify!(ip_opts)) ); } #[repr(C)] @@ -5703,22 +4856,12 @@ fn bindgen_test_layout_ip_mreqn() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).imr_address) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(ip_mreqn), - "::", - stringify!(imr_address) - ) + concat!("Offset of field: ", stringify!(ip_mreqn), "::", stringify!(imr_address)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).imr_ifindex) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(ip_mreqn), - "::", - stringify!(imr_ifindex) - ) + concat!("Offset of field: ", stringify!(ip_mreqn), "::", stringify!(imr_ifindex)) ); } #[repr(C)] @@ -5735,8 +4878,7 @@ pub union in6_addr__bindgen_ty_1 { } #[test] fn bindgen_test_layout_in6_addr__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -5796,12 +4938,7 @@ fn bindgen_test_layout_in6_addr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__u6_addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(in6_addr), - "::", - stringify!(__u6_addr) - ) + concat!("Offset of field: ", stringify!(in6_addr), "::", stringify!(__u6_addr)) ); } #[repr(C)] @@ -6019,19 +5156,11 @@ fn bindgen_test_layout_ip6_mtuinfo() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ip6m_mtu) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(ip6_mtuinfo), - "::", - stringify!(ip6m_mtu) - ) + concat!("Offset of field: ", stringify!(ip6_mtuinfo), "::", stringify!(ip6m_mtu)) ); } extern "C" { - pub fn inet6_opt_init( - arg1: *mut ::std::os::raw::c_void, - arg2: socklen_t, - ) -> ::std::os::raw::c_int; + pub fn inet6_opt_init(arg1: *mut ::std::os::raw::c_void, arg2: socklen_t) -> ::std::os::raw::c_int; } extern "C" { pub fn inet6_opt_append( @@ -6099,10 +5228,7 @@ extern "C" { ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn inet6_rth_add( - arg1: *mut ::std::os::raw::c_void, - arg2: *const in6_addr, - ) -> ::std::os::raw::c_int; + pub fn inet6_rth_add(arg1: *mut ::std::os::raw::c_void, arg2: *const in6_addr) -> ::std::os::raw::c_int; } extern "C" { pub fn inet6_rth_reverse( @@ -6114,22 +5240,13 @@ extern "C" { pub fn inet6_rth_segments(arg1: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { - pub fn inet6_rth_getaddr( - arg1: *const ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *mut in6_addr; + pub fn inet6_rth_getaddr(arg1: *const ::std::os::raw::c_void, arg2: ::std::os::raw::c_int) -> *mut in6_addr; } extern "C" { - pub fn bindresvport( - arg1: ::std::os::raw::c_int, - arg2: *mut sockaddr_in, - ) -> ::std::os::raw::c_int; + pub fn bindresvport(arg1: ::std::os::raw::c_int, arg2: *mut sockaddr_in) -> ::std::os::raw::c_int; } extern "C" { - pub fn bindresvport_sa( - arg1: ::std::os::raw::c_int, - arg2: *mut sockaddr, - ) -> ::std::os::raw::c_int; + pub fn bindresvport_sa(arg1: ::std::os::raw::c_int, arg2: *mut sockaddr) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Copy, Clone)] @@ -6156,24 +5273,17 @@ pub struct radix_node__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_radix_node__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!( - "Size of: ", - stringify!(radix_node__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Size of: ", stringify!(radix_node__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(radix_node__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(radix_node__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_Key) as usize - ptr as usize }, @@ -6215,24 +5325,17 @@ pub struct radix_node__bindgen_ty_1__bindgen_ty_2 { } #[test] fn bindgen_test_layout_radix_node__bindgen_ty_1__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!( - "Size of: ", - stringify!(radix_node__bindgen_ty_1__bindgen_ty_2) - ) + concat!("Size of: ", stringify!(radix_node__bindgen_ty_1__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(radix_node__bindgen_ty_1__bindgen_ty_2) - ) + concat!("Alignment of ", stringify!(radix_node__bindgen_ty_1__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_Off) as usize - ptr as usize }, @@ -6267,8 +5370,7 @@ fn bindgen_test_layout_radix_node__bindgen_ty_1__bindgen_ty_2() { } #[test] fn bindgen_test_layout_radix_node__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -6318,62 +5420,32 @@ fn bindgen_test_layout_radix_node() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_mklist) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_mklist) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_mklist)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_p) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_p) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_p)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_b) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_b) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_b)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_bmask) as usize - ptr as usize }, 18usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_bmask) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_bmask)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_flags) as usize - ptr as usize }, 19usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_flags) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rn_u) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(radix_node), - "::", - stringify!(rn_u) - ) + concat!("Offset of field: ", stringify!(radix_node), "::", stringify!(rn_u)) ); } #[repr(C)] @@ -6394,8 +5466,7 @@ pub union radix_mask__bindgen_ty_1 { } #[test] fn bindgen_test_layout_radix_mask__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -6445,62 +5516,32 @@ fn bindgen_test_layout_radix_mask() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_b) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_b) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_b)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_unused) as usize - ptr as usize }, 2usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_unused) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_unused)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_flags) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_flags) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_mklist) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_mklist) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_mklist)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_rmu) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_rmu) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_rmu)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rm_refs) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(radix_mask), - "::", - stringify!(rm_refs) - ) + concat!("Offset of field: ", stringify!(radix_mask), "::", stringify!(rm_refs)) ); } #[repr(C)] @@ -6581,10 +5622,7 @@ extern "C" { pub fn rn_init(arg1: ::std::os::raw::c_uint); } extern "C" { - pub fn rn_inithead( - arg1: *mut *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn rn_inithead(arg1: *mut *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { pub fn rn_walktree( @@ -6624,10 +5662,7 @@ extern "C" { ) -> *mut radix_node; } extern "C" { - pub fn rn_match( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut radix_node_head, - ) -> *mut radix_node; + pub fn rn_match(arg1: *mut ::std::os::raw::c_void, arg2: *mut radix_node_head) -> *mut radix_node; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6682,22 +5717,12 @@ fn bindgen_test_layout_rt_metrics() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_locks) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rt_metrics), - "::", - stringify!(rmx_locks) - ) + concat!("Offset of field: ", stringify!(rt_metrics), "::", stringify!(rmx_locks)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_mtu) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(rt_metrics), - "::", - stringify!(rmx_mtu) - ) + concat!("Offset of field: ", stringify!(rt_metrics), "::", stringify!(rmx_mtu)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_refcnt) as usize - ptr as usize }, @@ -6752,12 +5777,7 @@ fn bindgen_test_layout_rt_metrics() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_rtt) as usize - ptr as usize }, 44usize, - concat!( - "Offset of field: ", - stringify!(rt_metrics), - "::", - stringify!(rmx_rtt) - ) + concat!("Offset of field: ", stringify!(rt_metrics), "::", stringify!(rmx_rtt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_rttvar) as usize - ptr as usize }, @@ -6772,12 +5792,7 @@ fn bindgen_test_layout_rt_metrics() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rmx_pad) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(rt_metrics), - "::", - stringify!(rmx_pad) - ) + concat!("Offset of field: ", stringify!(rt_metrics), "::", stringify!(rmx_pad)) ); } #[repr(C)] @@ -6816,12 +5831,7 @@ fn bindgen_test_layout_rtstat() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rts_dynamic) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(rtstat), - "::", - stringify!(rts_dynamic) - ) + concat!("Offset of field: ", stringify!(rtstat), "::", stringify!(rts_dynamic)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rts_newgateway) as usize - ptr as usize }, @@ -6836,22 +5846,12 @@ fn bindgen_test_layout_rtstat() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rts_unreach) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(rtstat), - "::", - stringify!(rts_unreach) - ) + concat!("Offset of field: ", stringify!(rtstat), "::", stringify!(rts_unreach)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rts_wildcard) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rtstat), - "::", - stringify!(rts_wildcard) - ) + concat!("Offset of field: ", stringify!(rtstat), "::", stringify!(rts_wildcard)) ); } #[repr(C)] @@ -6932,12 +5932,7 @@ fn bindgen_test_layout_rt_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_msglen) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_msglen) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_msglen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_version) as usize - ptr as usize }, @@ -6952,32 +5947,17 @@ fn bindgen_test_layout_rt_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_type) as usize - ptr as usize }, 3usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_type) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_hdrlen) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_hdrlen) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_hdrlen)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_index) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_index) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_index)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_tableid) as usize - ptr as usize }, @@ -7002,92 +5982,47 @@ fn bindgen_test_layout_rt_msghdr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_mpls) as usize - ptr as usize }, 11usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_mpls) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_mpls)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_addrs) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_addrs) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_addrs)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_flags) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_flags) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_fmask) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_fmask) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_fmask)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_pid) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_pid) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_pid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_seq) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_seq) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_seq)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_errno) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_errno) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_errno)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_inits) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_inits) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_inits)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtm_rmx) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(rt_msghdr), - "::", - stringify!(rtm_rmx) - ) + concat!("Offset of field: ", stringify!(rt_msghdr), "::", stringify!(rtm_rmx)) ); } #[repr(C)] @@ -7335,12 +6270,7 @@ fn bindgen_test_layout_rt_addrinfo() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rti_info) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(rt_addrinfo), - "::", - stringify!(rti_info) - ) + concat!("Offset of field: ", stringify!(rt_addrinfo), "::", stringify!(rti_info)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rti_flags) as usize - ptr as usize }, @@ -7355,32 +6285,17 @@ fn bindgen_test_layout_rt_addrinfo() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rti_ifa) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(rt_addrinfo), - "::", - stringify!(rti_ifa) - ) + concat!("Offset of field: ", stringify!(rt_addrinfo), "::", stringify!(rti_ifa)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rti_rtm) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(rt_addrinfo), - "::", - stringify!(rti_rtm) - ) + concat!("Offset of field: ", stringify!(rt_addrinfo), "::", stringify!(rti_rtm)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rti_mpls) as usize - ptr as usize }, 152usize, - concat!( - "Offset of field: ", - stringify!(rt_addrinfo), - "::", - stringify!(rti_mpls) - ) + concat!("Offset of field: ", stringify!(rt_addrinfo), "::", stringify!(rti_mpls)) ); } #[repr(C)] @@ -7502,32 +6417,17 @@ fn bindgen_test_layout_route() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ro_rt) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(route), - "::", - stringify!(ro_rt) - ) + concat!("Offset of field: ", stringify!(route), "::", stringify!(ro_rt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ro_generation) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(route), - "::", - stringify!(ro_generation) - ) + concat!("Offset of field: ", stringify!(route), "::", stringify!(ro_generation)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ro_tableid) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(route), - "::", - stringify!(ro_tableid) - ) + concat!("Offset of field: ", stringify!(route), "::", stringify!(ro_tableid)) ); } #[repr(C)] @@ -7671,8 +6571,7 @@ pub union pf_addr__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_addr__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -7752,12 +6651,7 @@ fn bindgen_test_layout_pf_addr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_addr), - "::", - stringify!(pfa) - ) + concat!("Offset of field: ", stringify!(pf_addr), "::", stringify!(pfa)) ); } #[repr(C)] @@ -7785,24 +6679,17 @@ pub struct pf_addr_wrap__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_addr_wrap__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, - concat!( - "Size of: ", - stringify!(pf_addr_wrap__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Size of: ", stringify!(pf_addr_wrap__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!( - "Alignment of ", - stringify!(pf_addr_wrap__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(pf_addr_wrap__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, @@ -7827,8 +6714,7 @@ fn bindgen_test_layout_pf_addr_wrap__bindgen_ty_1__bindgen_ty_1() { } #[test] fn bindgen_test_layout_pf_addr_wrap__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -7901,8 +6787,7 @@ pub union pf_addr_wrap__bindgen_ty_2 { } #[test] fn bindgen_test_layout_pf_addr_wrap__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -7972,42 +6857,22 @@ fn bindgen_test_layout_pf_addr_wrap() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_addr_wrap), - "::", - stringify!(v) - ) + concat!("Offset of field: ", stringify!(pf_addr_wrap), "::", stringify!(v)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pf_addr_wrap), - "::", - stringify!(p) - ) + concat!("Offset of field: ", stringify!(pf_addr_wrap), "::", stringify!(p)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(pf_addr_wrap), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(pf_addr_wrap), "::", stringify!(type_)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).iflags) as usize - ptr as usize }, 41usize, - concat!( - "Offset of field: ", - stringify!(pf_addr_wrap), - "::", - stringify!(iflags) - ) + concat!("Offset of field: ", stringify!(pf_addr_wrap), "::", stringify!(iflags)) ); } #[repr(C)] @@ -8033,22 +6898,12 @@ fn bindgen_test_layout_pf_rule_uid() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_uid), - "::", - stringify!(uid) - ) + concat!("Offset of field: ", stringify!(pf_rule_uid), "::", stringify!(uid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_uid), - "::", - stringify!(op) - ) + concat!("Offset of field: ", stringify!(pf_rule_uid), "::", stringify!(op)) ); } #[repr(C)] @@ -8074,22 +6929,12 @@ fn bindgen_test_layout_pf_rule_gid() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_gid), - "::", - stringify!(gid) - ) + concat!("Offset of field: ", stringify!(pf_rule_gid), "::", stringify!(gid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_gid), - "::", - stringify!(op) - ) + concat!("Offset of field: ", stringify!(pf_rule_gid), "::", stringify!(op)) ); } #[repr(C)] @@ -8118,52 +6963,27 @@ fn bindgen_test_layout_pf_rule_addr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_addr), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(pf_rule_addr), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_addr), - "::", - stringify!(port) - ) + concat!("Offset of field: ", stringify!(pf_rule_addr), "::", stringify!(port)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).neg) as usize - ptr as usize }, 52usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_addr), - "::", - stringify!(neg) - ) + concat!("Offset of field: ", stringify!(pf_rule_addr), "::", stringify!(neg)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).port_op) as usize - ptr as usize }, 53usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_addr), - "::", - stringify!(port_op) - ) + concat!("Offset of field: ", stringify!(pf_rule_addr), "::", stringify!(port_op)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).weight) as usize - ptr as usize }, 54usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_addr), - "::", - stringify!(weight) - ) + concat!("Offset of field: ", stringify!(pf_rule_addr), "::", stringify!(weight)) ); } #[repr(C)] @@ -8191,42 +7011,22 @@ fn bindgen_test_layout_pf_threshold() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_threshold), - "::", - stringify!(limit) - ) + concat!("Offset of field: ", stringify!(pf_threshold), "::", stringify!(limit)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seconds) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pf_threshold), - "::", - stringify!(seconds) - ) + concat!("Offset of field: ", stringify!(pf_threshold), "::", stringify!(seconds)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_threshold), - "::", - stringify!(count) - ) + concat!("Offset of field: ", stringify!(pf_threshold), "::", stringify!(count)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).last) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(pf_threshold), - "::", - stringify!(last) - ) + concat!("Offset of field: ", stringify!(pf_threshold), "::", stringify!(last)) ); } #[repr(C)] @@ -8243,8 +7043,7 @@ pub union pf_poolhashkey__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_poolhashkey__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -8304,12 +7103,7 @@ fn bindgen_test_layout_pf_poolhashkey() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfk) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_poolhashkey), - "::", - stringify!(pfk) - ) + concat!("Offset of field: ", stringify!(pf_poolhashkey), "::", stringify!(pfk)) ); } #[repr(C)] @@ -8345,122 +7139,62 @@ fn bindgen_test_layout_pf_pool() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(key) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(key)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).counter) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(counter) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(counter)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(ifname) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tblidx) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(tblidx) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(tblidx)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(states) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).curweight) as usize - ptr as usize }, 120usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(curweight) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(curweight)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).weight) as usize - ptr as usize }, 124usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(weight) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(weight)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).proxy_port) as usize - ptr as usize }, 126usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(proxy_port) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(proxy_port)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).port_op) as usize - ptr as usize }, 130usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(port_op) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(port_op)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).opts) as usize - ptr as usize }, 131usize, - concat!( - "Offset of field: ", - stringify!(pf_pool), - "::", - stringify!(opts) - ) + concat!("Offset of field: ", stringify!(pf_pool), "::", stringify!(opts)) ); } pub type pf_osfp_t = u_int32_t; @@ -8481,8 +7215,7 @@ pub struct pf_osfp_entry__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_osfp_entry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -8532,12 +7265,7 @@ fn bindgen_test_layout_pf_osfp_entry() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_os) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_osfp_entry), - "::", - stringify!(fp_os) - ) + concat!("Offset of field: ", stringify!(pf_osfp_entry), "::", stringify!(fp_os)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_enflags) as usize - ptr as usize }, @@ -8602,8 +7330,7 @@ pub struct pf_os_fingerprint_pf_osfp_enlist { } #[test] fn bindgen_test_layout_pf_os_fingerprint_pf_osfp_enlist() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -8613,10 +7340,7 @@ fn bindgen_test_layout_pf_os_fingerprint_pf_osfp_enlist() { assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(pf_os_fingerprint_pf_osfp_enlist) - ) + concat!("Alignment of ", stringify!(pf_os_fingerprint_pf_osfp_enlist)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).slh_first) as usize - ptr as usize }, @@ -8636,8 +7360,7 @@ pub struct pf_os_fingerprint__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_os_fingerprint__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -8806,12 +7529,7 @@ fn bindgen_test_layout_pf_osfp_ioctl() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_os) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_osfp_ioctl), - "::", - stringify!(fp_os) - ) + concat!("Offset of field: ", stringify!(pf_osfp_ioctl), "::", stringify!(fp_os)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_tcpopts) as usize - ptr as usize }, @@ -8846,12 +7564,7 @@ fn bindgen_test_layout_pf_osfp_ioctl() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_mss) as usize - ptr as usize }, 124usize, - concat!( - "Offset of field: ", - stringify!(pf_osfp_ioctl), - "::", - stringify!(fp_mss) - ) + concat!("Offset of field: ", stringify!(pf_osfp_ioctl), "::", stringify!(fp_mss)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_flags) as usize - ptr as usize }, @@ -8886,12 +7599,7 @@ fn bindgen_test_layout_pf_osfp_ioctl() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_ttl) as usize - ptr as usize }, 130usize, - concat!( - "Offset of field: ", - stringify!(pf_osfp_ioctl), - "::", - stringify!(fp_ttl) - ) + concat!("Offset of field: ", stringify!(pf_osfp_ioctl), "::", stringify!(fp_ttl)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fp_getnum) as usize - ptr as usize }, @@ -8946,22 +7654,12 @@ fn bindgen_test_layout_pf_rule_actions() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qid) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_actions), - "::", - stringify!(qid) - ) + concat!("Offset of field: ", stringify!(pf_rule_actions), "::", stringify!(qid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pqid) as usize - ptr as usize }, 6usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_actions), - "::", - stringify!(pqid) - ) + concat!("Offset of field: ", stringify!(pf_rule_actions), "::", stringify!(pqid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_mss) as usize - ptr as usize }, @@ -8996,12 +7694,7 @@ fn bindgen_test_layout_pf_rule_actions() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).log) as usize - ptr as usize }, 14usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_actions), - "::", - stringify!(log) - ) + concat!("Offset of field: ", stringify!(pf_rule_actions), "::", stringify!(log)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tos) as usize - ptr as usize }, @@ -9036,12 +7729,7 @@ fn bindgen_test_layout_pf_rule_actions() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 19usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_actions), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_rule_actions), "::", stringify!(pad)) ); } #[repr(C)] @@ -9067,22 +7755,12 @@ fn bindgen_test_layout_pf_rule_ptr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_ptr), - "::", - stringify!(ptr) - ) + concat!("Offset of field: ", stringify!(pf_rule_ptr), "::", stringify!(ptr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_ptr), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pf_rule_ptr), "::", stringify!(nr)) ); } #[repr(C)] @@ -9178,8 +7856,7 @@ pub struct pf_rule__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_rule__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -9220,8 +7897,7 @@ pub struct pf_rule__bindgen_ty_2 { } #[test] fn bindgen_test_layout_pf_rule__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -9263,8 +7939,7 @@ pub struct pf_rule__bindgen_ty_3 { } #[test] fn bindgen_test_layout_pf_rule__bindgen_ty_3() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -9324,92 +7999,47 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).src) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(src) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(src)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, 56usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(dst) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(dst)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(skip) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(skip)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).label) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(label) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(label)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, 248usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(ifname) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rcv_ifname) as usize - ptr as usize }, 264usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rcv_ifname) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rcv_ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qname) as usize - ptr as usize }, 280usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(qname) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(qname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pqname) as usize - ptr as usize }, 344usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(pqname) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(pqname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tagname) as usize - ptr as usize }, 408usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(tagname) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(tagname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_tagname) as usize - ptr as usize }, @@ -9434,122 +8064,62 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, 568usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(entries) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(entries)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nat) as usize - ptr as usize }, 584usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(nat) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(nat)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdr) as usize - ptr as usize }, 720usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rdr) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rdr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).route) as usize - ptr as usize }, 856usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(route) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(route)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pktrate) as usize - ptr as usize }, 992usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(pktrate) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(pktrate)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).evaluations) as usize - ptr as usize }, 1008usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(evaluations) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(evaluations)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).packets) as usize - ptr as usize }, 1016usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(packets) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(packets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, 1032usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(bytes) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(bytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 1048usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rcv_kif) as usize - ptr as usize }, 1056usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rcv_kif) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rcv_kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor) as usize - ptr as usize }, 1064usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(anchor) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(anchor)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).overload_tbl) as usize - ptr as usize }, 1072usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(overload_tbl) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(overload_tbl)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).os_fingerprint) as usize - ptr as usize }, @@ -9564,72 +8134,37 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtableid) as usize - ptr as usize }, 1084usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rtableid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rtableid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).onrdomain) as usize - ptr as usize }, 1088usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(onrdomain) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(onrdomain)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 1092usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(timeout) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(timeout)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states_cur) as usize - ptr as usize }, 1172usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(states_cur) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(states_cur)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states_tot) as usize - ptr as usize }, 1176usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(states_tot) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(states_tot)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_states) as usize - ptr as usize }, 1180usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(max_states) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(max_states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).src_nodes) as usize - ptr as usize }, 1184usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(src_nodes) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(src_nodes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_src_nodes) as usize - ptr as usize }, @@ -9654,12 +8189,7 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_src_conn) as usize - ptr as usize }, 1196usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(max_src_conn) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(max_src_conn)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_src_conn_rate) as usize - ptr as usize }, @@ -9674,232 +8204,117 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qid) as usize - ptr as usize }, 1208usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(qid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(qid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pqid) as usize - ptr as usize }, 1212usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(pqid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(pqid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rt_listid) as usize - ptr as usize }, 1216usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rt_listid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rt_listid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 1220usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(nr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prob) as usize - ptr as usize }, 1224usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(prob) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(prob)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cuid) as usize - ptr as usize }, 1228usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(cuid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(cuid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cpid) as usize - ptr as usize }, 1232usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(cpid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(cpid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).return_icmp) as usize - ptr as usize }, 1236usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(return_icmp) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(return_icmp)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).return_icmp6) as usize - ptr as usize }, 1238usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(return_icmp6) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(return_icmp6)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_mss) as usize - ptr as usize }, 1240usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(max_mss) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(max_mss)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 1242usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(tag) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(tag)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_tag) as usize - ptr as usize }, 1244usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(match_tag) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(match_tag)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scrub_flags) as usize - ptr as usize }, 1246usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(scrub_flags) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(scrub_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).delay) as usize - ptr as usize }, 1248usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(delay) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(delay)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 1252usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(uid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(uid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gid) as usize - ptr as usize }, 1264usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(gid) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(gid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule_flag) as usize - ptr as usize }, 1276usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rule_flag) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rule_flag)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 1280usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(action) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(action)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize }, 1281usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(direction) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(direction)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).log) as usize - ptr as usize }, 1282usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(log) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(log)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).logif) as usize - ptr as usize }, 1283usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(logif) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(logif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).quick) as usize - ptr as usize }, 1284usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(quick) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(quick)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifnot) as usize - ptr as usize }, 1285usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(ifnot) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(ifnot)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_tag_not) as usize - ptr as usize }, @@ -9914,132 +8329,67 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keep_state) as usize - ptr as usize }, 1287usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(keep_state) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(keep_state)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 1288usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).proto) as usize - ptr as usize }, 1289usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(proto) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(proto)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 1290usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(type_)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, 1292usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(code) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(code)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 1294usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(flags) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flagset) as usize - ptr as usize }, 1295usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(flagset) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(flagset)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).min_ttl) as usize - ptr as usize }, 1296usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(min_ttl) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(min_ttl)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).allow_opts) as usize - ptr as usize }, 1297usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(allow_opts) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(allow_opts)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rt) as usize - ptr as usize }, 1298usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rt) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).return_ttl) as usize - ptr as usize }, 1299usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(return_ttl) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(return_ttl)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tos) as usize - ptr as usize }, 1300usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(tos) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(tos)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tos) as usize - ptr as usize }, 1301usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(set_tos) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(set_tos)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor_relative) as usize - ptr as usize }, @@ -10064,72 +8414,37 @@ fn bindgen_test_layout_pf_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, 1304usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(flush) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(flush)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).prio) as usize - ptr as usize }, 1305usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(prio) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(prio)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_prio) as usize - ptr as usize }, 1306usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(set_prio) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(set_prio)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).naf) as usize - ptr as usize }, 1308usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(naf) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(naf)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rcvifnot) as usize - ptr as usize }, 1309usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(rcvifnot) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(rcvifnot)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).divert) as usize - ptr as usize }, 1312usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(divert) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(divert)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).exptime) as usize - ptr as usize }, 1336usize, - concat!( - "Offset of field: ", - stringify!(pf_rule), - "::", - stringify!(exptime) - ) + concat!("Offset of field: ", stringify!(pf_rule), "::", stringify!(exptime)) ); } #[repr(C)] @@ -10145,8 +8460,7 @@ pub struct pf_rule_item__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_rule_item__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -10186,22 +8500,12 @@ fn bindgen_test_layout_pf_rule_item() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_item), - "::", - stringify!(entry) - ) + concat!("Offset of field: ", stringify!(pf_rule_item), "::", stringify!(entry)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_rule_item), - "::", - stringify!(r) - ) + concat!("Offset of field: ", stringify!(pf_rule_item), "::", stringify!(r)) ); } #[repr(C)] @@ -10269,8 +8573,7 @@ pub struct pf_src_node__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_src_node__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -10340,92 +8643,47 @@ fn bindgen_test_layout_pf_src_node() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(entry) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(entry)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).raddr) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(raddr) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(raddr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(rule) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(rule)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(bytes) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(bytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).packets) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(packets) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(packets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(states) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).conn) as usize - ptr as usize }, 116usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(conn) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(conn)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).conn_rate) as usize - ptr as usize }, @@ -10440,52 +8698,27 @@ fn bindgen_test_layout_pf_src_node() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creation) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(creation) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(creation)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expire) as usize - ptr as usize }, 140usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(expire) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(expire)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).naf) as usize - ptr as usize }, 145usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(naf) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(naf)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 146usize, - concat!( - "Offset of field: ", - stringify!(pf_src_node), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(pf_src_node), "::", stringify!(type_)) ); } #[repr(C)] @@ -10501,8 +8734,7 @@ pub struct pf_sn_item__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_sn_item__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -10542,22 +8774,12 @@ fn bindgen_test_layout_pf_sn_item() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_sn_item), - "::", - stringify!(next) - ) + concat!("Offset of field: ", stringify!(pf_sn_item), "::", stringify!(next)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sn) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_sn_item), - "::", - stringify!(sn) - ) + concat!("Offset of field: ", stringify!(pf_sn_item), "::", stringify!(sn)) ); } #[repr(C)] @@ -10582,12 +8804,7 @@ fn bindgen_test_layout_pf_sn_head() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).slh_first) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_sn_head), - "::", - stringify!(slh_first) - ) + concat!("Offset of field: ", stringify!(pf_sn_head), "::", stringify!(slh_first)) ); } #[repr(C)] @@ -10679,12 +8896,7 @@ fn bindgen_test_layout_pf_state_scrub() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 31usize, - concat!( - "Offset of field: ", - stringify!(pf_state_scrub), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_state_scrub), "::", stringify!(pad)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfss_ts_mod) as usize - ptr as usize }, @@ -10721,32 +8933,17 @@ fn bindgen_test_layout_pf_state_host() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_state_host), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(pf_state_host), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pf_state_host), - "::", - stringify!(port) - ) + concat!("Offset of field: ", stringify!(pf_state_host), "::", stringify!(port)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 18usize, - concat!( - "Offset of field: ", - stringify!(pf_state_host), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_state_host), "::", stringify!(pad)) ); } #[repr(C)] @@ -10780,32 +8977,17 @@ fn bindgen_test_layout_pf_state_peer() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scrub) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(scrub) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(scrub)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seqlo) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(seqlo) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(seqlo)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seqhi) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(seqhi) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(seqhi)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seqdiff) as usize - ptr as usize }, @@ -10830,32 +9012,17 @@ fn bindgen_test_layout_pf_state_peer() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mss) as usize - ptr as usize }, 22usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(mss) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(mss)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(state) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(state)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).wscale) as usize - ptr as usize }, 25usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(wscale) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(wscale)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tcp_est) as usize - ptr as usize }, @@ -10870,12 +9037,7 @@ fn bindgen_test_layout_pf_state_peer() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 27usize, - concat!( - "Offset of field: ", - stringify!(pf_state_peer), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_state_peer), "::", stringify!(pad)) ); } #[repr(C)] @@ -10986,12 +9148,7 @@ fn bindgen_test_layout_pf_state_key_cmp() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(pf_state_key_cmp), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pf_state_key_cmp), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).proto) as usize - ptr as usize }, @@ -11029,12 +9186,7 @@ fn bindgen_test_layout_pf_state_cmp() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_state_cmp), - "::", - stringify!(id) - ) + concat!("Offset of field: ", stringify!(pf_state_cmp), "::", stringify!(id)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creatorid) as usize - ptr as usize }, @@ -11059,12 +9211,7 @@ fn bindgen_test_layout_pf_state_cmp() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 13usize, - concat!( - "Offset of field: ", - stringify!(pf_state_cmp), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_state_cmp), "::", stringify!(pad)) ); } #[repr(C, packed)] @@ -11304,22 +9451,12 @@ fn bindgen_test_layout_pfsync_state_key() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 38usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state_key), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pfsync_state_key), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 39usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state_key), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pfsync_state_key), "::", stringify!(pad)) ); } #[repr(C, packed)] @@ -11371,82 +9508,42 @@ fn bindgen_test_layout_pfsync_state() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(id) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(id)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(ifname) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(key) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(key)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).src) as usize - ptr as usize }, 104usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(src) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(src)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(dst) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(dst)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rt_addr) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(rt_addr) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(rt_addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(rule) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(rule)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor) as usize - ptr as usize }, 188usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(anchor) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(anchor)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nat_rule) as usize - ptr as usize }, @@ -11471,32 +9568,17 @@ fn bindgen_test_layout_pfsync_state() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).expire) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(expire) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(expire)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).packets) as usize - ptr as usize }, 204usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(packets) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(packets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, 220usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(bytes) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(bytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).creatorid) as usize - ptr as usize }, @@ -11520,33 +9602,18 @@ fn bindgen_test_layout_pfsync_state() { ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_mss) as usize - ptr as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(max_mss) - ) + 248usize, + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(max_mss)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 250usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).proto) as usize - ptr as usize }, 251usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(proto) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(proto)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize }, @@ -11561,32 +9628,17 @@ fn bindgen_test_layout_pfsync_state() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).log) as usize - ptr as usize }, 253usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(log) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(log)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rt) as usize - ptr as usize }, 254usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(rt) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(rt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 255usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(timeout) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(timeout)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sync_flags) as usize - ptr as usize }, @@ -11601,32 +9653,17 @@ fn bindgen_test_layout_pfsync_state() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).updates) as usize - ptr as usize }, 257usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(updates) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(updates)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).min_ttl) as usize - ptr as usize }, 258usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(min_ttl) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(min_ttl)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).set_tos) as usize - ptr as usize }, 259usize, - concat!( - "Offset of field: ", - stringify!(pfsync_state), - "::", - stringify!(set_tos) - ) + concat!("Offset of field: ", stringify!(pfsync_state), "::", stringify!(set_tos)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state_flags) as usize - ptr as usize }, @@ -11716,24 +9753,17 @@ pub struct pf_ruleset__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_ruleset__bindgen_ty_1__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!( - "Size of: ", - stringify!(pf_ruleset__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Size of: ", stringify!(pf_ruleset__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(pf_ruleset__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Alignment of ", stringify!(pf_ruleset__bindgen_ty_1__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, @@ -11778,8 +9808,7 @@ fn bindgen_test_layout_pf_ruleset__bindgen_ty_1__bindgen_ty_1() { } #[test] fn bindgen_test_layout_pf_ruleset__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -11839,52 +9868,27 @@ fn bindgen_test_layout_pf_ruleset() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rules) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_ruleset), - "::", - stringify!(rules) - ) + concat!("Offset of field: ", stringify!(pf_ruleset), "::", stringify!(rules)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_ruleset), - "::", - stringify!(anchor) - ) + concat!("Offset of field: ", stringify!(pf_ruleset), "::", stringify!(anchor)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tticket) as usize - ptr as usize }, 88usize, - concat!( - "Offset of field: ", - stringify!(pf_ruleset), - "::", - stringify!(tticket) - ) + concat!("Offset of field: ", stringify!(pf_ruleset), "::", stringify!(tticket)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tables) as usize - ptr as usize }, 92usize, - concat!( - "Offset of field: ", - stringify!(pf_ruleset), - "::", - stringify!(tables) - ) + concat!("Offset of field: ", stringify!(pf_ruleset), "::", stringify!(tables)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).topen) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(pf_ruleset), - "::", - stringify!(topen) - ) + concat!("Offset of field: ", stringify!(pf_ruleset), "::", stringify!(topen)) ); } #[repr(C)] @@ -11971,8 +9975,7 @@ pub struct pf_anchor__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_anchor__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -12035,8 +10038,7 @@ pub struct pf_anchor__bindgen_ty_2 { } #[test] fn bindgen_test_layout_pf_anchor__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -12116,127 +10118,66 @@ fn bindgen_test_layout_pf_anchor() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entry_node) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(entry_node) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(entry_node)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(parent) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(parent)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).children) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(children) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(children)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(name) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(path) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(path)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ruleset) as usize - ptr as usize }, 1168usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(ruleset) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(ruleset)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).refcnt) as usize - ptr as usize }, 1272usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(refcnt) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(refcnt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).match_) as usize - ptr as usize }, 1276usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(match_) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(match_)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ref_) as usize - ptr as usize }, 1280usize, - concat!( - "Offset of field: ", - stringify!(pf_anchor), - "::", - stringify!(ref_) - ) + concat!("Offset of field: ", stringify!(pf_anchor), "::", stringify!(ref_)) ); } extern "C" { pub fn pf_anchor_global_RB_INSERT_COLOR(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor); } extern "C" { - pub fn pf_anchor_global_RB_REMOVE_COLOR( - arg1: *mut pf_anchor_global, - arg2: *mut pf_anchor, - arg3: *mut pf_anchor, - ); + pub fn pf_anchor_global_RB_REMOVE_COLOR(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor, arg3: *mut pf_anchor); } extern "C" { - pub fn pf_anchor_global_RB_REMOVE( - arg1: *mut pf_anchor_global, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_global_RB_REMOVE(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_global_RB_INSERT( - arg1: *mut pf_anchor_global, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_global_RB_INSERT(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_global_RB_FIND( - arg1: *mut pf_anchor_global, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_global_RB_FIND(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_global_RB_NFIND( - arg1: *mut pf_anchor_global, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_global_RB_NFIND(arg1: *mut pf_anchor_global, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { pub fn pf_anchor_global_RB_NEXT(arg1: *mut pf_anchor) -> *mut pf_anchor; @@ -12245,44 +10186,25 @@ extern "C" { pub fn pf_anchor_global_RB_PREV(arg1: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_global_RB_MINMAX( - arg1: *mut pf_anchor_global, - arg2: ::std::os::raw::c_int, - ) -> *mut pf_anchor; + pub fn pf_anchor_global_RB_MINMAX(arg1: *mut pf_anchor_global, arg2: ::std::os::raw::c_int) -> *mut pf_anchor; } extern "C" { pub fn pf_anchor_node_RB_INSERT_COLOR(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor); } extern "C" { - pub fn pf_anchor_node_RB_REMOVE_COLOR( - arg1: *mut pf_anchor_node, - arg2: *mut pf_anchor, - arg3: *mut pf_anchor, - ); + pub fn pf_anchor_node_RB_REMOVE_COLOR(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor, arg3: *mut pf_anchor); } extern "C" { - pub fn pf_anchor_node_RB_REMOVE( - arg1: *mut pf_anchor_node, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_node_RB_REMOVE(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_node_RB_INSERT( - arg1: *mut pf_anchor_node, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_node_RB_INSERT(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_node_RB_FIND( - arg1: *mut pf_anchor_node, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_node_RB_FIND(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_node_RB_NFIND( - arg1: *mut pf_anchor_node, - arg2: *mut pf_anchor, - ) -> *mut pf_anchor; + pub fn pf_anchor_node_RB_NFIND(arg1: *mut pf_anchor_node, arg2: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { pub fn pf_anchor_node_RB_NEXT(arg1: *mut pf_anchor) -> *mut pf_anchor; @@ -12291,10 +10213,7 @@ extern "C" { pub fn pf_anchor_node_RB_PREV(arg1: *mut pf_anchor) -> *mut pf_anchor; } extern "C" { - pub fn pf_anchor_node_RB_MINMAX( - arg1: *mut pf_anchor_node, - arg2: ::std::os::raw::c_int, - ) -> *mut pf_anchor; + pub fn pf_anchor_node_RB_MINMAX(arg1: *mut pf_anchor_node, arg2: ::std::os::raw::c_int) -> *mut pf_anchor; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -12331,32 +10250,17 @@ fn bindgen_test_layout_pfr_table() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrt_name) as usize - ptr as usize }, 1024usize, - concat!( - "Offset of field: ", - stringify!(pfr_table), - "::", - stringify!(pfrt_name) - ) + concat!("Offset of field: ", stringify!(pfr_table), "::", stringify!(pfrt_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrt_flags) as usize - ptr as usize }, 1056usize, - concat!( - "Offset of field: ", - stringify!(pfr_table), - "::", - stringify!(pfrt_flags) - ) + concat!("Offset of field: ", stringify!(pfr_table), "::", stringify!(pfrt_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrt_fback) as usize - ptr as usize }, 1060usize, - concat!( - "Offset of field: ", - stringify!(pfr_table), - "::", - stringify!(pfrt_fback) - ) + concat!("Offset of field: ", stringify!(pfr_table), "::", stringify!(pfrt_fback)) ); } pub const PFR_FB_NONE: _bindgen_ty_14 = 0; @@ -12393,8 +10297,7 @@ pub union pfr_addr__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_addr__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -12444,102 +10347,52 @@ fn bindgen_test_layout_pfr_addr() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_u) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_u)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_ifname) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_ifname) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_states) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_states) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_weight) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_weight) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_weight)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_af) as usize - ptr as usize }, 38usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_af) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_net) as usize - ptr as usize }, 39usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_net) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_net)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_not) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_not) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_not)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_fback) as usize - ptr as usize }, 41usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_fback) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_fback)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfra_type) as usize - ptr as usize }, 42usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pfra_type) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pfra_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 43usize, - concat!( - "Offset of field: ", - stringify!(pfr_addr), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pfr_addr), "::", stringify!(pad)) ); } pub const PFR_DIR_IN: _bindgen_ty_15 = 0; @@ -12577,12 +10430,7 @@ fn bindgen_test_layout_pfr_astats() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfras_a) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_astats), - "::", - stringify!(pfras_a) - ) + concat!("Offset of field: ", stringify!(pfr_astats), "::", stringify!(pfras_a)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfras_packets) as usize - ptr as usize }, @@ -12648,12 +10496,7 @@ fn bindgen_test_layout_pfr_tstats() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrts_t) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_tstats), - "::", - stringify!(pfrts_t) - ) + concat!("Offset of field: ", stringify!(pfr_tstats), "::", stringify!(pfrts_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrts_packets) as usize - ptr as usize }, @@ -12708,12 +10551,7 @@ fn bindgen_test_layout_pfr_tstats() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrts_cnt) as usize - ptr as usize }, 1216usize, - concat!( - "Offset of field: ", - stringify!(pfr_tstats), - "::", - stringify!(pfrts_cnt) - ) + concat!("Offset of field: ", stringify!(pfr_tstats), "::", stringify!(pfrts_cnt)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrts_refcnt) as usize - ptr as usize }, @@ -12770,12 +10608,7 @@ fn bindgen_test_layout_pfr_kcounters() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize }, 96usize, - concat!( - "Offset of field: ", - stringify!(pfr_kcounters), - "::", - stringify!(states) - ) + concat!("Offset of field: ", stringify!(pfr_kcounters), "::", stringify!(states)) ); } #[repr(C)] @@ -12802,22 +10635,12 @@ fn bindgen_test_layout_pfsockaddr_union() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sa) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfsockaddr_union), - "::", - stringify!(sa) - ) + concat!("Offset of field: ", stringify!(pfsockaddr_union), "::", stringify!(sa)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfsockaddr_union), - "::", - stringify!(sin) - ) + concat!("Offset of field: ", stringify!(pfsockaddr_union), "::", stringify!(sin)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sin6) as usize - ptr as usize }, @@ -12882,8 +10705,7 @@ pub struct _pfr_kentry__bindgen_ty_1 { } #[test] fn bindgen_test_layout__pfr_kentry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit<_pfr_kentry__bindgen_ty_1> = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit<_pfr_kentry__bindgen_ty_1> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_pfr_kentry__bindgen_ty_1>(), @@ -12913,8 +10735,7 @@ pub struct _pfr_kentry__bindgen_ty_2 { } #[test] fn bindgen_test_layout__pfr_kentry__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit<_pfr_kentry__bindgen_ty_2> = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit<_pfr_kentry__bindgen_ty_2> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_pfr_kentry__bindgen_ty_2>(), @@ -13079,8 +10900,7 @@ pub union pfr_kentry__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_kentry__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13120,12 +10940,7 @@ fn bindgen_test_layout_pfr_kentry() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry), - "::", - stringify!(u) - ) + concat!("Offset of field: ", stringify!(pfr_kentry), "::", stringify!(u)) ); } #[repr(C)] @@ -13142,8 +10957,7 @@ pub union pfr_kentry_route__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_kentry_route__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13183,22 +10997,12 @@ fn bindgen_test_layout_pfr_kentry_route() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry_route), - "::", - stringify!(u) - ) + concat!("Offset of field: ", stringify!(pfr_kentry_route), "::", stringify!(u)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry_route), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pfr_kentry_route), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, @@ -13226,8 +11030,7 @@ pub union pfr_kentry_cost__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_kentry_cost__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13267,22 +11070,12 @@ fn bindgen_test_layout_pfr_kentry_cost() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry_cost), - "::", - stringify!(u) - ) + concat!("Offset of field: ", stringify!(pfr_kentry_cost), "::", stringify!(u)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 168usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry_cost), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pfr_kentry_cost), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, @@ -13319,8 +11112,7 @@ pub union pfr_kentry_all__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_kentry_all__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13380,12 +11172,7 @@ fn bindgen_test_layout_pfr_kentry_all() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_kentry_all), - "::", - stringify!(u) - ) + concat!("Offset of field: ", stringify!(pfr_kentry_all), "::", stringify!(u)) ); } #[repr(C)] @@ -13475,8 +11262,7 @@ pub struct pfr_ktable__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfr_ktable__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13536,8 +11322,7 @@ pub struct pfr_ktable__bindgen_ty_2 { } #[test] fn bindgen_test_layout_pfr_ktable__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13577,12 +11362,7 @@ fn bindgen_test_layout_pfr_ktable() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_ts) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfr_ktable), - "::", - stringify!(pfrkt_ts) - ) + concat!("Offset of field: ", stringify!(pfr_ktable), "::", stringify!(pfrkt_ts)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_tree) as usize - ptr as usize }, @@ -13607,22 +11387,12 @@ fn bindgen_test_layout_pfr_ktable() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_ip4) as usize - ptr as usize }, 1272usize, - concat!( - "Offset of field: ", - stringify!(pfr_ktable), - "::", - stringify!(pfrkt_ip4) - ) + concat!("Offset of field: ", stringify!(pfr_ktable), "::", stringify!(pfrkt_ip4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_ip6) as usize - ptr as usize }, 1280usize, - concat!( - "Offset of field: ", - stringify!(pfr_ktable), - "::", - stringify!(pfrkt_ip6) - ) + concat!("Offset of field: ", stringify!(pfr_ktable), "::", stringify!(pfrkt_ip6)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_shadow) as usize - ptr as usize }, @@ -13647,12 +11417,7 @@ fn bindgen_test_layout_pfr_ktable() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_rs) as usize - ptr as usize }, 1304usize, - concat!( - "Offset of field: ", - stringify!(pfr_ktable), - "::", - stringify!(pfrkt_rs) - ) + concat!("Offset of field: ", stringify!(pfr_ktable), "::", stringify!(pfrkt_rs)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfrkt_larg) as usize - ptr as usize }, @@ -13712,8 +11477,7 @@ pub struct pf_state_tree_ext_gwy { } #[test] fn bindgen_test_layout_pf_state_tree_ext_gwy() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13736,11 +11500,8 @@ fn bindgen_test_layout_pf_state_tree_ext_gwy() { ) ); } -extern "C" { - pub fn pf_state_tree_ext_gwy_RB_INSERT_COLOR( - arg1: *mut pf_state_tree_ext_gwy, - arg2: *mut pf_state_key, - ); +extern "C" { + pub fn pf_state_tree_ext_gwy_RB_INSERT_COLOR(arg1: *mut pf_state_tree_ext_gwy, arg2: *mut pf_state_key); } extern "C" { pub fn pf_state_tree_ext_gwy_RB_REMOVE_COLOR( @@ -13807,12 +11568,7 @@ fn bindgen_test_layout_pfi_ifhead() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rbh_root) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfi_ifhead), - "::", - stringify!(rbh_root) - ) + concat!("Offset of field: ", stringify!(pfi_ifhead), "::", stringify!(rbh_root)) ); } #[repr(C)] @@ -13893,8 +11649,7 @@ pub struct pfi_kif__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfi_kif__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -13955,8 +11710,7 @@ pub struct pfi_kif__bindgen_ty_2 { } #[test] fn bindgen_test_layout_pfi_kif__bindgen_ty_2() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -14006,62 +11760,32 @@ fn bindgen_test_layout_pfi_kif() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_name) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_name) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_tree) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_tree) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_tree)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_packets) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_packets) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_packets)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_bytes) as usize - ptr as usize }, 112usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_bytes) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_bytes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_tzero) as usize - ptr as usize }, 176usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_tzero) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_tzero)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_flags) as usize - ptr as usize }, 184usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_flags) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_flags_new) as usize - ptr as usize }, @@ -14086,52 +11810,27 @@ fn bindgen_test_layout_pfi_kif() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_ifp) as usize - ptr as usize }, 200usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_ifp) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_ifp)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_group) as usize - ptr as usize }, 208usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_group) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_group)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_states) as usize - ptr as usize }, 216usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_states) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_rules) as usize - ptr as usize }, 220usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_rules) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_rules)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_routes) as usize - ptr as usize }, 224usize, - concat!( - "Offset of field: ", - stringify!(pfi_kif), - "::", - stringify!(pfik_routes) - ) + concat!("Offset of field: ", stringify!(pfi_kif), "::", stringify!(pfik_routes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfik_srcnodes) as usize - ptr as usize }, @@ -14213,72 +11912,37 @@ fn bindgen_test_layout_pf_status() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).counters) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(counters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(counters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lcounters) as usize - ptr as usize }, 136usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(lcounters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(lcounters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fcounters) as usize - ptr as usize }, 216usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(fcounters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(fcounters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scounters) as usize - ptr as usize }, 240usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(scounters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(scounters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pcounters) as usize - ptr as usize }, 264usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(pcounters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(pcounters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bcounters) as usize - ptr as usize }, 360usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(bcounters) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(bcounters)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stateid) as usize - ptr as usize }, 392usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(stateid) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(stateid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).syncookies_inflight) as usize - ptr as usize }, @@ -14293,32 +11957,17 @@ fn bindgen_test_layout_pf_status() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).since) as usize - ptr as usize }, 416usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(since) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(since)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize }, 424usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(running) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(running)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize }, 428usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(states) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(states)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).states_halfopen) as usize - ptr as usize }, @@ -14333,42 +11982,22 @@ fn bindgen_test_layout_pf_status() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).src_nodes) as usize - ptr as usize }, 436usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(src_nodes) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(src_nodes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).debug) as usize - ptr as usize }, 440usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(debug) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(debug)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hostid) as usize - ptr as usize }, 444usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(hostid) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(hostid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reass) as usize - ptr as usize }, 448usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(reass) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(reass)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).syncookies_active) as usize - ptr as usize }, @@ -14393,32 +12022,17 @@ fn bindgen_test_layout_pf_status() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, 454usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(pad) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(pad)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, 456usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(ifname) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pf_chksum) as usize - ptr as usize }, 472usize, - concat!( - "Offset of field: ", - stringify!(pf_status), - "::", - stringify!(pf_chksum) - ) + concat!("Offset of field: ", stringify!(pf_status), "::", stringify!(pf_chksum)) ); } #[repr(C)] @@ -14486,32 +12100,17 @@ fn bindgen_test_layout_pf_queue_scspec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_queue_scspec), - "::", - stringify!(m1) - ) + concat!("Offset of field: ", stringify!(pf_queue_scspec), "::", stringify!(m1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m2) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pf_queue_scspec), - "::", - stringify!(m2) - ) + concat!("Offset of field: ", stringify!(pf_queue_scspec), "::", stringify!(m2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pf_queue_scspec), - "::", - stringify!(d) - ) + concat!("Offset of field: ", stringify!(pf_queue_scspec), "::", stringify!(d)) ); } #[repr(C)] @@ -14602,8 +12201,7 @@ pub struct pf_queuespec__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_queuespec__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -14653,42 +12251,22 @@ fn bindgen_test_layout_pf_queuespec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(entries) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(entries)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qname) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(qname) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(qname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(parent) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(parent)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifname) as usize - ptr as usize }, 144usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(ifname) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(ifname)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).realtime) as usize - ptr as usize }, @@ -14733,42 +12311,22 @@ fn bindgen_test_layout_pf_queuespec() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kif) as usize - ptr as usize }, 240usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(kif) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(kif)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 248usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(flags) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(flags)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qlimit) as usize - ptr as usize }, 252usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(qlimit) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(qlimit)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).qid) as usize - ptr as usize }, 256usize, - concat!( - "Offset of field: ", - stringify!(pf_queuespec), - "::", - stringify!(qid) - ) + concat!("Offset of field: ", stringify!(pf_queuespec), "::", stringify!(qid)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).parent_qid) as usize - ptr as usize }, @@ -14803,12 +12361,7 @@ fn bindgen_test_layout_priq_opts() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(priq_opts), - "::", - stringify!(flags) - ) + concat!("Offset of field: ", stringify!(priq_opts), "::", stringify!(flags)) ); } #[repr(C)] @@ -14842,115 +12395,60 @@ fn bindgen_test_layout_hfsc_opts() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtsc_m1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(rtsc_m1) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(rtsc_m1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtsc_d) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(rtsc_d) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(rtsc_d)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rtsc_m2) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(rtsc_m2) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(rtsc_m2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lssc_m1) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(lssc_m1) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(lssc_m1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lssc_d) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(lssc_d) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(lssc_d)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lssc_m2) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(lssc_m2) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(lssc_m2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulsc_m1) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(ulsc_m1) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(ulsc_m1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulsc_d) as usize - ptr as usize }, 28usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(ulsc_d) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(ulsc_d)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ulsc_m2) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(ulsc_m2) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(ulsc_m2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 36usize, - concat!( - "Offset of field: ", - stringify!(hfsc_opts), - "::", - stringify!(flags) - ) + concat!("Offset of field: ", stringify!(hfsc_opts), "::", stringify!(flags)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pfq_ops { - pub pfq_alloc: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ifnet) -> *mut ::std::os::raw::c_void, - >, + pub pfq_alloc: ::std::option::Option *mut ::std::os::raw::c_void>, pub pfq_addqueue: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut pf_queuespec, - ) -> ::std::os::raw::c_int, + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut pf_queuespec) -> ::std::os::raw::c_int, >, pub pfq_free: ::std::option::Option, pub pfq_qstats: ::std::option::Option< @@ -14958,14 +12456,12 @@ pub struct pfq_ops { arg1: *mut pf_queuespec, arg2: *mut ::std::os::raw::c_void, arg3: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub pfq_qlength: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uint, - >, - pub pfq_enqueue: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut mbuf) -> *mut mbuf, + ) -> ::std::os::raw::c_int, >, + pub pfq_qlength: + ::std::option::Option ::std::os::raw::c_uint>, + pub pfq_enqueue: + ::std::option::Option *mut mbuf>, pub pfq_deq_begin: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, @@ -14974,15 +12470,9 @@ pub struct pfq_ops { ) -> *mut mbuf, >, pub pfq_deq_commit: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut mbuf, - arg3: *mut ::std::os::raw::c_void, - ), - >, - pub pfq_purge: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut mbuf_list), + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut mbuf, arg3: *mut ::std::os::raw::c_void), >, + pub pfq_purge: ::std::option::Option, } #[test] fn bindgen_test_layout_pfq_ops() { @@ -15001,62 +12491,32 @@ fn bindgen_test_layout_pfq_ops() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_alloc) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_alloc) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_alloc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_addqueue) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_addqueue) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_addqueue)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_free) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_free) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_free)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_qstats) as usize - ptr as usize }, 24usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_qstats) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_qstats)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_qlength) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_qlength) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_qlength)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_enqueue) as usize - ptr as usize }, 40usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_enqueue) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_enqueue)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_deq_begin) as usize - ptr as usize }, @@ -15081,12 +12541,7 @@ fn bindgen_test_layout_pfq_ops() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pfq_purge) as usize - ptr as usize }, 64usize, - concat!( - "Offset of field: ", - stringify!(pfq_ops), - "::", - stringify!(pfq_purge) - ) + concat!("Offset of field: ", stringify!(pfq_ops), "::", stringify!(pfq_purge)) ); } #[repr(C)] @@ -15105,8 +12560,7 @@ pub struct pf_tagname__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pf_tagname__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -15156,42 +12610,22 @@ fn bindgen_test_layout_pf_tagname() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_tagname), - "::", - stringify!(entries) - ) + concat!("Offset of field: ", stringify!(pf_tagname), "::", stringify!(entries)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pf_tagname), - "::", - stringify!(name) - ) + concat!("Offset of field: ", stringify!(pf_tagname), "::", stringify!(name)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_tagname), - "::", - stringify!(tag) - ) + concat!("Offset of field: ", stringify!(pf_tagname), "::", stringify!(tag)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ref_) as usize - ptr as usize }, 84usize, - concat!( - "Offset of field: ", - stringify!(pf_tagname), - "::", - stringify!(ref_) - ) + concat!("Offset of field: ", stringify!(pf_tagname), "::", stringify!(ref_)) ); } #[repr(C)] @@ -15219,42 +12653,22 @@ fn bindgen_test_layout_pf_divert() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_divert), - "::", - stringify!(addr) - ) + concat!("Offset of field: ", stringify!(pf_divert), "::", stringify!(addr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pf_divert), - "::", - stringify!(port) - ) + concat!("Offset of field: ", stringify!(pf_divert), "::", stringify!(port)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdomain) as usize - ptr as usize }, 18usize, - concat!( - "Offset of field: ", - stringify!(pf_divert), - "::", - stringify!(rdomain) - ) + concat!("Offset of field: ", stringify!(pf_divert), "::", stringify!(rdomain)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 20usize, - concat!( - "Offset of field: ", - stringify!(pf_divert), - "::", - stringify!(type_) - ) + concat!("Offset of field: ", stringify!(pf_divert), "::", stringify!(type_)) ); } pub const pf_divert_types_PF_DIVERT_NONE: pf_divert_types = 0; @@ -15286,32 +12700,17 @@ fn bindgen_test_layout_pf_pktdelay() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).to) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pf_pktdelay), - "::", - stringify!(to) - ) + concat!("Offset of field: ", stringify!(pf_pktdelay), "::", stringify!(to)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(pf_pktdelay), - "::", - stringify!(m) - ) + concat!("Offset of field: ", stringify!(pf_pktdelay), "::", stringify!(m)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ifidx) as usize - ptr as usize }, 80usize, - concat!( - "Offset of field: ", - stringify!(pf_pktdelay), - "::", - stringify!(ifidx) - ) + concat!("Offset of field: ", stringify!(pf_pktdelay), "::", stringify!(ifidx)) ); } #[repr(C)] @@ -15341,42 +12740,22 @@ fn bindgen_test_layout_pfioc_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_rule), - "::", - stringify!(action) - ) + concat!("Offset of field: ", stringify!(pfioc_rule), "::", stringify!(action)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ticket) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_rule), - "::", - stringify!(ticket) - ) + concat!("Offset of field: ", stringify!(pfioc_rule), "::", stringify!(ticket)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfioc_rule), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pfioc_rule), "::", stringify!(nr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor) as usize - ptr as usize }, 12usize, - concat!( - "Offset of field: ", - stringify!(pfioc_rule), - "::", - stringify!(anchor) - ) + concat!("Offset of field: ", stringify!(pfioc_rule), "::", stringify!(anchor)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).anchor_call) as usize - ptr as usize }, @@ -15391,12 +12770,7 @@ fn bindgen_test_layout_pfioc_rule() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rule) as usize - ptr as usize }, 2064usize, - concat!( - "Offset of field: ", - stringify!(pfioc_rule), - "::", - stringify!(rule) - ) + concat!("Offset of field: ", stringify!(pfioc_rule), "::", stringify!(rule)) ); } #[repr(C)] @@ -15433,42 +12807,22 @@ fn bindgen_test_layout_pfioc_natlook() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).saddr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(saddr) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(saddr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).daddr) as usize - ptr as usize }, 16usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(daddr) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(daddr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsaddr) as usize - ptr as usize }, 32usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(rsaddr) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(rsaddr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdaddr) as usize - ptr as usize }, 48usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(rdaddr) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(rdaddr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdomain) as usize - ptr as usize }, @@ -15493,62 +12847,32 @@ fn bindgen_test_layout_pfioc_natlook() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sport) as usize - ptr as usize }, 68usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(sport) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(sport)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dport) as usize - ptr as usize }, 70usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(dport) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(dport)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rsport) as usize - ptr as usize }, 72usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(rsport) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(rsport)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).rdport) as usize - ptr as usize }, 74usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(rdport) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(rdport)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).af) as usize - ptr as usize }, 76usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(af) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(af)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).proto) as usize - ptr as usize }, 77usize, - concat!( - "Offset of field: ", - stringify!(pfioc_natlook), - "::", - stringify!(proto) - ) + concat!("Offset of field: ", stringify!(pfioc_natlook), "::", stringify!(proto)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize }, @@ -15583,12 +12907,7 @@ fn bindgen_test_layout_pfioc_state() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_state), - "::", - stringify!(state) - ) + concat!("Offset of field: ", stringify!(pfioc_state), "::", stringify!(state)) ); } #[repr(C)] @@ -15786,8 +13105,7 @@ pub union pfioc_states__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfioc_states__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -15837,22 +13155,12 @@ fn bindgen_test_layout_pfioc_states() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ps_len) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_states), - "::", - stringify!(ps_len) - ) + concat!("Offset of field: ", stringify!(pfioc_states), "::", stringify!(ps_len)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ps_u) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfioc_states), - "::", - stringify!(ps_u) - ) + concat!("Offset of field: ", stringify!(pfioc_states), "::", stringify!(ps_u)) ); } #[repr(C)] @@ -15869,8 +13177,7 @@ pub union pfioc_src_nodes__bindgen_ty_1 { } #[test] fn bindgen_test_layout_pfioc_src_nodes__bindgen_ty_1() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -15961,22 +13268,12 @@ fn bindgen_test_layout_pfioc_tm() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeout) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_tm), - "::", - stringify!(timeout) - ) + concat!("Offset of field: ", stringify!(pfioc_tm), "::", stringify!(timeout)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).seconds) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_tm), - "::", - stringify!(seconds) - ) + concat!("Offset of field: ", stringify!(pfioc_tm), "::", stringify!(seconds)) ); } #[repr(C)] @@ -16002,22 +13299,12 @@ fn bindgen_test_layout_pfioc_limit() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_limit), - "::", - stringify!(index) - ) + concat!("Offset of field: ", stringify!(pfioc_limit), "::", stringify!(index)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_limit), - "::", - stringify!(limit) - ) + concat!("Offset of field: ", stringify!(pfioc_limit), "::", stringify!(limit)) ); } #[repr(C)] @@ -16044,32 +13331,17 @@ fn bindgen_test_layout_pfioc_ruleset() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_ruleset), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pfioc_ruleset), "::", stringify!(nr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_ruleset), - "::", - stringify!(path) - ) + concat!("Offset of field: ", stringify!(pfioc_ruleset), "::", stringify!(path)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 1028usize, - concat!( - "Offset of field: ", - stringify!(pfioc_ruleset), - "::", - stringify!(name) - ) + concat!("Offset of field: ", stringify!(pfioc_ruleset), "::", stringify!(name)) ); } #[repr(C)] @@ -16088,8 +13360,7 @@ pub struct pfioc_trans_pfioc_trans_e { } #[test] fn bindgen_test_layout_pfioc_trans_pfioc_trans_e() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), @@ -16149,32 +13420,17 @@ fn bindgen_test_layout_pfioc_trans() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_trans), - "::", - stringify!(size) - ) + concat!("Offset of field: ", stringify!(pfioc_trans), "::", stringify!(size)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).esize) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_trans), - "::", - stringify!(esize) - ) + concat!("Offset of field: ", stringify!(pfioc_trans), "::", stringify!(esize)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfioc_trans), - "::", - stringify!(array) - ) + concat!("Offset of field: ", stringify!(pfioc_trans), "::", stringify!(array)) ); } #[repr(C)] @@ -16201,32 +13457,17 @@ fn bindgen_test_layout_pfioc_queue() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ticket) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_queue), - "::", - stringify!(ticket) - ) + concat!("Offset of field: ", stringify!(pfioc_queue), "::", stringify!(ticket)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_queue), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pfioc_queue), "::", stringify!(nr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).queue) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfioc_queue), - "::", - stringify!(queue) - ) + concat!("Offset of field: ", stringify!(pfioc_queue), "::", stringify!(queue)) ); } #[repr(C)] @@ -16255,52 +13496,27 @@ fn bindgen_test_layout_pfioc_qstats() { assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ticket) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(pfioc_qstats), - "::", - stringify!(ticket) - ) + concat!("Offset of field: ", stringify!(pfioc_qstats), "::", stringify!(ticket)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, 4usize, - concat!( - "Offset of field: ", - stringify!(pfioc_qstats), - "::", - stringify!(nr) - ) + concat!("Offset of field: ", stringify!(pfioc_qstats), "::", stringify!(nr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).queue) as usize - ptr as usize }, 8usize, - concat!( - "Offset of field: ", - stringify!(pfioc_qstats), - "::", - stringify!(queue) - ) + concat!("Offset of field: ", stringify!(pfioc_qstats), "::", stringify!(queue)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, 272usize, - concat!( - "Offset of field: ", - stringify!(pfioc_qstats), - "::", - stringify!(buf) - ) + concat!("Offset of field: ", stringify!(pfioc_qstats), "::", stringify!(buf)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).nbytes) as usize - ptr as usize }, 280usize, - concat!( - "Offset of field: ", - stringify!(pfioc_qstats), - "::", - stringify!(nbytes) - ) + concat!("Offset of field: ", stringify!(pfioc_qstats), "::", stringify!(nbytes)) ); } #[repr(C)] @@ -16605,10 +13821,7 @@ extern "C" { ) -> *mut pf_ruleset; } extern "C" { - pub fn pf_create_anchor( - arg1: *mut pf_anchor, - arg2: *const ::std::os::raw::c_char, - ) -> *mut pf_anchor; + pub fn pf_create_anchor(arg1: *mut pf_anchor, arg2: *const ::std::os::raw::c_char) -> *mut pf_anchor; } extern "C" { pub fn pf_find_or_create_ruleset(arg1: *const ::std::os::raw::c_char) -> *mut pf_ruleset; @@ -16642,10 +13855,7 @@ extern "C" { pub fn pf_osfp_initialize(); } extern "C" { - pub fn pf_osfp_match( - arg1: *mut pf_os_fingerprint_pf_osfp_enlist, - arg2: pf_osfp_t, - ) -> ::std::os::raw::c_int; + pub fn pf_osfp_match(arg1: *mut pf_os_fingerprint_pf_osfp_enlist, arg2: pf_osfp_t) -> ::std::os::raw::c_int; } extern "C" { pub fn pf_osfp_validate() -> *mut pf_os_fingerprint; diff --git a/crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/bsd.rs b/crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/bsd.rs index 7c860c7b38ee..ec4cdd061831 100644 --- a/crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/bsd.rs +++ b/crates/shadowsocks-service/src/local/redir/tcprelay/sys/unix/bsd.rs @@ -106,7 +106,7 @@ impl TcpStreamRedirExt for TcpStream { PF.natlook(&bind_addr, &peer_addr, Protocol::TCP) } - #[cfg(target_os = "openbsd")] //in OpenBSD, we can get TCP destination address with getsockname() + #[cfg(target_os = "openbsd")] // in OpenBSD, we can get TCP destination address with getsockname() RedirType::PacketFilter => self.local_addr(), #[cfg(any(target_os = "freebsd", target_os = "macos", target_os = "ios"))] RedirType::IpFirewall => { diff --git a/crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/openbsd.rs b/crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/openbsd.rs index 87b771259a68..a11285c5167a 100644 --- a/crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/openbsd.rs +++ b/crates/shadowsocks-service/src/local/redir/udprelay/sys/unix/openbsd.rs @@ -20,8 +20,8 @@ use crate::{ sys::set_ipv6_only, }, }; -const IP_RECVDSTPORT: i32 = 33; //Temporary workaround until libc supports this -const IPV6_RECVDSTPORT: i32 = 64; //Temporary workaround until libc supports this +const IP_RECVDSTPORT: i32 = 33; // Temporary workaround until libc supports this +const IPV6_RECVDSTPORT: i32 = 64; // Temporary workaround until libc supports this pub struct UdpRedirSocket { io: AsyncFd, @@ -240,7 +240,7 @@ fn get_destination_addr(msg: &libc::msghdr) -> io::Result { unsafe { let (_, addr) = SockAddr::try_init(|dst_addr, dst_addr_len| { let mut cmsg: *mut libc::cmsghdr = libc::CMSG_FIRSTHDR(msg); - let mut addr_or_port_received = false; //The address should come first and then the port, but we use a flag just in case. https://github.com/openbsd/src/blob/3d310523b415eeee9db46a5b67eecf8f9fdd5c8f/sys/netinet/udp_usrreq.c#L662-L687 + let mut addr_or_port_received = false; // The address should come first and then the port, but we use a flag just in case. https://github.com/openbsd/src/blob/3d310523b415eeee9db46a5b67eecf8f9fdd5c8f/sys/netinet/udp_usrreq.c#L662-L687 while !cmsg.is_null() { let rcmsg = &*cmsg; match (rcmsg.cmsg_level, rcmsg.cmsg_type) { diff --git a/crates/shadowsocks-service/src/manager/mod.rs b/crates/shadowsocks-service/src/manager/mod.rs index 6bc98ba82739..3bf5082466aa 100644 --- a/crates/shadowsocks-service/src/manager/mod.rs +++ b/crates/shadowsocks-service/src/manager/mod.rs @@ -53,6 +53,7 @@ pub async fn run(config: Config) -> io::Result<()> { connect_opts.tcp.keepalive = config.keep_alive.or(Some(SERVER_DEFAULT_KEEPALIVE_TIMEOUT)); connect_opts.tcp.mptcp = config.mptcp; connect_opts.udp.mtu = config.udp_mtu; + connect_opts.udp.allow_fragmentation = config.outbound_udp_allow_fragmentation; let mut accept_opts = AcceptOpts { ipv6_only: config.ipv6_only, diff --git a/crates/shadowsocks-service/src/server/mod.rs b/crates/shadowsocks-service/src/server/mod.rs index c4382542a66e..06c54aea9521 100644 --- a/crates/shadowsocks-service/src/server/mod.rs +++ b/crates/shadowsocks-service/src/server/mod.rs @@ -4,7 +4,7 @@ use std::{io, net::SocketAddr, sync::Arc, time::Duration}; use futures::future; use log::trace; -use shadowsocks::net::{AcceptOpts, ConnectOpts}; +use shadowsocks::net::{AcceptOpts, ConnectOpts, UdpSocketOpts}; use crate::{ config::{Config, ConfigType}, @@ -66,7 +66,12 @@ pub async fn run(config: Config) -> io::Result<()> { bind_local_addr: config.outbound_bind_addr.map(|ip| SocketAddr::new(ip, 0)), bind_interface: config.outbound_bind_interface, - udp_allow_fragmentation: config.outbound_udp_allow_fragmentation, + + udp: UdpSocketOpts { + allow_fragmentation: config.outbound_udp_allow_fragmentation, + + ..Default::default() + }, ..Default::default() }; @@ -122,7 +127,7 @@ pub async fn run(config: Config) -> io::Result<()> { } if let Some(udp_allow_fragmentation) = inst.outbound_udp_allow_fragmentation { - connect_opts.udp_allow_fragmentation = udp_allow_fragmentation; + connect_opts.udp.allow_fragmentation = udp_allow_fragmentation; } server_builder.set_connect_opts(connect_opts); diff --git a/crates/shadowsocks/src/net/mod.rs b/crates/shadowsocks/src/net/mod.rs index 0bc7ed147e7d..11731d2cc0f7 100644 --- a/crates/shadowsocks/src/net/mod.rs +++ b/crates/shadowsocks/src/net/mod.rs @@ -5,7 +5,7 @@ use std::net::SocketAddr; #[cfg(unix)] pub use self::sys::uds::{UnixListener, UnixStream}; pub use self::{ - option::{AcceptOpts, ConnectOpts, TcpSocketOpts}, + option::{AcceptOpts, ConnectOpts, TcpSocketOpts, UdpSocketOpts}, sys::{get_ip_stack_capabilities, set_tcp_fastopen, socket_bind_dual_stack, IpStackCapabilities}, tcp::{TcpListener, TcpStream}, udp::UdpSocket, diff --git a/crates/shadowsocks/src/net/option.rs b/crates/shadowsocks/src/net/option.rs index 743f98f32552..24c7f3376981 100644 --- a/crates/shadowsocks/src/net/option.rs +++ b/crates/shadowsocks/src/net/option.rs @@ -37,6 +37,9 @@ pub struct UdpSocketOpts { /// /// NOTE: MTU includes IP header, UDP header, UDP payload pub mtu: Option, + + /// Outbound UDP socket allows IP fragmentation + pub allow_fragmentation: bool, } /// Options for connecting to remote server @@ -65,9 +68,6 @@ pub struct ConnectOpts { /// Outbound socket binds to interface pub bind_interface: Option, - /// Outbound UDP socket allows IP fragmentation - pub udp_allow_fragmentation: bool, - /// TCP options pub tcp: TcpSocketOpts, diff --git a/crates/shadowsocks/src/net/sys/unix/bsd/freebsd.rs b/crates/shadowsocks/src/net/sys/unix/bsd/freebsd.rs index 9b105098dd18..61ad111bebb3 100644 --- a/crates/shadowsocks/src/net/sys/unix/bsd/freebsd.rs +++ b/crates/shadowsocks/src/net/sys/unix/bsd/freebsd.rs @@ -251,7 +251,7 @@ pub async fn bind_outbound_udp_socket(bind_addr: &SocketAddr, _config: &ConnectO UdpSocket::from_std(socket.into())? }; - if ! config.udp_allow_fragmentation { + if !config.udp.allow_fragmentation { if let Err(err) = set_disable_ip_fragmentation(af, &socket) { warn!("failed to disable IP fragmentation, error: {}", err); } diff --git a/crates/shadowsocks/src/net/sys/unix/bsd/macos.rs b/crates/shadowsocks/src/net/sys/unix/bsd/macos.rs index fa1fd4af7e1e..73305daaddf2 100644 --- a/crates/shadowsocks/src/net/sys/unix/bsd/macos.rs +++ b/crates/shadowsocks/src/net/sys/unix/bsd/macos.rs @@ -379,7 +379,7 @@ pub async fn bind_outbound_udp_socket(bind_addr: &SocketAddr, config: &ConnectOp UdpSocket::from_std(socket.into())? }; - if ! config.udp_allow_fragmentation { + if !config.udp.allow_fragmentation { if let Err(err) = set_disable_ip_fragmentation(af, &socket) { warn!("failed to disable IP fragmentation, error: {}", err); } diff --git a/crates/shadowsocks/src/net/sys/unix/linux/mod.rs b/crates/shadowsocks/src/net/sys/unix/linux/mod.rs index d9c41c55b5f0..1a45aa0f5fc1 100644 --- a/crates/shadowsocks/src/net/sys/unix/linux/mod.rs +++ b/crates/shadowsocks/src/net/sys/unix/linux/mod.rs @@ -310,7 +310,7 @@ pub async fn bind_outbound_udp_socket(bind_addr: &SocketAddr, config: &ConnectOp UdpSocket::from_std(socket.into())? }; - if ! config.udp_allow_fragmentation { + if !config.udp_allow_fragmentation { if let Err(err) = set_disable_ip_fragmentation(af, &socket) { warn!("failed to disable IP fragmentation, error: {}", err); } diff --git a/crates/shadowsocks/src/net/sys/windows/mod.rs b/crates/shadowsocks/src/net/sys/windows/mod.rs index 92c69f3c184a..457510701794 100644 --- a/crates/shadowsocks/src/net/sys/windows/mod.rs +++ b/crates/shadowsocks/src/net/sys/windows/mod.rs @@ -498,12 +498,11 @@ pub async fn bind_outbound_udp_socket(bind_addr: &SocketAddr, opts: &ConnectOpts socket.set_nonblocking(true)?; let socket = UdpSocket::from_std(socket.into())?; - if ! opts.udp_allow_fragmentation { + if !opts.udp.allow_fragmentation { if let Err(err) = set_disable_ip_fragmentation(af, &socket) { warn!("failed to disable IP fragmentation, error: {}", err); } } - disable_connection_reset(&socket)?; Ok(socket)