DHCP Discovery Program - Need Help With Boot Options
So I wrote this program in C# using sharppcap with the purpose of sending out a custom DHCP discovery packet. The program works. What I need help with is understanding DHCP Options if anyone has experience/knowledge of this.
I understand what is supposed to go there, but I don't know if there is supposed to be an order to the byte fields or if anything can go in there (according to the DHCP options).
For instance, I want the DHCP server to return a packet with the subnet mask (option 1), router (option 3), DNS (option 6), and domain name (option 15).
So in the string I use in the code, I have this (ddcp being a structure): ddcp.DHCP_OPTIONS = "35370103060F";
And then do I put codes after 37 to get specific data back, such as 01 for Subnet Mask, 06 for DNS, etc...?
If anyone can shed light on DHCP Options and how to get useful information back, that would be awesome.
I should note that I think something should go after the DHCP Message Type, but if I put a 01 or 03 after that, I get no response from my dhcp server unless I'm using the wrong codes for message type. But if I use the DHCP Options as-is, I get a response back.