summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/dhcppkt.h
blob: 98b8dad8a3ba6c5036e7089fd18e6cc9ed163c6b (plain) (blame)
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_DHCPPKT_H
#define _GPXE_DHCPPKT_H

/** @file
 *
 * DHCP packets
 *
 */

#include <gpxe/dhcp.h>
#include <gpxe/dhcpopts.h>
#include <gpxe/settings.h>

/**
 * A DHCP packet
 *
 */
struct dhcp_packet {
	/** Settings block */
	struct settings settings;
	/** The DHCP packet contents */
	struct dhcphdr *dhcphdr;
	/** Maximum length of the DHCP packet buffer */
	size_t max_len;
	/** Used length of the DHCP packet buffer */
	size_t len;
	/** DHCP option blocks */
	struct dhcp_options options;
};

extern void dhcppkt_init ( struct dhcp_packet *dhcppkt, struct refcnt *refcnt,
			   void *data, size_t len );

#endif /* _GPXE_DHCPPKT_H */