11.4   TFTP

The Trivial File Transfer Protocol (TFTP) is implemented on top of the Internet User Datagram Protocol (UDP). VxWorks provides both a TFTP client and a TFTP server. The TFTP client is useful at boot time, when you can use it to download a VxWorks image from the boot host. The TFTP server is useful if you want to boot an X-Terminal from VxWorks. It is also useful if you want to boot another VxWorks system from a local disk.

Unlike FTP and RSH, TFTP requires no authentication; that is, the remote system does not require an account or password. The TFTP server allows only publicly readable files to be accessed. Files can be written only if they already exist and are publicly writable.

11.4.1   Host TFTP Server

Typically, the host-resident Internet daemon starts the TFTP server. For added security, some hosts (for example, Sun hosts) default to starting the TFTP server with the secure (-s) option enabled. If -s is specified, the server restricts host access by rooting all TFTP requests into the directory specified (for example, /tftpboot).

For example, if the secure option was set with -s /tftpboot, a TFTP request for the file /vxBoot/vxWorks is satisfied by the file /tftpboot/vxBoot/vxWorks rather than the expected file /vxBoot/vxWorks.

To disable the secure option on the TFTP server, edit /etc/inetd.conf and remove the -s option from the tftpd entry.

11.4.2   VxWorks TFTP Server

The TFTP server daemon is initialized by default when VxWorks is appropriately configured. The relevant configuration macro is INCLUDE_TFTP_SERVER. See the reference entry for tftpdLib.

11.4.3   VxWorks TFTP Client

Include the VxWorks TFTP client side by reconfiguring VxWorks. The relevant configuration macro is INCLUDE_TFTP_CLIENT. To boot using TFTP, specify 0x80 in the boot flags parameters. To transfer files from the TFTP host and the VxWorks client, two high-level interfaces are provided, tftpXfer( ) and tftpCopy( ). See the reference entry for tftpLib.