Commit 030d3d49 authored by Martina Ferrari's avatar Martina Ferrari

Imported Upstream version 1.60

arp hostname ifconfig ipmaddr iptunnel netstat plipconfig rarp route slattach
version.h config.make config.status config.h nameif mii-tool
Notes on the GNU Translation Project
GNU is going international! The GNU Translation Project is a way to
get maintainers, translators and users all together, so GNU will
gradually become able to speak many native languages. A few packages
already provide native language translation for their messages.
If you found this `ABOUT-NLS' file inside a GNU distribution, you
may assume that the distributed package does use GNU `gettext'
internally, itself available at your nearest GNU archive site. But you
do not need to install GNU `gettext' prior to configuring, installing
or using this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
One advise in advance
If you want to exploit the full power of the GNU `gettext' package
you should configure it using
No existing implementation at this point provides so many useful
features (such as locale alias or message inheritance). It is also not
possible to provide this additional functionality on top of a catgets
Future versions of GNU `gettext' will very likely provide even more
functionality. So it might be a good idea to change to GNU `gettext'
as soon as possible.
Some GNU packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' or `gettext' functions. If neither is available, the
GNU `gettext' own library will be used. However, installers may use
special options at configuration time for changing this behaviour. The
./configure --with-gnu-gettext
./configure --disable-nls
will respectively bypass system `catgets' or `gettext' to use GNU
`gettext', or else, totally disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, configure will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-gnu-gettext
to prevent auto-detection.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations are disabled, all those available are installed together
with the package. However, the environment variable `LINGUAS' may be
set, prior to configuration, to limit the installed set. `LINGUAS'
should then contain a space separated list of two-letter codes, stating
which languages are allowed.
Using This Package
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh') or
`export LANG; LANG=de' (in `sh'). This can be done from your `.login'
or `.profile' file, once and for all. Packages which are not
internationalized will merely ignore the setting of this variable.
Translating Teams
The GNU `gettext' tool set contains *everything* maintainers need
for internationalizing their packages for messages. It also contains
quite useful tools for helping translators at localizing messages to
their native language, once a package has already been
To achieve the GNU Translation Project, we need many interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translating team has its own mailing list, courtesy of Linux
International. You may reach your translating team at the address
`', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as country codes given in
ISO 3166. The following translating teams exist, as of November 1995:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German
`de', Greek `el', Italian `it', Japanese `ja', Indonesian `in',
Norwegian `no', Persian `fa', Polish `pl', Portuguese `pt',
Russian `ru', Spanish `es', Swedish `sv', Telugu `te' and Turkish
For example, you may reach the Chinese translating team by writing to
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, Swedish people can send a message to
`', having this message body:
Keep in mind that team members should be interested in *working* at
translations, or at solving translational difficulties, rather than
merely lurking around. If your team does not exist yet and you want to
start one, please write to `'; you will
then reach the GNU coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology used in GNU. Proven linguistic skill are praised more
than programming skill, here. For the time being, please avoid
subscribing to the English team unless explicitely invited to do so.
Available Packages
Languages are not equally supported in all GNU packages. The
following matrix shows the current state of GNU internationalization,
as of November 1995. Listed are: internationalized packages, and
languages for which work is in progress, or about to start.
See note cs de en fr it ja nl no pt sv
\ .-------------------------------.
chess (1) | X / X |
clisp | X X X |
diffutils (2) | / . |
fileutils | . / |
flex (3) | / . |
m4 | - / - - . - |
gettext | X / X X X |
ptx | - / - - |
recode | - / - - - |
sh-utils | . / . |
sharutils | X / X X X X X |
tar | X / X - X X |
textutils | . / . |
wdiff | - - / - - |
cs de en fr it ja nl no pt sv
The interpretation legend and notes are:
There is no PO file, this package merely defaults to this language.
The effort of localizing this package has been undertaken by
someone, or by a translating team, and work is, or should be in
A PO file for this package and this language is completed and is
currently available in a pretest release, or is all ready for
inclusion in the next release of this package.
The localization of this package to this particular language is
fully completed, and now distributed through an official release.
This package is translated to specific languages by methods
predating GNU `gettext'. Translations are all kept on disk files,
and sources contain numbers where one normally expects strings.
This package is planned to switch to GNU `gettext'. For the time
being, it uses temporary means for internationalization.
This package has its translatable strings marked, but does not use
GNU `gettext'. A convenience patch may be available separately.
If November 1995 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.
This diff is collapsed.
Please read the file `README' before you start with the installation of the
cd /usr/src ; tar xvzf net-tools*.tar.gz
less Makefile ; make config ; make ; make -n install ; make install
First of all change into the net-tools directory.
Before you start with the Installation please have a look into the toplevel
Makefile. There are some configuration options with explanations.
To configure the compilation use "make config". The default answers should
be safe for all configurations. If you have kernel 2.2 and glibc 2.1 most
of the other options should work as well.
To compile simply use "make".
There should be no warnings or errors.
If you want to install the binaries use "make install".
This will generate backups of your old binaries. If you dont want the
backups, please use "make update" instead. To change the default permissions
and ownerships of the installed binaries and manpages edit the Makefile. You
can test the Installation with "make -n install". This will tell make: Don't
run any commands, just print them.
Bernd 'eckes' Eckenfels
# Makefile Main Makefile for the net-tools Package
# NET-TOOLS A collection of programs that form the base set of the
# NET-3 Networking Distribution for the LINUX operating
# system.
# Version: 2001-02-13
# Author: Bernd Eckenfels <>
# Copyright 1995-1996 Bernd Eckenfels, Germany
# URLs:
# Based on: Fred N. van Kempen, <>
# Copyright 1988-1993 MicroWalt Corporation
# Modifications:
# Extensively modified from 01/21/94 onwards by
# Alan Cox <>
# Copyright 1993-1994 Swansea University Computer Society
# Be careful!
# This Makefile doesn't describe complete dependencies for all include files.
# If you change include files you might need to do make clean.
# {1.20} Bernd Eckenfels: Even more modifications for the new
# package layout
# {1.21} Bernd Eckenfels: Check if is newer than
# config.status
# {1.22} Bernd Eckenfels: Include ypdomainname and nisdomainame
# 1.3.50-BETA6 private Release
#960125 {1.23} Bernd Eckenfels: Peter Tobias' rewrite for
# makefile-based installation
# 1.3.50-BETA6a private Release
#960201 {1.24} Bernd Eckenfels: net-features.h added
#960201 1.3.50-BETA6b private Release
#960203 1.3.50-BETA6c private Release
#960204 1.3.50-BETA6d private Release
#960204 {1.25} Bernd Eckenfels: DISTRIBUTION added
#960205 1.3.50-BETA6e private Release
#960206 {1.26} Bernd Eckenfels: afrt.o removed (cleaner solution)
#960215 1.3.50-BETA6f Release
#960216 {1.30} Bernd Eckenfels: net-lib support
#960322 {1.31} Bernd Eckenfels: moveable netlib, TOPDIR
#960424 {1.32} Bernd Eckenfels: included the URLs in the Comment
#960514 1.31-alpha release
#960518 {1.33} Bernd Eckenfels: -I/usr/src/linux/include comment added
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at
# your option) any later version.
# set the base of the Installation
# BASEDIR = /mnt
# path to the net-lib support library. Default: lib
NET_LIB_NAME = net-tools
PROGS := ifconfig hostname arp netstat route rarp slattach plipconfig nameif
-include config.make
ifeq ($(HAVE_IP_TOOLS),1)
PROGS += iptunnel ipmaddr
ifeq ($(HAVE_MII),1)
PROGS += mii-tool
# Compiler and Linker Options
# You may need to uncomment and edit these if you are using libc5 and IPv6.
COPTS = -D_GNU_SOURCE -O2 -Wall -g # -I/usr/inet6/include
ifeq ($(origin LOPTS), undefined)
RESLIB = # -L/usr/inet6/lib -linet6
ifeq ($(HAVE_AFDECnet),1)
DNLIB = -ldnet
# -------- end of user definitions --------
RELEASE = 1.60
ifeq ("$(NET_LIB_PATH)","lib2")
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
CFLAGS = $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
ifeq ($(origin CC), undefined)
CC = gcc
LD = $(CC)
%.o: %.c config.h version.h intl.h net-features.h $<
$(CC) $(CFLAGS) -c $<
all: config.h version.h subdirs $(PROGS)
config: cleanconfig config.h
install: all savebin installbin installdata
update: all installbin installdata
rm -f *.o DEADJOE *~ *.orig lib/*.o
clean: mostlyclean
rm -f $(PROGS)
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done
@cd po && $(MAKE) clean
rm -f config.h
clobber: clean
rm -f $(PROGS) config.h version.h config.status config.make
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done
dist: clobber
@echo Creating net-tools-$(RELEASE) in ..
@tar -cvz -f ../net-tools-$(RELEASE).tar.gz -C .. net-tools
config.h: Makefile
@echo "Configuring the Linux net-tools (NET-3 Base Utilities)..." ; echo
@if [ config.status -nt ]; \
then ./ config.status; \
else ./; \
version.h: Makefile
@echo "#define RELEASE \"net-tools $(RELEASE)\"" >version.h
$(NET_LIB): config.h version.h intl.h libdir
i18n.h: i18ndir
@$(MAKE) -C po
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
ifconfig: $(NET_LIB) ifconfig.o
$(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB)
nameif: nameif.o
$(CC) $(LDFLAGS) -o nameif nameif.o
hostname: hostname.o
$(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB)
route: $(NET_LIB) route.o
$(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB)
arp: $(NET_LIB) arp.o
$(CC) $(LDFLAGS) -o arp arp.o $(NLIB) $(RESLIB)
rarp: $(NET_LIB) rarp.o
$(CC) $(LDFLAGS) -o rarp rarp.o $(NLIB)
slattach: $(NET_LIB) slattach.o
$(CC) $(LDFLAGS) -o slattach slattach.o $(NLIB)
plipconfig: $(NET_LIB) plipconfig.o
$(CC) $(LDFLAGS) -o plipconfig plipconfig.o $(NLIB)
netstat: $(NET_LIB) netstat.o statistics.o
$(CC) $(LDFLAGS) -o netstat netstat.o statistics.o $(NLIB) $(RESLIB)
iptunnel: $(NET_LIB) iptunnel.o
$(CC) $(LDFLAGS) -o iptunnel iptunnel.o $(NLIB) $(RESLIB)
ipmaddr: $(NET_LIB) ipmaddr.o
$(CC) $(LDFLAGS) -o ipmaddr ipmaddr.o $(NLIB) $(RESLIB)
mii-tool: mii-tool.o
$(CC) $(LDFLAGS) -o mii-tool mii-tool.o
install -m 0755 -d ${BASEDIR}/sbin
install -m 0755 -d ${BASEDIR}/bin
install -m 0755 arp ${BASEDIR}/sbin
install -m 0755 hostname ${BASEDIR}/bin
install -m 0755 ifconfig ${BASEDIR}/sbin
install -m 0755 nameif ${BASEDIR}/sbin
install -m 0755 netstat ${BASEDIR}/bin
install -m 0755 plipconfig $(BASEDIR)/sbin
install -m 0755 rarp ${BASEDIR}/sbin
install -m 0755 route ${BASEDIR}/sbin
install -m 0755 slattach $(BASEDIR)/sbin
ifeq ($(HAVE_IP_TOOLS),1)
install -m 0755 ipmaddr $(BASEDIR)/sbin
install -m 0755 iptunnel $(BASEDIR)/sbin
ifeq ($(HAVE_MII),1)
install -m 0755 mii-tool $(BASEDIR)/sbin
ln -fs hostname $(BASEDIR)/bin/dnsdomainname
ln -fs hostname $(BASEDIR)/bin/ypdomainname
ln -fs hostname $(BASEDIR)/bin/nisdomainname
ln -fs hostname $(BASEDIR)/bin/domainname
ifeq ($(HAVE_AFDECnet),1)
ln -fs hostname $(BASEDIR)/bin/nodename
@for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \
${BASEDIR}/bin/netstat \
${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \
${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \
${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \
${BASEDIR}/bin/domainname ; do \
[ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved.
$(MAKE) -C man install
$(MAKE) -C po install
# End of Makefile.
Information about the net-tools package
NET-TOOLS A collection of programs that form the base set of the
NET-3 networking distribution for the Linux operating
This package includes the important tools for controlling the network
subsystem of the Linux kernel. This includes arp, hostname, ifconfig,
netstat, rarp and route. Additionally, this package contains
utilities relating to particular network hardware types (plipconfig,
slattach) and advanced aspects of IP configuration (iptunnel,
Please include the output of "program --version" when reporting bugs.
README This file.
README.ipv6 Notes for people hacking IPv6.
INSTALLING Installation instructions.
COPYING Your free copy of the GNU Public License.
TODO Some things that need to be done.
This is net-tools 1.60.
You need kernel 2.0 or later to use these programs. These programs
should compile cleanly with both glibc (version 2.0 or 2.1) and libc5,
though support for libc5 is not well tested.
The NLS support was changed from catgets to GNU gettext by Arnaldo
Carvalho de Melo <> in June, 1998, to make the
source more readable. Translations to brazilian portuguese (pt_BR),
German (de), Estonian (ee), Czech (cz) and French (fr) are available.
Others are welcome!
route/netstat -r do not yet support different address families
cleanly. IPX/DDP/AX25 people, please feel free to add the code.
ifconfig now supports changing media types for interfaces. This requires
a version 2.2 kernel, and many devices do not support it yet.
The tools now support the layout of the 2.2 kernel /proc files (Bernd
Some configuration options require kernel version 2.2 and/or
particular versions of the C library. The defaults should be safe for
all common environments but some of the more esoteric hardware and
protocol families may be more touchy. Feel free to send patches if
you have problems.
Phil Blundell
Bernd Eckenfels
Notes for IPv6
If you are using libc5, you may need to edit the Makefile so that
libinet6 is linked in and your IPv6 include files are found in the
right place. The definitions in question are at about line 91. You may
also find that the header files provided with inet6-apps are not exactly
what net-tools expects. This is not a bug in net-tools as such and will
not be fixed in future releases (though if anybody would like to contribute
a patch I would be happy to add a pointer to it here.) If you have the
option you might consider changing to glibc instead (see below) in which
case you can use the header files supplied with the C library.
If you use glibc, you should ensure that you have version 2.1 or later
installed. The 2.1 release is available from
< among> other places. With this
version of the C library there should be no need to edit the Makefile
or apply any patches to net-tools.
Version 2.0 of glibc has no support for IPv6; patches did exist at one
point but they are now seriously outdated. Instead you should upgrade
to glibc 2.1.
"ifconfig eth0 add ..." does not currently auto-load the IPv6 module.
This directory contains some files that may be of use to people who want
to build a net-tools RPM.
diff -C 2 -P net-tools/config.h net-tools-new/config.h
*** net-tools/config.h Wed Dec 31 18:00:00 1969
--- net-tools-new/config.h Fri Feb 27 20:21:30 1998
*** 0 ****
--- 1,40 ----
+ /*
+ * config.h Automatically generated configuration includefile
+ *
+ * NET-TOOLS A collection of programs that form the base set of the
+ * NET-3 Networking Distribution for the LINUX operating
+ * system.
+ *
+ *
+ * Version: Generated from " 1.04 (96-04-24)"
+ */
+ /*
+ *
+ * Protocol Families.
+ *
+ */
+ #define HAVE_AFUNIX 1
+ #define HAVE_AFINET 1
+ #define HAVE_AFINET6 0
+ #define HAVE_AFIPX 1
+ #define HAVE_AFATALK 1
+ #define HAVE_AFAX25 1
+ #define HAVE_AFNETROM 1
+ /*
+ *
+ * Device Hardware types.
+ *
+ */
+ #define HAVE_HWETHER 1
+ #define HAVE_HWARC 1
+ #define HAVE_HWSLIP 1
+ #define HAVE_HWPPP 1
+ #define HAVE_HWTUNNEL 1
+ #define HAVE_HWTR 1
+ #define HAVE_HWAX25 1
+ #define HAVE_HWNETROM 1
+ #define HAVE_HWFR 1
+ #define HAVE_HWSIT 0
Summary: Basic Networking Tools
Name: net-tools
Version: 1.50
Release: 1
Copyright: GPL
Group: Networking/Admin
Patch0: net-tools-1.45-config.patch
BuildRoot: /var/tmp/%{name}-root
This is a collection of the basic tools necessary for setting up networking
on a Linux machine. It includes ifconfig, route, netstat, rarp, and
various other tools.
%setup -q
%patch0 -p1 -b .config
mkdir -p $RPM_BUILD_ROOT/bin
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/usr/man/man1
mkdir -p $RPM_BUILD_ROOT/usr/man/man5
mkdir -p $RPM_BUILD_ROOT/usr/man/man8
( cd $RPM_BUILD_ROOT/sbin
strip arp ifconfig rarp route slattach plipconfig ipmaddr iptunnel
cd ../bin