Dealing with possible list of numeric option values (pxe-system-type)
Ross.Boylan at ucsf.edu
Mon Nov 16 04:22:25 UTC 2020
According to RFC 4578 and the dhcp-options man page, pxe-system-type has values that are a list of one or more uint16's. dhcp-eval and dhcp-options didn't seem to say exactly how I could work with it, or, more directly, what the result of using "option pxe-system-type" in a conditional expression is: a string? a number? a list?
My first guess was
if option pxe-system-type = 7 then ....
Should that work? I notice all the examples on this list seem to use the form
if option pxe-system-type = 00:07 then ..
suggesting the values are converted to a stream of bytes after promotion to 32 bit integer size.
Further, it sounds as if there might be multiple values supplied. Is there any good way to figure if 7 is one of them?
Will option pxe-system-type = 00:07 fail if there is more than one element returned, even if the first one is 7?
Maybe in practice it is never an issue?
I'm also curious how options that are lists with elements other than numbers work.
More information about the dhcp-users