david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/gpxe/dhcpopts.h
Michael Brown 92d15eff30 [Settings] Remove assumption that all settings have DHCP tag values
Allow for settings to be described by something other than a DHCP option
tag if desirable.  Currently used only for the MAC address setting.

Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c.

Remove notion of settings from dhcppkt.c.

Rationalise dhcp.c to use settings API only for final registration of the
DHCP options, rather than using {store,fetch}_setting throughout.
2008-03-25 20:46:16 +00:00

33 lines
782 B
C

#ifndef _GPXE_DHCPOPTS_H
#define _GPXE_DHCPOPTS_H
/** @file
*
* DHCP options
*
*/
#include <stdint.h>
/** A DHCP options block */
struct dhcp_options {
/** Option block raw data */
void *data;
/** Option block length */
size_t len;
/** Option block maximum length */
size_t max_len;
};
extern int dhcpopt_store ( struct dhcp_options *options, unsigned int tag,
const void *data, size_t len );
extern int dhcpopt_extensible_store ( struct dhcp_options *options,
unsigned int tag,
const void *data, size_t len );
extern int dhcpopt_fetch ( struct dhcp_options *options, unsigned int tag,
void *data, size_t len );
extern void dhcpopt_init ( struct dhcp_options *options,
void *data, size_t max_len );
#endif /* _GPXE_DHCPOPTS_H */