I'm writing some Python code with scapy to send a DHCP discover packet, but I'm falling short with the theory behind what I'm doing:
DHCP is an Application Layer protocol sent over UDP, so instinctively I would build the packet as Ether(...)/IP(...)/UDP(...)/DHCP(...)
but unfortunately, browsing on the internet, I can only find packets with an additional BOOTP layer: Ether(...)/IP(...)/UDP(...)/BOOTP(...)/DHCP(...)
Wikipedia presents DHCP as an evolution of BOOTP, so why the correct packet formation contains both of them?
It seems like DHCP is only an extension of BOOTP, and BOOTP clients can interoperate with DHCP servers without any problem.
This is a useful source for detailed information