diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-26 16:38:00 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-26 16:38:00 -0400 |
| commit | 97d5c458cfa039d857301e1ca7d5af3beb37131d (patch) | |
| tree | b460cd850d0537eb71806ba30358840377b27688 /static/inferno/man2/tftp.2 | |
| parent | b89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff) | |
build: Better Build System
Diffstat (limited to 'static/inferno/man2/tftp.2')
| -rw-r--r-- | static/inferno/man2/tftp.2 | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/static/inferno/man2/tftp.2 b/static/inferno/man2/tftp.2 new file mode 100644 index 00000000..d5a2a236 --- /dev/null +++ b/static/inferno/man2/tftp.2 @@ -0,0 +1,54 @@ +.TH TFTP 2 +.SH NAME +tftp \- Trivial File Transfer Protocol +.SH SYNOPSIS +.EX +tftp := 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 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. +.PP +.B Init +must be called once before using any other function of the module. +If +.I progress +is non-zero, +.B receive +will 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 Receive +attempts to fetch the contents of +.I filename +from +.I host +and writes the blocks of data to +.I 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, +.I fd +is typically open on the +.B kexec +file of +.IR boot (3). +.SH SOURCE +.B /appl/lib/tftp.b +.SH SEE ALSO +.IR ip (2), +.IR bootpd (8) |
