iPXE
Data Fields
tftp_request Struct Reference

A TFTP request. More...

Data Fields

struct refcnt refcnt
 Reference count.
struct interface xfer
 Data transfer interface.
struct uriuri
 URI being fetched.
struct interface socket
 Transport layer interface.
struct interface mc_socket
 Multicast transport layer interface.
unsigned int blksize
 Data block size.
unsigned long tsize
 File size.
unsigned int port
 Server port.
struct sockaddr_tcpip peer
 Peer address.
unsigned int flags
 Request flags.
unsigned int mtftp_timeouts
 MTFTP timeout count.
struct bitmap bitmap
 Block bitmap.
size_t filesize
 Maximum known length.
struct retry_timer timer
 Retransmission timer.

Detailed Description

A TFTP request.

This data structure holds the state for an ongoing TFTP transfer.

Definition at line 84 of file tftp.c.


Field Documentation

Reference count.

Definition at line 86 of file tftp.c.

Referenced by tftp_core_open().

Data transfer interface.

Definition at line 88 of file tftp.c.

Referenced by tftp_core_open(), tftp_done(), tftp_presize(), tftp_rx_data(), and tftp_send_rrq().

URI being fetched.

Definition at line 91 of file tftp.c.

Referenced by tftp_core_open(), tftp_free(), tftp_reopen(), and tftp_send_rrq().

Transport layer interface.

Definition at line 93 of file tftp.c.

Referenced by tftp_core_open(), tftp_done(), tftp_reopen(), tftp_send_ack(), tftp_send_error(), tftp_send_packet(), and tftp_send_rrq().

Multicast transport layer interface.

Definition at line 95 of file tftp.c.

Referenced by tftp_core_open(), tftp_done(), tftp_reopen_mc(), and tftp_timer_expired().

unsigned int tftp_request::blksize

Data block size.

This is the "blksize" option negotiated with the TFTP server. (If the TFTP server does not support TFTP options, this will default to 512).

Definition at line 103 of file tftp.c.

Referenced by tftp_core_open(), tftp_presize(), tftp_process_blksize(), tftp_rx_data(), and tftp_xfer_window().

unsigned long tftp_request::tsize

File size.

This is the value returned in the "tsize" option from the TFTP server. If the TFTP server does not support the "tsize" option, this value will be zero.

Definition at line 110 of file tftp.c.

Referenced by tftp_process_tsize(), and tftp_rx_oack().

unsigned int tftp_request::port

Server port.

This is the port to which RRQ packets are sent.

Definition at line 116 of file tftp.c.

Referenced by tftp_core_open(), tftp_reopen(), and tftp_timer_expired().

Peer address.

The peer address is determined by the first response received to the TFTP RRQ.

Definition at line 122 of file tftp.c.

Referenced by tftp_reopen(), tftp_rx(), tftp_send_ack(), tftp_send_error(), tftp_send_packet(), and tftp_timer_expired().

unsigned int tftp_request::flags

MTFTP timeout count.

Definition at line 126 of file tftp.c.

Referenced by tftp_timer_expired().

Block bitmap.

Definition at line 129 of file tftp.c.

Referenced by tftp_free(), tftp_presize(), tftp_rx_data(), tftp_send_ack(), and tftp_timer_expired().

Maximum known length.

We don't always know the file length in advance. In particular, if the TFTP server doesn't support the tsize option, or we are using MTFTP, then we don't know the file length until we see the end-of-file block (which, in the case of MTFTP, may not be the last block we see).

This value is updated whenever we obtain information about the file length.

Definition at line 141 of file tftp.c.

Referenced by tftp_presize().

Retransmission timer.

Definition at line 143 of file tftp.c.

Referenced by tftp_core_open(), tftp_done(), tftp_send_packet(), and tftp_timer_expired().


The documentation for this struct was generated from the following file: