mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Bump smoltcp to newest git version
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
7db9ae23a3
commit
bb4751741a
@ -8,7 +8,10 @@ use smoltcp::{
|
||||
|
||||
use super::{common::IfaceCommon, internal::IfaceInternal, Iface};
|
||||
use crate::{
|
||||
net::socket::ip::{IpAddress, Ipv4Address},
|
||||
net::{
|
||||
iface::time::get_network_timestamp,
|
||||
socket::ip::{IpAddress, Ipv4Address},
|
||||
},
|
||||
prelude::*,
|
||||
};
|
||||
|
||||
@ -28,8 +31,10 @@ impl IfaceLoopback {
|
||||
pub fn new() -> Arc<Self> {
|
||||
let mut loopback = Loopback::new(Medium::Ip);
|
||||
let interface = {
|
||||
let config = Config::new();
|
||||
let mut interface = smoltcp::iface::Interface::new(config, &mut loopback);
|
||||
let config = Config::new(smoltcp::wire::HardwareAddress::Ip);
|
||||
let now = get_network_timestamp();
|
||||
|
||||
let mut interface = smoltcp::iface::Interface::new(config, &mut loopback, now);
|
||||
interface.update_ip_addrs(|ip_addrs| {
|
||||
debug_assert!(ip_addrs.is_empty());
|
||||
let ip_addr = IpCidr::new(LOOPBACK_ADDRESS, LOOPBACK_ADDRESS_PREFIX_LEN);
|
||||
|
Reference in New Issue
Block a user