Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RFC: usecore::net IP address types inuefi's public API #1575

Assignees
nicholasbishop
@nicholasbishop

Description

@nicholasbishop

Currently, we provide the following IP address types:

  • uefi-raw:

  • uefi:

    • struct IpAddress - 16 raw bytes. Compatible with theuefi_raw::IpAddress union, but implemented differently. No way to tell which type of address it is without out-of-band data
  • And these builtin types are incore::net:

The types inuefi-raw correctly match the spec, so there's nothing we need to change there.

Inuefi however, I think it might make sense to switch to thecore::net types in the public API, and drop ourIpAddress. Thecore::net types are not ABI-compatible with the UEFI types, so internally we'll need to translate between them. This should be a very low-cost operation though.

Using theIpAddr enum provides a better experience than using an untagged enum that requires a separate flag to indicate which type of address it contains. We could define our own enum of course, but usingcore::net makes it easier to integrate with other Rust code by using a shared type.

This change would be an API break, but it only affects a fairly small part of the library (theSimpleNetwork andpxe::BaseCode protocols).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp