@@ -8,7 +8,7 @@ use ipnet::IpNet;
8
8
use libc:: { AF_INET , AF_INET6 } ;
9
9
use nm:: { ConnectionExt , IPAddress , SettingIPConfig , SettingIPConfigExt , SettingIP4Config , SettingIP6Config } ;
10
10
use std:: boxed:: Box ;
11
- use crate :: utils :: IPConfig ;
11
+ use crate :: net :: NetInfo ;
12
12
13
13
fn ipnet2ipaddr ( ipnet : IpNet ) -> Result < IPAddress > {
14
14
let ipaddress: IPAddress ;
@@ -30,13 +30,13 @@ pub async fn get_ip_config(conn_name: String, family: i32) -> Result<NetworkResp
30
30
// Parser configuration
31
31
if family == 4 {
32
32
if let Some ( setting_ip4_config) = connection. setting_ip4_config ( ) . map ( |x| <SettingIP4Config as Into < SettingIPConfig > >:: into ( x) ) {
33
- IPConfig :: try_from ( setting_ip4_config)
33
+ NetInfo :: try_from ( setting_ip4_config)
34
34
} else {
35
35
bail ! ( "Failed to get ipv4 config" )
36
36
}
37
37
} else {
38
38
if let Some ( setting_ip6_config) = connection. setting_ip6_config ( ) . map ( |x| <SettingIP6Config as Into < SettingIPConfig > >:: into ( x) ) {
39
- IPConfig :: try_from ( setting_ip6_config)
39
+ NetInfo :: try_from ( setting_ip6_config)
40
40
} else {
41
41
bail ! ( "Failed to get ipv6 config" )
42
42
}
@@ -52,7 +52,7 @@ pub async fn get_ip_config(conn_name: String, family: i32) -> Result<NetworkResp
52
52
pub async fn update_ip_config (
53
53
conn_name : String ,
54
54
family : i32 ,
55
- config : IPConfig ,
55
+ config : NetInfo ,
56
56
) -> Result < NetworkResponse > {
57
57
let client = create_client ( ) . await ?;
58
58
let _conn: Option < nm:: RemoteConnection > = try {
0 commit comments