Skip to content

Commit 9efde25

Browse files
uefi: Replace UdpOpFlags with PxeBaseCodeUdpOpFlags from uefi-raw
1 parent 8550bf0 commit 9efde25

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

uefi/src/proto/network/pxe.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ use crate::{CStr8, Char8, Result, Status, StatusExt};
1818

1919
use super::{IpAddress, MacAddress};
2020

21+
pub use uefi_raw::protocol::network::pxe::PxeBaseCodeUdpOpFlags as UdpOpFlags;
22+
2123
/// PXE Base Code protocol
2224
#[derive(Debug)]
2325
#[repr(C)]
@@ -829,29 +831,6 @@ pub struct MtftpInfo {
829831
pub transmit_timeout: u16,
830832
}
831833

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-
855834
/// IP receive filter settings
856835
///
857836
/// Corresponds to the `EFI_PXE_BASE_CODE_IP_FILTER` type in the C API.

0 commit comments

Comments
 (0)