I would like to send a dhcp discovery packet progammatically in C.

I know C programming, but not network programming.

I understand I need to set the dest. ip "255.255.255.255"
and src "0.0.0.0".
Then send a DHCPDISCOVERY UDP Packet to get a list of
available wireless dhcp servers.

How can I do that in C. and what are the structs and other
needed info to accomplish this.

Example code would be helpful.

thanks