Skip to content

feat: updated dhcp client arch#99

Merged
leshow merged 2 commits into
bluecatengineering:masterfrom
tremwil:feat/updated-dhcp-client-arch
May 9, 2026
Merged

feat: updated dhcp client arch#99
leshow merged 2 commits into
bluecatengineering:masterfrom
tremwil:feat/updated-dhcp-client-arch

Conversation

@tremwil

@tremwil tremwil commented May 7, 2026

Copy link
Copy Markdown
Contributor
  • Adds updated DHCP client architecture type values from the IANA
  • Implements encoding/decoding for ClientArchType DHCPv6 options

Since both of the above are breaking changes, while doing the former I refactored the Architecture enum as a newtype variant with associated consts. IMO this provides better ergonomics than a regular enum with an Unknown variant and manual conversions, though I don't mind reverting to an enum if this isn't welcome.

Closes #98.

@leshow

leshow commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Yeah, I went back and forth on the enum, but I think in the end you're right about the ergonomics. Since the enum is not closed and has the unknown variant, each new addition is a breaking change to the API. It was nice to have the exhaustive matching in some cases but I believe the http library uses const as well so I think it's the right call.

There are many of these enums in the repo though, so I probably won't cut a new release until they are all consistent in their representation.

@leshow leshow merged commit eece41c into bluecatengineering:master May 9, 2026
10 checks passed
@leshow

leshow commented May 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

@stappersg

stappersg commented May 10, 2026 via email

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

From<u16> impl for dhcproto::v4::options::Architecture is incorrect

3 participants