0

I have BusyBox v1.23.2 multi-call binary. with simple tftp-client. I need to check connectivity with a tftp server and accessibility of file there. For ftp it may look like this:

if wget -q -s $url; then
            echo "found"
fi

Is there a reliable solution for tftp?

p.s. I can't try to download the file (it's too big).

Update: I solved the problem by adding hack to source code of BusyBox, which allows to implement a scenario, like that:

"No.","Source","Destination","Info" 
"1","192.168.0.8","192.168.0.6","Read Request, File: some_folder/file.txt, Transfer type: octet, blksize\\000=4096\\000, tsize\\000=0\\000" 
"2","192.168.0.6","192.168.0.8","Option Acknowledgement, blksize\\000=4096\\000, tsize\\000=10094\\000" 
"3","192.168.0.8","192.168.0.6","Error Code, Code: Not defined, Message: Connection checking"
iksajotien
  • 991
  • 18
  • 24
ltWolfik
  • 330
  • 2
  • 9

1 Answers1

-1

I guess this will work for you.

$ wget --spider http://henning.makholm.net/
Spider mode enabled. Check if remote file exists.
--2011-08-08 19:39:48--  http://henning.makholm.net/
Resolving henning.makholm.net (henning.makholm.net)... 85.81.19.235
Connecting to henning.makholm.net (henning.makholm.net)|85.81.19.235|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9535 (9.3K) [text/html]     <-------------------------
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.
terminal ninja
  • 396
  • 1
  • 11