diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index c5e25c38..41853791 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -64,9 +64,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -112,9 +112,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "async-compression" @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" dependencies = [ "proc-macro2", "quote", @@ -271,17 +271,17 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.2" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c69fae65a523209d34240b60abe0c42d33d1045d445c0839d8a4894a736e2d" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cexpr", "clang-sys", + "itertools 0.12.1", "lazy_static", "lazycell", "log", - "peeking_take_while", "prettyplease", "proc-macro2", "quote", @@ -300,9 +300,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] @@ -318,9 +318,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -339,15 +339,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytemuck" -version = "1.14.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" [[package]] name = "byteorder" @@ -375,12 +375,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cexpr" @@ -397,6 +394,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chacha20" version = "0.9.1" @@ -410,16 +413,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -446,7 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" dependencies = [ "ciborium-io", - "half 2.3.1", + "half 2.4.0", ] [[package]] @@ -473,9 +476,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", @@ -483,9 +486,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -495,11 +498,11 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "syn", @@ -507,9 +510,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -565,9 +568,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -585,7 +588,7 @@ dependencies = [ "criterion-plot", "futures", "is-terminal", - "itertools", + "itertools 0.10.5", "num-traits", "once_cell", "oorandom", @@ -607,7 +610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", - "itertools", + "itertools 0.10.5", ] [[package]] @@ -657,7 +660,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossterm_winapi", "libc", "mio", @@ -716,9 +719,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -756,9 +759,9 @@ dependencies = [ [[package]] name = "default-net" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85dc7576d8346d3c86ad64dc64d26d0f6c970ba4795b850f15ee94467d8e53eb" +checksum = "0c5a6569a908354d49b10db3c516d69aca1eccd97562fd31c98b13f00b73ca66" dependencies = [ "dlopen2", "libc", @@ -806,7 +809,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35b50dba0afdca80b187392b24f2499a88c336d5a8493e4b4ccfb608708be56a" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "proc-macro2", "proc-macro2-diagnostics", "quote", @@ -852,7 +855,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d446216f1822c429bbc9f96b4227248fc09a4213897439504a672a1b052d0804" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "chacha20", "curve25519-dalek", "generic-array", @@ -869,9 +872,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "encoding_rs" @@ -894,9 +897,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eeb342678d785662fd2514be38c459bb925f02b68dd2a3e0f21d7ef82d979dd" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ "anstream", "anstyle", @@ -929,15 +932,15 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fiat-crypto" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "figment" -version = "0.10.14" +version = "0.10.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6e5bc7bd59d60d0d45a6ccab6cf0f4ce28698fb4e81e750ddf229c9b824026" +checksum = "7270677e7067213e04f323b55084586195f18308cd7546cfac9f873344ccceb6" dependencies = [ "atomic 0.6.0", "pear", @@ -1088,6 +1091,15 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "generator" version = "0.7.5" @@ -1136,9 +1148,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" dependencies = [ "bytes", "fnv", @@ -1155,15 +1167,15 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "half" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" dependencies = [ "cfg-if", "crunchy", @@ -1182,10 +1194,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.3.4" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "home" @@ -1198,9 +1216,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1253,7 +1271,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -1308,9 +1326,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown", @@ -1388,12 +1406,12 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys 0.52.0", ] @@ -1406,6 +1424,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.10" @@ -1434,9 +1461,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1480,25 +1507,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6e68987fe8f2dd7b76930f800a4e5b958c766171fc3a7c33dd67c06a0f1e801" dependencies = [ "cc", - "nix", + "nix 0.27.1", "num_cpus", "pkg-config", ] [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -1519,9 +1546,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "log-once" @@ -1572,7 +1599,7 @@ dependencies = [ "lqos_config", "lqos_utils", "lts_client", - "nix", + "nix 0.28.0", "serde", "serde_cbor", "thiserror", @@ -1633,7 +1660,7 @@ dependencies = [ "lqos_bus", "lqos_config", "lqos_utils", - "nix", + "nix 0.28.0", "once_cell", "reqwest", "rocket", @@ -1650,7 +1677,7 @@ dependencies = [ "lqos_bus", "lqos_config", "lqos_utils", - "nix", + "nix 0.28.0", "pyo3", "reqwest", "serde", @@ -1705,7 +1732,7 @@ dependencies = [ "lqos_bus", "lqos_config", "lqos_utils", - "nix", + "nix 0.28.0", "once_cell", "thiserror", "zerocopy", @@ -1717,7 +1744,7 @@ version = "0.1.0" dependencies = [ "byteorder", "log", - "nix", + "nix 0.28.0", "notify", "serde", "thiserror", @@ -1729,8 +1756,15 @@ name = "lqosd" version = "0.1.0" dependencies = [ "anyhow", + "bincode", + "csv", "dashmap", "env_logger", + "flate2", + "fxhash", + "ip_network", + "ip_network_table", + "itertools 0.12.1", "jemallocator", "log", "lqos_bus", @@ -1740,15 +1774,17 @@ dependencies = [ "lqos_sys", "lqos_utils", "lts_client", - "nix", + "nix 0.28.0", "num-traits", "once_cell", + "reqwest", "serde", "serde_json", "signal-hook", "sysinfo", "thiserror", "tokio", + "zerocopy", ] [[package]] @@ -1853,18 +1889,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -1964,11 +2000,23 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "libc", ] +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -2015,10 +2063,16 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.17" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -2056,11 +2110,11 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.63" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -2088,9 +2142,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.99" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -2135,9 +2189,9 @@ checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pear" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ccca0f6c17acc81df8e242ed473ec144cbf5c98037e69aa6d144780aad103c8" +checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" dependencies = [ "inlinable_string", "pear_codegen", @@ -2146,9 +2200,9 @@ dependencies = [ [[package]] name = "pear_codegen" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e22670e8eb757cff11d6c199ca7b987f352f0346e0be4dd23869ec72cb53c77" +checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" dependencies = [ "proc-macro2", "proc-macro2-diagnostics", @@ -2156,12 +2210,6 @@ dependencies = [ "syn", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -2170,18 +2218,18 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", @@ -2202,9 +2250,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" @@ -2240,6 +2288,12 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + [[package]] name = "powerfmt" version = "0.2.0" @@ -2264,9 +2318,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -2286,15 +2340,16 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0" +checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", "parking_lot", + "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -2303,9 +2358,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be" +checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" dependencies = [ "once_cell", "target-lexicon", @@ -2313,9 +2368,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1" +checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" dependencies = [ "libc", "pyo3-build-config", @@ -2323,9 +2378,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3" +checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -2335,12 +2390,13 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f" +checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", + "pyo3-build-config", "quote", "syn", ] @@ -2386,9 +2442,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", @@ -2441,7 +2497,7 @@ checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", + "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -2456,9 +2512,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -2479,9 +2535,9 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64", "bytes", @@ -2660,11 +2716,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2688,9 +2744,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "salsa20" @@ -2756,15 +2812,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -2775,15 +2831,15 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ - "half 1.8.2", + "half 1.8.3", "serde", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -2792,9 +2848,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -2803,9 +2859,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", @@ -2915,12 +2971,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2979,9 +3035,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "subtle" @@ -2991,9 +3047,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -3008,9 +3064,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sysinfo" -version = "0.30.5" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2" +checksum = "0c385888ef380a852a16209afc8cfad22795dd8873d69c9a14d2e2088f118d18" dependencies = [ "cfg-if", "core-foundation-sys", @@ -3044,37 +3100,36 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", @@ -3083,9 +3138,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -3093,12 +3148,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -3113,10 +3169,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -3147,9 +3204,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -3159,7 +3216,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -3187,9 +3244,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -3212,9 +3269,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", @@ -3233,9 +3290,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap", "serde", @@ -3402,18 +3459,18 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" @@ -3452,9 +3509,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "rand", @@ -3481,9 +3538,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3506,9 +3563,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3516,9 +3573,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -3531,9 +3588,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3543,9 +3600,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3553,9 +3610,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -3566,15 +3623,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3639,7 +3696,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -3648,7 +3705,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -3675,7 +3732,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.4", ] [[package]] @@ -3710,17 +3767,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -3737,9 +3794,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" @@ -3755,9 +3812,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" @@ -3773,9 +3830,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" @@ -3791,9 +3848,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" @@ -3809,9 +3866,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" @@ -3827,9 +3884,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" @@ -3845,15 +3902,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "winnow" -version = "0.5.35" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] @@ -3890,9 +3947,9 @@ dependencies = [ [[package]] name = "yansi" -version = "1.0.0-rc.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" dependencies = [ "is-terminal", ] diff --git a/src/rust/lqos_bus/src/bus/mod.rs b/src/rust/lqos_bus/src/bus/mod.rs index 13e394d1..5196b933 100644 --- a/src/rust/lqos_bus/src/bus/mod.rs +++ b/src/rust/lqos_bus/src/bus/mod.rs @@ -10,7 +10,7 @@ pub use client::bus_request; use log::error; pub use persistent_client::BusClient; pub use reply::BusReply; -pub use request::{BusRequest, StatsRequest}; +pub use request::{BusRequest, StatsRequest, TopFlowType}; pub use response::BusResponse; pub use session::BusSession; use thiserror::Error; diff --git a/src/rust/lqos_bus/src/bus/request.rs b/src/rust/lqos_bus/src/bus/request.rs index d86e8f3b..29b44ffd 100644 --- a/src/rust/lqos_bus/src/bus/request.rs +++ b/src/rust/lqos_bus/src/bus/request.rs @@ -30,6 +30,14 @@ pub enum BusRequest { end: u32, }, + /// Retrieves the TopN hosts with the worst Retransmits, sorted by Retransmits descending. + GetWorstRetransmits { + /// First row to retrieve (usually 0 unless you are paging) + start: u32, + /// Last row to retrieve (10 for top-10 starting at 0) + end: u32, + }, + /// Retrieves the TopN hosts with the best RTT, sorted by RTT descending. GetBestRtt { /// First row to retrieve (usually 0 unless you are paging) @@ -133,9 +141,6 @@ pub enum BusRequest { /// Obtain the lqosd statistics GetLqosStats, - /// Tell me flow stats for a given IP address - GetFlowStats(String), - /// Tell Heimdall to hyper-focus on an IP address for a bit GatherPacketData(String), @@ -152,6 +157,51 @@ pub enum BusRequest { /// display a "run bandwidht test" link. #[cfg(feature = "equinix_tests")] RequestLqosEquinixTest, + + /// Request a dump of all active flows. This can be a lot of data. + /// so this is intended for debugging + DumpActiveFlows, + + /// Count the nubmer of active flows. + CountActiveFlows, + + /// Top Flows Reports + TopFlows{ + /// The type of top report to request + flow_type: TopFlowType, + /// The number of flows to return + n: u32 + }, + + /// Flows by IP Address + FlowsByIp(String), + + /// Current Endpoints by Country + CurrentEndpointsByCountry, + + /// Lat/Lon of Endpoints + CurrentEndpointLatLon, + + /// Ether Protocol Summary + EtherProtocolSummary, + + /// IP Protocol Summary + IpProtocolSummary, +} + +/// Defines the type of "top" flow being requested +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Copy)] +pub enum TopFlowType { + /// Top flows by current estimated bandwidth use + RateEstimate, + /// Top flows by total bytes transferred + Bytes, + /// Top flows by total packets transferred + Packets, + /// Top flows by total drops + Drops, + /// Top flows by round-trip time estimate + RoundTripTime, } /// Specific requests from the long-term stats system diff --git a/src/rust/lqos_bus/src/bus/response.rs b/src/rust/lqos_bus/src/bus/response.rs index 229d8be1..8ff7eaea 100644 --- a/src/rust/lqos_bus/src/bus/response.rs +++ b/src/rust/lqos_bus/src/bus/response.rs @@ -1,6 +1,6 @@ use super::QueueStoreTransit; use crate::{ - ip_stats::PacketHeader, FlowTransport, IpMapping, IpStats, XdpPpingResult, + ip_stats::{FlowbeeSummaryData, PacketHeader}, IpMapping, IpStats, XdpPpingResult, }; use lts_client::transport_data::{StatsTotals, StatsHost, StatsTreeNode}; use serde::{Deserialize, Serialize}; @@ -43,6 +43,9 @@ pub enum BusResponse { /// Provides the worst N RTT scores, sorted in descending order. WorstRtt(Vec), + /// Provides the worst N Retransmit scores, sorted in descending order. + WorstRetransmits(Vec), + /// Provides the best N RTT scores, sorted in descending order. BestRtt(Vec), @@ -89,11 +92,10 @@ pub enum BusResponse { high_watermark: (u64, u64), /// Number of flows tracked tracked_flows: u64, + /// RTT events per second + rtt_events_per_second: u64, }, - /// Flow Data - FlowData(Vec<(FlowTransport, Option)>), - /// The index of the new packet collection session PacketCollectionSession { /// The identifier of the capture session @@ -116,4 +118,41 @@ pub enum BusResponse { /// Long-term stats tree LongTermTree(Vec), + + /// All Active Flows (Not Recommended - Debug Use) + AllActiveFlows(Vec), + + /// Count active flows + CountActiveFlows(u64), + + /// Top Flopws + TopFlows(Vec), + + /// Flows by IP + FlowsByIp(Vec), + + /// Current endpoints by country + CurrentEndpointsByCountry(Vec<(String, [u64; 2], [f32; 2])>), + + /// Current Lat/Lon of endpoints + CurrentLatLon(Vec<(f64, f64, String, u64, f32)>), + + /// Summary of Ether Protocol + EtherProtocols{ + /// Number of IPv4 Bytes + v4_bytes: [u64; 2], + /// Number of IPv6 Bytes + v6_bytes: [u64; 2], + /// Number of IPv4 Packets + v4_packets: [u64; 2], + /// Number of IPv6 Packets + v6_packets: [u64; 2], + /// Number of IPv4 Flows + v4_rtt: [u64; 2], + /// Number of IPv6 Flows + v6_rtt: [u64; 2], + }, + + /// Summary of IP Protocols + IpProtocols(Vec<(String, (u64, u64))>), } diff --git a/src/rust/lqos_bus/src/ip_stats.rs b/src/rust/lqos_bus/src/ip_stats.rs index 9e9cbcc6..665068ff 100644 --- a/src/rust/lqos_bus/src/ip_stats.rs +++ b/src/rust/lqos_bus/src/ip_stats.rs @@ -5,142 +5,176 @@ use serde::{Deserialize, Serialize}; /// with a host. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] pub struct IpStats { - /// The host's IP address, as detected by the XDP program. - pub ip_address: String, + /// The host's IP address, as detected by the XDP program. + pub ip_address: String, - /// The host's mapped circuit ID - pub circuit_id: String, + /// The host's mapped circuit ID + pub circuit_id: String, - /// The current bits-per-second passing through this host. Tuple - /// 0 is download, tuple 1 is upload. - pub bits_per_second: (u64, u64), + /// The current bits-per-second passing through this host. Tuple + /// 0 is download, tuple 1 is upload. + pub bits_per_second: (u64, u64), - /// The current packets-per-second passing through this host. Tuple - /// 0 is download, tuple 1 is upload. - pub packets_per_second: (u64, u64), + /// The current packets-per-second passing through this host. Tuple + /// 0 is download, tuple 1 is upload. + pub packets_per_second: (u64, u64), - /// Median TCP round-trip-time for this host at the current time. - pub median_tcp_rtt: f32, + /// Median TCP round-trip-time for this host at the current time. + pub median_tcp_rtt: f32, - /// Associated TC traffic control handle. - pub tc_handle: TcHandle, + /// Associated TC traffic control handle. + pub tc_handle: TcHandle, + + /// TCP Retransmits for this host at the current time. + pub tcp_retransmits: (u64, u64), } /// Represents an IP Mapping in the XDP IP to TC/CPU mapping system. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct IpMapping { - /// The mapped IP address. May be IPv4, or IPv6. - pub ip_address: String, + /// The mapped IP address. May be IPv4, or IPv6. + pub ip_address: String, - /// The CIDR prefix length of the host. Equivalent to the CIDR value - /// after the /. e.g. `/24`. - pub prefix_length: u32, + /// The CIDR prefix length of the host. Equivalent to the CIDR value + /// after the /. e.g. `/24`. + pub prefix_length: u32, - /// The current TC traffic control handle. - pub tc_handle: TcHandle, + /// The current TC traffic control handle. + pub tc_handle: TcHandle, - /// The CPU index associated with this IP mapping. - pub cpu: u32, + /// The CPU index associated with this IP mapping. + pub cpu: u32, } /// Provided for backwards compatibility with `xdp_pping`, with the intent /// to retire it eventually. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] pub struct XdpPpingResult { - /// The TC handle in text format. e.g. "1:12" - pub tc: String, + /// The TC handle in text format. e.g. "1:12" + pub tc: String, - /// The average (mean) RTT value for the current sample. - pub avg: f32, + /// The average (mean) RTT value for the current sample. + pub avg: f32, - /// The minimum RTT value for the current sample. - pub min: f32, + /// The minimum RTT value for the current sample. + pub min: f32, - /// The maximum RTT value for the current sample. - pub max: f32, + /// The maximum RTT value for the current sample. + pub max: f32, - /// The median RTT value for the current sample. - pub median: f32, + /// The median RTT value for the current sample. + pub median: f32, - /// The number of samples from which these values were - /// derived. If 0, the other values are invalid. - pub samples: u32, -} - -/// Defines an IP protocol for display in the flow -/// tracking (Heimdall) system. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub enum FlowProto { - /// A TCP flow - TCP, - /// A UDP flow - UDP, - /// An ICMP flow - ICMP -} - -/// Defines the display data for a flow in Heimdall. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct FlowTransport { - /// The Source IP address - pub src: String, - /// The Destination IP address - pub dst: String, - /// The flow protocol (see `FlowProto`) - pub proto: FlowProto, - /// The source port, which is overridden to ICMP code on ICMP flows. - pub src_port: u16, - /// The destination port, which isn't useful at all on ICMP flows. - pub dst_port: u16, - /// The number of bytes since we started tracking this flow. - pub bytes: u64, - /// The number of packets since we started tracking this flow. - pub packets: u64, - /// Detected DSCP code if any - pub dscp: u8, - /// Detected ECN bit status (0-3) - pub ecn: u8, + /// The number of samples from which these values were + /// derived. If 0, the other values are invalid. + pub samples: u32, } /// Extract the 6-bit DSCP and 2-bit ECN code from a TOS field /// in an IP header. pub fn tos_parser(tos: u8) -> (u8, u8) { - // Format: 2 bits of ECN, 6 bits of DSCP - const ECN: u8 = 0b00000011; - const DSCP: u8 = 0b11111100; + // Format: 2 bits of ECN, 6 bits of DSCP + const ECN: u8 = 0b00000011; + const DSCP: u8 = 0b11111100; - let ecn = tos & ECN; - let dscp = (tos & DSCP) >> 2; - (dscp, ecn) + let ecn = tos & ECN; + let dscp = (tos & DSCP) >> 2; + (dscp, ecn) } /// Packet header dump #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)] pub struct PacketHeader { - /// Timestamp (ns since boot) - pub timestamp: u64, - /// Source IP - pub src: String, - /// Destination IP - pub dst: String, - /// Source Port - pub src_port : u16, - /// Destination Port - pub dst_port: u16, - /// Ip Protocol (see Linux kernel docs) - pub ip_protocol: u8, - /// ECN Flag - pub ecn: u8, - /// DSCP code - pub dscp: u8, - /// Packet Size - pub size: u32, - /// TCP Flag Bitset - pub tcp_flags: u8, - /// TCP Window Size - pub tcp_window: u16, - /// TCP TSVal - pub tcp_tsval: u32, - /// TCP ECR val - pub tcp_tsecr: u32, -} \ No newline at end of file + /// Timestamp (ns since boot) + pub timestamp: u64, + /// Source IP + pub src: String, + /// Destination IP + pub dst: String, + /// Source Port + pub src_port: u16, + /// Destination Port + pub dst_port: u16, + /// Ip Protocol (see Linux kernel docs) + pub ip_protocol: u8, + /// ECN Flag + pub ecn: u8, + /// DSCP code + pub dscp: u8, + /// Packet Size + pub size: u32, + /// TCP Flag Bitset + pub tcp_flags: u8, + /// TCP Window Size + pub tcp_window: u16, + /// TCP TSVal + pub tcp_tsval: u32, + /// TCP ECR val + pub tcp_tsecr: u32, +} + +/// Flowbee protocol enumeration +#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)] +pub enum FlowbeeProtocol { + /// TCP (type 6) + TCP, + /// UDP (type 17) + UDP, + /// ICMP (type 1) + ICMP, +} + +impl From for FlowbeeProtocol { + fn from(value: u8) -> Self { + match value { + 6 => Self::TCP, + 17 => Self::UDP, + _ => Self::ICMP, + } + } +} + +/// Flowbee: a complete flow data, combining key and data. +#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)] +pub struct FlowbeeSummaryData { + /// Mapped `XdpIpAddress` source for the flow. + pub remote_ip: String, + /// Mapped `XdpIpAddress` destination for the flow + pub local_ip: String, + /// Source port number, or ICMP type. + pub src_port: u16, + /// Destination port number. + pub dst_port: u16, + /// IP protocol (see the Linux kernel!) + pub ip_protocol: FlowbeeProtocol, + /// Padding to align the structure to 16 bytes. + /// Time (nanos) when the connection was established + pub start_time: u64, + /// Time (nanos) when the connection was last seen + pub last_seen: u64, + /// Bytes transmitted + pub bytes_sent: [u64; 2], + /// Packets transmitted + pub packets_sent: [u64; 2], + /// Rate estimate + pub rate_estimate_bps: [u32; 2], + /// TCP Retransmission count (also counts duplicates) + pub tcp_retransmits: [u16; 2], + /// Has the connection ended? + /// 0 = Alive, 1 = FIN, 2 = RST + pub end_status: u8, + /// Raw IP TOS + pub tos: u8, + /// Raw TCP flags + pub flags: u8, + /// Recent RTT median + pub rtt_nanos: [u64; 2], + /// Remote ASN + pub remote_asn: u32, + /// Remote ASN Name + pub remote_asn_name: String, + /// Remote ASN Country + pub remote_asn_country: String, + /// Analysis + pub analysis: String, +} diff --git a/src/rust/lqos_bus/src/lib.rs b/src/rust/lqos_bus/src/lib.rs index 88c95be1..da420dca 100644 --- a/src/rust/lqos_bus/src/lib.rs +++ b/src/rust/lqos_bus/src/lib.rs @@ -13,15 +13,15 @@ mod bus; mod ip_stats; pub use ip_stats::{ - tos_parser, FlowProto, FlowTransport, IpMapping, IpStats, PacketHeader, - XdpPpingResult, + tos_parser, IpMapping, IpStats, PacketHeader, + XdpPpingResult, FlowbeeSummaryData, FlowbeeProtocol }; mod tc_handle; pub use bus::{ bus_request, decode_request, decode_response, encode_request, encode_response, BusClient, BusReply, BusRequest, BusResponse, BusSession, CakeDiffTinTransit, CakeDiffTransit, CakeTransit, QueueStoreTransit, - UnixSocketServer, BUS_SOCKET_PATH, StatsRequest + UnixSocketServer, BUS_SOCKET_PATH, StatsRequest, TopFlowType }; pub use tc_handle::TcHandle; diff --git a/src/rust/lqos_config/src/etc/mod.rs b/src/rust/lqos_config/src/etc/mod.rs index 58a1df95..74af9730 100644 --- a/src/rust/lqos_config/src/etc/mod.rs +++ b/src/rust/lqos_config/src/etc/mod.rs @@ -45,7 +45,6 @@ pub fn load_config() -> Result { *lock = Some(config_result.unwrap()); } - log::info!("Returning cached config"); Ok(lock.as_ref().unwrap().clone()) } diff --git a/src/rust/lqos_config/src/etc/v15/flows.rs b/src/rust/lqos_config/src/etc/v15/flows.rs new file mode 100644 index 00000000..8b518b47 --- /dev/null +++ b/src/rust/lqos_config/src/etc/v15/flows.rs @@ -0,0 +1,28 @@ +//! Provides netflow support for tracking network flows. +//! +//! You can enable them by adding a `[flows]` section to your configuration file. + +use serde::{Serialize, Deserialize}; + +#[derive(Clone, Serialize, Deserialize, Debug)] +pub struct FlowConfig { + pub flow_timeout_seconds: u64, + pub netflow_enabled: bool, + pub netflow_port: Option, + pub netflow_ip: Option, + pub netflow_version: Option, + pub do_not_track_subnets: Option>, +} + +impl Default for FlowConfig { + fn default() -> Self { + Self { + flow_timeout_seconds: 30, + netflow_enabled: false, + netflow_port: None, + netflow_ip: None, + netflow_version: None, + do_not_track_subnets: None, + } + } +} diff --git a/src/rust/lqos_config/src/etc/v15/mod.rs b/src/rust/lqos_config/src/etc/v15/mod.rs index 44567b47..a84906e1 100644 --- a/src/rust/lqos_config/src/etc/v15/mod.rs +++ b/src/rust/lqos_config/src/etc/v15/mod.rs @@ -14,6 +14,7 @@ mod uisp_integration; mod powercode_integration; mod sonar_integration; mod influxdb; +mod flows; pub use bridge::*; pub use long_term_stats::LongTermStats; pub use tuning::Tunables; \ No newline at end of file diff --git a/src/rust/lqos_config/src/etc/v15/top_config.rs b/src/rust/lqos_config/src/etc/v15/top_config.rs index 5d7175d1..f96f3d56 100644 --- a/src/rust/lqos_config/src/etc/v15/top_config.rs +++ b/src/rust/lqos_config/src/etc/v15/top_config.rs @@ -51,6 +51,9 @@ pub struct Config { /// IP Range definitions pub ip_ranges: super::ip_ranges::IpRanges, + /// Network flows configuration + pub flows: Option, + /// Integration Common Variables pub integration_common: super::integration_common::IntegrationConfig, @@ -133,6 +136,7 @@ impl Default for Config { influxdb: super::influxdb::InfluxDbConfig::default(), packet_capture_time: 10, queue_check_period_ms: 1000, + flows: None, } } } diff --git a/src/rust/lqos_heimdall/src/flows.rs b/src/rust/lqos_heimdall/src/flows.rs deleted file mode 100644 index 215e093d..00000000 --- a/src/rust/lqos_heimdall/src/flows.rs +++ /dev/null @@ -1,165 +0,0 @@ -use crate::{timeline::expire_timeline, FLOW_EXPIRE_SECS}; -use dashmap::DashMap; -use lqos_bus::{tos_parser, BusResponse, FlowTransport}; -use lqos_sys::heimdall_data::{HeimdallKey, HeimdallData}; -use lqos_utils::{unix_time::time_since_boot, XdpIpAddress}; -use once_cell::sync::Lazy; -use std::{collections::HashSet, time::Duration}; - -#[derive(Clone, Debug, PartialEq, Eq, Hash)] -struct FlowKey { - src: XdpIpAddress, - dst: XdpIpAddress, - proto: u8, - src_port: u16, - dst_port: u16, -} - -#[derive(Clone, Debug, Default)] -struct FlowData { - last_seen: u64, - bytes: u64, - packets: u64, - tos: u8, -} - -impl From<&HeimdallKey> for FlowKey { - fn from(value: &HeimdallKey) -> Self { - Self { - src: value.src_ip, - dst: value.dst_ip, - proto: value.ip_protocol, - src_port: value.src_port, - dst_port: value.dst_port, - } - } -} - -static FLOW_DATA: Lazy> = Lazy::new(DashMap::new); - -/*pub(crate) fn record_flow(event: &HeimdallEvent) { - let key: FlowKey = event.into(); - if let Some(mut data) = FLOW_DATA.get_mut(&key) { - data.last_seen = event.timestamp; - data.packets += 1; - data.bytes += event.size as u64; - data.tos = event.tos; - } else { - FLOW_DATA.insert( - key, - FlowData { - last_seen: event.timestamp, - bytes: event.size.into(), - packets: 1, - tos: event.tos, - }, - ); - } -}*/ - - -/// Iterates through all throughput entries, and sends them in turn to `callback`. -/// This elides the need to clone or copy data. -fn heimdall_for_each( - callback: &mut dyn FnMut(&HeimdallKey, &[HeimdallData]), -) { - /*if let Ok(heimdall) = BpfPerCpuMap::::from_path( - "/sys/fs/bpf/heimdall", - ) { - heimdall.for_each(callback); - }*/ - lqos_sys::iterate_heimdall(callback); -} - - -fn combine_flows(values: &[HeimdallData]) -> FlowData { - let mut result = FlowData::default(); - let mut ls = 0; - values.iter().for_each(|v| { - result.bytes += v.bytes; - result.packets += v.packets; - result.tos += v.tos; - if v.last_seen > ls { - ls = v.last_seen; - } - }); - result.last_seen = ls; - result -} - -pub fn read_flows() { - heimdall_for_each(&mut |key, value| { - let flow_key = key.into(); - let combined = combine_flows(value); - if let Some(mut flow) = FLOW_DATA.get_mut(&flow_key) { - flow.last_seen = combined.last_seen; - flow.bytes = combined.bytes; - flow.packets = combined.packets; - flow.tos = combined.tos; - } else { - FLOW_DATA.insert(flow_key, combined); - } - }); -} - -/// Expire flows that have not been seen in a while. -pub fn expire_heimdall_flows() { - if let Ok(now) = time_since_boot() { - let since_boot = Duration::from(now); - let expire = (since_boot - Duration::from_secs(FLOW_EXPIRE_SECS)).as_nanos() as u64; - FLOW_DATA.retain(|_k, v| v.last_seen > expire); - expire_timeline(); - } -} - -/// Get the flow stats for a given IP address. -pub fn get_flow_stats(ip: XdpIpAddress) -> BusResponse { - let mut result = Vec::new(); - - // Obtain all the flows - let mut all_flows = Vec::new(); - for value in FLOW_DATA.iter() { - let key = value.key(); - if key.src == ip || key.dst == ip { - let (dscp, ecn) = tos_parser(value.tos); - all_flows.push(FlowTransport { - src: key.src.as_ip().to_string(), - dst: key.dst.as_ip().to_string(), - src_port: key.src_port, - dst_port: key.dst_port, - proto: match key.proto { - 6 => lqos_bus::FlowProto::TCP, - 17 => lqos_bus::FlowProto::UDP, - _ => lqos_bus::FlowProto::ICMP, - }, - bytes: value.bytes, - packets: value.packets, - dscp, - ecn, - }); - } - } - - // Turn them into reciprocal pairs - let mut done = HashSet::new(); - for (i, flow) in all_flows.iter().enumerate() { - if !done.contains(&i) { - let flow_a = flow.clone(); - let flow_b = if let Some(flow_b) = all_flows - .iter() - .position(|f| f.src == flow_a.dst && f.src_port == flow_a.dst_port) - { - done.insert(flow_b); - Some(all_flows[flow_b].clone()) - } else { - None - }; - - result.push((flow_a, flow_b)); - } - } - - result.sort_by(|a, b| b.0.bytes.cmp(&a.0.bytes)); - - BusResponse::FlowData(result) -} diff --git a/src/rust/lqos_heimdall/src/lib.rs b/src/rust/lqos_heimdall/src/lib.rs index 5531858b..a770bdfd 100644 --- a/src/rust/lqos_heimdall/src/lib.rs +++ b/src/rust/lqos_heimdall/src/lib.rs @@ -7,8 +7,6 @@ mod config; pub mod perf_interface; pub mod stats; pub use config::{HeimdalConfig, HeimdallMode}; -mod flows; -pub use flows::{expire_heimdall_flows, get_flow_stats}; mod timeline; pub use timeline::{n_second_packet_dump, n_second_pcap, hyperfocus_on_target}; mod pcap; @@ -16,7 +14,7 @@ mod watchlist; use lqos_utils::fdtimer::periodic; pub use watchlist::{heimdall_expire, heimdall_watch_ip, set_heimdall_mode}; -use crate::flows::read_flows; +use crate::timeline::expire_timeline; /// How long should Heimdall keep watching a flow after being requested /// to do so? Setting this to a long period increases CPU load after the @@ -24,9 +22,6 @@ use crate::flows::read_flows; /// collections if the client hasn't maintained the 1s request cadence. const EXPIRE_WATCHES_SECS: u64 = 5; -/// How long should Heimdall retain flow summary data? -const FLOW_EXPIRE_SECS: u64 = 10; - /// How long should Heimdall retain packet timeline data? const TIMELINE_EXPIRE_SECS: u64 = 10; @@ -48,9 +43,8 @@ pub async fn start_heimdall() { std::thread::spawn(move || { periodic(interval_ms, "Heimdall Packet Watcher", &mut || { - read_flows(); - expire_heimdall_flows(); heimdall_expire(); + expire_timeline(); }); }); } diff --git a/src/rust/lqos_map_perf/src/main.rs b/src/rust/lqos_map_perf/src/main.rs index c31c1433..4baabc47 100644 --- a/src/rust/lqos_map_perf/src/main.rs +++ b/src/rust/lqos_map_perf/src/main.rs @@ -1,6 +1,6 @@ use std::time::Instant; -use lqos_sys::{rtt_for_each, throughput_for_each}; +use lqos_sys::{iterate_flows, throughput_for_each}; fn main() { println!("LibreQoS Map Performance Tool"); @@ -8,7 +8,7 @@ fn main() { // Test the RTT map let mut rtt_count = 0; let now = Instant::now(); - rtt_for_each(&mut |_rtt, _tracker| { + iterate_flows(&mut |_rtt, _tracker| { rtt_count += 1; }); let elapsed = now.elapsed(); diff --git a/src/rust/lqos_node_manager/src/config_control.rs b/src/rust/lqos_node_manager/src/config_control.rs index 43d501de..5f25549d 100644 --- a/src/rust/lqos_node_manager/src/config_control.rs +++ b/src/rust/lqos_node_manager/src/config_control.rs @@ -66,17 +66,19 @@ pub struct LqosStats { pub time_to_poll_hosts_us: u64, pub high_watermark: (u64, u64), pub tracked_flows: u64, + pub rtt_events_per_second: u64, } #[get("/api/stats")] pub async fn stats() -> NoCache> { for msg in bus_request(vec![BusRequest::GetLqosStats]).await.unwrap() { - if let BusResponse::LqosdStats { bus_requests, time_to_poll_hosts, high_watermark, tracked_flows } = msg { + if let BusResponse::LqosdStats { bus_requests, time_to_poll_hosts, high_watermark, tracked_flows, rtt_events_per_second } = msg { return NoCache::new(Json(LqosStats { bus_requests_since_start: bus_requests, time_to_poll_hosts_us: time_to_poll_hosts, high_watermark, tracked_flows, + rtt_events_per_second, })); } } diff --git a/src/rust/lqos_node_manager/src/flow_monitor.rs b/src/rust/lqos_node_manager/src/flow_monitor.rs new file mode 100644 index 00000000..08588ff6 --- /dev/null +++ b/src/rust/lqos_node_manager/src/flow_monitor.rs @@ -0,0 +1,93 @@ +use lqos_bus::{bus_request, BusRequest, BusResponse, FlowbeeSummaryData}; +use rocket::serde::json::Json; +use crate::cache_control::NoCache; + +#[get("/api/flows/dump_all")] +pub async fn all_flows_debug_dump() -> NoCache>> { + let responses = + bus_request(vec![BusRequest::DumpActiveFlows]).await.unwrap(); + let result = match &responses[0] { + BusResponse::AllActiveFlows(flowbee) => flowbee.to_owned(), + _ => Vec::new(), + }; + + NoCache::new(Json(result)) +} + +#[get("/api/flows/count")] +pub async fn count_flows() -> NoCache> { + let responses = + bus_request(vec![BusRequest::CountActiveFlows]).await.unwrap(); + let result = match &responses[0] { + BusResponse::CountActiveFlows(count) => *count, + _ => 0, + }; + + NoCache::new(Json(result)) +} + +#[get("/api/flows/top//")] +pub async fn top_5_flows(top_n: u32, flow_type: String) -> NoCache>> { + let flow_type = match flow_type.as_str() { + "rate" => lqos_bus::TopFlowType::RateEstimate, + "bytes" => lqos_bus::TopFlowType::Bytes, + "packets" => lqos_bus::TopFlowType::Packets, + "drops" => lqos_bus::TopFlowType::Drops, + "rtt" => lqos_bus::TopFlowType::RoundTripTime, + _ => lqos_bus::TopFlowType::RateEstimate, + }; + + let responses = + bus_request(vec![BusRequest::TopFlows { n: top_n, flow_type }]).await.unwrap(); + let result = match &responses[0] { + BusResponse::TopFlows(flowbee) => flowbee.to_owned(), + _ => Vec::new(), + }; + + NoCache::new(Json(result)) +} + +#[get("/api/flows/by_country")] +pub async fn flows_by_country() -> NoCache>> { + let responses = + bus_request(vec![BusRequest::CurrentEndpointsByCountry]).await.unwrap(); + let result = match &responses[0] { + BusResponse::CurrentEndpointsByCountry(country_summary) => country_summary.to_owned(), + _ => Vec::new(), + }; + + NoCache::new(Json(result)) +} + +#[get("/api/flows/lat_lon")] +pub async fn flows_lat_lon() -> NoCache>> { + let responses = + bus_request(vec![BusRequest::CurrentEndpointLatLon]).await.unwrap(); + let result = match &responses[0] { + BusResponse::CurrentLatLon(lat_lon) => lat_lon.to_owned(), + _ => Vec::new(), + }; + + NoCache::new(Json(result)) +} + +#[get("/api/flows/ether_protocol")] +pub async fn flows_ether_protocol() -> NoCache> { + let responses = + bus_request(vec![BusRequest::EtherProtocolSummary]).await.unwrap(); + let result = responses[0].to_owned(); + + NoCache::new(Json(result)) +} + +#[get("/api/flows/ip_protocol")] +pub async fn flows_ip_protocol() -> NoCache>> { + let responses = + bus_request(vec![BusRequest::IpProtocolSummary]).await.unwrap(); + let result = match &responses[0] { + BusResponse::IpProtocols(ip_protocols) => ip_protocols.to_owned(), + _ => Vec::new(), + }; + + NoCache::new(Json(result)) +} \ No newline at end of file diff --git a/src/rust/lqos_node_manager/src/main.rs b/src/rust/lqos_node_manager/src/main.rs index d680eb58..93ea75ee 100644 --- a/src/rust/lqos_node_manager/src/main.rs +++ b/src/rust/lqos_node_manager/src/main.rs @@ -12,6 +12,7 @@ mod config_control; mod network_tree; mod queue_info; mod toasts; +mod flow_monitor; // Use JemAllocator only on supported platforms #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] @@ -43,6 +44,7 @@ fn rocket() -> _ { static_pages::shaped_devices_add_page, static_pages::unknown_devices_page, static_pages::circuit_queue, + static_pages::pretty_map_graph, config_control::config_page, network_tree::tree_page, static_pages::ip_dump, @@ -57,6 +59,7 @@ fn rocket() -> _ { tracker::ram_usage, tracker::top_10_downloaders, tracker::worst_10_rtt, + tracker::worst_10_tcp, tracker::rtt_histogram, tracker::host_counts, shaped_devices::all_shaped_devices, @@ -109,6 +112,14 @@ fn rocket() -> _ { // Front page toast checks toasts::version_check, toasts::stats_check, + // Flowbee System + flow_monitor::all_flows_debug_dump, + flow_monitor::count_flows, + flow_monitor::top_5_flows, + flow_monitor::flows_by_country, + flow_monitor::flows_lat_lon, + flow_monitor::flows_ether_protocol, + flow_monitor::flows_ip_protocol, ], ); diff --git a/src/rust/lqos_node_manager/src/queue_info.rs b/src/rust/lqos_node_manager/src/queue_info.rs index 3a0a34ab..89a77bff 100644 --- a/src/rust/lqos_node_manager/src/queue_info.rs +++ b/src/rust/lqos_node_manager/src/queue_info.rs @@ -1,7 +1,7 @@ use crate::auth_guard::AuthGuard; use crate::cache_control::NoCache; use crate::tracker::{SHAPED_DEVICES, lookup_dns}; -use lqos_bus::{bus_request, BusRequest, BusResponse, FlowTransport, PacketHeader, QueueStoreTransit}; +use lqos_bus::{bus_request, BusRequest, BusResponse, FlowbeeSummaryData, PacketHeader, QueueStoreTransit}; use rocket::fs::NamedFile; use rocket::http::Status; use rocket::response::content::RawJson; @@ -107,6 +107,19 @@ pub async fn raw_queue_by_circuit( } #[get("/api/flows/")] +pub async fn flow_stats(ip_list: String, _auth: AuthGuard) -> NoCache>> { + let mut result = Vec::new(); + let request: Vec = ip_list.split(',').map(|ip| BusRequest::FlowsByIp(ip.to_string())).collect(); + let responses = bus_request(request).await.unwrap(); + for r in responses.iter() { + if let BusResponse::FlowsByIp(flow) = r { + result.extend_from_slice(flow); + } + } + NoCache::new(Json(result)) +} + +/*#[get("/api/flows/")] pub async fn flow_stats(ip_list: String, _auth: AuthGuard) -> NoCache)>>> { let mut result = Vec::new(); let request: Vec = ip_list.split(',').map(|ip| BusRequest::GetFlowStats(ip.to_string())).collect(); @@ -117,7 +130,7 @@ pub async fn flow_stats(ip_list: String, _auth: AuthGuard) -> NoCache( NoCache::new(NamedFile::open("static/shaped-add.html").await.ok()) } +// Temporary for funsies +#[get("/showoff")] +pub async fn pretty_map_graph<'a>( + _auth: AuthGuard, +) -> NoCache> { + NoCache::new(NamedFile::open("static/showoff.html").await.ok()) +} + #[get("/vendor/bootstrap.min.css")] pub async fn bootsrap_css<'a>() -> LongCache> { LongCache::new(NamedFile::open("static/vendor/bootstrap.min.css").await.ok()) diff --git a/src/rust/lqos_node_manager/src/tracker/mod.rs b/src/rust/lqos_node_manager/src/tracker/mod.rs index 6795c2de..ec5c2b8f 100644 --- a/src/rust/lqos_node_manager/src/tracker/mod.rs +++ b/src/rust/lqos_node_manager/src/tracker/mod.rs @@ -22,6 +22,7 @@ pub struct IpStatsWithPlan { pub tc_handle: TcHandle, pub circuit_id: String, pub plan: (u32, u32), + pub tcp_retransmits: (u64, u64), } impl From<&IpStats> for IpStatsWithPlan { @@ -34,6 +35,7 @@ impl From<&IpStats> for IpStatsWithPlan { tc_handle: i.tc_handle, circuit_id: i.circuit_id.clone(), plan: (0, 0), + tcp_retransmits: i.tcp_retransmits, }; if !result.circuit_id.is_empty() { @@ -131,6 +133,21 @@ pub async fn worst_10_rtt(_auth: AuthGuard) -> NoCache NoCache>> { + if let Ok(messages) = bus_request(vec![BusRequest::GetWorstRetransmits { start: 0, end: 10 }]).await + { + for msg in messages { + if let BusResponse::WorstRetransmits(stats) = msg { + let result = stats.iter().map(|tt| tt.into()).collect(); + return NoCache::new(MsgPack(result)); + } + } + } + + NoCache::new(MsgPack(Vec::new())) +} + #[get("/api/rtt_histogram")] pub async fn rtt_histogram(_auth: AuthGuard) -> NoCache>> { if let Ok(messages) = bus_request(vec![BusRequest::RttHistogram]).await diff --git a/src/rust/lqos_node_manager/static/circuit_queue.html b/src/rust/lqos_node_manager/static/circuit_queue.html index 09be0893..d58edaeb 100644 --- a/src/rust/lqos_node_manager/static/circuit_queue.html +++ b/src/rust/lqos_node_manager/static/circuit_queue.html @@ -215,10 +215,6 @@
Flows (Last 30 Seconds)
-
@@ -763,6 +759,19 @@ } } + function parse_rtts(data, idx) { + let n = []; + for (let i=0; i { + $.get("/api/flows/" + ip_list, (data) => { + //msgPackGet("/api/flows/" + ip_list, (data) => { //console.log(data); let html = ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + for (var i=0; i"; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + html += ""; + } + html += ""; + + /*html += ""; html += ""; html += ""; html += ""; @@ -837,6 +872,7 @@ html += ""; } html += "
ConnectionBytesPacketsTCP RetransmitsTCP RTTASNASN Country
" + scaleNumber(data[i].bytes_sent[0]) + " / " + scaleNumber(data[i].bytes_sent[1]) + "" + scaleNumber(data[i].packets_sent[0]) + " / " + scaleNumber(data[i].packets_sent[1]) + "" + data[i].tcp_retransmits[0] + " / " + data[i].tcp_retransmits[1] + "" + scaleNanos(data[i].rtt_nanos[0]) + " / " + scaleNanos(data[i].rtt_nanos[1]) + "(" + data[i].remote_asn + ") " + data[i].remote_asn_name + "" + data[i].remote_asn_country + "
ProtocolSrcSrc Port
"; + */ $("#flowList").html(html); }) } diff --git a/src/rust/lqos_node_manager/static/ip_dump.html b/src/rust/lqos_node_manager/static/ip_dump.html index a4060c6b..d5517ebf 100644 --- a/src/rust/lqos_node_manager/static/ip_dump.html +++ b/src/rust/lqos_node_manager/static/ip_dump.html @@ -332,6 +332,7 @@ if (hdr->cwr) flags |= 128; target = params.id; $.get("/api/packet_dump/" + params.id, (data) => { + console.log(data); data.sort((a,b) => a.timestamp - b.timestamp); // Find the minimum timestamp diff --git a/src/rust/lqos_node_manager/static/lqos.js b/src/rust/lqos_node_manager/static/lqos.js index 7c30fadb..3abe56d7 100644 --- a/src/rust/lqos_node_manager/static/lqos.js +++ b/src/rust/lqos_node_manager/static/lqos.js @@ -34,6 +34,7 @@ const IpStats = { "tc_handle": 4, "circuit_id": 5, "plan": 6, + "tcp_retransmits": 7, } const FlowTrans = { @@ -165,7 +166,7 @@ function updateHostCounts() { });*/ // LTS Check $.get("/api/stats_check", (data) => { - console.log(data); + //console.log(data); let template = " $TEXT$"; switch (data.action) { case "Disabled": { @@ -272,6 +273,18 @@ function scaleNumber(n) { return n; } +function scaleNanos(n) { + if (n == 0) return ""; + if (n > 1000000000) { + return (n / 1000000000).toFixed(2) + "s"; + } else if (n > 1000000) { + return (n / 1000000).toFixed(2) + "ms"; + } else if (n > 1000) { + return (n / 1000).toFixed(2) + "µs"; + } + return n + "ns"; +} + const reloadModal = `