next up previous contents index
Next: 27.3.3 bootp: Generate a Up: 27.3 API reference Previous: 27.3.1 bootp_net_info: BOOTP protocol

27.3.2 bootp_gen: Generate a BOOTP protocol request

 

SYNOPSIS

#include <oskit/net/bootp.h>

int bootp_gen(oskit_etherdev_t *dev, [in/out] struct bootp_net_info *info, int retries, int timeout);

DESCRIPTION

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.

PARAMETERS

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

Returns zero on success, OSKIT_ETIMEDOUT if the operation timed out, or another error code as specified in <oskit/error.h>

RELATED INFORMATION

bootp_net_info



University of Utah Flux Research Group