TunInterfaceOptions -> TunOptions
This commit is contained in:
parent
f20f56062c
commit
d3882bd008
6 changed files with 13 additions and 13 deletions
|
|
@ -15,7 +15,7 @@ mod sys;
|
|||
|
||||
pub use super::queue::TunQueue;
|
||||
|
||||
use super::{ifname_to_string, string_to_ifname, TunInterfaceOptions};
|
||||
use super::{ifname_to_string, string_to_ifname, TunOptions};
|
||||
use kern_control::SysControlSocket;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -26,11 +26,11 @@ pub struct TunInterface {
|
|||
impl TunInterface {
|
||||
#[throws]
|
||||
pub fn new() -> TunInterface {
|
||||
Self::new_with_options(TunInterfaceOptions::new())?
|
||||
Self::new_with_options(TunOptions::new())?
|
||||
}
|
||||
|
||||
#[throws]
|
||||
pub fn new_with_options(_: TunInterfaceOptions) -> TunInterface {
|
||||
pub fn new_with_options(_: TunOptions) -> TunInterface {
|
||||
TunInterface::connect(0)?
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use log::info;
|
|||
|
||||
use libc::in6_ifreq;
|
||||
|
||||
use super::{ifname_to_string, string_to_ifname, TunInterfaceOptions};
|
||||
use super::{ifname_to_string, string_to_ifname, TunOptions};
|
||||
|
||||
mod sys;
|
||||
|
||||
|
|
@ -24,11 +24,11 @@ pub struct TunInterface {
|
|||
impl TunInterface {
|
||||
#[throws]
|
||||
pub fn new() -> TunInterface {
|
||||
Self::new_with_options(TunInterfaceOptions::new())?
|
||||
Self::new_with_options(TunOptions::new())?
|
||||
}
|
||||
|
||||
#[throws]
|
||||
pub(crate) fn new_with_options(options: TunInterfaceOptions) -> TunInterface {
|
||||
pub(crate) fn new_with_options(options: TunOptions) -> TunInterface {
|
||||
let file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::{
|
|||
os::fd::{AsRawFd, FromRawFd, IntoRawFd, RawFd},
|
||||
};
|
||||
|
||||
use super::TunInterfaceOptions;
|
||||
use super::TunOptions;
|
||||
|
||||
mod queue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue