Server-to-client TFTP option acknowledgment

 

The Trivial File Transfer Protocol (TFTP) server sends an option acknowledgment (OACK) to a client in response to either a read request or a write request that includes additional TFTP options as described in client-to-server TFTP Read Request (RRQ) options.

An OACK that the servers sends in response to a transfer request includes only responses to requested options that the server supports. The server can also send an OACK to a client subsequently to the start of a subnet broadcast transfer. This is done to indicate to the client whether it is the master client in a subnet broadcast file group. An OACK packet that the server sends subsequently to the start of a subnet broadcast transfer includes the sbroadcast option.

Here is a list of supported options and their descriptions:

blksize

Null (0h) terminated blksize keyword that is followed by the block size that is used for this file transfer. It is represented as a null-terminated ASCII string. This is the response to a requested block size, and the value returned here can be less than the requested block size. The server determines the block size for the transfer based on the requested block size, the maximum configured block size, and possibly the subnet broadcast transfers that are already in progress.

sbroadcast

Null-terminated sbroadcast keyword that is followed by a null-terminated ASCII string that includes the following fields separated by commas:

port

The ASCII representation of the port to which the subnet-directed broadcast datagrams are broadcast. This is the well-known port that is registered with the Internet Assigned Number Authority (IANA) with the keyword of subntbcst_tftp and a decimal value of 247. This field might be empty in OACK packets that the server sends subsequently to the start of a subnet broadcast transfer.

sbid

The ASCII representation of a decimal number that is called the subnet broadcast identifier. Possible values are 0 through 4 294 967 295 (FFFFFFFFh). This is used along with the server source port to determine if a subnet-directed broadcast datagram is part of a requested transfer. This field can be empty in OACK packets that the server sends subsequently to the start of a subnet-based broadcast transfer.

mc

This is either an ASCII (31h) 1 or ASCII 0 (32h) to indicate to the client whether it is currently the master client. A value of 1 indicates that the client is the master client, and a value of 0 indicates that the client is not the master client.

In response to an OACK, the master client must send an ACK to the server. The master client sets the block number in this ACK to the number of the block before the first block that is required by the master client.

The master client acknowledges subnet broadcast data (BDATA) packets by sending an ACK to the server. The master client sets the block number in this ACK to the block before the current block that the master client requires.

Clients that are not indicated as being the master client respond to an OACK packet with an ACK that has the block number set to zero.

The block number in ACK packets is the 2-byte binary representation of the number in network byte order.

tsize

The null-terminated tsize keyword that is followed by the null-terminated ASCII representation of the decimal number that represents the file size of the requested file. The client uses this information to ensure that it has enough space to store the file and to determine the last block number of the file.

The client can also determine the file size and last block of a transfer when it receives a block that contains less data than the block size.

 

Parent topic:

TFTP Subnet Broadcast option

Related concepts
Client-to-server TFTP Read Request options