summaryrefslogtreecommitdiffstats
path: root/src/os
AgeCommit message (Collapse)Author
2024-04-02Enable Android build (#384)Felix Obenhuber
* Support build for target_os android The target_os `android` is quite similar to `linux` but must be mentioned in the guards explicitly. Tested for target `aarch64-linux-android`. * Add target aarch64-linux-android to ci Use `cross` for building target `aarch64-linux-android`. In the `ci` workflow the matrix branch of `os` `ubuntu-latest` is used because the matrix organization is host os centric instead of target. Releases are build with `cross` for target `aarch64-linux-android`. Install `cross` if needed for a run. At the time of writing the latest release of `cross` can't build binaries for target `aarch64-linux-android` and it's common sense that the latest git tag or `master` shall be used [1]. [1] https://github.com/cross-rs/cross/issues/1222 * Add android related readme section
2024-03-25Fix IPv6 socket detect logic (#383)cyqsimon
* Fix IPv6 socket detect logic * Write changelog
2024-03-25Remove unnecessary logging synchronisation (#381)cyqsimon
* Revert 89e1140 - simplelog is already thread safe - see https://github.com/Drakulix/simplelog.rs/issues/146 * Write changelog * Fix import for MacOS
2024-03-18feat: add `PID` column to `Process` table (#379)Krithic Kumar
* feat: add `PID` column to `Process` table * fix(tests): populate fake data with the correct `ProcessInfo` type * test: update snapshots * refactor: use more idiomatic rust * refactor: rename function from `get_proc_name` to `get_proc_info` * refactor: only display PID when width available is highest ref: https://github.com/imsnif/bandwhich/pull/165#issuecomment-620852892 * tests: update snapshots * chore: update CHANGELOG * fix: clippy warnings * Revert "fix: clippy warnings" This reverts commit e5f06cba1943d60b43a19957c42e3178c6916f69. We will do this separately for the sake of keeping a clean history * refactor: use `u32` for PID * refactor: more idiomatic rust --------- Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
2024-01-28Hot-fix: Windows compile issue (#356)cyqsimon
2023-10-26Use `once_cell::sync::Lazy` to make regex usage more ergonomic (#313)cyqsimon
2023-10-21Refactor `OsInputOutput` (combine interfaces & frames into single Vec) (#310)cyqsimon
* Refactor `OsInputOutput` (combine interfaces & frames into single Vec) * Add note on handling a separate failure case * Reduce code duplication
2023-10-20Make logging race-free using a global lock & macro (#309)cyqsimon
* Make logging race-free using a global lock & macro * Fix clippy complaint * Fix import for MacOS * Make `mt_log` expand to an expression
2023-10-11Ignore connections that fail parsing instead of panicking on BSD (#288)cyqsimon
* Ignore connections that fail parsing instead of panicking on BSD - Tentative fix for #217 * Log when a connection fails parsing - I actually love unreadable code * Fix clippy complaint
2023-10-11Never use `&Option` in function signaturecyqsimon
2023-08-26chore: drop lazy_staticNbiba Bedis
2023-08-25Use variable capture syntax in format macros where possiblecyqsimon
2023-08-25Compact importscyqsimon
2023-08-25Migrate from `failure` to `anyhow`+`thiserror`cyqsimon
2023-08-25Fix windows buildcyqsimon
2023-08-25Fix MacOS clippy warnings (hopefully?)cyqsimon
2023-08-25Fix clippy warningscyqsimon
2023-08-14Bump incompatible depscyqsimon
- Binary build is fixed, but `packet_builder` crate seems to have some issues
2020-12-27Convince clippy to chillBrooks J Rady
2020-10-01feat(dns): allow custom dns server as cli flag (#193)Aram Drevekenin
* feat(dns): allow custom dns server as cli flag * fix(style): remove commented debugging line (oops)
2020-09-29fix(sniffer): handle disconnected interfaces (and periodically attempt to ↵Mat Wood
re-connect) (#191) * Panic on non-Timeout errors in packet Sniffer * Attempt to Re-establish interface channels after disconnect Sniffer::next() now returns an io::Result so the thread in main can determine between no packets & a sniffing error - Matching on EtherType to remove duplicate code determining IP Version Added Sniffer::reset_channel to allow main to poll a previously connected interface * Error handling & timeout delay performed in Sniffer::next * Removing no longer needed Ether layer in test packet builder
2020-09-14feat(ui): crossplatform terminal resize handling using crossterm ↵remgodow
Event::Resize (#186)
2020-09-11fix(dns): parsing of `/etc/resolv.conf` by manually updating `resolv-conf` ↵Maximilian Bosch
crate (#184) * Show the error cause if initializing a DNS resolver fails * Manually bump `resolv-conf` to `master` at rev `83c0f25` This fixes the parsing of `/etc/resolv.conf` with `options trust-ad` which is e.g. used in `systemd-resolved-v246`[1]. Refs #166 [1] https://github.com/systemd/systemd/commit/a742f9828ea73d9c2c9bafe701c10fe60f058012
2020-09-10feat(platform): windows build and run support (#180)remgodow
* Remove connections vector from OpenSockets, use common OpenSockets implementation based on sysinfo and netstat2. * Replace termion backend with crossterm, which works on Windows as well. * More fixes for windows build. * Remove tui default-features (termion), update unit tests for crossterm. * Windows compilation fixes. * Remove unused get_open_sockets implementations for linux and mac. Fix formatting. * Add build.rs for windows to download and extract Packet.lib from npcap SDK. * Resolve Cargo.lock after merging main. * fix(tests): adjust snapshots new location of the dns resolution * style(clippy): clippy * style(clippy): remove dead code * style(clippy): use write_all in build.rs * style(clippy): remove unused import added by Intellij * style(review): use String instead of str * fix(build): run build.rs only once * fix(regression): skip iface_is_up() filter only for Windows * fix(review): restore per os implementation of get_open_sockets() * fix(cargo): add missing os specific packages * fix: conditional compilation of windows module * fix: compilation errors * fix: missing Protocol::from_str() implementation * style(clippy): remove unused methods Co-authored-by: Aram Drevekenin <aram@poor.dev>
2020-09-03feat(infra): replace termion with Windows compatible crossterm (#179)remgodow
* Replace termion backend with crossterm, which works on Windows as well. * Remove tui default-features (termion), update unit tests for crossterm. * Fix formatting.
2020-05-03chore(deps): remove pnet_bandwhich_fork and upgrade to latest pnet + ↵Aram Drevekenin
packet_builder releases
2020-03-31Fix the loss of large, merged packets (#158)Brooks Rady
2020-03-01fix(error-handling): add custom error handling (#104)yossarian
* Initial * Add errors file * Update * Add error message * Update * Add kind method * Update error kind * Update get_datalink_channel * Update unused var * Initial * Add errors file * Update * Add error message * Update * Add kind method * Update error kind * Update error message * Update error name * Update error messages * Update message * Update * Update error message * format * format2 * update * Update error checking * format * refactor * reduce message * remove unused code * fix lint * wip * add multiline * add handle_errors * update fold * update * clippy * Update * spaces * fix(error-handling): display interface names in errors * style(format): rustfmt Co-authored-by: Aram Drevekenin <aram@poor.dev>
2020-01-18Update description about capabilities neededKelvin Zhang
2020-01-14Merge pull request #70 from zhangxp1998/ipv6ebroto
Support Ipv6
2020-01-14fix(network): bug that upload speed is not tabulated correctly (#116)Kelvin Zhang
2020-01-13fix(dns): display a more informative message in case we can't resolveEduardo Broto
Tested in Linux. When offline, /etc/resolve.conf is a broken symlink, so opening it yields an IO error. It should work similarly in other OSs as the resolver is OS-agnostic. Before, the message was simply: Error: io error. After this change, a more informative message is shown.
2020-01-13Fix regex for parsing ipv6 listening socketsKelvin Zhang
2020-01-13Parse ipv6 info from procfsKelvin Zhang
2020-01-13Parse ipv6 entries from lsofKelvin Zhang
2020-01-13Sniff Ipv6 packetsKelvin Zhang
2020-01-12Add support for more operating systems.Valdemar Erk
This commit will add support for operating systems that have the lsof tool, initially it will only work on MacOS and FreeBSD, but more operating systems may be added at a later time. Signed-off-by: Valdemar Erk <valdemar@erk.io>
2020-01-11fix(error): mention `setcap(8)`-fix in EPERM error on Linux (#108)Maximilian Bosch
This is already mentioned in the README, but I figured that it might be helpful to point linux-users to this if they try to run `bandwhich` right after installing it and encountering this kind of error.
2020-01-10fmt fixChubby Puddles Esq
2020-01-10made requested PR changesChubby Puddles Esq
2020-01-09formatting issuesChubby Puddles Esq
2020-01-09Upgraded trust-dns-resolver (#92)Chubby Puddles Esq
2020-01-08Fix clippy warning on MacKelvin Zhang
2020-01-08Fix issue #84 by handle error more gracefullyKelvin Zhang
2020-01-07Merge pull request #82 from zhangxp1998/udpKelvin Zhang
Fix bug that non-connected Udp sockets aren't displayed
2020-01-07Address some comments on PRKelvin Zhang
2020-01-07Format code using rustfmtKelvin Zhang
2020-01-07Use <local_ip, local_port, protocol> to indentify processesKelvin Zhang
2020-01-07chore(packages): use pnet fork until they fix the pselect bug (#83)Aram Drevekenin
* chore(packages): use pnet fork until they fix the pselect bug * fix(deps): undo accidental dep change
2020-01-07Update parsing code to parse local_ipKelvin Zhang