如何在 dhcp 数据包中填写 dhcp vendor specific option

how to fill out dhcp vendor specific option in dhcp packet

我想使用 linux raw_socket 在 linux 上创建 dhcp 服务器。 但是我找不到在 dhcp OFFER 数据包中填写供应商特定选项的方法。 请告诉我该怎么做或如何研究它。

这里有一些帮助您入门的链接:

http://www.ingmarverheij.com/microsoft-vendor-specific-dhcp-options-explained-and-demystified/

https://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c

https://doc.freeradius.org/dhcp_8c_source.html