tftp_request Struct Reference

A TFTP request. More...


Data Fields

struct refcnt refcnt
 Reference count.
struct xfer_interface xfer
 Data transfer interface.
struct uriuri
 URI being fetched.
struct xfer_interface socket
 Transport layer interface.
struct xfer_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 64 of file tftp.c.


Field Documentation

Reference count.

Definition at line 66 of file tftp.c.

Referenced by tftp_core_open().

Data transfer interface.

Definition at line 68 of file tftp.c.

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

struct uri* tftp_request::uri [read]

URI being fetched.

Definition at line 71 of file tftp.c.

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

Multicast transport layer interface.

Definition at line 75 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 83 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 90 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 96 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 102 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 106 of file tftp.c.

Referenced by tftp_timer_expired().

Block bitmap.

Definition at line 109 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 121 of file tftp.c.

Referenced by tftp_presize().

Retransmission timer.

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

Generated on Tue Apr 6 20:02:09 2010 for gPXE by  doxygen 1.5.7.1