next up previous contents index
Next: 27.3.4 bootp_free: Free the Up: 27.3 API reference Previous: 27.3.2 bootp_gen: Generate a

27.3.3 bootp: Generate a BOOTP protocol request (simple interface)

 

SYNOPSIS

#include <oskit/net/bootp.h>

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

DESCRIPTION

This function performs a BOOTP request with a timeout of 200 milliseconds (1/5 of a second) with five retries using bootp_gen.

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.

RETURNS

Returns zero on success, or an error code specified in <oskit/error.h> on error.

RELATED INFORMATION

bootp_net_info



University of Utah Flux Research Group