rusty_network_manager/network_manager/
ppp.rs1use zbus::{Connection, Result, proxy};
15
16impl PPPProxy<'_> {
17 pub async fn new_from_path(
18 device_path: zbus::zvariant::OwnedObjectPath,
19 connection: &Connection,
20 ) -> Result<PPPProxy<'_>> {
21 PPPProxy::builder(connection)
22 .path(device_path)?
23 .build()
24 .await
25 }
26}
27
28#[proxy(
29 default_path = "/org/freedesktop/NetworkManager/PPP",
30 default_service = "org.freedesktop.NetworkManager",
31 interface = "org.freedesktop.NetworkManager.PPP",
32 assume_defaults = true
33)]
34pub trait PPP {
35 fn need_secrets(&self) -> zbus::Result<(String, String)>;
37
38 fn set_ifindex(&self, ifindex: i32) -> zbus::Result<()>;
40
41 fn set_ip4_config(
43 &self,
44 config: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
45 ) -> zbus::Result<()>;
46
47 fn set_ip6_config(
49 &self,
50 config: std::collections::HashMap<&str, zbus::zvariant::Value<'_>>,
51 ) -> zbus::Result<()>;
52
53 fn set_state(&self, state: u32) -> zbus::Result<()>;
55}