8 * Copyright (C) 2004 Michael Brown <mbrown@fensystems.co.uk>.
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or any later version.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 FILE_LICENCE ( GPL2_OR_LATER );
32 #include <ipxe/uaccess.h>
34 #include <ipxe/tftp.h>
35 #include <ipxe/iobuf.h>
36 #include <ipxe/xfer.h>
37 #include <ipxe/open.h>
38 #include <ipxe/process.h>
41 /** A PXE TFTP connection */
42 struct pxe_tftp_connection {
43 /** Data transfer interface */
44 struct interface xfer;
47 /** Size of data buffer */
49 /** Starting offset of data buffer */
53 /** Maximum file position */
59 /** Overall return status code */
64 * Close PXE TFTP connection
66 * @v pxe_tftp PXE TFTP connection
67 * @v rc Final status code
69 static void pxe_tftp_close ( struct pxe_tftp_connection *pxe_tftp, int rc ) {
70 intf_shutdown ( &pxe_tftp->xfer, rc );
75 * Check flow control window
77 * @v pxe_tftp PXE TFTP connection
78 * @ret len Length of window
80 static size_t pxe_tftp_xfer_window ( struct pxe_tftp_connection *pxe_tftp ) {
82 return pxe_tftp->blksize;
88 * @v pxe_tftp PXE TFTP connection
90 * @v meta Transfer metadata
91 * @ret rc Return status code
93 static int pxe_tftp_xfer_deliver ( struct pxe_tftp_connection *pxe_tftp,
94 struct io_buffer *iobuf,
95 struct xfer_metadata *meta ) {
96 size_t len = iob_len ( iobuf );
99 /* Calculate new buffer position */
100 if ( meta->flags & XFER_FL_ABS_OFFSET )
101 pxe_tftp->offset = 0;
102 pxe_tftp->offset += meta->offset;
104 /* Copy data block to buffer */
106 /* No data (pure seek); treat as success */
107 } else if ( pxe_tftp->offset < pxe_tftp->start ) {
108 DBG ( " buffer underrun at %zx (min %zx)",
109 pxe_tftp->offset, pxe_tftp->start );
111 } else if ( ( pxe_tftp->offset + len ) >
112 ( pxe_tftp->start + pxe_tftp->size ) ) {
113 DBG ( " buffer overrun at %zx (max %zx)",
114 ( pxe_tftp->offset + len ),
115 ( pxe_tftp->start + pxe_tftp->size ) );
118 copy_to_user ( pxe_tftp->buffer,
119 ( pxe_tftp->offset - pxe_tftp->start ),
123 /* Calculate new buffer position */
124 pxe_tftp->offset += len;
126 /* Record maximum offset as the file size */
127 if ( pxe_tftp->max_offset < pxe_tftp->offset )
128 pxe_tftp->max_offset = pxe_tftp->offset;
130 /* Terminate transfer on error */
132 pxe_tftp_close ( pxe_tftp, rc );
138 /** PXE TFTP connection interface operations */
139 static struct interface_operation pxe_tftp_xfer_ops[] = {
140 INTF_OP ( xfer_deliver, struct pxe_tftp_connection *,
141 pxe_tftp_xfer_deliver ),
142 INTF_OP ( xfer_window, struct pxe_tftp_connection *,
143 pxe_tftp_xfer_window ),
144 INTF_OP ( intf_close, struct pxe_tftp_connection *, pxe_tftp_close ),
147 /** PXE TFTP connection interface descriptor */
148 static struct interface_descriptor pxe_tftp_xfer_desc =
149 INTF_DESC ( struct pxe_tftp_connection, xfer, pxe_tftp_xfer_ops );
151 /** The PXE TFTP connection */
152 static struct pxe_tftp_connection pxe_tftp = {
153 .xfer = INTF_INIT ( pxe_tftp_xfer_desc ),
157 * Maximum length of a PXE TFTP URI
159 * The PXE TFTP API provides 128 characters for the filename; the
160 * extra 128 bytes allow for the remainder of the URI.
162 #define PXE_TFTP_URI_LEN 256
165 * Open PXE TFTP connection
167 * @v ipaddress IP address
168 * @v port TFTP server port
169 * @v filename File name
170 * @v blksize Requested block size
171 * @ret rc Return status code
173 static int pxe_tftp_open ( uint32_t ipaddress, unsigned int port,
174 const unsigned char *filename, size_t blksize,
176 char uri_string[PXE_TFTP_URI_LEN];
177 struct in_addr address;
180 /* Reset PXE TFTP connection structure */
181 memset ( &pxe_tftp, 0, sizeof ( pxe_tftp ) );
182 intf_init ( &pxe_tftp.xfer, &pxe_tftp_xfer_desc, NULL );
183 if ( blksize < TFTP_DEFAULT_BLKSIZE )
184 blksize = TFTP_DEFAULT_BLKSIZE;
185 pxe_tftp.blksize = blksize;
186 pxe_tftp.rc = -EINPROGRESS;
188 /* Construct URI string */
189 address.s_addr = ipaddress;
191 port = htons ( TFTP_PORT );
192 snprintf ( uri_string, sizeof ( uri_string ), "tftp%s://%s:%d%s%s",
193 sizeonly ? "size" : "", inet_ntoa ( address ),
194 ntohs ( port ), ( ( filename[0] == '/' ) ? "" : "/" ),
196 DBG ( " %s", uri_string );
198 /* Open PXE TFTP connection */
199 if ( ( rc = xfer_open_uri_string ( &pxe_tftp.xfer,
200 uri_string ) ) != 0 ) {
201 DBG ( " could not open (%s)\n", strerror ( rc ) );
211 * @v tftp_open Pointer to a struct s_PXENV_TFTP_OPEN
212 * @v s_PXENV_TFTP_OPEN::ServerIPAddress TFTP server IP address
213 * @v s_PXENV_TFTP_OPEN::GatewayIPAddress Relay agent IP address, or 0.0.0.0
214 * @v s_PXENV_TFTP_OPEN::FileName Name of file to open
215 * @v s_PXENV_TFTP_OPEN::TFTPPort TFTP server UDP port
216 * @v s_PXENV_TFTP_OPEN::PacketSize TFTP blksize option to request
217 * @ret #PXENV_EXIT_SUCCESS File was opened
218 * @ret #PXENV_EXIT_FAILURE File was not opened
219 * @ret s_PXENV_TFTP_OPEN::Status PXE status code
220 * @ret s_PXENV_TFTP_OPEN::PacketSize Negotiated blksize
221 * @err #PXENV_STATUS_TFTP_INVALID_PACKET_SIZE Requested blksize too small
223 * Opens a TFTP connection for downloading a file a block at a time
224 * using pxenv_tftp_read().
226 * If s_PXENV_TFTP_OPEN::GatewayIPAddress is 0.0.0.0, normal IP
227 * routing will take place. See the relevant
228 * @ref pxe_routing "implementation note" for more details.
230 * On x86, you must set the s_PXE::StatusCallout field to a nonzero
231 * value before calling this function in protected mode. You cannot
232 * call this function with a 32-bit stack segment. (See the relevant
233 * @ref pxe_x86_pmode16 "implementation note" for more details.)
235 * @note According to the PXE specification version 2.1, this call
236 * "opens a file for reading/writing", though how writing is to be
237 * achieved without the existence of an API call %pxenv_tftp_write()
240 * @note Despite the existence of the numerous statements within the
241 * PXE specification of the form "...if a TFTP/MTFTP or UDP connection
242 * is active...", you cannot use pxenv_tftp_open() and
243 * pxenv_tftp_read() to read a file via MTFTP; only via plain old
244 * TFTP. If you want to use MTFTP, use pxenv_tftp_read_file()
245 * instead. Astute readers will note that, since
246 * pxenv_tftp_read_file() is an atomic operation from the point of
247 * view of the PXE API, it is conceptually impossible to issue any
248 * other PXE API call "if an MTFTP connection is active".
250 static PXENV_EXIT_t pxenv_tftp_open ( struct s_PXENV_TFTP_OPEN *tftp_open ) {
253 DBG ( "PXENV_TFTP_OPEN" );
255 /* Guard against callers that fail to close before re-opening */
256 pxe_tftp_close ( &pxe_tftp, 0 );
258 /* Open connection */
259 if ( ( rc = pxe_tftp_open ( tftp_open->ServerIPAddress,
262 tftp_open->PacketSize,
264 tftp_open->Status = PXENV_STATUS ( rc );
265 return PXENV_EXIT_FAILURE;
268 /* Wait for OACK to arrive so that we have the block size */
269 while ( ( ( rc = pxe_tftp.rc ) == -EINPROGRESS ) &&
270 ( pxe_tftp.max_offset == 0 ) ) {
273 pxe_tftp.blksize = xfer_window ( &pxe_tftp.xfer );
274 tftp_open->PacketSize = pxe_tftp.blksize;
275 DBG ( " blksize=%d", tftp_open->PacketSize );
277 /* EINPROGRESS is normal; we don't wait for the whole transfer */
278 if ( rc == -EINPROGRESS )
281 tftp_open->Status = PXENV_STATUS ( rc );
282 return ( rc ? PXENV_EXIT_FAILURE : PXENV_EXIT_SUCCESS );
288 * @v tftp_close Pointer to a struct s_PXENV_TFTP_CLOSE
289 * @ret #PXENV_EXIT_SUCCESS File was closed successfully
290 * @ret #PXENV_EXIT_FAILURE File was not closed
291 * @ret s_PXENV_TFTP_CLOSE::Status PXE status code
294 * Close a connection previously opened with pxenv_tftp_open(). You
295 * must have previously opened a connection with pxenv_tftp_open().
297 * On x86, you must set the s_PXE::StatusCallout field to a nonzero
298 * value before calling this function in protected mode. You cannot
299 * call this function with a 32-bit stack segment. (See the relevant
300 * @ref pxe_x86_pmode16 "implementation note" for more details.)
302 static PXENV_EXIT_t pxenv_tftp_close ( struct s_PXENV_TFTP_CLOSE *tftp_close ) {
303 DBG ( "PXENV_TFTP_CLOSE" );
305 pxe_tftp_close ( &pxe_tftp, 0 );
306 tftp_close->Status = PXENV_STATUS_SUCCESS;
307 return PXENV_EXIT_SUCCESS;
313 * @v tftp_read Pointer to a struct s_PXENV_TFTP_READ
314 * @v s_PXENV_TFTP_READ::Buffer Address of data buffer
315 * @ret #PXENV_EXIT_SUCCESS Data was read successfully
316 * @ret #PXENV_EXIT_FAILURE Data was not read
317 * @ret s_PXENV_TFTP_READ::Status PXE status code
318 * @ret s_PXENV_TFTP_READ::PacketNumber TFTP packet number
319 * @ret s_PXENV_TFTP_READ::BufferSize Length of data written into buffer
321 * Reads a single packet from a connection previously opened with
322 * pxenv_tftp_open() into the data buffer pointed to by
323 * s_PXENV_TFTP_READ::Buffer. You must have previously opened a
324 * connection with pxenv_tftp_open(). The data written into
325 * s_PXENV_TFTP_READ::Buffer is just the file data; the various
326 * network headers have already been removed.
328 * The buffer must be large enough to contain a packet of the size
329 * negotiated via the s_PXENV_TFTP_OPEN::PacketSize field in the
330 * pxenv_tftp_open() call. It is worth noting that the PXE
331 * specification does @b not require the caller to fill in
332 * s_PXENV_TFTP_READ::BufferSize before calling pxenv_tftp_read(), so
333 * the PXE stack is free to ignore whatever value the caller might
334 * place there and just assume that the buffer is large enough. That
335 * said, it may be worth the caller always filling in
336 * s_PXENV_TFTP_READ::BufferSize to guard against PXE stacks that
337 * mistake it for an input parameter.
339 * The length of the TFTP data packet will be returned via
340 * s_PXENV_TFTP_READ::BufferSize. If this length is less than the
341 * blksize negotiated via s_PXENV_TFTP_OPEN::PacketSize in the call to
342 * pxenv_tftp_open(), this indicates that the block is the last block
343 * in the file. Note that zero is a valid length for
344 * s_PXENV_TFTP_READ::BufferSize, and will occur when the length of
345 * the file is a multiple of the blksize.
347 * The PXE specification doesn't actually state that calls to
348 * pxenv_tftp_read() will return the data packets in strict sequential
349 * order, though most PXE stacks will probably do so. The sequence
350 * number of the packet will be returned in
351 * s_PXENV_TFTP_READ::PacketNumber. The first packet in the file has
352 * a sequence number of one, not zero.
354 * To guard against flawed PXE stacks, the caller should probably set
355 * s_PXENV_TFTP_READ::PacketNumber to one less than the expected
356 * returned value (i.e. set it to zero for the first call to
357 * pxenv_tftp_read() and then re-use the returned s_PXENV_TFTP_READ
358 * parameter block for subsequent calls without modifying
359 * s_PXENV_TFTP_READ::PacketNumber between calls). The caller should
360 * also guard against potential problems caused by flawed
361 * implementations returning the occasional duplicate packet, by
362 * checking that the value returned in s_PXENV_TFTP_READ::PacketNumber
363 * is as expected (i.e. one greater than that returned from the
364 * previous call to pxenv_tftp_read()).
366 * On x86, you must set the s_PXE::StatusCallout field to a nonzero
367 * value before calling this function in protected mode. You cannot
368 * call this function with a 32-bit stack segment. (See the relevant
369 * @ref pxe_x86_pmode16 "implementation note" for more details.)
371 static PXENV_EXIT_t pxenv_tftp_read ( struct s_PXENV_TFTP_READ *tftp_read ) {
374 DBG ( "PXENV_TFTP_READ to %04x:%04x",
375 tftp_read->Buffer.segment, tftp_read->Buffer.offset );
377 /* Read single block into buffer */
378 pxe_tftp.buffer = real_to_user ( tftp_read->Buffer.segment,
379 tftp_read->Buffer.offset );
380 pxe_tftp.size = pxe_tftp.blksize;
381 pxe_tftp.start = pxe_tftp.offset;
382 while ( ( ( rc = pxe_tftp.rc ) == -EINPROGRESS ) &&
383 ( pxe_tftp.offset == pxe_tftp.start ) )
385 pxe_tftp.buffer = UNULL;
386 tftp_read->BufferSize = ( pxe_tftp.offset - pxe_tftp.start );
387 tftp_read->PacketNumber = ++pxe_tftp.blkidx;
389 /* EINPROGRESS is normal if we haven't reached EOF yet */
390 if ( rc == -EINPROGRESS )
393 tftp_read->Status = PXENV_STATUS ( rc );
394 return ( rc ? PXENV_EXIT_FAILURE : PXENV_EXIT_SUCCESS );
398 * TFTP/MTFTP read file
400 * @v tftp_read_file Pointer to a struct s_PXENV_TFTP_READ_FILE
401 * @v s_PXENV_TFTP_READ_FILE::FileName File name
402 * @v s_PXENV_TFTP_READ_FILE::BufferSize Size of the receive buffer
403 * @v s_PXENV_TFTP_READ_FILE::Buffer Address of the receive buffer
404 * @v s_PXENV_TFTP_READ_FILE::ServerIPAddress TFTP server IP address
405 * @v s_PXENV_TFTP_READ_FILE::GatewayIPAddress Relay agent IP address
406 * @v s_PXENV_TFTP_READ_FILE::McastIPAddress File's multicast IP address
407 * @v s_PXENV_TFTP_READ_FILE::TFTPClntPort Client multicast UDP port
408 * @v s_PXENV_TFTP_READ_FILE::TFTPSrvPort Server multicast UDP port
409 * @v s_PXENV_TFTP_READ_FILE::TFTPOpenTimeOut Time to wait for first packet
410 * @v s_PXENV_TFTP_READ_FILE::TFTPReopenDelay MTFTP inactivity timeout
411 * @ret #PXENV_EXIT_SUCCESS File downloaded successfully
412 * @ret #PXENV_EXIT_FAILURE File not downloaded
413 * @ret s_PXENV_TFTP_READ_FILE::Status PXE status code
414 * @ret s_PXENV_TFTP_READ_FILE::BufferSize Length of downloaded file
416 * Downloads an entire file via either TFTP or MTFTP into the buffer
417 * pointed to by s_PXENV_TFTP_READ_FILE::Buffer.
419 * The PXE specification does not make it clear how the caller
420 * requests that MTFTP be used rather than TFTP (or vice versa). One
421 * reasonable guess is that setting
422 * s_PXENV_TFTP_READ_FILE::McastIPAddress to 0.0.0.0 would cause TFTP
423 * to be used instead of MTFTP, though it is conceivable that some PXE
424 * stacks would interpret that as "use the DHCP-provided multicast IP
425 * address" instead. Some PXE stacks will not implement MTFTP at all,
426 * and will always use TFTP.
428 * It is not specified whether or not
429 * s_PXENV_TFTP_READ_FILE::TFTPSrvPort will be used as the TFTP server
430 * port for TFTP (rather than MTFTP) downloads. Callers should assume
431 * that the only way to access a TFTP server on a non-standard port is
432 * to use pxenv_tftp_open() and pxenv_tftp_read().
434 * If s_PXENV_TFTP_READ_FILE::GatewayIPAddress is 0.0.0.0, normal IP
435 * routing will take place. See the relevant
436 * @ref pxe_routing "implementation note" for more details.
438 * It is interesting to note that s_PXENV_TFTP_READ_FILE::Buffer is an
439 * #ADDR32_t type, i.e. nominally a flat physical address. Some PXE
440 * NBPs (e.g. NTLDR) are known to call pxenv_tftp_read_file() in real
441 * mode with s_PXENV_TFTP_READ_FILE::Buffer set to an address above
442 * 1MB. This means that PXE stacks must be prepared to write to areas
443 * outside base memory. Exactly how this is to be achieved is not
444 * specified, though using INT 15,87 is as close to a standard method
445 * as any, and should probably be used. Switching to protected-mode
446 * in order to access high memory will fail if pxenv_tftp_read_file()
447 * is called in V86 mode; it is reasonably to expect that a V86
448 * monitor would intercept the relatively well-defined INT 15,87 if it
449 * wants the PXE stack to be able to write to high memory.
451 * Things get even more interesting if pxenv_tftp_read_file() is
452 * called in protected mode, because there is then absolutely no way
453 * for the PXE stack to write to an absolute physical address. You
454 * can't even get around the problem by creating a special "access
455 * everything" segment in the s_PXE data structure, because the
456 * #SEGDESC_t descriptors are limited to 64kB in size.
458 * Previous versions of the PXE specification (e.g. WfM 1.1a) provide
459 * a separate API call, %pxenv_tftp_read_file_pmode(), specifically to
460 * work around this problem. The s_PXENV_TFTP_READ_FILE_PMODE
461 * parameter block splits s_PXENV_TFTP_READ_FILE::Buffer into
462 * s_PXENV_TFTP_READ_FILE_PMODE::BufferSelector and
463 * s_PXENV_TFTP_READ_FILE_PMODE::BufferOffset, i.e. it provides a
464 * protected-mode segment:offset address for the data buffer. This
465 * API call is no longer present in version 2.1 of the PXE
468 * Etherboot makes the assumption that s_PXENV_TFTP_READ_FILE::Buffer
469 * is an offset relative to the caller's data segment, when
470 * pxenv_tftp_read_file() is called in protected mode.
472 * On x86, you must set the s_PXE::StatusCallout field to a nonzero
473 * value before calling this function in protected mode. You cannot
474 * call this function with a 32-bit stack segment. (See the relevant
475 * @ref pxe_x86_pmode16 "implementation note" for more details.)
477 PXENV_EXIT_t pxenv_tftp_read_file ( struct s_PXENV_TFTP_READ_FILE
481 DBG ( "PXENV_TFTP_READ_FILE to %08x+%x", tftp_read_file->Buffer,
482 tftp_read_file->BufferSize );
485 if ( ( rc = pxe_tftp_open ( tftp_read_file->ServerIPAddress, 0,
486 tftp_read_file->FileName, 0, 0 ) ) != 0 ) {
487 tftp_read_file->Status = PXENV_STATUS ( rc );
488 return PXENV_EXIT_FAILURE;
491 /* Read entire file */
492 pxe_tftp.buffer = phys_to_user ( tftp_read_file->Buffer );
493 pxe_tftp.size = tftp_read_file->BufferSize;
494 while ( ( rc = pxe_tftp.rc ) == -EINPROGRESS )
496 pxe_tftp.buffer = UNULL;
497 tftp_read_file->BufferSize = pxe_tftp.max_offset;
499 /* Close TFTP file */
500 pxe_tftp_close ( &pxe_tftp, rc );
502 tftp_read_file->Status = PXENV_STATUS ( rc );
503 return ( rc ? PXENV_EXIT_FAILURE : PXENV_EXIT_SUCCESS );
509 * @v tftp_get_fsize Pointer to a struct s_PXENV_TFTP_GET_FSIZE
510 * @v s_PXENV_TFTP_GET_FSIZE::ServerIPAddress TFTP server IP address
511 * @v s_PXENV_TFTP_GET_FSIZE::GatewayIPAddress Relay agent IP address
512 * @v s_PXENV_TFTP_GET_FSIZE::FileName File name
513 * @ret #PXENV_EXIT_SUCCESS File size was determined successfully
514 * @ret #PXENV_EXIT_FAILURE File size was not determined
515 * @ret s_PXENV_TFTP_GET_FSIZE::Status PXE status code
516 * @ret s_PXENV_TFTP_GET_FSIZE::FileSize File size
518 * Determine the size of a file on a TFTP server. This uses the
519 * "tsize" TFTP option, and so will not work with a TFTP server that
520 * does not support TFTP options, or that does not support the "tsize"
523 * The PXE specification states that this API call will @b not open a
524 * TFTP connection for subsequent use with pxenv_tftp_read(). (This
525 * is somewhat daft, since the only way to obtain the file size via
526 * the "tsize" option involves issuing a TFTP open request, but that's
529 * You cannot call pxenv_tftp_get_fsize() while a TFTP or UDP
530 * connection is open.
532 * If s_PXENV_TFTP_GET_FSIZE::GatewayIPAddress is 0.0.0.0, normal IP
533 * routing will take place. See the relevant
534 * @ref pxe_routing "implementation note" for more details.
536 * On x86, you must set the s_PXE::StatusCallout field to a nonzero
537 * value before calling this function in protected mode. You cannot
538 * call this function with a 32-bit stack segment. (See the relevant
539 * @ref pxe_x86_pmode16 "implementation note" for more details.)
541 * @note There is no way to specify the TFTP server port with this API
542 * call. Though you can open a file using a non-standard TFTP server
543 * port (via s_PXENV_TFTP_OPEN::TFTPPort or, potentially,
544 * s_PXENV_TFTP_READ_FILE::TFTPSrvPort), you can only get the size of
545 * a file from a TFTP server listening on the standard TFTP port.
546 * "Consistency" is not a word in Intel's vocabulary.
548 static PXENV_EXIT_t pxenv_tftp_get_fsize ( struct s_PXENV_TFTP_GET_FSIZE
552 DBG ( "PXENV_TFTP_GET_FSIZE" );
555 if ( ( rc = pxe_tftp_open ( tftp_get_fsize->ServerIPAddress, 0,
556 tftp_get_fsize->FileName, 0, 1 ) ) != 0 ) {
557 tftp_get_fsize->Status = PXENV_STATUS ( rc );
558 return PXENV_EXIT_FAILURE;
561 /* Wait for initial seek to arrive, and record size */
562 while ( ( ( rc = pxe_tftp.rc ) == -EINPROGRESS ) &&
563 ( pxe_tftp.max_offset == 0 ) ) {
566 tftp_get_fsize->FileSize = pxe_tftp.max_offset;
567 DBG ( " fsize=%d", tftp_get_fsize->FileSize );
569 /* EINPROGRESS is normal; we don't wait for the whole transfer */
570 if ( rc == -EINPROGRESS )
573 /* Close TFTP file */
574 pxe_tftp_close ( &pxe_tftp, rc );
576 tftp_get_fsize->Status = PXENV_STATUS ( rc );
577 return ( rc ? PXENV_EXIT_FAILURE : PXENV_EXIT_SUCCESS );
581 struct pxe_api_call pxe_tftp_api[] __pxe_api_call = {
582 PXE_API_CALL ( PXENV_TFTP_OPEN, pxenv_tftp_open,
583 struct s_PXENV_TFTP_OPEN ),
584 PXE_API_CALL ( PXENV_TFTP_CLOSE, pxenv_tftp_close,
585 struct s_PXENV_TFTP_CLOSE ),
586 PXE_API_CALL ( PXENV_TFTP_READ, pxenv_tftp_read,
587 struct s_PXENV_TFTP_READ ),
588 PXE_API_CALL ( PXENV_TFTP_READ_FILE, pxenv_tftp_read_file,
589 struct s_PXENV_TFTP_READ_FILE ),
590 PXE_API_CALL ( PXENV_TFTP_GET_FSIZE, pxenv_tftp_get_fsize,
591 struct s_PXENV_TFTP_GET_FSIZE ),