@@ -38,7 +38,7 @@ use crate::netmon::is_interesting_interface;
3838/// Represents a network interface.
3939#[ derive( Debug , Clone ) ]
4040pub struct Interface {
41- iface : netdev:: interface :: Interface ,
41+ iface : netdev:: Interface ,
4242}
4343
4444impl fmt:: Display for Interface {
@@ -90,7 +90,10 @@ impl Interface {
9090 pub ( crate ) fn fake ( ) -> Self {
9191 use std:: net:: Ipv4Addr ;
9292
93- use netdev:: { NetworkDevice , interface:: InterfaceType , mac:: MacAddr } ;
93+ use netdev:: {
94+ NetworkDevice ,
95+ prelude:: { InterfaceType , MacAddr , OperState } ,
96+ } ;
9497
9598 Self {
9699 iface : netdev:: Interface {
@@ -115,7 +118,7 @@ impl Interface {
115118 ipv6_scope_ids : vec ! [ ] ,
116119 stats : None ,
117120 mtu : None ,
118- oper_state : netdev :: interface :: OperState :: Up ,
121+ oper_state : OperState :: Up ,
119122 } ,
120123 }
121124 }
@@ -371,7 +374,7 @@ impl HomeRouter {
371374 /// This is used as the destination for UPnP, NAT-PMP, PCP, etc queries.
372375 pub fn new ( ) -> Option < Self > {
373376 let gateway = Self :: get_default_gateway ( ) ?;
374- let my_ip = netdev:: interface :: get_local_ipaddr ( ) ;
377+ let my_ip = netdev:: net :: ip :: get_local_ipaddr ( ) ;
375378
376379 Some ( HomeRouter { gateway, my_ip } )
377380 }
0 commit comments