brctl-rs
This project is a Rust wrapper for the brctl command-line tool used for Ethernet bridge administration on Linux systems. It provides a clean, programmatic interface for creating, managing, and inspecting network bridges, allowing Rust developers to interact with brctl and related networking utilities(like ip) in a more user-friendly manner.
Features
- Bridge Creation and Deletion: Easily create and delete network bridges with intuitive Rust functions.
- Interface Management: Add or remove network interfaces from bridges programmatically.
- Bridge Properties: Query and modify bridge properties, such as Spanning Tree Protocol (STP), hairpin mode, and bridge ageing time.
- System Readiness Check: Verify system readiness by ensuring
brctlandiputilities are available and properly configured. - List and Inspect Bridges: Retrieve a list of all bridges on the system and inspect bridge-specific details, including connected interfaces and bridge IDs.
Dependencies / System Requirements
-
Linux: This wrapper is designed for Linux systems, as
brctlis a Linux-specific utility.- brctl: The tool for managing Ethernet bridges, part of the
bridge-utilspackage on most Linux distributions. - ip: The command used for network interface manipulation, typically provided by
iproute2.
Ensure both utilities are installed on your system for full functionality of this wrapper.
- brctl: The tool for managing Ethernet bridges, part of the
Example Usage
You can find this example on examples/basic.rs.
use ;
Installation
Add the following to your Cargo.toml file:
[]
= "1.0.0"
now you can use the crate in your project 🦀!
License
This project is licensed under the GPL-3.0. For more information, see the LICENSE file.
Contributing
Contributions are welcome! Please submit issues or pull requests to the repository at: GitHub - ViniciosLugli/brctl-rs
Authors
- Vinicios Lugli - vinicioslugli@gmail.com