Browse Source

Documented Preboot, TFTP and UDP data structures

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
3503941582
1 changed files with 96 additions and 3 deletions
  1. 96
    3
      src/include/pxe_api.h

+ 96
- 3
src/include/pxe_api.h View File

213
 #define	PXENV_RESTART_TFTP		0x0073
213
 #define	PXENV_RESTART_TFTP		0x0073
214
 
214
 
215
 /** Parameter block for pxenv_restart_tftp() */
215
 /** Parameter block for pxenv_restart_tftp() */
216
-struct s_PXENV_RESTART_TFTP {
217
-} PACKED;
216
+struct s_PXENV_TFTP_READ_FILE;
218
 
217
 
219
 typedef struct s_PXENV_RESTART_TFTP PXENV_RESTART_TFTP_t;
218
 typedef struct s_PXENV_RESTART_TFTP PXENV_RESTART_TFTP_t;
220
 
219
 
235
 
234
 
236
 /** Parameter block for pxenv_start_undi() */
235
 /** Parameter block for pxenv_start_undi() */
237
 struct s_PXENV_START_UNDI {
236
 struct s_PXENV_START_UNDI {
237
+	PXENV_STATUS_t Status;			/**< PXE status code */
238
+	/** %ax register as passed to the Option ROM initialisation routine.
239
+	 *
240
+	 * For a PCI device, this should contain the bus:dev:fn value
241
+	 * that uniquely identifies the PCI device in the system.  For
242
+	 * a non-PCI device, this field is not defined.
243
+	 */
244
+	UINT16_t AX;
245
+	/** %bx register as passed to the Option ROM initialisation routine.
246
+	 *
247
+	 * For an ISAPnP device, this should contain the Card Select
248
+	 * Number assigned to the ISAPnP card.  For non-ISAPnP
249
+	 * devices, this should contain 0xffff.
250
+	 */
251
+	UINT16_t BX;
252
+	/** %dx register as passed to the Option ROM initialisation routine.
253
+	 *
254
+	 * For an ISAPnP device, this should contain the ISAPnP Read
255
+	 * Port address as currently set in all ISAPnP cards.  If
256
+	 * there are no ISAPnP cards, this should contain 0xffff.  (If
257
+	 * this is a non-ISAPnP device, but there are ISAPnP cards in
258
+	 * the system, this value is not well defined.)
259
+	 */
260
+	UINT16_t DX;
261
+	/** %di register as passed to the Option ROM initialisation routine.
262
+	 *
263
+	 * This contains the #OFF16_t portion of a struct #s_SEGOFF16
264
+	 * that points to the System BIOS Plug and Play Installation
265
+	 * Check Structure.  (Refer to section 4.4 of the Plug and
266
+	 * Play BIOS specification for a description of this
267
+	 * structure.)
268
+	 *
269
+	 * @note The PXE specification defines the type of this field
270
+	 * as #UINT16_t.  For x86, #OFF16_t and #UINT16_t are
271
+	 * equivalent anyway; for other architectures #OFF16_t makes
272
+	 * more sense.
273
+	 */
274
+	OFF16_t DI;
275
+	/** %es register as passed to the Option ROM initialisation routine.
276
+	 *
277
+	 * This contains the #SEGSEL_t portion of a struct #s_SEGOFF16
278
+	 * that points to the System BIOS Plug and Play Installation
279
+	 * Check Structure.  (Refer to section 4.4 of the Plug and
280
+	 * Play BIOS specification for a description of this
281
+	 * structure.)
282
+	 *
283
+	 * @note The PXE specification defines the type of this field
284
+	 * as #UINT16_t.  For x86, #SEGSEL_t and #UINT16_t are
285
+	 * equivalent anyway; for other architectures #SEGSEL_t makes
286
+	 * more sense.
287
+	 */
288
+	SEGSEL_t ES;
238
 } PACKED;
289
 } PACKED;
239
 
290
 
240
 typedef struct s_PXENV_START_UNDI PXENV_START_UNDI_t;
291
 typedef struct s_PXENV_START_UNDI PXENV_START_UNDI_t;
255
 
306
 
256
 /** Parameter block for pxenv_stop_undi() */
307
 /** Parameter block for pxenv_stop_undi() */
