tftp := load Tftp Tftp->PATH; Tftp: module { init: fn(progress: int); receive: fn(host: string, filename: string, fd: ref Sys->FD): string; };
Init must be called once before using any other function of the module. If progress is non-zero, receive will periodically print a character as blocks are received: `.' for every 25 blocks, `S' for a sequence error, `T' for a timeout.
Receive attempts to fetch the contents of filename from host and writes the blocks of data to fd as they are received. It returns when the file transfer has completed, returning a nil string on success or a diagnostic string otherwise. When booting, fd is typically open on the kexec file of boot(3).
TFTP(2 ) | Rev: Tue Mar 31 02:42:39 GMT 2015 |