pub struct LinkGtp;Expand description
Represent GTP interface. Example code on creating a GTP interface
use rtnetlink::{new_connection, LinkGtp};
#[tokio::main]
async fn main() -> Result<(), String> {
let (connection, handle, _) = new_connection().unwrap();
tokio::spawn(connection);
handle
.link()
.add(
LinkGtp::new("gtp0")
.role(rtnetlink::packet_route::link::GtpRole::Sgsn)
.build(),
)
.execute()
.await
.map_err(|e| format!("{e}"))
}Please check LinkMessageBuilder::
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkGtp
impl RefUnwindSafe for LinkGtp
impl Send for LinkGtp
impl Sync for LinkGtp
impl Unpin for LinkGtp
impl UnsafeUnpin for LinkGtp
impl UnwindSafe for LinkGtp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more