extern struct AdrDevicePath [src]
Fields
type: DevicePath.Type
subtype: Subtype
length: u16 align(1)
adr: u32 align(1)
Members
- adrs (Function)
Source
pub const AdrDevicePath = extern struct {
type: DevicePath.Type,
subtype: Subtype,
length: u16 align(1),
adr: u32 align(1),
// multiple adr entries can optionally follow
pub fn adrs(self: *const AdrDevicePath) []align(1) const u32 {
// self.length is a minimum of 8 with one adr which is size 4.
const entries = (self.length - 4) / @sizeOf(u32);
return @as([*]align(1) const u32, @ptrCast(&self.adr))[0..entries];
}
}