Documentation clarification about unsigned/signed integer options

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Apr 13 21:04:48 UTC 2022


On 6 April 2022 14:05:03 BST, Alex Duzsardi <alex.duzsardi at prodigy-it-solutions.com> wrote:
>Hi,
>I'm using PXE for some testing and i configured option 93 on my isc dhcp
>server to capture the architecture of the clients, like
>
>option arch code 93 = unsigned integer 16;
>
>
>now i saw a lot of ways to match the architecture on the interwebs and this
>is confusing for me because i can't find any documentation about cases
>where you would use
>
>if option arch = 00:00
>
>or
>
>if option arch = 0x0000
>
>or
>
>if option arch = 0
>
>Can somebody please clarify this for me?
>
>Thank you!

The server really doesn't care - those examples are equivalent. It really comes down to what makes the most sense to the humans involved.

For something that's "just a number" then the decimal version makes sense. If it's something more readable in hex then use one of the hex formats.

You could also use a string. E.g. "AA" is (if I remember my codes after a long day) the same as 0x4141, or 41:41, or 16705.

Simon


More information about the dhcp-users mailing list