blob: cd448b37a55ac64a66830b83155490b628ace463 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
|
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
--*/
#ifndef _DHCP_H
#define _DHCP_H
//
// Definitions for DHCP version 4 UDP packet.
// The field names in this structure are defined and described in RFC 2131.
//
#pragma pack(1)
typedef struct {
UINT8 op;
#define BOOTP_REQUEST 1
#define BOOTP_REPLY 2
UINT8 htype;
UINT8 hlen;
UINT8 hops;
UINT32 xid;
UINT16 secs;
UINT16 flags;
#define DHCP_BROADCAST_FLAG 0x8000
UINT32 ciaddr;
UINT32 yiaddr;
UINT32 siaddr;
UINT32 giaddr;
UINT8 chaddr[16];
UINT8 sname[64];
UINT8 file[128];
UINT8 options[312];
#define OP_PAD 0
#define OP_END 255
#define OP_SUBNET_MASK 1
#define OP_TIME_OFFSET 2
#define OP_ROUTER_LIST 3
#define OP_TIME_SERVERS 4
#define OP_NAME_SERVERS 5
#define OP_DNS_SERVERS 6
#define OP_LOG_SERVERS 7
#define OP_COOKIE_SERVERS 8
#define OP_LPR_SREVERS 9
#define OP_IMPRESS_SERVERS 10
#define OP_RES_LOC_SERVERS 11
#define OP_HOST_NAME 12
#define OP_BOOT_FILE_SZ 13
#define OP_DUMP_FILE 14
#define OP_DOMAIN_NAME 15
#define OP_SWAP_SERVER 16
#define OP_ROOT_PATH 17
#define OP_EXTENSION_PATH 18
#define OP_IP_FORWARDING 19
#define OP_NON_LOCAL_SRC_RTE 20
#define OP_POLICY_FILTER 21
#define OP_MAX_DATAGRAM_SZ 22
#define OP_DEFAULT_TTL 23
#define OP_MTU_AGING_TIMEOUT 24
#define OP_MTU_SIZES 25
#define OP_MTU_TO_USE 26
#define OP_ALL_SUBNETS_LOCAL 27
#define OP_BROADCAST_ADD 28
#define OP_PERFORM_MASK_DISCOVERY 29
#define OP_RESPOND_TO_MASK_REQ 30
#define OP_PERFORM_ROUTER_DISCOVERY 31
#define OP_ROUTER_SOLICIT_ADDRESS 32
#define OP_STATIC_ROUTER_LIST 33
#define OP_USE_ARP_TRAILERS 34
#define OP_ARP_CACHE_TIMEOUT 35
#define OP_ETHERNET_ENCAPSULATION 36
#define OP_TCP_DEFAULT_TTL 37
#define OP_TCP_KEEP_ALIVE_INT 38
#define OP_KEEP_ALIVE_GARBAGE 39
#define OP_NIS_DOMAIN_NAME 40
#define OP_NIS_SERVERS 41
#define OP_NTP_SERVERS 42
#define OP_VENDOR_SPECIFIC 43
#define VEND_PXE_MTFTP_IP 1
#define VEND_PXE_MTFTP_CPORT 2
#define VEND_PXE_MTFTP_SPORT 3
#define VEND_PXE_MTFTP_TMOUT 4
#define VEND_PXE_MTFTP_DELAY 5
#define VEND_PXE_DISCOVERY_CONTROL 6
#define VEND_PXE_DISCOVERY_MCAST_ADDR 7
#define VEND_PXE_BOOT_SERVERS 8
#define VEND_PXE_BOOT_MENU 9
#define VEND_PXE_BOOT_PROMPT 10
#define VEND_PXE_MCAST_ADDRS_ALLOC 11
#define VEND_PXE_CREDENTIAL_TYPES 12
#define VEND_PXE_BOOT_ITEM 71
#define OP_NBNS_SERVERS 44
#define OP_NBDD_SERVERS 45
#define OP_NETBIOS_NODE_TYPE 46
#define OP_NETBIOS_SCOPE 47
#define OP_XWINDOW_SYSTEM_FONT_SERVERS 48
#define OP_XWINDOW_SYSTEM_DISPLAY_MANAGERS 49
#define OP_DHCP_REQ_IP_ADD 50
#define OP_DHCP_LEASE_TIME 51
#define OP_DHCP_OPTION_OVERLOAD 52
#define OVLD_FILE 1
#define OVLD_SRVR_NAME 2
#define OP_DHCP_MESSAGE_TYPE 53
#define DHCPDISCOVER 1
#define DHCPOFFER 2
#define DHCPREQUEST 3
#define DHCPDECLINE 4
#define DHCPACK 5
#define DHCPNAK 6
#define DHCPRELEASE 7
#define DHCPINFORM 8
#define OP_DHCP_SERVER_IP 54
#define OP_DHCP_PARM_REQ_LIST 55
#define OP_DHCP_ERROR_MESSAGE 56
#define OP_DHCP_MAX_MESSAGE_SZ 57
#define OP_DHCP_RENEWAL_TIME 58
#define OP_DHCP_REBINDING_TIME 59
#define OP_DHCP_CLASS_IDENTIFIER 60
#define OP_DHCP_CLIENT_IDENTIFIER 61
#define OP_NISPLUS_DOMAIN_NAME 64
#define OP_NISPLUS_SERVERS 65
#define OP_DHCP_TFTP_SERVER_NAME 66
#define OP_DHCP_BOOTFILE 67
#define OP_MOBILE_IP_HOME_AGENTS 68
#define OP_SMPT_SERVERS 69
#define OP_POP3_SERVERS 70
#define OP_NNTP_SERVERS 71
#define OP_WWW_SERVERS 72
#define OP_FINGER_SERVERS 73
#define OP_IRC_SERVERS 74
#define OP_STREET_TALK_SERVERS 75
#define OP_STREET_TALK_DIR_ASSIST_SERVERS 76
#define OP_NDS_SERVERS 85
#define OP_NDS_TREE_NAME 86
#define OP_NDS_CONTEXT 87
#define OP_DHCP_SYSTEM_ARCH 93
#define OP_DHCP_NETWORK_ARCH 94
#define OP_DHCP_PLATFORM_ID 97
} DHCPV4_STRUCT;
//
// DHCPv4 option header
//
typedef struct {
UINT8 OpCode;
UINT8 Length;
//
// followed by Data[]
//
} DHCPV4_OP_HEADER;
//
// Generic DHCPv4 option (header followed by data)
//
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Data[1];
} DHCPV4_OP_STRUCT;
//
// Maximum DHCP packet size on ethernet
//
#define MAX_DHCP_MSG_SZ (MAX_ENET_DATA_SIZE - sizeof (IPV4_HEADER) - sizeof (UDPV4_HEADER))
//
// Macros used in pxe_bc_dhcp.c and pxe_loadfile.c
//
#define DHCPV4_TRANSMIT_BUFFER (*(DHCPV4_STRUCT *) (Private->TransmitBuffer))
#define DHCPV4_OPTIONS_BUFFER (*(struct optionsstr *) DHCPV4_TRANSMIT_BUFFER.options)
#define DHCPV4_ACK_INDEX 0
#define PXE_BINL_INDEX 1
#define PXE_OFFER_INDEX 1
#define PXE_ACK_INDEX 2
#define PXE_BIS_INDEX 3
#define DHCPV4_ACK_BUFFER ((struct DhcpReceiveBufferStruct *) Private->DhcpPacketBuffer)[DHCPV4_ACK_INDEX]
#define PXE_BINL_BUFFER ((struct DhcpReceiveBufferStruct *) Private->DhcpPacketBuffer)[PXE_BINL_INDEX]
#define PXE_OFFER_BUFFER ((struct DhcpReceiveBufferStruct *) Private->DhcpPacketBuffer)[PXE_OFFER_INDEX]
#define PXE_ACK_BUFFER ((struct DhcpReceiveBufferStruct *) Private->DhcpPacketBuffer)[PXE_ACK_INDEX]
#define PXE_BIS_BUFFER ((struct DhcpReceiveBufferStruct *) Private->DhcpPacketBuffer)[PXE_BIS_INDEX]
#define DHCPV4_ACK_PACKET DHCPV4_ACK_BUFFER.u.Dhcpv4
#define PXE_BINL_PACKET PXE_BINL_BUFFER.u.Dhcpv4
#define PXE_OFFER_PACKET PXE_OFFER_BUFFER.u.Dhcpv4
#define PXE_ACK_PACKET PXE_ACK_BUFFER.u.Dhcpv4
#define PXE_BIS_PACKET PXE_BIS_BUFFER.u.Dhcpv4
//
// network structure definitions
//
//
// some option definitions
//
#define DHCPV4_OPTION_LENGTH(type) (sizeof (type) - sizeof (DHCPV4_OP_HEADER))
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Type;
} DHCPV4_OP_MESSAGE_TYPE;
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Overload;
} DHCPV4_OP_OVERLOAD;
//
// boot server list structure
// one or more contained in a pxe boot servers structure
//
typedef struct {
UINT8 IpCount;
EFI_IPv4_ADDRESS IpList[1]; // IP count of IPs
} PXEV4_SERVER_LIST;
typedef struct {
UINT8 IpCount;
EFI_IPv6_ADDRESS IpList[1]; // IP count of IPs
} PXEV6_SERVER_LIST;
typedef union {
PXEV4_SERVER_LIST Ipv4List;
PXEV6_SERVER_LIST Ipv6List;
} PXE_SERVER_LISTS;
typedef struct {
UINT16 Type;
PXE_SERVER_LISTS u;
} PXE_SERVER_LIST;
//
// pxe boot servers structure
//
typedef struct {
DHCPV4_OP_HEADER Header;
PXE_SERVER_LIST ServerList[1]; // one or more
} PXE_OP_SERVER_LIST;
//
// pxe boot item structure
//
typedef struct {
DHCPV4_OP_HEADER Header;
UINT16 Type;
UINT16 Layer;
} PXE_OP_BOOT_ITEM;
//
// pxe boot menu item structure
//
typedef struct {
UINT16 Type;
UINT8 DataLen;
UINT8 Data[1];
} PXE_BOOT_MENU_ENTRY;
//
// pxe boot menu structure
//
typedef struct {
DHCPV4_OP_HEADER Header;
PXE_BOOT_MENU_ENTRY MenuItem[1];
} PXE_OP_BOOT_MENU;
//
// pxe boot prompt structure
//
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Timeout;
UINT8 Prompt[1];
} PXE_OP_BOOT_PROMPT;
#define PXE_BOOT_PROMPT_AUTO_SELECT 0
#define PXE_BOOT_PROMPT_NO_TIMEOUT 255
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Class[1];
} DHCPV4_OP_CLASS;
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 File[1];
} DHCPV4_OP_BOOTFILE;
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 VendorOptions[1];
} DHCPV4_OP_VENDOR_OPTIONS;
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 MaxSize[2];
} DHCPV4_OP_MAX_MESSAGE_SIZE;
typedef struct {
UINT8 _OP_SUBNET_MASK; /* 1 */
UINT8 _OP_TIME_OFFSET; /* 2 */
UINT8 _OP_ROUTER_LIST; /* 3 */
UINT8 _OP_TIME_SERVERS; /* 4 */
UINT8 _OP_NAME_SERVERS; /* 5 */
UINT8 _OP_DNS_SERVERS; /* 6 */
UINT8 _OP_HOST_NAME; /* 12 */
UINT8 _OP_BOOT_FILE_SZ; /* 13 */
UINT8 _OP_DOMAIN_NAME; /* 15 */
UINT8 _OP_ROOT_PATH; /* 17 */
UINT8 _OP_EXTENSION_PATH; /* 18 */
UINT8 _OP_MAX_DATAGRAM_SZ; /* 22 */
UINT8 _OP_DEFAULT_TTL; /* 23 */
UINT8 _OP_BROADCAST_ADD; /* 28 */
UINT8 _OP_NIS_DOMAIN_NAME; /* 40 */
UINT8 _OP_NIS_SERVERS; /* 41 */
UINT8 _OP_NTP_SERVERS; /* 42 */
UINT8 _OP_VENDOR_SPECIFIC; /* 43 */
UINT8 _OP_DHCP_REQ_IP_ADD; /* 50 */
UINT8 _OP_DHCP_LEASE_TIME; /* 51 */
UINT8 _OP_DHCP_SERVER_IP; /* 54 */
UINT8 _OP_DHCP_RENEWAL_TIME; /* 58 */
UINT8 _OP_DHCP_REBINDING_TIME; /* 59 */
UINT8 _OP_DHCP_CLASS_IDENTIFIER; /* 60 */
UINT8 _OP_DHCP_TFTP_SERVER_NAME; /* 66 */
UINT8 _OP_DHCP_BOOTFILE; /* 67 */
UINT8 _OP_DHCP_PLATFORM_ID; /* 97 */
UINT8 VendorOption128; // vendor option 128
UINT8 VendorOption129; // vendor option 129
UINT8 VendorOption130; // vendor option 130
UINT8 VendorOption131; // vendor option 131
UINT8 VendorOption132; // vendor option 132
UINT8 VendorOption133; // vendor option 133
UINT8 VendorOption134; // vendor option 134
UINT8 VendorOption135; // vendor option 135
} DHCPV4_REQUESTED_OPTIONS_DATA;
typedef struct {
DHCPV4_OP_HEADER Header;
DHCPV4_REQUESTED_OPTIONS_DATA Data;
} DHCPV4_OP_REQUESTED_OPTIONS;
typedef struct opipstr {
DHCPV4_OP_HEADER Header;
EFI_IPv4_ADDRESS Ip;
} DHCPV4_OP_IP_ADDRESS;
//
// ip list structure - e.g. router list
//
typedef struct {
DHCPV4_OP_HEADER Header;
EFI_IPv4_ADDRESS IpList[1];
} DHCPV4_OP_IP_LIST;
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Type;
UINT8 Guid[sizeof (EFI_GUID)];
} DHCPV4_OP_CLIENT_ID;
//
// special options start - someday obsolete ???
//
#define DHCPV4_OP_PLATFORM_ID DHCPV4_OP_CLIENT_ID
typedef struct {
DHCPV4_OP_HEADER Header;
UINT8 Type; // SNP = 2
UINT8 MajorVersion;
UINT8 MinorVersion;
} DHCPV4_OP_NETWORK_INTERFACE;
#define UNDI_TYPE 1
#define SNP_TYPE 2
typedef struct {
DHCPV4_OP_HEADER Header;
UINT16 Type;
} DHCPV4_OP_ARCHITECTURE_TYPE;
//
// special options end - someday obsolete ???
//
typedef struct {
UINT8 ClassIdentifier[10]; // PXEClient:
UINT8 Lit2[5]; // Arch:
UINT8 ArchitectureType[5]; // 00000 - 65536
UINT8 Lit3[1]; // :
UINT8 InterfaceName[4]; // e.g. UNDI
UINT8 Lit4[1]; // :
UINT8 UndiMajor[3]; // 000 - 255
UINT8 UndiMinor[3]; // 000 - 255
} DHCPV4_CLASS_ID_DATA;
typedef struct {
DHCPV4_OP_HEADER Header;
DHCPV4_CLASS_ID_DATA Data;
} DHCPV4_OP_CLASS_ID;
typedef struct {
DHCPV4_OP_HEADER Header;
EFI_IPv4_ADDRESS Ip;
} DHCPV4_OP_REQUESTED_IP;
typedef struct {
DHCPV4_OP_HEADER Header;
EFI_IPv4_ADDRESS Ip;
} DHCPV4_OP_SERVER_IP;
typedef struct {
DHCPV4_OP_HEADER Header;
EFI_IPv4_ADDRESS Ip;
} DHCPV4_OP_SUBNET_MASK;
typedef struct { // oppxedisctlstr {
DHCPV4_OP_HEADER Header;
UINT8 ControlBits;
} PXE_OP_DISCOVERY_CONTROL;
#define DISABLE_BCAST (1 << 0)
#define DISABLE_MCAST (1 << 1)
#define USE_ACCEPT_LIST (1 << 2)
#define USE_BOOTFILE (1 << 3)
#pragma pack()
//
// definitions of indices to populate option interest array
//
#define VEND_PXE_MTFTP_IP_IX 1 // multicast IP address of bootfile for MTFTP listen
#define VEND_PXE_MTFTP_CPORT_IX 2 // UDP Port to monitor for MTFTP responses - Intel order
#define VEND_PXE_MTFTP_SPORT_IX 3 // Server UDP Port for MTFTP open - Intel order
#define VEND_PXE_MTFTP_TMOUT_IX 4 // Listen timeout - secs
#define VEND_PXE_MTFTP_DELAY_IX 5 // Transmission timeout - secs
#define VEND_PXE_DISCOVERY_CONTROL_IX 6 // bit field
#define VEND_PXE_DISCOVERY_MCAST_ADDR_IX 7 // boot server discovery multicast address
#define VEND_PXE_BOOT_SERVERS_IX 8 // list of boot servers of form tp(2) cnt(1) ips[cnt]
#define VEND_PXE_BOOT_MENU_IX 9
#define VEND_PXE_BOOT_PROMPT_IX 10
#define VEND_PXE_MCAST_ADDRS_ALLOC_IX 0 // not used by PXE client
#define VEND_PXE_CREDENTIAL_TYPES_IX 11
#define VEND_13_IX 0 // not used by PXE client
#define VEND_14_IX 0 // not used by PXE client
#define VEND_15_IX 0 // not used by PXE client
#define VEND_16_IX 0 // not used by PXE client
#define VEND_17_IX 0 // not used by PXE client
#define VEND_18_IX 0 // not used by PXE client
#define VEND_19_IX 0 // not used by PXE client
#define VEND_20_IX 0 // not used by PXE client
#define VEND_21_IX 0 // not used by PXE client
#define VEND_22_IX 0 // not used by PXE client
#define VEND_23_IX 0 // not used by PXE client
#define VEND_24_IX 0 // not used by PXE client
#define VEND_25_IX 0 // not used by PXE client
#define VEND_26_IX 0 // not used by PXE client
#define VEND_27_IX 0 // not used by PXE client
#define VEND_28_IX 0 // not used by PXE client
#define VEND_29_IX 0 // not used by PXE client
#define VEND_30_IX 0 // not used by PXE client
#define VEND_31_IX 0 // not used by PXE client
#define VEND_32_IX 0 // not used by PXE client
#define VEND_33_IX 0 // not used by PXE client
#define VEND_34_IX 0 // not used by PXE client
#define VEND_35_IX 0 // not used by PXE client
#define VEND_36_IX 0 // not used by PXE client
#define VEND_37_IX 0 // not used by PXE client
#define VEND_38_IX 0 // not used by PXE client
#define VEND_39_IX 0 // not used by PXE client
#define VEND_40_IX 0 // not used by PXE client
#define VEND_41_IX 0 // not used by PXE client
#define VEND_42_IX 0 // not used by PXE client
#define VEND_43_IX 0 // not used by PXE client
#define VEND_44_IX 0 // not used by PXE client
#define VEND_45_IX 0 // not used by PXE client
#define VEND_46_IX 0 // not used by PXE client
#define VEND_47_IX 0 // not used by PXE client
#define VEND_48_IX 0 // not used by PXE client
#define VEND_49_IX 0 // not used by PXE client
#define VEND_50_IX 0 // not used by PXE client
#define VEND_51_IX 0 // not used by PXE client
#define VEND_52_IX 0 // not used by PXE client
#define VEND_53_IX 0 // not used by PXE client
#define VEND_54_IX 0 // not used by PXE client
#define VEND_55_IX 0 // not used by PXE client
#define VEND_56_IX 0 // not used by PXE client
#define VEND_57_IX 0 // not used by PXE client
#define VEND_58_IX 0 // not used by PXE client
#define VEND_59_IX 0 // not used by PXE client
#define VEND_60_IX 0 // not used by PXE client
#define VEND_61_IX 0 // not used by PXE client
#define VEND_62_IX 0 // not used by PXE client
#define VEND_63_IX 0 // not used by PXE client
#define VEND_64_IX 0 // not used by PXE client
#define VEND_65_IX 0 // not used by PXE client
#define VEND_66_IX 0 // not used by PXE client
#define VEND_67_IX 0 // not used by PXE client
#define VEND_68_IX 0 // not used by PXE client
#define VEND_69_IX 0 // not used by PXE client
#define VEND_70_IX 0 // not used by PXE client
#define VEND_PXE_BOOT_ITEM_IX 12
#define MAX_OUR_PXE_OPT VEND_PXE_BOOT_ITEM // largest PXE option in which we are interested
#define MAX_OUR_PXE_IX VEND_PXE_BOOT_ITEM_IX // largest PXE option index
//
// define various types by options that are sent
//
#define WfM11a_OPTS ((1<<VEND_PXE_MTFTP_IP_IX) | \
(1<<VEND_PXE_MTFTP_CPORT_IX) | \
(1<<VEND_PXE_MTFTP_SPORT_IX) | \
(1<<VEND_PXE_MTFTP_TMOUT_IX) | \
(1<<VEND_PXE_MTFTP_DELAY_IX))
#define DISCOVER_OPTS ((1<<VEND_PXE_DISCOVERY_CONTROL_IX) | \
(1<<VEND_PXE_DISCOVERY_MCAST_ADDR_IX) | \
(1<<VEND_PXE_BOOT_SERVERS_IX) | \
(1<<VEND_PXE_BOOT_MENU_IX) | \
(1<<VEND_PXE_BOOT_PROMPT_IX) | \
(1<<VEND_PXE_BOOT_ITEM_IX))
#define CREDENTIALS_OPT (1 << VEND_PXE_CREDENTIAL_TYPES_IX)
//
// definitions of indices to populate option interest array
//
#define OP_SUBNET_MASK_IX 1
#define OP_TIME_OFFSET_IX 0 // not used by PXE client
#define OP_ROUTER_LIST_IX 2
#define OP_TIME_SERVERS_IX 0 // not used by PXE client
#define OP_NAME_SERVERS_IX 0 // not used by PXE client
#define OP_DNS_SERVERS_IX 0 // not used by PXE client
#define OP_LOG_SERVERS_IX 0 // not used by PXE client
#define OP_COOKIE_SERVERS_IX 0 // not used by PXE client
#define OP_LPR_SREVERS_IX 0 // not used by PXE client
#define OP_IMPRESS_SERVERS_IX 0 // not used by PXE client
#define OP_RES_LOC_SERVERS_IX 0 // not used by PXE client
#define OP_HOST_NAME_IX 0 // not used by PXE client
#define OP_BOOT_FILE_SZ_IX 9
#define OP_DUMP_FILE_IX 0 // not used by PXE client
#define OP_DOMAIN_NAME_IX 0 // not used by PXE client
#define OP_SWAP_SERVER_IX 0 // not used by PXE client
#define OP_ROOT_PATH_IX 0 // not used by PXE client
#define OP_EXTENSION_PATH_IX 0 // not used by PXE client
#define OP_IP_FORWARDING_IX 0 // not used by PXE client
#define OP_NON_LOCAL_SRC_RTE_IX 0 // not used by PXE client
#define OP_POLICY_FILTER_IX 0 // not used by PXE client
#define OP_MAX_DATAGRAM_SZ_IX 0 // not used by PXE client
#define OP_DEFAULT_TTL_IX 0 // not used by PXE client
#define OP_MTU_AGING_TIMEOUT_IX 0 // not used by PXE client
#define OP_MTU_SIZES_IX 0 // not used by PXE client
#define OP_MTU_TO_USE_IX 0 // not used by PXE client
#define OP_ALL_SUBNETS_LOCAL_IX 0 // not used by PXE client
#define OP_BROADCAST_ADD_IX 0 // not used by PXE client
#define OP_PERFORM_MASK_DISCOVERY_IX 0 // not used by PXE client
#define OP_RESPOND_TO_MASK_REQ_IX 0 // not used by PXE client
#define OP_PERFORM_ROUTER_DISCOVERY_IX 0 // not used by PXE client
#define OP_ROUTER_SOLICIT_ADDRESS_IX 0 // not used by PXE client
#define OP_STATIC_ROUTER_LIST_IX 0 // not used by PXE client
#define OP_USE_ARP_TRAILERS_IX 0 // not used by PXE client
#define OP_ARP_CACHE_TIMEOUT_IX 0 // not used by PXE client
#define OP_ETHERNET_ENCAPSULATION_IX 0 // not used by PXE client
#define OP_TCP_DEFAULT_TTL_IX 0 // not used by PXE client
#define OP_TCP_KEEP_ALIVE_INT_IX 0 // not used by PXE client
#define OP_KEEP_ALIVE_GARBAGE_IX 0 // not used by PXE client
#define OP_NIS_DOMAIN_NAME_IX 0 // not used by PXE client
#define OP_NIS_SERVERS_IX 0 // not used by PXE client
#define OP_NTP_SERVERS_IX 0 // not used by PXE client
#define OP_VENDOR_SPECIFIC_IX 3
#define OP_NBNS_SERVERS_IX 0 // not used by PXE client
#define OP_NBDD_SERVERS_IX 0 // not used by PXE client
#define OP_NETBIOS_NODE_TYPE_IX 0 // not used by PXE client
#define OP_NETBIOS_SCOPE_IX 0 // not used by PXE client
#define OP_XWINDOW_SYSTEM_FONT_SERVERS_IX 0 // not used by PXE client
#define OP_XWINDOW_SYSTEM_DISPLAY_MANAGERS_IX 0 // not used by PXE client
// DHCP option indices
//
#define OP_DHCP_REQ_IP_ADD_IX 0 // not used by PXE client
#define OP_DHCP_LEASE_TIME_IX 0 // not used by PXE client
#define OP_DHCP_OPTION_OVERLOAD_IX 4
#define OP_DHCP_MESSAGE_TYPE_IX 5
#define OP_DHCP_SERVER_IP_IX 6
#define OP_DHCP_PARM_REQ_LIST_IX 0 // not used by PXE client
#define OP_DHCP_ERROR_MESSAGE_IX 0 // not used by PXE client
#define OP_DHCP_MAX_MESSAGE_SZ_IX 0 // not used by PXE client
#define OP_DHCP_RENEWAL_TIME_IX 0 // not used by PXE client
#define OP_DHCP_REBINDING_TIME_IX 0 // not used by PXE client
#define OP_DHCP_CLASS_IDENTIFIER_IX 7
#define OP_DHCP_CLIENT_IDENTIFIER_IX 0 // not used by PXE client
#define OP_RESERVED62_IX 0 // not used by PXE client
#define OP_RESERVED63_IX 0 // not used by PXE client
#define OP_NISPLUS_DOMAIN_NAME_IX 0 // not used by PXE client
#define OP_NISPLUS_SERVERS_IX 0 // not used by PXE client
#define OP_DHCP_TFTP_SERVER_NAME_IX 0 // not used by PXE client
#define OP_DHCP_BOOTFILE_IX 8
#define MAX_OUR_OPT OP_DHCP_BOOTFILE // largest option in which we are interested
#define MAX_OUR_IX OP_BOOT_FILE_SZ_IX
typedef struct {
DHCPV4_OP_STRUCT *PktOptAdds[MAX_OUR_IX];
DHCPV4_OP_STRUCT *PxeOptAdds[MAX_OUR_PXE_IX];
UINT8 Status;
} OPTION_POINTERS;
typedef struct DhcpReceiveBufferStruct {
union {
UINT8 ReceiveBuffer[MAX_DHCP_MSG_SZ];
DHCPV4_STRUCT Dhcpv4;
} u;
OPTION_POINTERS OpAdds;
} DHCP_RECEIVE_BUFFER;
#define PXE_TYPE (1 << 0)
#define WfM11a_TYPE (1 << 1)
#define DISCOVER_TYPE (1 << 2)
#define CREDENTIALS_TYPE (1 << 3)
#define USE_THREE_BYTE (1 << 4)
#endif // _DHCP_H
/* EOF - dhcp.h */
|