summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/nvo.h
diff options
context:
space:
mode:
authorMichael Brown2006-12-04 22:46:13 +0100
committerMichael Brown2006-12-04 22:46:13 +0100
commitcc9bcb99a0ac2460dbe8286731e65812fa4ef870 (patch)
treeb2beaafcde77c3502ed7a61dbd139c94455d2e92 /src/include/gpxe/nvo.h
parentFixed two logic errors that were cancelling each other out. (diff)
downloadipxe-cc9bcb99a0ac2460dbe8286731e65812fa4ef870.tar.gz
ipxe-cc9bcb99a0ac2460dbe8286731e65812fa4ef870.tar.xz
ipxe-cc9bcb99a0ac2460dbe8286731e65812fa4ef870.zip
Add the concept of a fragment list for non-volatile stored options.
Diffstat (limited to 'src/include/gpxe/nvo.h')
-rw-r--r--src/include/gpxe/nvo.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/include/gpxe/nvo.h b/src/include/gpxe/nvo.h
index b51431aa..f766508c 100644
--- a/src/include/gpxe/nvo.h
+++ b/src/include/gpxe/nvo.h
@@ -7,15 +7,37 @@
*
*/
+#include <stdint.h>
+
struct nvs_device;
struct dhcp_option_block;
-struct nvs_options {
+/**
+ * A fragment of a non-volatile storage device used for stored options
+ */
+struct nvo_fragment {
+ /** Starting address of fragment within NVS device */
+ unsigned int address;
+ /** Length of fragment */
+ size_t len;
+};
+
+/**
+ * A block of non-volatile stored options
+ */
+struct nvo_block {
+ /** Underlying non-volatile storage device */
struct nvs_device *nvs;
+ /** List of option-containing fragments
+ *
+ * The list is terminated by a fragment with a length of zero.
+ */
+ struct nvo_fragment *fragments;
+ /** DHCP options block */
struct dhcp_option_block *options;
};
-extern int nvo_register ( struct nvs_options *nvo );
-extern void nvo_unregister ( struct nvs_options *nvo );
+extern int nvo_register ( struct nvo_block *nvo );
+extern void nvo_unregister ( struct nvo_block *nvo );
#endif /* _GPXE_NVO_H */