Pārlūkot izejas kodu

Documented Preboot, TFTP and UDP data structures

tags/v0.9.3
Michael Brown 19 gadus atpakaļ
vecāks
revīzija
3503941582
1 mainītis faili ar 96 papildinājumiem un 3 dzēšanām
  1. 96
    3
      src/include/pxe_api.h

+ 96
- 3
src/include/pxe_api.h Parādīt failu

@@ -213,8 +213,7 @@ extern PXENV_EXIT_t pxenv_get_cached_info ( struct s_PXENV_GET_CACHED_INFO
213 213
 #define	PXENV_RESTART_TFTP		0x0073
214 214
 
215 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 218
 typedef struct s_PXENV_RESTART_TFTP PXENV_RESTART_TFTP_t;
220 219
 
@@ -235,6 +234,58 @@ extern PXENV_EXIT_t pxenv_restart_tftp ( struct s_PXENV_TFTP_READ_FILE
235 234
 
236 235
 /** Parameter block for pxenv_start_undi() */
237 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 289
 } PACKED;
239 290
 
240 291
 typedef struct s_PXENV_START_UNDI PXENV_START_UNDI_t;
@@ -255,6 +306,7 @@ extern PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi );
255 306
 
256 307
 /** Parameter block for pxenv_stop_undi() */
257 308
 struct s_PXENV_STOP_UNDI {
309
+	PXENV_STATUS_t Status;			/**< PXE status code */
258 310
 } PACKED;
259 311
 
260 312
 typedef struct s_PXENV_STOP_UNDI PXENV_STOP_UNDI_t;
@@ -275,6 +327,7 @@ extern PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi );
275 327
 
276 328
 /** Parameter block for pxenv_start_base() */
277 329
 struct s_PXENV_START_BASE {
330
+	PXENV_STATUS_t Status;			/**< PXE status code */
278 331
 } PACKED;
279 332
 
280 333
 typedef struct s_PXENV_START_BASE PXENV_START_BASE_t;
@@ -295,6 +348,7 @@ extern PXENV_EXIT_t pxenv_start_base ( struct s_PXENV_START_BASE *start_base );
295 348
 
296 349
 /** Parameter block for pxenv_stop_base() */
297 350
 struct s_PXENV_STOP_BASE {
351
+	PXENV_STATUS_t Status;			/**< PXE status code */
298 352
 } PACKED;
299 353
 
300 354
 typedef struct s_PXENV_STOP_BASE PXENV_STOP_BASE_t;
@@ -324,6 +378,18 @@ extern PXENV_EXIT_t pxenv_stop_base ( struct s_PXENV_STOP_BASE *stop_base );
324 378
 
325 379
 /** Parameter block for pxenv_tftp_open() */
326 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 393
 } PACKED;
328 394
 
329 395
 typedef struct s_PXENV_TFTP_OPEN PXENV_TFTP_OPEN_t;
@@ -344,6 +410,7 @@ extern PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open );
344 410
 
345 411
 /** Parameter block for pxenv_tftp_close() */
346 412
 struct s_PXENV_TFTP_CLOSE {
413
+	PXENV_STATUS_t Status;			/**< PXE status code */
347 414
 } PACKED;
348 415
 
349 416
 typedef struct s_PXENV_TFTP_CLOSE PXENV_TFTP_CLOSE_t;
@@ -364,6 +431,10 @@ extern PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close );
364 431
 
365 432
 /** Parameter block for pxenv_tftp_read() */
366 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 438
 } PACKED;
368 439
 
369 440
 typedef struct s_PXENV_TFTP_READ PXENV_TFTP_READ_t;
@@ -384,6 +455,22 @@ extern PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read );
384 455
 
385 456
 /** Parameter block for pxenv_tftp_read_file() */
386 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 474
 } PACKED;
388 475
 
389 476
 typedef struct s_PXENV_TFTP_READ_FILE PXENV_TFTP_READ_FILE_t;
@@ -405,6 +492,11 @@ extern PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
405 492
 
406 493
 /** Parameter block for pxenv_tftp_get_fsize() */
407 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 500
 } PACKED;
409 501
 
410 502
 typedef struct s_PXENV_TFTP_GET_FSIZE PXENV_TFTP_GET_FSIZE_t;
@@ -480,7 +572,7 @@ extern PXENV_EXIT_t pxenv_udp_close ( struct s_PXENV_UDP_CLOSE *udp_close );
480 572
 struct s_PXENV_UDP_WRITE {
481 573
 	PXENV_STATUS_t	Status;		/**< PXE status code */
482 574
 	IP4_t		ip;		/**< Destination IP address */
483
-	IP4_t		gw;		/**< Gateway IP address */
575
+	IP4_t		gw;		/**< Relay agent IP address */
484 576
 	UDP_PORT_t	src_port;	/**< Source UDP port */
485 577
 	UDP_PORT_t	dst_port;	/**< Destination UDP port */
486 578
 	UINT16_t	buffer_size;	/**< UDP payload buffer size */
@@ -541,6 +633,7 @@ extern PXENV_EXIT_t pxenv_udp_read ( struct s_PXENV_UDP_READ *udp_read );
541 633
 
542 634
 /** Parameter block for pxenv_undi_startup() */
543 635
 struct s_PXENV_UNDI_STARTUP {
636
+	PXENV_STATUS_t	Status;		/**< PXE status code */
544 637
 } PACKED;
545 638
 
546 639
 typedef struct s_PXENV_UNDI_STARTUP PXENV_UNDI_STARTUP_t;

Notiek ielāde…
Atcelt
Saglabāt