Add wrappers for TUN/TAP devices and WireGuard devices
This commit is contained in:
parent
4704a1672d
commit
8bdccc1f18
7 changed files with 194 additions and 2 deletions
48
networkmanager/src/interface/device/tun.rs
Normal file
48
networkmanager/src/interface/device/tun.rs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Device.Tun`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
||||
//! Source: `org.freedesktop.NetworkManager.Device.Tun.xml`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.Tun",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait TunDevice {
|
||||
/// Group property
|
||||
#[dbus_proxy(property)]
|
||||
fn group(&self) -> zbus::Result<i64>;
|
||||
|
||||
/// HwAddress property
|
||||
#[dbus_proxy(property)]
|
||||
fn hw_address(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Mode property
|
||||
#[dbus_proxy(property)]
|
||||
fn mode(&self) -> zbus::Result<String>;
|
||||
|
||||
/// MultiQueue property
|
||||
#[dbus_proxy(property)]
|
||||
fn multi_queue(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// NoPi property
|
||||
#[dbus_proxy(property)]
|
||||
fn no_pi(&self) -> zbus::Result<bool>;
|
||||
|
||||
/// Owner property
|
||||
#[dbus_proxy(property)]
|
||||
fn owner(&self) -> zbus::Result<i64>;
|
||||
|
||||
/// VnetHdr property
|
||||
#[dbus_proxy(property)]
|
||||
fn vnet_hdr(&self) -> zbus::Result<bool>;
|
||||
}
|
||||
32
networkmanager/src/interface/device/wireguard.rs
Normal file
32
networkmanager/src/interface/device/wireguard.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
//! # DBus interface proxy for: `org.freedesktop.NetworkManager.Device.WireGuard`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `2.0.1` from DBus introspection data.
|
||||
//! Source: `org.freedesktop.NetworkManager.Device.WireGuard.xml`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the
|
||||
//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
|
||||
//! section of the zbus documentation.
|
||||
//!
|
||||
|
||||
use zbus::dbus_proxy;
|
||||
|
||||
#[dbus_proxy(
|
||||
interface = "org.freedesktop.NetworkManager.Device.WireGuard",
|
||||
default_service = "org.freedesktop.NetworkManager"
|
||||
)]
|
||||
pub trait WireGuardDevice {
|
||||
/// FwMark property
|
||||
#[dbus_proxy(property)]
|
||||
fn fw_mark(&self) -> zbus::Result<u32>;
|
||||
|
||||
/// ListenPort property
|
||||
#[dbus_proxy(property)]
|
||||
fn listen_port(&self) -> zbus::Result<u16>;
|
||||
|
||||
/// PublicKey property
|
||||
#[dbus_proxy(property)]
|
||||
fn public_key(&self) -> zbus::Result<Vec<u8>>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue