Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _GPXE_NVO_H
  2. #define _GPXE_NVO_H
  3. /** @file
  4. *
  5. * Non-volatile stored options
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER );
  9. #include <stdint.h>
  10. #include <gpxe/dhcpopts.h>
  11. #include <gpxe/settings.h>
  12. struct nvs_device;
  13. struct refcnt;
  14. /**
  15. * A fragment of a non-volatile storage device used for stored options
  16. */
  17. struct nvo_fragment {
  18. /** Starting address of fragment within NVS device */
  19. unsigned int address;
  20. /** Length of fragment */
  21. size_t len;
  22. };
  23. /**
  24. * A block of non-volatile stored options
  25. */
  26. struct nvo_block {
  27. /** Settings block */
  28. struct settings settings;
  29. /** Underlying non-volatile storage device */
  30. struct nvs_device *nvs;
  31. /** List of option-containing fragments
  32. *
  33. * The list is terminated by a fragment with a length of zero.
  34. */
  35. struct nvo_fragment *fragments;
  36. /** Total length of option-containing fragments */
  37. size_t total_len;
  38. /** Option-containing data */
  39. void *data;
  40. /** DHCP options block */
  41. struct dhcp_options dhcpopts;
  42. };
  43. extern void nvo_init ( struct nvo_block *nvo, struct nvs_device *nvs,
  44. struct nvo_fragment *fragments, struct refcnt *refcnt );
  45. extern int register_nvo ( struct nvo_block *nvo, struct settings *parent );
  46. extern void unregister_nvo ( struct nvo_block *nvo );
  47. #endif /* _GPXE_NVO_H */