257
 struct s_PXENV_STOP_UNDI {
308
 struct s_PXENV_STOP_UNDI {
309
+	PXENV_STATUS_t Status;			/**< PXE status code */
258
 } PACKED;
310
 } PACKED;
259
 
311
 
260
 typedef struct s_PXENV_STOP_UNDI PXENV_STOP_UNDI_t;
312
 typedef struct s_PXENV_STOP_UNDI PXENV_STOP_UNDI_t;
275
 
327
 
276
 /** Parameter block for pxenv_start_base() */
328
 /** Parameter block for pxenv_start_base() */
277
 struct s_PXENV_START_BASE {
329
 struct s_PXENV_START_BASE {
330
+	PXENV_STATUS_t Status;			/**< PXE status code */
278
 } PACKED;
331
 } PACKED;
279
 
332
 
280
 typedef struct s_PXENV_START_BASE PXENV_START_BASE_t;
333
 typedef struct s_PXENV_START_BASE PXENV_START_BASE_t;
295
 
348
 
296
 /** Parameter block for pxenv_stop_base() */
349
 /** Parameter block for pxenv_stop_base() */
297
 struct s_PXENV_STOP_BASE {
350
 struct s_PXENV_STOP_BASE {
351
+	PXENV_STATUS_t Status;			/**< PXE status code */
298
 } PACKED;
352
 } PACKED;
299
 
353
 
300
 typedef struct s_PXENV_STOP_BASE PXENV_STOP_BASE_t;
354
 typedef struct s_PXENV_STOP_BASE PXENV_STOP_BASE_t;
324
 
378
 
325
 /** Parameter block for pxenv_tftp_open() */
379
 /** Parameter block for pxenv_tftp_open() */
326
 struct s_PXENV_TFTP_OPEN {
380
 struct s_PXENV_TFTP_OPEN {
381
+	PXENV_STATUS_t Status;			/**< PXE status code */
382
+	IP4_t ServerIPAddress;			/**< TFTP server IP address */
383
+	IP4_t GatewayIPAddress;			/**< Relay agent IP address */
384
+	UINT8_t FileName[128];			/**< File name */
385
+	UDP_PORT_t TFTPPort;			/**< TFTP server UDP port */
386
+	/** Requested size of TFTP packets
387
+	 *
388
+	 * This is the TFTP "blksize" option.  This must be at least
389
+	 * 512, according to the PXE specification, though no reason
390
+	 * is offered.
391
+	 */
392
+	UINT16_t PacketSize;
327
 } PACKED;
393
 } PACKED;
328
 
394
 
329
 typedef struct s_PXENV_TFTP_OPEN PXENV_TFTP_OPEN_t;
395
 typedef struct s_PXENV_TFTP_OPEN PXENV_TFTP_OPEN_t;
344
 
410
 
345
 /** Parameter block for pxenv_tftp_close() */
411
 /** Parameter block for pxenv_tftp_close() */
346
 struct s_PXENV_TFTP_CLOSE {
412
 struct s_PXENV_TFTP_CLOSE {
413
+	PXENV_STATUS_t Status;			/**< PXE status code */
347
 } PACKED;
414
 } PACKED;
348
 
415
 
349
 typedef struct s_PXENV_TFTP_CLOSE PXENV_TFTP_CLOSE_t;
416
 typedef struct s_PXENV_TFTP_CLOSE PXENV_TFTP_CLOSE_t;
364
 
431
 
365
 /** Parameter block for pxenv_tftp_read() */
432
 /** Parameter block for pxenv_tftp_read() */
366
 struct s_PXENV_TFTP_READ {
433
 struct s_PXENV_TFTP_READ {
434
+	PXENV_STATUS_t Status;			/**< PXE status code */
435
+	UINT16_t PacketNumber;			/**< TFTP packet number */
436
+	UINT16_t BufferSize;			/**< Size of data buffer */
437
+	SEGOFF16_t Buffer;			/**< Address of data buffer */
367
 } PACKED;
438
 } PACKED;
368
 
439
 
369
 typedef struct s_PXENV_TFTP_READ PXENV_TFTP_READ_t;
440
 typedef struct s_PXENV_TFTP_READ PXENV_TFTP_READ_t;
