insomniacslk / dhcp

DHCPv6 and DHCPv4 packet library, client and server written in Go
BSD 3-Clause "New" or "Revised" License
710 stars 169 forks source link

OptClientArchType does not get the arch field value #505

Closed wangliang33 closed 1 year ago

wangliang33 commented 1 year ago

OptClientArchType only has the string() method externally, and there is no way to obtain the real integer value

image image
wangliang33 commented 1 year ago

Whether OptClientArchType can be visible to the outside world, from optClientArchType to OptClientArchType, so that you can assert to get its value

hugelgupf commented 1 year ago

Indeed you are correct.

This getter exists on the right message type to return the value: https://github.com/insomniacslk/dhcp/blob/b20c9ba983dfec6371555e7baa343aabd388b22c/dhcpv6/dhcpv6message.go#L26

Does that satisfy your use case?

On Thu, Jul 6, 2023, 00:18 wangliang33 @.***> wrote:

Whether OptClientArchType can be visible to the outside world, from optClientArchType to OptClientArchType, so that you can assert to get its value

— Reply to this email directly, view it on GitHub https://github.com/insomniacslk/dhcp/issues/505#issuecomment-1623121073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPG3ETAHXX2FCAJ5DCXRVTXOZREBANCNFSM6AAAAAA2AAADZM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

wangliang33 commented 1 year ago

Thank you