{"id":48249032,"url":"https://github.com/sntns/batman-robin","last_synced_at":"2026-04-04T20:45:01.675Z","repository":{"id":335857880,"uuid":"1109122135","full_name":"sntns/batman-robin","owner":"sntns","description":"lib and cli to interact with batman-adv kernel module","archived":false,"fork":false,"pushed_at":"2026-03-26T16:40:52.000Z","size":198,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T06:48:50.736Z","etag":null,"topics":["batman-adv","mesh","mesh-networks","netlink","wifi"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sntns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T11:17:59.000Z","updated_at":"2026-03-26T16:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sntns/batman-robin","commit_stats":null,"previous_names":["sntns/robin"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sntns/batman-robin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntns%2Fbatman-robin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntns%2Fbatman-robin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntns%2Fbatman-robin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntns%2Fbatman-robin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sntns","download_url":"https://codeload.github.com/sntns/batman-robin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sntns%2Fbatman-robin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batman-adv","mesh","mesh-networks","netlink","wifi"],"created_at":"2026-04-04T20:44:59.372Z","updated_at":"2026-04-04T20:45:01.668Z","avatar_url":"https://github.com/sntns.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# batman-robin\n\n[![crates.io](https://img.shields.io/crates/v/batman-robin.svg)](https://crates.io/crates/batman-robin)\n[![docs.rs](https://img.shields.io/docsrs/batman-robin)](https://docs.rs/batman-robin)\n[![CI](https://github.com/sntns/robin/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sntns/robin/actions/workflows/ci.yml)\n[![Coverage Status](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/someuser/coverage-badge.json)](https://github.com/sntns/robin)\n\n`batman-robin` is a Rust library and CLI tool to interact with the **BATMAN-adv** kernel module, providing easy access to mesh network interfaces, neighbors, gateways, and routing algorithms.\n\n---\n\n## What are BATMAN and Robin?\n\n**BATMAN-adv** (Better Approach To Mobile Ad-hoc Networking - advanced) is a Linux kernel module that implements a Layer 2 mesh networking protocol. Operating entirely within the kernel, BATMAN-adv routes Ethernet frames rather than IP packets, making all participating nodes appear as if they're on the same local area network (LAN). This protocol-agnostic approach enables transparent support for higher layer protocols like IPv4, IPv6, DHCP, and more across multiple physical media including WiFi, Ethernet, and VPN connections.\n\nKey features of BATMAN-adv include:\n- **Decentralized mesh networking**: No central controller required; each node autonomously manages routing\n- **Layer 2 operation**: Routes Ethernet frames for protocol independence at higher layers\n- **Multi-media support**: Works with WiFi, Ethernet, VPNs, and any Layer 2 interface\n- **Dynamic topology handling**: Adapts to mobile and changing network environments\n- **Minimal overhead**: Efficient in-kernel implementation\n\n**Robin** is the companion tool that makes working with BATMAN-adv straightforward. Named after Batman's sidekick, `batman-robin` provides both a Rust library (for programmatic access) and a command-line interface (`robctl`) to manage and monitor BATMAN-adv mesh networks. With Robin, you can easily query mesh status, configure routing parameters, manage network interfaces, and monitor mesh topology—all without needing to work directly with low-level netlink APIs or kernel interfaces.\n\nFor more information about BATMAN-adv:\n- [Linux Kernel BATMAN-adv Documentation](https://docs.kernel.org/networking/batman-adv.html)\n- [BATMAN-adv Wiki and Guides](https://www.open-mesh.org/doc/batman-adv/Wiki.html)\n- [BATMAN-adv GitHub Repository](https://github.com/open-mesh-mirror/batman-adv)\n\n---\n\n## Features\n\n- Query and manage BATMAN-adv mesh interfaces\n- Retrieve neighbors, originators, gateways, and translation tables\n- Enable/disable aggregation, AP isolation, and bridge loop avoidance\n- Inspect and set routing algorithms\n- Provides both a Rust API and a command-line interface (`robctl`)\n\n---\n\n## Prerequisites\n\nBefore using Robin, you need to have the BATMAN-adv kernel module installed and loaded on your Linux system:\n\n```bash\n# Check if batman-adv is available\nmodinfo batman-adv\n\n# Load the module\nsudo modprobe batman-adv\n```\n\nFor installation instructions and system requirements, see the [BATMAN-adv installation guide](https://www.open-mesh.org/doc/batman-adv/Wiki.html).\n\n---\n\n## Installation\n\nAdd `batman-robin` as a dependency in your `Cargo.toml`:\n\n```toml\n[dependencies]\nbatman-robin = { git = \"https://github.com/sntns/robin.git\" }\ntokio = { version = \"1\", features = [\"full\"] }\n```\n\nBuild the CLI:\n\n```bash\ncargo install --path .\n```\n\nThis will install the `robctl` CLI tool.\n\n---\n\n## Rust API Usage\n\n```rust\nuse batman_robin::{RobinClient, GwMode};\nuse tokio;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), batman_robin::RobinError\u003e {\n    let client = RobinClient::new();\n\n    // Get default mesh interface\n    let mesh_if = \"bat0\";\n\n    // List neighbors\n    let neighbors = client.neighbors(mesh_if).await?;\n    for n in neighbors {\n        println!(\"{:?}\", n);\n    }\n\n    // Enable packet aggregation\n    client.set_aggregation(mesh_if, true).await?;\n\n    // Get gateway mode\n    let gw_info = client.get_gw_mode(mesh_if).await?;\n    println!(\"Gateway mode: {{:?}}\", gw_info.mode);\n\n    // Set default routing algorithm\n    client.set_default_routing_algo(\"BATMAN_V\").await?;\n\n    Ok(())\n}\n```\n\n### API Highlights\n\n- **Interface Management**\n  - `get_interface`, `set_interface`, `create_interface`, `destroy_interface`, `count_interfaces`\n- **Mesh Settings**\n  - `get_aggregation`, `set_aggregation`\n  - `get_ap_isolation`, `set_ap_isolation`\n  - `get_bridge_loop_avoidance`, `set_bridge_loop_avoidance`\n- **Routing**\n  - `get_default_routing_algo`, `get_active_routing_algos`, `get_available_routing_algos`, `set_default_routing_algo`\n- **Gateway**\n  - `get_gw_mode`, `set_gw_mode`\n- **Network Tables**\n  - `neighbors`, `originators`, `translocal`, `transglobal`, `gateways`\n\n---\n\n## CLI Usage\n\n```bash\nrobctl --meshif bat0 neighbors\nrobctl --meshif bat0 gateways\nrobctl --meshif bat0 gw_mode\nrobctl --meshif bat0 originators\nrobctl --meshif bat0 translocal\nrobctl --meshif bat0 transglobal\nrobctl --meshif bat0 interface\nrobctl --meshif bat0 aggregation\nrobctl --meshif bat0 ap_isolation\nrobctl --meshif bat0 bridge_loop_avoidance\nrobctl --meshif bat0 routing_algo\n```\n\n### Examples\n\n- **Check neighbors**\n\n```bash\nrobctl -m bat0 neighbors\n```\n\n- **Enable aggregation**\n\n```bash\nrobctl -m bat0 aggregation 1\n```\n\n- **Set gateway mode to server**\n\n```bash\nrobctl -m bat0 gw_mode server 1000/500\n```\n\n- **Create a mesh interface with BATMAN_V**\n\n```bash\nrobctl -m bat0 interface create ra BATMAN_V\n```\n\n- **Display the default routing algorithm**\n\n```bash\nrobctl -m bat0 routing_algo\n```\n\n---\n\n## Testing\n\nTo run tests:\n\n```bash\ncargo test --all\n```\n\nTo check code formatting and lint:\n\n```bash\ncargo fmt -- --check\ncargo clippy -- -D warnings\n```\n\nTo check coverage (requires tarpaulin):\n\n```bash\ncargo install cargo-tarpaulin\ncargo tarpaulin --out Xml\n```\n\n---\n\n## Contributing\n\nContributions are welcome! You can:\n\n- Open issues for bugs or feature requests\n- Submit pull requests for improvements\n- Add more examples and documentation\n\nPlease make sure to run `cargo fmt` and `cargo clippy` before submitting PRs.\n\n---\n\n## Learn More\n\n### BATMAN-adv Resources\n\n- **[Official BATMAN-adv Documentation](https://docs.kernel.org/networking/batman-adv.html)** - Linux kernel documentation for the batman-adv module\n- **[BATMAN-adv Wiki](https://www.open-mesh.org/doc/batman-adv/Wiki.html)** - Comprehensive guides, tutorials, and configuration examples\n- **[open-mesh.org](https://www.open-mesh.org/)** - The B.A.T.M.A.N. advanced project homepage\n- **[BATMAN-adv GitHub](https://github.com/open-mesh-mirror/batman-adv)** - Source code and development repository\n\n### Related Tools\n\n- **[batctl](https://www.open-mesh.org/projects/batman-adv/wiki/Tweaking)** - The official BATMAN-adv control and management tool (C implementation)\n\n### Robin vs batctl Comparison\n\nFor a comprehensive comparison between Robin and batctl features, including a list of implemented and missing methods, see [BATCTL_COMPARISON.md](BATCTL_COMPARISON.md)\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsntns%2Fbatman-robin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsntns%2Fbatman-robin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsntns%2Fbatman-robin/lists"}