384
 
455
 
385
 /** Parameter block for pxenv_tftp_read_file() */
456
 /** Parameter block for pxenv_tftp_read_file() */
386
 struct s_PXENV_TFTP_READ_FILE {
457
 struct s_PXENV_TFTP_READ_FILE {
458
+	PXENV_STATUS_t Status;			/**< PXE status code */
459
+	UINT8_t FileName[128];			/**< File name */
460
+	UINT32_t BufferSize;			/**< Size of data buffer */
461
+	ADDR32_t Buffer;			/**< Address of data buffer */
462
+	IP4_t ServerIPAddress;			/**< TFTP server IP address */
463
+	IP4_t GatewayIPAddress;			/**< Relay agent IP address */
464
+	/** File multicast IP address */
465
+	IP4_t McastIPAddress;
466
+	/** Client multicast listening port */
467
+	UDP_PORT_t TFTPClntPort;
468
+	/** Server multicast listening port */
469
+	UDP_PORT_t TFTPSrvPort;
470
+	/** Timeout for receiving data or ACK packets */
471
+	UINT16_t TFTPOpenTimeOut;
472
+	/** Timeout before issuing MTFTP open */
473
+	UINT16_t TFTPReopenDelay;
387
 } PACKED;
474
 } PACKED;
388
 
475
 
389
 typedef struct s_PXENV_TFTP_READ_FILE PXENV_TFTP_READ_FILE_t;
476
 typedef struct s_PXENV_TFTP_READ_FILE PXENV_TFTP_READ_FILE_t;
405
 
492
 
406
 /** Parameter block for pxenv_tftp_get_fsize() */
493
 /** Parameter block for pxenv_tftp_get_fsize() */
407
 struct s_PXENV_TFTP_GET_FSIZE {
494
 struct s_PXENV_TFTP_GET_FSIZE {
495
+	PXENV_STATUS_t Status;			/**< PXE status code */
496
+	IP4_t ServerIPAddress;			/**< TFTP server IP address */
497
+	IP4_t GatewayIPAddress;			/**< Relay agent IP address */
498
+	UINT8_t FileName[128];			/**< File name */
499
+	UINT32_t FileSize;			/**< Size of the file */
408
 } PACKED;
500
 } PACKED;
409
 
501
 
410
 typedef struct s_PXENV_TFTP_GET_FSIZE PXENV_TFTP_GET_FSIZE_t;
502
 typedef struct s_PXENV_TFTP_GET_FSIZE PXENV_TFTP_GET_FSIZE_t;
480
 struct s_PXENV_UDP_WRITE {
572
 struct s_PXENV_UDP_WRITE {
481
 	PXENV_STATUS_t	Status;		/**< PXE status code */
573
 	PXENV_STATUS_t	Status;		/**< PXE status code */
482
 	IP4_t		ip;		/**< Destination IP address */
574
 	IP4_t		ip;		/**< Destination IP address */
483
-	IP4_t		gw;		/**< Gateway IP address */
575
+	IP4_t		gw;		/**< Relay agent IP address */
484
 	UDP_PORT_t	src_port;	/**< Source UDP port */
576
 	UDP_PORT_t	src_port;	/**< Source UDP port */
485
 	UDP_PORT_t	dst_port;	/**< Destination UDP port */
577
 	UDP_PORT_t	dst_port;	/**< Destination UDP port */
486
 	UINT16_t	buffer_size;	/**< UDP payload buffer size */
578
 	UINT16_t	buffer_size;	/**< UDP payload buffer size */
541
 
633
 
542
 /** Parameter block for pxenv_undi_startup() */
634
 /** Parameter block for pxenv_undi_startup() */
543
 struct s_PXENV_UNDI_STARTUP {
635
 struct s_PXENV_UNDI_STARTUP {
636
+	PXENV_STATUS_t	Status;		/**< PXE status code */
544
 } PACKED;
637
 } PACKED;
545
 
638
 
546
 typedef struct s_PXENV_UNDI_STARTUP PXENV_UNDI_STARTUP_t;
639
 typedef struct s_PXENV_UNDI_STARTUP PXENV_UNDI_STARTUP_t;

Loading…
Cancel
Save