diff --git a/Cargo.lock b/Cargo.lock index 3d34c4e..f06240b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aho-corasick" @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -43,63 +43,63 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] @@ -142,15 +142,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cc" -version = "1.1.14" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d2eb3cd3d1bf4529e31c215ee6f93ec5a3d536d9f578f93d9d33ee19562932" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "shlex", ] @@ -170,6 +170,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clang-sys" version = "1.8.1" @@ -183,9 +189,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "either" @@ -217,10 +223,16 @@ dependencies = [ ] [[package]] -name = "futures" -version = "0.3.30" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -233,9 +245,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -243,15 +255,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -260,15 +272,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -277,21 +289,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -307,9 +319,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" @@ -317,6 +329,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -329,6 +347,16 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -345,10 +373,16 @@ dependencies = [ ] [[package]] -name = "libc" -version = "0.2.158" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "libc" +version = "0.2.162" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libloading" @@ -360,16 +394,6 @@ dependencies = [ "windows-targets", ] -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - [[package]] name = "log" version = "0.4.22" @@ -390,11 +414,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -406,7 +430,7 @@ dependencies = [ "hermit-abi", "libc", "wasi", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -420,8 +444,10 @@ dependencies = [ "futures", "log", "netlink-packet-route", - "nix", + "nix 0.29.0", "rtnetlink", + "serde", + "serde_yaml", "tokio", ] @@ -501,6 +527,18 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -513,36 +551,13 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - [[package]] name = "paste" version = "1.0.15" @@ -551,9 +566,9 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -563,9 +578,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", "syn", @@ -573,9 +588,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -589,20 +604,11 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "redox_syscall" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" -dependencies = [ - "bitflags", -] - [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -612,9 +618,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -623,9 +629,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rtnetlink" @@ -640,7 +646,7 @@ dependencies = [ "netlink-packet-utils", "netlink-proto", "netlink-sys", - "nix", + "nix 0.27.1", "thiserror", "tokio", ] @@ -658,10 +664,43 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "scopeguard" -version = "1.2.0" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "serde" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.214" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] [[package]] name = "shlex" @@ -669,15 +708,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - [[package]] name = "slab" version = "0.4.9" @@ -687,12 +717,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - [[package]] name = "socket2" version = "0.5.7" @@ -700,14 +724,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "syn" -version = "2.0.76" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -716,18 +740,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", @@ -736,38 +760,30 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.3" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", - "signal-hook-registry", "socket2", - "tokio-macros", - "windows-sys", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "windows-sys 0.52.0", ] [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "utf8parse" @@ -790,6 +806,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.52.6" diff --git a/Cargo.toml b/Cargo.toml index f982744..943c85c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,14 +4,16 @@ version = "0.1.0" edition = "2021" [dependencies] -nix = {version = '*', features= ["fs", "mount", "sched"] } -rtnetlink = {version = '*', features = ["tokio_socket"] } -netlink-packet-route = '*' -futures = '*' -log = '*' -env_logger = '*' -tokio = {version = '*', features = ["full"] } -base64 = '*' +nix = {version = '0.29', features= ["fs", "mount", "sched"] } +rtnetlink = {version = '0.14', features = ["tokio_socket"] } +netlink-packet-route = '0.19' +futures = '0.3' +log = '0.4' +env_logger = '0.11' +tokio = {version = '1', features = ["rt-multi-thread"] } +base64 = '0.22' +serde = { version = "1", features = ["derive"] } +serde_yaml = "0.9" [build-dependencies] cc = "1" diff --git a/build.rs b/build.rs index c3d4e16..ad40727 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,3 @@ - fn main() { cc::Build::new() .file("src/wireguard_manager/wireguard_wrapper.c") @@ -9,4 +8,26 @@ fn main() { .compile("wireguard.a"); println!("cargo::rerun-if-changed=src/wireguard.c"); + + + // The bindgen::Builder is the main entry point + // to bindgen, and lets you build up options for + // the resulting bindings. + let bindings = bindgen::Builder::default() + // The input header we would like to generate + // bindings for. + .header("src/wireguard_manager/wireguard_wrapper.h") + // Tell cargo to invalidate the built crate whenever any of the + // included header files changed. + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + // Finish the builder and generate the bindings. + .generate() + // Unwrap the Result and panic on failure. + .expect("Unable to generate bindings"); + + // Write the bindings to the $OUT_DIR/bindings.rs file. + //let out_path = PathBuf::from(env::var("OUT_DIR").unwrap()); + bindings + .write_to_file("src/wireguard_manager/wireguard_wrapper.rs") + .expect("Couldn't write bindings!"); } diff --git a/src/manage_interfaces/mod.rs b/src/manage_interfaces/mod.rs index 4ec681b..78ac60a 100644 --- a/src/manage_interfaces/mod.rs +++ b/src/manage_interfaces/mod.rs @@ -1,6 +1,4 @@ -use rtnetlink::{new_connection, Error, Handle}; -use netlink_packet_route::link::LinkMessage; -use std::net::IpAddr; +use rtnetlink::{new_connection, Error}; use std::os::fd::AsRawFd; use futures::TryStreamExt; mod netlink; @@ -29,7 +27,6 @@ pub fn configure_wireguard_interface( tokio::runtime::Runtime::new().unwrap().handle().block_on( async { let (connection, handle, _) = new_connection().unwrap(); tokio::spawn(connection); - //netlink::create_wireguard_interface(handle.clone(), interface_name.clone()).await?; let link = netlink::get_link_interface(handle.clone(), interface_name.clone()).await?; netlink::assign_ip(handle.clone(), link.clone(), interface_ip, prefix).await?; crate::wireguard_manager::add_properties::set_params(wg_pub_key, wg_priv_key, peer_ip, interface_name.clone()); @@ -48,51 +45,6 @@ pub fn set_interface_lo_up() -> Result<(), Error> { }) } -/*pub fn set_interface_up(interface: String) -> Result<(), Error> { - tokio::runtime::Runtime::new().unwrap().handle().block_on( async { - let (connection, handle, _) = new_connection().unwrap(); - tokio::spawn(connection); - let mut links = handle.link().get().match_name(interface).execute(); - if let Some(link) = links.try_next().await.unwrap() { - let index = link.header.index; - log::debug!("index:{}", index); - handle - .link() - .set(index) - .up() - .execute() - .await.unwrap() - } else { - log::debug!("no link link lo found"); - } - }); - Ok(()) -} - -pub fn create_wireguard_interface(interface: String) -> Result<(), Error> { - tokio::runtime::Runtime::new().unwrap().handle().block_on( async { - let (connection, handle, _) = new_connection().unwrap(); - tokio::spawn(connection); - handle.link().add().wireguard(interface).execute().await.unwrap(); - }); - Ok(()) -} - -pub async fn assign_ip(handle: Handle, link: LinkMessage, interface: String, ip: String, prefix: u8) -> Result<(), Error> { - let usable_ip: IpAddr = match ip.parse() { - Ok(ip_ok) => ip_ok, - Err(_e) => { - log::debug!("malformed ip"); - return Err(Error::InvalidIp(ip.into_bytes())); - }, - }; - handle - .address() - .add(link.header.index, usable_ip, prefix) - .execute() - .await -}*/ - pub fn get_inferfaces() -> Result<(), Error> { tokio::runtime::Runtime::new().unwrap().handle().block_on( async { let (connection, handle, _) = new_connection().unwrap(); diff --git a/src/manage_interfaces/netlink.rs b/src/manage_interfaces/netlink.rs index 8544db7..c961e05 100644 --- a/src/manage_interfaces/netlink.rs +++ b/src/manage_interfaces/netlink.rs @@ -1,4 +1,4 @@ -use rtnetlink::{new_connection, Error, Handle}; +use rtnetlink::{Error, Handle}; use netlink_packet_route::link::LinkMessage; use std::net::IpAddr; use futures::TryStreamExt; diff --git a/src/namespace/bind_interface.rs b/src/namespace/bind_interface.rs deleted file mode 100644 index 38f59de..0000000 --- a/src/namespace/bind_interface.rs +++ /dev/null @@ -1,139 +0,0 @@ -use nix::sched::{CloneFlags, clone, unshare, setns}; -use nix::sys::signal::Signal; -use crate::namespace::consts::{ - NET_NS_DIR, - STACK_SIZE -}; - -use futures::TryStreamExt; -use nix::fcntl::{open, OFlag}; -use nix::mount::{mount, MsFlags}; -use nix::unistd::{fork, ForkResult, Pid}; -use nix::sys::wait::{waitpid, WaitStatus}; -use nix::sys::stat::Mode; -use nix::sys::statvfs::{statvfs, FsFlags}; -use rtnetlink::{new_connection, Error, Handle, NetworkNamespace}; - -use std::env; -use std::fs::{File, OpenOptions}; -use std::path::{Path, PathBuf}; -use std::process::exit; -use std::os::unix::io::RawFd; -use std::os::fd::FromRawFd; - -pub fn run_in_namespace(f: F,ns_name: &String) -> Result<(), ()> where F:FnMut() + Copy { - // Configure networking in the child namespace: - // Fork a process that is set to the newly created namespace - // Here set the veth ip addr, routing tables etc. - // Unfortunately the NetworkNamespace interface of rtnetlink does - // not offer these functionalities - let mut tmp_stack: [u8; STACK_SIZE] = [0; STACK_SIZE]; - let mut flags = CloneFlags::empty(); - flags.insert(CloneFlags::CLONE_VM); - flags.insert(CloneFlags::CLONE_VFORK); - - unsafe { - match clone( - Box::new(|| run_child(f,&ns_name.clone())), - &mut tmp_stack, - flags, - Some(Signal::SIGCHLD as i32)) { - Ok(_pid) => Ok(()), - Err(_e) => { - return Err(()); - } - } - } - -} - -fn run_child(mut f: F, ns_name: &String) -> isize where F:FnMut() { - let res = prepare_namespace(ns_name); - - match res { - Err(_) => { - log::error!("Child process crashed"); - return -1; - } - Ok(()) => { - log::debug!("Child exited normally"); - f(); - return 0; - } - } -} - -fn prepare_namespace(ns_name: &String) -> Result<(), ()> { - // First create the network namespace - // NetworkNamespace::add(ns_name.to_string()).await.map_err(|e| { - // log::error!("Can not create namespace {}", e); - // }).unwrap(); - - // Open NS path - let ns_path = format!("{}/{}", NET_NS_DIR, ns_name); - log::debug!("ns_path:{}", ns_path); - let mut open_flags = OFlag::empty(); - open_flags.insert(OFlag::O_RDONLY); - open_flags.insert(OFlag::O_CLOEXEC); - - let fd = match open(Path::new(&ns_path), open_flags, Mode::empty()) { - Ok(raw_fd) => unsafe { - File::from_raw_fd(raw_fd) - } - Err(e) => { - log::error!("Can not open network namespace: {}", e); - return Err(()); - } - }; - // Switch to network namespace with CLONE_NEWNET - if let Err(e) = setns(fd, CloneFlags::CLONE_NEWNET) { - log::error!("Can not set namespace to target {}: {}", ns_name, e); - return Err(()); - } - // unshare with CLONE_NEWNS - if let Err(e) = unshare(CloneFlags::CLONE_NEWNS) { - log::error!("Can not unshare: {}", e); - return Err(()); - } - // mount blind the fs - // let's avoid that any mount propagates to the parent process - // mount_directory(None, &PathBuf::from("/"), vec![MsFlags::MS_REC, MsFlags::MS_PRIVATE])?; - let mut mount_flags = MsFlags::empty(); - mount_flags.insert(MsFlags::MS_REC); - mount_flags.insert(MsFlags::MS_PRIVATE); - if let Err(_e) = mount::(None, &PathBuf::from("/"), None, mount_flags, None) { - log::error!("Can not remount root directory"); - () - } - - // Now unmount /sys - let sys_path = PathBuf::from("/sys"); - mount_flags = MsFlags::empty(); - // Needed to respect the trait for NixPath - let ns_name_path = PathBuf::from(ns_name); - - // TODO do not exit for EINVAL error - // unmount_path(&sys_path)?; - // consider the case that a sysfs is not present - let stat_sys = match statvfs(&sys_path) - .map_err(|e| { - log::error!("Can not stat sys: {}", e); - }){ - Ok(stat) => stat, - Err(_e) => { - log::error!("Error in stat sys"); - return Err(()); - } - }; - if stat_sys.flags().contains(FsFlags::ST_RDONLY) { - mount_flags.insert(MsFlags::MS_RDONLY); - } - - // and remount a version of /sys that describes the network namespace - if let Err(e) = mount::(Some(&ns_name_path), &sys_path, Some("sysfs"), mount_flags, None) { - log::error!("Can not remount /sys to namespace: {}", e); - () - } - - Ok(()) -} diff --git a/src/namespace/consts.rs b/src/namespace/consts.rs index 2efe486..546b4f1 100644 --- a/src/namespace/consts.rs +++ b/src/namespace/consts.rs @@ -1,3 +1 @@ pub const NET_NS_DIR:&str = "/var/run/netns"; -pub const PROC_NS_DIR:&str = "/proc/self/ns/net"; -pub const STACK_SIZE: usize = 1024 * 1024; diff --git a/src/namespace/create_ns.rs b/src/namespace/create_ns.rs index af8022c..db377b6 100644 --- a/src/namespace/create_ns.rs +++ b/src/namespace/create_ns.rs @@ -7,11 +7,10 @@ use nix::unistd::{fork, ForkResult, Pid}; use nix::sys::wait::{waitpid, WaitStatus}; use nix::sys::stat::Mode; use nix::sys::statvfs::{statvfs, FsFlags}; -use std::os::unix::io::RawFd; use std::path::{Path, PathBuf}; use std::process::exit; -use std::fs::{File, OpenOptions}; +use std::fs::File; use std::os::fd::FromRawFd; pub fn run_in_namespace(f: F,ns_name: &String) -> Result<(), ()> where F:FnMut() + Copy { @@ -53,7 +52,7 @@ fn run_parent(child: Pid) -> Result<(), ()> { return Err(()); } } - WaitStatus::Signaled(_, signal, coredump) => { + WaitStatus::Signaled(_, _signal, _coredump) => { log::error!("Child process killed by signal"); return Err(()); } diff --git a/src/namespace/mod.rs b/src/namespace/mod.rs index b847c7a..3846e7d 100644 --- a/src/namespace/mod.rs +++ b/src/namespace/mod.rs @@ -1,3 +1,2 @@ pub mod create_ns; -pub mod bind_interface; mod consts; diff --git a/src/wireguard_manager/add_properties.rs b/src/wireguard_manager/add_properties.rs index 531c9fd..2a1b2dd 100644 --- a/src/wireguard_manager/add_properties.rs +++ b/src/wireguard_manager/add_properties.rs @@ -28,18 +28,10 @@ pub fn set_params(mut wg_pub_key: [u8; 32], CString::new(interface_name).unwrap().into_raw(), 51820, peer); - //let status_add_device = wireguard_wrapper::wg_add_device(device.name.as_ptr()); let status_set_device = wireguard_wrapper::wg_set_device(&mut device); - //println!("dispositivo: {}", CString::from_raw(device.name.as_mut_ptr()).to_str().unwrap()); - /*if ret { - println!("aƱade el dispositivo"); - //println!("dispositivo: {}", CString::from_raw(device.name.as_mut_ptr()).to_str().unwrap()); - ret = ret && (wireguard_wrapper::wg_set_device(&mut device) < 0); - }*/ - //ret = status_add_device >= 0 && status_set_device >= 0; ret = status_set_device >= 0; - log::debug!("Status: {}", ret); wireguard_wrapper::clean_device(&mut peer); } ret } + diff --git a/src/wireguard_manager/mod.rs b/src/wireguard_manager/mod.rs index 46db28f..3fa0c87 100644 --- a/src/wireguard_manager/mod.rs +++ b/src/wireguard_manager/mod.rs @@ -1,2 +1,3 @@ +#[allow(warnings)] mod wireguard_wrapper; pub mod add_properties; diff --git a/src/wireguard_manager/wireguard.rs b/src/wireguard_manager/wireguard.rs deleted file mode 100644 index 50c7803..0000000 --- a/src/wireguard_manager/wireguard.rs +++ /dev/null @@ -1,2437 +0,0 @@ -/* automatically generated by rust-bindgen 0.70.1 */ -#![allow(warnings)] - -#[repr(C)] -#[derive(Default)] -pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); -impl __IncompleteArrayField { - #[inline] - pub const fn new() -> Self { - __IncompleteArrayField(::std::marker::PhantomData, []) - } - #[inline] - pub fn as_ptr(&self) -> *const T { - self as *const _ as *const T - } - #[inline] - pub fn as_mut_ptr(&mut self) -> *mut T { - self as *mut _ as *mut T - } - #[inline] - pub unsafe fn as_slice(&self, len: usize) -> &[T] { - ::std::slice::from_raw_parts(self.as_ptr(), len) - } - #[inline] - pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { - ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) - } -} -impl ::std::fmt::Debug for __IncompleteArrayField { - fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - fmt.write_str("__IncompleteArrayField") - } -} -pub const __GENTOO_NOT_FREESTANDING: u32 = 1; -pub const _STDC_PREDEF_H: u32 = 1; -pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_60559_BFP__: u32 = 201404; -pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; -pub const __STDC_ISO_10646__: u32 = 201706; -pub const _NET_IF_H: u32 = 1; -pub const _FEATURES_H: u32 = 1; -pub const _DEFAULT_SOURCE: u32 = 1; -pub const __GLIBC_USE_ISOC2X: u32 = 0; -pub const __USE_ISOC11: u32 = 1; -pub const __USE_ISOC99: u32 = 1; -pub const __USE_ISOC95: u32 = 1; -pub const __USE_POSIX_IMPLICITLY: u32 = 1; -pub const _POSIX_SOURCE: u32 = 1; -pub const _POSIX_C_SOURCE: u32 = 200809; -pub const __USE_POSIX: u32 = 1; -pub const __USE_POSIX2: u32 = 1; -pub const __USE_POSIX199309: u32 = 1; -pub const __USE_POSIX199506: u32 = 1; -pub const __USE_XOPEN2K: u32 = 1; -pub const __USE_XOPEN2K8: u32 = 1; -pub const _ATFILE_SOURCE: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; -pub const __SYSCALL_WORDSIZE: u32 = 64; -pub const __TIMESIZE: u32 = 64; -pub const __USE_MISC: u32 = 1; -pub const __USE_ATFILE: u32 = 1; -pub const __USE_FORTIFY_LEVEL: u32 = 0; -pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; -pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; -pub const __GLIBC_USE_C2X_STRTOL: u32 = 0; -pub const __GNU_LIBRARY__: u32 = 6; -pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 39; -pub const _SYS_CDEFS_H: u32 = 1; -pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; -pub const __HAVE_GENERIC_SELECTION: u32 = 1; -pub const _SYS_TYPES_H: u32 = 1; -pub const _BITS_TYPES_H: u32 = 1; -pub const _BITS_TYPESIZES_H: u32 = 1; -pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; -pub const __INO_T_MATCHES_INO64_T: u32 = 1; -pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; -pub const __STATFS_MATCHES_STATFS64: u32 = 1; -pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; -pub const __FD_SETSIZE: u32 = 1024; -pub const _BITS_TIME64_H: u32 = 1; -pub const __clock_t_defined: u32 = 1; -pub const __clockid_t_defined: u32 = 1; -pub const __time_t_defined: u32 = 1; -pub const __timer_t_defined: u32 = 1; -pub const _BITS_STDINT_INTN_H: u32 = 1; -pub const __BIT_TYPES_DEFINED__: u32 = 1; -pub const _ENDIAN_H: u32 = 1; -pub const _BITS_ENDIAN_H: u32 = 1; -pub const __LITTLE_ENDIAN: u32 = 1234; -pub const __BIG_ENDIAN: u32 = 4321; -pub const __PDP_ENDIAN: u32 = 3412; -pub const _BITS_ENDIANNESS_H: u32 = 1; -pub const __BYTE_ORDER: u32 = 1234; -pub const __FLOAT_WORD_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const _BITS_BYTESWAP_H: u32 = 1; -pub const _BITS_UINTN_IDENTITY_H: u32 = 1; -pub const _SYS_SELECT_H: u32 = 1; -pub const __sigset_t_defined: u32 = 1; -pub const __timeval_defined: u32 = 1; -pub const _STRUCT_TIMESPEC: u32 = 1; -pub const FD_SETSIZE: u32 = 1024; -pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; -pub const _THREAD_SHARED_TYPES_H: u32 = 1; -pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; -pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; -pub const __have_pthread_attr_t: u32 = 1; -pub const _SYS_SOCKET_H: u32 = 1; -pub const __iovec_defined: u32 = 1; -pub const PF_UNSPEC: u32 = 0; -pub const PF_LOCAL: u32 = 1; -pub const PF_UNIX: u32 = 1; -pub const PF_FILE: u32 = 1; -pub const PF_INET: u32 = 2; -pub const PF_AX25: u32 = 3; -pub const PF_IPX: u32 = 4; -pub const PF_APPLETALK: u32 = 5; -pub const PF_NETROM: u32 = 6; -pub const PF_BRIDGE: u32 = 7; -pub const PF_ATMPVC: u32 = 8; -pub const PF_X25: u32 = 9; -pub const PF_INET6: u32 = 10; -pub const PF_ROSE: u32 = 11; -pub const PF_DECnet: u32 = 12; -pub const PF_NETBEUI: u32 = 13; -pub const PF_SECURITY: u32 = 14; -pub const PF_KEY: u32 = 15; -pub const PF_NETLINK: u32 = 16; -pub const PF_ROUTE: u32 = 16; -pub const PF_PACKET: u32 = 17; -pub const PF_ASH: u32 = 18; -pub const PF_ECONET: u32 = 19; -pub const PF_ATMSVC: u32 = 20; -pub const PF_RDS: u32 = 21; -pub const PF_SNA: u32 = 22; -pub const PF_IRDA: u32 = 23; -pub const PF_PPPOX: u32 = 24; -pub const PF_WANPIPE: u32 = 25; -pub const PF_LLC: u32 = 26; -pub const PF_IB: u32 = 27; -pub const PF_MPLS: u32 = 28; -pub const PF_CAN: u32 = 29; -pub const PF_TIPC: u32 = 30; -pub const PF_BLUETOOTH: u32 = 31; -pub const PF_IUCV: u32 = 32; -pub const PF_RXRPC: u32 = 33; -pub const PF_ISDN: u32 = 34; -pub const PF_PHONET: u32 = 35; -pub const PF_IEEE802154: u32 = 36; -pub const PF_CAIF: u32 = 37; -pub const PF_ALG: u32 = 38; -pub const PF_NFC: u32 = 39; -pub const PF_VSOCK: u32 = 40; -pub const PF_KCM: u32 = 41; -pub const PF_QIPCRTR: u32 = 42; -pub const PF_SMC: u32 = 43; -pub const PF_XDP: u32 = 44; -pub const PF_MCTP: u32 = 45; -pub const PF_MAX: u32 = 46; -pub const AF_UNSPEC: u32 = 0; -pub const AF_LOCAL: u32 = 1; -pub const AF_UNIX: u32 = 1; -pub const AF_FILE: u32 = 1; -pub const AF_INET: u32 = 2; -pub const AF_AX25: u32 = 3; -pub const AF_IPX: u32 = 4; -pub const AF_APPLETALK: u32 = 5; -pub const AF_NETROM: u32 = 6; -pub const AF_BRIDGE: u32 = 7; -pub const AF_ATMPVC: u32 = 8; -pub const AF_X25: u32 = 9; -pub const AF_INET6: u32 = 10; -pub const AF_ROSE: u32 = 11; -pub const AF_DECnet: u32 = 12; -pub const AF_NETBEUI: u32 = 13; -pub const AF_SECURITY: u32 = 14; -pub const AF_KEY: u32 = 15; -pub const AF_NETLINK: u32 = 16; -pub const AF_ROUTE: u32 = 16; -pub const AF_PACKET: u32 = 17; -pub const AF_ASH: u32 = 18; -pub const AF_ECONET: u32 = 19; -pub const AF_ATMSVC: u32 = 20; -pub const AF_RDS: u32 = 21; -pub const AF_SNA: u32 = 22; -pub const AF_IRDA: u32 = 23; -pub const AF_PPPOX: u32 = 24; -pub const AF_WANPIPE: u32 = 25; -pub const AF_LLC: u32 = 26; -pub const AF_IB: u32 = 27; -pub const AF_MPLS: u32 = 28; -pub const AF_CAN: u32 = 29; -pub const AF_TIPC: u32 = 30; -pub const AF_BLUETOOTH: u32 = 31; -pub const AF_IUCV: u32 = 32; -pub const AF_RXRPC: u32 = 33; -pub const AF_ISDN: u32 = 34; -pub const AF_PHONET: u32 = 35; -pub const AF_IEEE802154: u32 = 36; -pub const AF_CAIF: u32 = 37; -pub const AF_ALG: u32 = 38; -pub const AF_NFC: u32 = 39; -pub const AF_VSOCK: u32 = 40; -pub const AF_KCM: u32 = 41; -pub const AF_QIPCRTR: u32 = 42; -pub const AF_SMC: u32 = 43; -pub const AF_XDP: u32 = 44; -pub const AF_MCTP: u32 = 45; -pub const AF_MAX: u32 = 46; -pub const SOL_RAW: u32 = 255; -pub const SOL_DECNET: u32 = 261; -pub const SOL_X25: u32 = 262; -pub const SOL_PACKET: u32 = 263; -pub const SOL_ATM: u32 = 264; -pub const SOL_AAL: u32 = 265; -pub const SOL_IRDA: u32 = 266; -pub const SOL_NETBEUI: u32 = 267; -pub const SOL_LLC: u32 = 268; -pub const SOL_DCCP: u32 = 269; -pub const SOL_NETLINK: u32 = 270; -pub const SOL_TIPC: u32 = 271; -pub const SOL_RXRPC: u32 = 272; -pub const SOL_PPPOL2TP: u32 = 273; -pub const SOL_BLUETOOTH: u32 = 274; -pub const SOL_PNPIPE: u32 = 275; -pub const SOL_RDS: u32 = 276; -pub const SOL_IUCV: u32 = 277; -pub const SOL_CAIF: u32 = 278; -pub const SOL_ALG: u32 = 279; -pub const SOL_NFC: u32 = 280; -pub const SOL_KCM: u32 = 281; -pub const SOL_TLS: u32 = 282; -pub const SOL_XDP: u32 = 283; -pub const SOL_MPTCP: u32 = 284; -pub const SOL_MCTP: u32 = 285; -pub const SOL_SMC: u32 = 286; -pub const SOMAXCONN: u32 = 4096; -pub const _BITS_SOCKADDR_H: u32 = 1; -pub const _SS_SIZE: u32 = 128; -pub const __BITS_PER_LONG: u32 = 64; -pub const __BITS_PER_LONG_LONG: u32 = 64; -pub const FIOSETOWN: u32 = 35073; -pub const SIOCSPGRP: u32 = 35074; -pub const FIOGETOWN: u32 = 35075; -pub const SIOCGPGRP: u32 = 35076; -pub const SIOCATMARK: u32 = 35077; -pub const SIOCGSTAMP_OLD: u32 = 35078; -pub const SIOCGSTAMPNS_OLD: u32 = 35079; -pub const SOL_SOCKET: u32 = 1; -pub const SO_DEBUG: u32 = 1; -pub const SO_REUSEADDR: u32 = 2; -pub const SO_TYPE: u32 = 3; -pub const SO_ERROR: u32 = 4; -pub const SO_DONTROUTE: u32 = 5; -pub const SO_BROADCAST: u32 = 6; -pub const SO_SNDBUF: u32 = 7; -pub const SO_RCVBUF: u32 = 8; -pub const SO_SNDBUFFORCE: u32 = 32; -pub const SO_RCVBUFFORCE: u32 = 33; -pub const SO_KEEPALIVE: u32 = 9; -pub const SO_OOBINLINE: u32 = 10; -pub const SO_NO_CHECK: u32 = 11; -pub const SO_PRIORITY: u32 = 12; -pub const SO_LINGER: u32 = 13; -pub const SO_BSDCOMPAT: u32 = 14; -pub const SO_REUSEPORT: u32 = 15; -pub const SO_PASSCRED: u32 = 16; -pub const SO_PEERCRED: u32 = 17; -pub const SO_RCVLOWAT: u32 = 18; -pub const SO_SNDLOWAT: u32 = 19; -pub const SO_RCVTIMEO_OLD: u32 = 20; -pub const SO_SNDTIMEO_OLD: u32 = 21; -pub const SO_SECURITY_AUTHENTICATION: u32 = 22; -pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; -pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; -pub const SO_BINDTODEVICE: u32 = 25; -pub const SO_ATTACH_FILTER: u32 = 26; -pub const SO_DETACH_FILTER: u32 = 27; -pub const SO_GET_FILTER: u32 = 26; -pub const SO_PEERNAME: u32 = 28; -pub const SO_ACCEPTCONN: u32 = 30; -pub const SO_PEERSEC: u32 = 31; -pub const SO_PASSSEC: u32 = 34; -pub const SO_MARK: u32 = 36; -pub const SO_PROTOCOL: u32 = 38; -pub const SO_DOMAIN: u32 = 39; -pub const SO_RXQ_OVFL: u32 = 40; -pub const SO_WIFI_STATUS: u32 = 41; -pub const SCM_WIFI_STATUS: u32 = 41; -pub const SO_PEEK_OFF: u32 = 42; -pub const SO_NOFCS: u32 = 43; -pub const SO_LOCK_FILTER: u32 = 44; -pub const SO_SELECT_ERR_QUEUE: u32 = 45; -pub const SO_BUSY_POLL: u32 = 46; -pub const SO_MAX_PACING_RATE: u32 = 47; -pub const SO_BPF_EXTENSIONS: u32 = 48; -pub const SO_INCOMING_CPU: u32 = 49; -pub const SO_ATTACH_BPF: u32 = 50; -pub const SO_DETACH_BPF: u32 = 27; -pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; -pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; -pub const SO_CNX_ADVICE: u32 = 53; -pub const SCM_TIMESTAMPING_OPT_STATS: u32 = 54; -pub const SO_MEMINFO: u32 = 55; -pub const SO_INCOMING_NAPI_ID: u32 = 56; -pub const SO_COOKIE: u32 = 57; -pub const SCM_TIMESTAMPING_PKTINFO: u32 = 58; -pub const SO_PEERGROUPS: u32 = 59; -pub const SO_ZEROCOPY: u32 = 60; -pub const SO_TXTIME: u32 = 61; -pub const SCM_TXTIME: u32 = 61; -pub const SO_BINDTOIFINDEX: u32 = 62; -pub const SO_TIMESTAMP_OLD: u32 = 29; -pub const SO_TIMESTAMPNS_OLD: u32 = 35; -pub const SO_TIMESTAMPING_OLD: u32 = 37; -pub const SO_TIMESTAMP_NEW: u32 = 63; -pub const SO_TIMESTAMPNS_NEW: u32 = 64; -pub const SO_TIMESTAMPING_NEW: u32 = 65; -pub const SO_RCVTIMEO_NEW: u32 = 66; -pub const SO_SNDTIMEO_NEW: u32 = 67; -pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; -pub const SO_PREFER_BUSY_POLL: u32 = 69; -pub const SO_BUSY_POLL_BUDGET: u32 = 70; -pub const SO_NETNS_COOKIE: u32 = 71; -pub const SO_BUF_LOCK: u32 = 72; -pub const SO_RESERVE_MEM: u32 = 73; -pub const SO_TXREHASH: u32 = 74; -pub const SO_RCVMARK: u32 = 75; -pub const SO_PASSPIDFD: u32 = 76; -pub const SO_PEERPIDFD: u32 = 77; -pub const SO_TIMESTAMP: u32 = 29; -pub const SO_TIMESTAMPNS: u32 = 35; -pub const SO_TIMESTAMPING: u32 = 37; -pub const SO_RCVTIMEO: u32 = 20; -pub const SO_SNDTIMEO: u32 = 21; -pub const SCM_TIMESTAMP: u32 = 29; -pub const SCM_TIMESTAMPNS: u32 = 35; -pub const SCM_TIMESTAMPING: u32 = 37; -pub const __osockaddr_defined: u32 = 1; -pub const IF_NAMESIZE: u32 = 16; -pub const IFHWADDRLEN: u32 = 6; -pub const IFNAMSIZ: u32 = 16; -pub const _NETINET_IN_H: u32 = 1; -pub const _BITS_STDINT_UINTN_H: u32 = 1; -pub const __USE_KERNEL_IPV6_DEFS: u32 = 0; -pub const IP_OPTIONS: u32 = 4; -pub const IP_HDRINCL: u32 = 3; -pub const IP_TOS: u32 = 1; -pub const IP_TTL: u32 = 2; -pub const IP_RECVOPTS: u32 = 6; -pub const IP_RETOPTS: u32 = 7; -pub const IP_MULTICAST_IF: u32 = 32; -pub const IP_MULTICAST_TTL: u32 = 33; -pub const IP_MULTICAST_LOOP: u32 = 34; -pub const IP_ADD_MEMBERSHIP: u32 = 35; -pub const IP_DROP_MEMBERSHIP: u32 = 36; -pub const IP_UNBLOCK_SOURCE: u32 = 37; -pub const IP_BLOCK_SOURCE: u32 = 38; -pub const IP_ADD_SOURCE_MEMBERSHIP: u32 = 39; -pub const IP_DROP_SOURCE_MEMBERSHIP: u32 = 40; -pub const IP_MSFILTER: u32 = 41; -pub const MCAST_JOIN_GROUP: u32 = 42; -pub const MCAST_BLOCK_SOURCE: u32 = 43; -pub const MCAST_UNBLOCK_SOURCE: u32 = 44; -pub const MCAST_LEAVE_GROUP: u32 = 45; -pub const MCAST_JOIN_SOURCE_GROUP: u32 = 46; -pub const MCAST_LEAVE_SOURCE_GROUP: u32 = 47; -pub const MCAST_MSFILTER: u32 = 48; -pub const IP_MULTICAST_ALL: u32 = 49; -pub const IP_UNICAST_IF: u32 = 50; -pub const MCAST_EXCLUDE: u32 = 0; -pub const MCAST_INCLUDE: u32 = 1; -pub const IP_ROUTER_ALERT: u32 = 5; -pub const IP_PKTINFO: u32 = 8; -pub const IP_PKTOPTIONS: u32 = 9; -pub const IP_PMTUDISC: u32 = 10; -pub const IP_MTU_DISCOVER: u32 = 10; -pub const IP_RECVERR: u32 = 11; -pub const IP_RECVTTL: u32 = 12; -pub const IP_RECVTOS: u32 = 13; -pub const IP_MTU: u32 = 14; -pub const IP_FREEBIND: u32 = 15; -pub const IP_IPSEC_POLICY: u32 = 16; -pub const IP_XFRM_POLICY: u32 = 17; -pub const IP_PASSSEC: u32 = 18; -pub const IP_TRANSPARENT: u32 = 19; -pub const IP_ORIGDSTADDR: u32 = 20; -pub const IP_RECVORIGDSTADDR: u32 = 20; -pub const IP_MINTTL: u32 = 21; -pub const IP_NODEFRAG: u32 = 22; -pub const IP_CHECKSUM: u32 = 23; -pub const IP_BIND_ADDRESS_NO_PORT: u32 = 24; -pub const IP_RECVFRAGSIZE: u32 = 25; -pub const IP_RECVERR_RFC4884: u32 = 26; -pub const IP_PMTUDISC_DONT: u32 = 0; -pub const IP_PMTUDISC_WANT: u32 = 1; -pub const IP_PMTUDISC_DO: u32 = 2; -pub const IP_PMTUDISC_PROBE: u32 = 3; -pub const IP_PMTUDISC_INTERFACE: u32 = 4; -pub const IP_PMTUDISC_OMIT: u32 = 5; -pub const IP_LOCAL_PORT_RANGE: u32 = 51; -pub const IP_PROTOCOL: u32 = 52; -pub const SOL_IP: u32 = 0; -pub const IP_DEFAULT_MULTICAST_TTL: u32 = 1; -pub const IP_DEFAULT_MULTICAST_LOOP: u32 = 1; -pub const IP_MAX_MEMBERSHIPS: u32 = 20; -pub const IPV6_ADDRFORM: u32 = 1; -pub const IPV6_2292PKTINFO: u32 = 2; -pub const IPV6_2292HOPOPTS: u32 = 3; -pub const IPV6_2292DSTOPTS: u32 = 4; -pub const IPV6_2292RTHDR: u32 = 5; -pub const IPV6_2292PKTOPTIONS: u32 = 6; -pub const IPV6_CHECKSUM: u32 = 7; -pub const IPV6_2292HOPLIMIT: u32 = 8; -pub const IPV6_NEXTHOP: u32 = 9; -pub const IPV6_AUTHHDR: u32 = 10; -pub const IPV6_UNICAST_HOPS: u32 = 16; -pub const IPV6_MULTICAST_IF: u32 = 17; -pub const IPV6_MULTICAST_HOPS: u32 = 18; -pub const IPV6_MULTICAST_LOOP: u32 = 19; -pub const IPV6_JOIN_GROUP: u32 = 20; -pub const IPV6_LEAVE_GROUP: u32 = 21; -pub const IPV6_ROUTER_ALERT: u32 = 22; -pub const IPV6_MTU_DISCOVER: u32 = 23; -pub const IPV6_MTU: u32 = 24; -pub const IPV6_RECVERR: u32 = 25; -pub const IPV6_V6ONLY: u32 = 26; -pub const IPV6_JOIN_ANYCAST: u32 = 27; -pub const IPV6_LEAVE_ANYCAST: u32 = 28; -pub const IPV6_MULTICAST_ALL: u32 = 29; -pub const IPV6_ROUTER_ALERT_ISOLATE: u32 = 30; -pub const IPV6_RECVERR_RFC4884: u32 = 31; -pub const IPV6_IPSEC_POLICY: u32 = 34; -pub const IPV6_XFRM_POLICY: u32 = 35; -pub const IPV6_HDRINCL: u32 = 36; -pub const IPV6_RECVPKTINFO: u32 = 49; -pub const IPV6_PKTINFO: u32 = 50; -pub const IPV6_RECVHOPLIMIT: u32 = 51; -pub const IPV6_HOPLIMIT: u32 = 52; -pub const IPV6_RECVHOPOPTS: u32 = 53; -pub const IPV6_HOPOPTS: u32 = 54; -pub const IPV6_RTHDRDSTOPTS: u32 = 55; -pub const IPV6_RECVRTHDR: u32 = 56; -pub const IPV6_RTHDR: u32 = 57; -pub const IPV6_RECVDSTOPTS: u32 = 58; -pub const IPV6_DSTOPTS: u32 = 59; -pub const IPV6_RECVPATHMTU: u32 = 60; -pub const IPV6_PATHMTU: u32 = 61; -pub const IPV6_DONTFRAG: u32 = 62; -pub const IPV6_RECVTCLASS: u32 = 66; -pub const IPV6_TCLASS: u32 = 67; -pub const IPV6_AUTOFLOWLABEL: u32 = 70; -pub const IPV6_ADDR_PREFERENCES: u32 = 72; -pub const IPV6_MINHOPCOUNT: u32 = 73; -pub const IPV6_ORIGDSTADDR: u32 = 74; -pub const IPV6_RECVORIGDSTADDR: u32 = 74; -pub const IPV6_TRANSPARENT: u32 = 75; -pub const IPV6_UNICAST_IF: u32 = 76; -pub const IPV6_RECVFRAGSIZE: u32 = 77; -pub const IPV6_FREEBIND: u32 = 78; -pub const IPV6_ADD_MEMBERSHIP: u32 = 20; -pub const IPV6_DROP_MEMBERSHIP: u32 = 21; -pub const IPV6_RXHOPOPTS: u32 = 54; -pub const IPV6_RXDSTOPTS: u32 = 59; -pub const IPV6_PMTUDISC_DONT: u32 = 0; -pub const IPV6_PMTUDISC_WANT: u32 = 1; -pub const IPV6_PMTUDISC_DO: u32 = 2; -pub const IPV6_PMTUDISC_PROBE: u32 = 3; -pub const IPV6_PMTUDISC_INTERFACE: u32 = 4; -pub const IPV6_PMTUDISC_OMIT: u32 = 5; -pub const SOL_IPV6: u32 = 41; -pub const SOL_ICMPV6: u32 = 58; -pub const IPV6_RTHDR_LOOSE: u32 = 0; -pub const IPV6_RTHDR_STRICT: u32 = 1; -pub const IPV6_RTHDR_TYPE_0: u32 = 0; -pub const IN_CLASSA_NET: u32 = 4278190080; -pub const IN_CLASSA_NSHIFT: u32 = 24; -pub const IN_CLASSA_HOST: u32 = 16777215; -pub const IN_CLASSA_MAX: u32 = 128; -pub const IN_CLASSB_NET: u32 = 4294901760; -pub const IN_CLASSB_NSHIFT: u32 = 16; -pub const IN_CLASSB_HOST: u32 = 65535; -pub const IN_CLASSB_MAX: u32 = 65536; -pub const IN_CLASSC_NET: u32 = 4294967040; -pub const IN_CLASSC_NSHIFT: u32 = 8; -pub const IN_CLASSC_HOST: u32 = 255; -pub const IN_LOOPBACKNET: u32 = 127; -pub const INET_ADDRSTRLEN: u32 = 16; -pub const INET6_ADDRSTRLEN: u32 = 46; -pub const _TIME_H: u32 = 1; -pub const _BITS_TIME_H: u32 = 1; -pub const CLOCK_REALTIME: u32 = 0; -pub const CLOCK_MONOTONIC: u32 = 1; -pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2; -pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3; -pub const CLOCK_MONOTONIC_RAW: u32 = 4; -pub const CLOCK_REALTIME_COARSE: u32 = 5; -pub const CLOCK_MONOTONIC_COARSE: u32 = 6; -pub const CLOCK_BOOTTIME: u32 = 7; -pub const CLOCK_REALTIME_ALARM: u32 = 8; -pub const CLOCK_BOOTTIME_ALARM: u32 = 9; -pub const CLOCK_TAI: u32 = 11; -pub const TIMER_ABSTIME: u32 = 1; -pub const __struct_tm_defined: u32 = 1; -pub const __itimerspec_defined: u32 = 1; -pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; -pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; -pub const TIME_UTC: u32 = 1; -pub const _STDINT_H: u32 = 1; -pub const __GLIBC_USE_LIB_EXT2: u32 = 0; -pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; -pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; -pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; -pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; -pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; -pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; -pub const _BITS_WCHAR_H: u32 = 1; -pub const _BITS_STDINT_LEAST_H: u32 = 1; -pub const INT8_MIN: i32 = -128; -pub const INT16_MIN: i32 = -32768; -pub const INT32_MIN: i32 = -2147483648; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const UINT8_MAX: u32 = 255; -pub const UINT16_MAX: u32 = 65535; -pub const UINT32_MAX: u32 = 4294967295; -pub const INT_LEAST8_MIN: i32 = -128; -pub const INT_LEAST16_MIN: i32 = -32768; -pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST8_MAX: u32 = 127; -pub const INT_LEAST16_MAX: u32 = 32767; -pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const UINT_LEAST8_MAX: u32 = 255; -pub const UINT_LEAST16_MAX: u32 = 65535; -pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i64 = -9223372036854775808; -pub const INT_FAST32_MIN: i64 = -9223372036854775808; -pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u64 = 9223372036854775807; -pub const INT_FAST32_MAX: u64 = 9223372036854775807; -pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: i32 = -1; -pub const UINT_FAST32_MAX: i32 = -1; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const UINTPTR_MAX: i32 = -1; -pub const PTRDIFF_MIN: i64 = -9223372036854775808; -pub const PTRDIFF_MAX: u64 = 9223372036854775807; -pub const SIG_ATOMIC_MIN: i32 = -2147483648; -pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const SIZE_MAX: i32 = -1; -pub const WINT_MIN: u32 = 0; -pub const WINT_MAX: u32 = 4294967295; -pub const __bool_true_false_are_defined: u32 = 1; -pub const true_: u32 = 1; -pub const false_: u32 = 0; -pub type __u_char = ::std::os::raw::c_uchar; -pub type __u_short = ::std::os::raw::c_ushort; -pub type __u_int = ::std::os::raw::c_uint; -pub type __u_long = ::std::os::raw::c_ulong; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; -pub type __int_least8_t = __int8_t; -pub type __uint_least8_t = __uint8_t; -pub type __int_least16_t = __int16_t; -pub type __uint_least16_t = __uint16_t; -pub type __int_least32_t = __int32_t; -pub type __uint_least32_t = __uint32_t; -pub type __int_least64_t = __int64_t; -pub type __uint_least64_t = __uint64_t; -pub type __quad_t = ::std::os::raw::c_long; -pub type __u_quad_t = ::std::os::raw::c_ulong; -pub type __intmax_t = ::std::os::raw::c_long; -pub type __uintmax_t = ::std::os::raw::c_ulong; -pub type __dev_t = ::std::os::raw::c_ulong; -pub type __uid_t = ::std::os::raw::c_uint; -pub type __gid_t = ::std::os::raw::c_uint; -pub type __ino_t = ::std::os::raw::c_ulong; -pub type __ino64_t = ::std::os::raw::c_ulong; -pub type __mode_t = ::std::os::raw::c_uint; -pub type __nlink_t = ::std::os::raw::c_ulong; -pub type __off_t = ::std::os::raw::c_long; -pub type __off64_t = ::std::os::raw::c_long; -pub type __pid_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __fsid_t { - pub __val: [::std::os::raw::c_int; 2usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize]; - ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize]; - ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize]; -}; -pub type __clock_t = ::std::os::raw::c_long; -pub type __rlim_t = ::std::os::raw::c_ulong; -pub type __rlim64_t = ::std::os::raw::c_ulong; -pub type __id_t = ::std::os::raw::c_uint; -pub type __time_t = ::std::os::raw::c_long; -pub type __useconds_t = ::std::os::raw::c_uint; -pub type __suseconds_t = ::std::os::raw::c_long; -pub type __suseconds64_t = ::std::os::raw::c_long; -pub type __daddr_t = ::std::os::raw::c_int; -pub type __key_t = ::std::os::raw::c_int; -pub type __clockid_t = ::std::os::raw::c_int; -pub type __timer_t = *mut ::std::os::raw::c_void; -pub type __blksize_t = ::std::os::raw::c_long; -pub type __blkcnt_t = ::std::os::raw::c_long; -pub type __blkcnt64_t = ::std::os::raw::c_long; -pub type __fsblkcnt_t = ::std::os::raw::c_ulong; -pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; -pub type __fsword_t = ::std::os::raw::c_long; -pub type __ssize_t = ::std::os::raw::c_long; -pub type __syscall_slong_t = ::std::os::raw::c_long; -pub type __syscall_ulong_t = ::std::os::raw::c_ulong; -pub type __loff_t = __off64_t; -pub type __caddr_t = *mut ::std::os::raw::c_char; -pub type __intptr_t = ::std::os::raw::c_long; -pub type __socklen_t = ::std::os::raw::c_uint; -pub type __sig_atomic_t = ::std::os::raw::c_int; -pub type u_char = __u_char; -pub type u_short = __u_short; -pub type u_int = __u_int; -pub type u_long = __u_long; -pub type quad_t = __quad_t; -pub type u_quad_t = __u_quad_t; -pub type fsid_t = __fsid_t; -pub type loff_t = __loff_t; -pub type ino_t = __ino_t; -pub type dev_t = __dev_t; -pub type gid_t = __gid_t; -pub type mode_t = __mode_t; -pub type nlink_t = __nlink_t; -pub type uid_t = __uid_t; -pub type off_t = __off_t; -pub type pid_t = __pid_t; -pub type id_t = __id_t; -pub type daddr_t = __daddr_t; -pub type caddr_t = __caddr_t; -pub type key_t = __key_t; -pub type clock_t = __clock_t; -pub type clockid_t = __clockid_t; -pub type time_t = __time_t; -pub type timer_t = __timer_t; -pub type ulong = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_int8_t = __uint8_t; -pub type u_int16_t = __uint16_t; -pub type u_int32_t = __uint32_t; -pub type u_int64_t = __uint64_t; -pub type register_t = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sigset_t { - pub __val: [::std::os::raw::c_ulong; 16usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize]; - ["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize]; - ["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize]; -}; -pub type sigset_t = __sigset_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __time_t, - pub tv_usec: __suseconds_t, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of timeval"][::std::mem::size_of::() - 16usize]; - ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; - ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; - ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of timespec"][::std::mem::size_of::() - 16usize]; - ["Alignment of timespec"][::std::mem::align_of::() - 8usize]; - ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; - ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize]; -}; -pub type suseconds_t = __suseconds_t; -pub type __fd_mask = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub __fds_bits: [__fd_mask; 16usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of fd_set"][::std::mem::size_of::() - 128usize]; - ["Alignment of fd_set"][::std::mem::align_of::() - 8usize]; - ["Offset of field: fd_set::__fds_bits"][::std::mem::offset_of!(fd_set, __fds_bits) - 0usize]; -}; -pub type fd_mask = __fd_mask; -extern "C" { - pub fn select( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *mut timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pselect( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *const timespec, - __sigmask: *const __sigset_t, - ) -> ::std::os::raw::c_int; -} -pub type blksize_t = __blksize_t; -pub type blkcnt_t = __blkcnt_t; -pub type fsblkcnt_t = __fsblkcnt_t; -pub type fsfilcnt_t = __fsfilcnt_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __atomic_wide_counter { - pub __value64: ::std::os::raw::c_ulonglong, - pub __value32: __atomic_wide_counter__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __atomic_wide_counter__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __atomic_wide_counter__bindgen_ty_1"] - [::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>() - 8usize]; - ["Alignment of __atomic_wide_counter__bindgen_ty_1"] - [::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>() - 4usize]; - ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__low"] - [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __low) - 0usize]; - ["Offset of field: __atomic_wide_counter__bindgen_ty_1::__high"] - [::std::mem::offset_of!(__atomic_wide_counter__bindgen_ty_1, __high) - 4usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __atomic_wide_counter"][::std::mem::size_of::<__atomic_wide_counter>() - 8usize]; - ["Alignment of __atomic_wide_counter"] - [::std::mem::align_of::<__atomic_wide_counter>() - 8usize]; - ["Offset of field: __atomic_wide_counter::__value64"] - [::std::mem::offset_of!(__atomic_wide_counter, __value64) - 0usize]; - ["Offset of field: __atomic_wide_counter::__value32"] - [::std::mem::offset_of!(__atomic_wide_counter, __value32) - 0usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize]; - ["Alignment of __pthread_internal_list"] - [::std::mem::align_of::<__pthread_internal_list>() - 8usize]; - ["Offset of field: __pthread_internal_list::__prev"] - [::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize]; - ["Offset of field: __pthread_internal_list::__next"] - [::std::mem::offset_of!(__pthread_internal_list, __next) - 8usize]; -}; -pub type __pthread_list_t = __pthread_internal_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_slist { - pub __next: *mut __pthread_internal_slist, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __pthread_internal_slist"] - [::std::mem::size_of::<__pthread_internal_slist>() - 8usize]; - ["Alignment of __pthread_internal_slist"] - [::std::mem::align_of::<__pthread_internal_slist>() - 8usize]; - ["Offset of field: __pthread_internal_slist::__next"] - [::std::mem::offset_of!(__pthread_internal_slist, __next) - 0usize]; -}; -pub type __pthread_slist_t = __pthread_internal_slist; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_short, - pub __elision: ::std::os::raw::c_short, - pub __list: __pthread_list_t, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __pthread_mutex_s"][::std::mem::size_of::<__pthread_mutex_s>() - 40usize]; - ["Alignment of __pthread_mutex_s"][::std::mem::align_of::<__pthread_mutex_s>() - 8usize]; - ["Offset of field: __pthread_mutex_s::__lock"] - [::std::mem::offset_of!(__pthread_mutex_s, __lock) - 0usize]; - ["Offset of field: __pthread_mutex_s::__count"] - [::std::mem::offset_of!(__pthread_mutex_s, __count) - 4usize]; - ["Offset of field: __pthread_mutex_s::__owner"] - [::std::mem::offset_of!(__pthread_mutex_s, __owner) - 8usize]; - ["Offset of field: __pthread_mutex_s::__nusers"] - [::std::mem::offset_of!(__pthread_mutex_s, __nusers) - 12usize]; - ["Offset of field: __pthread_mutex_s::__kind"] - [::std::mem::offset_of!(__pthread_mutex_s, __kind) - 16usize]; - ["Offset of field: __pthread_mutex_s::__spins"] - [::std::mem::offset_of!(__pthread_mutex_s, __spins) - 20usize]; - ["Offset of field: __pthread_mutex_s::__elision"] - [::std::mem::offset_of!(__pthread_mutex_s, __elision) - 22usize]; - ["Offset of field: __pthread_mutex_s::__list"] - [::std::mem::offset_of!(__pthread_mutex_s, __list) - 24usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_rwlock_arch_t { - pub __readers: ::std::os::raw::c_uint, - pub __writers: ::std::os::raw::c_uint, - pub __wrphase_futex: ::std::os::raw::c_uint, - pub __writers_futex: ::std::os::raw::c_uint, - pub __pad3: ::std::os::raw::c_uint, - pub __pad4: ::std::os::raw::c_uint, - pub __cur_writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __rwelision: ::std::os::raw::c_schar, - pub __pad1: [::std::os::raw::c_uchar; 7usize], - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __pthread_rwlock_arch_t"][::std::mem::size_of::<__pthread_rwlock_arch_t>() - 56usize]; - ["Alignment of __pthread_rwlock_arch_t"] - [::std::mem::align_of::<__pthread_rwlock_arch_t>() - 8usize]; - ["Offset of field: __pthread_rwlock_arch_t::__readers"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __readers) - 0usize]; - ["Offset of field: __pthread_rwlock_arch_t::__writers"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers) - 4usize]; - ["Offset of field: __pthread_rwlock_arch_t::__wrphase_futex"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __wrphase_futex) - 8usize]; - ["Offset of field: __pthread_rwlock_arch_t::__writers_futex"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __writers_futex) - 12usize]; - ["Offset of field: __pthread_rwlock_arch_t::__pad3"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad3) - 16usize]; - ["Offset of field: __pthread_rwlock_arch_t::__pad4"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad4) - 20usize]; - ["Offset of field: __pthread_rwlock_arch_t::__cur_writer"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __cur_writer) - 24usize]; - ["Offset of field: __pthread_rwlock_arch_t::__shared"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __shared) - 28usize]; - ["Offset of field: __pthread_rwlock_arch_t::__rwelision"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __rwelision) - 32usize]; - ["Offset of field: __pthread_rwlock_arch_t::__pad1"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad1) - 33usize]; - ["Offset of field: __pthread_rwlock_arch_t::__pad2"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __pad2) - 40usize]; - ["Offset of field: __pthread_rwlock_arch_t::__flags"] - [::std::mem::offset_of!(__pthread_rwlock_arch_t, __flags) - 48usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __pthread_cond_s { - pub __wseq: __atomic_wide_counter, - pub __g1_start: __atomic_wide_counter, - pub __g_refs: [::std::os::raw::c_uint; 2usize], - pub __g_size: [::std::os::raw::c_uint; 2usize], - pub __g1_orig_size: ::std::os::raw::c_uint, - pub __wrefs: ::std::os::raw::c_uint, - pub __g_signals: [::std::os::raw::c_uint; 2usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __pthread_cond_s"][::std::mem::size_of::<__pthread_cond_s>() - 48usize]; - ["Alignment of __pthread_cond_s"][::std::mem::align_of::<__pthread_cond_s>() - 8usize]; - ["Offset of field: __pthread_cond_s::__wseq"] - [::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize]; - ["Offset of field: __pthread_cond_s::__g1_start"] - [::std::mem::offset_of!(__pthread_cond_s, __g1_start) - 8usize]; - ["Offset of field: __pthread_cond_s::__g_refs"] - [::std::mem::offset_of!(__pthread_cond_s, __g_refs) - 16usize]; - ["Offset of field: __pthread_cond_s::__g_size"] - [::std::mem::offset_of!(__pthread_cond_s, __g_size) - 24usize]; - ["Offset of field: __pthread_cond_s::__g1_orig_size"] - [::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 32usize]; - ["Offset of field: __pthread_cond_s::__wrefs"] - [::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 36usize]; - ["Offset of field: __pthread_cond_s::__g_signals"] - [::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 40usize]; -}; -pub type __tss_t = ::std::os::raw::c_uint; -pub type __thrd_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __once_flag { - pub __data: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __once_flag"][::std::mem::size_of::<__once_flag>() - 4usize]; - ["Alignment of __once_flag"][::std::mem::align_of::<__once_flag>() - 4usize]; - ["Offset of field: __once_flag::__data"][::std::mem::offset_of!(__once_flag, __data) - 0usize]; -}; -pub type pthread_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_mutexattr_t"][::std::mem::size_of::() - 4usize]; - ["Alignment of pthread_mutexattr_t"][::std::mem::align_of::() - 4usize]; - ["Offset of field: pthread_mutexattr_t::__size"] - [::std::mem::offset_of!(pthread_mutexattr_t, __size) - 0usize]; - ["Offset of field: pthread_mutexattr_t::__align"] - [::std::mem::offset_of!(pthread_mutexattr_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_condattr_t"][::std::mem::size_of::() - 4usize]; - ["Alignment of pthread_condattr_t"][::std::mem::align_of::() - 4usize]; - ["Offset of field: pthread_condattr_t::__size"] - [::std::mem::offset_of!(pthread_condattr_t, __size) - 0usize]; - ["Offset of field: pthread_condattr_t::__align"] - [::std::mem::offset_of!(pthread_condattr_t, __align) - 0usize]; -}; -pub type pthread_key_t = ::std::os::raw::c_uint; -pub type pthread_once_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_attr_t"][::std::mem::size_of::() - 56usize]; - ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_attr_t::__size"] - [::std::mem::offset_of!(pthread_attr_t, __size) - 0usize]; - ["Offset of field: pthread_attr_t::__align"] - [::std::mem::offset_of!(pthread_attr_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: __pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; - ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_mutex_t::__data"] - [::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize]; - ["Offset of field: pthread_mutex_t::__size"] - [::std::mem::offset_of!(pthread_mutex_t, __size) - 0usize]; - ["Offset of field: pthread_mutex_t::__align"] - [::std::mem::offset_of!(pthread_mutex_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: __pthread_cond_s, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; - ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_cond_t::__data"] - [::std::mem::offset_of!(pthread_cond_t, __data) - 0usize]; - ["Offset of field: pthread_cond_t::__size"] - [::std::mem::offset_of!(pthread_cond_t, __size) - 0usize]; - ["Offset of field: pthread_cond_t::__align"] - [::std::mem::offset_of!(pthread_cond_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlock_t { - pub __data: __pthread_rwlock_arch_t, - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 56usize]; - ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_rwlock_t::__data"] - [::std::mem::offset_of!(pthread_rwlock_t, __data) - 0usize]; - ["Offset of field: pthread_rwlock_t::__size"] - [::std::mem::offset_of!(pthread_rwlock_t, __size) - 0usize]; - ["Offset of field: pthread_rwlock_t::__align"] - [::std::mem::offset_of!(pthread_rwlock_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlockattr_t { - pub __size: [::std::os::raw::c_char; 8usize], - pub __align: ::std::os::raw::c_long, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_rwlockattr_t"][::std::mem::size_of::() - 8usize]; - ["Alignment of pthread_rwlockattr_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_rwlockattr_t::__size"] - [::std::mem::offset_of!(pthread_rwlockattr_t, __size) - 0usize]; - ["Offset of field: pthread_rwlockattr_t::__align"] - [::std::mem::offset_of!(pthread_rwlockattr_t, __align) - 0usize]; -}; -pub type pthread_spinlock_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], - pub __align: ::std::os::raw::c_long, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; - ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 8usize]; - ["Offset of field: pthread_barrier_t::__size"] - [::std::mem::offset_of!(pthread_barrier_t, __size) - 0usize]; - ["Offset of field: pthread_barrier_t::__align"] - [::std::mem::offset_of!(pthread_barrier_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of pthread_barrierattr_t"][::std::mem::size_of::() - 4usize]; - ["Alignment of pthread_barrierattr_t"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: pthread_barrierattr_t::__size"] - [::std::mem::offset_of!(pthread_barrierattr_t, __size) - 0usize]; - ["Offset of field: pthread_barrierattr_t::__align"] - [::std::mem::offset_of!(pthread_barrierattr_t, __align) - 0usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct iovec { - pub iov_base: *mut ::std::os::raw::c_void, - pub iov_len: usize, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of iovec"][::std::mem::size_of::() - 16usize]; - ["Alignment of iovec"][::std::mem::align_of::() - 8usize]; - ["Offset of field: iovec::iov_base"][::std::mem::offset_of!(iovec, iov_base) - 0usize]; - ["Offset of field: iovec::iov_len"][::std::mem::offset_of!(iovec, iov_len) - 8usize]; -}; -pub type socklen_t = __socklen_t; -pub const __socket_type_SOCK_STREAM: __socket_type = 1; -pub const __socket_type_SOCK_DGRAM: __socket_type = 2; -pub const __socket_type_SOCK_RAW: __socket_type = 3; -pub const __socket_type_SOCK_RDM: __socket_type = 4; -pub const __socket_type_SOCK_SEQPACKET: __socket_type = 5; -pub const __socket_type_SOCK_DCCP: __socket_type = 6; -pub const __socket_type_SOCK_PACKET: __socket_type = 10; -pub const __socket_type_SOCK_CLOEXEC: __socket_type = 524288; -pub const __socket_type_SOCK_NONBLOCK: __socket_type = 2048; -pub type __socket_type = ::std::os::raw::c_uint; -pub type sa_family_t = ::std::os::raw::c_ushort; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sockaddr { - pub sa_family: sa_family_t, - pub sa_data: [::std::os::raw::c_char; 14usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of sockaddr"][::std::mem::size_of::() - 16usize]; - ["Alignment of sockaddr"][::std::mem::align_of::() - 2usize]; - ["Offset of field: sockaddr::sa_family"][::std::mem::offset_of!(sockaddr, sa_family) - 0usize]; - ["Offset of field: sockaddr::sa_data"][::std::mem::offset_of!(sockaddr, sa_data) - 2usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sockaddr_storage { - pub ss_family: sa_family_t, - pub __ss_padding: [::std::os::raw::c_char; 118usize], - pub __ss_align: ::std::os::raw::c_ulong, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of sockaddr_storage"][::std::mem::size_of::() - 128usize]; - ["Alignment of sockaddr_storage"][::std::mem::align_of::() - 8usize]; - ["Offset of field: sockaddr_storage::ss_family"] - [::std::mem::offset_of!(sockaddr_storage, ss_family) - 0usize]; - ["Offset of field: sockaddr_storage::__ss_padding"] - [::std::mem::offset_of!(sockaddr_storage, __ss_padding) - 2usize]; - ["Offset of field: sockaddr_storage::__ss_align"] - [::std::mem::offset_of!(sockaddr_storage, __ss_align) - 120usize]; -}; -pub const MSG_OOB: _bindgen_ty_1 = 1; -pub const MSG_PEEK: _bindgen_ty_1 = 2; -pub const MSG_DONTROUTE: _bindgen_ty_1 = 4; -pub const MSG_CTRUNC: _bindgen_ty_1 = 8; -pub const MSG_PROXY: _bindgen_ty_1 = 16; -pub const MSG_TRUNC: _bindgen_ty_1 = 32; -pub const MSG_DONTWAIT: _bindgen_ty_1 = 64; -pub const MSG_EOR: _bindgen_ty_1 = 128; -pub const MSG_WAITALL: _bindgen_ty_1 = 256; -pub const MSG_FIN: _bindgen_ty_1 = 512; -pub const MSG_SYN: _bindgen_ty_1 = 1024; -pub const MSG_CONFIRM: _bindgen_ty_1 = 2048; -pub const MSG_RST: _bindgen_ty_1 = 4096; -pub const MSG_ERRQUEUE: _bindgen_ty_1 = 8192; -pub const MSG_NOSIGNAL: _bindgen_ty_1 = 16384; -pub const MSG_MORE: _bindgen_ty_1 = 32768; -pub const MSG_WAITFORONE: _bindgen_ty_1 = 65536; -pub const MSG_BATCH: _bindgen_ty_1 = 262144; -pub const MSG_ZEROCOPY: _bindgen_ty_1 = 67108864; -pub const MSG_FASTOPEN: _bindgen_ty_1 = 536870912; -pub const MSG_CMSG_CLOEXEC: _bindgen_ty_1 = 1073741824; -pub type _bindgen_ty_1 = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct msghdr { - pub msg_name: *mut ::std::os::raw::c_void, - pub msg_namelen: socklen_t, - pub msg_iov: *mut iovec, - pub msg_iovlen: usize, - pub msg_control: *mut ::std::os::raw::c_void, - pub msg_controllen: usize, - pub msg_flags: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of msghdr"][::std::mem::size_of::() - 56usize]; - ["Alignment of msghdr"][::std::mem::align_of::() - 8usize]; - ["Offset of field: msghdr::msg_name"][::std::mem::offset_of!(msghdr, msg_name) - 0usize]; - ["Offset of field: msghdr::msg_namelen"][::std::mem::offset_of!(msghdr, msg_namelen) - 8usize]; - ["Offset of field: msghdr::msg_iov"][::std::mem::offset_of!(msghdr, msg_iov) - 16usize]; - ["Offset of field: msghdr::msg_iovlen"][::std::mem::offset_of!(msghdr, msg_iovlen) - 24usize]; - ["Offset of field: msghdr::msg_control"][::std::mem::offset_of!(msghdr, msg_control) - 32usize]; - ["Offset of field: msghdr::msg_controllen"] - [::std::mem::offset_of!(msghdr, msg_controllen) - 40usize]; - ["Offset of field: msghdr::msg_flags"][::std::mem::offset_of!(msghdr, msg_flags) - 48usize]; -}; -#[repr(C)] -#[derive(Debug)] -pub struct cmsghdr { - pub cmsg_len: usize, - pub cmsg_level: ::std::os::raw::c_int, - pub cmsg_type: ::std::os::raw::c_int, - pub __cmsg_data: __IncompleteArrayField<::std::os::raw::c_uchar>, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of cmsghdr"][::std::mem::size_of::() - 16usize]; - ["Alignment of cmsghdr"][::std::mem::align_of::() - 8usize]; - ["Offset of field: cmsghdr::cmsg_len"][::std::mem::offset_of!(cmsghdr, cmsg_len) - 0usize]; - ["Offset of field: cmsghdr::cmsg_level"][::std::mem::offset_of!(cmsghdr, cmsg_level) - 8usize]; - ["Offset of field: cmsghdr::cmsg_type"][::std::mem::offset_of!(cmsghdr, cmsg_type) - 12usize]; - ["Offset of field: cmsghdr::__cmsg_data"] - [::std::mem::offset_of!(cmsghdr, __cmsg_data) - 16usize]; -}; -extern "C" { - pub fn __cmsg_nxthdr(__mhdr: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; -} -pub const SCM_RIGHTS: _bindgen_ty_2 = 1; -pub type _bindgen_ty_2 = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __kernel_fd_set { - pub fds_bits: [::std::os::raw::c_ulong; 16usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; - ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 8usize]; - ["Offset of field: __kernel_fd_set::fds_bits"] - [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; -}; -pub type __kernel_sighandler_t = - ::std::option::Option; -pub type __kernel_key_t = ::std::os::raw::c_int; -pub type __kernel_mqd_t = ::std::os::raw::c_int; -pub type __kernel_old_uid_t = ::std::os::raw::c_ushort; -pub type __kernel_old_gid_t = ::std::os::raw::c_ushort; -pub type __kernel_old_dev_t = ::std::os::raw::c_ulong; -pub type __kernel_long_t = ::std::os::raw::c_long; -pub type __kernel_ulong_t = ::std::os::raw::c_ulong; -pub type __kernel_ino_t = __kernel_ulong_t; -pub type __kernel_mode_t = ::std::os::raw::c_uint; -pub type __kernel_pid_t = ::std::os::raw::c_int; -pub type __kernel_ipc_pid_t = ::std::os::raw::c_int; -pub type __kernel_uid_t = ::std::os::raw::c_uint; -pub type __kernel_gid_t = ::std::os::raw::c_uint; -pub type __kernel_suseconds_t = __kernel_long_t; -pub type __kernel_daddr_t = ::std::os::raw::c_int; -pub type __kernel_uid32_t = ::std::os::raw::c_uint; -pub type __kernel_gid32_t = ::std::os::raw::c_uint; -pub type __kernel_size_t = __kernel_ulong_t; -pub type __kernel_ssize_t = __kernel_long_t; -pub type __kernel_ptrdiff_t = __kernel_long_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __kernel_fsid_t { - pub val: [::std::os::raw::c_int; 2usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; - ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; - ["Offset of field: __kernel_fsid_t::val"] - [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; -}; -pub type __kernel_off_t = __kernel_long_t; -pub type __kernel_loff_t = ::std::os::raw::c_longlong; -pub type __kernel_old_time_t = __kernel_long_t; -pub type __kernel_time_t = __kernel_long_t; -pub type __kernel_time64_t = ::std::os::raw::c_longlong; -pub type __kernel_clock_t = __kernel_long_t; -pub type __kernel_timer_t = ::std::os::raw::c_int; -pub type __kernel_clockid_t = ::std::os::raw::c_int; -pub type __kernel_caddr_t = *mut ::std::os::raw::c_char; -pub type __kernel_uid16_t = ::std::os::raw::c_ushort; -pub type __kernel_gid16_t = ::std::os::raw::c_ushort; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct linger { - pub l_onoff: ::std::os::raw::c_int, - pub l_linger: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of linger"][::std::mem::size_of::() - 8usize]; - ["Alignment of linger"][::std::mem::align_of::() - 4usize]; - ["Offset of field: linger::l_onoff"][::std::mem::offset_of!(linger, l_onoff) - 0usize]; - ["Offset of field: linger::l_linger"][::std::mem::offset_of!(linger, l_linger) - 4usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct osockaddr { - pub sa_family: ::std::os::raw::c_ushort, - pub sa_data: [::std::os::raw::c_uchar; 14usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of osockaddr"][::std::mem::size_of::() - 16usize]; - ["Alignment of osockaddr"][::std::mem::align_of::() - 2usize]; - ["Offset of field: osockaddr::sa_family"] - [::std::mem::offset_of!(osockaddr, sa_family) - 0usize]; - ["Offset of field: osockaddr::sa_data"][::std::mem::offset_of!(osockaddr, sa_data) - 2usize]; -}; -pub const SHUT_RD: _bindgen_ty_3 = 0; -pub const SHUT_WR: _bindgen_ty_3 = 1; -pub const SHUT_RDWR: _bindgen_ty_3 = 2; -pub type _bindgen_ty_3 = ::std::os::raw::c_uint; -extern "C" { - pub fn socket( - __domain: ::std::os::raw::c_int, - __type: ::std::os::raw::c_int, - __protocol: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn socketpair( - __domain: ::std::os::raw::c_int, - __type: ::std::os::raw::c_int, - __protocol: ::std::os::raw::c_int, - __fds: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bind( - __fd: ::std::os::raw::c_int, - __addr: *const sockaddr, - __len: socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getsockname( - __fd: ::std::os::raw::c_int, - __addr: *mut sockaddr, - __len: *mut socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn connect( - __fd: ::std::os::raw::c_int, - __addr: *const sockaddr, - __len: socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getpeername( - __fd: ::std::os::raw::c_int, - __addr: *mut sockaddr, - __len: *mut socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn send( - __fd: ::std::os::raw::c_int, - __buf: *const ::std::os::raw::c_void, - __n: usize, - __flags: ::std::os::raw::c_int, - ) -> isize; -} -extern "C" { - pub fn recv( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_void, - __n: usize, - __flags: ::std::os::raw::c_int, - ) -> isize; -} -extern "C" { - pub fn sendto( - __fd: ::std::os::raw::c_int, - __buf: *const ::std::os::raw::c_void, - __n: usize, - __flags: ::std::os::raw::c_int, - __addr: *const sockaddr, - __addr_len: socklen_t, - ) -> isize; -} -extern "C" { - pub fn recvfrom( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_void, - __n: usize, - __flags: ::std::os::raw::c_int, - __addr: *mut sockaddr, - __addr_len: *mut socklen_t, - ) -> isize; -} -extern "C" { - pub fn sendmsg( - __fd: ::std::os::raw::c_int, - __message: *const msghdr, - __flags: ::std::os::raw::c_int, - ) -> isize; -} -extern "C" { - pub fn recvmsg( - __fd: ::std::os::raw::c_int, - __message: *mut msghdr, - __flags: ::std::os::raw::c_int, - ) -> isize; -} -extern "C" { - pub fn getsockopt( - __fd: ::std::os::raw::c_int, - __level: ::std::os::raw::c_int, - __optname: ::std::os::raw::c_int, - __optval: *mut ::std::os::raw::c_void, - __optlen: *mut socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setsockopt( - __fd: ::std::os::raw::c_int, - __level: ::std::os::raw::c_int, - __optname: ::std::os::raw::c_int, - __optval: *const ::std::os::raw::c_void, - __optlen: socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn listen(__fd: ::std::os::raw::c_int, __n: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn accept( - __fd: ::std::os::raw::c_int, - __addr: *mut sockaddr, - __addr_len: *mut socklen_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn shutdown( - __fd: ::std::os::raw::c_int, - __how: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sockatmark(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isfdtype( - __fd: ::std::os::raw::c_int, - __fdtype: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct if_nameindex { - pub if_index: ::std::os::raw::c_uint, - pub if_name: *mut ::std::os::raw::c_char, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of if_nameindex"][::std::mem::size_of::() - 16usize]; - ["Alignment of if_nameindex"][::std::mem::align_of::() - 8usize]; - ["Offset of field: if_nameindex::if_index"] - [::std::mem::offset_of!(if_nameindex, if_index) - 0usize]; - ["Offset of field: if_nameindex::if_name"] - [::std::mem::offset_of!(if_nameindex, if_name) - 8usize]; -}; -pub const IFF_UP: _bindgen_ty_4 = 1; -pub const IFF_BROADCAST: _bindgen_ty_4 = 2; -pub const IFF_DEBUG: _bindgen_ty_4 = 4; -pub const IFF_LOOPBACK: _bindgen_ty_4 = 8; -pub const IFF_POINTOPOINT: _bindgen_ty_4 = 16; -pub const IFF_NOTRAILERS: _bindgen_ty_4 = 32; -pub const IFF_RUNNING: _bindgen_ty_4 = 64; -pub const IFF_NOARP: _bindgen_ty_4 = 128; -pub const IFF_PROMISC: _bindgen_ty_4 = 256; -pub const IFF_ALLMULTI: _bindgen_ty_4 = 512; -pub const IFF_MASTER: _bindgen_ty_4 = 1024; -pub const IFF_SLAVE: _bindgen_ty_4 = 2048; -pub const IFF_MULTICAST: _bindgen_ty_4 = 4096; -pub const IFF_PORTSEL: _bindgen_ty_4 = 8192; -pub const IFF_AUTOMEDIA: _bindgen_ty_4 = 16384; -pub const IFF_DYNAMIC: _bindgen_ty_4 = 32768; -pub type _bindgen_ty_4 = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct ifaddr { - pub ifa_addr: sockaddr, - pub ifa_ifu: ifaddr__bindgen_ty_1, - pub ifa_ifp: *mut iface, - pub ifa_next: *mut ifaddr, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union ifaddr__bindgen_ty_1 { - pub ifu_broadaddr: sockaddr, - pub ifu_dstaddr: sockaddr, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifaddr__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of ifaddr__bindgen_ty_1"][::std::mem::align_of::() - 2usize]; - ["Offset of field: ifaddr__bindgen_ty_1::ifu_broadaddr"] - [::std::mem::offset_of!(ifaddr__bindgen_ty_1, ifu_broadaddr) - 0usize]; - ["Offset of field: ifaddr__bindgen_ty_1::ifu_dstaddr"] - [::std::mem::offset_of!(ifaddr__bindgen_ty_1, ifu_dstaddr) - 0usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifaddr"][::std::mem::size_of::() - 48usize]; - ["Alignment of ifaddr"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifaddr::ifa_addr"][::std::mem::offset_of!(ifaddr, ifa_addr) - 0usize]; - ["Offset of field: ifaddr::ifa_ifu"][::std::mem::offset_of!(ifaddr, ifa_ifu) - 16usize]; - ["Offset of field: ifaddr::ifa_ifp"][::std::mem::offset_of!(ifaddr, ifa_ifp) - 32usize]; - ["Offset of field: ifaddr::ifa_next"][::std::mem::offset_of!(ifaddr, ifa_next) - 40usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ifmap { - pub mem_start: ::std::os::raw::c_ulong, - pub mem_end: ::std::os::raw::c_ulong, - pub base_addr: ::std::os::raw::c_ushort, - pub irq: ::std::os::raw::c_uchar, - pub dma: ::std::os::raw::c_uchar, - pub port: ::std::os::raw::c_uchar, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifmap"][::std::mem::size_of::() - 24usize]; - ["Alignment of ifmap"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifmap::mem_start"][::std::mem::offset_of!(ifmap, mem_start) - 0usize]; - ["Offset of field: ifmap::mem_end"][::std::mem::offset_of!(ifmap, mem_end) - 8usize]; - ["Offset of field: ifmap::base_addr"][::std::mem::offset_of!(ifmap, base_addr) - 16usize]; - ["Offset of field: ifmap::irq"][::std::mem::offset_of!(ifmap, irq) - 18usize]; - ["Offset of field: ifmap::dma"][::std::mem::offset_of!(ifmap, dma) - 19usize]; - ["Offset of field: ifmap::port"][::std::mem::offset_of!(ifmap, port) - 20usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct ifreq { - pub ifr_ifrn: ifreq__bindgen_ty_1, - pub ifr_ifru: ifreq__bindgen_ty_2, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union ifreq__bindgen_ty_1 { - pub ifrn_name: [::std::os::raw::c_char; 16usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifreq__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of ifreq__bindgen_ty_1"][::std::mem::align_of::() - 1usize]; - ["Offset of field: ifreq__bindgen_ty_1::ifrn_name"] - [::std::mem::offset_of!(ifreq__bindgen_ty_1, ifrn_name) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub union ifreq__bindgen_ty_2 { - pub ifru_addr: sockaddr, - pub ifru_dstaddr: sockaddr, - pub ifru_broadaddr: sockaddr, - pub ifru_netmask: sockaddr, - pub ifru_hwaddr: sockaddr, - pub ifru_flags: ::std::os::raw::c_short, - pub ifru_ivalue: ::std::os::raw::c_int, - pub ifru_mtu: ::std::os::raw::c_int, - pub ifru_map: ifmap, - pub ifru_slave: [::std::os::raw::c_char; 16usize], - pub ifru_newname: [::std::os::raw::c_char; 16usize], - pub ifru_data: __caddr_t, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifreq__bindgen_ty_2"][::std::mem::size_of::() - 24usize]; - ["Alignment of ifreq__bindgen_ty_2"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_addr"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_addr) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_dstaddr"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_dstaddr) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_broadaddr"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_broadaddr) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_netmask"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_netmask) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_hwaddr"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_hwaddr) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_flags"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_flags) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_ivalue"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_ivalue) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_mtu"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_mtu) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_map"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_map) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_slave"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_slave) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_newname"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_newname) - 0usize]; - ["Offset of field: ifreq__bindgen_ty_2::ifru_data"] - [::std::mem::offset_of!(ifreq__bindgen_ty_2, ifru_data) - 0usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifreq"][::std::mem::size_of::() - 40usize]; - ["Alignment of ifreq"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifreq::ifr_ifrn"][::std::mem::offset_of!(ifreq, ifr_ifrn) - 0usize]; - ["Offset of field: ifreq::ifr_ifru"][::std::mem::offset_of!(ifreq, ifr_ifru) - 16usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct ifconf { - pub ifc_len: ::std::os::raw::c_int, - pub ifc_ifcu: ifconf__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union ifconf__bindgen_ty_1 { - pub ifcu_buf: __caddr_t, - pub ifcu_req: *mut ifreq, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifconf__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; - ["Alignment of ifconf__bindgen_ty_1"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifconf__bindgen_ty_1::ifcu_buf"] - [::std::mem::offset_of!(ifconf__bindgen_ty_1, ifcu_buf) - 0usize]; - ["Offset of field: ifconf__bindgen_ty_1::ifcu_req"] - [::std::mem::offset_of!(ifconf__bindgen_ty_1, ifcu_req) - 0usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ifconf"][::std::mem::size_of::() - 16usize]; - ["Alignment of ifconf"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ifconf::ifc_len"][::std::mem::offset_of!(ifconf, ifc_len) - 0usize]; - ["Offset of field: ifconf::ifc_ifcu"][::std::mem::offset_of!(ifconf, ifc_ifcu) - 8usize]; -}; -extern "C" { - pub fn if_nametoindex(__ifname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn if_indextoname( - __ifindex: ::std::os::raw::c_uint, - __ifname: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn if_nameindex() -> *mut if_nameindex; -} -extern "C" { - pub fn if_freenameindex(__ptr: *mut if_nameindex); -} -pub type in_addr_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct in_addr { - pub s_addr: in_addr_t, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of in_addr"][::std::mem::size_of::() - 4usize]; - ["Alignment of in_addr"][::std::mem::align_of::() - 4usize]; - ["Offset of field: in_addr::s_addr"][::std::mem::offset_of!(in_addr, s_addr) - 0usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ip_opts { - pub ip_dst: in_addr, - pub ip_opts: [::std::os::raw::c_char; 40usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ip_opts"][::std::mem::size_of::() - 44usize]; - ["Alignment of ip_opts"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ip_opts::ip_dst"][::std::mem::offset_of!(ip_opts, ip_dst) - 0usize]; - ["Offset of field: ip_opts::ip_opts"][::std::mem::offset_of!(ip_opts, ip_opts) - 4usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct in_pktinfo { - pub ipi_ifindex: ::std::os::raw::c_int, - pub ipi_spec_dst: in_addr, - pub ipi_addr: in_addr, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of in_pktinfo"][::std::mem::size_of::() - 12usize]; - ["Alignment of in_pktinfo"][::std::mem::align_of::() - 4usize]; - ["Offset of field: in_pktinfo::ipi_ifindex"] - [::std::mem::offset_of!(in_pktinfo, ipi_ifindex) - 0usize]; - ["Offset of field: in_pktinfo::ipi_spec_dst"] - [::std::mem::offset_of!(in_pktinfo, ipi_spec_dst) - 4usize]; - ["Offset of field: in_pktinfo::ipi_addr"] - [::std::mem::offset_of!(in_pktinfo, ipi_addr) - 8usize]; -}; -pub const IPPROTO_IP: _bindgen_ty_5 = 0; -pub const IPPROTO_ICMP: _bindgen_ty_5 = 1; -pub const IPPROTO_IGMP: _bindgen_ty_5 = 2; -pub const IPPROTO_IPIP: _bindgen_ty_5 = 4; -pub const IPPROTO_TCP: _bindgen_ty_5 = 6; -pub const IPPROTO_EGP: _bindgen_ty_5 = 8; -pub const IPPROTO_PUP: _bindgen_ty_5 = 12; -pub const IPPROTO_UDP: _bindgen_ty_5 = 17; -pub const IPPROTO_IDP: _bindgen_ty_5 = 22; -pub const IPPROTO_TP: _bindgen_ty_5 = 29; -pub const IPPROTO_DCCP: _bindgen_ty_5 = 33; -pub const IPPROTO_IPV6: _bindgen_ty_5 = 41; -pub const IPPROTO_RSVP: _bindgen_ty_5 = 46; -pub const IPPROTO_GRE: _bindgen_ty_5 = 47; -pub const IPPROTO_ESP: _bindgen_ty_5 = 50; -pub const IPPROTO_AH: _bindgen_ty_5 = 51; -pub const IPPROTO_MTP: _bindgen_ty_5 = 92; -pub const IPPROTO_BEETPH: _bindgen_ty_5 = 94; -pub const IPPROTO_ENCAP: _bindgen_ty_5 = 98; -pub const IPPROTO_PIM: _bindgen_ty_5 = 103; -pub const IPPROTO_COMP: _bindgen_ty_5 = 108; -pub const IPPROTO_L2TP: _bindgen_ty_5 = 115; -pub const IPPROTO_SCTP: _bindgen_ty_5 = 132; -pub const IPPROTO_UDPLITE: _bindgen_ty_5 = 136; -pub const IPPROTO_MPLS: _bindgen_ty_5 = 137; -pub const IPPROTO_ETHERNET: _bindgen_ty_5 = 143; -pub const IPPROTO_RAW: _bindgen_ty_5 = 255; -pub const IPPROTO_MPTCP: _bindgen_ty_5 = 262; -pub const IPPROTO_MAX: _bindgen_ty_5 = 263; -pub type _bindgen_ty_5 = ::std::os::raw::c_uint; -pub const IPPROTO_HOPOPTS: _bindgen_ty_6 = 0; -pub const IPPROTO_ROUTING: _bindgen_ty_6 = 43; -pub const IPPROTO_FRAGMENT: _bindgen_ty_6 = 44; -pub const IPPROTO_ICMPV6: _bindgen_ty_6 = 58; -pub const IPPROTO_NONE: _bindgen_ty_6 = 59; -pub const IPPROTO_DSTOPTS: _bindgen_ty_6 = 60; -pub const IPPROTO_MH: _bindgen_ty_6 = 135; -pub type _bindgen_ty_6 = ::std::os::raw::c_uint; -pub type in_port_t = u16; -pub const IPPORT_ECHO: _bindgen_ty_7 = 7; -pub const IPPORT_DISCARD: _bindgen_ty_7 = 9; -pub const IPPORT_SYSTAT: _bindgen_ty_7 = 11; -pub const IPPORT_DAYTIME: _bindgen_ty_7 = 13; -pub const IPPORT_NETSTAT: _bindgen_ty_7 = 15; -pub const IPPORT_FTP: _bindgen_ty_7 = 21; -pub const IPPORT_TELNET: _bindgen_ty_7 = 23; -pub const IPPORT_SMTP: _bindgen_ty_7 = 25; -pub const IPPORT_TIMESERVER: _bindgen_ty_7 = 37; -pub const IPPORT_NAMESERVER: _bindgen_ty_7 = 42; -pub const IPPORT_WHOIS: _bindgen_ty_7 = 43; -pub const IPPORT_MTP: _bindgen_ty_7 = 57; -pub const IPPORT_TFTP: _bindgen_ty_7 = 69; -pub const IPPORT_RJE: _bindgen_ty_7 = 77; -pub const IPPORT_FINGER: _bindgen_ty_7 = 79; -pub const IPPORT_TTYLINK: _bindgen_ty_7 = 87; -pub const IPPORT_SUPDUP: _bindgen_ty_7 = 95; -pub const IPPORT_EXECSERVER: _bindgen_ty_7 = 512; -pub const IPPORT_LOGINSERVER: _bindgen_ty_7 = 513; -pub const IPPORT_CMDSERVER: _bindgen_ty_7 = 514; -pub const IPPORT_EFSSERVER: _bindgen_ty_7 = 520; -pub const IPPORT_BIFFUDP: _bindgen_ty_7 = 512; -pub const IPPORT_WHOSERVER: _bindgen_ty_7 = 513; -pub const IPPORT_ROUTESERVER: _bindgen_ty_7 = 520; -pub const IPPORT_RESERVED: _bindgen_ty_7 = 1024; -pub const IPPORT_USERRESERVED: _bindgen_ty_7 = 5000; -pub type _bindgen_ty_7 = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct in6_addr { - pub __in6_u: in6_addr__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union in6_addr__bindgen_ty_1 { - pub __u6_addr8: [u8; 16usize], - pub __u6_addr16: [u16; 8usize], - pub __u6_addr32: [u32; 4usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of in6_addr__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of in6_addr__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: in6_addr__bindgen_ty_1::__u6_addr8"] - [::std::mem::offset_of!(in6_addr__bindgen_ty_1, __u6_addr8) - 0usize]; - ["Offset of field: in6_addr__bindgen_ty_1::__u6_addr16"] - [::std::mem::offset_of!(in6_addr__bindgen_ty_1, __u6_addr16) - 0usize]; - ["Offset of field: in6_addr__bindgen_ty_1::__u6_addr32"] - [::std::mem::offset_of!(in6_addr__bindgen_ty_1, __u6_addr32) - 0usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of in6_addr"][::std::mem::size_of::() - 16usize]; - ["Alignment of in6_addr"][::std::mem::align_of::() - 4usize]; - ["Offset of field: in6_addr::__in6_u"][::std::mem::offset_of!(in6_addr, __in6_u) - 0usize]; -}; -extern "C" { - pub static in6addr_any: in6_addr; -} -extern "C" { - pub static in6addr_loopback: in6_addr; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sockaddr_in { - pub sin_family: sa_family_t, - pub sin_port: in_port_t, - pub sin_addr: in_addr, - pub sin_zero: [::std::os::raw::c_uchar; 8usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of sockaddr_in"][::std::mem::size_of::() - 16usize]; - ["Alignment of sockaddr_in"][::std::mem::align_of::() - 4usize]; - ["Offset of field: sockaddr_in::sin_family"] - [::std::mem::offset_of!(sockaddr_in, sin_family) - 0usize]; - ["Offset of field: sockaddr_in::sin_port"] - [::std::mem::offset_of!(sockaddr_in, sin_port) - 2usize]; - ["Offset of field: sockaddr_in::sin_addr"] - [::std::mem::offset_of!(sockaddr_in, sin_addr) - 4usize]; - ["Offset of field: sockaddr_in::sin_zero"] - [::std::mem::offset_of!(sockaddr_in, sin_zero) - 8usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sockaddr_in6 { - pub sin6_family: sa_family_t, - pub sin6_port: in_port_t, - pub sin6_flowinfo: u32, - pub sin6_addr: in6_addr, - pub sin6_scope_id: u32, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of sockaddr_in6"][::std::mem::size_of::() - 28usize]; - ["Alignment of sockaddr_in6"][::std::mem::align_of::() - 4usize]; - ["Offset of field: sockaddr_in6::sin6_family"] - [::std::mem::offset_of!(sockaddr_in6, sin6_family) - 0usize]; - ["Offset of field: sockaddr_in6::sin6_port"] - [::std::mem::offset_of!(sockaddr_in6, sin6_port) - 2usize]; - ["Offset of field: sockaddr_in6::sin6_flowinfo"] - [::std::mem::offset_of!(sockaddr_in6, sin6_flowinfo) - 4usize]; - ["Offset of field: sockaddr_in6::sin6_addr"] - [::std::mem::offset_of!(sockaddr_in6, sin6_addr) - 8usize]; - ["Offset of field: sockaddr_in6::sin6_scope_id"] - [::std::mem::offset_of!(sockaddr_in6, sin6_scope_id) - 24usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ip_mreq { - pub imr_multiaddr: in_addr, - pub imr_interface: in_addr, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ip_mreq"][::std::mem::size_of::() - 8usize]; - ["Alignment of ip_mreq"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ip_mreq::imr_multiaddr"] - [::std::mem::offset_of!(ip_mreq, imr_multiaddr) - 0usize]; - ["Offset of field: ip_mreq::imr_interface"] - [::std::mem::offset_of!(ip_mreq, imr_interface) - 4usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ip_mreqn { - pub imr_multiaddr: in_addr, - pub imr_address: in_addr, - pub imr_ifindex: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ip_mreqn"][::std::mem::size_of::() - 12usize]; - ["Alignment of ip_mreqn"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ip_mreqn::imr_multiaddr"] - [::std::mem::offset_of!(ip_mreqn, imr_multiaddr) - 0usize]; - ["Offset of field: ip_mreqn::imr_address"] - [::std::mem::offset_of!(ip_mreqn, imr_address) - 4usize]; - ["Offset of field: ip_mreqn::imr_ifindex"] - [::std::mem::offset_of!(ip_mreqn, imr_ifindex) - 8usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ip_mreq_source { - pub imr_multiaddr: in_addr, - pub imr_interface: in_addr, - pub imr_sourceaddr: in_addr, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ip_mreq_source"][::std::mem::size_of::() - 12usize]; - ["Alignment of ip_mreq_source"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ip_mreq_source::imr_multiaddr"] - [::std::mem::offset_of!(ip_mreq_source, imr_multiaddr) - 0usize]; - ["Offset of field: ip_mreq_source::imr_interface"] - [::std::mem::offset_of!(ip_mreq_source, imr_interface) - 4usize]; - ["Offset of field: ip_mreq_source::imr_sourceaddr"] - [::std::mem::offset_of!(ip_mreq_source, imr_sourceaddr) - 8usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct ipv6_mreq { - pub ipv6mr_multiaddr: in6_addr, - pub ipv6mr_interface: ::std::os::raw::c_uint, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ipv6_mreq"][::std::mem::size_of::() - 20usize]; - ["Alignment of ipv6_mreq"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ipv6_mreq::ipv6mr_multiaddr"] - [::std::mem::offset_of!(ipv6_mreq, ipv6mr_multiaddr) - 0usize]; - ["Offset of field: ipv6_mreq::ipv6mr_interface"] - [::std::mem::offset_of!(ipv6_mreq, ipv6mr_interface) - 16usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct group_req { - pub gr_interface: u32, - pub gr_group: sockaddr_storage, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of group_req"][::std::mem::size_of::() - 136usize]; - ["Alignment of group_req"][::std::mem::align_of::() - 8usize]; - ["Offset of field: group_req::gr_interface"] - [::std::mem::offset_of!(group_req, gr_interface) - 0usize]; - ["Offset of field: group_req::gr_group"][::std::mem::offset_of!(group_req, gr_group) - 8usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct group_source_req { - pub gsr_interface: u32, - pub gsr_group: sockaddr_storage, - pub gsr_source: sockaddr_storage, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of group_source_req"][::std::mem::size_of::() - 264usize]; - ["Alignment of group_source_req"][::std::mem::align_of::() - 8usize]; - ["Offset of field: group_source_req::gsr_interface"] - [::std::mem::offset_of!(group_source_req, gsr_interface) - 0usize]; - ["Offset of field: group_source_req::gsr_group"] - [::std::mem::offset_of!(group_source_req, gsr_group) - 8usize]; - ["Offset of field: group_source_req::gsr_source"] - [::std::mem::offset_of!(group_source_req, gsr_source) - 136usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ip_msfilter { - pub imsf_multiaddr: in_addr, - pub imsf_interface: in_addr, - pub imsf_fmode: u32, - pub imsf_numsrc: u32, - pub imsf_slist: [in_addr; 1usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ip_msfilter"][::std::mem::size_of::() - 20usize]; - ["Alignment of ip_msfilter"][::std::mem::align_of::() - 4usize]; - ["Offset of field: ip_msfilter::imsf_multiaddr"] - [::std::mem::offset_of!(ip_msfilter, imsf_multiaddr) - 0usize]; - ["Offset of field: ip_msfilter::imsf_interface"] - [::std::mem::offset_of!(ip_msfilter, imsf_interface) - 4usize]; - ["Offset of field: ip_msfilter::imsf_fmode"] - [::std::mem::offset_of!(ip_msfilter, imsf_fmode) - 8usize]; - ["Offset of field: ip_msfilter::imsf_numsrc"] - [::std::mem::offset_of!(ip_msfilter, imsf_numsrc) - 12usize]; - ["Offset of field: ip_msfilter::imsf_slist"] - [::std::mem::offset_of!(ip_msfilter, imsf_slist) - 16usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct group_filter { - pub gf_interface: u32, - pub gf_group: sockaddr_storage, - pub gf_fmode: u32, - pub gf_numsrc: u32, - pub gf_slist: [sockaddr_storage; 1usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of group_filter"][::std::mem::size_of::() - 272usize]; - ["Alignment of group_filter"][::std::mem::align_of::() - 8usize]; - ["Offset of field: group_filter::gf_interface"] - [::std::mem::offset_of!(group_filter, gf_interface) - 0usize]; - ["Offset of field: group_filter::gf_group"] - [::std::mem::offset_of!(group_filter, gf_group) - 8usize]; - ["Offset of field: group_filter::gf_fmode"] - [::std::mem::offset_of!(group_filter, gf_fmode) - 136usize]; - ["Offset of field: group_filter::gf_numsrc"] - [::std::mem::offset_of!(group_filter, gf_numsrc) - 140usize]; - ["Offset of field: group_filter::gf_slist"] - [::std::mem::offset_of!(group_filter, gf_slist) - 144usize]; -}; -extern "C" { - pub fn ntohl(__netlong: u32) -> u32; -} -extern "C" { - pub fn ntohs(__netshort: u16) -> u16; -} -extern "C" { - pub fn htonl(__hostlong: u32) -> u32; -} -extern "C" { - pub fn htons(__hostshort: u16) -> u16; -} -extern "C" { - pub fn bindresvport( - __sockfd: ::std::os::raw::c_int, - __sock_in: *mut sockaddr_in, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bindresvport6( - __sockfd: ::std::os::raw::c_int, - __sock_in: *mut sockaddr_in6, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: ::std::os::raw::c_int, - pub tm_min: ::std::os::raw::c_int, - pub tm_hour: ::std::os::raw::c_int, - pub tm_mday: ::std::os::raw::c_int, - pub tm_mon: ::std::os::raw::c_int, - pub tm_year: ::std::os::raw::c_int, - pub tm_wday: ::std::os::raw::c_int, - pub tm_yday: ::std::os::raw::c_int, - pub tm_isdst: ::std::os::raw::c_int, - pub tm_gmtoff: ::std::os::raw::c_long, - pub tm_zone: *const ::std::os::raw::c_char, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of tm"][::std::mem::size_of::() - 56usize]; - ["Alignment of tm"][::std::mem::align_of::() - 8usize]; - ["Offset of field: tm::tm_sec"][::std::mem::offset_of!(tm, tm_sec) - 0usize]; - ["Offset of field: tm::tm_min"][::std::mem::offset_of!(tm, tm_min) - 4usize]; - ["Offset of field: tm::tm_hour"][::std::mem::offset_of!(tm, tm_hour) - 8usize]; - ["Offset of field: tm::tm_mday"][::std::mem::offset_of!(tm, tm_mday) - 12usize]; - ["Offset of field: tm::tm_mon"][::std::mem::offset_of!(tm, tm_mon) - 16usize]; - ["Offset of field: tm::tm_year"][::std::mem::offset_of!(tm, tm_year) - 20usize]; - ["Offset of field: tm::tm_wday"][::std::mem::offset_of!(tm, tm_wday) - 24usize]; - ["Offset of field: tm::tm_yday"][::std::mem::offset_of!(tm, tm_yday) - 28usize]; - ["Offset of field: tm::tm_isdst"][::std::mem::offset_of!(tm, tm_isdst) - 32usize]; - ["Offset of field: tm::tm_gmtoff"][::std::mem::offset_of!(tm, tm_gmtoff) - 40usize]; - ["Offset of field: tm::tm_zone"][::std::mem::offset_of!(tm, tm_zone) - 48usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct itimerspec { - pub it_interval: timespec, - pub it_value: timespec, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of itimerspec"][::std::mem::size_of::() - 32usize]; - ["Alignment of itimerspec"][::std::mem::align_of::() - 8usize]; - ["Offset of field: itimerspec::it_interval"] - [::std::mem::offset_of!(itimerspec, it_interval) - 0usize]; - ["Offset of field: itimerspec::it_value"] - [::std::mem::offset_of!(itimerspec, it_value) - 16usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigevent { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_struct { - pub __locales: [*mut __locale_data; 13usize], - pub __ctype_b: *const ::std::os::raw::c_ushort, - pub __ctype_tolower: *const ::std::os::raw::c_int, - pub __ctype_toupper: *const ::std::os::raw::c_int, - pub __names: [*const ::std::os::raw::c_char; 13usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of __locale_struct"][::std::mem::size_of::<__locale_struct>() - 232usize]; - ["Alignment of __locale_struct"][::std::mem::align_of::<__locale_struct>() - 8usize]; - ["Offset of field: __locale_struct::__locales"] - [::std::mem::offset_of!(__locale_struct, __locales) - 0usize]; - ["Offset of field: __locale_struct::__ctype_b"] - [::std::mem::offset_of!(__locale_struct, __ctype_b) - 104usize]; - ["Offset of field: __locale_struct::__ctype_tolower"] - [::std::mem::offset_of!(__locale_struct, __ctype_tolower) - 112usize]; - ["Offset of field: __locale_struct::__ctype_toupper"] - [::std::mem::offset_of!(__locale_struct, __ctype_toupper) - 120usize]; - ["Offset of field: __locale_struct::__names"] - [::std::mem::offset_of!(__locale_struct, __names) - 128usize]; -}; -pub type __locale_t = *mut __locale_struct; -pub type locale_t = __locale_t; -extern "C" { - pub fn clock() -> clock_t; -} -extern "C" { - pub fn time(__timer: *mut time_t) -> time_t; -} -extern "C" { - pub fn difftime(__time1: time_t, __time0: time_t) -> f64; -} -extern "C" { - pub fn mktime(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn strftime( - __s: *mut ::std::os::raw::c_char, - __maxsize: usize, - __format: *const ::std::os::raw::c_char, - __tp: *const tm, - ) -> usize; -} -extern "C" { - pub fn strftime_l( - __s: *mut ::std::os::raw::c_char, - __maxsize: usize, - __format: *const ::std::os::raw::c_char, - __tp: *const tm, - __loc: locale_t, - ) -> usize; -} -extern "C" { - pub fn gmtime(__timer: *const time_t) -> *mut tm; -} -extern "C" { - pub fn localtime(__timer: *const time_t) -> *mut tm; -} -extern "C" { - pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm; -} -extern "C" { - pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm; -} -extern "C" { - pub fn asctime(__tp: *const tm) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ctime(__timer: *const time_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn asctime_r( - __tp: *const tm, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ctime_r( - __timer: *const time_t, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub static mut __tzname: [*mut ::std::os::raw::c_char; 2usize]; -} -extern "C" { - pub static mut __daylight: ::std::os::raw::c_int; -} -extern "C" { - pub static mut __timezone: ::std::os::raw::c_long; -} -extern "C" { - pub static mut tzname: [*mut ::std::os::raw::c_char; 2usize]; -} -extern "C" { - pub fn tzset(); -} -extern "C" { - pub static mut daylight: ::std::os::raw::c_int; -} -extern "C" { - pub static mut timezone: ::std::os::raw::c_long; -} -extern "C" { - pub fn timegm(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn timelocal(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn dysize(__year: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn nanosleep( - __requested_time: *const timespec, - __remaining: *mut timespec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_nanosleep( - __clock_id: clockid_t, - __flags: ::std::os::raw::c_int, - __req: *const timespec, - __rem: *mut timespec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_create( - __clock_id: clockid_t, - __evp: *mut sigevent, - __timerid: *mut timer_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_delete(__timerid: timer_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_settime( - __timerid: timer_t, - __flags: ::std::os::raw::c_int, - __value: *const itimerspec, - __ovalue: *mut itimerspec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_getoverrun(__timerid: timer_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timespec_get( - __ts: *mut timespec, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub type int_least8_t = __int_least8_t; -pub type int_least16_t = __int_least16_t; -pub type int_least32_t = __int_least32_t; -pub type int_least64_t = __int_least64_t; -pub type uint_least8_t = __uint_least8_t; -pub type uint_least16_t = __uint_least16_t; -pub type uint_least32_t = __uint_least32_t; -pub type uint_least64_t = __uint_least64_t; -pub type int_fast8_t = ::std::os::raw::c_schar; -pub type int_fast16_t = ::std::os::raw::c_long; -pub type int_fast32_t = ::std::os::raw::c_long; -pub type int_fast64_t = ::std::os::raw::c_long; -pub type uint_fast8_t = ::std::os::raw::c_uchar; -pub type uint_fast16_t = ::std::os::raw::c_ulong; -pub type uint_fast32_t = ::std::os::raw::c_ulong; -pub type uint_fast64_t = ::std::os::raw::c_ulong; -pub type intmax_t = __intmax_t; -pub type uintmax_t = __uintmax_t; -pub type wg_key = [u8; 32usize]; -pub type wg_key_b64_string = [::std::os::raw::c_char; 45usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec64 { - pub tv_sec: i64, - pub tv_nsec: i64, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of timespec64"][::std::mem::size_of::() - 16usize]; - ["Alignment of timespec64"][::std::mem::align_of::() - 8usize]; - ["Offset of field: timespec64::tv_sec"][::std::mem::offset_of!(timespec64, tv_sec) - 0usize]; - ["Offset of field: timespec64::tv_nsec"][::std::mem::offset_of!(timespec64, tv_nsec) - 8usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct wg_allowedip { - pub family: u16, - pub __bindgen_anon_1: wg_allowedip__bindgen_ty_1, - pub cidr: u8, - pub next_allowedip: *mut wg_allowedip, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wg_allowedip__bindgen_ty_1 { - pub ip4: in_addr, - pub ip6: in6_addr, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of wg_allowedip__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; - ["Alignment of wg_allowedip__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: wg_allowedip__bindgen_ty_1::ip4"] - [::std::mem::offset_of!(wg_allowedip__bindgen_ty_1, ip4) - 0usize]; - ["Offset of field: wg_allowedip__bindgen_ty_1::ip6"] - [::std::mem::offset_of!(wg_allowedip__bindgen_ty_1, ip6) - 0usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of wg_allowedip"][::std::mem::size_of::() - 32usize]; - ["Alignment of wg_allowedip"][::std::mem::align_of::() - 8usize]; - ["Offset of field: wg_allowedip::family"] - [::std::mem::offset_of!(wg_allowedip, family) - 0usize]; - ["Offset of field: wg_allowedip::cidr"][::std::mem::offset_of!(wg_allowedip, cidr) - 20usize]; - ["Offset of field: wg_allowedip::next_allowedip"] - [::std::mem::offset_of!(wg_allowedip, next_allowedip) - 24usize]; -}; -pub const wg_peer_flags_WGPEER_REMOVE_ME: wg_peer_flags = 1; -pub const wg_peer_flags_WGPEER_REPLACE_ALLOWEDIPS: wg_peer_flags = 2; -pub const wg_peer_flags_WGPEER_HAS_PUBLIC_KEY: wg_peer_flags = 4; -pub const wg_peer_flags_WGPEER_HAS_PRESHARED_KEY: wg_peer_flags = 8; -pub const wg_peer_flags_WGPEER_HAS_PERSISTENT_KEEPALIVE_INTERVAL: wg_peer_flags = 16; -pub type wg_peer_flags = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Copy, Clone)] -pub union wg_endpoint { - pub addr: sockaddr, - pub addr4: sockaddr_in, - pub addr6: sockaddr_in6, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of wg_endpoint"][::std::mem::size_of::() - 28usize]; - ["Alignment of wg_endpoint"][::std::mem::align_of::() - 4usize]; - ["Offset of field: wg_endpoint::addr"][::std::mem::offset_of!(wg_endpoint, addr) - 0usize]; - ["Offset of field: wg_endpoint::addr4"][::std::mem::offset_of!(wg_endpoint, addr4) - 0usize]; - ["Offset of field: wg_endpoint::addr6"][::std::mem::offset_of!(wg_endpoint, addr6) - 0usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct wg_peer { - pub flags: wg_peer_flags, - pub public_key: wg_key, - pub preshared_key: wg_key, - pub endpoint: wg_endpoint, - pub last_handshake_time: timespec64, - pub rx_bytes: u64, - pub tx_bytes: u64, - pub persistent_keepalive_interval: u16, - pub first_allowedip: *mut wg_allowedip, - pub last_allowedip: *mut wg_allowedip, - pub next_peer: *mut wg_peer, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of wg_peer"][::std::mem::size_of::() - 160usize]; - ["Alignment of wg_peer"][::std::mem::align_of::() - 8usize]; - ["Offset of field: wg_peer::flags"][::std::mem::offset_of!(wg_peer, flags) - 0usize]; - ["Offset of field: wg_peer::public_key"][::std::mem::offset_of!(wg_peer, public_key) - 4usize]; - ["Offset of field: wg_peer::preshared_key"] - [::std::mem::offset_of!(wg_peer, preshared_key) - 36usize]; - ["Offset of field: wg_peer::endpoint"][::std::mem::offset_of!(wg_peer, endpoint) - 68usize]; - ["Offset of field: wg_peer::last_handshake_time"] - [::std::mem::offset_of!(wg_peer, last_handshake_time) - 96usize]; - ["Offset of field: wg_peer::rx_bytes"][::std::mem::offset_of!(wg_peer, rx_bytes) - 112usize]; - ["Offset of field: wg_peer::tx_bytes"][::std::mem::offset_of!(wg_peer, tx_bytes) - 120usize]; - ["Offset of field: wg_peer::persistent_keepalive_interval"] - [::std::mem::offset_of!(wg_peer, persistent_keepalive_interval) - 128usize]; - ["Offset of field: wg_peer::first_allowedip"] - [::std::mem::offset_of!(wg_peer, first_allowedip) - 136usize]; - ["Offset of field: wg_peer::last_allowedip"] - [::std::mem::offset_of!(wg_peer, last_allowedip) - 144usize]; - ["Offset of field: wg_peer::next_peer"][::std::mem::offset_of!(wg_peer, next_peer) - 152usize]; -}; -pub const wg_device_flags_WGDEVICE_REPLACE_PEERS: wg_device_flags = 1; -pub const wg_device_flags_WGDEVICE_HAS_PRIVATE_KEY: wg_device_flags = 2; -pub const wg_device_flags_WGDEVICE_HAS_PUBLIC_KEY: wg_device_flags = 4; -pub const wg_device_flags_WGDEVICE_HAS_LISTEN_PORT: wg_device_flags = 8; -pub const wg_device_flags_WGDEVICE_HAS_FWMARK: wg_device_flags = 16; -pub type wg_device_flags = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct wg_device { - pub name: [::std::os::raw::c_char; 16usize], - pub ifindex: u32, - pub flags: wg_device_flags, - pub public_key: wg_key, - pub private_key: wg_key, - pub fwmark: u32, - pub listen_port: u16, - pub first_peer: *mut wg_peer, - pub last_peer: *mut wg_peer, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of wg_device"][::std::mem::size_of::() - 112usize]; - ["Alignment of wg_device"][::std::mem::align_of::() - 8usize]; - ["Offset of field: wg_device::name"][::std::mem::offset_of!(wg_device, name) - 0usize]; - ["Offset of field: wg_device::ifindex"][::std::mem::offset_of!(wg_device, ifindex) - 16usize]; - ["Offset of field: wg_device::flags"][::std::mem::offset_of!(wg_device, flags) - 20usize]; - ["Offset of field: wg_device::public_key"] - [::std::mem::offset_of!(wg_device, public_key) - 24usize]; - ["Offset of field: wg_device::private_key"] - [::std::mem::offset_of!(wg_device, private_key) - 56usize]; - ["Offset of field: wg_device::fwmark"][::std::mem::offset_of!(wg_device, fwmark) - 88usize]; - ["Offset of field: wg_device::listen_port"] - [::std::mem::offset_of!(wg_device, listen_port) - 92usize]; - ["Offset of field: wg_device::first_peer"] - [::std::mem::offset_of!(wg_device, first_peer) - 96usize]; - ["Offset of field: wg_device::last_peer"] - [::std::mem::offset_of!(wg_device, last_peer) - 104usize]; -}; -extern "C" { - pub fn wg_set_device(dev: *mut wg_device) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wg_get_device( - dev: *mut *mut wg_device, - device_name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wg_add_device(device_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wg_del_device(device_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wg_free_device(dev: *mut wg_device); -} -extern "C" { - pub fn wg_list_device_names() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn wg_key_to_base64(base64: *mut ::std::os::raw::c_char, key: *const u8); -} -extern "C" { - pub fn wg_key_from_base64( - key: *mut u8, - base64: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wg_key_is_zero(key: *const u8) -> bool; -} -extern "C" { - pub fn wg_generate_public_key(public_key: *mut u8, private_key: *const u8); -} -extern "C" { - pub fn wg_generate_private_key(private_key: *mut u8); -} -extern "C" { - pub fn wg_generate_preshared_key(preshared_key: *mut u8); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct iface { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_data { - pub _address: u8, -} - diff --git a/src/wireguard_manager/wireguard_wrapper.rs b/src/wireguard_manager/wireguard_wrapper.rs index e2e18b4..8aacebb 100644 --- a/src/wireguard_manager/wireguard_wrapper.rs +++ b/src/wireguard_manager/wireguard_wrapper.rs @@ -1,5 +1,4 @@ /* automatically generated by rust-bindgen 0.70.1 */ -#![allow(warnings)] #[repr(C)] #[derive(Default)] @@ -41,7 +40,7 @@ pub const __STDC_ISO_10646__: u32 = 201706; pub const _NET_IF_H: u32 = 1; pub const _FEATURES_H: u32 = 1; pub const _DEFAULT_SOURCE: u32 = 1; -pub const __GLIBC_USE_ISOC2X: u32 = 0; +pub const __GLIBC_USE_ISOC23: u32 = 0; pub const __USE_ISOC11: u32 = 1; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; @@ -59,15 +58,16 @@ pub const __WORDSIZE: u32 = 64; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; pub const __SYSCALL_WORDSIZE: u32 = 64; pub const __TIMESIZE: u32 = 64; +pub const __USE_TIME_BITS64: u32 = 1; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; -pub const __GLIBC_USE_C2X_STRTOL: u32 = 0; +pub const __GLIBC_USE_C23_STRTOL: u32 = 0; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 39; +pub const __GLIBC_MINOR__: u32 = 40; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; @@ -251,6 +251,7 @@ pub const SOL_XDP: u32 = 283; pub const SOL_MPTCP: u32 = 284; pub const SOL_MCTP: u32 = 285; pub const SOL_SMC: u32 = 286; +pub const SOL_VSOCK: u32 = 287; pub const SOMAXCONN: u32 = 4096; pub const _BITS_SOCKADDR_H: u32 = 1; pub const _SS_SIZE: u32 = 128; @@ -526,10 +527,10 @@ pub const TIME_UTC: u32 = 1; pub const _STDINT_H: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; -pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0; pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; -pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_WCHAR_H: u32 = 1; pub const _BITS_STDINT_LEAST_H: u32 = 1;