Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - TFTP file size limitation when using 'tftpd' obtained from QNX kernel 6.3.2 : (3 Items)
   
TFTP file size limitation when using 'tftpd' obtained from QNX kernel 6.3.2  
I am now having a issue when using binary 'tftpd' as TFTP server to transfer files . It is found that the server has a 
limitation of file size. If the file size is larger than 16MB, the TFTP server is not able to transfer it. The 'tftpd' 
binary is obtained together with QNX kernel 6.3.2.

Did anyone encounter this issue before? 

RE: TFTP file size limitation when using 'tftpd' obtained from QNX kernel 6.3.2  


>I am now having a issue when using binary 'tftpd' as TFTP server to transfer files . It is found that the server has a 
limitation of file size. If the file size is larger than 16MB, the TFTP server is not able to transfer it. The 'tftpd' 
binary is obtained together with QNX kernel 6.3.2.

> Did anyone encounter this issue before? 

This just came up internally.  I'll look at it.

-seanb

_______________________________________________
General
http://community.qnx.com/sf/go/post18259


Attachment: Text winmail.dat 2.74 KB
Re: TFTP file size limitation when using 'tftpd' obtained from QNX kernel 6.3.2  
This came up on a project using 4.25 a while back. tftp sends blocks of 500 bytes, and uses a simple acknowledgement 
protocol that numbers the blocks with a 16-bit value. Some versions use signed arithmetic internally, reducing the value
 to 15 bits. 15 bits times 500 bytes comes out to the 16mb limitation that you are seeing.

You can change the tftp and tftpd source code to use signs sensibly, giving you the full 16 bits/32mb range; this is the
 solution that we used. You could further modify the code to handle the case when the 16-bit value wraps around, giving 
you essentially unlimited file sizes. I have not tried this, but I don't think it would be hard.

Interestingly enough, this was not an issue with the QNX-supplied tftpd. We encountered it after porting the sources 
from another OS to QNX. I have not tried to see if this problem is present in the Neutrino version of tftp.

If anyone is interested, I can dig up the email where I describe this issue, and the fix, that I sent out to our project
 group. It's only changing a few lines of code in one module, as I recall.