diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-25 01:56:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-25 01:56:23 +0200 |
commit | bac9f03ed85cb0a6887a8a7e9508e043edb792e8 (patch) | |
tree | 371bbeac46d88078636f33cbc8c50e094591063e /networking/tftp.c | |
parent | 330d898e99f048bfe256c0123b29bdd77ea7b9b4 (diff) | |
download | busybox-w32-bac9f03ed85cb0a6887a8a7e9508e043edb792e8.tar.gz busybox-w32-bac9f03ed85cb0a6887a8a7e9508e043edb792e8.tar.bz2 busybox-w32-bac9f03ed85cb0a6887a8a7e9508e043edb792e8.zip |
tftp: add comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/tftp.c')
-rw-r--r-- | networking/tftp.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index 5c50b8cec..094c3baab 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -1,7 +1,5 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* ------------------------------------------------------------------------- | 2 | /* |
3 | * tftp.c | ||
4 | * | ||
5 | * A simple tftp client/server for busybox. | 3 | * A simple tftp client/server for busybox. |
6 | * Tries to follow RFC1350. | 4 | * Tries to follow RFC1350. |
7 | * Only "octet" mode supported. | 5 | * Only "octet" mode supported. |
@@ -19,8 +17,7 @@ | |||
19 | * tftpd added by Denys Vlasenko & Vladimir Dronnikov | 17 | * tftpd added by Denys Vlasenko & Vladimir Dronnikov |
20 | * | 18 | * |
21 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 19 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
22 | * ------------------------------------------------------------------------- */ | 20 | */ |
23 | |||
24 | #include "libbb.h" | 21 | #include "libbb.h" |
25 | 22 | ||
26 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT | 23 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT |
@@ -232,6 +229,34 @@ static int tftp_protocol( | |||
232 | #endif | 229 | #endif |
233 | } | 230 | } |
234 | 231 | ||
232 | /* Examples of network traffic. | ||
233 | * Note two cases when ACKs with block# of 0 are sent. | ||
234 | * | ||
235 | * Download without options: | ||
236 | * tftp -> "\0\1FILENAME\0octet\0" | ||
237 | * "\0\3\0\1FILEDATA..." <- tftpd | ||
238 | * tftp -> "\0\4\0\1" | ||
239 | * ... | ||
240 | * Download with option of blksize 16384: | ||
241 | * tftp -> "\0\1FILENAME\0octet\0blksize\00016384\0" | ||
242 | * "\0\6blksize\00016384\0" <- tftpd | ||
243 | * tftp -> "\0\4\0\0" | ||
244 | * "\0\3\0\1FILEDATA..." <- tftpd | ||
245 | * tftp -> "\0\4\0\1" | ||
246 | * ... | ||
247 | * Upload without options: | ||
248 | * tftp -> "\0\2FILENAME\0octet\0" | ||
249 | * "\0\4\0\0" <- tftpd | ||
250 | * tftp -> "\0\3\0\1FILEDATA..." | ||
251 | * "\0\4\0\1" <- tftpd | ||
252 | * ... | ||
253 | * Upload with option of blksize 16384: | ||
254 | * tftp -> "\0\2FILENAME\0octet\0blksize\00016384\0" | ||
255 | * "\0\6blksize\00016384\0" <- tftpd | ||
256 | * tftp -> "\0\3\0\1FILEDATA..." | ||
257 | * "\0\4\0\1" <- tftpd | ||
258 | * ... | ||
259 | */ | ||
235 | block_nr = 1; | 260 | block_nr = 1; |
236 | cp = xbuf + 2; | 261 | cp = xbuf + 2; |
237 | 262 | ||