bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inetutils-1.3.2 tftp file limit 16MB


From: Sergey Poznyakoff
Subject: Re: inetutils-1.3.2 tftp file limit 16MB
Date: Tue, 18 Dec 2001 17:31:58 +0200

Bonjour,

> Unless I missed the obvious, changing this will make it impossible
> to work with other
> since you are changing the struct size, tftp.h is an expose file and
> provided for

If we change type of tu_block from short to unsigned short this won't
change the size of struct tftphdr nor the alignment of its members.
Besides, RFC 1350 says:

"    0                   1                   2                   3
"    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
"   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"   |          Source Port          |       Destination Port        |
"   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"   |            Length             |           Checksum            |
"   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
"
"   Values of Fields
"
"   Source Port     Picked by originator of packet.
"   Dest. Port      Picked by destination machine (69 for RRQ or WRQ).
"   Length          Number of bytes in UDP packet, including UDP header.

i.e. it does not specify the signedness of Length field explicitly, 
but, as the number of bytes could not probably be negative, one may
suppose it to be unsigned.

I believe we can make it `unsigned short tu_block' without any loss
of functionality.

au revoir,
Sergey





reply via email to

[Prev in Thread] Current Thread [Next in Thread]