Commit 97914470 authored by Phil Blundell's avatar Phil Blundell

Replace outdated NLS support with GNU gettext (patch from

Arnaldo Carvalho de Melo <acme@conectiva.com.br>).  This
touches virtually every file but the changes are fairly
superficial.

Please check I haven't broken your favourite AF/hardware
type during the conversion.
parent e5129512
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
--with-gnu-gettext.
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
implementation.
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.
INSTALL Matters
===============
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
commands:
./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
internationalized.
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
`LL@li.org', 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
`tr'.
For example, you may reach the Chinese translating team by writing to
`zh@li.org'.
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
`sv-request@li.org', having this message body:
subscribe
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 `gnu-translation@prep.ai.mit.edu'; 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
progress.
`-'
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.
`X'
The localization of this package to this particular language is
fully completed, and now distributed through an official release.
(1)
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.
(2)
This package is planned to switch to GNU `gettext'. For the time
being, it uses temporary means for internationalization.
(3)
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.
......@@ -26,14 +26,9 @@ To configure the compilation use "make config".
If you have a recent Kernel you can and SHOULD answer ALL the Configuration
Options with YES. You only have to decide about the NLS:
If you don't know whether NLS is supported on your system or not, see
/usr/include/locale.h. If it exists, there is every chance that NLS is
supported. You also need the "gencat" program if you want to compile with
National Language Support.
On some BETA Releases NLS is disabled, cause the catalougs are out of sync
with the development source-tree.
If you don't know whether GNU gettext is supported on your system or not, run
msgfmt. If it exists, there is every chance that GNU gettext is
supported.
COMPILE
......
......@@ -5,7 +5,7 @@
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Version: Makefile 1.33 (1996-05-18)
# Version: Makefile 1.45 (1996-06-29)
#
# Author: Bernd Eckenfels <net-tools@lina.inka.de>
# Copyright 1995-1996 Bernd Eckebnfels, Germany
......@@ -69,15 +69,6 @@
# set the base of the Installation
# BASEDIR = /mnt
#
# DON'T CHANGE ANY of the NLS-Support definitions, it's disabled
#
# set default language (DEF_LANG) to en_US.88591 if you don't use NLS
DEF_LANG = en_US.88591
# install national language support for the following languages
# ADD_LANG = fr_FR.88591 de_DE.88591
# path to the net-lib support library. Default: lib
NET-LIB-PATH = lib
NET-LIB-NAME = support
......@@ -93,7 +84,7 @@ RESLIB = # -L/usr/inet6/lib -linet6
# -------- end of user definitions --------
MAINTAINER = Philip.Blundell@pobox.com
RELEASE = 980126
RELEASE = 980810
.EXPORT_ALL_VARIABLES:
......@@ -115,11 +106,9 @@ LD = gcc
NLIB = -l$(NET-LIB-NAME)
USE_NLS := $(shell grep -s 'define NLS 1' config.h)
MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
%.o: %.c config.h version.h net-locale.h net-features.h $<
%.o: %.c config.h version.h intl.h net-features.h $<
$(CC) $(CFLAGS) -c $<
all: config.h version.h subdirs $(PROGS)
......@@ -159,15 +148,15 @@ version.h: Makefile
@echo "#define RELEASE \"net-tools $(RELEASE)\"" >version.h
$(NET-LIB): config.h version.h net-locale.h libdir
$(NET-LIB): config.h version.h intl.h libdir
net-locale.h: nlsdir
i18n.h: i18ndir
libdir:
@$(MAKE) -C $(NET-LIB-PATH) $(MDEFINES)
nlsdir:
@$(MAKE) -C nls
i18ndir:
@$(MAKE) -C po
subdirs:
@for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
......@@ -191,12 +180,14 @@ netstat: $(NET-LIB) netstat.o statistics.o interface.o sockets.o
$(CC) $(LDFLAGS) -o netstat netstat.o statistics.o interface.o sockets.o $(NLIB) $(RESLIB)
installbin:
install -o root -g root -m 0755 arp ${BASEDIR}/sbin
install -o root -g root -m 0755 ifconfig ${BASEDIR}/sbin
install -o root -g root -m 0755 netstat ${BASEDIR}/bin
install -o root -g root -m 0755 rarp ${BASEDIR}/sbin
install -o root -g root -m 0755 route ${BASEDIR}/sbin
install -o root -g root -m 0755 hostname ${BASEDIR}/bin
install -o 0 -g 0 -m 0755 -d ${BASEDIR}/sbin
install -o 0 -g 0 -m 0755 -d ${BASEDIR}/bin
install -o 0 -g 0 -m 0755 arp ${BASEDIR}/sbin
install -o 0 -g 0 -m 0755 ifconfig ${BASEDIR}/sbin
install -o 0 -g 0 -m 0755 netstat ${BASEDIR}/bin
install -o 0 -g 0 -m 0755 rarp ${BASEDIR}/sbin
install -o 0 -g 0 -m 0755 route ${BASEDIR}/sbin
install -o 0 -g 0 -m 0755 hostname ${BASEDIR}/bin
ln -fs hostname $(BASEDIR)/bin/dnsdomainname
ln -fs hostname $(BASEDIR)/bin/ypdomainname
ln -fs hostname $(BASEDIR)/bin/nisdomainname
......@@ -213,39 +204,7 @@ savebin:
[ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved.
installdata:
install -o root -g root -m 0644 man/${DEF_LANG}/arp.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/ifconfig.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/netstat.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/rarp.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/route.8 ${BASEDIR}/usr/man/man8
install -o root -g root -m 0644 man/${DEF_LANG}/hostname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/dnsdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/ypdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/nisdomainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/domainname.1 ${BASEDIR}/usr/man/man1
install -o root -g root -m 0644 man/${DEF_LANG}/ethers.5 ${BASEDIR}/usr/man/man5
#ifneq ($(USE_NLS), "")
# if [ "${DEF_LANG}" != "en_US.88591" ]; then \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\
# install -o root -g root -m 0644 nls/${DEF_LANG}/nettools.cat ${BASEDIR}/usr/lib/locale/${DEF_LANG} ;\
# fi
# for i in $(ADD_LANG); do \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/lib/locale/$$i ;\
# install -o root -g root -m 0644 nls/$$i/nettools.cat ${BASEDIR}/usr/lib/locale/$$i ;\
# if [ -d man/$$i ]; then \
# install -o root -g root -m 0755 -d ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/arp.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/ifconfig.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/netstat.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/rarp.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/route.8 ${BASEDIR}/usr/man/$$i/man8 ;\
# install -o root -g root -m 0644 man/$$i/hostname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/dnsdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/ypdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/nisdomainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# install -o root -g root -m 0644 man/$$i/domainname.1 ${BASEDIR}/usr/man/$$i/man1 ;\
# fi ;\
# done
#endif
$(MAKE) -C man install
$(MAKE) -C po install
# End of Makefile.
......@@ -35,9 +35,14 @@ of net-tools should be 1.5.
You need kernel 2.0 or later to use these programs. These programs
should compile cleanly with either glibc or libc5.
There is no NLS support in this distribution. The files are out of date.
Unless a volunteer is found soon to maintain the translations, NLS will be
dropped altogether.
The NLS support was changed from catgets to GNU gettext by Arnaldo
Carvalho de Melo <acme@conectiva.com.br> in June, 1998, to make the
source more readable. A translation to brazilian portuguese (pt_BR) is
available and others are welcome!
If your system has no support for GNU gettext then `make install' will
probably fail in the po directory. This is harmless and can be ignored;
all the tools and manual pages are already installed at this point.
ipfw has been removed from the distribution. Use ipfwadm instead; get
it at <ftp://ftp.xos.nl/pub/linux/ipfwadm/>.
......@@ -57,5 +62,5 @@ glibc 2.0.
Phil Blundell
philb@gnu.ai.mit.edu
21st September 1997
philb@gnu.org
10th August 1998
TODO for net-tools
[ ] pt_BR man pages translation revision, it was done for net-tools 1.33...
[ ] more translations! see the contents of the po directory and ABOUT-NLS
[ ] netstat ddp support
[ ] lib/netrom_rt.c rprint should not rewind _PATH_PROCNET_NR_NEIGH
[ ] ARPHRD_METRICOM [1.3.82]
......@@ -29,5 +31,4 @@ TODO for net-tools
[ ] dummy NOARP?! (2. default route for preveting hostunreachables on linedrop)
[ ] ppp_dev_stat called for each dev in ifconfig, why? (1.3.17)
[ ] linux/include/net/br.h?
[ ] update fr/de translations (or drop NLS entirely)
[ ] get rid of local ipx.h copy
......@@ -39,7 +39,8 @@
* Typo fix (Debian Bug#5728 Giuliano Procida)
*970803 {1.81} Bernd Eckenfels : removed junk comment line 1
*970925 {1.82} Bernd Eckenfels : include fix for libc6
+980213 (1.83) Phil Blundell: set ATF_COM on new entries
*980213 (1.83) Phil Blundell: set ATF_COM on new entries
*980629 (1.84) Arnaldo Carvalho de Melo: gettext instead of catgets
*
*
* This program is free software; you can redistribute it
......@@ -67,7 +68,7 @@
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
#include "intl.h"
#define DFLT_AF "inet"
#define DFLT_HW "ether"
......@@ -75,9 +76,8 @@
#define FEATURE_ARP
#include "lib/net-features.h"
char *Release = RELEASE,
*Version = "arp 1.83 (1998-02-13)";
*Version = "arp 1.84 (1998-06-29)";
int opt_n = 0; /* do not resolve addresses */
int opt_N = 0; /* use symbolic names */
......@@ -106,7 +106,7 @@ arp_del(char **args)
/* Resolve the host name. */
if (*args == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_hostname, "arp: need host name\n"));
fprintf(stderr, _("arp: need host name\n"));
return(-1);
}
host[(sizeof host)-1] = 0;
......@@ -202,8 +202,7 @@ arp_del(char **args)
if (errno == ENXIO) {
if (flags & 1)
goto nopub;
printf(NLS_CATGETS(catfd, arpSet, arp_no_arp,
"No ARP entry for %s\n"), host);
printf(_("No ARP entry for %s\n"), host);
return(-1);
}
perror("SIOCDARP(priv)");
......@@ -216,8 +215,7 @@ nopub:
if (opt_v) fprintf(stderr,"arp: SIOCDARP(pub)\n");
if (ioctl(sockfd, SIOCDARP, &req) < 0) {
if (errno == ENXIO) {
printf(NLS_CATGETS(catfd, arpSet, arp_no_arp,
"No ARP entry for %s\n"), host);
printf(_("No ARP entry for %s\n"), host);
return(-1);
}
perror("SIOCDARP(pub)");
......@@ -268,7 +266,7 @@ arp_set(char **args)
/* Resolve the host name. */
if (*args == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_hostname, "arp: need host name\n"));
fprintf(stderr, _("arp: need host name\n"));
return(-1);
}
host[(sizeof host)-1] = 0;
......@@ -283,7 +281,7 @@ arp_set(char **args)
/* Fetch the hardware address. */
if (*args == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_need_hw, "arp: need hardware address\n"));
fprintf(stderr, _("arp: need hardware address\n"));
return(-1);
}
......@@ -292,7 +290,7 @@ arp_set(char **args)
return(-1);
} else {
if (hw->input(*args++, &req.arp_ha) < 0) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_invalidhw, "arp: invalid hardware address\n"));
fprintf(stderr, _("arp: invalid hardware address\n"));
return(-1);
}
}
......@@ -393,7 +391,7 @@ arp_file(char *name)
FILE *fp;
if ((fp = fopen(name, "r")) == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_cant_open, "arp: cannot open etherfile %s !\n"), name);
fprintf(stderr, _("arp: cannot open etherfile %s !\n"), name);
return(-1);
}
......@@ -407,17 +405,14 @@ arp_file(char *name)
argc = getargs(buff, args);
if (argc < 2) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_formaterr,
"arp: format error on line %u of etherfile %s !\n"),
fprintf(stderr, _("arp: format error on line %u of etherfile %s !\n"),
linenr, name);
continue;
}
if (arp_set(args) != 0) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_cant_set,
"arp: cannot set entry on line %u of etherfile %s !\n"),
if (arp_set(args) != 0)
fprintf(stderr, _("arp: cannot set entry on line %u of etherfile %s !\n"),
linenr, name);
}
}
(void) fclose(fp);
......@@ -438,8 +433,7 @@ arp_disp_2(char *name,int type,int arp_flags,char *hwa,char *mask,char *dev)
xhw = get_hwtype(DFLT_HW);
if (title++ == 0) {
printf(NLS_CATGETS(catfd, arpSet, arp_address,
"Address\t\t\tHWtype\tHWaddress\t Flags Mask\t\t Iface\n"));
printf(_("Address\t\t\tHWtype\tHWaddress\t Flags Mask\t\t Iface\n"));
}
/* Setup the flags. */
flags[0] = '\0';
......@@ -590,15 +584,13 @@ arp_show(char *name)
}
}
if (opt_v)
printf(NLS_CATGETS(catfd, arpSet, arp_sum,
"Entries: %d\tSkipped: %d\tFound: %d\n"),entries,entries-showed,showed);
printf(_("Entries: %d\tSkipped: %d\tFound: %d\n"),entries,entries-showed,showed);
if (!showed) {
if (host[0] && !opt_a)
printf("%s (%s) -- no entry\n", name, host);
else if (hw_set || host[0] || device[0]) {
printf(NLS_CATGETS(catfd, arpSet, arp_none,
"arp: in %d entries no match found.\n"),entries);
printf(_("arp: in %d entries no match found.\n"),entries);
}
}
(void) fclose(fp);
......@@ -609,26 +601,18 @@ static void
version(void)
{
fprintf(stderr, "%s\n%s\n%s\n",Release,Version,Features);
NLS_CATCLOSE(catfd)
exit(-1);
}
static void
usage(void)
{
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage1,
"Usage: arp [-vn] [-H type] [-i if] -a [hostname]\n"));
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage2,
" arp [-v] [-i if] -d hostname [pub][nopub]\n"));
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage3,
" arp [-v] [-H type] [-i if] -s hostname hw_addr [temp][nopub]\n"));
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage4,
" arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n"));
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage5,
" arp [-v] [-H type] [-i if] -Ds hostname if [netmask nm] pub\n"));
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_usage6,
" arp [-vnD] [-H type] [-i if] -f filename\n"));
NLS_CATCLOSE(catfd)
fprintf(stderr, _("Usage: arp [-vn] [-H type] [-i if] -a [hostname]\n"));
fprintf(stderr, _(" arp [-v] [-i if] -d hostname [pub][nopub]\n"));
fprintf(stderr, _(" arp [-v] [-H type] [-i if] -s hostname hw_addr [temp][nopub]\n"));
fprintf(stderr, _(" arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n"));
fprintf(stderr, _(" arp [-v] [-H type] [-i if] -Ds hostname if [netmask nm] pub\n"));
fprintf(stderr, _(" arp [-vnD] [-H type] [-i if] -f filename\n"));
exit(-1);
}
......@@ -654,22 +638,18 @@ main(int argc, char **argv)
{NULL, 0, 0, 0}
};
#if NLS
setlocale (LC_MESSAGES, "");
catfd = catopen ("nettools", MCLoadBySet);
#if I18N
bindtextdomain("net-tools", "/usr/share/locale");
textdomain("net-tools");
#endif
/* Initialize variables... */
if ((hw = get_hwtype(DFLT_HW)) == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_hw_not_supp,
"%s: hardware type not supported!\n"), DFLT_HW);
NLS_CATCLOSE(catfd)
fprintf(stderr, _("%s: hardware type not supported!\n"), DFLT_HW);
return(-1);
}
if ((ap = get_aftype(DFLT_AF)) == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_fam_not_supp,
"%s: address family not supported!\n"), DFLT_AF);
NLS_CATCLOSE(catfd)
fprintf(stderr, _("%s: address family not supported!\n"), DFLT_AF);
return(-1);
}
what = 0;
......@@ -713,10 +693,8 @@ main(int argc, char **argv)
case 'p':
ap = get_aftype(optarg);
if (ap == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_unkn_addr,
"arp: %s: unknown address family.\n"),
fprintf(stderr, _("arp: %s: unknown address family.\n"),
optarg);
NLS_CATCLOSE(catfd)
exit(-1);
}
break;
......@@ -724,10 +702,8 @@ main(int argc, char **argv)
case 't':
hw = get_hwtype(optarg);
if (hw == NULL) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_unkn_hw,
"arp: %s: unknown hardware type.\n"),
fprintf(stderr, _("arp: %s: unknown hardware type.\n"),
optarg);
NLS_CATCLOSE(catfd)
exit(-1);
}
hw_set = 1;
......@@ -746,23 +722,18 @@ main(int argc, char **argv)
}
if (ap->af != AF_INET) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_wrong_af,
"arp: %s: kernel only supports 'inet'.\n"),
fprintf(stderr, _("arp: %s: kernel only supports 'inet'.\n"),
ap->name);
NLS_CATCLOSE(catfd)
exit(-1);
}
if (hw->alen <= 0) {
fprintf(stderr, NLS_CATGETS(catfd, arpSet, arp_wrong_hw,
"arp: %s: hardware type without ARP support.\n"),
fprintf(stderr, _("arp: %s: hardware type without ARP support.\n"),
hw->name);
NLS_CATCLOSE(catfd)
exit(-1);
}
if ((sockfd = socket(AF_INET,SOCK_DGRAM,0)) <0)
{
perror("socket");
NLS_CATCLOSE(catfd)
exit(-1);
}
......@@ -793,6 +764,5 @@ main(int argc, char **argv)
usage();
}
NLS_CATCLOSE(catfd)
exit(what);
}
......@@ -8,12 +8,14 @@
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Version: config.in 1.20 (98-01-25)
# Version: config.in 1.21 (98-06-30)
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Copyright 1988-1993 MicroWalt Corporation
#
# Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
# Arnaldo Carvalho de Melo <acme@conectiva.com.br>
# GNU gettext - I18N
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
......@@ -31,24 +33,19 @@
= * DO NOT EDIT DIRECTLY
= *
= */
#*
#*
#* NLS
#*
#* (National Language Support)
#*
#* In this BETA Release the NLS is disabled, cause the catalougs
#* are completely outdated.
#*
#
#
#= #define NLS 0
#
#
# * (answer 'n' if you haye no system with national language support)
# *
# bool 'Does your system support NLS?' NLS n
#: Does your system support NLS? (NLS) [n] NO
*
*
* I18N
*
* (Internationalization)
*
* In this BETA Release the I18N (NLS) is enabled and now based
* on GNU gettext, only a brazilian portuguese catalog (translation)
* is present, but others are *highly* welcome!
*
* (answer 'n' if you haye no system with GNU gettext support)
*
bool 'Does your system support GNU gettext?' I18N y
*
*
* Protocol Families.
......
......@@ -20,6 +20,7 @@
*960120 {1.95} Bernd Eckenfels : -y/nisdomainname - support for get/
* setdomainname added
*960218 {1.96} Bernd Eckenfels : netinet/in.h added
*980629 {1.97} Arnaldo Carvalho de Melo : gettext instead of catgets for i18n
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -38,10 +39,10 @@
#include <arpa/inet.h>
#include "config.h"
#include "version.h"
#include "net-locale.h"
#include "../intl.h"
char *Release = RELEASE,
*Version = "hostname 1.96 (1996-02-18)";
*Version = "hostname 1.97 (1998-06-29)";
static char *program_name;
static int opt_v;
......@@ -59,21 +60,18 @@ static void setfilename(char *,int);
static void sethname(char *hname)
{
if (opt_v)
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_set, "Setting hostname to `%s'\n"),
fprintf(stderr,_("Setting hostname to `%s'\n"),
hname);
if(sethostname(hname, strlen(hname))) {
switch(errno) {
case EPERM:
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_root,
"%s: you must be root to change the host name\n"), program_name);
fprintf(stderr,_("%s: you must be root to change the host name\n"), program_name);
break;
case EINVAL:
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_toolong,
"%s: name too long\n"), program_name);
fprintf(stderr,_("%s: name too long\n"), program_name);
break;
default:
}
NLS_CATCLOSE(catfd)
exit(1);
};
}
......@@ -81,21 +79,18 @@ static void sethname(char *hname)
static void setdname(char *dname)
{
if (opt_v)
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_dset, "Setting domainname to `%s'\n"),
fprintf(stderr,_("Setting domainname to `%s'\n"),
dname);
if(setdomainname(dname, strlen(dname))) {
switch(errno) {
case EPERM:
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_dname_root,
"%s: you must be root to change the domain name\n"), program_name);
fprintf(stderr,_("%s: you must be root to change the domain name\n"), program_name);
break;
case EINVAL:
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_dname_toolong,
"%s: name too long\n"), program_name);
fprintf(stderr,_("%s: name too long\n"), program_name);
break;
default:
}
NLS_CATCLOSE(catfd)
exit(1);
};
}
......@@ -107,25 +102,24 @@ static void showhname(char *hname, int c)
struct in_addr **ip;
if (opt_v)
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_res, "Resolving `%s' ...\n"),hname);
fprintf(stderr,_("Resolving `%s' ...\n"),hname);
if (!(hp = gethostbyname(hname))) {
herror(program_name);
NLS_CATCLOSE(catfd)
exit(1);
}
if (opt_v) {
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_fnd, "Result: h_name=`%s'\n"),
fprintf(stderr,_("Result: h_name=`%s'\n"),
hp->h_name);
alias=hp->h_aliases;
while(alias[0])
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_ali, "Result: h_aliases=`%s'\n"),
fprintf(stderr,_("Result: h_aliases=`%s'\n"),
*alias++);
ip=(struct in_addr **)hp->h_addr_list;
while(ip[0])
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_ipn, "Result: h_addr_list=`%s'\n"),
fprintf(stderr,_("Result: h_addr_list=`%s'\n"),
inet_ntoa(**ip++));
}
......@@ -177,9 +171,8 @@ static void setfilename(char * name,int what)
}
(void) fclose(fd);
} else {
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_cant_open, "%s: can't open `%s'\n"),
fprintf(stderr,_("%s: can't open `%s'\n"),
program_name, optarg);
NLS_CATCLOSE(catfd)
exit(1);
}
}
......@@ -187,49 +180,29 @@ static void setfilename(char * name,int what)
static void version(void)
{
fprintf(stderr,"%s\n%s\n",Release,Version);
NLS_CATCLOSE(catfd)
exit(-1);
}
static void usage(void)
{
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage1,
"Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage2,
" domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage3,
" hostname [-v] [-d|-f|-s|-a|-i|-y] display formated name\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage4,
" hostname [-v] display hostname\n\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage5,
" hostname -V|--version|-h|--help print info and exit\n\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage6,
" dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage7,
" -s, --short short host name\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage8,
" -a, --alias alias names\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage9,
" -i, --ip-address addresses for the hostname\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage10,
" -f, --fqdn, --long long host name (FQDN)\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage11,
" -d, --domain DNS domain name\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage12,
" -y, --yp, --nis NIS/YP domainname\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage13,
" -F, --file read hostname or nis domainname from given File\n\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage14,
" This comand can get or set the hostname or the NIS domainname. You can\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage15,
" also get the DNS domain or the FQDN (fully qualified domain name).\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage16,
" Unless you are using bind or NIS for host lookups you can change the\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage17,
" FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_usage18,
" part of the FQDN) in the /etc/hosts file.\n"));
NLS_CATCLOSE(catfd)
fprintf(stderr,_("Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n"));
fprintf(stderr,_(" domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n"));
fprintf(stderr,_(" hostname [-v] [-d|-f|-s|-a|-i|-y] display formated name\n"));
fprintf(stderr,_(" hostname [-v] display hostname\n\n"));
fprintf(stderr,_(" hostname -V|--version|-h|--help print info and exit\n\n"));
fprintf(stderr,_(" dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n\n"));
fprintf(stderr,_(" -s, --short short host name\n"));
fprintf(stderr,_(" -a, --alias alias names\n"));
fprintf(stderr,_(" -i, --ip-address addresses for the hostname\n"));
fprintf(stderr,_(" -f, --fqdn, --long long host name (FQDN)\n"));
fprintf(stderr,_(" -d, --domain DNS domain name\n"));
fprintf(stderr,_(" -y, --yp, --nis NIS/YP domainname\n"));
fprintf(stderr,_(" -F, --file read hostname or nis domainname from given File\n\n"));
fprintf(stderr,_(" This comand can get or set the hostname or the NIS domainname. You can\n"));
fprintf(stderr,_(" also get the DNS domain or the FQDN (fully qualified domain name).\n"));
fprintf(stderr,_(" Unless you are using bind or NIS for host lookups you can change the\n"));
fprintf(stderr,_(" FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"));
fprintf(stderr,_(" part of the FQDN) in the /etc/hosts file.\n"));
exit(-1);
}
......@@ -259,12 +232,10 @@ int main(int argc, char **argv)
{"yp", no_argument, 0, 'y'},
{0, 0, 0, 0}
};
#if NLS
setlocale (LC_MESSAGES, "");
catfd = catopen ("nettools", MCLoadBySet);
#if I18N
bindtextdomain("net-tools", "/usr/share/locale");
textdomain("net-tools");
#endif
program_name = (rindex(argv[0], '/')) ? rindex(argv[0], '/') + 1 : argv[0];
if (!strcmp(program_name,"ypdomainname") ||
......@@ -309,13 +280,9 @@ int main(int argc, char **argv)
switch(what) {
case 2:
if (file || (optind < argc)) {
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_nodns1,
"%s: You can't change the DNS domain name with this command\n"), program_name);
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_nodns2,
"\nUnless you are using bind or NIS for host lookups you can change the DNS\n"));
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_nodns3,
"domain name (which is part of the FQDN) in the /etc/hosts file.\n"));
NLS_CATCLOSE(catfd)
fprintf(stderr,_("%s: You can't change the DNS domain name with this command\n"), program_name);
fprintf(stderr,_("\nUnless you are using bind or NIS for host lookups you can change the DNS\n"));
fprintf(stderr,_("domain name (which is part of the FQDN) in the /etc/hosts file.\n"));
exit(1);
}
type='d';
......@@ -332,8 +299,7 @@ int main(int argc, char **argv)
case 1:
gethostname(myname, sizeof(myname));
if (opt_v)
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_get,
"gethostname()=`%s'\n"),myname);
fprintf(stderr,_("gethostname()=`%s'\n"),myname);
if (!type)
printf("%s\n",myname);
else
......@@ -350,11 +316,9 @@ int main(int argc, char **argv)
}
getdomainname(myname,sizeof(myname));
if (opt_v)
fprintf(stderr,NLS_CATGETS(catfd, hostnameSet, hostname_verb_dget,
"getdomainname()=`%s'\n"),myname);
fprintf(stderr,_("getdomainname()=`%s'\n"),myname);
printf("%s\n",myname);
break;
}
NLS_CATCLOSE(catfd)
exit(0);
}
This diff is collapsed.
......@@ -26,7 +26,6 @@
#include "net-support.h"
#include "pathnames.h"
#include "version.h"
#include "net-locale.h"
#include "interface.h"
#include "sockets.h"
......
/* Dummy header for libintl.h */
#if I18N
#undef __OPTIMIZE__
#include <libintl.h>
#define _(String) gettext((String))
#define N_(String) (String)
#else
#define _(String) (String)
#define N_(String) (String)
#endif
......@@ -15,6 +15,7 @@
* Modifications:
*
*960322 {0.01} Bernd Eckenfels: creation
*980411 {0.01i} Arnaldo Carvalho: i18n: now uses gettext
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -28,7 +29,7 @@
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
#include "intl.h"
extern struct hwtype slip_hwtype;
extern struct hwtype cslip_hwtype;
......@@ -66,11 +67,11 @@ int activate_ld(const char *hwname, int fd)
hw = get_hwtype(hwname);
if (!hw) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_act_no_support, "Hardware type `%s' not supported.\n"),hwname);
fprintf(stderr,_("Hardware type `%s' not supported.\n"),hwname);
return(E_NOSUPP);
}
if (!hw->activate) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_type_no_act, "Cannot change line discipline to `%s'.\n"),hw->name);
fprintf(stderr,_("Cannot change line discipline to `%s'.\n"),hw->name);
return(E_OPTERR);
}
return(hw->activate(fd));
......
......@@ -24,8 +24,7 @@
#include "config.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
int flag_unx = 0;
......@@ -103,30 +102,30 @@ static struct aftype *aftypes[] = {
void afinit ()
{
unspec_aftype.title = NLS_CATSAVE (catfd, unixSet, unix_unspec, "UNSPEC");
unspec_aftype.title = _("UNSPEC");
#if HAVE_AFINET
unix_aftype.title = NLS_CATSAVE (catfd, unixSet, unix_unix, "UNIX Domain");
unix_aftype.title = _("UNIX Domain");
#endif
#if HAVE_AFINET
inet_aftype.title = NLS_CATSAVE (catfd, inetSet, inet_darpa, "DARPA Internet");
inet_aftype.title = _("DARPA Internet");
#endif
#if HAVE_AFINET6
inet6_aftype.title = NLS_CATSAVE (catfd, inetSet, inet_darpa, "IPv6");
inet6_aftype.title = _("IPv6");
#endif
#if HAVE_AFAX25
ax25_aftype.title = NLS_CATSAVE (catfd, ax25Set, ax25_ax25, "AMPR AX.25");
ax25_aftype.title = _("AMPR AX.25");
#endif
#if HAVE_AFNETROM
netrom_aftype.title = NLS_CATSAVE (catfd, netromSet, netrom_netrom, "AMPR NET/ROM");
netrom_aftype.title = _("AMPR NET/ROM");
#endif
#if HAVE_AFIPX
ipx_aftype.title = NLS_CATSAVE (catfd, ipxSet, ipx_ipx, "IPX");
ipx_aftype.title = _("IPX");
#endif
#if HAVE_AFATALK
ddp_aftype.title = NLS_CATSAVE (catfd, ddpSet, ddp_ddp, "Appletalk DDP");
ddp_aftype.title = _("Appletalk DDP");
#endif
#if HAVE_AFCONET
ec_aftype.title = NLS_CATSAVE (catfd, ecSet, ec_ec, "Econet");
ec_aftype.title = _("Econet");
#endif
sVafinit = 1;
}
......@@ -186,7 +185,7 @@ get_aftype(const char *name)
afp++;
}
if (index(name,','))
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_toomuch, "Please don't supply more than one address family.\n"));
fprintf(stderr,_("Please don't supply more than one address family.\n"));
return(NULL);
}
......@@ -232,7 +231,7 @@ int aftrans_opt(const char *arg)
if (strcmp(tmp1,paft->alias))
continue;
if (strlen(paft->name)+strlen(afname)+1 >= sizeof(afname)) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_toomuch_af, "Too much address family arguments.\n"));
fprintf(stderr,_("Too much address family arguments.\n"));
return(0);
}
if (paft->flag)
......@@ -243,7 +242,7 @@ int aftrans_opt(const char *arg)
break;
}
if (!paft->alias) {
fprintf(stderr,NLS_CATGETS(catfd, libSet, lib_unknown_af, "Unknown address family `%s'.\n"),tmp1);
fprintf(stderr,_("Unknown address family `%s'.\n"),tmp1);
return(1);
}
tmp1=tmp2;
......
......@@ -28,9 +28,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern struct hwtype arcnet_hwtype;
......@@ -41,7 +39,7 @@ pr_arcnet(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X",(ptr[0] & 0377));
snprintf(buff, sizeof(buff), "%02X",(ptr[0] & 0377));
return(buff);
}
......@@ -53,7 +51,7 @@ pr_sarcnet(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, arcnetSet, arcnet_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(pr_arcnet(sap->sa_data));
}
......@@ -79,8 +77,7 @@ in_arcnet(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug1,
"in_arcnet(%s): invalid arcnet address!\n"), orig);
fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -92,8 +89,7 @@ in_arcnet(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug2,
"in_arcnet(%s): invalid arcnet address!\n"), orig);
fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -105,8 +101,7 @@ in_arcnet(char *bufp, struct sockaddr *sap)
if (*bufp == ':') {
if (i == ETH_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug3,
"in_arcnet(%s): trailing : ignored!\n"),
fprintf(stderr, _("in_arcnet(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
......@@ -118,7 +113,7 @@ in_arcnet(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */
if ((i == ETH_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, arcnetSet, arcnet_debug4, "in_arcnet(%s): trailing junk!\n"), orig);
fprintf(stderr, _("in_arcnet(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
......
......@@ -18,8 +18,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#ifndef ARPHRD_ASH
#error No support for Ash on this system
......@@ -85,7 +84,7 @@ in_ash(char *bufp, struct sockaddr *sap)
bufp = NULL;
break;
default:
fprintf (stderr, "Malformed Ash address");
fprintf (stderr, _("Malformed Ash address"));
memset (ptr, 0xc9, ASH_ALEN);
return -1;
}
......
......@@ -24,11 +24,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#if __GLIBC__ == 2
#include <netax25/ax25.h>
#else
#include <linux/ax25.h>
#endif
#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
......@@ -40,8 +36,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
static char AX25_errmsg[128];
......@@ -73,7 +68,7 @@ AX25_sprint(struct sockaddr *sap, int numeric)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, ax25Set, ax25_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(AX25_print(((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call));
}
......@@ -95,7 +90,7 @@ AX25_input(int type, char *bufp, struct sockaddr *sap)
c = *bufp++;
if (islower(c)) c = toupper(c);
if (! (isupper(c) || isdigit(c))) {
strcpy(AX25_errmsg, NLS_CATGETS (catfd, ax25Set, ax25_debug1, "Invalid callsign"));
strcpy(AX25_errmsg, _("Invalid callsign"));
#ifdef DEBUG
fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
#endif
......@@ -108,7 +103,7 @@ AX25_input(int type, char *bufp, struct sockaddr *sap)
/* Callsign too long? */
if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) {
strcpy(AX25_errmsg, NLS_CATGETS (catfd, ax25Set, ax25_debug2, "Callsign too long"));
strcpy(AX25_errmsg, _("Callsign too long"));
#ifdef DEBUG
fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
#endif
......@@ -156,7 +151,7 @@ AX25_hprint(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, ax25Set, ax25_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(AX25_print(((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call));
}
......
......@@ -34,8 +34,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
int AX25_rprint(int options)
{
......@@ -45,11 +44,11 @@ int AX25_rprint(int options)
if(f==NULL)
{
printf(NLS_CATGETS(catfd, netstatSet, netstat_noax25, "AX.25 not configured in this system.\n")); /* xxx */
printf(_("AX.25 not configured in this system.\n")); /* xxx */
return 1;
}
printf(NLS_CATGETS(catfd, netstatSet, netstat_ax25, "Kernel AX.25 routing table\n")); /* xxx */
printf(NLS_CATGETS(catfd, netstatSet, netstat_header_ax25, "Destination Iface Use\n")); /* xxx */
printf(_("Kernel AX.25 routing table\n")); /* xxx */
printf(_("Destination Iface Use\n")); /* xxx */
fgets(buffer,256,f);
while(fgets(buffer,256,f))
{
......
......@@ -26,9 +26,7 @@
#include <netinet/in.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* Display a ddp domain address. */
static char *
......@@ -48,7 +46,7 @@ ddp_sprint(struct sockaddr *sap, int numeric)
static char buf[64];
if (sap->sa_family != AF_APPLETALK)
return(NLS_CATBUFF (catfd, ddpSet, ddp_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(ddp_print(sap->sa_data));
}
......
......@@ -14,13 +14,11 @@
#include <netinet/in.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
int DDP_rprint(int options)
{
fprintf(stderr,NLS_CATGETS(catfd, ddpSet, ddp_notyet,
"Routing table for `ddp' not yet supported.\n"));
fprintf(stderr, _("Routing table for `ddp' not yet supported.\n"));
return(1);
}
#endif
......@@ -27,9 +27,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include <linux/if_ec.h>
......@@ -48,11 +46,10 @@ ec_print(unsigned char *ptr)
static char *
ec_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
struct sockaddr_ec *sec = (struct sockaddr_ec *)sap;
if (sap->sa_family != AF_ECONET)
return(NLS_CATBUFF (catfd, ecSet, ec_none, "[NONE SET]", buf, 64));
return _("[NONE SET]");
return ec_print((unsigned char *)&sec->addr);
}
......
......@@ -28,9 +28,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern struct hwtype ether_hwtype;
......@@ -41,7 +39,7 @@ pr_ether(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X",
snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
);
......@@ -56,7 +54,7 @@ pr_sether(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, etherSet, ether_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(pr_ether(sap->sa_data));
}
......@@ -83,8 +81,7 @@ in_ether(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug1,
"in_ether(%s): invalid ether address!\n"), orig);
fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -97,8 +94,7 @@ in_ether(char *bufp, struct sockaddr *sap)
else if (c == ':' || c == 0) val >>= 4;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug2,
"in_ether(%s): invalid ether address!\n"), orig);
fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -111,8 +107,7 @@ in_ether(char *bufp, struct sockaddr *sap)
if (*bufp == ':') {
if (i == ETH_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug3,
"in_ether(%s): trailing : ignored!\n"),
fprintf(stderr, _("in_ether(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
......@@ -124,7 +119,7 @@ in_ether(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */
if ((i == ETH_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, etherSet, ether_debug4, "in_ether(%s): trailing junk!\n"), orig);
fprintf(stderr, _("in_ether(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
......
......@@ -2,10 +2,12 @@
* lib/fddi.c This file contains an implementation of the "FDDI"
* support functions for the NET-2 base distribution.
*
* Version: @(#)fddi.c 1.00 08/13/96
* Version: @(#)fddi.c 1.01 07/01/1998
*
* Author: Lawrence V. Stefani, <stefani@lkg.dec.com>
*
* 1998-07-01 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> GNU gettext
*
* 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
......@@ -37,9 +39,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern struct hwtype fddi_hwtype;
......@@ -50,7 +50,7 @@ pr_fddi(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X-%02X-%02X-%02X-%02X-%02X",
snprintf(buff, sizeof(buff), "%02X-%02X-%02X-%02X-%02X-%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
);
......@@ -65,7 +65,7 @@ pr_sfddi(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, fddiSet, fddi_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(pr_fddi(sap->sa_data));
}
......@@ -91,8 +91,7 @@ in_fddi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, fddiSet, fddi_debug1,
"in_fddi(%s): invalid fddi address!\n"), orig);
fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -104,8 +103,7 @@ in_fddi(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, fddiSet, fddi_debug2,
"in_fddi(%s): invalid fddi address!\n"), orig);
fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -117,8 +115,7 @@ in_fddi(char *bufp, struct sockaddr *sap)
if (*bufp == ':') {
if (i == FDDI_K_ALEN) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, fddiSet, fddi_debug3,
"in_fddi(%s): trailing : ignored!\n"),
fprintf(stderr, _("in_fddi(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
......@@ -130,7 +127,7 @@ in_fddi(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */
if ((i == FDDI_K_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, fddiSet, fddi_debug4, "in_fddi(%s): trailing junk!\n"), orig);
fprintf(stderr, _("in_fddi(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
......
......@@ -36,14 +36,12 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
char *pr_dlci(unsigned char *ptr)
{
static char buf[12];
sprintf(buf, "%i", *(short *)ptr);
snprintf(buf, sizeof(buf), "%i", *(short *)ptr);
return(buf);
}
......
......@@ -21,6 +21,7 @@
* support in the AF handlers
*960221 {1.02} Bernd Eckenfels: renamed from route_info to getroute.c
*960413 {1.03} Bernd Eckenfels: new RTACTION support
*980701 {1.04} Arnaldo C. Melo: GNU gettext instead of catgets
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -34,7 +35,7 @@
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
#include "intl.h"
extern struct aftype unspec_aftype;
extern struct aftype unix_aftype;
......@@ -96,13 +97,13 @@ route_info(const char *afname, int options)
ap = get_aftype(tmp1);
if (!ap) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_route_no_support, "Address family `%s' not supported.\n"),tmp1);
fprintf(stderr,_("Address family `%s' not supported.\n"),tmp1);
return(E_OPTERR);
}
tmp1=tmp2;
if (!ap->rprint) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_type_no_route, "No routing for address family `%s'.\n"),ap->name);
fprintf(stderr,_("No routing for address family `%s'.\n"),ap->name);
return(E_OPTERR);
}
......
......@@ -2,13 +2,15 @@
* lib/hw.c This file contains the top-level part of the hardware
* support functions module for the NET-2 base distribution.
*
* Version: lib/hw.c 1.20 (1998-01-25)
* Version: lib/hw.c 1.21 (1998-07-01)
*
* Maintainer: Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
*980701 {1.21} Arnaldo C. Melo GNU gettext instead of catgets
*
* 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
......@@ -26,9 +28,7 @@
#include "config.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern struct hwtype unspec_hwtype;
extern struct hwtype loop_hwtype;
......@@ -126,55 +126,55 @@ static short sVhwinit = 0;
void hwinit ()
{
loop_hwtype.title = NLS_CATSAVE (catfd, loopbackSet, loopback_loop, "Local Loopback");
unspec_hwtype.title = NLS_CATSAVE (catfd, loopbackSet, loopback_unspec, "UNSPEC");
loop_hwtype.title = _("Local Loopback");
unspec_hwtype.title = _("UNSPEC");
#if HAVE_HWSLIP
slip_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_slip, "Serial Line IP");
cslip_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_cslip, "VJ Serial Line IP");
slip6_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_slip6, "6-bit Serial Line IP");
cslip6_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_cslip6, "VJ 6-bit Serial Line IP");
adaptive_hwtype.title = NLS_CATSAVE (catfd, slipSet, slip_adaptive, "Adaptive Serial Line IP");
slip_hwtype.title = _("Serial Line IP");
cslip_hwtype.title = _("VJ Serial Line IP");
slip6_hwtype.title = _("6-bit Serial Line IP");
cslip6_hwtype.title = _("VJ 6-bit Serial Line IP");
adaptive_hwtype.title = _("Adaptive Serial Line IP");
#endif
#if HAVE_HWETHER
ether_hwtype.title = NLS_CATSAVE (catfd, etherSet, ether_ether, "Ethernet");
ether_hwtype.title = _("Ethernet");
#endif
#if HAVE_HWASH
ash_hwtype.title = NLS_CATSAVE (catfd, ashSet, ash_hw, "Ash");
ash_hwtype.title = _("Ash");
#endif
#if HAVE_HWFDDI
fddi_hwtype.title = NLS_CATSAVE (catfd, fddiSet, fddi_fddi, "Fiber Distributed Data Interface");
fddi_hwtype.title = _("Fiber Distributed Data Interface");
#endif
#if HAVE_HWHIPPI
hippi_hwtype.title = NLS_CATSAVE (catfd, hippiSet, hippi_hippi, "HIPPI");
hippi_hwtype.title = _("HIPPI");
#endif
#if HAVE_HWAX25
ax25_hwtype.title = NLS_CATSAVE (catfd, ax25Set, ax25_hw, "AMPR AX.25");
ax25_hwtype.title = _("AMPR AX.25");
#endif
#if HAVE_HWROSE
rose_hwtype.title = NLS_CATSAVE (catfd, roseSet, rose_hw, "AMPR ROSE");
rose_hwtype.title = _("AMPR ROSE");
#endif
#if HAVE_HWNETROM
netrom_hwtype.title = NLS_CATSAVE (catfd, netromSet, netrom_hw, "AMPR NET/ROM");
netrom_hwtype.title = _("AMPR NET/ROM");
#endif
#if HAVE_HWTUNNEL
tunnel_hwtype.title = NLS_CATSAVE (catfd, tunnelSet, tunnel_hw, "IPIP Tunnel");
tunnel_hwtype.title = _("IPIP Tunnel");
#endif
#if HAVE_HWPPP
ppp_hwtype.title = NLS_CATSAVE (catfd, pppSet, ppp_ppp, "Point-to-Point Protocol");
ppp_hwtype.title = _("Point-to-Point Protocol");
#endif
#if HAVE_HWHDLCLAPB
hdlc_hwtype.title = NLS_CATSAVE (catfd, hdlcSet, hdlc_hw, "(Cisco)-HDLC");
lapb_hwtype.title = NLS_CATSAVE (catfd, lapbSet, lapb_hw, "LAPB");
hdlc_hwtype.title = _("(Cisco)-HDLC");
lapb_hwtype.title = _("LAPB");
#endif
#if HAVE_HWARC
arcnet_hwtype.title = NLS_CATSAVE (catfd, arcnetSet, arcnet_arcnet, "1.5Mbps ARCnet");
arcnet_hwtype.title = _("1.5Mbps ARCnet");
#endif
#if HAVE_HWFR
dlci_hwtype.title = NLS_CATSAVE(catfd, dlciSet, dlci_hw, "Frame Relay DLCI");
frad_hwtype.title = NLS_CATSAVE(catfd, fradSet, frad_hw, "Frame Relay Access Device");
dlci_hwtype.title = _("Frame Relay DLCI");
frad_hwtype.title = _("Frame Relay Access Device");
#endif
#if HAVE_HWSIT
sit_hwtype.title = NLS_CATSAVE(catfd, sitSet, sit_hw, "IPv6-in-IPv4");
sit_hwtype.title = _("IPv6-in-IPv4");
#endif
sVhwinit = 1;
}
......
......@@ -41,8 +41,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern int h_errno; /* some netdb.h versions don't export this */
......@@ -120,7 +119,7 @@ INET_rresolve(char *name, struct sockaddr_in *sin, int numeric)
/* Grmpf. -FvK */
if (sin->sin_family != AF_INET) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, inetSet, inet_debug1, "rresolve: unsupport address family %d !\n"), sin->sin_family);
fprintf(stderr, _("rresolve: unsupport address family %d !\n"), sin->sin_family);
#endif
errno = EAFNOSUPPORT;
return(-1);
......@@ -200,7 +199,7 @@ INET_sprint(struct sockaddr *sap, int numeric)
static char buff[128];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, inetSet, inet_none, "[NONE SET]", buff, 128));
return strncpy (buff, _("[NONE SET]"), sizeof(buff));
if (INET_rresolve(buff, (struct sockaddr_in *) sap, numeric) != 0)
return(NULL);
return(buff);
......
......@@ -3,13 +3,14 @@
* support functions for the net-tools.
* (most of it copied from lib/inet.c 1.26).
*
* Version: lib/inet6.c 0.01 1996-08-08
* Version: lib/inet6.c 0.02 1998-07-01
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Modified:
*960808 {0.01} Frank Strauss : adapted for IPv6 support
*980701 {0.02} Arnaldo C. Melo: GNU gettext instead of catgets
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -37,8 +38,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
extern int h_errno; /* some netdb.h versions don't export this */
......@@ -70,7 +70,7 @@ INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
/* Grmpf. -FvK */
if (sin6->sin6_family != AF_INET6) {
#ifdef DEBUG
fprintf(stderr, NLS_CATGETS(catfd, inetSet, inet_debug1, "rresolve: unsupport address family %d !\n"),
fprintf(stderr, _("rresolve: unsupport address family %d !\n"),
sin6->sin6_family);
#endif
errno = EAFNOSUPPORT;
......@@ -118,7 +118,7 @@ INET6_sprint(struct sockaddr *sap, int numeric)
static char buff[128];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, inetSet, inet_none, "[NONE SET]", buff, 128));
return strncpy (buff, _("[NONE SET]"), sizeof (buff));
if (INET6_rresolve(buff, (struct sockaddr_in6 *) sap, numeric) != 0)
return(NULL);
return(buff);
......
/*
Modifications:
1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
snprintf instead of sprintf
*/
#include "config.h"
#if HAVE_AFINET6
......@@ -23,9 +29,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
/* this is from linux/include/net/ndisc.h */
......@@ -74,12 +78,11 @@ int rprint_fib6(int ext, int numeric)
return 1;
}
printf(NLS_CATGETS(catfd, inet6Set, inet6_table, "Kernel IPv6 routing table\n"));
printf(_("Kernel IPv6 routing table\n"));
printf(NLS_CATGETS(catfd, inet6Set, inet6_header2,
"Destination "
"Next Hop "
"Flags Metric Ref Use Iface\n"));
printf(_("Destination "
"Next Hop "
"Flags Metric Ref Use Iface\n"));
while (fgets(buff, 1023, fp))
{
......@@ -98,20 +101,20 @@ int rprint_fib6(int ext, int numeric)
#endif
if (!(iflags & RTF_UP)) continue;
/* Fetch and resolve the target address. */
sprintf(addr6, "%s:%s:%s:%s:%s:%s:%s:%s",
snprintf(addr6, sizeof(addr6), "%s:%s:%s:%s:%s:%s:%s:%s",
addr6p[0], addr6p[1], addr6p[2], addr6p[3],
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
inet6_aftype.input(1, addr6, (struct sockaddr *)&saddr6);
sprintf(addr6, "%s/%d",
snprintf(addr6, sizeof(addr6), "%s/%d",
inet6_aftype.sprint((struct sockaddr *)&saddr6, 1),
prefix_len);
/* Fetch and resolve the nexthop address. */
sprintf(naddr6, "%s:%s:%s:%s:%s:%s:%s:%s",
snprintf(naddr6, sizeof(naddr6), "%s:%s:%s:%s:%s:%s:%s:%s",
naddr6p[0], naddr6p[1], naddr6p[2], naddr6p[3],
naddr6p[4], naddr6p[5], naddr6p[6], naddr6p[7]);
inet6_aftype.input(1, naddr6, (struct sockaddr *)&snaddr6);
sprintf(naddr6, "%s",
snprintf(naddr6, sizeof(naddr6), "%s",
inet6_aftype.sprint((struct sockaddr *)&snaddr6, 1));
/* Decode the flags. */
......@@ -146,18 +149,16 @@ int rprint_cache6(int ext, int numeric)
return 1;
}
printf(NLS_CATGETS(catfd, inet6ndSet, inet6_ndtable, "Kernel IPv6 Neighbour Cache\n"));
printf(_("Kernel IPv6 Neighbour Cache\n"));
if (ext == 2)
printf(NLS_CATGETS(catfd, inet6ndSet, inet6_ndheader2,
"Neighbour "
"HW Address "
"Iface Flags Ref State\n"));
printf(_("Neighbour "
"HW Address "
"Iface Flags Ref State\n"));
else
printf(NLS_CATGETS(catfd, inet6ndSet, inet6_ndheader2,
"Neighbour "
"HW Address "
"Iface Flags Ref State Stale(sec) Delete(sec)\n"));
printf(_("Neighbour "
"HW Address "
"Iface Flags Ref State Stale(sec) Delete(sec)\n"));
while (fgets(buff, 1023, fp))
......@@ -170,16 +171,17 @@ int rprint_cache6(int ext, int numeric)
haddrp[0], haddrp[1], haddrp[2], haddrp[3], haddrp[4], haddrp[5]);
/* Fetch and resolve the nexthop address. */
sprintf(addr6, "%s:%s:%s:%s:%s:%s:%s:%s",
snprintf(addr6, sizeof(addr6), "%s:%s:%s:%s:%s:%s:%s:%s",
addr6p[0], addr6p[1], addr6p[2], addr6p[3],
addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
inet6_aftype.input(1, addr6, (struct sockaddr *)&saddr6);
sprintf(addr6, "%s/%d",
snprintf(addr6, sizeof(addr6), "%s/%d",
inet6_aftype.sprint((struct sockaddr *)&saddr6, numeric),
prefix_len);
/* Fetch the hardware address. */
sprintf(haddr, "%s:%s:%s:%s:%s:%s", haddrp[0],haddrp[1],haddrp[2], haddrp[3],haddrp[4],haddrp[5]);
snprintf(haddr, sizeof(haddr), "%s:%s:%s:%s:%s:%s",
haddrp[0],haddrp[1],haddrp[2], haddrp[3],haddrp[4],haddrp[5]);
/* Decode the flags. */
flags[0] = '\0';
......@@ -217,7 +219,7 @@ int rprint_cache6(int ext, int numeric)
strcpy(statestr,"IN TIMER");
break;
default:
sprintf(statestr,"UNKNOWN %02x",state);
snprintf(statestr,sizeof (statestr),"UNKNOWN %02x",state);
break;
}
......
/*
Modifications:
1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
*/
#include "config.h"
#if HAVE_AFINET6
......@@ -25,9 +30,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
extern struct aftype inet6_aftype;
......@@ -37,9 +40,9 @@ static int skfd = -1;
static int usage(void)
{
fprintf(stderr,"Usage: inet6_route [-vF] del Target\n");
fprintf(stderr," inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n");
fprintf(stderr," inet6_route [-FC] flush NOT supported\n");
fprintf(stderr,_("Usage: inet6_route [-vF] del Target\n"));
fprintf(stderr,_(" inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"));
fprintf(stderr,_(" inet6_route [-FC] flush NOT supported\n"));
return(E_USAGE);
}
......@@ -176,7 +179,7 @@ static int INET6_setroute(int action, int options, char **args)
int INET6_rinput(int action, int options, char **args)
{
if (action == RTACTION_FLUSH) {
fprintf(stderr,"Flushing `inet6' routing table not supported\n");
fprintf(stderr,_("Flushing `inet6' routing table not supported\n"));
return(usage());
}
if ((*args == NULL) || (action == RTACTION_HELP))
......
/*
Modifications:
1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
*/
#include "config.h"
#if HAVE_AFINET
......@@ -18,9 +23,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
#include "proc.h"
......@@ -42,21 +45,18 @@ int rprint_fib(int ext, int numeric)
return 1;
}
printf(NLS_CATGETS(catfd, inetSet, inet_table, "Kernel IP routing table\n"));
printf(_("Kernel IP routing table\n"));
if (ext == 1)
printf(NLS_CATGETS(catfd, inetSet, inet_header1,
"Destination Gateway Genmask "
"Flags Metric Ref Use Iface\n"));
printf(_("Destination Gateway Genmask "
"Flags Metric Ref Use Iface\n"));
if (ext == 2)
printf(NLS_CATGETS(catfd, inetSet, inet_header2,
"Destination Gateway Genmask "
"Flags MSS Window irtt Iface\n"));
printf(_("Destination Gateway Genmask "
"Flags MSS Window irtt Iface\n"));
if (ext >= 3)
printf(NLS_CATGETS(catfd, inetSet, inet_header3,
"Destination Gateway Genmask "
"Flags Metric Ref Use Iface "
"MSS Window irtt\n"));
printf(_("Destination Gateway Genmask "
"Flags Metric Ref Use Iface "
"MSS Window irtt\n"));
irtt=0;
window=0;
......@@ -171,18 +171,15 @@ int rprint_cache(int ext, int numeric)
}
if (ext == 1)
printf(NLS_CATGETS(catfd, inetSet, inet_header1,
"Destination Gateway Source "
"Flags Metric Ref Use Iface\n"));
printf(_("Destination Gateway Source "
"Flags Metric Ref Use Iface\n"));
if (ext == 2)
printf(NLS_CATGETS(catfd, inetSet, inet_header2,
"Destination Gateway Source "
"Flags MSS Window irtt Iface\n"));
printf(_("Destination Gateway Source "
"Flags MSS Window irtt Iface\n"));
if (ext >= 3)
printf(NLS_CATGETS(catfd, inetSet, inet_header3,
"Destination Gateway Source "
"Flags Metric Ref Use Iface "
"MSS Window irtt HH Arp\n"));
printf(_("Destination Gateway Source "
"Flags Metric Ref Use Iface "
"MSS Window irtt HH Arp\n"));
fmt = proc_gen_fmt(_PATH_PROCNET_ROUTE, fp,
"Iface", "%16s",
......
/*
Modifications:
1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
*/
#include "config.h"
#if HAVE_AFINET
......@@ -21,9 +26,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
#if HAVE_NEW_ADDRT
......@@ -41,12 +44,12 @@ static int skfd = -1;
static int usage(void)
{
fprintf(stderr,"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If]\n");
fprintf(stderr," inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n");
fprintf(stderr," [netmask N] [mss Mss] [window W] [irtt I]\n");
fprintf(stderr," [mod] [dyn] [reinstate] [[dev] If]\n");
fprintf(stderr," inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n");
fprintf(stderr," inet_route [-FC] flush NOT aupported\n");
fprintf(stderr,_("Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If]\n"));
fprintf(stderr,_(" inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"));
fprintf(stderr,_(" [netmask N] [mss Mss] [window W] [irtt I]\n"));
fprintf(stderr,_(" [mod] [dyn] [reinstate] [[dev] If]\n"));
fprintf(stderr,_(" inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"));
fprintf(stderr,_(" inet_route [-FC] flush NOT aupported\n"));
return(E_USAGE);
}
......@@ -157,8 +160,7 @@ static int INET_setroute(int action, int options, char **args)
return (E_LOOKUP);
}
if (isnet) {
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_cant_use,
"route: %s: cannot use a NETWORK as gateway!\n"),
fprintf(stderr, _("route: %s: cannot use a NETWORK as gateway!\n"),
gateway);
return (E_OPTERR);
}
......@@ -175,7 +177,7 @@ static int INET_setroute(int action, int options, char **args)
args++;
if(rt.rt_mss<64||rt.rt_mss>32768)
{
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_MSS, "route: Invalid MSS.\n"));
fprintf(stderr, _("route: Invalid MSS.\n"));
return(E_OPTERR);
}
continue;
......@@ -189,7 +191,7 @@ static int INET_setroute(int action, int options, char **args)
args++;
if(rt.rt_window<128)
{
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_window, "route: Invalid window.\n"));
fprintf(stderr, _("route: Invalid window.\n"));
return(E_OPTERR);
}
continue;
......@@ -206,7 +208,7 @@ static int INET_setroute(int action, int options, char **args)
#if 0 /* FIXME: do we need to check anything of this? */
if(rt.rt_irtt<1||rt.rt_irtt> (120*HZ))
{
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_irtt, "route: Invalid initial rtt.\n"));
fprintf(stderr, _("route: Invalid initial rtt.\n"));
return(E_OPTERR);
}
#endif
......@@ -266,19 +268,16 @@ static int INET_setroute(int action, int options, char **args)
if (mask_in_addr(rt)) {
__u32 mask = ~ntohl(mask_in_addr(rt));
if ((rt.rt_flags & RTF_HOST) && mask != 0xffffffff) {
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_netmask1,
"route: netmask %.8x doesn't make sense with host route\n"), mask);
fprintf(stderr, _("route: netmask %.8x doesn't make sense with host route\n"), mask);
return(E_OPTERR);
}
if (mask & (mask+1)) {
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_netmask2,
"route: bogus netmask %s\n"), netmask);
fprintf(stderr, _("route: bogus netmask %s\n"), netmask);
return(E_OPTERR);
}
mask = ((struct sockaddr_in *) &rt.rt_dst)->sin_addr.s_addr;
if (mask & ~mask_in_addr(rt)) {
fprintf(stderr, NLS_CATGETS(catfd, routeSet, route_netmask3,
"route: netmask doesn't match route address\n"));
fprintf(stderr, _("route: netmask doesn't match route address\n"));
return(E_OPTERR);
}
}
......@@ -316,11 +315,11 @@ static int INET_setroute(int action, int options, char **args)
int INET_rinput(int action, int options, char **args)
{
if (action == RTACTION_FLUSH) {
fprintf(stderr,"Flushing `inet' routing table not supported\n");
fprintf(stderr,_("Flushing `inet' routing table not supported\n"));
return(usage());
}
if (options & FLAG_CACHE) {
fprintf(stderr,"Modifying `inet' routing cache not supported\n");
fprintf(stderr,_("Modifying `inet' routing cache not supported\n"));
return(usage());
}
if ((*args == NULL) || (action == RTACTION_HELP))
......
......@@ -9,6 +9,9 @@
* Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at
* your option) any later version.
* Modifications:
* 1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
* snprintf instead of sprintf
*/
#include "config.h"
......@@ -27,8 +30,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#if (IPX_NODE_LEN != 6)
#error "IPX_NODE_LEN != 6"
......@@ -48,15 +50,15 @@ IPX_print(unsigned char *ptr)
break;
if (t && ntohl(sipx->sipx_network))
sprintf(buff,"%08lX:%02X%02X%02X%02X%02X%02X",
snprintf(buff,sizeof(buff),"%08lX:%02X%02X%02X%02X%02X%02X",
(long int)ntohl(sipx->sipx_network),
(int)sipx->sipx_node[0],(int)sipx->sipx_node[1],
(int)sipx->sipx_node[2],(int)sipx->sipx_node[3],
(int)sipx->sipx_node[4],(int)sipx->sipx_node[5]);
else if (!t && ntohl(sipx->sipx_network))
sprintf(buff,"%08lX", (long int)ntohl(sipx->sipx_network));
snprintf(buff,sizeof(buff),"%08lX", (long int)ntohl(sipx->sipx_network));
else if (t && !ntohl(sipx->sipx_network))
sprintf(buff,"%02X%02X%02X%02X%02X%02X",
snprintf(buff,sizeof(buff),"%02X%02X%02X%02X%02X%02X",
(int)sipx->sipx_node[0],(int)sipx->sipx_node[1],
(int)sipx->sipx_node[2],(int)sipx->sipx_node[3],
(int)sipx->sipx_node[4],(int)sipx->sipx_node[5]);
......@@ -73,7 +75,7 @@ IPX_sprint(struct sockaddr *sap, int numeric)
static char buf[64];
if (sap->sa_family != AF_IPX)
return(NLS_CATBUFF (catfd, ipxSet, ipx_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(IPX_print(sap->sa_data));
}
......
/* support for ap->rresolv missing */
/*
Modifications:
1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
snprintf instead of sprintf
*/
#include "config.h"
......@@ -17,8 +22,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* UGLY */
......@@ -34,15 +38,14 @@ int IPX_rprint(int options)
struct aftype *ap;
struct sockaddr sa;
printf(NLS_CATGETS(catfd, ipxSet, ipx_table, "Kernel IPX routing table\n")); /* xxx */
printf(_("Kernel IPX routing table\n")); /* xxx */
if ((ap = get_afntype(AF_IPX)) == NULL) {
EINTERN("lib/ipx_rt.c","AF_IPX missing");
return(-1);
}
printf(NLS_CATGETS(catfd, ipxSet, ipx_header1,
"Destination Router Net Router Node\n"));
printf(_("Destination Router Net Router Node\n"));
if ((fp = fopen(_PATH_PROCNET_IPX_ROUTE, "r")) == NULL) {
perror(_PATH_PROCNET_IPX_ROUTE);
......
......@@ -19,8 +19,7 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
......@@ -40,7 +39,7 @@ static int usage(void)
int IPX_rinput(int action, int ext, char **args)
{
fprintf(stderr,"IPX: this needs to be written\n");
fprintf(stderr,_("IPX: this needs to be written\n"));
return(0);
}
#endif /* HAVE_AFIPX */
......@@ -6,6 +6,9 @@
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Modifications:
* 1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
*
* 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
......@@ -25,9 +28,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* Display an UNSPEC address. */
static char *
......@@ -53,7 +54,7 @@ pr_sunspec(struct sockaddr *sap)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, loopbackSet, loopback_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(pr_unspec(sap->sa_data));
}
......
......@@ -17,6 +17,8 @@
* Jos Vos' ipfwadm 2.0beta1
*950218 {0.02} Bernd Eckenfels: <linux/if.h> added
*
*980405 {0.03} Arnaldo Carvalho: i18n CATGETS -> gettext
*
* 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
......@@ -44,8 +46,7 @@
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
#if HAVE_FW_MASQUERADE
......@@ -203,13 +204,13 @@ int ip_masq_info(int numeric, int ext)
ntotal += nread;
if (ntotal > 0) {
printf(NLS_CATGETS(catfd, libSet, lib_masq, "IP masquerading entries\n"));
printf(_("IP masquerading entries\n"));
switch(ext) {
case 1:
printf(NLS_CATGETS(catfd, libSet, lib_masq_tit1, "prot expire source destination ports\n"));
printf(_("prot expire source destination ports\n"));
break;
default:
printf(NLS_CATGETS(catfd, libSet, lib_masq_tit2, "prot expire initseq delta prevd source destination ports\n"));
printf(_("prot expire initseq delta prevd source destination ports\n"));
break;
}
for (i = 0; i < ntotal; i++)
......
......@@ -11,6 +11,7 @@
*960201 {0.01} Bernd Eckenfels: creation
*960202 {0.02} Bernd Eckenfels: HW and AF added
*960322 {0.03} Bernd Eckenfels: moved into the NET-LIB
*980630 {0.04} Arnaldo Carvalho de Melo: changed NLS for I18N
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -135,11 +136,11 @@ static char *Features=
/* ---------------------------------------------------- */
#if NLS
"+NLS"
#if I18N
"+I18N"
#else
"-NLS"
#endif /* NLS */
"-I18N"
#endif /* I18N */
"\nAF:"
......
/*
* lib/net-locale.h Headerfile for the NLS functions
*
* NET-LIB
*
* Version: lib/net-locale.h 0.51 (1996-03-22)
*
* Author: Bernd Eckenfels <net-tools@lina.inka.de>
* Copyright 1995-1996 Bernd Eckebnfels, Germany
*
* Modifications:
*960125 {0.50} Bernd Eckenfels: included Header, reformated
*960322 {0.51} Bernd Eckenfels: moved into lib/
*
*/
#ifndef NET_LOCALE_H
#define NET_LOCALE_H
#if NLS
# include <locale.h>
# include <nl_types.h>
# ifndef EXTERN
# define EXTERN
# else
# undef EXTERN
# define EXTERN extern
# endif
EXTERN nl_catd catfd;
char *strsave (char *);
char *str_in_buff (char *, int, char *);
# define NLS_CATINIT catinit ();
# define NLS_CATCLOSE(catfd) catclose (catfd);
# define NLS_CATGETS(catfd, arg1, arg2, fmt) \
catgets ((catfd), (arg1), (arg2), (fmt))
# define NLS_CATSAVE(catfd, arg1, arg2, fmt) \
strsave (catgets ((catfd), (arg1), (arg2), (fmt)))
# define NLS_CATBUFF(catfd, arg1, arg2, fmt, buf, len) \
str_in_buff (buf, len, catgets ((catfd), (arg1), (arg2), (fmt)))
# include "nettools-nls.h"
#else
# define NLS_CATINIT
# define NLS_CATCLOSE(catfd)
# define NLS_CATGETS(catfd, arg1, arg2, fmt) fmt
# define NLS_CATSAVE(catfd, arg1, arg2, fmt) fmt
# define NLS_CATBUFF(catfd, arg1, arg2, fmt, buf, len) strcpy (buf, fmt)
#endif
#endif /* NET_LOCALE_H */
......@@ -136,11 +136,12 @@ extern char afname[];
#define EINTERN(file, text) fprintf(stderr, \
"%s: Internal Error `%s'.\n",file,text);
#define ENOSUPP(A,B) fprintf(stderr, NLS_CATGETS(catfd, libSet, lib_nofeature, \
"%s: feature `%s' not supported.\nPlease recompile `net-tools' with newer kernel source or full configuration.\n"),A,B)
#define ENOSUPP(A,B) fprintf(stderr,\
_("%s: feature `%s' not supported.\n" \
"Please recompile `net-tools' with "\
"newer kernel source or full configuration.\n"),A,B)
#define ESYSNOT(A,B) fprintf(stderr, NLS_CATGETS(catfd, libSet, lib_sysnot, \
"%s: no support for `%s' on this system.\n"),A,B)
#define ESYSNOT(A,B) fprintf(stderr, _("%s: no support for `%s' on this system.\n"),A,B)
#define E_NOTFOUND 8
#define E_SOCK 7
......
......@@ -2,7 +2,7 @@
* lib/netrom.c This file contains an implementation of the "NET/ROM"
* support functions for the NET-2 base distribution.
*
* Version: @(#)netrom.c 1.20 12/16/93
* Version: @(#)netrom.c 1.21 07/01/98
*
* NOTE: I will redo this module as soon as I got the libax25.a
* library sorted out. This library contains some useful
......@@ -11,6 +11,11 @@
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Changes:
* 980701 {1.21} Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
* strncpy instead of strcpy for
* i18n strings
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -36,15 +41,12 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
static char netrom_errmsg[128];
extern struct aftype netrom_aftype;
static char *
NETROM_print(unsigned char *ptr)
{
......@@ -68,7 +70,7 @@ NETROM_sprint(struct sockaddr *sap, int numeric)
{
char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, netromSet, netrom_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof (buf));
return(NETROM_print(((struct sockaddr_ax25 *)sap)->sax25_call.ax25_call));
}
......@@ -90,7 +92,7 @@ NETROM_input(int type, char *bufp, struct sockaddr *sap)
c = *bufp++;
if (islower(c)) c = toupper(c);
if (! (isupper(c) || isdigit(c))) {
strcpy(netrom_errmsg, NLS_CATGETS (catfd, netromSet, netrom_debug1, "Invalid callsign"));
strncpy(netrom_errmsg, _("Invalid callsign"), sizeof(netrom_errmsg));
#ifdef DEBUG
fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig);
#endif
......@@ -103,7 +105,7 @@ NETROM_input(int type, char *bufp, struct sockaddr *sap)
/* Callsign too long? */
if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) {
strcpy(netrom_errmsg, NLS_CATGETS (catfd, netromSet, netrom_debug2, "Callsign too long"));
strncpy(netrom_errmsg, _("Callsign too long"), sizeof(netrom_errmsg));
#ifdef DEBUG
fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig);
#endif
......
......@@ -2,12 +2,16 @@
* lib/netrom_gr.c This file contains an implementation of the NET/ROM
* route support functions.
*
* Version: lib/netrom_gr.c 0.01 (1996-02-15)
* Version: lib/netrom_gr.c 0.02 (1998-07-01)
*
* Author: Bernd Eckenfels, <ecki@lina.inka.de>
* Copyright 1999 Bernd Eckenfels, Germany
* base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
*
* Changes:
* 980701 {0.02} Arnaldo Carvalho de Melo GNU gettext instead of catgets
*
*
* 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
......@@ -22,8 +26,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* UGLY */
......@@ -38,11 +41,11 @@ int NETROM_rprint(int options)
if(f1==NULL||f2==NULL)
{
printf(NLS_CATGETS(catfd, netstatSet, netstat_nonetrom, "NET/ROM not configured in this system.\n")); /* xxx */
printf(_("NET/ROM not configured in this system.\n")); /* xxx */
return 1;
}
printf(NLS_CATGETS(catfd, netstatSet, netstat_netrom, "Kernel NET/ROM routing table\n")); /* xxx */
printf(NLS_CATGETS(catfd, netstatSet, netstat_header_netrom, "Destination Mnemonic Quality Neighbour Iface\n")); /* xxx */
printf(_("Kernel NET/ROM routing table\n")); /* xxx */
printf(_("Destination Mnemonic Quality Neighbour Iface\n")); /* xxx */
fgets(buffer,256,f1);
while(fgets(buffer,256,f1))
{
......
......@@ -20,27 +20,28 @@
#include "version.h"
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#include "net-features.h"
extern struct aftype netrom_aftype;
/* static int skfd = -1; */
/* acme: orphaned... */
#if 0
static int usage(void)
{
fprintf(stderr,"netrom usage\n");
fprintf(stderr,_("netrom usage\n"));
return(E_USAGE);
}
#endif
int NETROM_rinput(int action, int ext, char **args)
{
fprintf(stderr,"NET/ROM: this needs to be written\n");
fprintf(stderr,_("NET/ROM: this needs to be written\n"));
return(0);
}
#endif /* HAVE_AFNETROM */
......@@ -2,12 +2,15 @@
* lib/ppp.c This file contains the SLIP support for the NET-2 base
* distribution.
*
* Version: @(#)slip.c 1.10 10/07/93
* Version: @(#)slip.c 1.12 01/07/98
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
*
* Modified by Alan Cox, May 94 to cover NET-3
*
* Changes:
* 980701 {1.12} Arnaldo Carvalho de Melo - GNU gettext instead of catgets
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -33,15 +36,13 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* Start the PPP encapsulation on the file descriptor. */
static int
do_ppp(int fd)
{
fprintf(stderr,NLS_CATGETS(catfd, pppSet, ppp_cant_start, "You cannot start PPP with this program.\n"));
fprintf(stderr,_("You cannot start PPP with this program.\n"));
return -1;
}
......
......@@ -30,14 +30,12 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* Start the VJ-SLIP encapsulation on the file descriptor. */
int PPP_activate(int fd)
{
fprintf(stderr,"Sorry, use pppd!\n"); /* FIXME */
fprintf(stderr,_("Sorry, use pppd!\n")); /* FIXME */
return(-1);
}
......
......@@ -33,8 +33,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
#if __GLIBC__ >= 2
#include <netrose/rose.h>
......@@ -49,7 +48,7 @@ ROSE_print(unsigned char *ptr)
{
static char buff[12];
sprintf(buff,"%02x%02x%02x%02x%02x",ptr[0],ptr[1],ptr[2],ptr[3],ptr[4]);
snprintf(buff,sizeof(buff),"%02x%02x%02x%02x%02x",ptr[0],ptr[1],ptr[2],ptr[3],ptr[4]);
buff[10] = '\0';
return(buff);
}
......@@ -58,10 +57,9 @@ ROSE_print(unsigned char *ptr)
static char *
ROSE_sprint(struct sockaddr *sap, int numeric)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, roseSet, rose_none, "[NONE SET]", buf, 64));
return _("[NONE SET]");
return(ROSE_print(((struct sockaddr_rose *)sap)->srose_addr.rose_addr));
}
......@@ -77,7 +75,7 @@ ROSE_input(int type, char *bufp, struct sockaddr *sap)
/* Node address the correct length ? */
if (strlen(bufp)!=10) {
strcpy(ROSE_errmsg, NLS_CATGETS (catfd, roseSet, rose_debug2, "Node address must be ten digits"));
strcpy(ROSE_errmsg, _("Node address must be ten digits"));
#ifdef DEBUG
fprintf(stderr, "rose_input(%s): %s !\n", ROSE_errmsg, orig);
#endif
......@@ -115,10 +113,9 @@ ROSE_herror(char *text)
static char *
ROSE_hprint(struct sockaddr *sap)
{
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, roseSet, rose_none, "[NONE SET]", buf, 64));
return _("[NONE SET]");
return(ROSE_print(((struct sockaddr_rose *)sap)->srose_addr.rose_addr));
}
......
......@@ -36,8 +36,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
int ROSE_rprint(int options)
{
......@@ -47,11 +46,11 @@ int ROSE_rprint(int options)
if(f==NULL)
{
printf(NLS_CATGETS(catfd, netstatSet, netstat_norose, "ROSE not configured in this system.\n")); /* xxx */
printf(_("ROSE not configured in this system.\n")); /* xxx */
return 1;
}
printf(NLS_CATGETS(catfd, netstatSet, netstat_rose, "Kernel ROSE routing table\n")); /* xxx */
printf(NLS_CATGETS(catfd, netstatSet, netstat_header_rose, "Destination Iface Use\n")); /* xxx */
printf(_("Kernel ROSE routing table\n")); /* xxx */
printf(_("Destination Iface Use\n")); /* xxx */
fgets(buffer,256,f);
while(fgets(buffer,256,f))
{
......
......@@ -30,7 +30,7 @@
#include "pathnames.h"
#include "version.h"
#include "config.h"
#include "net-locale.h"
#include "intl.h"
extern struct aftype unspec_aftype;
extern struct aftype unix_aftype;
......@@ -75,12 +75,12 @@ route_edit(int action, const char *afname, int options, char **argv)
ap = get_aftype(afname);
if (!ap) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_route_no_support, "Address family `%s' not supported.\n"),afname);
fprintf(stderr,_("Address family `%s' not supported.\n"),afname);
return(E_OPTERR);
}
if (!ap->rinput) {
fprintf(stderr,NLS_CATGETS(catfd, netstatSet, netstat_type_no_route, "No routing for address family `%s'.\n"),ap->name);
fprintf(stderr,_("No routing for address family `%s'.\n"),ap->name);
return(E_OPTERR);
}
......
......@@ -32,9 +32,6 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
struct hwtype sit_hwtype = {
"sit", NULL, /*"IPv6-in-IPv4",*/ ARPHRD_SIT, 0,
......
......@@ -32,8 +32,6 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
struct hwtype slip_hwtype = {
......
......@@ -34,8 +34,6 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
/* Set the line discipline of a terminal line. */
......
......@@ -29,7 +29,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#include "intl.h"
extern struct hwtype tr_hwtype;
......@@ -40,7 +40,7 @@ pr_tr(unsigned char *ptr)
{
static char buff[64];
sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X",
snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
);
......@@ -78,7 +78,7 @@ in_tr(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val = c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, "in_tr(%s): invalid token ring address!\n", orig);
fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -90,7 +90,7 @@ in_tr(char *bufp, struct sockaddr *sap)
else if (c >= 'A' && c <= 'F') val |= c - 'A' + 10;
else {
#ifdef DEBUG
fprintf(stderr, "in_tr(%s): invalid token ring address!\n", orig);
fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig);
#endif
errno = EINVAL;
return(-1);
......@@ -102,7 +102,7 @@ in_tr(char *bufp, struct sockaddr *sap)
if (*bufp == ':') {
if (i == TR_ALEN) {
#ifdef DEBUG
fprintf(stderr, "in_tr(%s): trailing : ignored!\n",
fprintf(stderr, _("in_tr(%s): trailing : ignored!\n"),
orig)
#endif
; /* nothing */
......@@ -114,7 +114,7 @@ in_tr(char *bufp, struct sockaddr *sap)
/* That's it. Any trailing junk? */
if ((i == TR_ALEN) && (*bufp != '\0')) {
#ifdef DEBUG
fprintf(stderr, "in_tr(%s): trailing junk!\n", orig);
fprintf(stderr, _("in_tr(%s): trailing junk!\n"), orig);
errno = EINVAL;
return(-1);
#endif
......
......@@ -18,9 +18,6 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
extern struct hwtype ether_hwtype;
......
......@@ -27,8 +27,7 @@
#include <unistd.h>
#include "net-support.h"
#include "pathnames.h"
#define EXTERN
#include "net-locale.h"
#include "intl.h"
/* Display an UNSPEC address. */
......@@ -55,7 +54,7 @@ UNSPEC_sprint(struct sockaddr *sap, int numeric)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, unixSet, unix_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof(buf));
return(UNSPEC_print(sap->sa_data));
}
......@@ -77,7 +76,7 @@ UNIX_sprint(struct sockaddr *sap, int numeric)
static char buf[64];
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return(NLS_CATBUFF (catfd, unixSet, unix_none, "[NONE SET]", buf, 64));
return strncpy (buf, _("[NONE SET]"), sizeof(buf));
return(UNIX_print(sap->sa_data));
}
......
......@@ -5,12 +5,15 @@
# NET-3 Networking Distribution for the LINUX operating
# system.
#
# Version: Makefile 0.01 (1996-03-22)
# Version: Makefile 0.02 (1998-07-01)
#
# Author: Bernd Eckenfels <net-tools@lina.inka.de>
# Authors: Bernd Eckenfels <net-tools@lina.inka.de>
# Arnaldo Carvalhoa de Melo <acme@conectiva.com.br>
# Copyright 1995-1996 Bernd Eckebnfels, Germany
# 1998 Arnaldo Carvalho de Melo, Brazil
#
#960322 {0.01} Bernd Eckenfels: creation to make main Makefile cleaner
#980701 {0.02} Arnaldo C. Melo: making the main Makefile *more* cleaner :)
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
......@@ -19,6 +22,7 @@
# your option) any later version.
#
INSTALL=install
all:
......@@ -28,4 +32,23 @@ clean:
clobber: clean
install:
LANGS=`ls -d * | grep -v Makefile` ; \
for LANG in $$LANGS; do \
cd $$LANG; \
for SECTION in 1 8; do \
if [ "$$LANG" = "en_US" ] ; then \
MAN_DIR=${BASEDIR}/usr/man/man$$SECTION; \
else \
MAN_DIR=${BASEDIR}/usr/man/$$LANG/man$$SECTION; \
fi ; \
$(INSTALL) -d -m 755 -o 0 -g 0 $$MAN_DIR; \
CMDS=`ls *.$$SECTION`; \
for CMD in $$CMDS; do \
$(INSTALL) -m 644 -o 0 -g 0 $$CMD $$MAN_DIR; \
done; \
done; \
cd ..; \
done
# End of man/Makefile.
......@@ -160,10 +160,7 @@ Set the multicast flag on the interface. This should not normally be needed
as the drivers set the flag correctly themselves.
.TP
.B address
The address to be assigned to this interface.
For Inet addresses you may use address/prefixlength to specify the default
netmask.
The IP address to be assigned to this interface.
.TP
.B txqueuelen length
Set the length of the transmit queue of the device. It is useful to set this
......
......@@ -11,7 +11,7 @@ route \- show / manipulate the IP routing table
family]
.B add
.RB [ \-net | \-host ]
target[/prefix]
target
.RB [ netmask
Nm]
.RB [ gw
......@@ -117,11 +117,9 @@ deletes a route.
adds a route.
.TP
.B target [/prefix]
.B target
The destination network or host. You can provide IP addresses in dotted
decimal or host/network names.
Prefix is the optional network prefix length attached to targetx, which can
be used instead of the netmask parameter.
.TP
.B netmask Nm
......
.TH ARP 8 "22 de junho de 1996" "net-tools" "Manual do Programador Linux"
.SH NOME
arp \- manipula o cache ARP do sistema
.SH SINOPSE
.B arp
.RB [ \-vn ]
.RB [ "\-H tipo" ]
.RB [ "-i if" ]
.B -a
.RB [ máquina ]
.PP
.B arp
.RB [ \-v ]
.RB [ "\-i if" ]
.B "\-d máquina"
.RB [ pub ]
.RB [ nopub ]
.PP
.B arp
.RB [ \-v ]
.RB [ "\-H tipo" ]
.RB [ "\-i if" ]
.B -s máquina endereço_hardware
.RB [ temp ]
.RB [ nopub ]
.PP
.B arp
.RB [ \-v ]
.RB [ "\-H tipo" ]
.RB [ "\-i if" ]
.B -s máquina endereço_hardware
.RB [ "netmask nm" ]
.B pub
.PP
.B arp
.RB [ \-v ]
.RB [ "\-H tipo" ]
.RB [ "\-i if" ]
.B -Ds máquina ifa
.RB [ "netmask nm" ]
.B pub
.PP
.B arp
.RB [ \-vnD ]
.RB [ "\-H tipo" ]
.RB [ "-i if" ]
.B -f arquivo
.SH DESCRIÇÃO
.B arp
manipula o cache ARP do kernel de várias maneiras. As principais opções
são remoção de uma entrada de mapeamento de endereço e configuração manual
de um endereço. Para propósitos de depuração, o programa
.B arp
também permite um dump completo do cache ARP.
.SH OPÇÕES
.TP
.B "\-v, \-\-verbose"
Mostra ao usuário o que está acontecendo, de modo detalhado.
.TP
.B "\-n, \-\-numeric"
mostra endereços numéricos, ao invés de tentar determinar os nomes simbólicos da
máquina, porta e usuário.
.TP
.B "\-H type, \-\-hw-type type"
Quando configurando ou lendo o cache ARP, este parâmetro opcional informa ao
.B arp
que classe de entradas devem ser verificadas. O valor padrão deste parâmetro é
.B ether
(i.e. código de hardware 0x01 para Ethernet IEEE 802.3 10Mbps).
Outros valores podem incluir tecnologias de rede como
.RB "ARCnet (" arcnet ")"
,
.RB "PROnet (" pronet ")"
,
.RB "AX.25 (" ax25 ")"
e
.RB "NET/ROM (" netrom ")."
.TP
.B "\-a [máquina], \-\-display [máquina]"
Mostra as entradas das máquinas especificadas. Se o parâmetro
.B máquina
não for usado,
.B todas
as entradas serão mostradas.
.TP
.B "\-d máquina, \-\-delete máquina"
Remove quaisquer entradas para a máquina especificada. Isto pode ser
usado se a máquina indicada for desligada, por exemplo. Nos kernels
mais recentes o
.BR arp (1)
suporta a especificação de
.B pub
ou
.B nopub
para decidir se uma entrada pública ou privada deve ser removida. Se você
não informar uma destas flags as duas entradas serão removidas.
.TP
.B "\-D, \-\-use-device"
Usa o endereço de hardware da interface
.BR ifa
.TP
.B "\-i If, \-\-device If"
Seleciona uma interface. Quando mostrando o cache ARP somente entradas iguais
à interface serão mostradas. Configura uma entrada ARP permanente ou
temporária que será usada no dispositivo especificado. Se nenhum dispositivo for
informado, o kernel descobre o dispositivo a partir da tabela de roteamento.
Para entradas
.B pub
a interface especificada é a interface na qual as requisições ARP serão
respondidas.
.br
.B NOTA:
Deve ser diferente da interface para a qual os pacotes IP serão roteados.
.TP
.B "\-s máquina endereço_hardware, \-\-set máquina"
Cria manualmente uma entrada de mapeamento de endereço ARP para a máquina
.B máquina
com endereço de hardware configurado para
.B endereço_hardware.
O formato do endereço de hardware depende da classe de hardware, mas
para a maioria das classes pode-se assumir que a apresentação usual pode
ser usada. Para a classe Ethernet, são 6 bytes em hexadecimal, separados
por dois pontos (:). Quando adicionando entradas proxy arp (isto é, aquelas
com a flag
.BR púb lico
setadas) uma
.B netmask
pode ser especificada para o proxy arp de uma subrede inteira.
Proxy arp para rotear redes inteiras não é um bom protocolo, mas algumas
vezes é útil, então é suportado. Se a flag
.B temp
não for fornecida, as entradas serão permanentemente armazenadas no cache ARP.
.TP
.B "\-f arquivo, \-\-file arquivo"
Similar à opção
.B \-s
só que desta vez as informações de endereços são obtidas a partir do arquivo
.B arquivo.
Isto pode ser usado se entradas ARP para muitas máquinas tiverem que ser
configuradas. O nome do arquivo de dados é freqüentemente
.IR /etc/ethers ,
mas isto não é oficial.
.sp 1
O formato deste arquivo é simples; ele somente contém linhas de texto ASCII com
um nome de máquina e um endereço de hardware separados por um espaço em branco.
Adicionalmente as flags
.BR "pub" , " nopub" , " temp" " and" " netmask"
podem ser usadas.
.LP
Em todos os lugares onde uma
.B máquina
é esperada, você também pode informar um
.B "endereço IP"
em notação decimal separada por pontos.
.LP
Cada entrada completa no cache ARP será marcada com uma flag
.BR C .
Entradas permanentes são marcadas com um
.B M
e entradas publicadas tem uma flag
.BR P .
.SH ARQUIVOS
.I /proc/net/arp,
.br
.I /etc/networks
.br
.I /etc/hosts
.br
.I /etc/ethers
.SH AUTOR
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> com muitas melhorias
feitas pelo mantenedor do net-tools, Bernd Eckenfels <net-tools@lina.inka.de>.
Tradução para a língua portuguesa feita por
Arnaldo Carvalho de Melo <acme@conectiva.com.br> em 11/abril/1998.
Revisado por
Jorge Luiz Godoy Filho <jorge@bestway.com.br> em 15/abril/1998.
.so man1/hostname.1
.so man1/hostname.1
.TH HOSTNAME 1 "28 de janeiro de 1996" "net-tools" "Manual do Programador Linux"
.SH NOME
hostname \- mostra ou configura o nome da máquina
.BR
domainname \- mostra ou configura o nome do domínio NIS/YP
.BR
dnsdomainname \- mostra o nome do domínio DNS
.BR
nisdomainname \- mostra ou configura o nome do domínio NIS/YP
.BR
ypdomainname \- mostra ou configura o nome do domínio NIS/YP
.SH SINOPSE
.B hostname
.RB [ \-v ]
.RB [ \-a ]
.RB [ \-\-alias ]
.RB [ \-d ]
.RB [ \-\-domain ]
.RB [ \-f ]
.RB [ \-\-fqdn ]
.RB [ \-i ]
.RB [ \-\-ip-address ]
.RB [ \-\-long ]
.RB [ \-s ]
.RB [ \-\-short ]
.RB [ \-y ]
.RB [ \-\-yp ]
.RB [ \-\-nis ]
.PP
.B hostname
.RB [ \-v ]
.RB [ \-F\ arquivo ]
.RB [ \-\-file\ arquivo ]
.RB [ máquina ]
.PP
.B domainname
.RB [ \-v ]
.RB [ \-F\ filename ]
.RB [ \-\-file\ nome_arquivo ]
.RB [ nome ]
.PP
.B hostname
.RB [ \-v ]
.RB [ \-h ]
.RB [ \-\-help ]
.RB [ \-V ]
.RB [ \-\-version ]
.PP
.B dnsdomainname
.RB [ \-v ]
.LP
.B nisdomainname
.RB [ \-v ]
.LP
.B ypdomainname
.RB [ \-v ]
.SH DESCRIÇÃO
.B hostname
é o programa usado para configurar ou mostrar o nome corrente da máquina
ou o domínio do sistema. Este nome é usado por muitos dos programas de
rede para identificar a máquina. O nome do domínio também é usado pelo
NIS/YP.
.SS "OBTER NOME"
Quando chamado sem argumentos o programa mostra os nomes correntes:
.LP
.B hostname
mostrará o nome do sistema conforme retornado pela função
.BR gethostname (2).
.LP
.B "domainname, nisdomainname, ypdomainname"
mostrará o nome do sistema conforme retornado pela função
.BR getdomainname (2).
Isto também é conhecido como o nome de domínio YP/NIS do sistema.
.LP
.B dnsdomainname
mostrara a parte do domínio do FQDN (Nome de domínio completamente qualificado).
O FQDN do sistema é retornado pelo comando
.BR "hostname \-\-fqdn" .
.SS "CONFIGURAR NOME"
Quando chamado com um argumento ou com a opção
.B \-\-file
, o comando configura o nome da máquina ou do domínio NIS/YP.
.LP
Note que somente o super usuário pode mudar os nomes.
.LP
Nao é possível configurar o FQDN ou o nome do domínio DNS com o comando
.B dnsdomainname
(veja
.B "O FQDN"
abaixo).
.LP
O nome da máquina é normalmente configurado durante a inicialização do sistema,
em
.I /etc/rc.d/rc.inet1
ou
.I /etc/init.d/boot
(normalmente lendo o conteúdo de um arquivo que contém o nome da máquina, ex.:
.IR /etc/hostname ).
.SS O FQDN
Você não pode mudar o FQDN (conforme retornado por
.BR "hostname \-\-fqdn" )
ou o nome do domínio DNS (conforme retornado por
.BR "dnsdomainname" )
com este comando. O FQDN do sistema é o nome que o
.BR resolver (3)
retorna para o nome da máquina.
.LP
Tecnicamente: O FQDN é o nome retornado pelo
.BR gethostbyname (2)
para o nome retornado pelo
.BR gethostname (2).
O nome do domínio DNS é a parte após o primeiro ponto.
.LP
Portanto isto depende da configuração (normalmente em
.IR /etc/host.conf )
para que você possa mudá-lo. Normalmente (se o arquivo hosts for lido antes
do DNS ou NIS) você pode mudá-lo em
.IR /etc/hosts .
.SH OPÇÕES
.TP
.I "\-a, \-\-alias"
Mostra o alias da máquina (se usado).
.TP
.I "\-d, \-\-domain"
Mostra o nome do domínio DNS. Não use o comando
.B domainname
para obter o nome do domínio DNS porque ele mostrará o nome do domínio NIS e
não o nome do domínio DNS. Use
.BR dnsdomainname .
.TP
.I "\-F, \-\-file arquivo"
Leia o nome da máquina a partir do arquivo especificado. Comentários (linhas
começando com um `#') são ignorados.
.TP
.I "\-f, \-\-fqdn, \-\-long"
Mostra o FQDN (Nome de Domínio Completamente Qualificado). Um FQDN consiste de
um nome curto de máquina e do nome do domínio DNS. A menos que você esteja
usando bind ou NIS para resolução de nomes você pode mudar o FQDN e o nome
do domínio DNS (que é parte do FQDN) no arquivo \fI/etc/hosts\fR.
.TP
.I "\-h, \-\-help"
Mostra uma mensagem sobre como utilizar o comando e termina.
.TP
.I "\-i, \-\-ip-address"
Mostra o(s) endereço(s) IP da máquina.
.TP
.I "\-s, \-\-short"
Mostra o nome curto da máquina. É o nome da máquina até o primeiro ponto.
.TP
.I "\-V, \-\-version"
Mostra informação de versão na saída padrão e termina com sucesso.
.TP
.I "\-v, \-\-verbose"
Mostra uma saída detalhada do que está acontecendo.
.TP
.I "\-y, \-\-yp, \-\-nis"
Mostra o nome do domínio NIS. Se um parâmetro for especificado (ou
.B \-\-file arquivo
) então o root também pode configurar um novo domínio NIS.
.SH ARQUIVOS
.B /etc/hosts
.SH AUTOR
Peter Tobias, <tobias@et-inf.fho-emden.de>
.BR
Bernd Eckenfels, <net-tools@lina.inka.de> (NIS e página man).
.BR
Arnaldo Carvalho de Melo, <acme@conectiva.com.br> Tradução para a língua
portuguesa.
.BR
Jorge Luiz Godoy Filho, <jorge@bestway.com.br> Revisão.
.BR
.TH IFCONFIG 8 "10 de fevereiro de 1996" "net-tools" "Manual do Programador Linux"
.SH NOME
ifconfig \- configura uma interface de rede
.SH SINOPSE
.B "ifconfig [interface]"
.br
.B "ifconfig interface [aftype] opções | endereços ..."
.SH DESCRIÇÃO
.B ifconfig
é usado para configurar (e posteriormente manter) as interfaces de
rede. É usado durante o boot para configurar a maioria delas para
um estado usável. Depois disto, é normalmente somente necessário
durante depurações ou quando for necessária uma configuração fina
do sistema.
.LP
Se nenhum argumento for informado,
.B ifconfig
somente mostra o estado das interfaces correntemente definidas. Se
um argumento
.B interface
for informado, ele mostra somente o estado da interface informada. De
outra forma ele assume que os parâmetros devem ser configurados.
.SH Famílias de Endereçamento
Se o primeiro argumento após o nome da interface for reconhecido
como um nome de uma família de endereçamento suportada, esta família
de endereçamento é usada na decodificação e apresentação de todos
os endereços de protocolos. Atualmente as famílias de endereçamento
suportadas incluem
.B inet
(TCP/IP, default)
.B ax25
(AMPR Packet Radio),
.B ddp
(Appletalk Phase 2),
.B ipx
(Novell IPX) and
.B netrom
(AMPR Packet radio).
.SH OPÇÕES
.TP
.B interface
O nome da interface de rede. Usualmente é um nome como
.B eth0
,
.B sl3
ou algo parecido: um nome de driver de dispositivo seguido por um
número.
.TP
.B up
Esta flag causa a ativação da interface. É especificada
implicitamente se a interface receber um novo endereço (veja
abaixo).
.TP
.B down
Esta flag desativa o driver desta interface, é útil quando alguma
coisa começar a ter problemas.
.TP
.B "[\-]arp"
Habilita ou desabilita o uso do protocolo ARP para esta interface. Se
o sinal de menos (\-) estiver presente a opção é desligada.
.TP
.B "[\-]trailers"
Habilita ou desabilita o uso de trailer em frames Ethernet. Não é
utilizada na implementação atual do pacote net-tools.
.TP
.B "[\-]allmulti"
Habilita ou desabilita o modo
.B promiscuous
da interface. Isto significa que todos os frames passarão pela camada
de rede do kernel, permitindo monitoração da rede.
.TP
.B "metric N"
Este parâmetro configura a métrica da interface. Não é usado atualmente,
mas será implementado no futuro.
.TP
.B "mtu N"
Este parâmetro configura a Unidade Máxima de Transferência (MTU) de uma
interface. Para Ethernet é um número entre 1000-2000 (o padrão é
1500). Para SLIP, use algo entre 200 e 4096. Note que a implementação
atual não manipula fragmentação IP ainda, então é melhor configurar
a MTU com um tamanho adequado!
.TP
.B "dstaddr addr"
Configura o endereço IP do "outro lado" no caso de um link Ponto-A-Ponto,
como PPP. Esta palavra-chave tornou-se obsoleta e deve ser usada a nova
palavra-chave
.BR pointopoint .
.TP
.B "netmask addr"
Configura a máscara de rede IP para esta interface. Este valor assume o
padrão usual das classes A, B ou C (deduzindo-o a partir do endereço
IP da interface), mas pode ser configurado para qualquer valor para o
uso de sub-redes.
.TP
.B "irq addr"
Configura a linha de interrupção (IRQ) usada por este dispositivo. Muitos
dispositivos não suportam configuração dinâmica de IRQ.
.TP
.B "[-]broadcast [endereço]"
Se o argumento endereço for informado, configura o endereço de protocolo
broadcast para esta interface. De outra forma ele somente configura a flag
.B IFF_BROADCAST
da interface. Se a palavra-chave for precedida por um sinal de menos
.B (-)
, então a flag é removida.
.TP
.B "[-]pointopoint [endereço]"
Esta palavra-chave habilita o modo
.B ponto-a-ponto
da interface, significando que ela é um link direto entre duas máquinas
sem ninguém ouvindo (ou, pelo menos nós esperamos que este seja o caso
:-)
.BR
Se o argumento endereço for informado, configura o endereço de protocolo
do outro lado do link, exatamente como a palavra-chave obsoleta
.B dstaddr
faz. De outra forma, ela somente configura a flag
.B IFF_POINTOPOINT
da interface. Se a palavra-chave for precedida por um sinal de menos
.B (-)
, então a flag é removida.
.TP
.B "hw"
Configura o endereço de hardware para esta interface, se o driver do
dispositivo suportar esta operação. A palavra-chave deve ser seguida
pelo nome da classe do hardware e o equivalente em ASCII do endereço
de hardware. As classes de hardware atualmente suportadas incluem
.B ether
(Ethernet),
.B ax25
(AMPR AX.25),
.B ARCnet
e
.B netrom
(AMPR NET/ROM).
.TP
.B multicast
Inicializa a flag de multicast para a interface. Normalmente, isto não será
necessário já que os drivers ajustam as flags corretas por si só.
.TP
.B endereço
O nome ou endereço IP da máquina (um nome de máquina será traduzido para
um endereço IP) da interface. Este parâmetro é necessário, apesar
da sintaxe atualmente não requisitá-lo.
.SH ARQUIVOS
.I /proc/net/socket
.br
.I /proc/net/dev
.br
.I /etc/init.d/network
.SH BUGS
Os endereços appletalk DDP e IPX serão mostrados, mas não podem ser alterados
com este comando.
.SH AUTORES
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
Alan Cox, <Alan.Cox@linux.org>
.SH TRADUÇÃO E REVISÃO PARA A LÍNGUA PORTUGUESA
Arnaldo Carvalho de Melo <acme@conectiva.com.br> (tradução)
.BR
Jorge Luiz Godoy Filho <jorge@bestway.com.br> (revisão)
This diff is collapsed.
.so man1/hostname.1
.TH RARP 8 "10 de fevereiro de 1996" "net-tools" "Manual do Programador Linux"
.SH NOME
rarp \- manipula a tabela RARP do sistema
.SH SINOPSE
.B "rarp [-v] [-t tipo] -a [máquina]"
.br
.B "rarp [-v] -d máquina ..."
.br
.B "rarp [-v] [-t tipo] -s máquina endereço_hardware"
.SH DESCRIÇÃO
.B Rarp
manipula as tabelas RARP do kernel de varias formas. As opções principais
são limpar uma entrada de mapeamento de endereços e manualmente configurar uma.
Para propósitos de depuração, o programa
.B arp
também permite um dump completo da tabela ARP.
.SH OPÇÕES
.TP
.B \-v
Informe o usuário o que esta acontecendo, sendo detalhado.
.TP
.B "\-t tipo"
quando configurando ou lendo a tabela RARP, este parâmetro opcional informa ao
.B rarp
que classe de entradas devem ser verificadas. O valor default para este parâmetro
é
.B ether
(i.e. código de hardware
.B 0x01
para
.B "IEEE 802.3 10Mbps Ethernet."
Outros valores podem incluir tecnologias de rede como
.B AX.25 (ax25)
e
.B NET/ROM (netrom).
.TP
.B "\-a [máquina]"
Mostra as entradas dos máquinas especificadas. Se o
Mostra as entradas das máquinas especificadas. Se o parâmetro
.B máquina
não for usado
.B todas
as entradas serão mostradas.
.TP
.B "\-d máquina"
Remove a(s) entrada(s) para a máquina especificada. Isto pode ser usado se a
máquina indicada for desligada, por exemplo.
.TP
.B "\-s máquina endereço_hardware"
Cria um mapeamento de endereços RARP para a máquina
.B máquina
com endereço de hardware configurado para
.B endereço_hardware
. O formato do endereço de hardware depende da classe do hardware, mas
para a maioria das classes você pode assumir que a apresentação usual pode
ser usada. Para a classe Ethernet, são 6 bytes em hexadecimal, separados
por dois pontos (:).
.SH ATENÇÃO
Alguns arquivos (principalmente Suns velhas) assumem que a máquina respondendo
ao query ARP também podem oferecer outros serviços de boot remoto. Portanto
nunca adiciona gratuitamente entradas rarp a menos que deseje encontrar a fúria
do administrador da rede.
.SH ARQUIVOS
.I /proc/net/rarp,
.SH AUTORES
Ross D. Martin, <martin@trcsun3.eas.asu.edu>
.br
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
.SH TRADUÇÃO
Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 13/04/1998
.TH ROUTE 8 "27 Jan 1996" "net-tools" "Manual do Programador Linux"
.SH NOME
route \- mostra / manipula a tabela de roteamento IP
.SH SINOPSE
.B route
.RB [ \-vnee ]
.TP
.B route
.RB [ \-v ]
.B add
.RB [ \-net | \-host ]
Alvo
.RB [ netmask
Nm]
.RB [ gw
Gw]
.RB [ metric
N]
.RB [ mss
M]
.RB [ window
W]
.RB [ irtt
I]
.RB [ reject ]
.RB [ mod ]
.RB [ dyn ]
.RB [ reinstate ]
.RB [[ dev ]
If]
.TP
.B route
.RB [ \-v ]
.B del
.RB [ \-net | \-host ]
Alvo
.RB [ gw
Gw]
.RB [ netmask
Nm]
.RB [ metric
N]
.RB [[ dev ]
If]
.TP
.B route
.RB [ \-V ]
.RB [ \-\-version ]
.RB [ \-h ]
.RB [ \--help ]
.SH DESCRICAO
.B Route
manipula a tabela de roteamento IP do kernel. Seu principal uso é
configurar rotas estáticas para hosts ou redes especificadas através de
uma interface, após a mesma ter sido configurada com o programa
.BR ifconfig (8)
.
.SH OPÇÕES
.TP
.B \-v
flag para detalhamento (não usada).
.TP
.B \-n
mostra endereços numéricos, sem tentar resolver o nomes simbólicos das
máquinas. Útil se você esta tentando determinar por que a rota para o seu
servidor de nomes sumiu.
.TP
.B \-e
use o formato
.BR netstat (8)
na apresentação da tabela de roteamento.
.B \-ee
produzira uma linha bem grande com todos os parâmetros da tabela de roteamento.
.TP
.B \-net
o
.B Alvo
é o endereço de uma rede (encontrado no arquivo
.I /etc/networks
pela função
.BR getnetbyname (2)
).
.TP
.B -host
é o endereço de uma máquina (descoberto com a função
.BR gethostbyname (2)
).
.TP
.B (nenhum)
displays the kernel routing table. The layout can be changed with
mostra a tabela de roteamento do kernel. O layout pode ser alterado com
.B \-e
e
.B \-ee
.
.TP
.B del
remove uma rota.
.TP
.B add
adiciona uma rota.
.TP
.B Alvo
A máquina ou rede destino. Você pode fornecer endereços IP em formato
decimal separado por pontos ou nomes de máquinas/redes.
.TP
.B netmask Nm
modificador para especificar a mascara de rede da rota a ser adicionada.
Somente faz sentido para uma rota para uma rede e quanto o endereço
.B Alvo
é valido com relação a mascara especificada. Se nenhuma mascara de rede
for especificada, o comando
.B route
descobre-a, desta forma, para a maioria das configurações normais você não
precisa especificar uma mascara de rede.
.TP
.B gw Gw
Quaisquer pacotes IP para a rede/máquina destino serão roteadas através
do gateway/roteador especificado.
.B NOTA:
O gateway especificado deve ser alcançável antes deste comando. Isto
normalmente significa que você terá que configurar uma rota estática para
o gateway antes de emitir este comando. Se você especificar o endereço
de uma de suas interfaces locais, isto será usado para decidir sobre
qual interface deve ser usada para rotear os pacotes. Isto esta disponível
para manter compatibilidade com os sistemas baseados em BSD.
.TP
.B metric M
Configura o campo de métrica na tabela de roteamento, usado em daemons
para roteamento dinâmico.
.TP
.B mss M
Especifica o Tamanho Máximo do Segmento TCP em Bytes (MSS) para conexões
TCP através desta rota. Isto é normalmente usado somente para otimização
fina de configurações de roteamento. O default é 536.
.TP
.B window W
Especifica o tamanho da janela TCP para conexões TCP através desta rota.
Tipicamente somente usado para redes AX.25 e em drivers incapazes de
de tratar frames back to back.
.TP
.B irtt I
Especifica o tempo de ida e volta inicial (irtt) para conexões TCP através
desta rota. Tipicamente usado somente em redes AX.25. O numero é especificado
em milisegundos (1-12000). Se omitido o default da RFC 1122 de 300ms é usado.
.TP
.B reject
Instala uma rota de bloqueio, que forçará falha na procura por esta rota.
Exemplo de utilização: bloquear rotas antes do uso da rota default.
Isto não é firewalling.
.TP
.B mod, dyn, reinstate
Instala uma rota modificada ou dinâmica. Ambas as flags são geralmente somente
configuradas por um daemon de roteamento. Somente para propósitos de diagnostico.
.TP
.B dev If
Força a associação da rota com o dispositivo especificado, pois o kernel
de outra forma tentara determinar o dispositivo por conta própria
(através da checagem de rotas e especificações de dispositivos já existentes
e onde a rota esta adicionada).
If
.B dev If
é a última opção na linha de comando, a palavra
.B dev
pode ser omitida, pois é o default. De outra forma a ordem dos outros
modificadores do route (metric - netmask - gw - dev) não importa.
.SH EXEMPLOS
.TP
.B route add -net 127.0.0.0
Adiciona a entrada para a interface loopback normal, usando mascara igual
a 255.0.0.0 (rede classe A, determinada a partir do endereço de destino),
associada ao dispositivo "lo" (assumindo que este dispositivo tenha sido
previamente configurado com o
.BR ifconfig (8)).
.TP
.B route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
Adiciona uma rota para a rede 192.56.76.x através da interface "eth0". O
modificador de mascara classe C não é realmente necessário aqui por que
192.* é um endereço IP de classe C. A palavra "dev" pode ser omitida aqui.
.TP
.B route add default gw mango-gw
Adiciona uma rota default (que será usada se nenhuma outra rota for encontrada).
Todos os pacotes que usarem esta rota serão passados para a máquina "mango-gw".
O dispositivo que será utilizado para esta rota depende de como é possível
alcançar "mango-gw" - a rota estática para "mango-gw" terá que ser configurada
previamente.
.TP
.B route add ipx4 sl0
Adiciona uma rota para a máquina "ipx4" através da interface SLIP (assumindo
que "ipx4" é a máquina SLIP).
.TP
.B route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
Este comando adiciona a rede "192.57.66.x" para ser alcançada através da
rota anterior através da interface SLIP.
.TP
.B route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
Isto é bem obscura, documentada para que as pessoas saibam como usá-la.
Configura para que todas as rotas IP classe D (multicast) vão através da
interface "eth0". Esta é a linha de configuração normal a ser usada com
um kernel multicast.
.TP
.B route add 10.0.0.0 netmask 255.0.0.0 reject
Esta instala uma rota de rejeição para a rede privada "10.x.x.x"
.LP
.SH SAÍDA
A saída da tabela de roteamento do kernel é organizada nas seguintes colunas
.TP
.B Destino
A rede ou máquina de destino.
.TP
.B Roteador
A máquina roteador ou '*' se nenhuma estiver configurada.
.TP
.B Mascara Genérica
A mascara para a rede destino. '255.255.255.255' para uma máquina de destino,
'0.0.0.0' para a rota
.B default
.
.TP
.B Flags
Os flags possíveis são
.br
.B U
(rota esta
.BR Up )
.br
.B H
(alvo é uma
.BR máquina )
.br
.B G
(use
.BR roteador )
.br
.B R
.RB ( reinstate
rota para roteamento dinâmico)
.br
.B D
Instalada
.RB ( Dinamicamente
por um daemon ou por redirecionamento)
.br
.B M
.RB ( Modificada
por daemon de roteamento ou redirecionamento)
.br
.B !
Rota
.RB ( rejeitada
)
.TP
.B Metric
A 'distância' até o alvo (geralmente contada em hops). Não é utilizada pelos
kernels recentes, somente daemons de roteamento podem usa-la.
.TP
.B Ref
Numero de referências a esta rota. Não usado no kernel do Linux, sempre 0.
.TP
.B Uso
Contagem de procuras por esta rota. Nos kernels recentes estes números são
bem baixos, pois os sockets tem seu próprio cache e não precisam procurar
por rotas.
.TP
.B Iface
Interface através da qual os pacotes IP serão enviados.
.TP
.B MSS
Tamanho máximo de segmento default para conexões TCP através desta rota.
.TP
.B Window
Tamanho de janela default para conexões TCP através desta rota.
.TP
.B irtt
RTT (Tempo de Ida e Volta) Inicial. O kernel usa isto para inferir os melhores
parâmetros do protocolo TCP sem esperar por respostas (possivelmente lentas).
.LP
.SH ARQUIVOS
.I /proc/net/route
.br
.I /etc/networks
.br
.I /etc/hosts
.br
.I /etc/init.d/network
.LP
.SH VEJA TAMBÉM
.I ifconfig(8), netstat(8), arp(8)
.LP
.SH HISTÓRICO
.B Route
para o linux foi originalmente escrito por Fred N. van Kempen,
<waltje@uwalt.nl.mugnet.org> e depois modificado por Johannes Stille e
Linus Torvalds para a versão pl15. Alan Cox adicionou as opções para
mss e window no kernel 1.1.22. O suporte a irtt (compartilhado com o
netstat) foi feito por Bernd Eckenfels.
.SH TRADUÇÃO
Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 13/04/1998
.SH BUGS
nenhum :)
.so man1/hostname.1
This diff is collapsed.
SUBDIRS= en_US.88591 fr_FR.88591 de_DE.88591
GENCATNEW= gencat -new
GENCAT= gencat
USE_NLS := $(shell grep -s 'define NLS 1' ../config.h)
ifneq ($(USE_NLS),)
all: catalogs ../nettools-nls.h
else
all:
@echo "Skipping NLS Generation!"
endif
../nettools-nls.h: nettools.m
${GENCATNEW} /dev/null nettools.m -h ../nettools-nls.h
nettools.m: en_US.88591/nettools.cat
catalogs: de_DE.88591/nettools.cat fr_FR.88591/nettools.cat \
en_US.88591/nettools.cat
en_US.88591/nettools.cat: en_US.88591/*.m
@echo en_US.88591
@cat en_US.88591/*.m > nettools.m
@if [ -f en_US.88591/nettools.cat ]; then \
${GENCAT} en_US.88591/nettools.cat nettools.m; \
else \
${GENCATNEW} en_US.88591/nettools.cat nettools.m; \
fi
fr_FR.88591/nettools.cat: fr_FR.88591/*.m
@echo fr_FR.88591
@cat fr_FR.88591/*.m > nettools.m
@if [ -f fr_FR.88591/nettools.cat ]; then \
${GENCAT} fr_FR.88591/nettools.cat nettools.m; \
else \
${GENCATNEW} fr_FR.88591/nettools.cat nettools.m; \
fi
de_DE.88591/nettools.cat: de_DE.88591/*.m
@echo de_DE.88591
@cat de_DE.88591/*.m > nettools.m
@if [ -f de_DE.88591/nettools.cat ]; then \
${GENCAT} de_DE.88591/nettools.cat nettools.m; \
else \
${GENCATNEW} de_DE.88591/nettools.cat nettools.m; \
fi
clean:
for i in ${SUBDIRS} ; \
do \
rm -f $$i/*~ $$i/*.orig $$i/DEADJOE ; \
rm -f $$i/nettools.cat ; \
done; \
rm -f ../nettools-nls.h *~ *.orig DEADJOE nettools.m
clobber: clean
German Language Catalougs
Date: Wed, 23 Aug 1995 13:55:44 +0200
From: Michael Schmidt <michael@muc.de>
$set 10 #arcnet
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_debug1 Original Message:(in_arcnet(%s): invalid arcnet address!\n)
# in_arcnet(%s): ungltige Arcnet-Adresse!\n
$ #_debug2 Original Message:(in_arcnet(%s): invalid arcnet address!\n)
# in_arcnet(%s): ungltige Arcnet-Adresse!\n
$ #_debug3 Original Message:(in_arcnet(%s): trailing : ignored!\n)
# in_arcnet(%s): am Ende : ignoriert!\n
$ #_debug4 Original Message:(in_arcnet(%s): trailing junk!\n)
# in_arcnet(%s): Unsinn am Ende!\n
$ #_arcnet Original Message:(1.5Mbps ARCnet)
# 1.5Mbps ARCnet
$set 3 #arp
$ #_hostname Original Message:(arp: need host name\n)
# arp: bentige Rechnernamen\n
$ #_no_arp Original Message:(No ARP entry for %s\n)
# Kein ARP-Eintrag fr %s\n
$ #_need_hw Original Message:(arp: need hardware address\n)
# arp: bentige Hardware-Adresse\n
$ #_invalidhw Original Message:(arp: invalid hardware address\n)
# arp: ungltige Hardware-Adresse\n
$ #_cant_open Original Message:(arp: cannot open etherfile %s !\n)
# arp: kann Ether-Datei %s nicht ffnen!\n
$ #_formaterr Original Message:(arp: format error on line %u of etherfile %s !\n)
# arp: Formatfehler in Zeile %u der Ether-Datei %s !\n
$ #_cant_set Original Message:(arp: cannot set entry on line %u of etherfile %s !\n)
# arp: kann Eintrag in Zeile %u der Ether-Datei %s nicht setzen!\n
$ #_address Original Message:(Address\t\tHW type\t\tHW address\t Flags Mask\t\t Iface\n)
# Adresse\t\tHW typ\t\tHW adresse\t Flags Maske\t\t Iface\n
$ #_wrong_af Original Message:(arp: %s: kernel only supports '-p inet'.\n)
# arp: %s: kernel untersttzt nur 'inet'.\n
$ #_sum Original Message:(Entries: %d\tSkiped: %d\tFound: %d\n)
# Eintrge: %d\tbersprungen: %d\tGefunden: %d\n
$ #_usage1 Original Message:(Usage: arp [-vn] [-H type] [-i if] -a [hostname]\n)
# Benutzung: arp [-vn] [-H typ] [-i if] -a [rechnername]\n
$ #_usage2 Original Message:( arp [-v] [-i if] -d hostname [pub]\n)
# arp [-v] [-i if] -d rechnername [pub]\n
$ #_usage3 Original Message:( arp [-v] [-H type] [-i if] -s hostname hw_addr [temp] [trail]\n)
# arp [-v] [-H typ] [-i if] -s rechnername hw_addr [temp] [trail]\n
$ #_usage4 Original Message:( arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub [trail]\n)
# arp [-v] [-H typ] [-i if] -s r.name hw_addr [netmask nm] pub [trail]\n
$ #_usage5 Original Message:( arp [-vn] [-H type] [-i if] -f filename\n)
# arp [-vn] [-H typ] [-i if] -f dateiname\n
$ #_hw_not_supp Original Message:(%s: hardware type not supported!\n)
# %s: Hardwaretyp nicht untersttzt!\n
$ #_fam_not_supp Original Message:(%s: address family not supported!\n)
# %s: Adressfamilie nicht untersttzt!\n
$ #_unkn_addr Original Message:(arp: %s: unknown address family.\n)
# arp: %s: unbekannte Adressfamilie.\n
$ #_unkn_hw Original Message:(arp: %s: unknown hardware type.\n)
# arp: %s: unbekannter Hardwaretyp.\n
$ #_none Original Message:(arp: in %d entries no match found.\n)
# arp: In %d Eintrgen kein Treffer.\n
$ #_wrong_hw Original Message:(arp: %s: hardware type without ARP support.\n)
# arp: %s: keine ARP Untersttzung fr diesen Hardwaretyp.\n
$ #_einv_pub Original Message:(Probably destination is reached via ARP Interface. See arp(8)\n)
# Wahrscheinlich ist Ziel ber ARP Interface erreichbar. Nheres in arp(8).\n
$ #_einv_nopub Original Message:(Probably destination is on different Interface. See arp(8)\n)
# Wahrscheinlich ist Ziel auf anderem Interface erreichbar. Nheres in arp(8)\n
$set 11 #ax25
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_debug1 Original Message:(Invalid callsign)
# Ungltiges Rufzeichen
$ #_debug2 Original Message:(Callsign too long)
# Rufzeichen zu lang
$ #_hw Original Message:(AMPR AX.25)
# AMPR AX.25
$ #_ax25 Original Message:(AMPR AX.25)
# AMPR AX.25
$set 12 #ddp
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_ddp Original Message:(Appletalk DDP)
# Appletalk DDP
$ #_notyet Original Message:(Routing table for `ddp' not yet supported.\n)
# Routingtabelle fr `ddp' noch nicht untersttzt.\n
$set 13 #ether
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_debug1 Original Message:(in_ether(%s): invalid ether address!\n)
# in_ether(%s): ungültige Ethernet-Adresse!\n
$ #_debug2 Original Message:(in_ether(%s): invalid ether address!\n)
# in_ether(%s): ungültige Ethernet-Adresse!\n
$ #_debug3 Original Message:(in_ether(%s): trailing : ignored!\n)
# in_ether(%s): am Ende : ignoriert!\n
$ #_debug4 Original Message:(in_ether(%s): trailing junk!\n)
# in_ether(%s): Unsinn am Ende!\n
$ #_ether Original Message:(10Mbps Ethernet)
# 10Mbps Ethernet
$set 5 #hostname
$ #_root Original Message:(%s: you must be root to change the host name\n)
# %s: Nur root darf den Rechnernamen ndern\n
$ #_toolong Original Message:(%s: name too long\n)
# %s: Name zu lang\n
$ #_nodns1 Original Message:(%s: You can't change the DNS domain name with this command\n)
# %s: Sie knnen den DNS-Name nicht mit diesem Befehl ndern\n
$ #_nodns2 Original Message:(\nUnless you are using bind or NIS for host lookups you can change the DNS\n)
# \nWenn Sie nicht bind oder NIS benutzen, knnen Sie den DNS-Domainname,\n
$ #_nodns3 Original Message:(domain name (which is part of the FQDN) in the /etc/hosts file.\n)
# welcher Teil des FQDN ist, in /etc/hosts ndern.\n
$ #_cant_open Original Message:(%s: can't open `%s'\n)
# %s: kann `%s' nicht ffnen\n
$ #_usage1 Original Message:(Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n)
# Benutzung: hostname [-v] {hostname|-F datei} setzt rechnername (aus datei)\n
$ #_usage2 Original Message:( domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n)
# domainname [-v] {nisdomain|-F datei} setzt NIS domainname (aus datei)\n
$ #_usage3 Original Message:( hostname [-v] [-d|-f|-s|-a|-i|-y] display formated name\n)
# hostname [-v] [-d|-f|-s|-a|-i|-y] zeigt formatierte Namen an\n
$ #_usage4 Original Message:( hostname [-v] display hostname\n\n)
# hostname [-v] zeigt Rechnername an\n\n
$ #_usage5 Original Message:( hostname -V|--version|-h|--help print info and exit\n\n)
# hostname -V|--version|-h|--help gibt Info aus und beendet sich\n\n
$ #_usage6 Original Message:( dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n\n)
# dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n\n
$ #_usage7 Original Message:( -s, --short short host name\n)
# -s, --short kurzer Rechnername\n
$ #_usage8 Original Message:( -a, --alias alias names\n)
# -a, --alias alias Namen\n
$ #_usage9 Original Message:( -i, --ip-address addresses for the hostname\n)
# -i, --ip-address Adressen der Rechnernamen\n
$ #_usage10 Original Message:( -f, --fqdn, --long long host name (FQDN)\n)
# -f, --fqdn, --long langer Rechnername (FQDN)\n
$ #_usage11 Original Message:( -d, --domain DNS domain name\n)
# -d, --domain DNS Domainname\n
$ #_usage12 Original Message:( -y, --yp, --nis NIS/YP domainname\n)
# -y, --yp, --nis NIS/YP Domainname\n
$ #_usage13 Original Message:( -F, --file read hostname or nis domainname from given File\n\n)
# -F, --file lese Rechnernamen oder NIS Domainnamen aus Datei\n\n
$ #_usage14 Original Message:( This comand can get or set the hostname or the NIS domainname. You can\n)
# Dieses Programm kann den Rechnernamen und den NIS-Domainnamen setzen und\n
$ #_usage15 Original Message:( also get the DNS domain or the FQDN (fully qualified domain name).\n)
# auslesen. Ausserdem kann es die DNS Domain oder den FQDN auslesen.\n
$ #_usage16 Original Message:( Unless you are using bind or NIS for host lookups you can change the\n)
# Wenn Sie nicht bind oder NIS benutzen, knnen Sie den FQDN (Vollstndig\n
$ #_usage17 Original Message:( FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n)
# qualifizierter Domain-Name) und den DNS-Domainnamen (welcher Teil\n
$ #_usage18 Original Message:( part of the FQDN) in the /etc/hosts file.\n)
# des FQDN ist) in /etc/hosts ndern.\n
$ #_verb_set Original Message:( Setting hostname to `%s'\n)
# Setze Rechnername auf `%s'\n
$ #_verb_res Original Message:(Resolving `%s' ...\n)
# Ermittle `%s' ...\n
$ #_verb_fnd Original Message:(Result: h_name=`%s'\n)
# Ergebnis: h_name=`%s'\n
$ #_verb_ali Original Message:(Result: h_aliases=`%s'\n)
# Ergebnis: h_aliases=`%s'\n
$ #_verb_ipn Original Message:(Result: h_addr_list=`%s'\n)
# Ergebnis: h_addr_list=`%s'\n
$ #_verb_get Original Message:(gethostname()=`%s'\n)
# gethostname()=`%s'\n
$ #_verb_dset Original Message:(Setting domainname to `%s'\n)
# Setze NIS Domainname auf `%s'\n
$ #_verb_dget Original Message:(getdomainname()=`%s'\n)
# getdomainname()=%s'\n
$ #_dname_root Original Message:(%s: you must be root to change the domain name\n)
# %s: Sie mssen root sein um den Domainnamen zu ndern\n
$ #_dname_toolong Original Message:(%s: name too long\n)
# %s: Domainname ist zu lang\n
$set 1 #ifconfig
$ #_over Original Message:(overruns)
# berholungen
$ #_compress Original Message:(compressed)
# komprimiert
$ #_link Original Message:(%-8.8s Link encap:%s )
# %-8.8s Link encap:%s
$ #_hw Original Message:(HWaddr %s)
# HW-Adr %s
$ #_adr Original Message:(\n %s addr:%s)
# \n %s Adr: %s
$ #_pap Original Message:( P-t-P:%s )
# P-t-P:%s
$ #_bcast Original Message:( Bcast:%s )
# Bcast:%s
$ #_mask Original Message:(Mask:%s\n)
# Maske:%s\n
$ #_etherII Original Message:( IPX/Ethernet II addr:%s\n)
# IPX/Ethernet II Adresse:%s\n
$ #_SNAP Original Message:( IPX/Ethernet SNAP addr:%s\n)
# IPX/Ethernet SNAP Adresse:%s\n
$ #_8022 Original Message:( IPX/Ethernet 802.2 addr:%s\n)
# IPX/Ethernet 802.2 Adresse:%s\n
$ #_8023 Original Message:( IPX/Ethernet 802.3 addr:%s\n)
# IPX/Ethernet 802.3 Adresse:%s\n
$ #_talk Original Message:( EtherTalk Phase 2 addr:%s\n)
# EtherTalk Phase 2 Adresse:%s\n
$ #_noflags Original Message:([NO FLAGS] )
# [KEINE OPTIONEN]
$ #_mtu Original Message:( MTU:%d Metric:%d\n)
# MTU:%d Metrik:%d\n
$ #_rx Original Message:(RX packets:%u errors:%u dropped:%u %s:%u\n)
# RX Packete:%u Fehler:%u verloren:%u %s:%u\n
$ #_tx Original Message:(TX packets:%u errors:%u dropped:%u %s:%u\n)
# TX Packete:%u Fehler:%u verloren:%u %s:%u\n
$ #_interrupt Original Message:(Interrupt:%d )
# Unterbrechung:%d
$ #_base Original Message:(Base address:0x%x )
# Basisadresse:0x%x
$ #_mem Original Message:(Memory:%lx-%lx )
# Speicher:%lx-%lx
$ #_dma Original Message:(DMA chan:%x )
# DMA Kanal:%x
$ #_unkn Original Message:(%s: unknown interface.\n)
# %s: unbekannte Schnittstelle.\n
$ #_usage1 Original Message:(Usage: ifconfig [-a] [-i] [-v] interface\n)
# Usage: ifconfig [-a] [-i] [-v] Schnittstelle\n
$ #_usage2 Original Message:( [inet address]\n)
# [inet Adresse]\n
$ #_usage3 Original Message:( [hw] [ax25 address]\n)
# [hw] [ax25 Adresse]\n
$set 14 #inet
$ #_debug1 Original Message:(rresolve: unsupport address family %d !\n)
# rresolve: Adressfamilie %d nicht untersttzt !\n
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_darpa Original Message:(DARPA Internet)
# DARPA Internet
$ #_table Original Message:(Kernel IP routing table\n)
# Kernel IP Routing-Tabelle\n
$ #_header1 Original Message:(Destination Gateway Genmask Flags Metric Ref Use Iface\n)
# Ziel Gateway Maske Optn Metrik Ref Ben Iface\n
$ #_header2 Original Message:(Destination Gateway Genmask Flags MSS Window irtt Iface\n)
# Ziel Gateway Maske Optn MSS Fenster irtt Iface\n
$ #_header3 Original Message:(Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt\n)
# Ziel Gateway Maske Optn Metrik Ref Ben Iface MSS Fenst. irtt\n
$ #_route Original Message:(unsupported address family %d !\n)
# Adressfamilie %d nicht untersttzt!\n
This diff is collapsed.
$set 15 #ipx
$ #_none Original Message:([NONE SET])
# [NICHTS GESETZT]
$ #_ipx Original Message:(IPX)
# IPX
$ #_notyet Original Message:(Routing table for `ipx' not yet supported.\n)
# Routingtabelle fr `ipx' noch nicht untersttzt.\n
$set 22 #lib
$ #_unknown_af Original Message:(Unknown address family `%s'.\n)
# Unbekannte Adressfamilie `%s'.\n
$ #_toomuch_af Original Message:(Too much address family arguments.\n)
# Zu viele Adressfamilien angegeben.\n
$ #_nofeature Original Message:(%s: feature `%s' not supported. Please recompile with newer kernel.\n)
# %s: Merkmal `%s' nicht untersttzt. Bitte mit neum Kernel bersetzen.\n
$ #_sysnot Original Message:(%s: no support for `%s' on this system.\n)
# %s: no support for `%s' on this system.\n
$ #_masq Original Message:(IP masquerading entries\n)
# IP masquerading entries\n
$ #_masq_tit1 Original Message:(prot expire source destination ports\n)
# prot expire source destination ports\n
$ #_masq_tit2 Original Message:(prot expire initseq delta prevd source destination ports\n)
# prot expire initseq delta prevd source destination ports\n
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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