Commit 427b8998 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add Tftp to the disc based !Internet commands

A TFTP client is described in the TCP/IP Protocol Suite manual but seems to have been lost somewhere along the way, perhaps when the Internet 5 work was done? TFTP is often used to load OS images or similar boot time stuff as it's a very simple (and insecure) protocol.
Port a contemporary client from FreeBSD (circa March 2000) with a few changes to allow it to run on RISC OS.
Makefile:
  Remove the BareMinUtils option. Nothing uses it, and it wouldn't work anyway since it's missing !Run.
  Add Tftp

Tested against OpenTFTP server 1.64 running on Windows, GETting and PUTing a number of files.

Version 5.58. Tagged as 'Internet-5_58'
parent dcc5f29f
...@@ -74,6 +74,7 @@ DISCFILES= ${RDIR}.!Boot\ ...@@ -74,6 +74,7 @@ DISCFILES= ${RDIR}.!Boot\
${SDIR}.mrinfo.MRInfo\ ${SDIR}.mrinfo.MRInfo\
${SDIR}.mtrace.MTrace\ ${SDIR}.mtrace.MTrace\
${SDIR}.pong.Pong\ ${SDIR}.pong.Pong\
${SDIR}.tftp.Tftp\
${SDIR}.utils.utl.RMFind\ ${SDIR}.utils.utl.RMFind\
${RDIR}.files.AUNMap\ ${RDIR}.files.AUNMap\
${RDIR}.files.Hosts\ ${RDIR}.files.Hosts\
...@@ -92,11 +93,6 @@ FILES=\ ...@@ -92,11 +93,6 @@ FILES=\
${DISCFILES} \ ${DISCFILES} \
${STBFILES} ${STBFILES}
BAREMINUTILS = \
${SDIR}.ifconfig.IfConfig \
${SDIR}.ping.Ping \
${RDIR}.!Boot
EMERGENCYUTILS = \ EMERGENCYUTILS = \
${SDIR}.arp.ARP \ ${SDIR}.arp.ARP \
${SDIR}.ifconfig.IfConfig \ ${SDIR}.ifconfig.IfConfig \
...@@ -122,6 +118,7 @@ NETUTILS = \ ...@@ -122,6 +118,7 @@ NETUTILS = \
${SDIR}.route.Route \ ${SDIR}.route.Route \
${SDIR}.showstat.ShowStat \ ${SDIR}.showstat.ShowStat \
${SDIR}.sysctl.SysCtl \ ${SDIR}.sysctl.SysCtl \
${SDIR}.tftp.Tftp \
${SDIR}.traceroute.TraceRoute \ ${SDIR}.traceroute.TraceRoute \
${RDIR}.!Boot \ ${RDIR}.!Boot \
${LDIR}.!Run \ ${LDIR}.!Run \
...@@ -194,6 +191,7 @@ install_: ${DISCFILES} dirs ...@@ -194,6 +191,7 @@ install_: ${DISCFILES} dirs
${CP} ${SDIR}.mtrace.MTrace ${INSTAPP}.bin.MTrace ${CPFLAGS} ${CP} ${SDIR}.mtrace.MTrace ${INSTAPP}.bin.MTrace ${CPFLAGS}
${CP} ${SDIR}.pong.Pong ${INSTAPP}.bin.Pong ${CPFLAGS} ${CP} ${SDIR}.pong.Pong ${INSTAPP}.bin.Pong ${CPFLAGS}
${CP} ${SDIR}.utils.utl.RMFind ${INSTAPP}.bin.RMFind ${CPFLAGS} ${CP} ${SDIR}.utils.utl.RMFind ${INSTAPP}.bin.RMFind ${CPFLAGS}
${CP} ${SDIR}.tftp.Tftp ${INSTAPP}.bin.Tftp ${CPFLAGS}
${CP} ${SDIR}.utils.utl.CheckMem ${INSTAPP}.utils.CheckMem ${CPFLAGS} ${CP} ${SDIR}.utils.utl.CheckMem ${INSTAPP}.utils.CheckMem ${CPFLAGS}
${CP} ${SDIR}.newfiler.NewFiler ${INSTAPP}.utils.NewFiler ${CPFLAGS} ${CP} ${SDIR}.newfiler.NewFiler ${INSTAPP}.utils.NewFiler ${CPFLAGS}
${CP} ${SDIR}.utils.utl.ReadCMOSIP ${INSTAPP}.utils.ReadCMOSIP ${CPFLAGS} ${CP} ${SDIR}.utils.utl.ReadCMOSIP ${INSTAPP}.utils.ReadCMOSIP ${CPFLAGS}
...@@ -234,6 +232,7 @@ resources-NetUtils: ${NETUTILS} ...@@ -234,6 +232,7 @@ resources-NetUtils: ${NETUTILS}
${CP} ${SDIR}.sysctl.SysCtl ${RESD}.bin.SysCtl ${CPFLAGS} ${CP} ${SDIR}.sysctl.SysCtl ${RESD}.bin.SysCtl ${CPFLAGS}
${CP} ${SDIR}.showstat.ShowStat ${RESD}.bin.ShowStat ${CPFLAGS} ${CP} ${SDIR}.showstat.ShowStat ${RESD}.bin.ShowStat ${CPFLAGS}
${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute ${CPFLAGS} ${CP} ${SDIR}.traceroute.TraceRoute ${RESD}.bin.TraceRoute ${CPFLAGS}
${CP} ${SDIR}.tftp.Tftp ${RESD}.bin.Tftp ${CPFLAGS}
${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${RESD}.files.AUNMap ${AWK} -f awk.Version ${RDIR}.files.AUNMap > ${RESD}.files.AUNMap
SetType ${RESD}.files.AUNMap Obey SetType ${RESD}.files.AUNMap Obey
${CP} ${RDIR}.files.Hosts ${RESD}.files.Hosts ${CPFLAGS} ${CP} ${RDIR}.files.Hosts ${RESD}.files.Hosts ${CPFLAGS}
...@@ -267,18 +266,6 @@ resources-EmergencyUtils: ${EMERGENCYUTILS} ...@@ -267,18 +266,6 @@ resources-EmergencyUtils: ${EMERGENCYUTILS}
${AWK} -f awk.Version ${LDIR}.!Run > ${RESD}.!Run ${AWK} -f awk.Version ${LDIR}.!Run > ${RESD}.!Run
SetType ${RESD}.!Run Obey SetType ${RESD}.!Run Obey
resources-BareMinUtils: ${BAREMINUTILS}
${MKDIR} ${RESD}
${MKDIR} ${RESD}.bin
${MKDIR} ${RESD}.files
${CP} ${SDIR}.ifconfig.IfConfig ${RESD}.bin.IfConfig ${CPFLAGS}
${CP} ${SDIR}.ping.Ping ${RESD}.bin.Ping ${CPFLAGS}
${CP} ${RDIR}.files.Hosts ${RESD}.files.Hosts ${CPFLAGS}
${CP} ${RDIR}.files.Protocols ${RESD}.files.Protocols ${CPFLAGS}
${CP} ${RDIR}.files.Services ${RESD}.files.Services ${CPFLAGS}
${AWK} -f awk.Version ${RDIR}.!Boot > ${RESD}.!Boot
SetType ${RESD}.!Boot Obey
${SDIR}.arp.ARP: ${SDIR}.arp.c.ARP ${SDIR}.arp.ARP: ${SDIR}.arp.c.ARP
dir ${SDIR}.arp dir ${SDIR}.arp
@amu_machine @amu_machine
...@@ -381,6 +368,14 @@ ${SDIR}.sysctl.SysCtl: ${SDIR}.sysctl.c.SysCtl ...@@ -381,6 +368,14 @@ ${SDIR}.sysctl.SysCtl: ${SDIR}.sysctl.c.SysCtl
@up @up
@up @up
${SDIR}.tftp.Tftp: ${SDIR}.tftp.c.main \
${SDIR}.tftp.c.tftp \
${SDIR}.tftp.c.tftpsubs
dir ${SDIR}.tftp
@amu_machine
@up
@up
${SDIR}.traceroute.TraceRoute: ${SDIR}.traceroute.c.TraceRoute ${SDIR}.traceroute.TraceRoute: ${SDIR}.traceroute.c.TraceRoute
dir ${SDIR}.traceroute dir ${SDIR}.traceroute
@amu_machine @amu_machine
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
| end | end
| |
If "%*0" = "" Then Error Do not run me with no parameters If "%*0" = "" Then Error Do not run me with no parameters
If "%1" = "" Then Obey !MkMods %0 arp gethost ifconfig ifrconfig inetstat ipvars map-mbone md5 mrinfo mtrace newfiler ping pong route showstat sysctl traceroute utils If "%1" = "" Then Obey !MkMods %0 arp gethost ifconfig ifrconfig inetstat ipvars map-mbone md5 mrinfo mtrace newfiler ping pong route showstat sysctl tftp traceroute utils
If "%1" = "" Then Obey If "%1" = "" Then Obey
dir %1 dir %1
......
/* (5.57) /* (5.58)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1. * Last processed by srccommit version: 1.1.
* *
*/ */
#define Module_MajorVersion_CMHG 5.57 #define Module_MajorVersion_CMHG 5.58
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Mar 2015 #define Module_Date_CMHG 22 Jun 2016
#define Module_MajorVersion "5.57" #define Module_MajorVersion "5.58"
#define Module_Version 557 #define Module_Version 558
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "30 Mar 2015" #define Module_Date "22 Jun 2016"
#define Module_ApplicationDate "30-Mar-15" #define Module_ApplicationDate "22-Jun-16"
#define Module_ComponentName "Internet" #define Module_ComponentName "Internet"
#define Module_ComponentPath "mixed/RiscOS/Sources/SystemRes/Internet" #define Module_ComponentPath "mixed/RiscOS/Sources/SystemRes/Internet"
#define Module_FullVersion "5.57" #define Module_FullVersion "5.58"
#define Module_HelpVersion "5.57 (30 Mar 2015)" #define Module_HelpVersion "5.58 (22 Jun 2016)"
#define Module_LibraryVersionInfo "5:57" #define Module_LibraryVersionInfo "5:58"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment