You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _IPXE_DHCPOPTS_H
  2. #define _IPXE_DHCPOPTS_H
  3. /** @file
  4. *
  5. * DHCP options
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. /** A DHCP options block */
  11. struct dhcp_options {
  12. /** Option block raw data */
  13. void *data;
  14. /** Option block used length */
  15. size_t used_len;
  16. /** Option block allocated length */
  17. size_t alloc_len;
  18. /** Reallocate option block raw data
  19. *
  20. * @v options DHCP option block
  21. * @v len New length
  22. * @ret rc Return status code
  23. */
  24. int ( * realloc ) ( struct dhcp_options *options, size_t len );
  25. };
  26. extern int dhcpopt_applies ( unsigned int tag );
  27. extern int dhcpopt_store ( struct dhcp_options *options, unsigned int tag,
  28. const void *data, size_t len );
  29. extern int dhcpopt_fetch ( struct dhcp_options *options, unsigned int tag,
  30. void *data, size_t len );
  31. extern void dhcpopt_init ( struct dhcp_options *options,
  32. void *data, size_t alloc_len,
  33. int ( * realloc ) ( struct dhcp_options *options,
  34. size_t len ) );
  35. extern void dhcpopt_update_used_len ( struct dhcp_options *options );
  36. extern int dhcpopt_no_realloc ( struct dhcp_options *options, size_t len );
  37. #endif /* _IPXE_DHCPOPTS_H */