Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / dhcp.h
1 #ifndef _IPXE_DHCP_H
2 #define _IPXE_DHCP_H
3
4 /** @file
5  *
6  * Dynamic Host Configuration Protocol
7  *
8  */
9
10 FILE_LICENCE ( GPL2_OR_LATER );
11
12 #include <stdint.h>
13 #include <stdarg.h>
14 #include <ipxe/in.h>
15 #include <ipxe/list.h>
16 #include <ipxe/refcnt.h>
17 #include <ipxe/tables.h>
18 #include <ipxe/uuid.h>
19 #include <ipxe/netdevice.h>
20 #include <ipxe/uaccess.h>
21
22 struct interface;
23 struct dhcp_options;
24 struct dhcp_packet;
25
26 /** BOOTP/DHCP server port */
27 #define BOOTPS_PORT 67
28
29 /** BOOTP/DHCP client port */
30 #define BOOTPC_PORT 68
31
32 /** PXE server port */
33 #define PXE_PORT 4011
34
35 /** Construct a tag value for an encapsulated option
36  *
37  * This tag value can be passed to Etherboot functions when searching
38  * for DHCP options in order to search for a tag within an
39  * encapsulated options block.
40  */
41 #define DHCP_ENCAP_OPT( encapsulator, encapsulated ) \
42         ( ( (encapsulator) << 8 ) | (encapsulated) )
43 /** Extract encapsulating option block tag from encapsulated tag value */
44 #define DHCP_ENCAPSULATOR( encap_opt ) ( (encap_opt) >> 8 )
45 /** Extract encapsulated option tag from encapsulated tag value */
46 #define DHCP_ENCAPSULATED( encap_opt ) ( (encap_opt) & 0xff )
47 /** Option is encapsulated */
48 #define DHCP_IS_ENCAP_OPT( opt ) DHCP_ENCAPSULATOR( opt )
49
50 /**
51  * @defgroup dhcpopts DHCP option tags
52  * @{
53  */
54
55 /** Padding
56  *
57  * This tag does not have a length field; it is always only a single
58  * byte in length.
59  */
60 #define DHCP_PAD 0
61
62 /** Minimum normal DHCP option */
63 #define DHCP_MIN_OPTION 1
64
65 /** Subnet mask */
66 #define DHCP_SUBNET_MASK 1
67
68 /** Routers */
69 #define DHCP_ROUTERS 3
70
71 /** DNS servers */
72 #define DHCP_DNS_SERVERS 6
73
74 /** Syslog servers */
75 #define DHCP_LOG_SERVERS 7
76
77 /** Host name */
78 #define DHCP_HOST_NAME 12
79
80 /** Domain name */
81 #define DHCP_DOMAIN_NAME 15
82
83 /** Root path */
84 #define DHCP_ROOT_PATH 17
85
86 /** Vendor encapsulated options */
87 #define DHCP_VENDOR_ENCAP 43
88
89 /** PXE boot server discovery control */
90 #define DHCP_PXE_DISCOVERY_CONTROL DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 6 )
91
92 /** PXE boot server discovery control bits */
93 enum dhcp_pxe_discovery_control {
94         /** Inhibit broadcast discovery */
95         PXEBS_NO_BROADCAST = 1,
96         /** Inhibit multicast discovery */
97         PXEBS_NO_MULTICAST = 2,
98         /** Accept only servers in DHCP_PXE_BOOT_SERVERS list */
99         PXEBS_NO_UNKNOWN_SERVERS = 4,
100         /** Skip discovery if filename present */
101         PXEBS_SKIP = 8,
102 };
103
104 /** PXE boot server multicast address */
105 #define DHCP_PXE_BOOT_SERVER_MCAST DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 7 )
106
107 /** PXE boot servers */
108 #define DHCP_PXE_BOOT_SERVERS DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 8 )
109
110 /** PXE boot server */
111 struct dhcp_pxe_boot_server {
112         /** "Type" */
113         uint16_t type;
114         /** Number of IPv4 addresses */
115         uint8_t num_ip;
116         /** IPv4 addresses */
117         struct in_addr ip[0];
118 } __attribute__ (( packed ));
119
120 /** PXE boot menu */
121 #define DHCP_PXE_BOOT_MENU DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 9 )
122
123 /** PXE boot menu */
124 struct dhcp_pxe_boot_menu {
125         /** "Type" */
126         uint16_t type;
127         /** Description length */
128         uint8_t desc_len;
129         /** Description */
130         char desc[0];
131 } __attribute__ (( packed ));
132
133 /** PXE boot menu prompt */
134 #define DHCP_PXE_BOOT_MENU_PROMPT DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 10 )
135
136 /** PXE boot menu prompt */
137 struct dhcp_pxe_boot_menu_prompt {
138         /** Timeout
139          *
140          * A value of 0 means "time out immediately and select first
141          * boot item, without displaying the prompt".  A value of 255
142          * means "display menu immediately with no timeout".  Any
143          * other value means "display prompt, wait this many seconds
144          * for keypress, if key is F8, display menu, otherwise select
145          * first boot item".
146          */
147         uint8_t timeout;
148         /** Prompt to press F8 */
149         char prompt[0];
150 } __attribute__ (( packed ));
151
152 /** PXE boot menu item */
153 #define DHCP_PXE_BOOT_MENU_ITEM DHCP_ENCAP_OPT ( DHCP_VENDOR_ENCAP, 71 )
154
155 /** PXE boot menu item */
156 struct dhcp_pxe_boot_menu_item {
157         /** "Type"
158          *
159          * This field actually identifies the specific boot server (or
160          * cluster of boot servers offering identical boot files).
161          */
162         uint16_t type;
163         /** "Layer"
164          *
165          * Just don't ask.
166          */
167         uint16_t layer;
168 } __attribute__ (( packed ));
169
170 /** Requested IP address */
171 #define DHCP_REQUESTED_ADDRESS 50
172
173 /** Lease time */
174 #define DHCP_LEASE_TIME 51
175
176 /** Option overloading
177  *
178  * The value of this option is the bitwise-OR of zero or more
179  * DHCP_OPTION_OVERLOAD_XXX constants.
180  */
181 #define DHCP_OPTION_OVERLOAD 52
182
183 /** The "file" field is overloaded to contain extra DHCP options */
184 #define DHCP_OPTION_OVERLOAD_FILE 1
185
186 /** The "sname" field is overloaded to contain extra DHCP options */
187 #define DHCP_OPTION_OVERLOAD_SNAME 2
188
189 /** DHCP message type */
190 #define DHCP_MESSAGE_TYPE 53
191 #define DHCPNONE 0
192 #define DHCPDISCOVER 1
193 #define DHCPOFFER 2
194 #define DHCPREQUEST 3
195 #define DHCPDECLINE 4
196 #define DHCPACK 5
197 #define DHCPNAK 6
198 #define DHCPRELEASE 7
199 #define DHCPINFORM 8
200
201 /** DHCP server identifier */
202 #define DHCP_SERVER_IDENTIFIER 54
203
204 /** Parameter request list */
205 #define DHCP_PARAMETER_REQUEST_LIST 55
206
207 /** Maximum DHCP message size */
208 #define DHCP_MAX_MESSAGE_SIZE 57
209
210 /** Vendor class identifier */
211 #define DHCP_VENDOR_CLASS_ID 60
212
213 /** Client identifier */
214 #define DHCP_CLIENT_ID 61
215
216 /** Client identifier */
217 struct dhcp_client_id {
218         /** Link-layer protocol */
219         uint8_t ll_proto;
220         /** Link-layer address */
221         uint8_t ll_addr[MAX_LL_ADDR_LEN];
222 } __attribute__ (( packed ));
223
224 /** TFTP server name
225  *
226  * This option replaces the fixed "sname" field, when that field is
227  * used to contain overloaded options.
228  */
229 #define DHCP_TFTP_SERVER_NAME 66
230
231 /** Bootfile name
232  *
233  * This option replaces the fixed "file" field, when that field is
234  * used to contain overloaded options.
235  */
236 #define DHCP_BOOTFILE_NAME 67
237
238 /** User class identifier */
239 #define DHCP_USER_CLASS_ID 77
240
241 /** Client system architecture */
242 #define DHCP_CLIENT_ARCHITECTURE 93
243
244 /** DHCP client architecture */
245 struct dhcp_client_architecture {
246         uint16_t arch;
247 } __attribute__ (( packed ));
248
249 /** DHCP client architecture values
250  *
251  * These are defined by the PXE specification and redefined by
252  * RFC4578.
253  */
254 enum dhcp_client_architecture_values {
255         /** Intel x86 PC */
256         DHCP_CLIENT_ARCHITECTURE_X86 = 0x0000,
257         /** NEC/PC98 */
258         DHCP_CLIENT_ARCHITECTURE_PC98 = 0x0001,
259         /** EFI Itanium */
260         DHCP_CLIENT_ARCHITECTURE_IA64 = 0x0002,
261         /** DEC Alpha */
262         DHCP_CLIENT_ARCHITECTURE_ALPHA = 0x0003,
263         /** Arc x86 */
264         DHCP_CLIENT_ARCHITECTURE_ARCX86 = 0x0004,
265         /** Intel Lean Client */
266         DHCP_CLIENT_ARCHITECTURE_LC = 0x0005,
267         /** EFI IA32 */
268         DHCP_CLIENT_ARCHITECTURE_IA32 = 0x0006,
269         /** EFI BC */
270         DHCP_CLIENT_ARCHITECTURE_EFI = 0x0007,
271         /** EFI Xscale */
272         DHCP_CLIENT_ARCHITECTURE_XSCALE = 0x0008,
273         /** EFI x86-64 */
274         DHCP_CLIENT_ARCHITECTURE_X86_64 = 0x0009,
275 };
276
277 /** Client network device interface */
278 #define DHCP_CLIENT_NDI 94
279
280 /** UUID client identifier */
281 #define DHCP_CLIENT_UUID 97
282
283 /** UUID client identifier */
284 struct dhcp_client_uuid {
285         /** Identifier type */
286         uint8_t type;
287         /** UUID */
288         union uuid uuid;
289 } __attribute__ (( packed ));
290
291 #define DHCP_CLIENT_UUID_TYPE 0
292
293 /** DNS domain search list */
294 #define DHCP_DOMAIN_SEARCH 119
295
296 /** Etherboot-specific encapsulated options
297  *
298  * This encapsulated options field is used to contain all options
299  * specific to Etherboot (i.e. not assigned by IANA or other standards
300  * bodies).
301  */
302 #define DHCP_EB_ENCAP 175
303
304 /** Priority of this options block
305  *
306  * This is a signed 8-bit integer field indicating the priority of
307  * this block of options.  It can be used to specify the relative
308  * priority of multiple option blocks (e.g. options from non-volatile
309  * storage versus options from a DHCP server).
310  */
311 #define DHCP_EB_PRIORITY DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x01 )
312
313 /** "Your" IP address
314  *
315  * This option is used internally to contain the value of the "yiaddr"
316  * field, in order to provide a consistent approach to storing and
317  * processing options.  It should never be present in a DHCP packet.
318  */
319 #define DHCP_EB_YIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x02 )
320
321 /** "Server" IP address
322  *
323  * This option is used internally to contain the value of the "siaddr"
324  * field, in order to provide a consistent approach to storing and
325  * processing options.  It should never be present in a DHCP packet.
326  */
327 #define DHCP_EB_SIADDR DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x03 )
328
329 /** Keep SAN drive registered
330  *
331  * If set to a non-zero value, iPXE will not detach any SAN drive
332  * after failing to boot from it.  (This option is required in order
333  * to perform an installation direct to an iSCSI target.)
334  */
335 #define DHCP_EB_KEEP_SAN DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x08 )
336
337 /** Skip booting from SAN drive
338  *
339  * If set to a non-zero value, iPXE will skip booting from any SAN
340  * drive.  (This option is sometimes required in conjunction with @c
341  * DHCP_EB_KEEP_SAN in order to perform an installation direct to an
342  * iSCSI target.)
343  */
344 #define DHCP_EB_SKIP_SAN_BOOT DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x09 )
345
346 /*
347  * Tags in the range 0x10-0x4f are reserved for feature markers
348  *
349  */
350
351 /** Scriptlet
352  *
353  * If a scriptlet exists, it will be executed in place of the usual
354  * call to autoboot()
355  */
356 #define DHCP_EB_SCRIPTLET DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x51 )
357
358 /** Encrypted syslog server */
359 #define DHCP_EB_SYSLOGS_SERVER DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x55 )
360
361 /** Trusted root certficate fingerprints */
362 #define DHCP_EB_TRUST DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x5a )
363
364 /** Client certficate */
365 #define DHCP_EB_CERT DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x5b )
366
367 /** Client private key */
368 #define DHCP_EB_KEY DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x5c )
369
370 /** Cross-signed certificate source */
371 #define DHCP_EB_CROSS_CERT DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0x5d )
372
373 /** Skip PXE DHCP protocol extensions such as ProxyDHCP
374  *
375  * If set to a non-zero value, iPXE will not wait for ProxyDHCP offers
376  * and will ignore any PXE-specific DHCP options that it receives.
377  */
378 #define DHCP_EB_NO_PXEDHCP DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb0 )
379
380 /** Network device descriptor
381  *
382  * Byte 0 is the bus type ID; remaining bytes depend on the bus type.
383  *
384  * PCI devices:
385  * Byte 0 : 1 (PCI)
386  * Byte 1 : PCI vendor ID MSB
387  * Byte 2 : PCI vendor ID LSB
388  * Byte 3 : PCI device ID MSB
389  * Byte 4 : PCI device ID LSB
390  */
391 #define DHCP_EB_BUS_ID DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb1 )
392
393 /** Network device descriptor */
394 struct dhcp_netdev_desc {
395         /** Bus type ID */
396         uint8_t type;
397         /** Vendor ID */
398         uint16_t vendor;
399         /** Device ID */
400         uint16_t device;
401 } __attribute__ (( packed ));
402
403 /** Use cached network settings (obsolete; do not reuse this value) */
404 #define DHCP_EB_USE_CACHED DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xb2 )
405
406 /** BIOS drive number
407  *
408  * This is the drive number for a drive emulated via INT 13.  0x80 is
409  * the first hard disk, 0x81 is the second hard disk, etc.
410  */
411 #define DHCP_EB_BIOS_DRIVE DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbd )
412
413 /** Username
414  *
415  * This will be used as the username for any required authentication.
416  * It is expected that this option's value will be held in
417  * non-volatile storage, rather than transmitted as part of a DHCP
418  * packet.
419  */
420 #define DHCP_EB_USERNAME DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbe )
421
422 /** Password
423  *
424  * This will be used as the password for any required authentication.
425  * It is expected that this option's value will be held in
426  * non-volatile storage, rather than transmitted as part of a DHCP
427  * packet.
428  */
429 #define DHCP_EB_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xbf )
430
431 /** Reverse username
432  *
433  * This will be used as the reverse username (i.e. the username
434  * provided by the server) for any required authentication.  It is
435  * expected that this option's value will be held in non-volatile
436  * storage, rather than transmitted as part of a DHCP packet.
437  */
438 #define DHCP_EB_REVERSE_USERNAME DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc0 )
439
440 /** Reverse password
441  *
442  * This will be used as the reverse password (i.e. the password
443  * provided by the server) for any required authentication.  It is
444  * expected that this option's value will be held in non-volatile
445  * storage, rather than transmitted as part of a DHCP packet.
446  */
447 #define DHCP_EB_REVERSE_PASSWORD DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc1 )
448
449 /** User ID
450  *
451  * This will be used as the user id for AUTH_SYS based authentication in NFS.
452  */
453 #define DHCP_EB_UID DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc2 )
454
455 /** Group ID
456  *
457  * This will be used as the group id for AUTH_SYS based authentication in NFS.
458  */
459 #define DHCP_EB_GID DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xc3 )
460
461 /** iPXE version number */
462 #define DHCP_EB_VERSION DHCP_ENCAP_OPT ( DHCP_EB_ENCAP, 0xeb )
463
464 /** iSCSI primary target IQN */
465 #define DHCP_ISCSI_PRIMARY_TARGET_IQN 201
466
467 /** iSCSI secondary target IQN */
468 #define DHCP_ISCSI_SECONDARY_TARGET_IQN 202
469
470 /** iSCSI initiator IQN */
471 #define DHCP_ISCSI_INITIATOR_IQN 203
472
473 /** Maximum normal DHCP option */
474 #define DHCP_MAX_OPTION 254
475
476 /** End of options
477  *
478  * This tag does not have a length field; it is always only a single
479  * byte in length.
480  */
481 #define DHCP_END 255
482
483 /** @} */
484
485 /** Construct a DHCP option from a list of bytes */
486 #define DHCP_OPTION( ... ) VA_ARG_COUNT ( __VA_ARGS__ ), __VA_ARGS__
487
488 /** Construct a DHCP option from a list of characters */
489 #define DHCP_STRING( ... ) DHCP_OPTION ( __VA_ARGS__ )
490
491 /** Construct a byte-valued DHCP option */
492 #define DHCP_BYTE( value ) DHCP_OPTION ( value )
493
494 /** Construct a word-valued DHCP option */
495 #define DHCP_WORD( value ) DHCP_OPTION ( ( ( (value) >> 8 ) & 0xff ),   \
496                                          ( ( (value) >> 0 ) & 0xff ) )
497
498 /** Construct a dword-valued DHCP option */
499 #define DHCP_DWORD( value ) DHCP_OPTION ( ( ( (value) >> 24 ) & 0xff ), \
500                                           ( ( (value) >> 16 ) & 0xff ), \
501                                           ( ( (value) >> 8  ) & 0xff ), \
502                                           ( ( (value) >> 0  ) & 0xff ) )
503
504 /** Construct a DHCP encapsulated options field */
505 #define DHCP_ENCAP( ... ) DHCP_OPTION ( __VA_ARGS__, DHCP_END )
506
507 /**
508  * A DHCP option
509  *
510  * DHCP options consist of a mandatory tag, a length field that is
511  * mandatory for all options except @c DHCP_PAD and @c DHCP_END, and a
512  * payload.  
513  */
514 struct dhcp_option {
515         /** Tag
516          *
517          * Must be a @c DHCP_XXX value.
518          */
519         uint8_t tag;
520         /** Length
521          *
522          * This is the length of the data field (i.e. excluding the
523          * tag and length fields).  For the two tags @c DHCP_PAD and
524          * @c DHCP_END, the length field is implicitly zero and is
525          * also missing, i.e. these DHCP options are only a single
526          * byte in length.
527          */
528         uint8_t len;
529         /** Option data */
530         uint8_t data[0];
531 } __attribute__ (( packed ));
532
533 /**
534  * Length of a DHCP option header
535  *
536  * The header is the portion excluding the data, i.e. the tag and the
537  * length.
538  */
539 #define DHCP_OPTION_HEADER_LEN ( offsetof ( struct dhcp_option, data ) )
540
541 /** Maximum length for a single DHCP option */
542 #define DHCP_MAX_LEN 0xff
543
544 /**
545  * A DHCP header
546  *
547  */
548 struct dhcphdr {
549         /** Operation
550          *
551          * This must be either @c BOOTP_REQUEST or @c BOOTP_REPLY.
552          */
553         uint8_t op;
554         /** Hardware address type
555          *
556          * This is an ARPHRD_XXX constant.  Note that ARPHRD_XXX
557          * constants are nominally 16 bits wide; this could be
558          * considered to be a bug in the BOOTP/DHCP specification.
559          */
560         uint8_t htype;
561         /** Hardware address length */
562         uint8_t hlen;
563         /** Number of hops from server */
564         uint8_t hops;
565         /** Transaction ID */
566         uint32_t xid;
567         /** Seconds since start of acquisition */
568         uint16_t secs;
569         /** Flags */
570         uint16_t flags;
571         /** "Client" IP address
572          *
573          * This is filled in if the client already has an IP address
574          * assigned and can respond to ARP requests.
575          */
576         struct in_addr ciaddr;
577         /** "Your" IP address
578          *
579          * This is the IP address assigned by the server to the client.
580          */
581         struct in_addr yiaddr;
582         /** "Server" IP address
583          *
584          * This is the IP address of the next server to be used in the
585          * boot process.
586          */
587         struct in_addr siaddr;
588         /** "Gateway" IP address
589          *
590          * This is the IP address of the DHCP relay agent, if any.
591          */
592         struct in_addr giaddr;
593         /** Client hardware address */
594         uint8_t chaddr[16];
595         /** Server host name (null terminated)
596          *
597          * This field may be overridden and contain DHCP options
598          */
599         char sname[64];
600         /** Boot file name (null terminated)
601          *
602          * This field may be overridden and contain DHCP options
603          */
604         char file[128];
605         /** DHCP magic cookie
606          *
607          * Must have the value @c DHCP_MAGIC_COOKIE.
608          */
609         uint32_t magic;
610         /** DHCP options
611          *
612          * Variable length; extends to the end of the packet.  Minimum
613          * length (for the sake of sanity) is 1, to allow for a single
614          * @c DHCP_END tag.
615          */
616         uint8_t options[0];
617 };
618
619 /** Opcode for a request from client to server */
620 #define BOOTP_REQUEST 1
621
622 /** Opcode for a reply from server to client */
623 #define BOOTP_REPLY 2
624
625 /** BOOTP reply must be broadcast
626  *
627  * Clients that cannot accept unicast BOOTP replies must set this
628  * flag.
629  */
630 #define BOOTP_FL_BROADCAST 0x8000
631
632 /** DHCP magic cookie */
633 #define DHCP_MAGIC_COOKIE 0x63825363UL
634
635 /** DHCP minimum packet length
636  *
637  * This is the mandated minimum packet length that a DHCP participant
638  * must be prepared to receive.
639  */
640 #define DHCP_MIN_LEN 552
641
642 /** Timeouts for sending DHCP packets */
643 #define DHCP_MIN_TIMEOUT ( 1 * TICKS_PER_SEC )
644 #define DHCP_MAX_TIMEOUT ( 10 * TICKS_PER_SEC )
645
646 /** Maximum time that we will wait for ProxyDHCP responses */
647 #define PROXYDHCP_MAX_TIMEOUT ( 2 * TICKS_PER_SEC )
648
649 /** Maximum time that we will wait for Boot Server responses */
650 #define PXEBS_MAX_TIMEOUT ( 3 * TICKS_PER_SEC )
651
652 /** Settings block name used for DHCP responses */
653 #define DHCP_SETTINGS_NAME "dhcp"
654
655 /** Settings block name used for ProxyDHCP responses */
656 #define PROXYDHCP_SETTINGS_NAME "proxydhcp"
657
658 /** Setting block name used for BootServerDHCP responses */
659 #define PXEBS_SETTINGS_NAME "pxebs"
660
661 extern uint32_t dhcp_last_xid;
662 extern int dhcp_create_packet ( struct dhcp_packet *dhcppkt,
663                                 struct net_device *netdev, uint8_t msgtype,
664                                 uint32_t xid, const void *options,
665                                 size_t options_len, void *data,
666                                 size_t max_len );
667 extern int dhcp_create_request ( struct dhcp_packet *dhcppkt,
668                                  struct net_device *netdev,
669                                  unsigned int msgtype, uint32_t xid,
670                                  struct in_addr ciaddr,
671                                  void *data, size_t max_len );
672 extern int start_dhcp ( struct interface *job, struct net_device *netdev );
673 extern int start_pxebs ( struct interface *job, struct net_device *netdev,
674                          unsigned int pxe_type );
675
676 #endif /* _IPXE_DHCP_H */