@@ -15,7 +15,8 @@ use core::mem::MaybeUninit;
1515use core:: ptr:: { self , null, null_mut} ;
1616use ptr_meta:: Pointee ;
1717use uefi_raw:: protocol:: network:: pxe:: {
18- PxeBaseCodeDiscoverInfo , PxeBaseCodeMtftpInfo , PxeBaseCodePacket , PxeBaseCodeTftpOpcode ,
18+ PxeBaseCodeDiscoverInfo , PxeBaseCodeIpFilter , PxeBaseCodeMtftpInfo , PxeBaseCodePacket ,
19+ PxeBaseCodeTftpOpcode ,
1920} ;
2021use uefi_raw:: { Boolean , Char8 } ;
2122
@@ -78,7 +79,8 @@ pub struct BaseCode {
7879 buffer_size : & mut usize ,
7980 buffer_ptr : * mut c_void ,
8081 ) -> 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 ,
8284 arp : unsafe extern "efiapi" fn (
8385 this : & Self ,
8486 ip_addr : * const uefi_raw:: IpAddress ,
@@ -534,6 +536,7 @@ impl BaseCode {
534536 /// Updates the IP receive filters of a network device and enables software
535537 /// filtering.
536538 pub fn set_ip_filter ( & mut self , new_filter : & IpFilter ) -> Result {
539+ let new_filter: * const PxeBaseCodeIpFilter = ptr:: from_ref ( new_filter) . cast ( ) ;
537540 unsafe { ( self . set_ip_filter ) ( self , new_filter) } . to_result ( )
538541 }
539542
0 commit comments