[manual index][section index]


tftp - Trivial File Transfer Protocol


tftp := load Tftp Tftp->PATH;
Tftp: module
   init:    fn(progress: int);
   receive: fn(host: string, filename: string,
               fd: ref Sys->FD): string;


Tftp fetches files from an Internet TFTP server. It is typically used only to fetch kernels or configuration files when booting. Only one transfer can be active at any given time.

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).




ip(2), bootpd(8)

TFTP(2 ) Rev:  Thu Feb 15 14:43:26 GMT 2007