@@ -14,7 +14,7 @@ use crate::polyfill::maybe_uninit_slice_as_mut_ptr;
1414use crate :: proto:: device_path:: {
1515 self , DevicePathHeader , DevicePathNode , DeviceSubType , DeviceType , NodeConversionError ,
1616} ;
17- use crate :: proto:: network:: IpAddress ;
17+ use crate :: proto:: network:: EfiIpAddr ;
1818use crate :: { guid, Guid } ;
1919use bitflags:: bitflags;
2020use core:: mem:: { size_of, size_of_val} ;
@@ -2412,7 +2412,7 @@ pub mod messaging {
24122412 pub struct Dns {
24132413 pub ( super ) header : DevicePathHeader ,
24142414 pub ( super ) address_type : device_path:: messaging:: DnsAddressType ,
2415- pub ( super ) addresses : [ IpAddress ] ,
2415+ pub ( super ) addresses : [ EfiIpAddr ] ,
24162416 }
24172417
24182418 impl Dns {
@@ -2424,10 +2424,10 @@ pub mod messaging {
24242424
24252425 /// One or more instances of the DNS server address.
24262426 #[ must_use]
2427- pub fn addresses ( & self ) -> UnalignedSlice < IpAddress > {
2428- let ptr: * const [ IpAddress ] = addr_of ! ( self . addresses) ;
2427+ pub fn addresses ( & self ) -> UnalignedSlice < EfiIpAddr > {
2428+ let ptr: * const [ EfiIpAddr ] = addr_of ! ( self . addresses) ;
24292429 let ( ptr, len) : ( * const ( ) , usize ) = ptr_meta:: to_raw_parts ( ptr) ;
2430- unsafe { UnalignedSlice :: new ( ptr. cast :: < IpAddress > ( ) , len) }
2430+ unsafe { UnalignedSlice :: new ( ptr. cast :: < EfiIpAddr > ( ) , len) }
24312431 }
24322432 }
24332433
@@ -2438,7 +2438,7 @@ pub mod messaging {
24382438 . field ( "addresses" , {
24392439 let ptr = addr_of ! ( self . addresses) ;
24402440 let ( ptr, len) = ptr_meta:: to_raw_parts ( ptr) ;
2441- let byte_len = size_of :: < IpAddress > ( ) * len;
2441+ let byte_len = size_of :: < EfiIpAddr > ( ) * len;
24422442 unsafe { & slice:: from_raw_parts ( ptr. cast :: < u8 > ( ) , byte_len) }
24432443 } )
24442444 . finish ( )
@@ -2458,7 +2458,7 @@ pub mod messaging {
24582458 let dst_size = size_of_val ( node)
24592459 . checked_sub ( static_size)
24602460 . ok_or ( NodeConversionError :: InvalidLength ) ?;
2461- let elem_size = size_of :: < IpAddress > ( ) ;
2461+ let elem_size = size_of :: < EfiIpAddr > ( ) ;
24622462 if dst_size % elem_size != 0 {
24632463 return Err ( NodeConversionError :: InvalidLength ) ;
24642464 }
@@ -5380,7 +5380,7 @@ pub mod build {
53805380 /// Whether the addresses are IPv4 or IPv6.
53815381 pub address_type : device_path:: messaging:: DnsAddressType ,
53825382 /// One or more instances of the DNS server address.
5383- pub addresses : & ' a [ IpAddress ] ,
5383+ pub addresses : & ' a [ EfiIpAddr ] ,
53845384 }
53855385
53865386 unsafe impl BuildNode for Dns < ' _ > {
0 commit comments