add syscall crate and import IpAddr

This commit is contained in:
JosiasAurel 2024-02-24 21:29:15 +01:00 committed by Jett Chen
parent 807dffa3be
commit e8d19986bc

View file

@ -2,7 +2,7 @@ use std::{
fs::OpenOptions, fs::OpenOptions,
io::{Error, Write}, io::{Error, Write},
mem, mem,
net::{Ipv4Addr, Ipv6Addr, SocketAddrV4}, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddrV4},
os::{ os::{
fd::RawFd, fd::RawFd,
unix::io::{AsRawFd, FromRawFd, IntoRawFd}, unix::io::{AsRawFd, FromRawFd, IntoRawFd},
@ -15,7 +15,7 @@ use socket2::{Domain, SockAddr, Socket, Type};
use tracing::{info, instrument}; use tracing::{info, instrument};
use super::{ifname_to_string, string_to_ifname}; use super::{ifname_to_string, string_to_ifname};
use crate::TunOptions; use crate::{syscall, TunOptions};
mod sys; mod sys;