[dhcp] Allow use of custom reallocation functions for DHCP option blocks

Allow functions other than realloc() to be used to reallocate DHCP
option block data, and specify the reallocation function at the time
of calling dhcpopt_init().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-01-10 23:58:11 +00:00
parent 310d46c1ed
commit 17b6a3c506
4 changed files with 74 additions and 62 deletions

View File

@@ -133,7 +133,8 @@ static void nvo_init_dhcpopts ( struct nvo_block *nvo ) {
memset ( nvo->data, 0, nvo->total_len );
}
dhcpopt_init ( &nvo->dhcpopts, options_data, options_len );
dhcpopt_init ( &nvo->dhcpopts, options_data, options_len,
dhcpopt_no_realloc );
}
/**