Commit 0a08c31e authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Updated version numbers in an assortment of places to 5.39

Added freebsd disclaimer to !Help
added gethost produced from sources
Deleted ANT gethost and host binaries
Added useful help to all the utilities

Version 5.39. Tagged as 'Internet-5_39'
parent d609d604
......@@ -67,8 +67,8 @@ DISCFILES= ${RDIR}.!Boot\
${RDIR}.!Run\
${RDIR}.!Sprites\
${RDIR}.!Sprites22\
${RDIR}.bin.GetHost\
${RDIR}.bin.Host\
${SDIR}.gethost.GetHost\
${SDIR}.ifrconfig.IfRConfig\
${SDIR}.map-mbone.Map-MBone\
${SDIR}.mrinfo.MRInfo\
${SDIR}.mtrace.MTrace\
......@@ -93,6 +93,7 @@ FILES=\
NETUTILS = \
${SDIR}.arp.ARP \
${SDIR}.ifrconfig.IfRConfig \
${SDIR}.ifconfig.IfConfig \
${SDIR}.inetstat.InetStat \
${SDIR}.ipvars.IPVars \
......@@ -109,9 +110,7 @@ NETUTILS = \
${RDIR}.!Boot \
${RDIR}.!Run \
${RDIR}.!Sprites \
${RDIR}.!Sprites22
# ${SDIR}.utils.utl.X \
${RDIR}.!Sprites22 \
#
# Main rules:
......@@ -135,8 +134,6 @@ install_common: ${COMMONFILES}
${CP} ${SDIR}.sysctl.SysCtl ${INSTAPP}.bin.SysCtl ${CPFLAGS}
${CP} ${SDIR}.traceroute.TraceRoute ${INSTAPP}.bin.TraceRoute ${CPFLAGS}
# ${CP} ${SDIR}.utils.utl.X ${INSTAPP}.bin.X ${CPFLAGS}
install_STB: ${STBFILES}
${MKDIR} ${INSTAPP}.files
${CP} LocalUserIFRes:!Boot ${INSTAPP}.!Boot ${CPFLAGS}
......@@ -160,6 +157,8 @@ install_: ${DISCFILES} dirs
${CP} ${RDIR}.utils ${INSTAPP}.utils ${CPFLAGS}
|
${CP} ${SDIR}.map-mbone.Map-MBone ${INSTAPP}.bin.Map-MBone ${CPFLAGS}
${CP} ${SDIR}.gethost.GetHost ${INSTAPP}.bin.GetHost ${CPFLAGS}
${CP} ${SDIR}.ifrconfig.IfRConfig ${INSTAPP}.bin.IfRConfig ${CPFLAGS}
${CP} ${SDIR}.mrinfo.MRInfo ${INSTAPP}.bin.MRInfo ${CPFLAGS}
${CP} ${SDIR}.mtrace.MTrace ${INSTAPP}.bin.MTrace ${CPFLAGS}
${CP} ${SDIR}.pong.Pong ${INSTAPP}.bin.Pong ${CPFLAGS}
......@@ -190,6 +189,7 @@ resources-NetUtils: ${NETUTILS}
${MKDIR} ${RESD}.files
${CP} ${SDIR}.arp.ARP ${RESD}.bin.ARP ${CPFLAGS}
${CP} ${SDIR}.ifconfig.IfConfig ${RESD}.bin.IfConfig ${CPFLAGS}
${CP} ${SDIR}.ifrconfig.IfRConfig ${RESD}.bin.IfRConfig ${CPFLAGS}
${CP} ${SDIR}.ipvars.IPVars ${RESD}.bin.IPVars ${CPFLAGS}
${CP} ${SDIR}.inetstat.InetStat ${RESD}.bin.InetStat ${CPFLAGS}
${CP} ${SDIR}.map-mbone.Map-MBone ${RESD}.bin.Map-MBone ${CPFLAGS}
......@@ -225,6 +225,18 @@ ${SDIR}.ifconfig.IfConfig: ${SDIR}.ifconfig.c.IfConfig
@up
@up
${SDIR}.ifrconfig.IfRConfig: ${SDIR}.ifrconfig.c.IfRConfig
dir ${SDIR}.ifrconfig
@amu_machine
@up
@up
${SDIR}.gethost.GetHost: ${SDIR}.gethost.c.gethost
dir ${SDIR}.gethost
@amu_machine
@up
@up
${SDIR}.ipvars.IPVars: ${SDIR}.ipvars.c.ipvars
dir ${SDIR}.ipvars
@amu_machine
......
|================================================================|
| Boot file for !Internet V5.00 (23rd May 1996) |
| Boot file for !Internet V5.39 (10-Jan-03) |
| |
| Copyright (C) Acorn Computers Ltd., 1996 |
|================================================================|
......
|================================================================|
| Run file for !Internet V5.33 (22nd July 1999) |
| Run file for !Internet V5.39 (10-Jan-03) |
| |
| Copyright (C) Acorn Computers Ltd., 1996 |
|================================================================|
......@@ -12,7 +12,7 @@ If "<Inet$Started>" = "Yes" THEN Obey
Unset Inet$Error
RMEnsure UtilityModule 3.50 Error This Internet application requires RISC OS 3 version 3.50 or later to run
RMEnsure UtilityModule 3.50 Error This Internet application requires RISC OS 3.50 or later to run
Run Inet:utils.CheckMem
Set System$Path_Message System resources not found. Please run !System before !Internet.
IF "<BootResources$Path>" = "" THEN Set BootResources$Path <Boot$Dir>.Resources.
......
!Internet version 5.33 (22-Jul-99)
!Internet version 5.39 (10-Jan-03)
==================================
This is the Internet resource directory. It stores
......@@ -6,4 +6,48 @@ configuration settings for the TCP/IP Protocol Suite, plus
its resources such as the Hosts and Services files.
You should use the InetSetup application to configure
Internet.
Internet in preference to changing these files manually.
Portions of the !Internet application and TCP/IP Protocol suite supplied with
your computer include software developed by the University of California,
Berkeley and its contributors. Those components come with the following
message:
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
|===============================================================|
| AUN map file for !Internet V5.00 (3rd May 1996) |
| AUN map file for !Internet V5.39 (10-Jan-03) |
| |
| This file is used if you are running AUN protocols, but have |
| enabled the full TCP/IP Protocol Suite. |
......
......@@ -12,7 +12,7 @@ Set Alias$RMIfThere SetEval Test$Eval 1|MRMEnsure %%1 0 SetEval Test$Eval 0|MIf
|
| Check for RISC OS 3.50 or later
|
RMEnsure UtilityModule 3.50 Error This AUN BootNet requires RISC OS 3 (v3.50) or later
RMEnsure UtilityModule 3.50 Error This AUN BootNet requires RISC OS 3.50 or later
Set System$Path_Message System resources not found. Please run !System before !BootNet
IF "<System$Path>" = "" THEN IfThere Boot:Resources.!System then Run Boot:Resources.!System
|
......
......@@ -24,7 +24,7 @@
| end
|
If "%*0" = "" Then Error Do not run me with no parameters
If "%1" = "" Then Obey !MkMods %0 arp ifconfig ifrconfig inetstat ipvars map-mbone mtrace newfiler ping pong route showstat sysctl traceroute utils
If "%1" = "" Then Obey !MkMods %0 arp gethost ifconfig ifrconfig inetstat ipvars map-mbone mrinfo mtrace newfiler ping pong route showstat sysctl traceroute utils
If "%1" = "" Then Obey
dir %1
......
......@@ -105,7 +105,7 @@ main(argc, argv)
#else
pid = getpid();
#endif
while ((ch = getopt(argc, argv, "andfs")) != EOF)
while ((ch = getopt(argc, argv, "andfsh")) != EOF)
switch((char)ch) {
case 'a':
dump(0);
......@@ -127,7 +127,7 @@ main(argc, argv)
usage();
file(argv[2]);
exit(0);
case '?':
case 'h':
default:
usage();
}
......@@ -461,11 +461,15 @@ my_ether_aton(char *a, u_char *n)
usage()
{
printf("usage: arp hostname\n");
printf(" arp -a [kernel] [kernel_memory]\n");
printf(" arp -d hostname\n");
printf(" arp -s hostname ether_addr [temp] [pub]\n");
printf(" arp -f filename\n");
printf("Usage: arp -a [kernel] [kernel_memory]\n");
printf(" arp -d <hostname>\n");
printf(" arp -s <hostname> <ether_addr> [temp] [pub]\n");
printf(" arp -f <filename>\n");
printf(" displays and modifies the address resolution protocol tables\n");
printf("Options: -a displays all of the current table entries\n");
printf(" -d deletes the given hostname\n");
printf(" -s create an entry for the host with the given ethernet address\n");
printf(" -f read and add multiple entries from the given filename\n");
exit(1);
}
......
| Copyright 2003 Tematic Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all
| Copyright 2003 Tematic Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd
\ No newline at end of file
# Copyright 2003 Tematic Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Generic options:
#
MKDIR = mkdir -p
AS = objasm
CC = cc
CMHG = cmhg
CP = copy
LD = link
RM = remove
WIPE = -wipe
SQUEEZE = squeeze
DEFINES = -DRISCOS_TWEAK
AFLAGS = -depend !Depend -Stamp -quit
CFLAGS = -c -depend !Depend -ffah -Wp -zps1 ${INCLUDES} ${DEFINES} ${DFLAGS}
CPFLAGS = ~cfr~v
WFLAGS = ~c~v
#
# Libraries
#
CLIB = CLIB:o.stubs
NET5LIBS = \
TCPIPLibs:o.inetlib \
TCPIPLibs:o.unixlib \
#
# Include files
#
INCLUDES = -ITCPIPLibs:,C:
DIRS = o._dirs
#
# Program specific options:
#
COMPONENT = GetHost
TARGET = GetHost
OBJS = o.GetHost
#
# Rule patterns
#
.c.o:; ${CC} ${CFLAGS} -o $@ $<
.cmhg.o:; ${CMHG} ${CMHGFLAGS} -o $@ $<
.cmhg.h:; ${CMHG} ${CMHGFLAGS} -d $@ $<
.s.o:; ${AS} ${AFLAGS} $< $@
#
# build a binary
#
all: GetHost
clean:
${WIPE} o ${WFLAGS}
${RM} GetHost
${DIRS}:
${MKDIR} o
GetHost: ${OBJS} ${NET5LIBS} ${CLIB} ${DIRS}
${LD} -o $@ ${OBJS} ${NET5LIBS} ${CLIB}
${SQUEEZE} $@
# Dynamic dependencies:
/* Copyright 2003 Tematic Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* gethost uses gethostbyname2(3) and gethostbyaddr(3) for name
and address lookups */
/* Version 0.03 */
/* 05/Jul/2002 reed@reedmedia.net */
/* 29/Mar/2002 reed@reedmedia.net */
/* This is partially based on a program sent to me
from Bruce Ediger on 20 Apr 2001 */
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "sys/types.h"
#include "netdb.h" /* gethostbyname() and related */
#include "netinet/in.h"
#include "arpa/inet.h"
#include "sys/socket.h" /* AF_INET manifest constant */
#include "sys/time.h" /* struct timeval */
int resolve_it(int addrtype, int reverse, char *hostname, int time_it);
#ifdef RISCOS_TWEAK
void showhelp(void);
#endif
float elapsed_time(struct timeval before, struct timeval after);
int main(argc, argv)
int argc;
char *argv[];
{
char *hostname = NULL;
int addrtype = AF_INET;
int rval = 0, time_it = 0, reverse = 0;
if (argc == 1) {
#ifndef RISCOS_TWEAK
fprintf (stderr, "gethost: neither action flags nor hostname given\n");
#else
showhelp();
#endif
exit(1);
}
while (*++argv) {
if (*argv[0] == '-') {
if (!strcmp(*argv, "-x")) {
reverse = 1;
continue;
}
#ifndef RISCOS_TWEAK
else if (!strcmp(*argv, "-6")) {
addrtype = AF_INET6;
continue;
}
#else
else if (!strcmp(*argv, "-help")) {
showhelp();
exit(0);
}
#endif
else if (!strcmp(*argv, "-t")) {
time_it = 1;
continue;
}
else {
fprintf (stderr, "gethost: illegal option\n");
exit(1);
}
}
hostname = (char *)malloc(strlen(*argv) + 1);
if (hostname) {
strncpy(hostname, *argv, strlen(*argv));
hostname[strlen(*argv)] = '\0';
if (strchr(hostname, ':')) {
addrtype = AF_INET6;
reverse = 1; /* assume they want a reverse lookup */
}
rval = resolve_it(addrtype, reverse, hostname, time_it);
free(hostname);
printf("\n");
/* reset to defaults */
addrtype = AF_INET;
reverse = 0;
time_it = 0;
}
else {
fprintf(stderr, "No memory\n");
exit (1);
}
}
return(rval);
}
#ifdef RISCOS_TWEAK
void showhelp(void)
{
/* Stolen from the man pages */
fprintf(stderr, "Usage: gethost [-t] [-x] <hostname>\n");
fprintf(stderr, " the gethost utility does hostname and IP lookups\n");
fprintf(stderr, "Options: -t show the elapsed time of the lookup in fractional seconds\n");
fprintf(stderr, " -x do a reverse lookup; find a hostname from an IP address\n");
}
#endif
int
resolve_it(int addrtype, int reverse, char *hostname, int time_it)
{
#ifndef RISCOS_TWEAK
union {
struct in6_addr in6;
struct in_addr in;
} addrbuf;
#else
union {
struct in_addr in6;
struct in_addr in;
} addrbuf;
#endif
char buf[128];
struct hostent *h;
int rval;
struct timeval before, after;
float et;
rval = 0; /* last error is lost -- and return value reflects last lookup */
if (reverse && 1 != inet_pton(addrtype, hostname, &addrbuf)) {
#ifndef RISCOS_TWEAK
fprintf(stderr,
"Invalid address: \"%s\" : %s\n", hostname, strerror(errno));
#else
fprintf(stderr,
"Invalid address \"%s\"\n", hostname);
#endif
rval = 2;
}
else {
if (time_it) gettimeofday(&before, NULL);
if (reverse)
h = gethostbyaddr(
addrtype == AF_INET ? (char *)&addrbuf.in : (char *)&addrbuf.in6,
addrtype == AF_INET ? sizeof(addrbuf.in) : sizeof(addrbuf.in6),
addrtype);
#ifndef RISCOS_TWEAK
else h = gethostbyname2(hostname, addrtype);
#else
/* Only do 4 byte lookups with RISC OS Internet stack */
else h = gethostbyname(hostname);
#endif
if (time_it) gettimeofday(&after, NULL);
if (h) {
int idx = 0;
printf("Hostname: %s\n", h->h_name);
while (h->h_aliases[idx])
printf("Alias: %s\n", h->h_aliases[idx++]);
switch (h->h_addrtype) {
case AF_INET:
case AF_INET6:
for (idx = 0; h->h_addr_list[idx]; ++idx) {
if (inet_ntop(addrtype, h->h_addr_list[idx], buf, sizeof(buf)))
#ifndef RISCOS_TWEAK
printf("Address: %s\n", buf);
#else
{
printf("Address: %s\n", buf);
printf(" type: %d\n", h->h_addrtype);
printf(" length: %d\n", h->h_length);
}
#endif
else { /* does this really matter? */
fprintf(stderr,
"inet_ntop() system error: %s\n", strerror(errno));
rval = 4;
}
}
break;
default:
break;
}
} else {
/* not all OSes have h_errno & hstrerror() - Solaris doesn't */
#ifndef RISCOS_TWEAK
fprintf(stderr,
"Problem looking up \"%s\": %s\n", hostname, hstrerror(h_errno));
#else
fprintf(stderr,
"Failed to look up \"%s\"\n", hostname);
#endif
rval = 3;
}
if (time_it) {
et = elapsed_time(before, after);
if (reverse) fprintf(stderr, "gethostbyaddr");
#ifndef RISCOS_TWEAK
else fprintf(stderr, "gethostbyname2");
#else
else fprintf(stderr, "gethostbyname");
#endif
fprintf(stderr, "() took %.3f seconds\n", et);
}
}
return(rval);
}
float
elapsed_time(struct timeval before, struct timeval after)
{
float r = (float)-1.0;
if (before.tv_usec > after.tv_usec)
{
after.tv_usec += 1000000;
--after.tv_sec;
}
r = ((float)after.tv_sec - (float)before.tv_sec)
+ (((float)after.tv_usec - (float)before.tv_usec)/(float)1000000.0);
return r;
}
| Copyright 2003 Tematic Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all
| Copyright 2003 Tematic Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd
\ No newline at end of file
# Copyright 2003 Tematic Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");