#include <oskit/net/bootp.h>int bootp_gen(oskit_etherdev_t *dev, [in/out] struct bootp_net_info *info, int retries, int timeout);
This function broadcasts retries BOOTP request packets, waiting timeout milliseconds for a reply.The only field of info that is used as input for the request is the ip field corresponding to BOOTP_NET_IP. See RFC 1048 for more explanation. Users should set this field if they know their IP address; BOOTP_NET_IP needs to be set in flags if this is the case.
Lists of IP addresses and strings are dynamically allocated as needed, users of boopt_gen should pass the info struct to bootp_free to deallocate them.
- dev
- A pointer to an oskit_etherdev device interface.
- info
- The BOOTP info to be used.
- retries
- Number of BOOTP request packets that are sent.
- timeout
- Timeout in milliseconds.
Returns zero on success, OSKIT_ETIMEDOUT if the operation timed out, or another error code as specified in <oskit/error.h>
bootp_net_info