Charles.Forsyth20060303-partialeea662d19 years agoHistory
54 lines · 1.1 KB · Text
RawDownload
.TH TFTP 2.SH NAMEtftp \- Trivial File Transfer Protocol.SH SYNOPSIS.EXtftp := load Tftp Tftp->PATH;Tftp: module{   init:    fn(progress: int);   receive: fn(host: string, filename: string,               fd: ref Sys->FD): string;};.EE.SH DESCRIPTION.B Tftpfetches 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..PP.B Initmust be called once before using any other function of the module.If.I progressis non-zero,.B receivewill periodically print a character as blocks are received:.RB ` . 'for every 25 blocks,.RB ` S 'for a sequence error,.RB ` T 'for a timeout..PP.B Receiveattempts to fetch the contents of.I filenamefrom.I hostand writes the blocks of data to.I fdas they are received.It returns when the file transfer has completed,returning a nil string on success or a diagnostic string otherwise.When booting,.I fdis typically open on the.B kexecfile of.IR boot (3)..SH SOURCE.B /appl/lib/tftp.b.SH SEE ALSO.IR ip (2),.IR bootpd (8)