Skip to content

Implement conversions for IpAddress and MacAddress #1564

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Mar 9, 2025

Conversation

ifd3f
Copy link
Contributor

@ifd3f ifd3f commented Mar 8, 2025

  • I've added conversions for IpAddress so that it can be converted to core::net::* types.
  • I also added a conversion for MacAddress to [u8; 6] because most other utilities that consume MAC addresses want that type.

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@nicholasbishop nicholasbishop force-pushed the feature/net-type-conversions branch from 9c07b8d to 60b7c64 Compare March 9, 2025 20:31
Copy link
Member

@nicholasbishop nicholasbishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Pushed a minor update to fix the lint error

@nicholasbishop nicholasbishop enabled auto-merge March 9, 2025 20:33
@nicholasbishop nicholasbishop added this pull request to the merge queue Mar 9, 2025
Merged via the queue into rust-osdev:main with commit f0ad8a0 Mar 9, 2025
16 checks passed
@@ -34,3 +34,40 @@ impl IpAddress {
Self(ip_addr)
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicholasbishop Is there a reason why this type is not yet in uefi-raw?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed an issue about our IP address types: #1575

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants