aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/include/gpxe/dhcpopts.h
blob: 3d90f41162d38312fb073bb26e35f521fd2465f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef _GPXE_DHCPOPTS_H
#define _GPXE_DHCPOPTS_H

/** @file
 *
 * DHCP options
 *
 */

FILE_LICENCE ( GPL2_OR_LATER );

#include <stdint.h>

/** A DHCP options block */
struct dhcp_options {
	/** Option block raw data */
	void *data;
	/** Option block length */
	size_t len;
	/** Option block maximum length */
	size_t max_len;
};

extern int dhcpopt_store ( struct dhcp_options *options, unsigned int tag,
			   const void *data, size_t len );
extern int dhcpopt_extensible_store ( struct dhcp_options *options,
				      unsigned int tag,
				      const void *data, size_t len );
extern int dhcpopt_fetch ( struct dhcp_options *options, unsigned int tag,
			   void *data, size_t len );
extern void dhcpopt_init ( struct dhcp_options *options,
			   void *data, size_t max_len );

#endif /* _GPXE_DHCPOPTS_H */