You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how the value if MIN_DHCP_PACKET_SIZE was decided. In addition, it seems to be used when dealing with the size of an Ethernet frame, not a DHCP/UDP/IP packet.
AFAIK the minimum DHCP packet size is 236 bytes. I assume that the 285 bytes figure is adding the UDP/IP packet and Ethernet frame overhead. However, it would be nice to have a comment confirming this.
Describe the solution you'd like.
Add a comment, for example:
/** * The minimum size of a DHCP packet is 236 bytes. * This includes the DHCP header and the minimum-sized DHCP message, which is a DHCPDISCOVER or * DHCPREQUEST message with no options. */#defineMIN_DHCP_PACKET_SIZE (236)
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered:
Thank you for bringing this up! That's correct, the minimum DHCP packet size is 236 bytes, and the MIN_DHCP_PACKET_SIZE value indeed accounts for the additional overhead from the UDP, IP, and Ethernet headers.
Adding a comment as you suggested would certainly clarify things.
I'll make the necessary changes soon. At the moment, I'm also working on extending this example to support an additional (so-called) "wired" interface (besides Ethernet and USB) and to introduce support for WiFi softAP. Alongside this, I'll be renaming "wired" to something else, so that "sta2ap" option fits into the picture.
Is your feature request related to a problem?
I'm not sure how the value if
MIN_DHCP_PACKET_SIZE
was decided. In addition, it seems to be used when dealing with the size of an Ethernet frame, not a DHCP/UDP/IP packet.AFAIK the minimum DHCP packet size is 236 bytes. I assume that the 285 bytes figure is adding the UDP/IP packet and Ethernet frame overhead. However, it would be nice to have a comment confirming this.
Describe the solution you'd like.
Add a comment, for example:
Describe alternatives you've considered.
No response
Additional context.
No response
The text was updated successfully, but these errors were encountered: