iPXE
Data Fields
tftp_request Struct Reference

A TFTP request. More...

Data Fields

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

Detailed Description

A TFTP request.

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

Definition at line 89 of file tftp.c.

Field Documentation

◆ refcnt

struct refcnt tftp_request::refcnt

Reference count.

Definition at line 91 of file tftp.c.

Referenced by tftp_core_open().

◆ xfer

struct interface tftp_request::xfer

Data transfer interface.

Definition at line 93 of file tftp.c.

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

◆ uri

struct uri* tftp_request::uri

URI being fetched.

Definition at line 96 of file tftp.c.

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

◆ socket

struct interface tftp_request::socket

Transport layer interface.

Definition at line 98 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().

◆ mc_socket

struct interface tftp_request::mc_socket

Multicast transport layer interface.

Definition at line 100 of file tftp.c.

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

◆ blksize

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 108 of file tftp.c.

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

◆ tsize

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 115 of file tftp.c.

Referenced by tftp_process_tsize(), and tftp_rx_oack().

◆ port

unsigned int tftp_request::port

Server port.

This is the port to which RRQ packets are sent.

Definition at line 121 of file tftp.c.

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

◆ peer

struct sockaddr_tcpip tftp_request::peer

Peer address.

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

Definition at line 127 of file tftp.c.

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

◆ flags

unsigned int tftp_request::flags

◆ mtftp_timeouts

unsigned int tftp_request::mtftp_timeouts

MTFTP timeout count.

Definition at line 131 of file tftp.c.

Referenced by tftp_timer_expired().

◆ bitmap

struct bitmap tftp_request::bitmap

Block bitmap.

Definition at line 134 of file tftp.c.

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

◆ filesize

size_t tftp_request::filesize

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 146 of file tftp.c.

Referenced by tftp_presize().

◆ timer

struct retry_timer tftp_request::timer

Retransmission timer.

Definition at line 148 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: