@@ -18,6 +18,10 @@ use crate::{CStr8, Char8, Result, Status, StatusExt};
1818
1919use super :: { IpAddress , MacAddress } ;
2020
21+ pub use uefi_raw:: protocol:: network:: pxe:: {
22+ PxeBaseCodeIpFilterFlags as IpFilters , PxeBaseCodeUdpOpFlags as UdpOpFlags ,
23+ } ;
24+
2125/// PXE Base Code protocol
2226#[ derive( Debug ) ]
2327#[ repr( C ) ]
@@ -829,29 +833,6 @@ pub struct MtftpInfo {
829833 pub transmit_timeout : u16 ,
830834}
831835
832- // No corresponding type in the UEFI spec, it just uses UINT16.
833- bitflags ! {
834- /// Flags for UDP read and write operations.
835- #[ derive( Clone , Copy , Debug , Default , PartialEq , Eq , PartialOrd , Ord ) ]
836- #[ repr( transparent) ]
837- pub struct UdpOpFlags : u16 {
838- /// Receive a packet sent from any IP address in UDP read operations.
839- const ANY_SRC_IP = 0x0001 ;
840- /// Receive a packet sent from any UDP port in UDP read operations. If
841- /// the source port is no specified in UDP write operations, the
842- /// source port will be automatically selected.
843- const ANY_SRC_PORT = 0x0002 ;
844- /// Receive a packet sent to any IP address in UDP read operations.
845- const ANY_DEST_IP = 0x0004 ;
846- /// Receive a packet sent to any UDP port in UDP read operations.
847- const ANY_DEST_PORT = 0x0008 ;
848- /// The software filter is used in UDP read operations.
849- const USE_FILTER = 0x0010 ;
850- /// If required, a UDP write operation may be broken up across multiple packets.
851- const MAY_FRAGMENT = 0x0020 ;
852- }
853- }
854-
855836/// IP receive filter settings
856837///
857838/// Corresponds to the `EFI_PXE_BASE_CODE_IP_FILTER` type in the C API.
@@ -895,22 +876,6 @@ impl IpFilter {
895876 }
896877}
897878
898- bitflags ! {
899- /// IP receive filters.
900- #[ derive( Clone , Copy , Debug , Default , PartialEq , Eq , PartialOrd , Ord ) ]
901- #[ repr( transparent) ]
902- pub struct IpFilters : u8 {
903- /// Enable the Station IP address.
904- const STATION_IP = 0x01 ;
905- /// Enable IPv4 broadcast addresses.
906- const BROADCAST = 0x02 ;
907- /// Enable all addresses.
908- const PROMISCUOUS = 0x04 ;
909- /// Enable all multicast addresses.
910- const PROMISCUOUS_MULTICAST = 0x08 ;
911- }
912- }
913-
914879/// A network packet.
915880///
916881/// Corresponds to the `EFI_PXE_BASE_CODE_PACKET` type in the C API.
0 commit comments