설명 상으로는 server_args에 넣으면 될 거 같은데
--blocksize max-block-size, -B max-block-size Specifies the maximum permitted block size. The permitted range for this parameter is from 512 to 65464. Some embedded clients request large block sizes and yet do not handle fragmented packets correctly; for these clients, it is recommended to set this value to the smallest MTU on your network minus 32 bytes (20 bytes for IP, 8 for UDP, and 4 for TFTP; less if you use IP options on your network.) For example, on a standard Ethernet (MTU 1500) a value of 1468 is reasonable. |
[링크 : https://linux.die.net/man/8/in.tftpd]
12.04 에서는 blksize 옵션이 지원안하나?
[링크 : http://askubuntu.com/questions/644031/tftpd-hpa-how-can-i-set-blksize-option]
tftpd32 for win으로 받으면 이런 로그가 뜨는데 블럭 사이즈가 1468로 늘어나 있다.
Connection received from 192.168.10.184 on port 1084 [08/11 10:59:16.826] Read request for file <tt.yaffs2>. Mode octet [08/11 10:59:16.827] OACK: <timeout=1,tsize=43625472,blksize=1468,> [08/11 10:59:16.827] Using local port 56906 [08/11 10:59:16.827] TIMEOUT waiting for Ack block #6872 [08/11 10:59:29.583] |
블럭 사이즈는 512가 기본.. 1468은 1MTU
[링크 : https://blackfin.uclinux.org/doku.php?id=setting_up_a_tftp_server]
12.04에서 man으로 보니 BSD쪽 tftpd라 표준을 따르는 듯?
TFTPD(8) BSD System Manager's Manual TFTPD(8) NAME tftpd — DARPA Trivial File Transfer Protocol server SYNOPSIS tftpd [-n] [-s] [directory ...] DESCRIPTION Tftpd is a server which supports the DARPA Trivial File Transfer Pro‐ tocol. The TFTP server operates at the port indicated in the ‘tftp’ service description; see services(5). The server is normally started by inetd(8). The use of tftp(1) does not require an account or password on the remote system. Due to the lack of authentication information, tftpd will allow only publicly readable files to be accessed. Files may be written only if they already exist and are publicly writable. Note that this extends the concept of “public” to include all users on all hosts that can be reached through the network; this may not be appro‐ priate on all systems, and its implications should be considered before enabling tftp service. The server should have the user ID with the lowest possible privilege. Access to files may be controlled by invoking tftpd with a list of directories by including pathnames as server program arguments in /etc/inetd.conf. In this case access is restricted to files whose names are prefixed by the one of the given directories. If no directo‐ ries are supplied the default is /tftpboot. To give out access to the whole filesystem, should this be desired for some reason, supply / as an argument. Unfortunately, on multi-homed systems, it is impossible for tftpd to determine the address on which a packet was received. As a result, tftpd uses two different mechanisms to guess the best source address to use for replies. If the socket that inetd(8) passed to tftpd is bound to a particular address, tftpd uses that address for replies. Otherwise, tftpd uses ``UDP connect'' to let the kernel choose the reply address based on the destination of the replies and the routing tables. This means that most setups will work transparently, while in cases where the reply address must be fixed, the virtual hosting fea‐ ture of inetd(8) can be used to ensure that replies go out from the correct address. These considerations are important, because most tftp clients will reject reply packets that appear to come from an unexpected address. The options are: -n Suppresses negative acknowledgement of requests for nonexis‐ tent relative filenames. -s All absolute filenames are treated as if they were preceded by the first directory argument, or /tftpboot if there is none. SEE ALSO tftp(1), inetd(8) HISTORY The tftpd command appeared in 4.2BSD. Linux NetKit (0.17) July 29, 2000 Linux NetKit (0.17) |
tftpd 클라이언트로 받아보니 이렇게 뜬다.
tftp> get tt.yaffs2 getting from localhost:tt.yaffs2 to tt.yaffs2 [netascii] sent RRQ <file=tt.yaffs2, mode=netascii> received DATA <block=10926, 512 bytes> discarded 2 packets received DATA <block=1, 512 bytes> sent ACK <block=1> |
RFC에 따라 512 byte가 기본인듯
물론
ubuntu 12.04 tftp 를 이용해서 tftpd32의 것을 받으니.. 여전히 512로 받는데..
클라이언트와 서버 둘다 표준을 준수하는(?) 착한 녀석들 이라 그런 듯
'프로그램 사용 > u-boot' 카테고리의 다른 글
uboot filesize 환경변수 (0) | 2016.11.17 |
---|---|
tftpd-hpa (0) | 2016.11.08 |
uboot bootargs 기본값 설정하기 (0) | 2015.02.09 |
uboot 메모리 관련 명령어 (0) | 2015.01.08 |
u-boot 포팅 가이드 (0) | 2013.08.31 |