@@ -15,7 +15,8 @@ use core::mem::MaybeUninit;
15
15
use core:: ptr:: { self , null, null_mut} ;
16
16
use ptr_meta:: Pointee ;
17
17
use uefi_raw:: protocol:: network:: pxe:: {
18
- PxeBaseCodeDiscoverInfo , PxeBaseCodeMtftpInfo , PxeBaseCodePacket , PxeBaseCodeTftpOpcode ,
18
+ PxeBaseCodeDiscoverInfo , PxeBaseCodeIpFilter , PxeBaseCodeMtftpInfo , PxeBaseCodePacket ,
19
+ PxeBaseCodeTftpOpcode ,
19
20
} ;
20
21
use uefi_raw:: { Boolean , Char8 } ;
21
22
@@ -78,7 +79,8 @@ pub struct BaseCode {
78
79
buffer_size : & mut usize ,
79
80
buffer_ptr : * mut c_void ,
80
81
) -> Status ,
81
- set_ip_filter : unsafe extern "efiapi" fn ( this : & Self , new_filter : & IpFilter ) -> Status ,
82
+ set_ip_filter :
83
+ unsafe extern "efiapi" fn ( this : & Self , new_filter : * const PxeBaseCodeIpFilter ) -> Status ,
82
84
arp : unsafe extern "efiapi" fn (
83
85
this : & Self ,
84
86
ip_addr : * const uefi_raw:: IpAddress ,
@@ -534,6 +536,7 @@ impl BaseCode {
534
536
/// Updates the IP receive filters of a network device and enables software
535
537
/// filtering.
536
538
pub fn set_ip_filter ( & mut self , new_filter : & IpFilter ) -> Result {
539
+ let new_filter: * const PxeBaseCodeIpFilter = ptr:: from_ref ( new_filter) . cast ( ) ;
537
540
unsafe { ( self . set_ip_filter ) ( self , new_filter) } . to_result ( )
538
541
}
539
542
0 commit comments