mirror of
https://github.com/ipxe/ipxe
synced 2026-01-02 18:03:36 +03:00
[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.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <gpxe/uaccess.h>
|
||||
#include <gpxe/dhcp.h>
|
||||
#include <gpxe/dhcppkt.h>
|
||||
#include <gpxe/fakedhcp.h>
|
||||
#include <gpxe/device.h>
|
||||
#include <gpxe/netdevice.h>
|
||||
#include <gpxe/isapnp.h>
|
||||
@@ -80,9 +80,9 @@ struct pxe_dhcp_packet_creator {
|
||||
|
||||
/** PXE DHCP packet creators */
|
||||
static struct pxe_dhcp_packet_creator pxe_dhcp_packet_creators[] = {
|
||||
[CACHED_INFO_DHCPDISCOVER] = { create_dhcpdiscover },
|
||||
[CACHED_INFO_DHCPACK] = { create_dhcpack },
|
||||
[CACHED_INFO_BINL] = { create_proxydhcpack },
|
||||
[CACHED_INFO_DHCPDISCOVER] = { create_fakedhcpdiscover },
|
||||
[CACHED_INFO_DHCPACK] = { create_fakedhcpack },
|
||||
[CACHED_INFO_BINL] = { create_fakeproxydhcpack },
|
||||
};
|
||||
|
||||
/* The case in which the caller doesn't supply a buffer is really
|
||||
|
||||
Reference in New Issue
Block a user