Initialize Tizen 2.3 2.3a_release submit/tizen_2.3/20140531.101552
authorSehong Na <sehong.na@samsung.com>
Sat, 31 May 2014 03:54:15 +0000 (12:54 +0900)
committerSehong Na <sehong.na@samsung.com>
Sat, 31 May 2014 03:54:15 +0000 (12:54 +0900)
228 files changed:
ABOUT-NLS [new file with mode: 0644]
COPYING [new file with mode: 0644]
INSTALLING [new file with mode: 0644]
Makefile [new file with mode: 0644]
README [new file with mode: 0644]
README.ipv6 [new file with mode: 0644]
RPM/README [new file with mode: 0644]
RPM/net-tools-1.45-config.patch [new file with mode: 0644]
RPM/net-tools.spec [new file with mode: 0644]
TODO [new file with mode: 0644]
arp.c [new file with mode: 0644]
config.in [new file with mode: 0644]
configure.sh [new file with mode: 0755]
hostname.c [new file with mode: 0644]
ifconfig.c [new file with mode: 0644]
include/interface.h [new file with mode: 0644]
include/ipx.h [new file with mode: 0644]
include/mii.h [new file with mode: 0644]
include/sockets.h [new file with mode: 0644]
include/util-ank.h [new file with mode: 0644]
intl.h [new file with mode: 0644]
ipmaddr.c [new file with mode: 0644]
iptunnel.c [new file with mode: 0644]
lib/Makefile [new file with mode: 0644]
lib/activate.c [new file with mode: 0644]
lib/af.c [new file with mode: 0644]
lib/arcnet.c [new file with mode: 0644]
lib/ash.c [new file with mode: 0644]
lib/ax25.c [new file with mode: 0644]
lib/ax25_gr.c [new file with mode: 0644]
lib/ddp.c [new file with mode: 0644]
lib/ddp_gr.c [new file with mode: 0644]
lib/ec_hw.c [new file with mode: 0644]
lib/econet.c [new file with mode: 0644]
lib/ether.c [new file with mode: 0644]
lib/fddi.c [new file with mode: 0644]
lib/frame.c [new file with mode: 0644]
lib/getargs.c [new file with mode: 0644]
lib/getroute.c [new file with mode: 0644]
lib/hdlclapb.c [new file with mode: 0644]
lib/hippi.c [new file with mode: 0644]
lib/hw.c [new file with mode: 0644]
lib/inet.c [new file with mode: 0644]
lib/inet6.c [new file with mode: 0644]
lib/inet6_gr.c [new file with mode: 0644]
lib/inet6_sr.c [new file with mode: 0644]
lib/inet_gr.c [new file with mode: 0644]
lib/inet_sr.c [new file with mode: 0644]
lib/interface.c [new file with mode: 0644]
lib/ipx.c [new file with mode: 0644]
lib/ipx_gr.c [new file with mode: 0644]
lib/ipx_sr.c [new file with mode: 0644]
lib/irda.c [new file with mode: 0644]
lib/loopback.c [new file with mode: 0644]
lib/masq_info.c [new file with mode: 0644]
lib/net-features.h [new file with mode: 0644]
lib/net-support.h [new file with mode: 0644]
lib/netrom.c [new file with mode: 0644]
lib/netrom_gr.c [new file with mode: 0644]
lib/netrom_sr.c [new file with mode: 0644]
lib/nstrcmp.c [new file with mode: 0644]
lib/pathnames.h [new file with mode: 0644]
lib/ppp.c [new file with mode: 0644]
lib/ppp_ac.c [new file with mode: 0644]
lib/proc.c [new file with mode: 0644]
lib/proc.h [new file with mode: 0644]
lib/rose.c [new file with mode: 0644]
lib/rose_gr.c [new file with mode: 0644]
lib/setroute.c [new file with mode: 0644]
lib/sit.c [new file with mode: 0644]
lib/slip.c [new file with mode: 0644]
lib/slip_ac.c [new file with mode: 0644]
lib/sockets.c [new file with mode: 0644]
lib/strip.c [new file with mode: 0644]
lib/tr.c [new file with mode: 0644]
lib/tunnel.c [new file with mode: 0644]
lib/unix.c [new file with mode: 0644]
lib/util-ank.c [new file with mode: 0644]
lib/util.c [new file with mode: 0644]
lib/util.h [new file with mode: 0644]
lib/x25.c [new file with mode: 0644]
lib/x25_gr.c [new file with mode: 0644]
lib/x25_sr.c [new file with mode: 0644]
man/Makefile [new file with mode: 0644]
man/de_DE/arp.8 [new file with mode: 0644]
man/de_DE/dnsdomainname.1 [new file with mode: 0644]
man/de_DE/domainname.1 [new file with mode: 0644]
man/de_DE/ethers.5 [new file with mode: 0644]
man/de_DE/hostname.1 [new file with mode: 0644]
man/de_DE/ifconfig.8 [new file with mode: 0644]
man/de_DE/netstat.8 [new file with mode: 0644]
man/de_DE/nisdomainname.1 [new file with mode: 0644]
man/de_DE/plipconfig.8 [new file with mode: 0644]
man/de_DE/rarp.8 [new file with mode: 0644]
man/de_DE/route.8 [new file with mode: 0644]
man/de_DE/slattach.8 [new file with mode: 0644]
man/de_DE/ypdomainname.1 [new file with mode: 0644]
man/en_US/arp.8 [new file with mode: 0644]
man/en_US/dnsdomainname.1 [new file with mode: 0644]
man/en_US/domainname.1 [new file with mode: 0644]
man/en_US/ethers.5 [new file with mode: 0644]
man/en_US/hostname.1 [new file with mode: 0644]
man/en_US/ifconfig.8 [new file with mode: 0644]
man/en_US/mii-tool.8 [new file with mode: 0644]
man/en_US/nameif.8 [new file with mode: 0644]
man/en_US/netstat.8 [new file with mode: 0644]
man/en_US/nisdomainname.1 [new file with mode: 0644]
man/en_US/plipconfig.8 [new file with mode: 0644]
man/en_US/rarp.8 [new file with mode: 0644]
man/en_US/route.8 [new file with mode: 0644]
man/en_US/slattach.8 [new file with mode: 0644]
man/en_US/ypdomainname.1 [new file with mode: 0644]
man/fr_FR/arp.8 [new file with mode: 0644]
man/fr_FR/dnsdomainname.1 [new file with mode: 0644]
man/fr_FR/domainname.1 [new file with mode: 0644]
man/fr_FR/ethers.5 [new file with mode: 0644]
man/fr_FR/hostname.1 [new file with mode: 0644]
man/fr_FR/ifconfig.8 [new file with mode: 0644]
man/fr_FR/netstat.8 [new file with mode: 0644]
man/fr_FR/nisdomainname.1 [new file with mode: 0644]
man/fr_FR/plipconfig.8 [new file with mode: 0644]
man/fr_FR/rarp.8 [new file with mode: 0644]
man/fr_FR/route.8 [new file with mode: 0644]
man/fr_FR/slattach.8 [new file with mode: 0644]
man/fr_FR/ypdomainname.1 [new file with mode: 0644]
man/pt_BR/arp.8 [new file with mode: 0644]
man/pt_BR/dnsdomainname.1 [new file with mode: 0644]
man/pt_BR/domainname.1 [new file with mode: 0644]
man/pt_BR/hostname.1 [new file with mode: 0644]
man/pt_BR/ifconfig.8 [new file with mode: 0644]
man/pt_BR/netstat.8 [new file with mode: 0644]
man/pt_BR/nisdomainname.1 [new file with mode: 0644]
man/pt_BR/rarp.8 [new file with mode: 0644]
man/pt_BR/route.8 [new file with mode: 0644]
man/pt_BR/ypdomainname.1 [new file with mode: 0644]
mii-tool.c [new file with mode: 0644]
nameif.c [new file with mode: 0644]
netstat.c [new file with mode: 0644]
packaging/ether-wake.8 [new file with mode: 0644]
packaging/ether-wake.c [new file with mode: 0644]
packaging/mii-diag.8 [new file with mode: 0644]
packaging/mii-diag.c [new file with mode: 0644]
packaging/net-tools-1.57-bug22040.patch [new file with mode: 0644]
packaging/net-tools-1.60-a-option.patch [new file with mode: 0644]
packaging/net-tools-1.60-arp-unaligned-access.patch [new file with mode: 0644]
packaging/net-tools-1.60-arp_man.patch [new file with mode: 0644]
packaging/net-tools-1.60-arp_overflow.patch [new file with mode: 0644]
packaging/net-tools-1.60-bcast.patch [new file with mode: 0644]
packaging/net-tools-1.60-bitkeeper.patch [new file with mode: 0644]
packaging/net-tools-1.60-clear-flag.patch [new file with mode: 0644]
packaging/net-tools-1.60-config.h [new file with mode: 0644]
packaging/net-tools-1.60-config.make [new file with mode: 0644]
packaging/net-tools-1.60-cycle.patch [new file with mode: 0644]
packaging/net-tools-1.60-de.patch [new file with mode: 0644]
packaging/net-tools-1.60-duplicate-tcp.patch [new file with mode: 0644]
packaging/net-tools-1.60-ec_hw_null.patch [new file with mode: 0644]
packaging/net-tools-1.60-fgets.patch [new file with mode: 0644]
packaging/net-tools-1.60-gcc33.patch [new file with mode: 0644]
packaging/net-tools-1.60-gcc34.patch [new file with mode: 0644]
packaging/net-tools-1.60-hostname_man.patch [new file with mode: 0644]
packaging/net-tools-1.60-i-option.patch [new file with mode: 0644]
packaging/net-tools-1.60-ifaceopt.patch [new file with mode: 0644]
packaging/net-tools-1.60-ifconfig-long-iface-crasher.patch [new file with mode: 0644]
packaging/net-tools-1.60-ifconfig.patch [new file with mode: 0644]
packaging/net-tools-1.60-ifconfig_ib.patch [new file with mode: 0644]
packaging/net-tools-1.60-ifconfig_man.patch [new file with mode: 0644]
packaging/net-tools-1.60-inet6-lookup.patch [new file with mode: 0644]
packaging/net-tools-1.60-interface.patch [new file with mode: 0644]
packaging/net-tools-1.60-interface_stack.patch [new file with mode: 0644]
packaging/net-tools-1.60-ip.patch [new file with mode: 0644]
packaging/net-tools-1.60-ipx.patch [new file with mode: 0644]
packaging/net-tools-1.60-isofix.patch [new file with mode: 0644]
packaging/net-tools-1.60-man.patch [new file with mode: 0644]
packaging/net-tools-1.60-manydevs.patch [new file with mode: 0644]
packaging/net-tools-1.60-metric-tunnel-man.patch [new file with mode: 0644]
packaging/net-tools-1.60-mii-tool-obsolete.patch [new file with mode: 0644]
packaging/net-tools-1.60-miiioctl.patch [new file with mode: 0644]
packaging/net-tools-1.60-nameif.patch [new file with mode: 0644]
packaging/net-tools-1.60-nameif_strncpy.patch [new file with mode: 0644]
packaging/net-tools-1.60-netdevice.patch [new file with mode: 0644]
packaging/net-tools-1.60-netmask.patch [new file with mode: 0644]
packaging/net-tools-1.60-netplugd_init.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat-I-fix.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat-interfaces-crash.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat-probe.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat_inode.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat_stop_trim.patch [new file with mode: 0644]
packaging/net-tools-1.60-netstat_ulong.patch [new file with mode: 0644]
packaging/net-tools-1.60-note.patch [new file with mode: 0644]
packaging/net-tools-1.60-num-ports.patch [new file with mode: 0644]
packaging/net-tools-1.60-overflow.patch [new file with mode: 0644]
packaging/net-tools-1.60-parse.patch [new file with mode: 0644]
packaging/net-tools-1.60-pie.patch [new file with mode: 0644]
packaging/net-tools-1.60-remove_node.patch [new file with mode: 0644]
packaging/net-tools-1.60-return.patch [new file with mode: 0644]
packaging/net-tools-1.60-sctp-addrs.patch [new file with mode: 0644]
packaging/net-tools-1.60-sctp-quiet.patch [new file with mode: 0644]
packaging/net-tools-1.60-sctp.patch [new file with mode: 0644]
packaging/net-tools-1.60-selinux.patch [new file with mode: 0644]
packaging/net-tools-1.60-siunits.patch [new file with mode: 0644]
packaging/net-tools-1.60-skip.patch [new file with mode: 0644]
packaging/net-tools-1.60-statalias.patch [new file with mode: 0644]
packaging/net-tools-1.60-statistics.patch [new file with mode: 0644]
packaging/net-tools-1.60-statistics_buffer.patch [new file with mode: 0644]
packaging/net-tools-1.60-stdo.patch [new file with mode: 0644]
packaging/net-tools-1.60-trailingblank.patch [new file with mode: 0644]
packaging/net-tools-1.60-trim_iface.patch [new file with mode: 0644]
packaging/net-tools-1.60-trunc.patch [new file with mode: 0644]
packaging/net-tools-1.60-ulong.patch [new file with mode: 0644]
packaging/net-tools-1.60-virtualname.patch [new file with mode: 0644]
packaging/net-tools-1.60-x25-proc.patch [new file with mode: 0644]
packaging/net-tools.manifest [new file with mode: 0644]
packaging/net-tools.spec [new file with mode: 0755]
packaging/netplug-1.2.9-execshield.patch [new file with mode: 0644]
packaging/netplug-1.2.9.tar.bz2 [new file with mode: 0644]
plipconfig.c [new file with mode: 0644]
po/.cvsignore [new file with mode: 0644]
po/Makefile [new file with mode: 0644]
po/cs.po [new file with mode: 0644]
po/de.po [new file with mode: 0644]
po/et_EE.po [new file with mode: 0644]
po/fr.po [new file with mode: 0644]
po/net-tools.pot [new file with mode: 0644]
po/pt_BR.po [new file with mode: 0644]
rarp.c [new file with mode: 0644]
route.c [new file with mode: 0644]
slattach.c [new file with mode: 0644]
statistics.c [new file with mode: 0644]

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..f923c84
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,203 @@
+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.
+
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..a43ea21
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+       Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/INSTALLING b/INSTALLING
new file mode 100644 (file)
index 0000000..c49f21f
--- /dev/null
@@ -0,0 +1,50 @@
+net-tools
+
+                               INSTALLING
+
+Please read the file `README' before you start with the installation of the
+net-tools.
+
+
+
+HACKERS WAY
+-----------
+cd /usr/src ; tar xvzf net-tools*.tar.gz
+less Makefile ; make config ; make ; make -n install ; make install
+
+
+
+CONFIGURE
+---------
+First of all change into the net-tools directory.
+
+Before you start with the Installation please have a look into the toplevel
+Makefile. There are some configuration options with explanations.
+
+To configure the compilation use "make config".  The default answers should
+be safe for all configurations.  If you have kernel 2.2 and glibc 2.1 most
+of the other options should work as well.
+
+
+COMPILE
+-------  
+To compile simply use "make".
+
+There should be no warnings or errors.
+
+
+
+INSTALLATION
+------------
+If you want to install the binaries use "make install".
+
+This will generate backups of your old binaries. If you dont want the
+backups, please use "make update" instead. To change the default permissions
+and ownerships of the installed binaries and manpages edit the Makefile. You
+can test the Installation with "make -n install". This will tell make: Don't
+run any commands, just print them.
+
+
+
+Bernd 'eckes' Eckenfels
+<net-tools@lina.inka.de>
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..8fcc55c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,263 @@
+#
+# Makefile     Main Makefile for the net-tools Package
+#
+# NET-TOOLS    A collection of programs that form the base set of the
+#              NET-3 Networking Distribution for the LINUX operating
+#              system.
+#
+# Version:     2001-02-13
+#
+# Author:      Bernd Eckenfels <net-tools@lina.inka.de>
+#              Copyright 1995-1996 Bernd Eckenfels, Germany
+#
+# URLs:                ftp://ftp.inka.de/pub/comp/Linux/networking/NetTools/ 
+#              ftp://ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/NetTools/
+#              http://www.inka.de/sites/lina/linux/NetTools/index_en.html
+#
+# Based on:    Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#              Copyright 1988-1993 MicroWalt Corporation
+#
+# Modifications:
+#              Extensively modified from 01/21/94 onwards by
+#              Alan Cox <A.Cox@swansea.ac.uk>
+#              Copyright 1993-1994 Swansea University Computer Society
+#
+# Be careful! 
+# This Makefile doesn't describe complete dependencies for all include files.
+# If you change include files you might need to do make clean. 
+#
+#      {1.20}  Bernd Eckenfels:        Even more modifications for the new 
+#                                      package layout
+#      {1.21}  Bernd Eckenfels:        Check if config.in is newer than 
+#                                      config.status
+#      {1.22}  Bernd Eckenfels:        Include ypdomainname and nisdomainame
+#
+#      1.3.50-BETA6 private Release
+#                              
+#960125        {1.23}  Bernd Eckenfels:        Peter Tobias' rewrite for 
+#                                      makefile-based installation
+#      1.3.50-BETA6a private Release
+#
+#960201 {1.24} Bernd Eckenfels:        net-features.h added
+#
+#960201 1.3.50-BETA6b private Release
+#
+#960203 1.3.50-BETA6c private Release
+#
+#960204 1.3.50-BETA6d private Release
+#
+#960204 {1.25} Bernd Eckenfels:        DISTRIBUTION added
+#
+#960205 1.3.50-BETA6e private Release
+#
+#960206        {1.26}  Bernd Eckenfels:        afrt.o removed (cleaner solution)
+#
+#960215 1.3.50-BETA6f Release
+#
+#960216 {1.30} Bernd Eckenfels:        net-lib support
+#960322 {1.31} Bernd Eckenfels:        moveable netlib, TOPDIR
+#960424 {1.32} Bernd Eckenfels:        included the URLs in the Comment
+#
+#960514 1.31-alpha release
+#
+#960518 {1.33} Bernd Eckenfels:        -I/usr/src/linux/include comment added
+#
+#      This program is free software; you can redistribute it
+#      and/or  modify it under  the terms of  the GNU General
+#      Public  License as  published  by  the  Free  Software
+#      Foundation;  either  version 2 of the License, or  (at
+#      your option) any later version.
+#
+
+# set the base of the Installation 
+# BASEDIR = /mnt
+
+# path to the net-lib support library. Default: lib
+NET_LIB_PATH = lib
+NET_LIB_NAME = net-tools
+
+PROGS  := ifconfig hostname arp netstat route rarp slattach plipconfig nameif
+
+-include config.make
+ifeq ($(HAVE_IP_TOOLS),1)
+PROGS   += iptunnel ipmaddr
+endif
+ifeq ($(HAVE_MII),1)
+PROGS  += mii-tool
+endif
+
+# Compiler and Linker Options
+# You may need to uncomment and edit these if you are using libc5 and IPv6.
+COPTS = -D_GNU_SOURCE -O2 -Wall -g # -I/usr/inet6/include
+ifeq ($(origin LOPTS), undefined)
+LOPTS = 
+endif
+RESLIB = # -L/usr/inet6/lib -linet6
+
+ifeq ($(HAVE_AFDECnet),1)
+DNLIB = -ldnet
+endif
+
+# -------- end of user definitions --------
+
+MAINTAINER = Philip.Blundell@pobox.com
+RELEASE           = 1.60
+
+.EXPORT_ALL_VARIABLES:
+
+ifeq ("$(NET_LIB_PATH)","lib2")
+TOPDIR   = ..
+else
+TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+endif
+
+NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
+
+CFLAGS = $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
+LDFLAGS        = $(LOPTS) -L$(NET_LIB_PATH)
+
+SUBDIRS        = man/ $(NET_LIB_PATH)/
+
+ifeq ($(origin CC), undefined)
+CC     = gcc
+endif
+LD     = $(CC)
+
+NLIB   = -l$(NET_LIB_NAME)
+
+MDEFINES = COPTS='$(COPTS)' LOPTS='$(LOPTS)' TOPDIR='$(TOPDIR)'
+
+%.o:           %.c config.h version.h intl.h net-features.h $<
+               $(CC) $(CFLAGS) -c $<
+
+all:           config.h version.h subdirs $(PROGS)
+
+config:        cleanconfig config.h
+
+install:       all savebin installbin installdata
+
+update:        all installbin installdata
+
+mostlyclean:
+               rm -f *.o DEADJOE config.new *~ *.orig lib/*.o
+
+clean: mostlyclean
+               rm -f $(PROGS)
+               @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) ; done
+               @cd po && $(MAKE) clean
+
+cleanconfig:
+               rm -f config.h
+
+clobber:       clean
+               rm -f $(PROGS) config.h version.h config.status config.make
+               @for i in $(SUBDIRS); do (cd $$i && $(MAKE) clobber) ; done
+
+
+dist:          clobber
+               @echo Creating net-tools-$(RELEASE) in ..
+               @tar -cvz -f ../net-tools-$(RELEASE).tar.gz -C .. net-tools
+
+
+config.h:      config.in Makefile 
+               @echo "Configuring the Linux net-tools (NET-3 Base Utilities)..." ; echo
+               @if [ config.status -nt config.in ]; \
+                       then ./configure.sh config.status; \
+                  else ./configure.sh config.in; \
+                fi
+
+
+version.h:     Makefile
+               @echo "#define RELEASE \"net-tools $(RELEASE)\"" >version.h
+
+
+$(NET_LIB):    config.h version.h intl.h libdir
+
+i18n.h:                i18ndir
+
+libdir:
+               @$(MAKE) -C $(NET_LIB_PATH) $(MDEFINES)
+
+i18ndir:
+               @$(MAKE) -C po
+
+subdirs:
+               @for i in $(SUBDIRS); do $(MAKE) -C $$i $(MDEFINES) ; done
+
+ifconfig:      $(NET_LIB) ifconfig.o
+               $(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(NLIB) $(RESLIB)
+               
+nameif:        nameif.o
+               $(CC) $(LDFLAGS) -o nameif nameif.o 
+
+hostname:      hostname.o
+               $(CC) $(LDFLAGS) -o hostname hostname.o $(DNLIB)
+
+route:         $(NET_LIB) route.o
+               $(CC) $(LDFLAGS) -o route route.o $(NLIB) $(RESLIB)
+
+arp:           $(NET_LIB) arp.o
+               $(CC) $(LDFLAGS) -o arp arp.o $(NLIB) $(RESLIB)
+
+rarp:          $(NET_LIB) rarp.o
+               $(CC) $(LDFLAGS) -o rarp rarp.o $(NLIB)
+
+slattach:      $(NET_LIB) slattach.o
+               $(CC) $(LDFLAGS) -o slattach slattach.o $(NLIB)
+
+plipconfig:    $(NET_LIB) plipconfig.o
+               $(CC) $(LDFLAGS) -o plipconfig plipconfig.o $(NLIB)
+
+netstat:       $(NET_LIB) netstat.o statistics.o
+               $(CC) $(LDFLAGS) -o netstat netstat.o statistics.o $(NLIB) $(RESLIB)
+
+iptunnel:      $(NET_LIB) iptunnel.o
+               $(CC) $(LDFLAGS) -o iptunnel iptunnel.o $(NLIB) $(RESLIB)
+
+ipmaddr:       $(NET_LIB) ipmaddr.o
+               $(CC) $(LDFLAGS) -o ipmaddr ipmaddr.o $(NLIB) $(RESLIB)
+
+mii-tool:      mii-tool.o
+               $(CC) $(LDFLAGS) -o mii-tool mii-tool.o
+
+installbin:
+       install -m 0755 -d ${BASEDIR}/sbin
+       install -m 0755 -d ${BASEDIR}/bin
+       install -m 0755 arp        ${BASEDIR}/sbin
+       install -m 0755 hostname   ${BASEDIR}/bin
+       install -m 0755 ifconfig   ${BASEDIR}/sbin
+       install -m 0755 nameif     ${BASEDIR}/sbin
+       install -m 0755 netstat    ${BASEDIR}/bin
+       install -m 0755 plipconfig $(BASEDIR)/sbin
+       install -m 0755 rarp       ${BASEDIR}/sbin
+       install -m 0755 route      ${BASEDIR}/sbin
+       install -m 0755 slattach   $(BASEDIR)/sbin
+ifeq ($(HAVE_IP_TOOLS),1)
+       install -m 0755 ipmaddr    $(BASEDIR)/sbin
+       install -m 0755 iptunnel   $(BASEDIR)/sbin
+endif
+ifeq ($(HAVE_MII),1)
+       install -m 0755 mii-tool   $(BASEDIR)/sbin
+endif
+       ln -fs hostname $(BASEDIR)/bin/dnsdomainname
+       ln -fs hostname $(BASEDIR)/bin/ypdomainname
+       ln -fs hostname $(BASEDIR)/bin/nisdomainname
+       ln -fs hostname $(BASEDIR)/bin/domainname
+ifeq ($(HAVE_AFDECnet),1)
+       ln -fs hostname $(BASEDIR)/bin/nodename
+endif
+
+savebin:
+       @for i in ${BASEDIR}/sbin/arp ${BASEDIR}/sbin/ifconfig \
+                 ${BASEDIR}/bin/netstat \
+                ${BASEDIR}/sbin/rarp ${BASEDIR}/sbin/route \
+                ${BASEDIR}/bin/hostname ${BASEDIR}/bin/ypdomainname \
+                 ${BASEDIR}/bin/dnsdomainname ${BASEDIR}/bin/nisdomainname \
+                ${BASEDIR}/bin/domainname ; do \
+                [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved.
+
+installdata:
+       $(MAKE) -C man install
+       $(MAKE) -C po install
+
+# End of Makefile.
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..4e35868
--- /dev/null
+++ b/README
@@ -0,0 +1,66 @@
+                                README
+
+                Information about the net-tools package
+
+NET-TOOLS      A collection of programs that form the base set of the
+               NET-3 networking distribution for the Linux operating
+               system.
+
+This package includes the important tools for controlling the network
+subsystem of the Linux kernel.  This includes arp, hostname, ifconfig,
+netstat, rarp and route.  Additionally, this package contains
+utilities relating to particular network hardware types (plipconfig,
+slattach) and advanced aspects of IP configuration (iptunnel,
+ipmaddr).
+
+Please include the output of "program --version" when reporting bugs.
+
+
+Contents:
+  
+   README              This file.
+
+   README.ipv6         Notes for people hacking IPv6.
+
+   INSTALLING          Installation instructions.
+
+   COPYING             Your free copy of the GNU Public License.
+
+   TODO                        Some things that need to be done.
+
+
+                          Notes
+                          -----
+
+This is net-tools 1.60.
+
+You need kernel 2.0 or later to use these programs.  These programs
+should compile cleanly with both glibc (version 2.0 or 2.1) and libc5,
+though support for libc5 is not well tested.
+
+The NLS support was changed from catgets to GNU gettext by Arnaldo
+Carvalho de Melo <acme@conectiva.com.br> in June, 1998, to make the
+source more readable. Translations to brazilian portuguese (pt_BR),
+German (de), Estonian (ee), Czech (cz) and French (fr) are available.
+Others are welcome!
+
+route/netstat -r do not yet support different address families
+cleanly.  IPX/DDP/AX25 people, please feel free to add the code.
+
+ifconfig now supports changing media types for interfaces.  This requires
+a version 2.2 kernel, and many devices do not support it yet.
+
+The tools now support the layout of the 2.2 kernel /proc files (Bernd
+Eckenfels).
+
+Some configuration options require kernel version 2.2 and/or
+particular versions of the C library.  The defaults should be safe for
+all common environments but some of the more esoteric hardware and
+protocol families may be more touchy.  Feel free to send patches if
+you have problems.
+
+Phil Blundell
+philb@gnu.org
+
+Bernd Eckenfels
+net-tools@lina.inka.de
diff --git a/README.ipv6 b/README.ipv6
new file mode 100644 (file)
index 0000000..29ebd8b
--- /dev/null
@@ -0,0 +1,28 @@
+Notes for IPv6
+--------------
+
+If you are using libc5, you may need to edit the Makefile so that
+libinet6 is linked in and your IPv6 include files are found in the
+right place.  The definitions in question are at about line 91.  You may
+also find that the header files provided with inet6-apps are not exactly
+what net-tools expects.  This is not a bug in net-tools as such and will
+not be fixed in future releases (though if anybody would like to contribute
+a patch I would be happy to add a pointer to it here.)  If you have the
+option you might consider changing to glibc instead (see below) in which
+case you can use the header files supplied with the C library.
+
+If you use glibc, you should ensure that you have version 2.1 or later
+installed.  The 2.1 release is available from
+<ftp://sourceware.cygnus.com/pub/glibc among> other places.  With this
+version of the C library there should be no need to edit the Makefile
+or apply any patches to net-tools.
+
+Version 2.0 of glibc has no support for IPv6; patches did exist at one
+point but they are now seriously outdated.  Instead you should upgrade
+to glibc 2.1.
+
+BUGS
+----
+
+"ifconfig eth0 add ..." does not currently auto-load the IPv6 module.
+
diff --git a/RPM/README b/RPM/README
new file mode 100644 (file)
index 0000000..5a2f415
--- /dev/null
@@ -0,0 +1,3 @@
+This directory contains some files that may be of use to people who want
+to build a net-tools RPM.
+
diff --git a/RPM/net-tools-1.45-config.patch b/RPM/net-tools-1.45-config.patch
new file mode 100644 (file)
index 0000000..2231c4a
--- /dev/null
@@ -0,0 +1,46 @@
+diff -C 2 -P net-tools/config.h net-tools-new/config.h
+*** net-tools/config.h Wed Dec 31 18:00:00 1969
+--- net-tools-new/config.h     Fri Feb 27 20:21:30 1998
+***************
+*** 0 ****
+--- 1,40 ----
++ /*
++ * config.h   Automatically generated configuration includefile
++ *
++ * NET-TOOLS  A collection of programs that form the base set of the
++ *            NET-3 Networking Distribution for the LINUX operating
++ *            system.
++ *
++ *            DO  NOT  EDIT  DIRECTLY
++ *
++ * Version:   Generated from "config.in 1.04 (96-04-24)"
++ */
++ 
++ /* 
++  * 
++  * Protocol Families.
++  * 
++  */
++ #define HAVE_AFUNIX 1
++ #define HAVE_AFINET 1
++ #define HAVE_AFINET6 0
++ #define HAVE_AFIPX 1
++ #define HAVE_AFATALK 1
++ #define HAVE_AFAX25 1
++ #define HAVE_AFNETROM 1
++ 
++ /* 
++  * 
++  * Device Hardware types.
++  * 
++  */
++ #define HAVE_HWETHER 1
++ #define HAVE_HWARC 1
++ #define HAVE_HWSLIP 1
++ #define HAVE_HWPPP 1
++ #define HAVE_HWTUNNEL 1
++ #define HAVE_HWTR 1
++ #define HAVE_HWAX25 1
++ #define HAVE_HWNETROM 1
++ #define HAVE_HWFR 1
++ #define HAVE_HWSIT 0
diff --git a/RPM/net-tools.spec b/RPM/net-tools.spec
new file mode 100644 (file)
index 0000000..86b45db
--- /dev/null
@@ -0,0 +1,108 @@
+Summary: Basic Networking Tools
+Name: net-tools
+Version: 1.50
+Release: 1
+Copyright: GPL
+Group: Networking/Admin
+Source: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.gz
+Patch0: net-tools-1.45-config.patch
+BuildRoot: /var/tmp/%{name}-root
+
+%description
+This is a collection of the basic tools necessary for setting up networking
+on a Linux machine. It includes ifconfig, route, netstat, rarp, and
+various other tools.
+
+%prep
+%setup  -q
+%patch0 -p1 -b .config
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/bin
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT/usr/man/man1
+mkdir -p $RPM_BUILD_ROOT/usr/man/man5
+mkdir -p $RPM_BUILD_ROOT/usr/man/man8
+
+make BASEDIR=$RPM_BUILD_ROOT install
+
+( cd $RPM_BUILD_ROOT/sbin
+  strip arp ifconfig rarp route slattach plipconfig ipmaddr iptunnel
+  cd ../bin
+  strip hostname netstat
+) 
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/sbin/arp
+/sbin/ifconfig
+/sbin/rarp
+/sbin/route
+/sbin/slattach
+/sbin/plipconfig
+/sbin/ipmaddr
+/sbin/iptunnel
+/bin/domainname
+/bin/dnsdomainname
+/bin/hostname
+/bin/netstat
+/bin/nisdomainname
+/bin/ypdomainname
+/usr/man/man[158]/*
+/usr/man/pt_BR/man[18]/*
+/usr/man/fr_FR/man[18]/*
+/usr/share/locale/*/LC_MESSAGES/net-tools.mo
+
+%changelog
+* Sun Jan 10 1999 Phil Blundell <philb@gnu.org>
+- update to 1.50
+- add new stuff to %files and strip it in %install
+
+* Thu Nov 26 1998 Phil Blundell <pb@nexus.co.uk>
+- update to 1.48.
+
+* Thu Nov 12 1998 Jeff Johnson <jbj@redhat.com>
+- update to 1.47.
+
+* Wed Sep  2 1998 Jeff Johnson <jbj@redhat.com>
+- update to 1.46
+
+* Thu Jul  9 1998 Jeff Johnson <jbj@redhat.com>
+- build root
+- include ethers.5
+
+* Thu Jun 11 1998 Aron Griffis <agriffis@coat.com>
+- upgraded to 1.45
+- patched hostname.c to initialize buffer
+- patched ax25.c to use kernel headers
+
+* Fri May 01 1998 Prospector System <bugs@redhat.com>
+- translations modified for de, fr, tr
+
+* Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
+- added config patch
+
+* Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
+- changed to net-tools 1.432
+- removed old glibc 2.1 patch
+* Wed Oct 22 1997 Erik Troan <ewt@redhat.com>
+- added extra patches for glibc 2.1
+
+* Tue Oct 21 1997 Erik Troan <ewt@redhat.com>
+- included complete set of network protocols (some were removed for
+  initial glibc work)
+
+* Wed Sep 03 1997 Erik Troan <ewt@redhat.com>
+- updated glibc patch for glibc 2.0.5
+
+* Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
+- built against glibc
+- updated to 1.33
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..ec6aae8
--- /dev/null
+++ b/TODO
@@ -0,0 +1,32 @@
+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]
+[ ] include proxy arp description into man page.
+[ ] netstat -i: XOVR!=compressed
+[ ] nettools.8 man-page
+[ ] lib/ddp.c: /etc/atalk.names support
+[ ] ARPHRD_LOOPBACK in new kernels, ok? dont think so :-/
+[ ] ARPHRD_LOCALTLK and aarp?
+[ ] ARCNET support? linux/drivers/net/arcnet.c
+[ ] ifconfig support for isdn4linux, linefill...
+[ ] Wilfred's Suggestion for config files for route and ifconfig (expand arp
+    file format)
+[ ] make netstat display more interesting states from interface
+       (CSLIP? BSDCOMP?)
+[ ] netstat netconfiguration info screen (forwarding, supplied protocols...)
+[ ] net-features.h in all tools
+[ ] check netstat -o
+[ ] supply some informations about new features to HOWTOs
+[ ] Config file only works with bash not ash.
+[ ] Token ring is almost totally untested.
+[ ] additional tools for IPX, AX.25 etc be bundled [ipxripd004, ipx_* tools 
+       from caldera, axattach] into existing bins
+[ ] "SIOCAX25OPTRT" [Joerg (DL1BKE)]. 1.3.75
+[ ] 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?
+[ ] get rid of local ipx.h copy
diff --git a/arp.c b/arp.c
new file mode 100644 (file)
index 0000000..509a804
--- /dev/null
+++ b/arp.c
@@ -0,0 +1,792 @@
+/*
+ * arp                This file contains an implementation of the command
+ *              that maintains the kernel's ARP cache.  It is derived
+ *              from Berkeley UNIX arp(8), but cleaner and with sup-
+ *              port for devices other than Ethernet.
+ *
+ * NET-TOOLS    A collection of programs that form the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system.
+ *
+ * Version:     $Id: arp.c,v 1.20 2001/04/08 17:05:05 pb Exp $
+ *
+ * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *
+ * Changes:
+ *              (based on work from Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>)
+ *              Alan Cox        :       modified for NET3
+ *              Andrew Tridgell :       proxy arp netmasks
+ *              Bernd Eckenfels :       -n option
+ *              Bernd Eckenfels :       Use only /proc for display
+ *       {1.60} Bernd Eckenfels :       new arpcode (-i) for 1.3.42 but works 
+ *                                      with 1.2.x, too
+ *       {1.61} Bernd Eckenfels :       more verbose messages
+ *       {1.62} Bernd Eckenfels :       check -t for hw adresses and try to
+ *                                      explain EINVAL (jeff)
+ *970125 {1.63} Bernd Eckenfels :       -a print hardwarename instead of tiltle
+ *970201 {1.64} Bernd Eckenfels :       net-features.h support
+ *970203 {1.65} Bernd Eckenfels :       "#define" in "#if", 
+ *                                      -H|-A additional to -t|-p
+ *970214 {1.66} Bernd Eckenfels :       Fix optarg required for -H and -A
+ *970412 {1.67} Bernd Eckenfels :       device=""; is default
+ *970514 {1.68} Bernd Eckenfels :       -N and -D
+ *970517 {1.69} Bernd Eckenfels :       usage() fixed
+ *970622 {1.70} Bernd Eckenfels :       arp -d priv
+ *970106 {1.80} Bernd Eckenfels :       new syntax without -D and with "dev <If>",
+ *                                      ATF_MAGIC, ATF_DONTPUB support. 
+ *                                      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
+ *980629 (1.84) Arnaldo Carvalho de Melo: gettext instead of catgets
+ *990101 {1.85} Bernd Eckenfels                fixed usage and return codes
+ *990105 (1.86) Phil Blundell:         don't ignore EINVAL in arp_set
+ *991121 (1.87) Bernd Eckenfels:       yes --device has a mandatory arg
+ *010404 (1.88) Arnaldo Carvalho de Melo: use setlocale
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+/* #include <linux/netdevice.h> */
+/* #include <linux/if_arp.h>    */
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <string.h>
+#include <getopt.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+#include "util.h"
+
+#define DFLT_AF        "inet"
+#define DFLT_HW        "ether"
+
+#define FEATURE_ARP
+#include "lib/net-features.h"
+
+char *Release = RELEASE, *Version = "arp 1.88 (2001-04-04)";
+
+int opt_n = 0;                 /* do not resolve addresses     */
+int opt_N = 0;                 /* use symbolic names           */
+int opt_v = 0;                 /* debugging output flag        */
+int opt_D = 0;                 /* HW-address is devicename     */
+int opt_e = 0;                 /* 0=BSD output, 1=new linux    */
+int opt_a = 0;                 /* all entries, substring match */
+struct aftype *ap;             /* current address family       */
+struct hwtype *hw;             /* current hardware type        */
+int sockfd = 0;                        /* active socket descriptor     */
+int hw_set = 0;                        /* flag if hw-type was set (-H) */
+char device[16] = "";          /* current device               */
+static void usage(void);
+
+/* Delete an entry from the ARP cache. */
+static int arp_del(char **args)
+{
+    char host[128];
+    struct arpreq req;
+    struct sockaddr sa;
+    int flags = 0;
+    int err;
+
+    memset((char *) &req, 0, sizeof(req));
+
+    /* Resolve the host name. */
+    if (*args == NULL) {
+       fprintf(stderr, _("arp: need host name\n"));
+       return (-1);
+    }
+    safe_strncpy(host, *args, (sizeof host));
+    if (ap->input(0, host, &sa) < 0) {
+       ap->herror(host);
+       return (-1);
+    }
+    /* If a host has more than one address, use the correct one! */
+    memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
+
+    if (hw_set)
+       req.arp_ha.sa_family = hw->type;
+
+    req.arp_flags = ATF_PERM;
+    args++;
+    while (*args != NULL) {
+       if (opt_v)
+           fprintf(stderr, "args=%s\n", *args);
+       if (!strcmp(*args, "pub")) {
+           flags |= 1;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "priv")) {
+           flags |= 2;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "temp")) {
+           req.arp_flags &= ~ATF_PERM;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "trail")) {
+           req.arp_flags |= ATF_USETRAILERS;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "dontpub")) {
+#ifdef HAVE_ATF_DONTPUB
+           req.arp_flags |= ATF_DONTPUB;
+#else
+           ENOSUPP("arp", "ATF_DONTPUB");
+#endif
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "auto")) {
+#ifdef HAVE_ATF_MAGIC
+           req.arp_flags |= ATF_MAGIC;
+#else
+           ENOSUPP("arp", "ATF_MAGIC");
+#endif
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "dev")) {
+           if (*++args == NULL)
+               usage();
+           safe_strncpy(device, *args, sizeof(device));
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "netmask")) {
+           if (*++args == NULL)
+               usage();
+           if (strcmp(*args, "255.255.255.255") != 0) {
+               strcpy(host, *args);
+               if (ap->input(0, host, &sa) < 0) {
+                   ap->herror(host);
+                   return (-1);
+               }
+               memcpy((char *) &req.arp_netmask, (char *) &sa,
+                      sizeof(struct sockaddr));
+               req.arp_flags |= ATF_NETMASK;
+           }
+           args++;
+           continue;
+       }
+       usage();
+    }
+    if (flags == 0)
+       flags = 3;
+
+    strcpy(req.arp_dev, device);
+
+    err = -1;
+
+    /* Call the kernel. */
+    if (flags & 2) {
+       if (opt_v)
+           fprintf(stderr, "arp: SIOCDARP(nopub)\n");
+       if ((err = ioctl(sockfd, SIOCDARP, &req) < 0)) {
+           if (errno == ENXIO) {
+               if (flags & 1)
+                   goto nopub;
+               printf(_("No ARP entry for %s\n"), host);
+               return (-1);
+           }
+           perror("SIOCDARP(priv)");
+           return (-1);
+       }
+    }
+    if ((flags & 1) && (err)) {
+      nopub:
+       req.arp_flags |= ATF_PUBL;
+       if (opt_v)
+           fprintf(stderr, "arp: SIOCDARP(pub)\n");
+       if (ioctl(sockfd, SIOCDARP, &req) < 0) {
+           if (errno == ENXIO) {
+               printf(_("No ARP entry for %s\n"), host);
+               return (-1);
+           }
+           perror("SIOCDARP(pub)");
+           return (-1);
+       }
+    }
+    return (0);
+}
+
+/* Get the hardware address to a specified interface name */
+static int arp_getdevhw(char *ifname, struct sockaddr *sa, struct hwtype *hw)
+{
+    struct ifreq ifr;
+    struct hwtype *xhw;
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) {
+       fprintf(stderr, _("arp: cant get HW-Address for `%s': %s.\n"), ifname, strerror(errno));
+       return (-1);
+    }
+    if (hw && (ifr.ifr_hwaddr.sa_family != hw->type)) {
+       fprintf(stderr, _("arp: protocol type mismatch.\n"));
+       return (-1);
+    }
+    memcpy((char *) sa, (char *) &(ifr.ifr_hwaddr), sizeof(struct sockaddr));
+
+    if (opt_v) {
+       if (!(xhw = get_hwntype(ifr.ifr_hwaddr.sa_family)) || (xhw->print == 0)) {
+           xhw = get_hwntype(-1);
+       }
+       fprintf(stderr, _("arp: device `%s' has HW address %s `%s'.\n"), ifname, xhw->name, xhw->print((char *)&ifr.ifr_hwaddr.sa_data));
+    }
+    return (0);
+}
+
+/* Set an entry in the ARP cache. */
+static int arp_set(char **args)
+{
+    char host[128];
+    struct arpreq req;
+    struct sockaddr sa;
+    int flags;
+
+    memset((char *) &req, 0, sizeof(req));
+
+    /* Resolve the host name. */
+    if (*args == NULL) {
+       fprintf(stderr, _("arp: need host name\n"));
+       return (-1);
+    }
+    safe_strncpy(host, *args++, (sizeof host));
+    if (ap->input(0, host, &sa) < 0) {
+       ap->herror(host);
+       return (-1);
+    }
+    /* If a host has more than one address, use the correct one! */
+    memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
+
+    /* Fetch the hardware address. */
+    if (*args == NULL) {
+       fprintf(stderr, _("arp: need hardware address\n"));
+       return (-1);
+    }
+    if (opt_D) {
+       if (arp_getdevhw(*args++, &req.arp_ha, hw_set ? hw : NULL) < 0)
+           return (-1);
+    } else {
+       if (hw->input(*args++, &req.arp_ha) < 0) {
+           fprintf(stderr, _("arp: invalid hardware address\n"));
+           return (-1);
+       }
+    }
+
+    /* Check out any modifiers. */
+    flags = ATF_PERM | ATF_COM;
+    while (*args != NULL) {
+       if (!strcmp(*args, "temp")) {
+           flags &= ~ATF_PERM;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "pub")) {
+           flags |= ATF_PUBL;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "priv")) {
+           flags &= ~ATF_PUBL;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "trail")) {
+           flags |= ATF_USETRAILERS;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "dontpub")) {
+#ifdef HAVE_ATF_DONTPUB
+           flags |= ATF_DONTPUB;
+#else
+           ENOSUPP("arp", "ATF_DONTPUB");
+#endif
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "auto")) {
+#ifdef HAVE_ATF_MAGIC
+           flags |= ATF_MAGIC;
+#else
+           ENOSUPP("arp", "ATF_MAGIC");
+#endif
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "dev")) {
+           if (*++args == NULL)
+               usage();
+           safe_strncpy(device, *args, sizeof(device));
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "netmask")) {
+           if (*++args == NULL)
+               usage();
+           if (strcmp(*args, "255.255.255.255") != 0) {
+               strcpy(host, *args);
+               if (ap->input(0, host, &sa) < 0) {
+                   ap->herror(host);
+                   return (-1);
+               }
+               memcpy((char *) &req.arp_netmask, (char *) &sa,
+                      sizeof(struct sockaddr));
+               flags |= ATF_NETMASK;
+           }
+           args++;
+           continue;
+       }
+       usage();
+    }
+
+    /* Fill in the remainder of the request. */
+    req.arp_flags = flags;
+
+    strcpy(req.arp_dev, device);
+
+    /* Call the kernel. */
+    if (opt_v)
+       fprintf(stderr, "arp: SIOCSARP()\n");
+    if (ioctl(sockfd, SIOCSARP, &req) < 0) {
+        perror("SIOCSARP");
+       return (-1);
+    }
+    return (0);
+}
+
+
+/* Process an EtherFile */
+static int arp_file(char *name)
+{
+    char buff[1024];
+    char *sp, *args[32];
+    int linenr, argc;
+    FILE *fp;
+
+    if ((fp = fopen(name, "r")) == NULL) {
+       fprintf(stderr, _("arp: cannot open etherfile %s !\n"), name);
+       return (-1);
+    }
+    /* Read the lines in the file. */
+    linenr = 0;
+    while (fgets(buff, sizeof(buff), fp) != (char *) NULL) {
+       linenr++;
+       if (opt_v == 1)
+           fprintf(stderr, ">> %s", buff);
+       if ((sp = strchr(buff, '\n')) != (char *) NULL)
+           *sp = '\0';
+       if (buff[0] == '#' || buff[0] == '\0')
+           continue;
+
+       argc = getargs(buff, args);
+       if (argc < 2) {
+           fprintf(stderr, _("arp: format error on line %u of etherfile %s !\n"),
+                   linenr, name);
+           continue;
+       }
+       if (strchr (args[0], ':') != NULL) {
+           /* We have a correct ethers file, switch hw adress and hostname
+              for arp */
+           char *cp;
+           cp = args[1];
+           args[1] = args[0];
+           args[0] = cp;
+       }
+       if (arp_set(args) != 0)
+           fprintf(stderr, _("arp: cannot set entry on line %u of etherfile %s !\n"),
+                   linenr, name);
+    }
+
+    (void) fclose(fp);
+    return (0);
+}
+
+
+/* Print the contents of an ARP request block. */
+static void arp_disp_2(char *name, int type, int arp_flags, char *hwa, char *mask, char *dev)
+{
+    static int title = 0;
+    struct hwtype *xhw;
+    char flags[10];
+
+    xhw = get_hwntype(type);
+    if (xhw == NULL)
+       xhw = get_hwtype(DFLT_HW);
+
+    if (title++ == 0) {
+       printf(_("Address                  HWtype  HWaddress           Flags Mask            Iface\n"));
+    }
+    /* Setup the flags. */
+    flags[0] = '\0';
+    if (arp_flags & ATF_COM)
+       strcat(flags, "C");
+    if (arp_flags & ATF_PERM)
+       strcat(flags, "M");
+    if (arp_flags & ATF_PUBL)
+       strcat(flags, "P");
+#ifdef HAVE_ATF_MAGIC
+    if (arp_flags & ATF_MAGIC)
+       strcat(flags, "A");
+#endif
+#ifdef HAVE_ATF_DONTPUB
+    if (arp_flags & ATF_DONTPUB)
+       strcat(flags, "!");
+#endif
+    if (arp_flags & ATF_USETRAILERS)
+       strcat(flags, "T");
+
+    if (!(arp_flags & ATF_NETMASK))
+       mask = "";
+
+    printf("%-23.23s  ", name);
+
+    if (!(arp_flags & ATF_COM)) {
+       if (arp_flags & ATF_PUBL)
+           printf("%-8.8s%-20.20s", "*", "*");
+       else
+           printf("%-8.8s%-20.20s", "", _("(incomplete)"));
+    } else {
+       printf("%-8.8s%-20.20s", xhw->name, hwa);
+    }
+
+    printf("%-6.6s%-15.15s %s\n", flags, mask, dev);
+}
+
+/* Print the contents of an ARP request block. */
+static void arp_disp(char *name, char *ip, int type, int arp_flags, char *hwa, char *mask, char *dev)
+{
+    struct hwtype *xhw;
+
+    xhw = get_hwntype(type);
+    if (xhw == NULL)
+       xhw = get_hwtype(DFLT_HW);
+
+    printf(_("%s (%s) at "), name, ip);
+
+    if (!(arp_flags & ATF_COM)) {
+       if (arp_flags & ATF_PUBL)
+           printf("* ");
+       else
+           printf(_("<incomplete> "));
+    } else {
+       printf("%s [%s] ", hwa, xhw->name);
+    }
+
+    if (arp_flags & ATF_NETMASK)
+       printf(_("netmask %s "), mask);
+
+    if (arp_flags & ATF_PERM)
+       printf("PERM ");
+    if (arp_flags & ATF_PUBL)
+       printf("PUP ");
+#ifdef HAVE_ATF_MAGIC
+    if (arp_flags & ATF_MAGIC)
+       printf("AUTO ");
+#endif
+#ifdef HAVE_ATF_DONTPUB
+    if (arp_flags & ATF_DONTPUB)
+       printf("DONTPUB ");
+#endif
+    if (arp_flags & ATF_USETRAILERS)
+       printf("TRAIL ");
+
+    printf(_("on %s\n"), dev);
+}
+
+
+/* Display the contents of the ARP cache in the kernel. */
+static int arp_show(char *name)
+{
+    char host[100];
+    struct sockaddr sa;
+    char ip[100];
+    char hwa[100];
+    char mask[100];
+    char line[200];
+    char dev[100];
+    int type, flags;
+    FILE *fp;
+    char *hostname;
+    int num, entries = 0, showed = 0;
+
+    host[0] = '\0';
+
+    if (name != NULL) {
+       /* Resolve the host name. */
+       safe_strncpy(host, name, (sizeof host));
+       if (ap->input(0, host, &sa) < 0) {
+           ap->herror(host);
+           return (-1);
+       }
+       safe_strncpy(host, ap->sprint(&sa, 1), sizeof(host));
+    }
+    /* Open the PROCps kernel table. */
+    if ((fp = fopen(_PATH_PROCNET_ARP, "r")) == NULL) {
+       perror(_PATH_PROCNET_ARP);
+       return (-1);
+    }
+    /* Bypass header -- read until newline */
+    if (fgets(line, sizeof(line), fp) != (char *) NULL) {
+       strcpy(mask, "-");
+       strcpy(dev, "-");
+       /* Read the ARP cache entries. */
+       for (; fgets(line, sizeof(line), fp);) {
+           num = sscanf(line, "%s 0x%x 0x%x %100s %100s %100s\n",
+                        ip, &type, &flags, hwa, mask, dev);
+           if (num < 4)
+               break;
+
+           entries++;
+           /* if the user specified hw-type differs, skip it */
+           if (hw_set && (type != hw->type))
+               continue;
+
+           /* if the user specified address differs, skip it */
+           if (host[0] && strcmp(ip, host))
+               continue;
+
+           /* if the user specified device differs, skip it */
+           if (device[0] && strcmp(dev, device))
+               continue;
+
+           showed++;
+           /* This IS ugly but it works -be */
+           if (opt_n)
+               hostname = "?";
+           else {
+               if (ap->input(0, ip, &sa) < 0)
+                   hostname = ip;
+               else
+                   hostname = ap->sprint(&sa, opt_n | 0x8000);
+               if (strcmp(hostname, ip) == 0)
+                   hostname = "?";
+           }
+
+           if (opt_e)
+               arp_disp_2(hostname[0] == '?' ? ip : hostname, type, flags, hwa, mask, dev);
+           else
+               arp_disp(hostname, ip, type, flags, hwa, mask, dev);
+       }
+    }
+    if (opt_v)
+       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(_("arp: in %d entries no match found.\n"), entries);
+       }
+    }
+    (void) fclose(fp);
+    return (0);
+}
+
+static void version(void)
+{
+    fprintf(stderr, "%s\n%s\n%s\n", Release, Version, Features);
+    exit(E_VERSION);
+}
+
+static void usage(void)
+{
+    fprintf(stderr, _("Usage:\n  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP cache\n"));
+    fprintf(stderr, _("  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP entry\n"));
+    fprintf(stderr, _("  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from file\n"));
+    fprintf(stderr, _("  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add entry\n"));
+    fprintf(stderr, _("  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  <-''-\n"));
+    fprintf(stderr, _("  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      <-''-\n\n"));
+    
+    fprintf(stderr, _("        -a                       display (all) hosts in alternative (BSD) style\n"));
+    fprintf(stderr, _("        -s, --set                set a new ARP entry\n"));
+    fprintf(stderr, _("        -d, --delete             delete a specified entry\n"));
+    fprintf(stderr, _("        -v, --verbose            be verbose\n"));
+    fprintf(stderr, _("        -n, --numeric            don't resolve names\n"));
+    fprintf(stderr, _("        -i, --device             specify network interface (e.g. eth0)\n"));
+    fprintf(stderr, _("        -D, --use-device         read <hwaddr> from given device\n"));
+    fprintf(stderr, _("        -A, -p, --protocol       specify protocol family\n"));
+    fprintf(stderr, _("        -f, --file               read new entries from file or from /etc/ethers\n\n"));
+
+    fprintf(stderr, _("  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
+    fprintf(stderr, _("  List of possible hardware types (which support ARP):\n"));
+    print_hwlist(1); /* 1 = ARPable */
+    exit(E_USAGE);
+}
+
+int main(int argc, char **argv)
+{
+    int i, lop, what;
+    struct option longopts[] =
+    {
+       {"verbose", 0, 0, 'v'},
+       {"version", 0, 0, 'V'},
+       {"all", 0, 0, 'a'},
+       {"delete", 0, 0, 'd'},
+       {"file", 0, 0, 'f'},
+       {"numeric", 0, 0, 'n'},
+       {"set", 0, 0, 's'},
+       {"protocol", 1, 0, 'A'},
+       {"hw-type", 1, 0, 'H'},
+       {"device", 1, 0, 'i'},
+       {"help", 0, 0, 'h'},
+       {"use-device", 0, 0, 'D'},
+       {"symbolic", 0, 0, 'N'},
+       {NULL, 0, 0, 0}
+    };
+
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+
+    /* Initialize variables... */
+    if ((hw = get_hwtype(DFLT_HW)) == NULL) {
+       fprintf(stderr, _("%s: hardware type not supported!\n"), DFLT_HW);
+       return (-1);
+    }
+    if ((ap = get_aftype(DFLT_AF)) == NULL) {
+       fprintf(stderr, _("%s: address family not supported!\n"), DFLT_AF);
+       return (-1);
+    }
+    what = 0;
+
+    /* Fetch the command-line arguments. */
+    /* opterr = 0; */
+    while ((i = getopt_long(argc, argv, "A:H:adfp:nsei:t:vh?DNV", longopts, &lop)) != EOF)
+       switch (i) {
+       case 'a':
+           what = 1;
+           opt_a = 1;
+           break;
+       case 'f':
+           what = 2;
+           break;
+       case 'd':
+           what = 3;
+           break;
+       case 's':
+           what = 4;
+           break;
+
+
+       case 'e':
+           opt_e = 1;
+           break;
+       case 'n':
+           opt_n = FLAG_NUM;
+           break;
+       case 'D':
+           opt_D = 1;
+           break;
+       case 'N':
+           opt_N = FLAG_SYM;
+           fprintf(stderr, _("arp: -N not yet supported.\n"));
+           break;
+       case 'v':
+           opt_v = 1;
+           break;
+
+       case 'A':
+       case 'p':
+           ap = get_aftype(optarg);
+           if (ap == NULL) {
+               fprintf(stderr, _("arp: %s: unknown address family.\n"),
+                       optarg);
+               exit(-1);
+           }
+           break;
+       case 'H':
+       case 't':
+           hw = get_hwtype(optarg);
+           if (hw == NULL) {
+               fprintf(stderr, _("arp: %s: unknown hardware type.\n"),
+                       optarg);
+               exit(-1);
+           }
+           hw_set = 1;
+           break;
+       case 'i':
+           safe_strncpy(device, optarg, sizeof(device));
+           break;
+
+       case 'V':
+           version();
+       case '?':
+       case 'h':
+       default:
+           usage();
+       }
+
+    if (ap->af != AF_INET) {
+       fprintf(stderr, _("arp: %s: kernel only supports 'inet'.\n"),
+               ap->name);
+       exit(-1);
+    }
+
+    /* If not hw type specified get default */
+    if(hw_set==0)
+       if ((hw = get_hwtype(DFLT_HW)) == NULL) {
+         fprintf(stderr, _("%s: hardware type not supported!\n"), DFLT_HW);
+         return (-1);
+       }
+
+    if (hw->alen <= 0) {
+       fprintf(stderr, _("arp: %s: hardware type without ARP support.\n"),
+               hw->name);
+       exit(-1);
+    }
+    if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+       perror("socket");
+       exit(-1);
+    }
+    /* Now see what we have to do here... */
+    switch (what) {
+    case 0:
+       opt_e = 1;
+       what = arp_show(argv[optind]);
+       break;
+
+    case 1:                    /* show an ARP entry in the cache */
+       what = arp_show(argv[optind]);
+       break;
+
+    case 2:                    /* process an EtherFile */
+       what = arp_file(argv[optind] ? argv[optind] : "/etc/ethers");
+       break;
+
+    case 3:                    /* delete an ARP entry from the cache */
+       what = arp_del(&argv[optind]);
+       break;
+
+    case 4:                    /* set an ARP entry in the cache */
+       what = arp_set(&argv[optind]);
+       break;
+
+    default:
+       usage();
+    }
+
+    exit(what);
+}
diff --git a/config.in b/config.in
new file mode 100644 (file)
index 0000000..f3310d6
--- /dev/null
+++ b/config.in
@@ -0,0 +1,91 @@
+#
+# config.in    Configure.sh source for the net-tools.
+#              This file contains the definition of what the support
+#              library contains.  Most of all, it defines which types
+#              of address families and hardware we know of.
+#
+# NET-TOOLS    A collection of programs that form the base set of the
+#              NET-3 Networking Distribution for the LINUX operating
+#              system.
+#
+# Version:     config.in 1.22  (99-04-19)
+#
+# 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
+#              Public  License as  published  by  the  Free  Software
+#              Foundation;  either  version 2 of the License, or  (at
+#              your option) any later version.
+#
+= /*
+=  * config.h  Automatically generated configuration includefile
+=  *
+=  * NET-TOOLS A collection of programs that form the base set of the
+=  *           NET-3 Networking Distribution for the LINUX operating
+=  *           system.
+=  *
+=  *           DO  NOT  EDIT  DIRECTLY
+=  *
+=  */
+*
+*
+*              Internationalization
+*
+* The net-tools package has currently been translated to French,
+* German and Brazilian Portugese.  Other translations are, of
+* course, welcome.  Answer `n' here if you have no support for
+* internationalization on your system.
+*
+bool 'Does your system support GNU gettext?' I18N n
+*
+*
+*             Protocol Families.
+* 
+bool 'UNIX protocol family' HAVE_AFUNIX y
+bool 'INET (TCP/IP) protocol family' HAVE_AFINET y
+bool 'INET6 (IPv6) protocol family' HAVE_AFINET6 n
+bool 'Novell IPX/SPX protocol family' HAVE_AFIPX y
+bool 'Appletalk DDP protocol family' HAVE_AFATALK y
+bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 y
+bool 'NET/ROM (packet radio) protocol family' HAVE_AFNETROM y
+bool 'Rose (packet radio) protocol family' HAVE_AFROSE n
+bool 'X.25 (CCITT) protocol family' HAVE_AFX25 y
+bool 'Econet protocol family' HAVE_AFECONET n
+bool 'DECnet protocol family' HAVE_AFDECnet n
+bool 'Ash protocol family' HAVE_AFASH n
+*
+*
+*            Device Hardware types.
+*
+bool 'Ethernet (generic) support' HAVE_HWETHER y
+bool 'ARCnet support' HAVE_HWARC y
+bool 'SLIP (serial line) support' HAVE_HWSLIP y
+bool 'PPP (serial line) support' HAVE_HWPPP y
+bool 'IPIP Tunnel support' HAVE_HWTUNNEL y
+bool 'STRIP (Metricom radio) support' HAVE_HWSTRIP y
+bool 'Token ring (generic) support' HAVE_HWTR y
+bool 'AX25 (packet radio) support' HAVE_HWAX25 y
+bool 'Rose (packet radio) support' HAVE_HWROSE n
+bool 'NET/ROM (packet radio) support' HAVE_HWNETROM y
+bool 'X.25 (generic) support' HAVE_HWX25 y
+bool 'DLCI/FRAD (frame relay) support' HAVE_HWFR y
+bool 'SIT (IPv6-in-IPv4) support' HAVE_HWSIT n
+bool 'FDDI (generic) support' HAVE_HWFDDI n
+bool 'HIPPI (generic) support' HAVE_HWHIPPI n
+bool 'Ash hardware support' HAVE_HWASH n
+bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n
+bool 'IrDA support' HAVE_HWIRDA y
+bool 'Econet hardware support' HAVE_HWEC n
+*
+*
+*           Other Features.
+*
+bool 'IP Masquerading support' HAVE_FW_MASQUERADE n
+bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS n
+bool 'Build mii-tool' HAVE_MII n
diff --git a/configure.sh b/configure.sh
new file mode 100755 (executable)
index 0000000..9859b59
--- /dev/null
@@ -0,0 +1,173 @@
+#!/usr/bin/env bash
+#
+# Configure.sh Generates interactively a config.h from config.in
+#
+# net-tools    A collection of programs that form the base set of the
+#              NET-3 Networking Distribution for the LINUX operating
+#              system.
+#
+# Usage:       Install.sh [--nobackup] [--test]
+#
+# Version:     Install.sh 1.65 (1996-01-12)
+#
+# Authors:     Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#              Johannes Grosen, <grosen@argv.cs.ndsu.nodak.edu>
+#              Copyright 1988-1993 MicroWalt Corporation
+#
+# Modified:
+#        {1.65} Bernd eckes Eckenfels <net-tools@lina.inka.de>
+#              some layout cleanups, slattach/plipconfig removed.
+#              --test for testinstallations added.
+#
+#              This program is free software; you can redistribute it
+#              and/or  modify it under  the terms of  the GNU General
+#              Public  License as  published  by  the  Free  Software
+#              Foundation;  either  version 2 of the License, or  (at
+#              your option) any later version.
+#
+#
+# Make sure we're really running bash.
+#
+# I would really have preferred to write this script in a language with
+# better string handling, but alas, bash is the only scripting language
+# that I can be reasonable sure everybody has on their Linux machine.
+#
+
+CONFIG=config.h
+MAKECONFIG=config.make
+
+
+[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; }
+
+# Disable filename globbing once and for all.
+# Enable function cacheing.
+set -f -h
+
+# set up reading of config file
+if [ "$#" != "1" ] || [ ! -f "$1" ]; then
+       echo "usage: $0 configfile" 1>&2
+       exit 1
+fi
+exec 7<$1
+config_fd_redir='<&7'
+
+#
+# readln reads a line into $ans.
+#
+#      readln prompt default
+#
+function readln()
+{
+  echo -n "$1"
+  IFS='@' read ans || exit 1
+  [ -z "$ans" ] && ans=$2
+}
+
+# bool processes a boolean argument
+#
+#      bool tail
+#
+function bool()
+{
+  # Slimier hack to get bash to rescan a line.
+  eval "set -- $1"
+  ans=""
+  while [ "$ans" != "y" -a "$ans" != "n" ]
+  do
+       readln "$1 ($2) [$3] " "$3"
+  done
+  if [ "$ans" = "y" ]; then
+       echo "#define $2 1" >>${CONFIG}
+       echo "$2=1" >>${MAKECONFIG}
+    else
+       echo "#define $2 0" >>${CONFIG}
+       echo "# $2=0" >> ${MAKECONFIG}
+  fi
+  raw_input_line="bool '$1' $2 $ans"
+  eval "$2=$ans"
+}
+
+# int processes an integer argument
+#
+#      int tail
+#
+function int()
+{
+  # Slimier hack to get bash to rescan a line.
+  eval "set -- $1"
+  ans="x"
+  while [ $[$ans+0] != "$ans" ];
+  do
+       readln "$1 ($2) [$3] " "$3"
+  done
+  echo "#define $2 ($ans)" >>${CONFIG}
+  raw_input_line="int '$1' $2 $ans"
+  eval "$2=$ans"
+}
+
+  #
+  # Make sure we start out with a clean slate.
+  #
+  > config.new
+  > ${CONFIG}
+  > ${MAKECONFIG}
+
+  stack=''
+  branch='t'
+
+  while IFS='@' eval read raw_input_line ${config_fd_redir}
+  do
+       # Slimy hack to get bash to rescan a line.
+       read cmd rest <<-END_OF_COMMAND
+               $raw_input_line
+       END_OF_COMMAND
+
+       if [ "$cmd" = "*" ]; then
+               if [ "$branch" = "t" ]; then
+                       echo "$raw_input_line"
+                       # echo "# $rest" >>$CONFIG
+                       if [ "$prevcmd" != "*" ]; then
+                               echo >>${CONFIG}
+                               echo "/* $rest" >>${CONFIG}
+                       else
+                               echo " * $rest" >>${CONFIG}
+                       fi
+                       prevcmd="*"
+               fi
+       else
+               [ "$prevcmd" = "*" ] && echo " */" >>${CONFIG}
+               prevcmd=""
+               case "$cmd" in
+               =)      [ "$branch" = "t" ] && echo "$rest" >>${CONFIG};;
+               :)      [ "$branch" = "t" ] && echo "$raw_input_line" ;;
+               int)    [ "$branch" = "t" ] && int "$rest" ;;
+               bool)   [ "$branch" = "t" ] && bool "$rest" ;;
+               exec)   [ "$branch" = "t" ] && ( sh -c "$rest" ) ;;
+               if)     stack="$branch $stack"
+                       if [ "$branch" = "t" ] && eval "$rest"; then
+                               branch=t
+                       else
+                               branch=f
+                       fi ;;
+               else)   if [ "$branch" = "t" ]; then
+                               branch=f
+                       else
+                               read branch rest <<-END_OF_STACK
+                                       $stack
+                               END_OF_STACK
+                       fi ;;
+               fi)     [ -z "$stack" ] && echo "Error!  Extra fi." 1>&2
+                       read branch stack <<-END_OF_STACK
+                               $stack
+                       END_OF_STACK
+                       ;;
+               esac
+       fi
+       echo "$raw_input_line" >>config.new
+  done
+  [ "$prevcmd" = "*" ] && echo " */" >>${CONFIG}
+
+  [ -z "$stack" ] || echo "Error!  Unterminated if." 1>&2
+
+  mv config.new config.status
+  exit 0
diff --git a/hostname.c b/hostname.c
new file mode 100644 (file)
index 0000000..8793fb9
--- /dev/null
@@ -0,0 +1,397 @@
+/*
+ * hostname   This file contains an implementation of the command
+ *              that maintains the hostname and the domainname. It
+ *              is also used to show the FQDN and the IP-Addresses.
+ *
+ * Usage:       hostname [-d|-f|-s|-a|-i|-y|-n]
+ *              hostname [-h|-V]
+ *              hostname {name|-F file}
+ *              dnsdmoainname   
+ *              nisdomainname {name|-F file}
+ *
+ * Version:     hostname 1.96 (1996-02-18)
+ *
+ * Author:      Peter Tobias <tobias@et-inf.fho-emden.de>
+ *
+ * Changes:
+ *      {1.90}  Peter Tobias :          Added -a and -i options.
+ *      {1.91}  Bernd Eckenfels :       -v,-V rewritten, long_opts 
+ *                                      (major rewrite), usage.
+ *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
+ *20000213 {1.99} Arnaldo Carvalho de Melo : fixed some i18n strings
+ *20010404 {1.100} Arnaldo Carvalho de Melo: use setlocale
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <string.h>
+#include <netdb.h>
+#include <errno.h>
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include "config.h"
+#include "version.h"
+#include "../intl.h"
+
+#if HAVE_AFDECnet
+#include <netdnet/dn.h>
+#endif
+
+char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)";
+
+static char *program_name;
+static int opt_v;
+
+static void sethname(char *);
+static void setdname(char *);
+static void showhname(char *, int);
+static void usage(void);
+static void version(void);
+static void setfilename(char *, int);
+
+#define SETHOST                1
+#define SETDOMAIN      2
+#define SETNODE                3
+
+#if HAVE_AFDECnet
+static void setnname(char *nname)
+{
+    if (opt_v)
+        fprintf(stderr, _("Setting nodename to `%s'\n"),
+                nname);
+    if (setnodename(nname, strlen(nname))) {
+        switch(errno) {
+        case EPERM:
+            fprintf(stderr, _("%s: you must be root to change the node name\n"), program_name);
+            break;
+        case EINVAL:
+            fprintf(stderr, _("%s: name too long\n"), program_name);
+            break;
+        default:
+        }
+       exit(1);
+    }
+}
+#endif /* HAVE_AFDECnet */
+
+static void sethname(char *hname)
+{
+    if (opt_v)
+       fprintf(stderr, _("Setting hostname to `%s'\n"),
+               hname);
+    if (sethostname(hname, strlen(hname))) {
+       switch (errno) {
+       case EPERM:
+           fprintf(stderr, _("%s: you must be root to change the host name\n"), program_name);
+           break;
+       case EINVAL:
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
+       }
+       exit(1);
+    };
+}
+
+static void setdname(char *dname)
+{
+    if (opt_v)
+       fprintf(stderr, _("Setting domainname to `%s'\n"),
+               dname);
+    if (setdomainname(dname, strlen(dname))) {
+       switch (errno) {
+       case EPERM:
+           fprintf(stderr, _("%s: you must be root to change the domain name\n"), program_name);
+           break;
+       case EINVAL:
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
+       }
+       exit(1);
+    };
+}
+
+static void showhname(char *hname, int c)
+{
+    struct hostent *hp;
+    register char *p, **alias;
+    struct in_addr **ip;
+
+    if (opt_v)
+       fprintf(stderr, _("Resolving `%s' ...\n"), hname);
+    if (!(hp = gethostbyname(hname))) {
+       herror(program_name);
+       exit(1);
+    }
+    if (opt_v) {
+       fprintf(stderr, _("Result: h_name=`%s'\n"),
+               hp->h_name);
+
+       alias = hp->h_aliases;
+       while (alias[0])
+           fprintf(stderr, _("Result: h_aliases=`%s'\n"),
+                   *alias++);
+
+       ip = (struct in_addr **) hp->h_addr_list;
+       while (ip[0])
+           fprintf(stderr, _("Result: h_addr_list=`%s'\n"),
+                   inet_ntoa(**ip++));
+    }
+    if (!(p = strchr(hp->h_name, '.')) && (c == 'd'))
+       return;
+
+    switch (c) {
+    case 'a':
+       while (hp->h_aliases[0])
+           printf("%s ", *hp->h_aliases++);
+       printf("\n");
+       break;
+    case 'i':
+       while (hp->h_addr_list[0])
+           printf("%s ", inet_ntoa(*(struct in_addr *) *hp->h_addr_list++));
+       printf("\n");
+       break;
+    case 'd':
+       printf("%s\n", ++p);
+       break;
+    case 'f':
+       printf("%s\n", hp->h_name);
+       break;
+    case 's':
+       if (p != NULL)
+           *p = '\0';
+       printf("%s\n", hp->h_name);
+       break;
+    default:
+    }
+}
+
+static void setfilename(char *name, int what)
+{
+    register FILE *fd;
+    register char *p;
+    char fline[MAXHOSTNAMELEN];
+
+    if ((fd = fopen(name, "r")) != NULL) {
+       while (fgets(fline, sizeof(fline), fd) != NULL) {
+           if ((p = index(fline, '\n')) != NULL)
+               *p = '\0';
+           if (opt_v)
+               fprintf(stderr, ">> %s\n", fline);
+           if (fline[0] == '#')
+               continue;
+            switch(what) {
+            case SETHOST:
+                sethname(fline);
+                break;
+            case SETDOMAIN:
+                setdname(fline);
+                break;
+#if HAVE_AFDECnet
+            case SETNODE:
+                setnname(fline);
+                break;
+#endif /* HAVE_AFDECnet */
+            }
+       }
+       (void) fclose(fd);
+    } else {
+       fprintf(stderr, _("%s: can't open `%s'\n"),
+               program_name, name);
+       exit(1);
+    }
+}
+
+static void version(void)
+{
+    fprintf(stderr, "%s\n%s\n", Release, Version);
+    exit(5); /* E_VERSION */
+}
+
+static void usage(void)
+{
+    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"));
+#if HAVE_AFDECnet
+    fprintf(stderr, _("       nodename [-v] {nodename|-F file}      set DECnet node name (from file)\n"));
+#endif
+    fprintf(stderr, _("       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted 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"));
+#if HAVE_AFDECnet
+    fprintf(stderr, _("    -n, --node            DECnet node name\n"));
+#endif /* HAVE_AFDECnet */
+    fprintf(stderr, _("    -F, --file            read hostname or NIS domainname from given file\n\n"));
+    fprintf(stderr, _(
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"));
+
+    exit(4); /* E_USAGE */
+}
+
+
+int main(int argc, char **argv)
+{
+    int c;
+    char type = '\0';
+    int option_index = 0;
+    int what = 0;
+    char myname[MAXHOSTNAMELEN + 1] =
+    {0};
+    char *file = NULL;
+
+    static const struct option long_options[] =
+    {
+       {"domain", no_argument, 0, 'd'},
+       {"file", required_argument, 0, 'F'},
+       {"fqdn", no_argument, 0, 'f'},
+       {"help", no_argument, 0, 'h'},
+       {"long", no_argument, 0, 'f'},
+       {"short", no_argument, 0, 's'},
+       {"version", no_argument, 0, 'V'},
+       {"verbose", no_argument, 0, 'v'},
+       {"alias", no_argument, 0, 'a'},
+       {"ip-address", no_argument, 0, 'i'},
+       {"nis", no_argument, 0, 'y'},
+       {"yp", no_argument, 0, 'y'},
+#if HAVE_AFDECnet
+       {"node", no_argument, 0, 'n'},
+#endif /* HAVE_AFDECnet */
+       {0, 0, 0, 0}
+    };
+#if I18N
+    setlocale (LC_ALL, "");
+    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") ||
+       !strcmp(program_name, "domainname") ||
+       !strcmp(program_name, "nisdomainname"))
+       what = 3;
+    if (!strcmp(program_name, "dnsdomainname"))
+       what = 2;
+#if HAVE_AFDECnet
+    if (!strcmp(program_name, "nodename"))
+        what = 4;
+#endif /* HAVE_AFDECnet */
+
+    while ((c = getopt_long(argc, argv, "adfF:h?isVvyn", long_options, &option_index)) != EOF)
+       switch (c) {
+       case 'd':
+           what = 2;
+           break;
+       case 'a':
+       case 'f':
+       case 'i':
+       case 's':
+           what = 1;
+           type = c;
+           break;
+       case 'y':
+           what = 3;
+           break;
+#if HAVE_AFDECnet
+       case 'n':
+            what = 4;
+            break;
+#endif /* HAVE_AFDECnet */
+       case 'F':
+           file = optarg;
+           break;
+       case 'v':
+           opt_v++;
+           break;
+       case 'V':
+           version();
+       case '?':
+       case 'h':
+       default:
+           usage();
+
+       };
+
+
+    switch (what) {
+    case 2:
+       if (file || (optind < argc)) {
+           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';
+       /* NOBREAK */
+    case 0:
+       if (file) {
+           setfilename(file, SETHOST);
+           break;
+       }
+       if (optind < argc) {
+           sethname(argv[optind]);
+           break;
+       }
+    case 1:
+       gethostname(myname, sizeof(myname));
+       if (opt_v)
+           fprintf(stderr, _("gethostname()=`%s'\n"), myname);
+       if (!type)
+           printf("%s\n", myname);
+       else
+           showhname(myname, type);
+       break;
+    case 3:
+       if (file) {
+           setfilename(file, SETDOMAIN);
+           break;
+       }
+       if (optind < argc) {
+           setdname(argv[optind]);
+           break;
+       }
+       getdomainname(myname, sizeof(myname));
+       if (opt_v)
+           fprintf(stderr, _("getdomainname()=`%s'\n"), myname);
+       printf("%s\n", myname);
+       break;
+#if HAVE_AFDECnet
+    case 4:
+        if (file) {
+            setfilename(file, SETNODE);
+            break;
+        }
+        if (optind < argc) {
+            setnname(argv[optind]);
+            break;
+        }
+        getnodename(myname, sizeof(myname));
+        if (opt_v)
+            fprintf(stderr, _("getnodename()=`%s'\n"), myname);
+        printf("%s\n", myname);
+        break;
+#endif /* HAVE_AFDECnet */
+    }
+    exit(0);
+}
diff --git a/ifconfig.c b/ifconfig.c
new file mode 100644 (file)
index 0000000..73a4e9b
--- /dev/null
@@ -0,0 +1,1109 @@
+/*
+ * ifconfig   This file contains an implementation of the command
+ *              that either displays or sets the characteristics of
+ *              one or more of the system's networking interfaces.
+ *
+ * Version:     $Id: ifconfig.c,v 1.50 2001/04/13 18:25:18 pb Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              and others.  Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ *
+ * Patched to support 'add' and 'del' keywords for INET(4) addresses
+ * by Mrs. Brisby <mrs.brisby@nimh.org>
+ *
+ * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *                     - gettext instead of catgets for i18n
+ *          10/1998  - Andi Kleen. Use interface list primitives.       
+ *         20001008 - Bernd Eckenfels, Patch from RH for setting mtu 
+ *                     (default AF was wrong)
+ *          20010404 - Arnaldo Carvalho de Melo, use setlocale
+ */
+
+#define DFLT_AF "inet"
+
+#include "config.h"
+
+#include <features.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <netdb.h>
+
+/* Ugh.  But libc5 doesn't provide POSIX types.  */
+#include <asm/types.h>
+
+
+#ifdef HAVE_HWSLIP
+#include <linux/if_slip.h>
+#endif
+
+#if HAVE_AFINET6
+
+#ifndef _LINUX_IN6_H
+/*
+ *    This is in linux/include/net/ipv6.h.
+ */
+
+struct in6_ifreq {
+    struct in6_addr ifr6_addr;
+    __u32 ifr6_prefixlen;
+    unsigned int ifr6_ifindex;
+};
+
+#endif
+
+#endif                         /* HAVE_AFINET6 */
+
+#if HAVE_AFIPX
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
+#include "ipx.h"
+#endif
+#endif
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "../intl.h"
+#include "interface.h"
+#include "sockets.h"
+#include "util.h"
+
+char *Release = RELEASE, *Version = "ifconfig 1.42 (2001-04-13)";
+
+int opt_a = 0;                 /* show all interfaces          */
+int opt_i = 0;                 /* show the statistics          */
+int opt_v = 0;                 /* debugging output flag        */
+
+int addr_family = 0;           /* currently selected AF        */
+
+/* for ipv4 add/del modes */
+static int get_nmbc_parent(char *parent, unsigned long *nm, 
+                          unsigned long *bc);
+static int set_ifstate(char *parent, unsigned long ip,
+                      unsigned long nm, unsigned long bc,
+                      int flag);
+
+static int if_print(char *ifname)
+{
+    int res;
+
+    if (ife_short)
+       printf(_("Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+
+    if (!ifname) {
+       res = for_all_interfaces(do_if_print, &opt_a);
+    } else {
+       struct interface *ife;
+
+       ife = lookup_interface(ifname);
+       res = do_if_fetch(ife); 
+       if (res >= 0) 
+           ife_print(ife);
+    }
+    return res; 
+}
+
+/* Set a certain interface flag. */
+static int set_flag(char *ifname, short flag)
+{
+    struct ifreq ifr;
+
+    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) {
+       fprintf(stderr, _("%s: unknown interface: %s\n"), 
+               ifname, strerror(errno));
+       return (-1);
+    }
+    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    ifr.ifr_flags |= flag;
+    if (ioctl(skfd, SIOCSIFFLAGS, &ifr) < 0) {
+       perror("SIOCSIFFLAGS");
+       return -1;
+    }
+    return (0);
+}
+
+/* Clear a certain interface flag. */
+static int clr_flag(char *ifname, short flag)
+{
+    struct ifreq ifr;
+    int fd;
+
+    if (strchr(ifname, ':')) {
+        /* This is a v4 alias interface.  Downing it via a socket for
+          another AF may have bad consequences. */
+        fd = get_socket_for_af(AF_INET);
+       if (fd < 0) {
+           fprintf(stderr, _("No support for INET on this system.\n"));
+           return -1;
+       }
+    } else
+        fd = skfd;
+
+    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
+       fprintf(stderr, _("%s: unknown interface: %s\n"), 
+               ifname, strerror(errno));
+       return -1;
+    }
+    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    ifr.ifr_flags &= ~flag;
+    if (ioctl(fd, SIOCSIFFLAGS, &ifr) < 0) {
+       perror("SIOCSIFFLAGS");
+       return -1;
+    }
+    return (0);
+}
+
+static void usage(void)
+{
+    fprintf(stderr, _("Usage:\n  ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]\n"));
+#if HAVE_AFINET
+    fprintf(stderr, _("  [add <address>[/<prefixlen>]]\n"));
+    fprintf(stderr, _("  [del <address>[/<prefixlen>]]\n"));
+    fprintf(stderr, _("  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"));
+    fprintf(stderr, _("  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"));
+#endif
+#ifdef SIOCSKEEPALIVE
+    fprintf(stderr, _("  [outfill <NN>] [keepalive <NN>]\n"));
+#endif
+    fprintf(stderr, _("  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"));
+    fprintf(stderr, _("  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"));
+    fprintf(stderr, _("  [multicast]  [[-]promisc]\n"));
+    fprintf(stderr, _("  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"));
+#ifdef HAVE_TXQUEUELEN
+    fprintf(stderr, _("  [txqueuelen <NN>]\n"));
+#endif
+#ifdef HAVE_DYNAMIC
+    fprintf(stderr, _("  [[-]dynamic]\n"));
+#endif
+    fprintf(stderr, _("  [up|down] ...\n\n"));
+
+    fprintf(stderr, _("  <HW>=Hardware Type.\n"));
+    fprintf(stderr, _("  List of possible hardware types:\n"));
+    print_hwlist(0); /* 1 = ARPable */
+    fprintf(stderr, _("  <AF>=Address family. Default: %s\n"), DFLT_AF);
+    fprintf(stderr, _("  List of possible address families:\n"));
+    print_aflist(0); /* 1 = routeable */
+    exit(E_USAGE);
+}
+
+static void version(void)
+{
+    fprintf(stderr, "%s\n%s\n", Release, Version);
+    exit(0);
+}
+
+static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa)
+{
+    int err = 0;
+
+    memcpy((char *) &ifr->ifr_netmask, (char *) sa,
+          sizeof(struct sockaddr));
+    if (ioctl(skfd, SIOCSIFNETMASK, ifr) < 0) {
+       fprintf(stderr, "SIOCSIFNETMASK: %s\n",
+               strerror(errno));
+       err = 1;
+    }
+    return 0;
+}
+
+int main(int argc, char **argv)
+{
+    struct sockaddr sa;
+    struct sockaddr_in sin;
+    char host[128];
+    struct aftype *ap;
+    struct hwtype *hw;
+    struct ifreq ifr;
+    int goterr = 0, didnetmask = 0;
+    char **spp;
+    int fd;
+#if HAVE_AFINET6
+    extern struct aftype inet6_aftype;
+    struct sockaddr_in6 sa6;
+    struct in6_ifreq ifr6;
+    unsigned long prefix_len;
+    char *cp;
+#endif
+#if HAVE_AFINET
+    extern struct aftype inet_aftype;
+#endif
+
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+
+    /* Find any options. */
+    argc--;
+    argv++;
+    while (argc && *argv[0] == '-') {
+       if (!strcmp(*argv, "-a"))
+           opt_a = 1;
+
+       else if (!strcmp(*argv, "-s"))
+           ife_short = 1;
+
+       else if (!strcmp(*argv, "-v"))
+           opt_v = 1;
+       
+       else if (!strcmp(*argv, "-V") || !strcmp(*argv, "-version") ||
+           !strcmp(*argv, "--version"))
+           version();
+
+       else if (!strcmp(*argv, "-?") || !strcmp(*argv, "-h") ||
+           !strcmp(*argv, "-help") || !strcmp(*argv, "--help"))
+           usage();
+
+       else {
+           fprintf(stderr, _("ifconfig: option `%s' not recognised.\n"), 
+                   argv[0]);
+           fprintf(stderr, _("ifconfig: `--help' gives usage information.\n"));
+           exit(1);
+       }
+
+       argv++;
+       argc--;
+    }
+
+    /* Create a channel to the NET kernel. */
+    if ((skfd = sockets_open(0)) < 0) {
+       perror("socket");
+       exit(1);
+    }
+
+    /* Do we have to show the current setup? */
+    if (argc == 0) {
+       int err = if_print((char *) NULL);
+       (void) close(skfd);
+       exit(err < 0);
+    }
+    /* No. Fetch the interface name. */
+    spp = argv;
+    safe_strncpy(ifr.ifr_name, *spp++, IFNAMSIZ);
+    if (*spp == (char *) NULL) {
+       int err = if_print(ifr.ifr_name);
+       (void) close(skfd);
+       exit(err < 0);
+    }
+
+    /* The next argument is either an address family name, or an option. */
+    if ((ap = get_aftype(*spp)) != NULL)
+       spp++; /* it was a AF name */
+    else 
+       ap = get_aftype(DFLT_AF);
+       
+    if (ap) {
+       addr_family = ap->af;
+       skfd = ap->fd;
+    }
+
+    /* Process the remaining arguments. */
+    while (*spp != (char *) NULL) {
+       if (!strcmp(*spp, "arp")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_NOARP);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-arp")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_NOARP);
+           spp++;
+           continue;
+       }
+#ifdef IFF_PORTSEL
+       if (!strcmp(*spp, "media") || !strcmp(*spp, "port")) {
+           if (*++spp == NULL)
+               usage();
+           if (!strcasecmp(*spp, "auto")) {
+               goterr |= set_flag(ifr.ifr_name, IFF_AUTOMEDIA);
+           } else {
+               int i, j, newport;
+               char *endp;
+               newport = strtol(*spp, &endp, 10);
+               if (*endp != 0) {
+                   newport = -1;
+                   for (i = 0; if_port_text[i][0] && newport == -1; i++) {
+                       for (j = 0; if_port_text[i][j]; j++) {
+                           if (!strcasecmp(*spp, if_port_text[i][j])) {
+                               newport = i;
+                               break;
+                           }
+                       }
+                   }
+               }
+               spp++;
+               if (newport == -1) {
+                   fprintf(stderr, _("Unknown media type.\n"));
+                   goterr = 1;
+               } else {
+                   if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) {
+                       perror("port: SIOCGIFMAP"); 
+                       goterr = 1;
+                       continue;
+                   }
+                   ifr.ifr_map.port = newport;
+                   if (ioctl(skfd, SIOCSIFMAP, &ifr) < 0) {
+                       perror("port: SIOCSIFMAP");
+                       goterr = 1;
+                   }
+               }
+           }
+           continue;
+       }
+#endif
+
+       if (!strcmp(*spp, "trailers")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_NOTRAILERS);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-trailers")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_NOTRAILERS);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "promisc")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_PROMISC);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-promisc")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_PROMISC);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "multicast")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_MULTICAST);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-multicast")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_MULTICAST);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "allmulti")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_ALLMULTI);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-allmulti")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_ALLMULTI);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "up")) {
+           goterr |= set_flag(ifr.ifr_name, (IFF_UP | IFF_RUNNING));
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "down")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_UP);
+           spp++;
+           continue;
+       }
+#ifdef HAVE_DYNAMIC
+       if (!strcmp(*spp, "dynamic")) {
+           goterr |= set_flag(ifr.ifr_name, IFF_DYNAMIC);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-dynamic")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_DYNAMIC);
+           spp++;
+           continue;
+       }
+#endif
+
+       if (!strcmp(*spp, "metric")) {
+           if (*++spp == NULL)
+               usage();
+           ifr.ifr_metric = atoi(*spp);
+           if (ioctl(skfd, SIOCSIFMETRIC, &ifr) < 0) {
+               fprintf(stderr, "SIOCSIFMETRIC: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "mtu")) {
+           if (*++spp == NULL)
+               usage();
+           ifr.ifr_mtu = atoi(*spp);
+           if (ioctl(skfd, SIOCSIFMTU, &ifr) < 0) {
+               fprintf(stderr, "SIOCSIFMTU: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#ifdef SIOCSKEEPALIVE
+       if (!strcmp(*spp, "keepalive")) {
+           if (*++spp == NULL)
+               usage();
+           ifr.ifr_data = (caddr_t) atoi(*spp);
+           if (ioctl(skfd, SIOCSKEEPALIVE, &ifr) < 0) {
+               fprintf(stderr, "SIOCSKEEPALIVE: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#endif
+
+#ifdef SIOCSOUTFILL
+       if (!strcmp(*spp, "outfill")) {
+           if (*++spp == NULL)
+               usage();
+           ifr.ifr_data = (caddr_t) atoi(*spp);
+           if (ioctl(skfd, SIOCSOUTFILL, &ifr) < 0) {
+               fprintf(stderr, "SIOCSOUTFILL: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#endif
+
+       if (!strcmp(*spp, "-broadcast")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_BROADCAST);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "broadcast")) {
+           if (*++spp != NULL) {
+               safe_strncpy(host, *spp, (sizeof host));
+               if (ap->input(0, host, &sa) < 0) {
+                   ap->herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               memcpy((char *) &ifr.ifr_broadaddr, (char *) &sa,
+                      sizeof(struct sockaddr));
+               if (ioctl(ap->fd, SIOCSIFBRDADDR, &ifr) < 0) {
+                   fprintf(stderr, "SIOCSIFBRDADDR: %s\n",
+                           strerror(errno));
+                   goterr = 1;
+               }
+               spp++;
+           }
+           goterr |= set_flag(ifr.ifr_name, IFF_BROADCAST);
+           continue;
+       }
+       if (!strcmp(*spp, "dstaddr")) {
+           if (*++spp == NULL)
+               usage();
+           safe_strncpy(host, *spp, (sizeof host));
+           if (ap->input(0, host, &sa) < 0) {
+               ap->herror(host);
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           memcpy((char *) &ifr.ifr_dstaddr, (char *) &sa,
+                  sizeof(struct sockaddr));
+           if (ioctl(ap->fd, SIOCSIFDSTADDR, &ifr) < 0) {
+               fprintf(stderr, "SIOCSIFDSTADDR: %s\n",
+                       strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "netmask")) {
+           if (*++spp == NULL || didnetmask)
+               usage();
+           safe_strncpy(host, *spp, (sizeof host));
+           if (ap->input(0, host, &sa) < 0) {
+               ap->herror(host);
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           didnetmask++;
+           goterr = set_netmask(ap->fd, &ifr, &sa);
+           spp++;
+           continue;
+       }
+#ifdef HAVE_TXQUEUELEN
+       if (!strcmp(*spp, "txqueuelen")) {
+           if (*++spp == NULL)
+               usage();
+           ifr.ifr_qlen = strtoul(*spp, NULL, 0);
+           if (ioctl(skfd, SIOCSIFTXQLEN, &ifr) < 0) {
+               fprintf(stderr, "SIOCSIFTXQLEN: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#endif
+
+       if (!strcmp(*spp, "mem_start")) {
+           if (*++spp == NULL)
+               usage();
+           if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) {
+               fprintf(stderr, "mem_start: SIOCGIFMAP: %s\n", strerror(errno)); 
+               spp++; 
+               goterr = 1;
+               continue;
+           }
+           ifr.ifr_map.mem_start = strtoul(*spp, NULL, 0);
+           if (ioctl(skfd, SIOCSIFMAP, &ifr) < 0) {
+               fprintf(stderr, "mem_start: SIOCSIFMAP: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "io_addr")) {
+           if (*++spp == NULL)
+               usage();
+           if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) {
+               fprintf(stderr, "io_addr: SIOCGIFMAP: %s\n", strerror(errno)); 
+               spp++; 
+               goterr = 1;
+               continue;
+           }
+           ifr.ifr_map.base_addr = strtol(*spp, NULL, 0);
+           if (ioctl(skfd, SIOCSIFMAP, &ifr) < 0) {
+               fprintf(stderr, "io_addr: SIOCSIFMAP: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "irq")) {
+           if (*++spp == NULL)
+               usage();
+           if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) {
+               fprintf(stderr, "irq: SIOCGIFMAP: %s\n", strerror(errno)); 
+               goterr = 1;
+               spp++; 
+               continue;
+           }
+           ifr.ifr_map.irq = atoi(*spp);
+           if (ioctl(skfd, SIOCSIFMAP, &ifr) < 0) {
+               fprintf(stderr, "irq: SIOCSIFMAP: %s\n", strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "-pointopoint")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "pointopoint")) {
+           if (*(spp + 1) != NULL) {
+               spp++;
+               safe_strncpy(host, *spp, (sizeof host));
+               if (ap->input(0, host, &sa)) {
+                   ap->herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               memcpy((char *) &ifr.ifr_dstaddr, (char *) &sa,
+                      sizeof(struct sockaddr));
+               if (ioctl(ap->fd, SIOCSIFDSTADDR, &ifr) < 0) {
+                   fprintf(stderr, "SIOCSIFDSTADDR: %s\n",
+                           strerror(errno));
+                   goterr = 1;
+               }
+           }
+           goterr |= set_flag(ifr.ifr_name, IFF_POINTOPOINT);
+           spp++;
+           continue;
+       };
+
+       if (!strcmp(*spp, "hw")) {
+           if (*++spp == NULL)
+               usage();
+           if ((hw = get_hwtype(*spp)) == NULL)
+               usage();
+           if (hw->input == NULL) {
+               fprintf(stderr, _("hw address type `%s' has no handler to set address. failed.\n"), *spp);
+               spp+=2;
+               goterr = 1;
+               continue;
+           }
+           if (*++spp == NULL)
+               usage();
+           safe_strncpy(host, *spp, (sizeof host));
+           if (hw->input(host, &sa) < 0) {
+               fprintf(stderr, _("%s: invalid %s address.\n"), host, hw->name);
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           memcpy((char *) &ifr.ifr_hwaddr, (char *) &sa,
+                  sizeof(struct sockaddr));
+           if (ioctl(skfd, SIOCSIFHWADDR, &ifr) < 0) {
+               fprintf(stderr, "SIOCSIFHWADDR: %s\n",
+                       strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#if HAVE_AFINET || HAVE_AFINET6
+       if (!strcmp(*spp, "add")) {
+           if (*++spp == NULL)
+               usage();
+#if HAVE_AFINET6
+           if (strchr(*spp, ':')) {
+               /* INET6 */
+               if ((cp = strchr(*spp, '/'))) {
+                   prefix_len = atol(cp + 1);
+                   if ((prefix_len < 0) || (prefix_len > 128))
+                       usage();
+                   *cp = 0;
+               } else {
+                   prefix_len = 0;
+               }
+               safe_strncpy(host, *spp, (sizeof host));
+               if (inet6_aftype.input(1, host, 
+                                      (struct sockaddr *) &sa6) < 0) {
+                   inet6_aftype.herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               memcpy((char *) &ifr6.ifr6_addr, (char *) &sa6.sin6_addr,
+                      sizeof(struct in6_addr));
+
+               fd = get_socket_for_af(AF_INET6);
+               if (fd < 0) {
+                   fprintf(stderr, 
+                           _("No support for INET6 on this system.\n"));
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               if (ioctl(fd, SIOGIFINDEX, &ifr) < 0) {
+                   perror("SIOGIFINDEX");
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               ifr6.ifr6_ifindex = ifr.ifr_ifindex;
+               ifr6.ifr6_prefixlen = prefix_len;
+               if (ioctl(fd, SIOCSIFADDR, &ifr6) < 0) {
+                   perror("SIOCSIFADDR");
+                   goterr = 1;
+               }
+               spp++;
+               continue;
+           }
+#endif
+#ifdef HAVE_AFINET
+           { /* ipv4 address a.b.c.d */
+               unsigned long ip, nm, bc;
+               safe_strncpy(host, *spp, (sizeof host));
+               if (inet_aftype.input(0, host, (struct sockaddr *)&sin) < 0) {
+                   ap->herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               fd = get_socket_for_af(AF_INET);
+               if (fd < 0) {
+                   fprintf(stderr, 
+                           _("No support for INET on this system.\n"));
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+
+               memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
+               
+               if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
+                       fprintf(stderr, _("Interface %s not initialized\n"),
+                               ifr.ifr_name);
+                       goterr = 1;
+                       spp++;
+                       continue;
+               }
+               set_ifstate(ifr.ifr_name, ip, nm, bc, 1);
+               
+           }
+           spp++;
+           continue;
+#else
+           fprintf(stderr, _("Bad address.\n"));
+#endif
+       }
+#endif
+
+#if HAVE_AFINET || HAVE_AFINET6
+       if (!strcmp(*spp, "del")) {
+           if (*++spp == NULL)
+               usage();
+
+#ifdef SIOCDIFADDR
+#if HAVE_AFINET6
+           if (strchr(*spp, ':')) {    /* INET6 */
+               if ((cp = strchr(*spp, '/'))) {
+                   prefix_len = atol(cp + 1);
+                   if ((prefix_len < 0) || (prefix_len > 128))
+                       usage();
+                   *cp = 0;
+               } else {
+                   prefix_len = 0;
+               }
+               safe_strncpy(host, *spp, (sizeof host));
+               if (inet6_aftype.input(1, host, 
+                                      (struct sockaddr *) &sa6) < 0) {
+                   inet6_aftype.herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               memcpy((char *) &ifr6.ifr6_addr, (char *) &sa6.sin6_addr,
+                      sizeof(struct in6_addr));
+               
+               fd = get_socket_for_af(AF_INET6);
+               if (fd < 0) {
+                   fprintf(stderr, 
+                           _("No support for INET6 on this system.\n"));
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               if (ioctl(fd, SIOGIFINDEX, &ifr) < 0) {
+                   perror("SIOGIFINDEX");
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               ifr6.ifr6_ifindex = ifr.ifr_ifindex;
+               ifr6.ifr6_prefixlen = prefix_len;
+               if (ioctl(fd, SIOCDIFADDR, &ifr6) < 0) {
+                   fprintf(stderr, "SIOCDIFADDR: %s\n",
+                           strerror(errno));
+                   goterr = 1;
+               }
+               spp++;
+               continue;
+           }
+#endif
+#ifdef HAVE_AFINET
+           {
+               /* ipv4 address a.b.c.d */
+               unsigned long ip, nm, bc;
+               safe_strncpy(host, *spp, (sizeof host));
+               if (inet_aftype.input(0, host, (struct sockaddr *)&sin) < 0) {
+                   ap->herror(host);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               fd = get_socket_for_af(AF_INET);
+               if (fd < 0) {
+                   fprintf(stderr, _("No support for INET on this system.\n"));
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               
+               memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long));
+               
+               if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) {
+                   fprintf(stderr, _("Interface %s not initialized\n"),
+                           ifr.ifr_name);
+                   goterr = 1;
+                   spp++;
+                   continue;
+               }
+               set_ifstate(ifr.ifr_name, ip, nm, bc, 0);
+           }
+           spp++;
+           continue;
+#else
+           fprintf(stderr, _("Bad address.\n"));
+#endif
+#else
+           fprintf(stderr, _("Address deletion not supported on this system.\n"));
+#endif
+       }
+#endif
+#if HAVE_AFINET6
+       if (!strcmp(*spp, "tunnel")) {
+           if (*++spp == NULL)
+               usage();
+           if ((cp = strchr(*spp, '/'))) {
+               prefix_len = atol(cp + 1);
+               if ((prefix_len < 0) || (prefix_len > 128))
+                   usage();
+               *cp = 0;
+           } else {
+               prefix_len = 0;
+           }
+           safe_strncpy(host, *spp, (sizeof host));
+           if (inet6_aftype.input(1, host, (struct sockaddr *) &sa6) < 0) {
+               inet6_aftype.herror(host);
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           memcpy((char *) &ifr6.ifr6_addr, (char *) &sa6.sin6_addr,
+                  sizeof(struct in6_addr));
+
+           fd = get_socket_for_af(AF_INET6);
+           if (fd < 0) {
+               fprintf(stderr, _("No support for INET6 on this system.\n"));
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           if (ioctl(fd, SIOGIFINDEX, &ifr) < 0) {
+               perror("SIOGIFINDEX");
+               goterr = 1;
+               spp++;
+               continue;
+           }
+           ifr6.ifr6_ifindex = ifr.ifr_ifindex;
+           ifr6.ifr6_prefixlen = prefix_len;
+
+           if (ioctl(fd, SIOCSIFDSTADDR, &ifr6) < 0) {
+               fprintf(stderr, "SIOCSIFDSTADDR: %s\n",
+                       strerror(errno));
+               goterr = 1;
+           }
+           spp++;
+           continue;
+       }
+#endif
+
+       /* If the next argument is a valid hostname, assume OK. */
+       safe_strncpy(host, *spp, (sizeof host));
+
+       /* FIXME: sa is too small for INET6 addresses, inet6 should use that too, 
+          broadcast is unexpected */
+       if (ap->getmask) {
+           switch (ap->getmask(host, &sa, NULL)) {
+           case -1:
+               usage();
+               break;
+           case 1:
+               if (didnetmask)
+                   usage();
+
+               goterr = set_netmask(skfd, &ifr, &sa);
+               didnetmask++;
+               break;
+           }
+       }
+       if (ap->input == NULL) {
+          fprintf(stderr, _("ifconfig: Cannot set address for this protocol family.\n"));
+          exit(1);
+       }
+       if (ap->input(0, host, &sa) < 0) {
+           ap->herror(host);
+           fprintf(stderr, _("ifconfig: `--help' gives usage information.\n"));
+           exit(1);
+       }
+       memcpy((char *) &ifr.ifr_addr, (char *) &sa, sizeof(struct sockaddr));
+       {
+           int r = 0;          /* to shut gcc up */
+           switch (ap->af) {
+#if HAVE_AFINET
+           case AF_INET:
+               fd = get_socket_for_af(AF_INET);
+               if (fd < 0) {
+                   fprintf(stderr, _("No support for INET on this system.\n"));
+                   exit(1);
+               }
+               r = ioctl(fd, SIOCSIFADDR, &ifr);
+               break;
+#endif
+#if HAVE_AFECONET
+           case AF_ECONET:
+               fd = get_socket_for_af(AF_ECONET);
+               if (fd < 0) {
+                   fprintf(stderr, _("No support for ECONET on this system.\n"));
+                   exit(1);
+               }
+               r = ioctl(fd, SIOCSIFADDR, &ifr);
+               break;
+#endif
+           default:
+               fprintf(stderr,
+               _("Don't know how to set addresses for family %d.\n"), ap->af);
+               exit(1);
+           }
+           if (r < 0) {
+               perror("SIOCSIFADDR");
+               goterr = 1;
+           }
+       }
+
+       /*
+        * Don't do the set_flag() if the address is an alias with a - at the
+        * end, since it's deleted already! - Roman
+        *
+        * Should really use regex.h here, not sure though how well it'll go
+        * with the cross-platform support etc. 
+        */
+        {
+            char *ptr;
+            short int found_colon = 0;
+            for (ptr = ifr.ifr_name; *ptr; ptr++ )
+                if (*ptr == ':') found_colon++;
+                
+            if (!(found_colon && *(ptr - 1) == '-'))
+                goterr |= set_flag(ifr.ifr_name, (IFF_UP | IFF_RUNNING));
+        }
+
+       spp++;
+    }
+
+    return (goterr);
+}
+
+struct ifcmd {
+    int flag;
+    unsigned long addr;
+    char *base;
+    int baselen;
+};
+
+static unsigned char searcher[256];
+
+static int set_ip_using(const char *name, int c, unsigned long ip)
+{
+    struct ifreq ifr;
+    struct sockaddr_in sin;
+
+    safe_strncpy(ifr.ifr_name, name, IFNAMSIZ);
+    memset(&sin, 0, sizeof(struct sockaddr));
+    sin.sin_family = AF_INET;
+    sin.sin_addr.s_addr = ip;
+    memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));
+    if (ioctl(skfd, c, &ifr) < 0)
+       return -1;
+    return 0;
+}
+
+static int do_ifcmd(struct interface *x, struct ifcmd *ptr)
+{
+    char *z, *e;
+    struct sockaddr_in *sin;
+    int i;
+    
+    if (do_if_fetch(x) < 0)
+       return 0;
+    if (strncmp(x->name, ptr->base, ptr->baselen) != 0)
+       return 0; /* skip */
+    z = strchr(x->name, ':');
+    if (!z || !*z)
+       return 0;
+    z++;
+    for (e = z; *e; e++)
+       if (*e == '-') /* deleted */
+           return 0;
+    i = atoi(z);
+    if (i < 0 || i > 255)
+       abort();
+    searcher[i] = 1;
+    
+    /* copy */
+    sin = (struct sockaddr_in *)&x->dstaddr;
+    if (sin->sin_addr.s_addr != ptr->addr) {
+       return 0;
+    }
+    
+    if (ptr->flag) {
+       /* turn UP */
+       if (set_flag(x->name, IFF_UP | IFF_RUNNING) == -1)
+           return -1;
+    } else {
+       /* turn DOWN */
+       if (clr_flag(x->name, IFF_UP) == -1)
+           return -1;
+    }
+    
+    return 1; /* all done! */
+}
+
+
+static int get_nmbc_parent(char *parent,
+                          unsigned long *nm, unsigned long *bc)
+{
+    struct interface *i;
+    struct sockaddr_in *sin;
+    
+    i = lookup_interface(parent);
+    if (!i)
+       return -1;
+    if (do_if_fetch(i) < 0)
+       return 0;
+    sin = (struct sockaddr_in *)&i->netmask;
+    memcpy(nm, &sin->sin_addr.s_addr, sizeof(unsigned long));
+    sin = (struct sockaddr_in *)&i->broadaddr;
+    memcpy(bc, &sin->sin_addr.s_addr, sizeof(unsigned long));
+    return 0;
+}
+
+static int set_ifstate(char *parent, unsigned long ip,
+                      unsigned long nm, unsigned long bc,
+                      int flag)
+{
+    char buf[IFNAMSIZ];
+    struct ifcmd pt;
+    int i;
+    
+    pt.base = parent;
+    pt.baselen = strlen(parent);
+    pt.addr = ip;
+    pt.flag = flag;
+    memset(searcher, 0, sizeof(searcher));
+    i = for_all_interfaces((int (*)(struct interface *,void *))do_ifcmd, 
+                          &pt);
+    if (i == -1)
+       return -1;
+    if (i == 1)
+       return 0;
+    
+    /* add a new interface */
+    for (i = 0; i < 256; i++)
+       if (searcher[i] == 0)
+           break;
+
+    if (i == 256)
+       return -1; /* FAILURE!!! out of ip addresses */
+    
+    if (snprintf(buf, IFNAMSIZ, "%s:%d", parent, i) > IFNAMSIZ)
+       return -1;
+    if (set_ip_using(buf, SIOCSIFADDR, ip) == -1)
+       return -1;
+    if (set_ip_using(buf, SIOCSIFNETMASK, nm) == -1)
+       return -1;
+    if (set_ip_using(buf, SIOCSIFBRDADDR, bc) == -1)
+       return -1;
+    if (set_flag(buf, IFF_BROADCAST) == -1)
+       return -1;
+    return 0;
+}
diff --git a/include/interface.h b/include/interface.h
new file mode 100644 (file)
index 0000000..f95555c
--- /dev/null
@@ -0,0 +1,96 @@
+struct user_net_device_stats {
+    unsigned long long rx_packets;     /* total packets received       */
+    unsigned long long tx_packets;     /* total packets transmitted    */
+    unsigned long long rx_bytes;       /* total bytes received         */
+    unsigned long long tx_bytes;       /* total bytes transmitted      */
+    unsigned long rx_errors;   /* bad packets received         */
+    unsigned long tx_errors;   /* packet transmit problems     */
+    unsigned long rx_dropped;  /* no space in linux buffers    */
+    unsigned long tx_dropped;  /* no space available in linux  */
+    unsigned long rx_multicast;        /* multicast packets received   */
+    unsigned long rx_compressed;
+    unsigned long tx_compressed;
+    unsigned long collisions;
+
+    /* detailed rx_errors: */
+    unsigned long rx_length_errors;
+    unsigned long rx_over_errors;      /* receiver ring buff overflow  */
+    unsigned long rx_crc_errors;       /* recved pkt with crc error    */
+    unsigned long rx_frame_errors;     /* recv'd frame alignment error */
+    unsigned long rx_fifo_errors;      /* recv'r fifo overrun          */
+    unsigned long rx_missed_errors;    /* receiver missed packet     */
+    /* detailed tx_errors */
+    unsigned long tx_aborted_errors;
+    unsigned long tx_carrier_errors;
+    unsigned long tx_fifo_errors;
+    unsigned long tx_heartbeat_errors;
+    unsigned long tx_window_errors;
+};
+
+struct interface {
+    struct interface *next, *prev; 
+    char name[IFNAMSIZ];       /* interface name        */
+    short type;                        /* if type               */
+    short flags;               /* various flags         */
+    int metric;                        /* routing metric        */
+    int mtu;                   /* MTU value             */
+    int tx_queue_len;          /* transmit queue length */
+    struct ifmap map;          /* hardware setup        */
+    struct sockaddr addr;      /* IP address            */
+    struct sockaddr dstaddr;   /* P-P IP address        */
+    struct sockaddr broadaddr; /* IP broadcast address  */
+    struct sockaddr netmask;   /* IP network mask       */
+    struct sockaddr ipxaddr_bb;        /* IPX network address   */
+    struct sockaddr ipxaddr_sn;        /* IPX network address   */
+    struct sockaddr ipxaddr_e3;        /* IPX network address   */
+    struct sockaddr ipxaddr_e2;        /* IPX network address   */
+    struct sockaddr ddpaddr;   /* Appletalk DDP address */
+    struct sockaddr ecaddr;    /* Econet address        */
+    int has_ip;
+    int has_ipx_bb;
+    int has_ipx_sn;
+    int has_ipx_e3;
+    int has_ipx_e2;
+    int has_ax25;
+    int has_ddp;
+    int has_econet;
+    char hwaddr[32];           /* HW address            */
+    int statistics_valid;
+    struct user_net_device_stats stats;                /* statistics            */
+    int keepalive;             /* keepalive value for SLIP */
+    int outfill;               /* outfill value for SLIP */
+};
+
+extern int if_fetch(struct interface *ife);
+
+extern int for_all_interfaces(int (*)(struct interface *, void *), void *);
+extern int free_interface_list(void);
+extern struct interface *lookup_interface(char *name);
+extern int if_readlist(void);
+
+extern int do_if_fetch(struct interface *ife);
+extern int do_if_print(struct interface *ife, void *cookie);
+
+extern void ife_print(struct interface *ptr);
+
+extern int ife_short;
+
+extern const char *if_port_text[][4];
+
+/* Defines for poor glibc2.0 users, the feature check is done at runtime */
+#if !defined(SIOCSIFTXQLEN)
+#define SIOCSIFTXQLEN      0x8943
+#define SIOCGIFTXQLEN      0x8942
+#endif
+
+#if !defined(ifr_qlen)
+/* Actually it is ifru_ivalue, but that is not present in 2.0 kernel headers */   
+#define ifr_qlen        ifr_ifru.ifru_mtu
+#endif
+
+#define HAVE_TXQUEUELEN
+
+#define HAVE_DYNAMIC
+#ifndef IFF_DYNAMIC
+#define IFF_DYNAMIC    0x8000  /* dialup device with changing addresses */
+#endif
diff --git a/include/ipx.h b/include/ipx.h
new file mode 100644 (file)
index 0000000..7cfa8cf
--- /dev/null
@@ -0,0 +1,30 @@
+
+/* Sanitised ipx.h for net-tools. */
+
+#ifndef _IPX_H_
+#define _IPX_H_
+
+#define IPX_NODE_LEN   6
+#define IPX_MTU                576
+
+struct sockaddr_ipx {
+#if LINUX_VERSION_CODE > 131328        /* 2.1.0 or later */
+    sa_family_t sipx_family;
+#else
+    short sipx_family;
+#endif
+    unsigned short sipx_port;
+    unsigned int sipx_network;
+    unsigned char sipx_node[IPX_NODE_LEN];
+    unsigned char sipx_type;
+    unsigned char sipx_zero;   /* 16 byte fill */
+};
+
+#define IPX_FRAME_NONE         0
+#define IPX_FRAME_SNAP         1
+#define IPX_FRAME_8022         2
+#define IPX_FRAME_ETHERII      3
+#define IPX_FRAME_8023         4
+#define IPX_FRAME_TR_8022      5
+
+#endif
diff --git a/include/mii.h b/include/mii.h
new file mode 100644 (file)
index 0000000..1ef7ccc
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * mii.h 1.4 2000/04/25 22:06:15
+ *
+ * Media Independent Interface support: register layout and ioctl's
+ *
+ * Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org
+ */
+
+#ifndef _LINUX_MII_H
+#define _LINUX_MII_H
+
+/* network interface ioctl's for MII commands */
+#ifndef SIOCGMIIPHY
+#define SIOCGMIIPHY (SIOCDEVPRIVATE)   /* Read from current PHY */
+#define SIOCGMIIREG (SIOCDEVPRIVATE+1)         /* Read any PHY register */
+#define SIOCSMIIREG (SIOCDEVPRIVATE+2)         /* Write any PHY register */
+#define SIOCGPARAMS (SIOCDEVPRIVATE+3)         /* Read operational parameters */
+#define SIOCSPARAMS (SIOCDEVPRIVATE+4)         /* Set operational parameters */
+#endif
+
+#include <linux/types.h>
+
+/* This data structure is used for all the MII ioctl's */
+struct mii_data {
+    __u16      phy_id;
+    __u16      reg_num;
+    __u16      val_in;
+    __u16      val_out;
+};
+
+/* Basic Mode Control Register */
+#define MII_BMCR               0x00
+#define  MII_BMCR_RESET                0x8000
+#define  MII_BMCR_LOOPBACK     0x4000
+#define  MII_BMCR_100MBIT      0x2000
+#define  MII_BMCR_AN_ENA       0x1000
+#define  MII_BMCR_ISOLATE      0x0400
+#define  MII_BMCR_RESTART      0x0200
+#define  MII_BMCR_DUPLEX       0x0100
+#define  MII_BMCR_COLTEST      0x0080
+
+/* Basic Mode Status Register */
+#define MII_BMSR               0x01
+#define  MII_BMSR_CAP_MASK     0xf800
+#define  MII_BMSR_100BASET4    0x8000
+#define  MII_BMSR_100BASETX_FD 0x4000
+#define  MII_BMSR_100BASETX_HD 0x2000
+#define  MII_BMSR_10BASET_FD   0x1000
+#define  MII_BMSR_10BASET_HD   0x0800
+#define  MII_BMSR_NO_PREAMBLE  0x0040
+#define  MII_BMSR_AN_COMPLETE  0x0020
+#define  MII_BMSR_REMOTE_FAULT 0x0010
+#define  MII_BMSR_AN_ABLE      0x0008
+#define  MII_BMSR_LINK_VALID   0x0004
+#define  MII_BMSR_JABBER       0x0002
+#define  MII_BMSR_EXT_CAP      0x0001
+
+#define MII_PHY_ID1            0x02
+#define MII_PHY_ID2            0x03
+
+/* Auto-Negotiation Advertisement Register */
+#define MII_ANAR               0x04
+/* Auto-Negotiation Link Partner Ability Register */
+#define MII_ANLPAR             0x05
+#define  MII_AN_NEXT_PAGE      0x8000
+#define  MII_AN_ACK            0x4000
+#define  MII_AN_REMOTE_FAULT   0x2000
+#define  MII_AN_ABILITY_MASK   0x07e0
+#define  MII_AN_FLOW_CONTROL   0x0400
+#define  MII_AN_100BASET4      0x0200
+#define  MII_AN_100BASETX_FD   0x0100
+#define  MII_AN_100BASETX_HD   0x0080
+#define  MII_AN_10BASET_FD     0x0040
+#define  MII_AN_10BASET_HD     0x0020
+#define  MII_AN_PROT_MASK      0x001f
+#define  MII_AN_PROT_802_3     0x0001
+
+/* Auto-Negotiation Expansion Register */
+#define MII_ANER               0x06
+#define  MII_ANER_MULT_FAULT   0x0010
+#define  MII_ANER_LP_NP_ABLE   0x0008
+#define  MII_ANER_NP_ABLE      0x0004
+#define  MII_ANER_PAGE_RX      0x0002
+#define  MII_ANER_LP_AN_ABLE   0x0001
+
+#endif /* _LINUX_MII_H */
diff --git a/include/sockets.h b/include/sockets.h
new file mode 100644 (file)
index 0000000..d900609
--- /dev/null
@@ -0,0 +1,4 @@
+extern int skfd, ipx_sock, ax25_sock, rose_sock, x25_sock, inet_sock, inet6_sock,
+ ddp_sock, ec_sock;
+
+extern int sockets_open(int family);
diff --git a/include/util-ank.h b/include/util-ank.h
new file mode 100644 (file)
index 0000000..04ab16c
--- /dev/null
@@ -0,0 +1,80 @@
+#ifndef __UTILS_H__
+#define __UTILS_H__ 1
+
+#include <asm/types.h>
+
+extern int preferred_family;
+extern int show_stats;
+extern int show_details;
+extern int show_raw;
+extern int resolve_hosts;
+
+#ifndef IPPROTO_ESP
+#define IPPROTO_ESP    50
+#endif
+#ifndef IPPROTO_AH
+#define IPPROTO_AH     51
+#endif
+
+#define SPRINT_BSIZE 64
+#define SPRINT_BUF(x)  char x[SPRINT_BSIZE]
+
+
+#define NEXT_ARG() \
+argv++; \
+if (--argc <= 0) \
+       usage();
+
+typedef struct
+{
+       __u8 family;
+       __u8 bytelen;
+       __s16 bitlen;
+       __u32 data[4];
+} inet_prefix;
+
+extern __u32 get_addr32(char *name);
+extern int get_addr_1(inet_prefix *dst, char *arg, int family);
+extern int get_prefix_1(inet_prefix *dst, char *arg, int family);
+extern int get_addr(inet_prefix *dst, char *arg, int family);
+extern int get_prefix(inet_prefix *dst, char *arg, int family);
+
+extern int scan_number(char *arg, unsigned *val);
+
+extern int get_integer(int *val, char *arg, int base);
+extern int get_unsigned(unsigned *val, char *arg, int base);
+#define get_byte get_u8
+#define get_ushort get_u16
+#define get_short get_s16
+extern int get_u32(__u32 *val, char *arg, int base);
+extern int get_u16(__u16 *val, char *arg, int base);
+extern int get_s16(__s16 *val, char *arg, int base);
+extern int get_u8(__u8 *val, char *arg, int base);
+extern int get_s8(__s8 *val, char *arg, int base);
+
+extern int get_tc_classid(__u32 *h, char *str);
+extern int print_tc_classid(char *buf, int len, __u32 h);
+extern char * sprint_tc_classid(__u32 h, char *buf);
+
+/* static void usage(void) __attribute__((noreturn)); */
+void invarg(char *) __attribute__((noreturn));
+int matches(char *arg, char *pattern);
+extern int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits);
+
+extern int ipaddr_list(int argc, char **argv);
+extern int iproute_monitor(int argc, char **argv);
+extern int do_ipaddr(int argc, char **argv);
+extern int do_iproute(int argc, char **argv);
+extern int do_iprule(int argc, char **argv);
+extern int do_ipneigh(int argc, char **argv);
+extern int do_iptunnel(int argc, char **argv);
+extern int do_iplink(int argc, char **argv);
+extern int do_ipmonitor(int argc, char **argv);
+extern int do_multiaddr(int argc, char **argv);
+extern int do_qdisc(int argc, char **argv);
+extern int do_class(int argc, char **argv);
+extern int do_filter(int argc, char **argv);
+
+extern const char *format_host(int af, void *addr, __u8 *abuf, int alen);
+
+#endif /* __UTILS_H__ */
diff --git a/intl.h b/intl.h
new file mode 100644 (file)
index 0000000..32d02b6
--- /dev/null
+++ b/intl.h
@@ -0,0 +1,12 @@
+/* Dummy header for libintl.h */
+
+#if I18N
+#include <locale.h>
+#undef __OPTIMIZE__
+#include <libintl.h>
+#define _(String) gettext((String))
+#define N_(String) (String)
+#else
+#define _(String) (String)
+#define N_(String) (String)
+#endif
diff --git a/ipmaddr.c b/ipmaddr.c
new file mode 100644 (file)
index 0000000..2134e81
--- /dev/null
+++ b/ipmaddr.c
@@ -0,0 +1,432 @@
+/*
+ * ipmaddr.c           "ip maddress".
+ *
+ *             This program is free software; you can redistribute it and/or
+ *             modify it under the terms of the GNU General Public License
+ *             as published by the Free Software Foundation; either version
+ *             2 of the License, or (at your option) any later version.
+ *
+ * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ *
+ * Changes:    Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *             20010404 - use setlocale
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <string.h>
+
+#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+#include <net/if.h>
+#else
+#include <linux/if.h>
+#endif
+
+#include "config.h"
+#include "intl.h"
+#include "util-ank.h"
+#include "net-support.h"
+#include "version.h"
+#include "pathnames.h"
+
+char filter_dev[16];
+int  filter_family;
+
+/* These have nothing to do with rtnetlink. :-) */
+#define NEWADDR                1
+#define DELADDR                2
+
+char *Release = RELEASE,
+     *Version = "ipmaddr 1.1",
+     *Signature = "Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>";
+
+static void version(void)
+{
+       printf("%s\n%s\n%s\n", Release, Version, Signature);
+       exit(E_VERSION);
+}
+
+static void usage(void) __attribute__((noreturn));
+
+static void usage(void)
+{
+       fprintf(stderr, _("Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"));
+       fprintf(stderr, _("       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"));
+       fprintf(stderr, _("       ipmaddr -V | -version\n"));
+       exit(-1);
+}
+
+static void print_lla(FILE *fp, int len, unsigned char *addr)
+{
+       int i;
+       for (i=0; i<len; i++) {
+               if (i==0)
+                       fprintf(fp, "%02x", addr[i]);
+               else
+                       fprintf(fp, ":%02x", addr[i]);
+       }
+}
+
+static int parse_lla(char *str, unsigned char *addr)
+{
+       int len=0;
+
+       while (*str) {
+               int tmp;
+               if (str[0] == ':' || str[0] == '.') {
+                       str++;
+                       continue;
+               }
+               if (str[1] == 0)
+                       return -1;
+               if (sscanf(str, "%02x", &tmp) != 1)
+                       return -1;
+               addr[len] = tmp;
+               len++;
+               str += 2;
+       }
+       return len;
+}
+
+static int parse_hex(char *str, unsigned char *addr)
+{
+       int len=0;
+
+       while (*str) {
+               int tmp;
+               if (str[1] == 0)
+                       return -1;
+               if (sscanf(str, "%02x", &tmp) != 1)
+                       return -1;
+               addr[len] = tmp;
+               len++;
+               str += 2;
+       }
+       return len;
+}
+
+struct ma_info
+{
+       struct ma_info *next;
+       int             index;
+       int             users;
+       char            *features;
+       char            name[IFNAMSIZ];
+       inet_prefix     addr;
+};
+
+void maddr_ins(struct ma_info **lst, struct ma_info *m)
+{
+       struct ma_info *mp;
+
+       for (; (mp=*lst) != NULL; lst = &mp->next) {
+               if (mp->index > m->index)
+                       break;
+       }
+       m->next = *lst;
+       *lst = m;
+}
+
+void read_dev_mcast(struct ma_info **result_p)
+{
+       char buf[256];
+       FILE *fp = fopen(_PATH_PROCNET_DEV_MCAST, "r");
+
+       if (!fp)
+               return;
+
+       while (fgets(buf, sizeof(buf), fp)) {
+               char hexa[256];
+               struct ma_info m;
+               int len;
+               int st;
+
+               memset(&m, 0, sizeof(m));
+               sscanf(buf, "%d%s%d%d%s", &m.index, m.name, &m.users, &st,
+                      hexa);
+               if (filter_dev[0] && strcmp(filter_dev, m.name))
+                       continue;
+
+               m.addr.family = AF_PACKET;
+
+               len = parse_hex(hexa, (unsigned char*)&m.addr.data);
+               if (len >= 0) {
+                       struct ma_info *ma = malloc(sizeof(m));
+
+                       memcpy(ma, &m, sizeof(m));
+                       ma->addr.bytelen = len;
+                       ma->addr.bitlen = len<<3;
+                       if (st)
+                               ma->features = "static";
+                       maddr_ins(result_p, ma);
+               }
+       }
+       fclose(fp);
+}
+
+void read_igmp(struct ma_info **result_p)
+{
+       struct ma_info m;
+       char buf[256];
+       FILE *fp = fopen(_PATH_PROCNET_IGMP, "r");
+
+       if (!fp)
+               return;
+       memset(&m, 0, sizeof(m));
+       fgets(buf, sizeof(buf), fp);
+
+       m.addr.family = AF_INET;
+       m.addr.bitlen = 32;
+       m.addr.bytelen = 4;
+
+       while (fgets(buf, sizeof(buf), fp)) {
+               struct ma_info *ma = malloc(sizeof(m));
+
+               if (buf[0] != '\t') {
+                       sscanf(buf, "%d%s", &m.index, m.name);
+                       continue;
+               }
+
+               if (filter_dev[0] && strcmp(filter_dev, m.name))
+                       continue;
+
+               sscanf(buf, "%08x%d", (__u32*)&m.addr.data, &m.users);
+
+               ma = malloc(sizeof(m));
+               memcpy(ma, &m, sizeof(m));
+               maddr_ins(result_p, ma);
+       }
+       fclose(fp);
+}
+
+
+void read_igmp6(struct ma_info **result_p)
+{
+       char buf[256];
+       FILE *fp = fopen(_PATH_PROCNET_IGMP6, "r");
+
+       if (!fp)
+               return;
+
+       while (fgets(buf, sizeof(buf), fp)) {
+               char hexa[256];
+               struct ma_info m;
+               int len;
+
+               memset(&m, 0, sizeof(m));
+               sscanf(buf, "%d%s%s%d", &m.index, m.name, hexa, &m.users);
+
+               if (filter_dev[0] && strcmp(filter_dev, m.name))
+                       continue;
+
+               m.addr.family = AF_INET6;
+
+               len = parse_hex(hexa, (unsigned char*)&m.addr.data);
+               if (len >= 0) {
+                       struct ma_info *ma = malloc(sizeof(m));
+
+                       memcpy(ma, &m, sizeof(m));
+
+                       ma->addr.bytelen = len;
+                       ma->addr.bitlen = len<<3;
+                       maddr_ins(result_p, ma);
+               }
+       }
+       fclose(fp);
+}
+
+static void print_maddr(FILE *fp, struct ma_info *list)
+{
+       fprintf(fp, "\t");
+
+       if (list->addr.family == AF_PACKET) {
+               fprintf(fp, "link  ");
+               print_lla(fp, list->addr.bytelen, (unsigned char*)list->addr.data);
+       } else {
+               char abuf[256];
+               switch(list->addr.family) {
+               case AF_INET:
+                       fprintf(fp, "inet  ");
+                       break;
+               case AF_INET6:
+                       fprintf(fp, "inet6 ");
+                       break;
+               default:
+                       fprintf(fp, _("family %d "), list->addr.family);
+                       break;
+               }
+               if (format_host(list->addr.family, list->addr.data, abuf, sizeof(abuf)))
+                       fprintf(fp, "%s", abuf);
+               else
+                       fprintf(fp, "?");
+       }
+       if (list->users != 1)
+               fprintf(fp, _(" users %d"), list->users);
+       if (list->features)
+               fprintf(fp, " %s", list->features);
+       fprintf(fp, "\n");
+}
+
+static void print_mlist(FILE *fp, struct ma_info *list)
+{
+       int cur_index = 0;
+
+       for (; list; list = list->next) {
+               if (cur_index != list->index) {
+                       cur_index = list->index;
+                       fprintf(fp, "%d:\t%s\n", cur_index, list->name);
+               }
+               print_maddr(fp, list);
+       }
+}
+
+static int multiaddr_list(int argc, char **argv)
+{
+       struct ma_info *list = NULL;
+
+       while (argc > 0) {
+               if (strcmp(*argv, "dev") == 0) {
+                       NEXT_ARG();
+                       if (filter_dev[0])
+                               usage();
+                       strcpy(filter_dev, *argv);
+               } else if (strcmp(*argv, "all") == 0) {
+                       filter_family = AF_UNSPEC;
+               } else if (strcmp(*argv, "ipv4") == 0) {
+                       filter_family = AF_INET;
+               } else if (strcmp(*argv, "ipv6") == 0) {
+                       filter_family = AF_INET6;
+               } else if (strcmp(*argv, "link") == 0) {
+                       filter_family = AF_PACKET;
+               } else {
+                       if (filter_dev[0])
+                               usage();
+                       strcpy(filter_dev, *argv);
+               }
+               argv++; argc--;
+       }
+
+       if (!filter_family || filter_family == AF_PACKET)
+               read_dev_mcast(&list);
+       if (!filter_family || filter_family == AF_INET)
+               read_igmp(&list);
+       if (!filter_family || filter_family == AF_INET6)
+               read_igmp6(&list);
+       print_mlist(stdout, list);
+       return 0;
+}
+
+int multiaddr_modify(int cmd, int argc, char **argv)
+{
+       struct ifreq ifr;
+       int fd;
+
+       memset(&ifr, 0, sizeof(ifr));
+
+       if (cmd == NEWADDR)
+               cmd = SIOCADDMULTI;
+       else
+               cmd = SIOCDELMULTI;
+
+       while (argc > 0) {
+               if (strcmp(*argv, "dev") == 0) {
+                       NEXT_ARG();
+                       if (ifr.ifr_name[0])
+                               usage();
+                       strncpy(ifr.ifr_name, *argv, IFNAMSIZ);
+               } else {
+                       if (ifr.ifr_hwaddr.sa_data[0])
+                               usage();
+                       if (parse_lla(*argv, ifr.ifr_hwaddr.sa_data) < 0)
+                               usage();
+               }
+               argc--; argv++;
+       }
+       if (ifr.ifr_name[0] == 0)
+               usage();
+
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       if (fd < 0) {
+               perror(_("Cannot create socket"));
+               exit(1);
+       }
+       if (ioctl(fd, cmd, (char*)&ifr) != 0) {
+               perror("ioctl");
+               exit(1);
+       }
+       close(fd);
+
+       exit(0);
+}
+
+
+int do_multiaddr(int argc, char **argv)
+{
+       if (argc < 1)
+               return multiaddr_list(0, NULL);
+       if (matches(*argv, "add") == 0)
+               return multiaddr_modify(NEWADDR, argc-1, argv+1);
+       if (matches(*argv, "delete") == 0)
+               return multiaddr_modify(DELADDR, argc-1, argv+1);
+       if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
+           || matches(*argv, "lst") == 0)
+               return multiaddr_list(argc-1, argv+1);
+       usage();
+}
+
+int preferred_family = AF_UNSPEC;
+int show_stats = 0;
+int resolve_hosts = 0;
+
+int main(int argc, char **argv)
+{
+       char *basename;
+
+#if I18N
+       setlocale (LC_ALL, "");
+       bindtextdomain("net-tools", "/usr/share/locale");
+       textdomain("net-tools");
+#endif
+
+       basename = strrchr(argv[0], '/');
+       if (basename == NULL)
+               basename = argv[0];
+       else
+               basename++;
+       
+       while (argc > 1) {
+               if (argv[1][0] != '-')
+                       break;
+               if (matches(argv[1], "-family") == 0) {
+                       argc--;
+                       argv++;
+                       if (argc <= 1)
+                               usage();
+                       if (strcmp(argv[1], "inet") == 0)
+                               preferred_family = AF_INET;
+                       else if (strcmp(argv[1], "inet6") == 0)
+                               preferred_family = AF_INET6;
+                       else
+                               usage();
+               } else if (matches(argv[1], "-stats") == 0 ||
+                          matches(argv[1], "-statistics") == 0) {
+                       ++show_stats;
+               } else if (matches(argv[1], "-resolve") == 0) {
+                       ++resolve_hosts;
+               } else if ((matches(argv[1], "-V") == 0) || matches(argv[1], "--version") == 0) {
+                       version();
+               } else
+                       usage();
+               argc--; argv++;
+       }
+
+       return do_multiaddr(argc-1, argv+1);
+}
diff --git a/iptunnel.c b/iptunnel.c
new file mode 100644 (file)
index 0000000..4943d83
--- /dev/null
@@ -0,0 +1,623 @@
+/*
+ * iptunnel.c         "ip tunnel"
+ *
+ *             This program is free software; you can redistribute it and/or
+ *             modify it under the terms of the GNU General Public License
+ *             as published by the Free Software Foundation; either version
+ *             2 of the License, or (at your option) any later version.
+ *
+ * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ *
+ *
+ * Changes:
+ *
+ * Rani Assaf <rani@magic.metawire.com> 980929:        resolve addresses
+ * Rani Assaf <rani@magic.metawire.com> 980930:        do not allow key for ipip/sit
+ * Bernd Eckenfels 990715: add linux/types.h (not clean but solves missing __u16
+ * Arnaldo Carvalho de Melo 20010404: use setlocale
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <arpa/inet.h>
+#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+#include <net/if.h>
+#include <net/if_arp.h>
+#else
+#include <linux/if.h>
+#include <linux/if_arp.h>
+#endif
+#include <linux/types.h>
+#include <linux/if_tunnel.h>
+
+#include "config.h"
+#include "intl.h"
+#include "net-support.h"
+#include "version.h"
+#include "util.h"
+
+#undef GRE_CSUM
+#define GRE_CSUM       htons(0x8000)
+#undef GRE_ROUTING
+#define GRE_ROUTING    htons(0x4000)
+#undef GRE_KEY
+#define GRE_KEY                htons(0x2000)
+#undef GRE_SEQ
+#define GRE_SEQ                htons(0x1000)
+#undef GRE_STRICT
+#define GRE_STRICT     htons(0x0800)
+#undef GRE_REC
+#define GRE_REC                htons(0x0700)
+#undef GRE_FLAGS
+#define GRE_FLAGS      htons(0x00F8)
+#undef GRE_VERSION
+#define GRE_VERSION    htons(0x0007)
+
+/* Old versions of glibc do not define this */
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+#define IPPROTO_GRE    47
+#endif
+
+#include "util-ank.h"
+
+char *Release = RELEASE,
+     *Version = "iptunnel 1.01",
+     *Signature = "Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>";
+
+static void version(void)
+{
+       printf("%s\n%s\n%s\n", Release, Version, Signature);
+       exit(E_VERSION);
+}
+
+static void usage(void) __attribute__((noreturn));
+
+static void usage(void)
+{
+       fprintf(stderr, _("Usage: iptunnel { add | change | del | show } [ NAME ]\n"));
+       fprintf(stderr, _("          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"));
+       fprintf(stderr, _("          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"));
+       fprintf(stderr, _("          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"));
+       fprintf(stderr, _("       iptunnel -V | --version\n\n"));
+       fprintf(stderr, _("Where: NAME := STRING\n"));
+       fprintf(stderr, _("       ADDR := { IP_ADDRESS | any }\n"));
+       fprintf(stderr, _("       TOS  := { NUMBER | inherit }\n"));
+       fprintf(stderr, _("       TTL  := { 1..255 | inherit }\n"));
+       fprintf(stderr, _("       KEY  := { DOTTED_QUAD | NUMBER }\n"));
+       exit(-1);
+}
+
+static int do_ioctl_get_ifindex(char *dev)
+{
+       struct ifreq ifr;
+       int fd;
+       int err;
+
+       strcpy(ifr.ifr_name, dev);
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, SIOCGIFINDEX, &ifr);
+       if (err) {
+               perror("ioctl");
+               return 0;
+       }
+       close(fd);
+       return ifr.ifr_ifindex;
+}
+
+static int do_ioctl_get_iftype(char *dev)
+{
+       struct ifreq ifr;
+       int fd;
+       int err;
+
+       strcpy(ifr.ifr_name, dev);
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, SIOCGIFHWADDR, &ifr);
+       if (err) {
+               perror("ioctl");
+               return -1;
+       }
+       close(fd);
+       return ifr.ifr_addr.sa_family;
+}
+
+
+static char * do_ioctl_get_ifname(int idx)
+{
+       static struct ifreq ifr;
+       int fd;
+       int err;
+
+       ifr.ifr_ifindex = idx;
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, SIOCGIFNAME, &ifr);
+       if (err) {
+               perror("ioctl");
+               return NULL;
+       }
+       close(fd);
+       return ifr.ifr_name;
+}
+
+
+
+static int do_get_ioctl(char *basedev, struct ip_tunnel_parm *p)
+{
+       struct ifreq ifr;
+       int fd;
+       int err;
+
+       strcpy(ifr.ifr_name, basedev);
+       ifr.ifr_ifru.ifru_data = (void*)p;
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, SIOCGETTUNNEL, &ifr);
+       if (err)
+               perror("ioctl");
+       close(fd);
+       return err;
+}
+
+static int do_add_ioctl(int cmd, char *basedev, struct ip_tunnel_parm *p)
+{
+       struct ifreq ifr;
+       int fd;
+       int err;
+
+       strcpy(ifr.ifr_name, basedev);
+       ifr.ifr_ifru.ifru_data = (void*)p;
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, cmd, &ifr);
+       if (err)
+               perror("ioctl");
+       close(fd);
+       return err;
+}
+
+static int do_del_ioctl(char *basedev, struct ip_tunnel_parm *p)
+{
+       struct ifreq ifr;
+       int fd;
+       int err;
+
+       strcpy(ifr.ifr_name, basedev);
+       ifr.ifr_ifru.ifru_data = (void*)p;
+       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       err = ioctl(fd, SIOCDELTUNNEL, &ifr);
+       if (err)
+               perror("ioctl");
+       close(fd);
+       return err;
+}
+
+static int parse_args(int argc, char **argv, struct ip_tunnel_parm *p)
+{
+       char medium[IFNAMSIZ];
+
+       memset(p, 0, sizeof(*p));
+       memset(&medium, 0, sizeof(medium));
+
+       p->iph.version = 4;
+       p->iph.ihl = 5;
+#ifndef IP_DF
+#define IP_DF          0x4000          /* Flag: "Don't Fragment"       */
+#endif
+       p->iph.frag_off = htons(IP_DF);
+
+       while (argc > 0) {
+               if (strcmp(*argv, "mode") == 0) {
+                       NEXT_ARG();
+                       if (strcmp(*argv, "ipip") == 0) {
+                               if (p->iph.protocol)
+                                       usage();
+                               p->iph.protocol = IPPROTO_IPIP;
+                       } else if (strcmp(*argv, "gre") == 0) {
+                               if (p->iph.protocol)
+                                       usage();
+                               p->iph.protocol = IPPROTO_GRE;
+                       } else if (strcmp(*argv, "sit") == 0) {
+                               if (p->iph.protocol)
+                                       usage();
+                               p->iph.protocol = IPPROTO_IPV6;
+                       } else
+                               usage();
+               } else if (strcmp(*argv, "key") == 0) {
+                       unsigned uval;
+                       NEXT_ARG();
+                       p->i_flags |= GRE_KEY;
+                       p->o_flags |= GRE_KEY;
+                       if (strchr(*argv, '.'))
+                               p->i_key = p->o_key = get_addr32(*argv);
+                       else {
+                               if (scan_number(*argv, &uval)<0)
+                                       usage();
+                               p->i_key = p->o_key = htonl(uval);
+                       }
+               } else if (strcmp(*argv, "ikey") == 0) {
+                       unsigned uval;
+                       NEXT_ARG();
+                       p->i_flags |= GRE_KEY;
+                       if (strchr(*argv, '.'))
+                               p->o_key = get_addr32(*argv);
+                       else {
+                               if (scan_number(*argv, &uval)<0)
+                                       usage();
+                               p->i_key = htonl(uval);
+                       }
+               } else if (strcmp(*argv, "okey") == 0) {
+                       unsigned uval;
+                       NEXT_ARG();
+                       p->o_flags |= GRE_KEY;
+                       if (strchr(*argv, '.'))
+                               p->o_key = get_addr32(*argv);
+                       else {
+                               if (scan_number(*argv, &uval)<0)
+                                       usage();
+                               p->o_key = htonl(uval);
+                       }
+               } else if (strcmp(*argv, "seq") == 0) {
+                       p->i_flags |= GRE_SEQ;
+                       p->o_flags |= GRE_SEQ;
+               } else if (strcmp(*argv, "iseq") == 0) {
+                       p->i_flags |= GRE_SEQ;
+               } else if (strcmp(*argv, "oseq") == 0) {
+                       p->o_flags |= GRE_SEQ;
+               } else if (strcmp(*argv, "csum") == 0) {
+                       p->i_flags |= GRE_CSUM;
+                       p->o_flags |= GRE_CSUM;
+               } else if (strcmp(*argv, "icsum") == 0) {
+                       p->i_flags |= GRE_CSUM;
+               } else if (strcmp(*argv, "ocsum") == 0) {
+                       p->o_flags |= GRE_CSUM;
+               } else if (strcmp(*argv, "nopmtudisc") == 0) {
+                       p->iph.frag_off = 0;
+               } else if (strcmp(*argv, "remote") == 0) {
+                       NEXT_ARG();
+                       if (strcmp(*argv, "any"))
+                               p->iph.daddr = get_addr32(*argv);
+               } else if (strcmp(*argv, "local") == 0) {
+                       NEXT_ARG();
+                       if (strcmp(*argv, "any"))
+                               p->iph.saddr = get_addr32(*argv);
+               } else if (strcmp(*argv, "dev") == 0) {
+                       NEXT_ARG();
+                       safe_strncpy(medium, *argv, IFNAMSIZ-1);
+               } else if (strcmp(*argv, "ttl") == 0) {
+                       unsigned uval;
+                       NEXT_ARG();
+                       if (strcmp(*argv, "inherit") != 0) {
+                               if (scan_number(*argv, &uval)<0)
+                                       usage();
+                               if (uval > 255)
+                                       usage();
+                               p->iph.ttl = uval;
+                       }
+               } else if (strcmp(*argv, "tos") == 0) {
+                       unsigned uval;
+                       NEXT_ARG();
+                       if (strcmp(*argv, "inherit") != 0) {
+                               if (scan_number(*argv, &uval)<0)
+                                       usage();
+                               if (uval > 255)
+                                       usage();
+                               p->iph.tos = uval;
+                       } else
+                               p->iph.tos = 1;
+               } else {
+                       if (p->name[0])
+                               usage();
+                       safe_strncpy(p->name, *argv, IFNAMSIZ);
+               }
+               argc--; argv++;
+       }
+
+       if (p->iph.protocol == 0) {
+               if (memcmp(p->name, "gre", 3) == 0)
+                       p->iph.protocol = IPPROTO_GRE;
+               else if (memcmp(p->name, "ipip", 4) == 0)
+                       p->iph.protocol = IPPROTO_IPIP;
+               else if (memcmp(p->name, "sit", 3) == 0)
+                       p->iph.protocol = IPPROTO_IPV6;
+       }
+
+       if (p->iph.protocol == IPPROTO_IPIP || p->iph.protocol == IPPROTO_IPV6) {
+               if ((p->i_flags & GRE_KEY) || (p->o_flags & GRE_KEY)) {
+                       fprintf(stderr, _("Keys are not allowed with ipip and sit.\n"));
+                       return -1;
+               }
+       }
+
+       if (medium[0]) {
+               p->link = do_ioctl_get_ifindex(medium);
+               if (p->link == 0)
+                       return -1;
+       }
+
+       if (p->i_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) {
+               p->i_key = p->iph.daddr;
+               p->i_flags |= GRE_KEY;
+       }
+       if (p->o_key == 0 && IN_MULTICAST(ntohl(p->iph.daddr))) {
+               p->o_key = p->iph.daddr;
+               p->o_flags |= GRE_KEY;
+       }
+       if (IN_MULTICAST(ntohl(p->iph.daddr)) && !p->iph.saddr) {
+               fprintf(stderr, _("Broadcast tunnel requires a source address.\n"));
+               return -1;
+       }
+       return 0;
+}
+
+
+static int do_add(int cmd, int argc, char **argv)
+{
+       struct ip_tunnel_parm p;
+
+       if (parse_args(argc, argv, &p) < 0)
+               return -1;
+
+       if (p.iph.ttl && p.iph.frag_off == 0) {
+               fprintf(stderr, _("ttl != 0 and noptmudisc are incompatible\n"));
+               return -1;
+       }
+
+       switch (p.iph.protocol) {
+       case IPPROTO_IPIP:
+               return do_add_ioctl(cmd, "tunl0", &p);
+       case IPPROTO_GRE:
+               return do_add_ioctl(cmd, "gre0", &p);
+       case IPPROTO_IPV6:
+               return do_add_ioctl(cmd, "sit0", &p);
+       default:        
+               fprintf(stderr, _("cannot determine tunnel mode (ipip, gre or sit)\n"));
+               return -1;
+       }
+       return -1;
+}
+
+int do_del(int argc, char **argv)
+{
+       struct ip_tunnel_parm p;
+
+       if (parse_args(argc, argv, &p) < 0)
+               return -1;
+
+       switch (p.iph.protocol) {
+       case IPPROTO_IPIP:      
+               return do_del_ioctl(p.name[0] ? p.name : "tunl0", &p);
+       case IPPROTO_GRE:       
+               return do_del_ioctl(p.name[0] ? p.name : "gre0", &p);
+       case IPPROTO_IPV6:      
+               return do_del_ioctl(p.name[0] ? p.name : "sit0", &p);
+       default:        
+               return do_del_ioctl(p.name, &p);
+       }
+       return -1;
+}
+
+void print_tunnel(struct ip_tunnel_parm *p)
+{
+       char s1[256];
+       char s2[256];
+       char s3[64];
+       char s4[64];
+
+       format_host(AF_INET, &p->iph.daddr, s1, sizeof(s1));
+       format_host(AF_INET, &p->iph.saddr, s2, sizeof(s2));
+       inet_ntop(AF_INET, &p->i_key, s3, sizeof(s3));
+       inet_ntop(AF_INET, &p->o_key, s4, sizeof(s4));
+
+       printf(_("%s: %s/ip  remote %s  local %s "),
+              p->name,
+              p->iph.protocol == IPPROTO_IPIP ? "ip" :
+              (p->iph.protocol == IPPROTO_GRE ? "gre" :
+               (p->iph.protocol == IPPROTO_IPV6 ? "ipv6" : _("unknown"))),
+              p->iph.daddr ? s1 : "any", p->iph.saddr ? s2 : "any");
+       if (p->link) {
+               char *n = do_ioctl_get_ifname(p->link);
+               if (n)
+                       printf(" dev %s ", n);
+       }
+       if (p->iph.ttl)
+               printf(" ttl %d ", p->iph.ttl);
+       else
+               printf(" ttl inherit ");
+       if (p->iph.tos) {
+               printf(" tos");
+               if (p->iph.tos&1)
+                       printf(" inherit");
+               if (p->iph.tos&~1)
+                       printf("%c%02x ", p->iph.tos&1 ? '/' : ' ', p->iph.tos&~1);
+       }
+       if (!(p->iph.frag_off&htons(IP_DF)))
+               printf(" nopmtudisc");
+
+       if ((p->i_flags&GRE_KEY) && (p->o_flags&GRE_KEY) && p->o_key == p->i_key)
+               printf(" key %s", s3);
+       else if ((p->i_flags|p->o_flags)&GRE_KEY) {
+               if (p->i_flags&GRE_KEY)
+                       printf(" ikey %s ", s3);
+               if (p->o_flags&GRE_KEY)
+                       printf(" okey %s ", s4);
+       }
+       printf("\n");
+
+       if (p->i_flags&GRE_SEQ)
+               printf(_("  Drop packets out of sequence.\n"));
+       if (p->i_flags&GRE_CSUM)
+               printf(_("  Checksum in received packet is required.\n"));
+       if (p->o_flags&GRE_SEQ)
+               printf(_("  Sequence packets on output.\n"));
+       if (p->o_flags&GRE_CSUM)
+               printf(_("  Checksum output packets.\n"));
+}
+
+static int do_tunnels_list(struct ip_tunnel_parm *p)
+{
+       char name[IFNAMSIZ];
+       unsigned long  rx_bytes, rx_packets, rx_errs, rx_drops,
+       rx_fifo, rx_frame,
+       tx_bytes, tx_packets, tx_errs, tx_drops,
+       tx_fifo, tx_colls, tx_carrier, rx_multi;
+       int type;
+       struct ip_tunnel_parm p1;
+
+       char buf[512];
+       FILE *fp = fopen("/proc/net/dev", "r");
+       if (fp == NULL) {
+               perror("fopen");
+               return -1;
+       }
+
+       fgets(buf, sizeof(buf), fp);
+       fgets(buf, sizeof(buf), fp);
+
+       while (fgets(buf, sizeof(buf), fp) != NULL) {
+               char *ptr;
+               buf[sizeof(buf) - 1] = 0;
+               if ((ptr = strchr(buf, ':')) == NULL ||
+                   (*ptr++ = 0, sscanf(buf, "%s", name) != 1)) {
+                       fprintf(stderr, _("Wrong format of /proc/net/dev. Sorry.\n"));
+                       return -1;
+               }
+               if (sscanf(ptr, "%ld%ld%ld%ld%ld%ld%ld%*d%ld%ld%ld%ld%ld%ld%ld",
+                          &rx_bytes, &rx_packets, &rx_errs, &rx_drops,
+                          &rx_fifo, &rx_frame, &rx_multi,
+                          &tx_bytes, &tx_packets, &tx_errs, &tx_drops,
+                          &tx_fifo, &tx_colls, &tx_carrier) != 14)
+                       continue;
+               if (p->name[0] && strcmp(p->name, name))
+                       continue;
+               type = do_ioctl_get_iftype(name);
+               if (type == -1) {
+                       fprintf(stderr, _("Failed to get type of [%s]\n"), name);
+                       continue;
+               }
+               if (type != ARPHRD_TUNNEL && type != ARPHRD_IPGRE && type != ARPHRD_SIT)
+                       continue;
+               memset(&p1, 0, sizeof(p1));
+               if (do_get_ioctl(name, &p1))
+                       continue;
+               if ((p->link && p1.link != p->link) ||
+                   (p->name[0] && strcmp(p1.name, p->name)) ||
+                   (p->iph.daddr && p1.iph.daddr != p->iph.daddr) ||
+                   (p->iph.saddr && p1.iph.saddr != p->iph.saddr) ||
+                   (p->i_key && p1.i_key != p->i_key))
+                       continue;
+               print_tunnel(&p1);
+               if (show_stats) {
+                       printf(_("RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"));
+                       printf("    %-10ld %-12ld %-6ld %-8ld %-8ld %-8ld\n",
+                              rx_packets, rx_bytes, rx_errs, rx_frame, rx_fifo, rx_multi);
+                       printf(_("TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"));
+                       printf("    %-10ld %-12ld %-6ld %-8ld %-8ld %-6ld\n\n",
+                              tx_packets, tx_bytes, tx_errs, tx_colls, tx_carrier, tx_drops);
+               }
+       }
+       return 0;
+}
+
+static int do_show(int argc, char **argv)
+{
+       int err;
+       struct ip_tunnel_parm p;
+
+       if (parse_args(argc, argv, &p) < 0)
+               return -1;
+
+       switch (p.iph.protocol) {
+       case IPPROTO_IPIP:      
+               err = do_get_ioctl(p.name[0] ? p.name : "tunl0", &p);
+               break;
+       case IPPROTO_GRE:
+               err = do_get_ioctl(p.name[0] ? p.name : "gre0", &p);
+               break;
+       case IPPROTO_IPV6:
+               err = do_get_ioctl(p.name[0] ? p.name : "sit0", &p);
+               break;
+       default:
+               do_tunnels_list(&p);
+               return 0;
+       }
+       if (err)
+               return -1;
+
+       print_tunnel(&p);
+       return 0;
+}
+
+int do_iptunnel(int argc, char **argv)
+{
+       if (argc > 0) {
+               if (matches(*argv, "add") == 0)
+                       return do_add(SIOCADDTUNNEL, argc-1, argv+1);
+               if (matches(*argv, "change") == 0)
+                       return do_add(SIOCCHGTUNNEL, argc-1, argv+1);
+               if (matches(*argv, "del") == 0)
+                       return do_del(argc-1, argv+1);
+               if (matches(*argv, "show") == 0 ||
+                   matches(*argv, "lst") == 0 ||
+                   matches(*argv, "list") == 0)
+                       return do_show(argc-1, argv+1);
+       } else
+               return do_show(0, NULL);
+
+       usage();
+}
+
+
+int preferred_family = AF_UNSPEC;
+int show_stats = 0;
+int resolve_hosts = 0;
+
+int main(int argc, char **argv)
+{
+       char *basename;
+
+#if I18N
+       setlocale (LC_ALL, "");
+       bindtextdomain("net-tools", "/usr/share/locale");
+       textdomain("net-tools");
+#endif
+
+       basename = strrchr(argv[0], '/');
+       if (basename == NULL)
+               basename = argv[0];
+       else
+               basename++;
+       
+       while (argc > 1) {
+               if (argv[1][0] != '-')
+                       break;
+               if (matches(argv[1], "-family") == 0) {
+                       argc--;
+                       argv++;
+                       if (argc <= 1)
+                               usage();
+                       if (strcmp(argv[1], "inet") == 0)
+                               preferred_family = AF_INET;
+                       else if (strcmp(argv[1], "inet6") == 0)
+                               preferred_family = AF_INET6;
+                       else
+                               usage();
+               } else if (matches(argv[1], "-stats") == 0 ||
+                          matches(argv[1], "-statistics") == 0) {
+                       ++show_stats;
+               } else if (matches(argv[1], "-resolve") == 0) {
+                       ++resolve_hosts;
+               } else if ((matches(argv[1], "-V") == 0) || (matches(argv[1], "--version") == 0)) {
+                       version();
+               } else
+                       usage();
+               argc--; argv++;
+       }
+
+       return do_iptunnel(argc-1, argv+1);
+}
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644 (file)
index 0000000..d714b2e
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# lib/Makefile Makefile for the net-lib function collection
+#
+# NET-LIB      A collection of functions used from the base set of the
+#              NET-2 Networking Distribution for the LINUX operating
+#              system.  (net-tools, net-drivers)
+#
+# Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#              Copyright 1993 MicroWalt Corporation
+#
+#              This program is free software; you can redistribute it
+#              and/or  modify it under  the terms of  the GNU General
+#              Public  License as  published  by  the  Free  Software
+#              Foundation;  either  version 2 of the License, or  (at
+#              your option) any later version.
+#
+
+
+HWOBJS  = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o
+AFOBJS  = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.o
+AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o rose_gr.o getroute.o x25_gr.o
+AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o
+ACTOBJS  = slip_ac.o ppp_ac.o activate.o
+VARIA   = getargs.o masq_info.o proc.o util.o nstrcmp.o interface.o sockets.o
+
+# Default Name
+NET_LIB_NAME = net-tools
+
+ifeq ($(HAVE_IP_TOOLS),1)
+VARIA  += util-ank.o
+endif
+
+OBJS   = $(sort $(VARIA) $(AFOBJS) $(HWOBJS) \
+               $(AFGROBJS) $(AFSROBJS) $(ACTOBJS))
+
+
+# This can be overwritten by the TOPLEVEL Makefile
+TOPDIR=..
+CFLAGS += -I$(TOPDIR) -idirafter $(TOPDIR)/include # -fPIC
+SONAME=libnet-tools.so.0
+
+.SUFFIXES: .a .so
+
+all:   lib$(NET_LIB_NAME).a # lib$(NET_LIB_NAME).so
+
+lib$(NET_LIB_NAME).a:  Makefile $(TOPDIR)/config.h $(OBJS)
+                       @echo Building $@
+                       @rm -f $@
+                       @$(AR) rcs $@ $(OBJS)
+
+.a.so:;
+       $(CC) -o $@ -shared -Wl,--whole-archive -Wl,--soname -Wl,$(SONAME) -nostdlib -nostartfiles $<
+
+clean:
+               rm -f *.o *~ *.orig lib$(NET_LIB_NAME).a lib$(NET_LIB_NAME).so
+
+clobber:       clean
+
+# End of lib/Makefile.
diff --git a/lib/activate.c b/lib/activate.c
new file mode 100644 (file)
index 0000000..ae8ade2
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * lib/activate.c     This file contains a small interface function to
+ *                      use the HW specific activate routines for line
+ *                      disciplines
+ *
+ * NET-LIB      A collection of functions used from the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system. (net-tools, net-drivers)
+ *
+ * Version:     $Id: activate.c,v 1.3 1998/11/15 20:08:55 freitag Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
+ *              Copyright 1996 Bernd Eckenfels, Germany
+ *
+ * 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
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <stdio.h>
+#include <string.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+
+extern struct hwtype slip_hwtype;
+extern struct hwtype cslip_hwtype;
+extern struct hwtype slip6_hwtype;
+extern struct hwtype cslip6_hwtype;
+extern struct hwtype adaptive_hwtype;
+extern struct hwtype ppp_hwtype;
+
+extern int SLIP_activate(int fd);
+extern int CSLIP_activate(int fd);
+extern int SLIP6_activate(int fd);
+extern int CSLIP6_activate(int fd);
+extern int ADAPTIVE_activate(int fd);
+extern int PPP_activate(int fd);
+
+void activate_init(void)
+{
+#if HAVE_HWSLIP
+    slip_hwtype.activate = SLIP_activate;
+    cslip_hwtype.activate = CSLIP_activate;
+    slip6_hwtype.activate = SLIP6_activate;
+    cslip6_hwtype.activate = CSLIP6_activate;
+    adaptive_hwtype.activate = ADAPTIVE_activate;
+#endif
+#if HAVE_HWPPP
+    ppp_hwtype.activate = PPP_activate;
+#endif
+}
+
+int activate_ld(const char *hwname, int fd)
+{
+    struct hwtype *hw;
+
+    hw = get_hwtype(hwname);
+
+    if (!hw) {
+       fprintf(stderr, _("Hardware type `%s' not supported.\n"), hwname);
+       return (E_NOSUPP);
+    }
+    if (!hw->activate) {
+       fprintf(stderr, _("Cannot change line discipline to `%s'.\n"), hw->name);
+       return (E_OPTERR);
+    }
+    return (hw->activate(fd));
+}
diff --git a/lib/af.c b/lib/af.c
new file mode 100644 (file)
index 0000000..4f002c4
--- /dev/null
+++ b/lib/af.c
@@ -0,0 +1,345 @@
+/*
+ * lib/af.c   This file contains the top-level part of the protocol
+ *              support functions module for the NET-2 base distribution.
+ *
+ * Version:     $Id: af.c,v 1.13 2000/05/20 13:38:10 pb Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "config.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+int flag_unx;
+int flag_ipx;
+int flag_ax25;
+int flag_ddp;
+int flag_netrom;
+int flag_inet;
+int flag_inet6;
+int flag_econet;
+int flag_x25 = 0;
+int flag_ash;
+
+
+struct aftrans_t {
+    char *alias;
+    char *name;
+    int *flag;
+} aftrans[] = {
+
+    {
+       "ax25", "ax25", &flag_ax25
+    },
+    {
+       "ip", "inet", &flag_inet
+    },
+    {
+       "ip6", "inet6", &flag_inet6
+    },
+    {
+       "ipx", "ipx", &flag_ipx
+    },
+    {
+       "appletalk", "ddp", &flag_ddp
+    },
+    {
+       "netrom", "netrom", &flag_netrom
+    },
+    {
+       "inet", "inet", &flag_inet
+    },
+    {
+       "inet6", "inet6", &flag_inet6
+    },
+    {
+       "ddp", "ddp", &flag_ddp
+    },
+    {
+       "unix", "unix", &flag_unx
+    },
+    {
+       "tcpip", "inet", &flag_inet
+    },
+    {
+       "econet", "ec", &flag_econet
+    },
+    {
+       "x25", "x25", &flag_x25
+    },
+    {
+        "ash", "ash", &flag_ash
+    },
+    {
+       0, 0, 0
+    }
+};
+
+char afname[256] = "";
+
+extern struct aftype unspec_aftype;
+extern struct aftype unix_aftype;
+extern struct aftype inet_aftype;
+extern struct aftype inet6_aftype;
+extern struct aftype ax25_aftype;
+extern struct aftype netrom_aftype;
+extern struct aftype ipx_aftype;
+extern struct aftype ddp_aftype;
+extern struct aftype ec_aftype;
+extern struct aftype x25_aftype;
+extern struct aftype rose_aftype;
+extern struct aftype ash_aftype;
+
+static short sVafinit = 0;
+
+struct aftype *aftypes[] =
+{
+#if HAVE_AFUNIX
+    &unix_aftype,
+#endif
+#if HAVE_AFINET
+    &inet_aftype,
+#endif
+#if HAVE_AFINET6
+    &inet6_aftype,
+#endif
+#if HAVE_AFAX25
+    &ax25_aftype,
+#endif
+#if HAVE_AFNETROM
+    &netrom_aftype,
+#endif
+#if HAVE_AFROSE
+    &rose_aftype,
+#endif
+#if HAVE_AFIPX
+    &ipx_aftype,
+#endif
+#if HAVE_AFATALK
+    &ddp_aftype,
+#endif
+#if HAVE_AFECONET
+    &ec_aftype,
+#endif
+#if HAVE_AFASH
+    &ash_aftype,
+#endif
+#if HAVE_AFX25
+    &x25_aftype,
+#endif
+    &unspec_aftype,
+    NULL
+};
+
+void afinit()
+{
+    unspec_aftype.title = _("UNSPEC");
+#if HAVE_AFUNIX
+    unix_aftype.title = _("UNIX Domain");
+#endif
+#if HAVE_AFINET
+    inet_aftype.title = _("DARPA Internet");
+#endif
+#if HAVE_AFINET6
+    inet6_aftype.title = _("IPv6");
+#endif
+#if HAVE_AFAX25
+    ax25_aftype.title = _("AMPR AX.25");
+#endif
+#if HAVE_AFNETROM
+    netrom_aftype.title = _("AMPR NET/ROM");
+#endif
+#if HAVE_AFIPX
+    ipx_aftype.title = _("Novell IPX");
+#endif
+#if HAVE_AFATALK
+    ddp_aftype.title = _("Appletalk DDP");
+#endif
+#if HAVE_AFECONET
+    ec_aftype.title = _("Econet");
+#endif
+#if HAVE_AFX25
+    x25_aftype.title = _("CCITT X.25");
+#endif
+#if HAVE_AFROSE
+    rose_aftype.title = _("AMPR ROSE");
+#endif
+#if HAVE_AFASH
+    ash_aftype.title = _("Ash");
+#endif
+    sVafinit = 1;
+}
+
+/* set the default AF list from the program name or a constant value    */
+void aftrans_def(char *tool, char *argv0, char *dflt)
+{
+    char *tmp;
+    char *buf;
+
+    strcpy(afname, dflt);
+
+    if (!(tmp = strrchr(argv0, '/')))
+       tmp = argv0;            /* no slash?! */
+    else
+       tmp++;
+
+    if (!(buf = strdup(tmp)))
+       return;
+
+    if (strlen(tool) >= strlen(tmp)) {
+       free(buf);
+       return;
+    }
+    tmp = buf + (strlen(tmp) - strlen(tool));
+
+    if (strcmp(tmp, tool) != 0) {
+       free(buf);
+       return;
+    }
+    *tmp = '\0';
+    if ((tmp = strchr(buf, '_')))
+       *tmp = '\0';
+
+    afname[0] = '\0';
+    if (aftrans_opt(buf))
+       strcpy(afname, buf);
+
+    free(buf);
+}
+
+
+/* Check our protocol family table for this family. */
+struct aftype *get_aftype(const char *name)
+{
+    struct aftype **afp;
+
+    if (!sVafinit)
+       afinit();
+
+    afp = aftypes;
+    while (*afp != NULL) {
+       if (!strcmp((*afp)->name, name))
+           return (*afp);
+       afp++;
+    }
+    if (index(name, ','))
+       fprintf(stderr, _("Please don't supply more than one address family.\n"));
+    return (NULL);
+}
+
+
+/* Check our protocol family table for this family. */
+struct aftype *get_afntype(int af)
+{
+    struct aftype **afp;
+
+    if (!sVafinit)
+       afinit();
+
+    afp = aftypes;
+    while (*afp != NULL) {
+       if ((*afp)->af == af)
+           return (*afp);
+       afp++;
+    }
+    return (NULL);
+}
+
+/* Check our protocol family table for this family and return its socket */
+int get_socket_for_af(int af)
+{
+    struct aftype **afp;
+
+    if (!sVafinit)
+       afinit();
+
+    afp = aftypes;
+    while (*afp != NULL) {
+       if ((*afp)->af == af)
+           return (*afp)->fd;
+       afp++;
+    }
+    return -1;
+}
+
+int aftrans_opt(const char *arg)
+{
+    struct aftrans_t *paft;
+    char *tmp1, *tmp2;
+    char buf[256];
+
+    safe_strncpy(buf, arg, sizeof(buf));
+
+    tmp1 = buf;
+
+    while (tmp1) {
+
+       tmp2 = index(tmp1, ',');
+
+       if (tmp2)
+           *(tmp2++) = '\0';
+
+       paft = aftrans;
+       for (paft = aftrans; paft->alias; paft++) {
+           if (strcmp(tmp1, paft->alias))
+               continue;
+           if (strlen(paft->name) + strlen(afname) + 1 >= sizeof(afname)) {
+               fprintf(stderr, _("Too much address family arguments.\n"));
+               return (0);
+           }
+           if (paft->flag)
+               (*paft->flag)++;
+           if (afname[0])
+               strcat(afname, ",");
+           strcat(afname, paft->name);
+           break;
+       }
+       if (!paft->alias) {
+           fprintf(stderr, _("Unknown address family `%s'.\n"), tmp1);
+           return (1);
+       }
+       tmp1 = tmp2;
+    }
+
+    return (0);
+}
+
+/* type: 0=all, 1=getroute */
+void print_aflist(int type) {
+    int count = 0;
+    char * txt;
+    struct aftype **afp;
+
+    if (!sVafinit)
+       afinit();
+
+    afp = aftypes;
+    while (*afp != NULL) {
+       if ((type == 1 && ((*afp)->rprint == NULL)) || ((*afp)->af == 0)) {
+               afp++; continue;
+       }
+       if ((count % 3) == 0) fprintf(stderr,count?"\n    ":"    "); 
+        txt = (*afp)->name; if (!txt) txt = "..";
+       fprintf(stderr,"%s (%s) ",txt,(*afp)->title);
+       count++;
+       afp++;
+    }
+    fprintf(stderr,"\n");
+}
diff --git a/lib/arcnet.c b/lib/arcnet.c
new file mode 100644 (file)
index 0000000..eb0f46e
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * lib/arcnet.c       This file contains an implementation of the "ARCnet"
+ *              support functions for the NET-2 base distribution.
+ *
+ * Version:     $Id: arcnet.c,v 1.6 2000/03/05 11:26:02 philip Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWARC
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/if_ether.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern struct hwtype arcnet_hwtype;
+
+
+/* Display an ARCnet address in readable format. */
+static char *pr_arcnet(unsigned char *ptr)
+{
+    static char buff[64];
+
+    snprintf(buff, sizeof(buff), "%02X", (ptr[0] & 0377));
+    return (buff);
+}
+
+
+/* Input an ARCnet address and convert to binary. */
+static int in_arcnet(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i, val;
+
+    sap->sa_family = arcnet_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < 1)) {
+       val = 0;
+       c = *bufp++;
+       if (isdigit(c))
+           val = c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val = c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val = c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       val <<= 4;
+       c = *bufp++;
+       if (isdigit(c))
+           val |= c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val |= c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val |= c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) (val & 0377);
+       i++;
+
+       /* We might get a semicolon here - not required. */
+       if (*bufp == ':') {
+           if (i == ETH_ALEN) {
+#ifdef DEBUG
+               fprintf(stderr, _("in_arcnet(%s): trailing : ignored!\n"),
+                       orig)
+#endif
+                   ;           /* nothing */
+           }
+           bufp++;
+       }
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == ETH_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+       fprintf(stderr, _("in_arcnet(%s): trailing junk!\n"), orig);
+       errno = EINVAL;
+       return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_arcnet(%s): %s\n", orig, pr_arcnet(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype arcnet_hwtype =
+{
+    "arcnet", NULL, /*"2.5Mbps ARCnet", */ ARPHRD_ARCNET, 1,
+    pr_arcnet, in_arcnet, NULL
+};
+
+
+#endif                         /* HAVE_HWARC */
diff --git a/lib/ash.c b/lib/ash.c
new file mode 100644 (file)
index 0000000..c64667c
--- /dev/null
+++ b/lib/ash.c
@@ -0,0 +1,126 @@
+/*
+ * lib/ash.c  This file contains an implementation of the Ash
+ *              support functions for the NET-2 base distribution.
+ * $Id: ash.c,v 1.11 1999/09/27 11:00:45 philip Exp $
+ */
+
+#include "config.h"
+
+#if HAVE_HWASH || HAVE_AFASH
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+#define ASH_ALEN               64
+
+static unsigned char hamming[16] =
+{
+    0x15, 0x02, 0x49, 0x5e, 0x64, 0x73, 0x38, 0x2f,
+    0xd0, 0xc7, 0x8c, 0x9b, 0xa1, 0xb6, 0xfd, 0xea
+};
+
+/* Display an Ash address in readable format. */
+static char *
+pr_ash(unsigned char *ptr)
+{
+    static char buff[128];
+    char *p = buff;
+    unsigned int i = 0;
+
+    p[0] = '[';
+    p++;
+    while (ptr[i] != 0xc9 && ptr[i] != 0xff && (i < ASH_ALEN))
+       sprintf(p++, "%1x", ptr[i++]);
+    *(p++) = ']';
+    *p = 0;
+
+    return buff;
+}
+
+#if HAVE_HWASH
+
+#ifndef ARPHRD_ASH
+#warning "No definition of ARPHRD_ASH in <net/if_arp.h>, using private value 517"
+#define ARPHRD_ASH 517
+#endif
+
+struct hwtype ash_hwtype;
+
+static int 
+in_ash(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    unsigned int i = 0;
+
+    sap->sa_family = ash_hwtype.type;
+    ptr = sap->sa_data;
+
+    while (bufp && i < ASH_ALEN) {
+       char *next;
+       int hop = strtol(bufp, &next, 16);
+       ptr[i++] = hamming[hop];
+       switch (*next) {
+       case ':':
+           bufp = next + 1;
+           break;
+       case 0:
+           bufp = NULL;
+           break;
+       default:
+           fprintf(stderr, _("Malformed Ash address"));
+           memset(ptr, 0xc9, ASH_ALEN);
+           return -1;
+       }
+    }
+
+    while (i < ASH_ALEN)
+       ptr[i++] = 0xc9;
+
+    return 0;
+}
+
+struct hwtype ash_hwtype =
+{
+    "ash", NULL, ARPHRD_ASH, ASH_ALEN,
+    pr_ash, in_ash, NULL,
+    1
+};
+
+#endif /* HAVE_HWASH */
+
+#if HAVE_AFASH
+
+/* Display an Ash socket address. */
+static char *
+pr_sash(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family != AF_ASH)
+       return safe_strncpy(buf, "[NONE SET]", 64);
+    return pr_ash(sap->sa_data);
+}
+
+struct aftype ash_aftype =
+{
+    "ash", NULL, AF_ASH, 0,
+    pr_ash, pr_sash, NULL, NULL,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/sys/net/ash"
+};
+
+#endif /* HAVE_AFASH */
+
+#endif /* HAVE_AFASH || HAVE_HWASH */
diff --git a/lib/ax25.c b/lib/ax25.c
new file mode 100644 (file)
index 0000000..11521d2
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * lib/ax25.c This file contains an implementation of the "AX.25"
+ *              support functions.
+ *
+ * Version:     $Id: ax25.c,v 1.9 1999/09/27 11:00:45 philip Exp $
+ *
+ * NOTE:        I will redo this module as soon as I got the libax25.a
+ *              library sorted out.  This library contains some useful
+ *              and often used address conversion functions, database
+ *              lookup stuff, and more of the like.
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFAX25 || HAVE_HWAX25
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netax25/ax25.h>
+#else
+#include <linux/ax25.h>
+#endif
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+static char AX25_errmsg[128];
+
+extern struct aftype ax25_aftype;
+
+static char *AX25_print(unsigned char *ptr)
+{
+    static char buff[8];
+    int i;
+
+    for (i = 0; i < 6; i++) {
+       buff[i] = ((ptr[i] & 0377) >> 1);
+       if (buff[i] == ' ')
+           buff[i] = '\0';
+    }
+    buff[6] = '\0';
+    i = ((ptr[6] & 0x1E) >> 1);
+    if (i != 0)
+       sprintf(&buff[strlen(buff)], "-%d", i);
+    return (buff);
+}
+
+
+/* Display an AX.25 socket address. */
+static char *
+ AX25_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (AX25_print(((struct sockaddr_ax25 *) sap)->sax25_call.ax25_call));
+}
+
+
+static int AX25_input(int type, char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char *orig, c;
+    int i;
+
+    sap->sa_family = ax25_aftype.af;
+    ptr = ((struct sockaddr_ax25 *) sap)->sax25_call.ax25_call;
+
+    /* First, scan and convert the basic callsign. */
+    orig = bufp;
+    i = 0;
+    while ((*bufp != '\0') && (*bufp != '-') && (i < 6)) {
+       c = *bufp++;
+       if (islower(c))
+           c = toupper(c);
+       if (!(isupper(c) || isdigit(c))) {
+           safe_strncpy(AX25_errmsg, _("Invalid callsign"), sizeof(AX25_errmsg));
+#ifdef DEBUG
+           fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) ((c << 1) & 0xFE);
+       i++;
+    }
+
+    /* Callsign too long? */
+    if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) {
+       strcpy(AX25_errmsg, _("Callsign too long"));
+#ifdef DEBUG
+       fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig);
+#endif
+       errno = E2BIG;
+       return (-1);
+    }
+    /* Nope, fill out the address bytes with blanks. */
+    while (i++ < sizeof(ax25_address) - 1) {
+       *ptr++ = (unsigned char) ((' ' << 1) & 0xFE);
+    }
+
+    /* See if we need to add an SSID field. */
+    if (*bufp == '-') {
+       i = atoi(++bufp);
+       *ptr = (unsigned char) ((i << 1) & 0xFE);
+    } else {
+       *ptr = (unsigned char) '\0';
+    }
+
+    /* All done. */
+#ifdef DEBUG
+    fprintf(stderr, "ax25_input(%s): ", orig);
+    for (i = 0; i < sizeof(ax25_address); i++)
+       fprintf(stderr, "%02X ", sap->sa_data[i] & 0377);
+    fprintf(stderr, "\n");
+#endif
+
+    return (0);
+}
+
+
+/* Display an error message. */
+static void AX25_herror(char *text)
+{
+    if (text == NULL)
+       fprintf(stderr, "%s\n", AX25_errmsg);
+    else
+       fprintf(stderr, "%s: %s\n", text, AX25_errmsg);
+}
+
+
+static int AX25_hinput(char *bufp, struct sockaddr *sap)
+{
+    if (AX25_input(0, bufp, sap) < 0)
+       return (-1);
+    sap->sa_family = ARPHRD_AX25;
+    return (0);
+}
+
+#if 0
+/* Set the line discipline of a terminal line. */
+static int KISS_set_disc(int fd, int disc)
+{
+    if (ioctl(fd, TIOCSETD, &disc) < 0) {
+       fprintf(stderr, "KISS_set_disc(%d): %s\n", disc, strerror(errno));
+       return (-errno);
+    }
+    return (0);
+}
+
+
+/* Start the KISS encapsulation on the file descriptor. */
+static int KISS_init(int fd)
+{
+    if (KISS_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (ioctl(fd, SIOCSIFENCAP, 4) < 0)
+       return (-1);
+    return (0);
+}
+#endif
+
+struct hwtype ax25_hwtype =
+{
+    "ax25", NULL, /*"AMPR AX.25", */ ARPHRD_AX25, 7,
+    AX25_print, AX25_hinput, NULL
+};
+
+struct aftype ax25_aftype =
+{
+    "ax25", NULL, /*"AMPR AX.25", */ AF_AX25, 7,
+    AX25_print, AX25_sprint, AX25_input, AX25_herror,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/net/ax25"
+};
+
+#endif                         /* HAVE_xxAX25 */
diff --git a/lib/ax25_gr.c b/lib/ax25_gr.c
new file mode 100644 (file)
index 0000000..4dce92d
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * lib/ax25_gr.c      This file contains an implementation of the "AX.25"
+ *                      route print support functions.
+ *
+ * Version:     $Id: ax25_gr.c,v 1.4 1999/01/05 20:53:21 philip Exp $
+ *
+ * Author:      Bernd Eckenfels, <ecki@lina.inka.de>
+ *              Copyright 1999 Bernd Eckenfels, Germany
+ *              base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFAX25
+#if 0
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <linux/ax25.h>
+#include <linux/if_arp.h>      /* ARPHRD_AX25 */
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+int AX25_rprint(int options)
+{
+    FILE *f = fopen(_PATH_PROCNET_AX25_ROUTE, "r");
+    char buffer[256];
+    int use;
+
+    if (f == NULL) {
+        perror(_PATH_PROCNET_AX25_ROUTE);
+       printf(_("AX.25 not configured in this system.\n"));    /* xxx */
+       return 1;
+    }
+    printf(_("Kernel AX.25 routing table\n")); /* xxx */
+    printf(_("Destination  Iface    Use\n"));  /* xxx */
+    fgets(buffer, 256, f);
+    while (fgets(buffer, 256, f)) {
+       buffer[9] = 0;
+       buffer[14] = 0;
+       use = atoi(buffer + 15);
+       printf("%-9s    %-5s  %5d\n",
+              buffer, buffer + 10, use);
+    }
+    fclose(f);
+    return 0;
+}
+
+#endif                         /* HAVE_AFAX25 */
diff --git a/lib/ddp.c b/lib/ddp.c
new file mode 100644 (file)
index 0000000..9b5e829
--- /dev/null
+++ b/lib/ddp.c
@@ -0,0 +1,64 @@
+/*
+ *              DDP protocol output functions.
+ *              [Not yet input]
+ *
+ *                      Alan Cox  <Alan.Cox@linux.org>
+ *
+ *             $Id: ddp.c,v 1.6 1998/11/19 13:01:55 philip Exp $
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFATALK
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <linux/atalk.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+/* Display a ddp domain address. */
+static char *ddp_print(unsigned char *ptr)
+{
+    static char buff[64];
+    struct sockaddr_at *sat = (struct sockaddr_at *) (ptr - 2);
+    sprintf(buff, "%d/%d", (int) ntohs(sat->sat_addr.s_net), (int) sat->sat_addr.s_node);
+    return (buff);
+}
+
+
+/* Display a ddp domain address. */
+static char *ddp_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family != AF_APPLETALK)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (ddp_print(sap->sa_data));
+}
+
+
+struct aftype ddp_aftype =
+{
+    "ddp", NULL, /*"Appletalk DDP", */ AF_APPLETALK, 0,
+    ddp_print, ddp_sprint, NULL, NULL,
+    NULL /*DDP_rprint */ , NULL, NULL,
+    -1,
+    "/proc/net/appletalk"
+};
+
+#endif
diff --git a/lib/ddp_gr.c b/lib/ddp_gr.c
new file mode 100644 (file)
index 0000000..94169f0
--- /dev/null
@@ -0,0 +1,24 @@
+#include "config.h"
+
+#if HAVE_AFATALK
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <linux/atalk.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+int DDP_rprint(int options)
+{
+    fprintf(stderr, _("Routing table for `ddp' not yet supported.\n"));
+    return (1);
+}
+#endif
diff --git a/lib/ec_hw.c b/lib/ec_hw.c
new file mode 100644 (file)
index 0000000..825e501
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * lib/ec_hw.c  This file contains an implementation of the Econet
+ *              hardware support functions.
+ *
+ * Version:     $Id: ec_hw.c,v 1.2 1999/09/27 11:00:46 philip Exp $
+ *
+ * Author:      Philip Blundell <philb@gnu.org>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWEC
+
+#include <net/if_arp.h>
+#include "net-support.h"
+
+struct hwtype ec_hwtype =
+{
+    "ec", NULL /* "Econet" */, ARPHRD_ECONET, 0,
+    NULL, NULL, NULL
+};
+
+#endif
diff --git a/lib/econet.c b/lib/econet.c
new file mode 100644 (file)
index 0000000..1229a28
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * lib/econet.c This file contains an implementation of the Econet
+ *              support functions for the net-tools.
+ *              (NET-3 base distribution).
+ *
+ * Version:     $Id: econet.c,v 1.11 2000/05/27 17:36:16 pb Exp $
+ *
+ * Author:      Philip Blundell <philb@gnu.org>
+ *
+ * Modified:
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+
+#include "config.h"
+
+#if HAVE_AFECONET
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <neteconet/ec.h>
+
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+
+/* Display an Econet address */
+static char *
+ec_print(unsigned char *ptr)
+{
+    static char buff[64];
+    struct ec_addr *ec = (struct ec_addr *) ptr;
+    sprintf(buff, "%d.%d", ec->net, ec->station);
+    return buff;
+}
+
+
+/* Display an Econet socket address */
+static char *
+ec_sprint(struct sockaddr *sap, int numeric)
+{
+    struct sockaddr_ec *sec = (struct sockaddr_ec *) sap;
+
+    if (sap->sa_family != AF_ECONET)
+       return _("[NONE SET]");
+
+    return ec_print((unsigned char *) &sec->addr);
+}
+
+static int 
+ec_input(int type, char *bufp, struct sockaddr *sap)
+{
+    struct sockaddr_ec *sec = (struct sockaddr_ec *) sap;
+    int net, stn;
+    switch (sscanf(bufp, "%d.%d", &net, &stn)) {
+    case 2:
+       sec->addr.station = stn;
+       sec->addr.net = net;
+       return 0;
+    case 1:
+       if (sscanf(bufp, "%d", &stn) == 1) {
+           sec->addr.net = 0;
+           sec->addr.station = stn;
+           return 0;
+       }
+    }
+    return -1;
+}
+
+struct aftype ec_aftype =
+{
+    "ec", NULL, AF_ECONET, 0,
+    ec_print, ec_sprint, ec_input, NULL,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/sys/net/econet"
+};
+
+#endif                         /* HAVE_AFECONET */
diff --git a/lib/ether.c b/lib/ether.c
new file mode 100644 (file)
index 0000000..a71aed7
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * lib/ether.c        This file contains an implementation of the "Ethernet"
+ *              support functions.
+ *
+ * Version:     $Id: ether.c,v 1.7 1999/09/27 11:00:47 philip Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWETHER
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/if_ether.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern struct hwtype ether_hwtype;
+
+
+/* Display an Ethernet address in readable format. */
+static char *pr_ether(unsigned char *ptr)
+{
+    static char buff[64];
+
+    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)
+       );
+    return (buff);
+}
+
+
+/* Input an Ethernet address and convert to binary. */
+static int in_ether(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i;
+    unsigned val;
+
+    sap->sa_family = ether_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < ETH_ALEN)) {
+       val = 0;
+       c = *bufp++;
+       if (isdigit(c))
+           val = c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val = c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val = c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       val <<= 4;
+       c = *bufp;
+       if (isdigit(c))
+           val |= c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val |= c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val |= c - 'A' + 10;
+       else if (c == ':' || c == 0)
+           val >>= 4;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       if (c != 0)
+           bufp++;
+       *ptr++ = (unsigned char) (val & 0377);
+       i++;
+
+       /* We might get a semicolon here - not required. */
+       if (*bufp == ':') {
+           if (i == ETH_ALEN) {
+#ifdef DEBUG
+               fprintf(stderr, _("in_ether(%s): trailing : ignored!\n"),
+                       orig)
+#endif
+                   ;           /* nothing */
+           }
+           bufp++;
+       }
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == ETH_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+       fprintf(stderr, _("in_ether(%s): trailing junk!\n"), orig);
+       errno = EINVAL;
+       return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_ether(%s): %s\n", orig, pr_ether(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype ether_hwtype =
+{
+    "ether", NULL, /*"10Mbps Ethernet", */ ARPHRD_ETHER, ETH_ALEN,
+    pr_ether, in_ether, NULL
+};
+
+
+#endif                         /* HAVE_HWETHER */
diff --git a/lib/fddi.c b/lib/fddi.c
new file mode 100644 (file)
index 0000000..f6bf5ca
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * lib/fddi.c This file contains an implementation of the "FDDI"
+ *              support functions.
+ *
+ * Version:     $Id: fddi.c,v 1.7 2000/03/05 11:26:02 philip Exp $
+ *
+ * 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
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#include <features.h>
+
+#if HAVE_HWFDDI
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#ifndef ARPHRD_FDDI
+#error "No FDDI Support in your current Kernelsource Tree."
+#error "Disable HW Type FDDI"
+#endif
+#if __GLIBC__ >= 2
+#include <netinet/if_fddi.h>
+#else
+#include <linux/if_fddi.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern struct hwtype fddi_hwtype;
+
+
+/* Display an FDDI address in readable format. */
+static char *pr_fddi(unsigned char *ptr)
+{
+    static char buff[64];
+
+    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)
+       );
+    return (buff);
+}
+
+
+/* Input an FDDI address and convert to binary. */
+static int in_fddi(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i, val;
+
+    sap->sa_family = fddi_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < FDDI_K_ALEN)) {
+       val = 0;
+       c = *bufp++;
+       if (isdigit(c))
+           val = c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val = c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val = c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       val <<= 4;
+       c = *bufp++;
+       if (isdigit(c))
+           val |= c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val |= c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val |= c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) (val & 0377);
+       i++;
+
+       /* We might get a semicolon here - not required. */
+       if (*bufp == ':') {
+           if (i == FDDI_K_ALEN) {
+#ifdef DEBUG
+               fprintf(stderr, _("in_fddi(%s): trailing : ignored!\n"),
+                       orig)
+#endif
+                   ;           /* nothing */
+           }
+           bufp++;
+       }
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == FDDI_K_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+       fprintf(stderr, _("in_fddi(%s): trailing junk!\n"), orig);
+       errno = EINVAL;
+       return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_fddi(%s): %s\n", orig, pr_fddi(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype fddi_hwtype =
+{
+    "fddi", NULL, /*"Fiber Distributed Data Interface (FDDI)", */ ARPHRD_FDDI, FDDI_K_ALEN,
+    pr_fddi, in_fddi, NULL
+};
+
+
+#endif                         /* HAVE_HWFDDI */
diff --git a/lib/frame.c b/lib/frame.c
new file mode 100644 (file)
index 0000000..58d1ad4
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * lib/frame.c        This file contains the Frame Relay support.
+ *
+ * Version:     $Id: frame.c,v 1.4 2000/03/05 11:26:02 philip Exp $
+ *
+ * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
+ *
+ * Author:      Mike McLagan <mike.mclagan@linux.org>
+ *
+ * Changes:
+ *
+ *962303 {0.01} Mike McLagan :          creation
+ *960413 {0.02} Bernd Eckenfels :       included in net-lib
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWFR
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+char *pr_dlci(unsigned char *ptr)
+{
+    static char buf[12];
+
+    snprintf(buf, sizeof(buf), "%i", *(short *) ptr);
+    return (buf);
+}
+
+struct hwtype dlci_hwtype =
+{
+    "dlci", NULL, /*"Frame Relay DLCI", */ ARPHRD_DLCI, 3,
+    pr_dlci, NULL, NULL, 0
+};
+
+struct hwtype frad_hwtype =
+{
+    "frad", NULL, /*"Frame Relay Access Device", */ ARPHRD_FRAD, 0,
+    NULL, NULL, NULL, 0
+};
+#endif                         /* HAVE_HWFR */
diff --git a/lib/getargs.c b/lib/getargs.c
new file mode 100644 (file)
index 0000000..4170097
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * lib/getargs.c      General argument parser.
+ *
+ * Version:     $Id: getargs.c,v 1.3 1998/11/15 20:09:43 freitag Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993,1994 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+
+/* Split the input string into multiple fields. */
+int getargs(char *string, char *arguments[])
+{
+    int len = strlen(string); 
+    char temp[len+1];
+    char *sp, *ptr;
+    int i, argc;
+    char want;
+
+    /*
+     * Copy the string into a buffer.  We may have to modify
+     * the original string because of all the quoting...
+     */
+    sp = string;
+    i = 0;
+    strcpy(temp, string);
+    ptr = temp;
+
+    /*
+     * Look for delimiters ("); if present whatever
+     * they enclose will be considered one argument.
+     */
+    while (*ptr != '\0' && i < 31) {
+       /* Ignore leading whitespace on input string. */
+       while (*ptr == ' ' || *ptr == '\t')
+           ptr++;
+
+       /* Set string pointer. */
+       arguments[i++] = sp;
+
+       /* Check for any delimiters. */
+       if (*ptr == '"' || *ptr == '\'') {
+           /*
+            * Copy the string up to any whitespace OR the next
+            * delimiter. If the delimiter was escaped, skip it
+            * as it if was not there.
+            */
+           want = *ptr++;
+           while (*ptr != '\0') {
+               if (*ptr == want && *(ptr - 1) != '\\') {
+                   ptr++;
+                   break;
+               }
+               *sp++ = *ptr++;
+           }
+       } else {
+           /* Just copy the string up to any whitespace. */
+           while (*ptr != '\0' && *ptr != ' ' && *ptr != '\t')
+               *sp++ = *ptr++;
+       }
+       *sp++ = '\0';
+
+       /* Skip trailing whitespace. */
+       if (*ptr != '\0') {
+           while (*ptr == ' ' || *ptr == '\t')
+               ptr++;
+       }
+    }
+    argc = i;
+    while (i < 32)
+       arguments[i++] = (char *) NULL;
+    return (argc);
+}
diff --git a/lib/getroute.c b/lib/getroute.c
new file mode 100644 (file)
index 0000000..f8225ab
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * lib/getroute.c     This file contains a small interface function to
+ *                      use the AF specific print routine for the routing
+ *                      table.
+ *
+ * NET-LIB      A collection of functions used from the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system. (net-tools, net-drivers)
+ *
+ * Version:     $Id: getroute.c,v 1.6 2000/05/20 13:38:10 pb Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
+ *              Copyright 1999 Bernd Eckenfels, Germany
+ *
+ * Modifications:
+ *
+ *951020 {0.10} Bernd Eckenfels:        creation
+ *960202 {0.90} Bernd Eckenfels:        rewrite to use getaftype.
+ *960204 {0.91} Bernd Eckenfels:        takes constant list of AFs
+ *960206 {1.01} Bernd Eckenfels:        route_init will enable routing
+ *                                      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
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <stdio.h>
+#include <string.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+#include "util.h"
+
+extern struct aftype unspec_aftype;
+extern struct aftype unix_aftype;
+extern struct aftype inet_aftype;
+extern struct aftype inet6_aftype;
+extern struct aftype ax25_aftype;
+extern struct aftype netrom_aftype;
+extern struct aftype ipx_aftype;
+extern struct aftype ddp_aftype;
+extern struct aftype x25_aftype;
+
+void getroute_init(void)
+{
+#if HAVE_AFINET
+    inet_aftype.rprint = INET_rprint;
+#endif
+#if HAVE_AFINET6
+    inet6_aftype.rprint = INET6_rprint;
+#endif
+#if HAVE_AFNETROM
+    netrom_aftype.rprint = NETROM_rprint;
+#endif
+#if HAVE_AFAX25
+    ax25_aftype.rprint = AX25_rprint;
+#endif
+#if HAVE_AFIPX
+    ipx_aftype.rprint = IPX_rprint;
+#endif
+#if HAVE_AFATALK
+    ddp_aftype.rprint = DDP_rprint;
+#endif
+#if HAVE_AFX25
+    x25_aftype.rprint = X25_rprint;
+#endif
+}
+
+int route_info(const char *afname, int options)
+{
+    struct aftype *ap;
+    char *tmp1, *tmp2;
+    int found = E_NOTFOUND, rc;
+    char buf[256];
+
+    safe_strncpy(buf, afname, sizeof(buf));
+
+    tmp1 = buf;
+
+    while (tmp1) {
+
+       ap = NULL;
+
+       if ((tmp2 = index(tmp1, ',')))
+           *tmp2++ = '\0';
+
+       if (!tmp1[0]) {
+           tmp1 = tmp2;
+           continue;
+       }
+       ap = get_aftype(tmp1);
+
+       if (!ap) {
+           fprintf(stderr, _("Address family `%s' not supported.\n"), tmp1);
+           return (E_OPTERR);
+       }
+       tmp1 = tmp2;
+
+       if (!ap->rprint) {
+           fprintf(stderr, _("No routing for address family `%s'.\n"), ap->name);
+           return (E_OPTERR);
+       }
+       found = 0;
+
+       if ((rc = ap->rprint(options)))
+           return (rc);
+
+    }
+    return (found);
+}
diff --git a/lib/hdlclapb.c b/lib/hdlclapb.c
new file mode 100644 (file)
index 0000000..c4ed074
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * lib/hdlclapb.c 
+ *              This file contains the HDLC/LAPB support for the NET-2 base
+ *              distribution.
+ *
+ * Version:    $Id: hdlclapb.c,v 1.5 2000/03/05 11:26:02 philip Exp $
+ *
+ * Original Author:     
+ *              Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              Modified by Alan Cox, May 94 to cover NET-3
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWHDLCLAPB
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+#ifndef ARPHRD_HDLC
+#warning "No definition of ARPHRD_HDLC in <net/if_arp.h>, using private value 513"
+#define ARPHRD_HDLC 513
+#endif
+
+#ifndef ARPHRD_LAPB
+#warning "No definition of ARPHRD_HDLC in <net/if_arp.h>, using private value 516"
+#define ARPHRD_LAPB 516
+#endif
+
+struct hwtype hdlc_hwtype =
+{
+    "hdlc", NULL, /*"(Cisco) HDLC", */ ARPHRD_HDLC, 0,
+    NULL, NULL, NULL, 0
+};
+struct hwtype lapb_hwtype =
+{
+    "lapb", NULL, /*"LAPB", */ ARPHRD_LAPB, 0,
+    NULL, NULL, NULL, 0
+};
+
+#endif                         /* HAVE_HWHDLCLAPB */
diff --git a/lib/hippi.c b/lib/hippi.c
new file mode 100644 (file)
index 0000000..308db00
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * lib/hippi.c        This file contains an implementation of the "HIPPI"
+ *              support functions for the NET-2 base distribution.
+ *
+ * Version:     $Id$
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              Modified for HIPPI by Jes Sorensen, <Jes.Sorensen@cern.ch>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWHIPPI
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+/*
+ *    HIPPI magic constants.
+ */
+
+#define HIPPI_ALEN     6       /* Bytes in one HIPPI hw-addr        */
+#ifndef ARPHRD_HIPPI
+#define ARPHRD_HIPPI    780
+#warning "ARPHRD_HIPPI is not defined in <net/if_arp.h>. Using private value 708"
+#endif
+
+extern struct hwtype hippi_hwtype;
+
+
+/* Display an HIPPI address in readable format. */
+static char *pr_hippi(unsigned char *ptr)
+{
+    static char buff[64];
+
+    sprintf(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)
+       );
+    return (buff);
+}
+
+
+/* Input an HIPPI address and convert to binary. */
+static int in_hippi(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i, val;
+
+    sap->sa_family = hippi_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < HIPPI_ALEN)) {
+       val = 0;
+       c = *bufp++;
+       if (isdigit(c))
+           val = c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val = c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val = c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       val <<= 4;
+       c = *bufp++;
+       if (isdigit(c))
+           val |= c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val |= c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val |= c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) (val & 0377);
+       i++;
+
+       /* We might get a semicolon here - not required. */
+       if (*bufp == ':') {
+           if (i == HIPPI_ALEN) {
+#ifdef DEBUG
+               fprintf(stderr, _("in_hippi(%s): trailing : ignored!\n"), orig)
+#endif
+                   ;           /* nothing */
+           }
+           bufp++;
+       }
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == HIPPI_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+       fprintf(stderr, _("in_hippi(%s): trailing junk!\n"), orig);
+       errno = EINVAL;
+       return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_hippi(%s): %s\n", orig, pr_hippi(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype hippi_hwtype =
+{
+    "hippi", NULL, /*"HIPPI", */ ARPHRD_HIPPI, HIPPI_ALEN,
+    pr_hippi, in_hippi, NULL, 0
+};
+
+
+#endif                         /* HAVE_HWHIPPI */
diff --git a/lib/hw.c b/lib/hw.c
new file mode 100644 (file)
index 0000000..4989748
--- /dev/null
+++ b/lib/hw.c
@@ -0,0 +1,290 @@
+/*
+ * lib/hw.c   This file contains the top-level part of the hardware
+ *              support functions module.
+ *
+ * Version:     $Id: hw.c,v 1.17 2000/05/20 13:38:10 pb Exp $
+ *
+ * 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
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "config.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+extern struct hwtype unspec_hwtype;
+extern struct hwtype loop_hwtype;
+
+extern struct hwtype slip_hwtype;
+extern struct hwtype cslip_hwtype;
+extern struct hwtype slip6_hwtype;
+extern struct hwtype cslip6_hwtype;
+extern struct hwtype adaptive_hwtype;
+extern struct hwtype strip_hwtype;
+
+extern struct hwtype ether_hwtype;
+extern struct hwtype fddi_hwtype;
+extern struct hwtype hippi_hwtype;
+extern struct hwtype tr_hwtype;
+#ifdef ARPHRD_IEEE802_TR
+extern struct hwtype tr_hwtype1;
+#endif
+
+extern struct hwtype ax25_hwtype;
+extern struct hwtype rose_hwtype;
+extern struct hwtype netrom_hwtype;
+extern struct hwtype x25_hwtype;
+extern struct hwtype tunnel_hwtype;
+
+extern struct hwtype ash_hwtype;
+
+extern struct hwtype ppp_hwtype;
+
+extern struct hwtype arcnet_hwtype;
+
+extern struct hwtype dlci_hwtype;
+extern struct hwtype frad_hwtype;
+
+extern struct hwtype hdlc_hwtype;
+extern struct hwtype lapb_hwtype;
+
+extern struct hwtype sit_hwtype;
+
+extern struct hwtype irda_hwtype;
+
+extern struct hwtype ec_hwtype;
+
+static struct hwtype *hwtypes[] =
+{
+
+    &loop_hwtype,
+
+#if HAVE_HWSLIP
+    &slip_hwtype,
+    &cslip_hwtype,
+    &slip6_hwtype,
+    &cslip6_hwtype,
+    &adaptive_hwtype,
+#endif
+#if HAVE_HWSTRIP
+    &strip_hwtype,
+#endif
+#if HAVE_HWASH
+    &ash_hwtype,
+#endif
+#if HAVE_HWETHER
+    &ether_hwtype,
+#endif
+#if HAVE_HWTR
+    &tr_hwtype,
+#ifdef ARPHRD_IEEE802_TR
+    &tr_hwtype1, 
+#endif
+#endif
+#if HAVE_HWAX25
+    &ax25_hwtype,
+#endif
+#if HAVE_HWNETROM
+    &netrom_hwtype,
+#endif
+#if HAVE_HWROSE
+    &rose_hwtype,
+#endif
+#if HAVE_HWTUNNEL
+    &tunnel_hwtype,
+#endif
+#if HAVE_HWPPP
+    &ppp_hwtype,
+#endif
+#if HAVE_HWHDLCLAPB
+    &hdlc_hwtype,
+    &lapb_hwtype,
+#endif
+#if HAVE_HWARC
+    &arcnet_hwtype,
+#endif
+#if HAVE_HWFR
+    &dlci_hwtype,
+    &frad_hwtype,
+#endif
+#if HAVE_HWSIT
+    &sit_hwtype,
+#endif
+#if HAVE_HWFDDI
+    &fddi_hwtype,
+#endif
+#if HAVE_HWHIPPI
+    &hippi_hwtype,
+#endif
+#if HAVE_HWIRDA
+    &irda_hwtype,
+#endif
+#if HAVE_HWEC
+    &ec_hwtype,
+#endif
+#if HAVE_HWX25
+    &x25_hwtype,
+#endif
+    &unspec_hwtype,
+    NULL
+};
+
+static short sVhwinit = 0;
+
+void hwinit()
+{
+    loop_hwtype.title = _("Local Loopback");
+    unspec_hwtype.title = _("UNSPEC");
+#if HAVE_HWSLIP
+    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 = _("Ethernet");
+#endif
+#if HAVE_HWASH
+    ash_hwtype.title = _("Ash");
+#endif
+#if HAVE_HWFDDI
+    fddi_hwtype.title = _("Fiber Distributed Data Interface");
+#endif
+#if HAVE_HWHIPPI
+    hippi_hwtype.title = _("HIPPI");
+#endif
+#if HAVE_HWAX25
+    ax25_hwtype.title = _("AMPR AX.25");
+#endif
+#if HAVE_HWROSE
+    rose_hwtype.title = _("AMPR ROSE");
+#endif
+#if HAVE_HWNETROM
+    netrom_hwtype.title = _("AMPR NET/ROM");
+#endif
+#if HAVE_HWX25
+    x25_hwtype.title = _("generic X.25");
+#endif
+#if HAVE_HWTUNNEL
+    tunnel_hwtype.title = _("IPIP Tunnel");
+#endif
+#if HAVE_HWPPP
+    ppp_hwtype.title = _("Point-to-Point Protocol");
+#endif
+#if HAVE_HWHDLCLAPB
+    hdlc_hwtype.title = _("(Cisco)-HDLC");
+    lapb_hwtype.title = _("LAPB");
+#endif
+#if HAVE_HWARC
+    arcnet_hwtype.title = _("ARCnet");
+#endif
+#if HAVE_HWFR
+    dlci_hwtype.title = _("Frame Relay DLCI");
+    frad_hwtype.title = _("Frame Relay Access Device");
+#endif
+#if HAVE_HWSIT
+    sit_hwtype.title = _("IPv6-in-IPv4");
+#endif
+#if HAVE_HWIRDA
+    irda_hwtype.title = _("IrLAP");
+#endif
+#if HAVE_HWTR
+    tr_hwtype.title = _("16/4 Mbps Token Ring");
+#ifdef ARPHRD_IEEE802_TR
+    tr_hwtype1.title = _("16/4 Mbps Token Ring (New)") ; 
+#endif
+#endif
+#if HAVE_HWEC
+    ec_hwtype.title = _("Econet");
+#endif
+    sVhwinit = 1;
+}
+
+/* Check our hardware type table for this type. */
+struct hwtype *get_hwtype(const char *name)
+{
+    struct hwtype **hwp;
+
+    if (!sVhwinit)
+       hwinit();
+
+    hwp = hwtypes;
+    while (*hwp != NULL) {
+       if (!strcmp((*hwp)->name, name))
+           return (*hwp);
+       hwp++;
+    }
+    return (NULL);
+}
+
+
+/* Check our hardware type table for this type. */
+struct hwtype *get_hwntype(int type)
+{
+    struct hwtype **hwp;
+
+    if (!sVhwinit)
+       hwinit();
+
+    hwp = hwtypes;
+    while (*hwp != NULL) {
+       if ((*hwp)->type == type)
+           return (*hwp);
+       hwp++;
+    }
+    return (NULL);
+}
+
+/* type: 0=all, 1=ARPable */
+void print_hwlist(int type) {
+    int count = 0;
+    char * txt;
+    struct hwtype **hwp;
+
+    if (!sVhwinit)
+       hwinit();
+
+    hwp = hwtypes;
+    while (*hwp != NULL) {
+       if (((type == 1) && ((*hwp)->alen == 0)) || ((*hwp)->type == -1)) {
+               hwp++; continue;
+       }
+       if ((count % 3) == 0) fprintf(stderr,count?"\n    ":"    "); 
+        txt = (*hwp)->name; if (!txt) txt = "..";
+       fprintf(stderr,"%s (%s) ",txt,(*hwp)->title);
+       count++;
+       hwp++;
+    }
+    fprintf(stderr,"\n");
+}
+
+/* return 1 if address is all zeros */
+int hw_null_address(struct hwtype *hw, void *ap)
+{
+    unsigned int i;
+    unsigned char *address = (unsigned char *)ap;
+    for (i = 0; i < hw->alen; i++)
+       if (address[i])
+           return 0;
+    return 1;
+}
diff --git a/lib/inet.c b/lib/inet.c
new file mode 100644 (file)
index 0000000..ae90664
--- /dev/null
@@ -0,0 +1,451 @@
+/*
+ * lib/inet.c This file contains an implementation of the "INET"
+ *              support functions for the net-tools.
+ *              (NET-3 base distribution).
+ *
+ * Version:    $Id: inet.c,v 1.13 1999/12/11 13:35:56 freitag Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ * Modified:
+ *960113 {1.21} Bernd Eckenfels :       rresolve cache bug.
+ *960128 {1.22} Bernd Eckenfels :       endian bug in print
+ *960203 {1.23} Bernd Eckenfels :       net-features support
+ *960217 {1.24} Bernd Eckenfels :       get_sname
+ *960219 {1.25} Bernd Eckenfels :       extern int h_errno
+ *960329 {1.26} Bernd Eckenfels :       resolve 255.255.255.255 
+ *980101 {1.27} Bernd Eckenfels :      resolve raw sockets in /etc/protocols
+ *990302 {1.28} Phil Blundell   :       add netmask to INET_rresolve
+ *991007        Kurt Garloff   :       rresolve, resolve: may be hosts
+ *             <garloff@suse.de>       store type (host?) in cache 
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+/* FIXME.  Split this file into inet4.c for the IPv4 specific parts
+   and inet.c for those shared between IPv4 and IPv6.  */
+
+#if HAVE_AFINET || HAVE_AFINET6
+#include <netinet/in.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern int h_errno;            /* some netdb.h versions don't export this */
+
+/* cache */
+struct addr {
+    struct sockaddr_in addr;
+    char *name;
+    int host;
+    struct addr *next;
+};
+
+struct service {
+    int number;
+    char *name;
+    struct service *next;
+};
+
+static struct service *tcp_name = NULL, *udp_name = NULL, *raw_name = NULL;
+
+#if HAVE_AFINET
+
+static struct addr *INET_nn = NULL;    /* addr-to-name cache           */
+
+
+static int INET_resolve(char *name, struct sockaddr_in *sin, int hostfirst)
+{
+    struct hostent *hp;
+    struct netent *np;
+
+    /* Grmpf. -FvK */
+    sin->sin_family = AF_INET;
+    sin->sin_port = 0;
+
+    /* Default is special, meaning 0.0.0.0. */
+    if (!strcmp(name, "default")) {
+       sin->sin_addr.s_addr = INADDR_ANY;
+       return (1);
+    }
+    /* Look to see if it's a dotted quad. */
+    if (inet_aton(name, &sin->sin_addr)) {
+       return 0;
+    }
+    /* If we expect this to be a hostname, try hostname database first */
+#ifdef DEBUG
+    if (hostfirst) fprintf (stderr, "gethostbyname (%s)\n", name);
+#endif
+    if (hostfirst && 
+       (hp = gethostbyname(name)) != (struct hostent *) NULL) {
+       memcpy((char *) &sin->sin_addr, (char *) hp->h_addr_list[0], 
+               sizeof(struct in_addr));
+       return 0;
+    }
+    /* Try the NETWORKS database to see if this is a known network. */
+#ifdef DEBUG
+    fprintf (stderr, "getnetbyname (%s)\n", name);
+#endif
+    if ((np = getnetbyname(name)) != (struct netent *) NULL) {
+       sin->sin_addr.s_addr = htonl(np->n_net);
+       return 1;
+    }
+    if (hostfirst) {
+       /* Don't try again */
+       errno = h_errno;
+       return -1;
+    }
+#ifdef DEBUG
+    res_init();
+    _res.options |= RES_DEBUG;
+#endif
+
+#ifdef DEBUG
+    fprintf (stderr, "gethostbyname (%s)\n", name);
+#endif
+    if ((hp = gethostbyname(name)) == (struct hostent *) NULL) {
+       errno = h_errno;
+       return -1;
+    }
+    memcpy((char *) &sin->sin_addr, (char *) hp->h_addr_list[0], 
+          sizeof(struct in_addr));
+
+    return 0;
+}
+
+
+/* numeric: & 0x8000: default instead of *, 
+ *         & 0x4000: host instead of net, 
+ *         & 0x0fff: don't resolve
+ */
+static int INET_rresolve(char *name, size_t len, struct sockaddr_in *sin, 
+                        int numeric, unsigned int netmask)
+{
+    struct hostent *ent;
+    struct netent *np;
+    struct addr *pn;
+    unsigned long ad, host_ad;
+    int host = 0;
+
+    /* Grmpf. -FvK */
+    if (sin->sin_family != AF_INET) {
+#ifdef DEBUG
+       fprintf(stderr, _("rresolve: unsupport address family %d !\n"), sin->sin_family);
+#endif
+       errno = EAFNOSUPPORT;
+       return (-1);
+    }
+    ad = (unsigned long) sin->sin_addr.s_addr;
+#ifdef DEBUG
+    fprintf (stderr, "rresolve: %08lx, mask %08x, num %08x \n", ad, netmask, numeric);
+#endif
+    if (ad == INADDR_ANY) {
+       if ((numeric & 0x0FFF) == 0) {
+           if (numeric & 0x8000)
+               safe_strncpy(name, "default", len);
+           else
+               safe_strncpy(name, "*", len);
+           return (0);
+       }
+    }
+    if (numeric & 0x0FFF) {
+        safe_strncpy(name, inet_ntoa(sin->sin_addr), len);
+       return (0);
+    }
+
+    if ((ad & (~netmask)) != 0 || (numeric & 0x4000))
+       host = 1;
+#if 0
+    INET_nn = NULL;
+#endif
+    pn = INET_nn;
+    while (pn != NULL) {
+       if (pn->addr.sin_addr.s_addr == ad && pn->host == host) {
+           safe_strncpy(name, pn->name, len);
+#ifdef DEBUG
+           fprintf (stderr, "rresolve: found %s %08lx in cache\n", (host? "host": "net"), ad);
+#endif
+           return (0);
+       }
+       pn = pn->next;
+    }
+
+    host_ad = ntohl(ad);
+    np = NULL;
+    ent = NULL;
+    if (host) {
+#ifdef DEBUG
+       fprintf (stderr, "gethostbyaddr (%08lx)\n", ad);
+#endif
+       ent = gethostbyaddr((char *) &ad, 4, AF_INET);
+       if (ent != NULL)
+           safe_strncpy(name, ent->h_name, len);
+    } else {
+#ifdef DEBUG
+       fprintf (stderr, "getnetbyaddr (%08lx)\n", host_ad);
+#endif
+       np = getnetbyaddr(host_ad, AF_INET);
+       if (np != NULL)
+           safe_strncpy(name, np->n_name, len);
+    }
+    if ((ent == NULL) && (np == NULL))
+       safe_strncpy(name, inet_ntoa(sin->sin_addr), len);
+    pn = (struct addr *) malloc(sizeof(struct addr));
+    pn->addr = *sin;
+    pn->next = INET_nn;
+    pn->host = host;
+    pn->name = (char *) malloc(strlen(name) + 1);
+    strcpy(pn->name, name);
+    INET_nn = pn;
+
+    return (0);
+}
+
+
+static void INET_reserror(char *text)
+{
+    herror(text);
+}
+
+
+/* Display an Internet socket address. */
+static char *INET_print(unsigned char *ptr)
+{
+    return (inet_ntoa((*(struct in_addr *) ptr)));
+}
+
+
+/* Display an Internet socket address. */
+static char *INET_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buff[128];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff));
+
+    if (INET_rresolve(buff, sizeof(buff), (struct sockaddr_in *) sap, 
+                     numeric, 0xffffff00) != 0)
+       return (NULL);
+
+    return (buff);
+}
+
+char *INET_sprintmask(struct sockaddr *sap, int numeric, 
+                     unsigned int netmask)
+{
+    static char buff[128];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff));
+    if (INET_rresolve(buff, sizeof(buff), (struct sockaddr_in *) sap, 
+                     numeric, netmask) != 0)
+       return (NULL);
+    return (buff);
+}
+
+
+static int INET_getsock(char *bufp, struct sockaddr *sap)
+{
+    char *sp = bufp, *bp;
+    unsigned int i;
+    unsigned val;
+    struct sockaddr_in *sin;
+
+    sin = (struct sockaddr_in *) sap;
+    sin->sin_family = AF_INET;
+    sin->sin_port = 0;
+
+    val = 0;
+    bp = (char *) &val;
+    for (i = 0; i < sizeof(sin->sin_addr.s_addr); i++) {
+       *sp = toupper(*sp);
+
+       if ((*sp >= 'A') && (*sp <= 'F'))
+           bp[i] |= (int) (*sp - 'A') + 10;
+       else if ((*sp >= '0') && (*sp <= '9'))
+           bp[i] |= (int) (*sp - '0');
+       else
+           return (-1);
+
+       bp[i] <<= 4;
+       sp++;
+       *sp = toupper(*sp);
+
+       if ((*sp >= 'A') && (*sp <= 'F'))
+           bp[i] |= (int) (*sp - 'A') + 10;
+       else if ((*sp >= '0') && (*sp <= '9'))
+           bp[i] |= (int) (*sp - '0');
+       else
+           return (-1);
+
+       sp++;
+    }
+    sin->sin_addr.s_addr = htonl(val);
+
+    return (sp - bufp);
+}
+
+static int INET_input(int type, char *bufp, struct sockaddr *sap)
+{
+    switch (type) {
+    case 1:
+       return (INET_getsock(bufp, sap));
+    case 256:
+       return (INET_resolve(bufp, (struct sockaddr_in *) sap, 1));
+    default:
+       return (INET_resolve(bufp, (struct sockaddr_in *) sap, 0));
+    }
+}
+
+static int INET_getnetmask(char *adr, struct sockaddr *m, char *name)
+{
+    struct sockaddr_in *mask = (struct sockaddr_in *) m;
+    char *slash, *end;
+    int prefix;
+
+    if ((slash = strchr(adr, '/')) == NULL)
+       return 0;
+
+    *slash++ = '\0';
+    prefix = strtoul(slash, &end, 0);
+    if (*end != '\0')
+       return -1;
+
+    if (name) {
+       sprintf(name, "/%d", prefix);
+    }
+    mask->sin_family = AF_INET;
+    mask->sin_addr.s_addr = htonl(~(0xffffffffU >> prefix));
+    return 1;
+}
+
+
+struct aftype inet_aftype =
+{
+    "inet", NULL, /*"DARPA Internet", */ AF_INET, sizeof(unsigned long),
+    INET_print, INET_sprint, INET_input, INET_reserror,
+    NULL /*INET_rprint */ , NULL /*INET_rinput */ ,
+    INET_getnetmask,
+    -1,
+    NULL
+};
+
+#endif                         /* HAVE_AFINET */
+
+static void add2list(struct service **namebase, struct service *item)
+{
+    if (*namebase == NULL) {
+       *namebase = item;
+       item->next = NULL;
+    } else {
+       item->next = *namebase;
+       *namebase = item;
+    }
+}
+
+
+static struct service *searchlist(struct service *servicebase, int number)
+{
+    struct service *item;
+
+    for (item = servicebase; item != NULL; item = item->next) {
+       if (item->number == number)
+           return (item);
+    }
+    return (NULL);
+}
+
+
+static int read_services(void)
+{
+    struct servent *se;
+    struct protoent *pe;
+    struct service *item;
+
+    setservent(1);
+    while ((se = getservent())) {
+       /* Allocate a service entry. */
+       item = (struct service *) malloc(sizeof(struct service));
+       if (item == NULL)
+           perror("netstat");
+       item->name = strdup(se->s_name);
+       item->number = se->s_port;
+
+       /* Fill it in. */
+       if (!strcmp(se->s_proto, "tcp")) {
+           add2list(&tcp_name, item);
+       } else if (!strcmp(se->s_proto, "udp")) {
+           add2list(&udp_name, item);
+       } else if (!strcmp(se->s_proto, "raw")) {
+           add2list(&raw_name, item);
+       }
+    }
+    endservent();
+    setprotoent(1);
+    while ((pe = getprotoent())) {
+       /* Allocate a service entry. */
+       item = (struct service *) malloc(sizeof(struct service));
+       if (item == NULL)
+           perror("netstat");
+       item->name = strdup(pe->p_name);
+       item->number = htons(pe->p_proto);
+       add2list(&raw_name, item);
+    }
+    endprotoent();
+    return (0);
+}
+
+
+char *get_sname(int socknumber, char *proto, int numeric)
+{
+    static char buffer[64], init = 0;
+    struct service *item;
+
+    if (socknumber == 0)
+       return ("*");
+    if (numeric) {
+       sprintf(buffer, "%d", ntohs(socknumber));
+       return (buffer);
+    }
+    if (!init) {
+       (void) read_services();
+       init = 1;
+    }
+    buffer[0] = '\0';
+    if (!strcmp(proto, "tcp")) {
+       if ((item = searchlist(tcp_name, socknumber)) != NULL)
+           sprintf(buffer, "%s", item->name);
+    } else if (!strcmp(proto, "udp")) {
+       if ((item = searchlist(udp_name, socknumber)) != NULL)
+           sprintf(buffer, "%s", item->name);
+    } else if (!strcmp(proto, "raw")) {
+       if ((item = searchlist(raw_name, socknumber)) != NULL)
+           sprintf(buffer, "%s", item->name);
+
+    }
+    if (!buffer[0])
+       sprintf(buffer, "%d", ntohs(socknumber));
+    return (buffer);
+}
+
+#endif                         /* HAVE_AFINET || HAVE_AFINET6 */
diff --git a/lib/inet6.c b/lib/inet6.c
new file mode 100644 (file)
index 0000000..1f936b3
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * lib/inet6.c        This file contains an implementation of the "INET6"
+ *              support functions for the net-tools.
+ *              (most of it copied from lib/inet.c 1.26).
+ *
+ * Version:     $Id: inet6.c,v 1.10 2000/10/28 11:04:00 pb Exp $
+ *
+ * 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
+ *990824        Bernd Eckenfels:       clear members for selecting v6 address
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFINET6
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+extern int h_errno;            /* some netdb.h versions don't export this */
+
+static int INET6_resolve(char *name, struct sockaddr_in6 *sin6)
+{
+    struct addrinfo req, *ai;
+    int s;
+
+    memset (&req, '\0', sizeof req);
+    req.ai_family = AF_INET6;
+    if ((s = getaddrinfo(name, NULL, &req, &ai))) {
+       fprintf(stderr, "getaddrinfo: %s: %d\n", name, s);
+       return -1;
+    }
+    memcpy(sin6, ai->ai_addr, sizeof(struct sockaddr_in6));
+
+    freeaddrinfo(ai);
+
+    return (0);
+}
+
+#ifndef IN6_IS_ADDR_UNSPECIFIED
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+        (((__u32 *) (a))[0] == 0 && ((__u32 *) (a))[1] == 0 && \
+         ((__u32 *) (a))[2] == 0 && ((__u32 *) (a))[3] == 0)
+#endif
+
+
+static int INET6_rresolve(char *name, struct sockaddr_in6 *sin6, int numeric)
+{
+    int s;
+
+    /* Grmpf. -FvK */
+    if (sin6->sin6_family != AF_INET6) {
+#ifdef DEBUG
+       fprintf(stderr, _("rresolve: unsupport address family %d !\n"),
+               sin6->sin6_family);
+#endif
+       errno = EAFNOSUPPORT;
+       return (-1);
+    }
+    if (numeric & 0x7FFF) {
+       inet_ntop(AF_INET6, &sin6->sin6_addr, name, 80);
+       return (0);
+    }
+    if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
+        if (numeric & 0x8000)
+           strcpy(name, "default");
+       else
+           strcpy(name, "*");
+       return (0);
+    }
+
+    if ((s = getnameinfo((struct sockaddr *) sin6, sizeof(struct sockaddr_in6),
+                        name, 255 /* !! */ , NULL, 0, 0))) {
+       fputs("getnameinfo failed\n", stderr);
+       return -1;
+    }
+    return (0);
+}
+
+
+static void INET6_reserror(char *text)
+{
+    herror(text);
+}
+
+
+/* Display an Internet socket address. */
+static char *INET6_print(unsigned char *ptr)
+{
+    static char name[80];
+
+    inet_ntop(AF_INET6, (struct in6_addr *) ptr, name, 80);
+    return name;
+}
+
+
+/* Display an Internet socket address. */
+/* dirty! struct sockaddr usually doesn't suffer for inet6 addresses, fst. */
+static char *INET6_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buff[128];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff));
+    if (INET6_rresolve(buff, (struct sockaddr_in6 *) sap, numeric) != 0)
+       return safe_strncpy(buff, _("[UNKNOWN]"), sizeof(buff));
+    return (buff);
+}
+
+
+static int INET6_getsock(char *bufp, struct sockaddr *sap)
+{
+    struct sockaddr_in6 *sin6;
+
+    sin6 = (struct sockaddr_in6 *) sap;
+    sin6->sin6_family = AF_INET6;
+    sin6->sin6_port = 0;
+
+    if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0)
+       return (-1);
+
+    return 16;                 /* ?;) */
+}
+
+static int INET6_input(int type, char *bufp, struct sockaddr *sap)
+{
+    switch (type) {
+    case 1:
+       return (INET6_getsock(bufp, sap));
+    default:
+       return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
+    }
+}
+
+
+struct aftype inet6_aftype =
+{
+    "inet6", NULL, /*"IPv6", */ AF_INET6, sizeof(struct in6_addr),
+    INET6_print, INET6_sprint, INET6_input, INET6_reserror,
+    INET6_rprint, INET6_rinput, NULL,
+
+    -1,
+    "/proc/net/if_inet6"
+};
+
+
+#endif                         /* HAVE_AFINET6 */
diff --git a/lib/inet6_gr.c b/lib/inet6_gr.c
new file mode 100644 (file)
index 0000000..14f32eb
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+   Modifications:
+   1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
+   snprintf instead of sprintf
+ */
+
+#include "config.h"
+
+#if HAVE_AFINET6
+#include <asm/types.h>
+#include <asm/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+/* #include <net/route.h> realy broken */
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#ifndef __GLIBC__
+#include <netinet6/ipv6_route.h>       /* glibc doesn't have this */
+#endif
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "net-features.h"
+
+/* neighbour discovery from linux-2.4.0/include/net/neighbour.h */
+
+#define NUD_INCOMPLETE  0x01
+#define NUD_REACHABLE   0x02
+#define NUD_STALE       0x04
+#define NUD_DELAY       0x08
+#define NUD_PROBE       0x10
+#define NUD_FAILED      0x20
+
+#define NUD_NOARP       0x40
+#define NUD_PERMANENT   0x80
+#define NUD_NONE        0x00
+
+#define NTF_PROXY       0x08    /* == ATF_PUBL */
+#define NTF_ROUTER      0x80
+#define NTF_02          0x02  /* waiting for answer of Alexey -eckes */
+#define NTF_04          0x04  /* waiting for answer of Alexey -eckes */
+
+/* */
+
+
+extern struct aftype inet6_aftype;
+
+
+int rprint_fib6(int ext, int numeric)
+{
+    char buff[4096], iface[16], flags[16];
+    char addr6[128], naddr6[128];
+    struct sockaddr_in6 saddr6, snaddr6;
+    int num, iflags, metric, refcnt, use, prefix_len, slen;
+    FILE *fp = fopen(_PATH_PROCNET_ROUTE6, "r");
+    
+    char addr6p[8][5], saddr6p[8][5], naddr6p[8][5];
+
+    if (!fp) {
+       perror(_PATH_PROCNET_ROUTE6);
+        printf(_("INET6 (IPv6) not configured in this system.\n"));
+       return 1;
+    }
+    printf(_("Kernel IPv6 routing table\n"));
+
+    printf(_("Destination                                 "
+            "Next Hop                                "
+            "Flags Metric Ref    Use Iface\n"));
+
+    while (fgets(buff, 1023, fp)) {
+       num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %08x %08x %08x %08x %s\n",
+                    addr6p[0], addr6p[1], addr6p[2], addr6p[3],
+                    addr6p[4], addr6p[5], addr6p[6], addr6p[7],
+                    &prefix_len,
+                    saddr6p[0], saddr6p[1], saddr6p[2], saddr6p[3],
+                    saddr6p[4], saddr6p[5], saddr6p[6], saddr6p[7],
+                    &slen,
+                    naddr6p[0], naddr6p[1], naddr6p[2], naddr6p[3],
+                    naddr6p[4], naddr6p[5], naddr6p[6], naddr6p[7],
+                    &metric, &use, &refcnt, &iflags, iface);
+#if 0
+       if (num < 23)
+           continue;
+#endif
+       if (!(iflags & RTF_UP))
+           continue;
+       /* Fetch and resolve the target address. */
+       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);
+       snprintf(addr6, sizeof(addr6), "%s/%d",
+                inet6_aftype.sprint((struct sockaddr *) &saddr6, 1),
+                prefix_len);
+
+       /* Fetch and resolve the nexthop address. */
+       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);
+       snprintf(naddr6, sizeof(naddr6), "%s",
+                inet6_aftype.sprint((struct sockaddr *) &snaddr6, 1));
+
+       /* Decode the flags. */
+       strcpy(flags, "U");
+       if (iflags & RTF_GATEWAY)
+           strcat(flags, "G");
+       if (iflags & RTF_HOST)
+           strcat(flags, "H");
+       if (iflags & RTF_DEFAULT)
+           strcat(flags, "D");
+       if (iflags & RTF_ADDRCONF)
+           strcat(flags, "A");
+       if (iflags & RTF_CACHE)
+           strcat(flags, "C");
+
+       /* Print the info. */
+       printf("%-43s %-39s %-5s %-6d %-2d %7d %-8s\n",
+              addr6, naddr6, flags, metric, refcnt, use, iface);
+    }
+
+    (void) fclose(fp);
+    return (0);
+}
+
+int rprint_cache6(int ext, int numeric)
+{
+    char buff[4096], iface[16], flags[16];
+    char addr6[128], haddr[20], statestr[20];
+    struct sockaddr_in6 saddr6;
+    int type, num, refcnt, prefix_len, location, state, gc;
+    long tstamp, expire, ndflags, reachable, stale, delete;
+    FILE *fp = fopen(_PATH_PROCNET_NDISC, "r");
+    char addr6p[8][5], haddrp[6][3];
+
+    if (!fp) {
+       ESYSNOT("nd_print", "ND Table");
+       return 1;
+    }
+    printf(_("Kernel IPv6 Neighbour Cache\n"));
+
+    if (ext == 2)
+       printf(_("Neighbour                                   "
+                "HW Address        "
+                "Iface    Flags Ref State\n"));
+    else
+       printf(_("Neighbour                                   "
+                "HW Address        "
+       "Iface    Flags Ref State            Stale(sec) Delete(sec)\n"));
+
+
+    while (fgets(buff, 1023, fp)) {
+       num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %08lx %08lx %08lx %04x %04x %04lx %8s %2s%2s%2s%2s%2s%2s\n",
+                    addr6p[0], addr6p[1], addr6p[2], addr6p[3],
+                    addr6p[4], addr6p[5], addr6p[6], addr6p[7],
+                    &location, &prefix_len, &type, &state, &expire, &tstamp, &reachable, &gc, &refcnt,
+                    &ndflags, iface,
+       haddrp[0], haddrp[1], haddrp[2], haddrp[3], haddrp[4], haddrp[5]);
+
+       /* Fetch and resolve the nexthop address. */
+       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);
+       snprintf(addr6, sizeof(addr6), "%s/%d",
+              inet6_aftype.sprint((struct sockaddr *) &saddr6, numeric),
+                prefix_len);
+
+       /* Fetch the  hardware address. */
+       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';
+       if (ndflags & NTF_ROUTER)
+           strcat(flags, "R");
+       if (ndflags & NTF_04)
+           strcat(flags, "x");
+       if (ndflags & NTF_02)
+           strcat(flags, "h");
+       if (ndflags & NTF_PROXY)
+           strcat(flags, "P");
+
+       /* Decode the state */
+       switch (state) {
+       case NUD_NONE:
+           strcpy(statestr, "NONE");
+           break;
+       case NUD_INCOMPLETE:
+           strcpy(statestr, "INCOMPLETE");
+           break;
+       case NUD_REACHABLE:
+           strcpy(statestr, "REACHABLE");
+           break;
+       case NUD_STALE:
+           strcpy(statestr, "STALE");
+           break;
+       case NUD_DELAY:
+           strcpy(statestr, "DELAY");
+           break;
+       case NUD_PROBE:
+           strcpy(statestr, "PROBE");
+           break;
+       case NUD_FAILED:
+           strcpy(statestr, "FAILED");
+           break;
+       case NUD_NOARP:
+           strcpy(statestr, "NOARP");
+           break;
+       case NUD_PERMANENT:
+           strcpy(statestr, "PERM");
+           break;
+       default:
+           snprintf(statestr, sizeof(statestr), "UNKNOWN(%02x)", state);
+           break;
+       }
+
+       /* Print the info. */
+       printf("%-43s %-17s %-8s %-5s %-3d %-16s",
+              addr6, haddr, iface, flags, refcnt, statestr);
+
+       stale = 0;
+       if (state == NUD_REACHABLE)
+           stale = reachable > tstamp ? reachable - tstamp : 0;
+       delete = gc > tstamp ? gc - tstamp : 0;
+       if (ext != 2) {
+           printf(" %-9ld ", stale / HZ);
+           if (refcnt)
+               printf(" * ");
+           else
+               printf(" %-7ld ", delete / HZ);
+       }
+       printf("\n");
+    }
+
+    (void) fclose(fp);
+    return (0);
+}
+
+int INET6_rprint(int options)
+{
+    int ext = options & FLAG_EXT;
+    int numeric = options & (FLAG_NUM_HOST | FLAG_SYM);
+    int rc = E_INTERN;
+
+    if (options & FLAG_FIB)
+       if ((rc = rprint_fib6(ext, numeric)))
+           return (rc);
+
+    if (options & FLAG_CACHE)
+       if ((rc = rprint_cache6(ext, numeric)))
+           return (rc);
+    return (rc);
+}
+
+#endif                         /* HAVE_AFINET6 */
diff --git a/lib/inet6_sr.c b/lib/inet6_sr.c
new file mode 100644 (file)
index 0000000..fbfe033
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+   Modifications:
+   1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
+ */
+
+#include "config.h"
+
+#if HAVE_AFINET6
+#include <asm/types.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#ifdef __GLIBC__
+#include <net/route.h>
+#else
+#include <netinet6/ipv6_route.h>       /* glibc does not have this */
+#endif
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "net-features.h"
+
+
+
+extern struct aftype inet6_aftype;
+
+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"));
+    return (E_USAGE);
+}
+
+
+static int INET6_setroute(int action, int options, char **args)
+{
+    struct in6_rtmsg rt;
+    struct ifreq ifr;
+    struct sockaddr_in6 sa6;
+    char target[128], gateway[128] = "NONE";
+    int metric, prefix_len;
+    char *devname = NULL;
+    char *cp;
+
+    if (*args == NULL)
+       return (usage());
+
+    strcpy(target, *args++);
+    if (!strcmp(target, "default")) {
+        prefix_len = 0;
+       memset(&sa6, 0, sizeof(sa6));
+    } else {
+        if ((cp = strchr(target, '/'))) {
+           prefix_len = atol(cp + 1);
+           if ((prefix_len < 0) || (prefix_len > 128))
+               usage();
+           *cp = 0;
+       } else {
+           prefix_len = 128;
+       }
+       if (inet6_aftype.input(1, target, (struct sockaddr *) &sa6) < 0
+           && inet6_aftype.input(0, target, (struct sockaddr *) &sa6) < 0) {
+           inet6_aftype.herror(target);
+           return (1);
+       }
+    }
+
+    /* Clean out the RTREQ structure. */
+    memset((char *) &rt, 0, sizeof(struct in6_rtmsg));
+
+    memcpy(&rt.rtmsg_dst, sa6.sin6_addr.s6_addr, sizeof(struct in6_addr));
+
+    /* Fill in the other fields. */
+    rt.rtmsg_flags = RTF_UP;
+    if (prefix_len == 128)
+       rt.rtmsg_flags |= RTF_HOST;
+    rt.rtmsg_metric = 1;
+    rt.rtmsg_dst_len = prefix_len;
+
+    while (*args) {
+       if (!strcmp(*args, "metric")) {
+
+           args++;
+           if (!*args || !isdigit(**args))
+               return (usage());
+           metric = atoi(*args);
+           rt.rtmsg_metric = metric;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "gw") || !strcmp(*args, "gateway")) {
+           args++;
+           if (!*args)
+               return (usage());
+           if (rt.rtmsg_flags & RTF_GATEWAY)
+               return (usage());
+           strcpy(gateway, *args);
+           if (inet6_aftype.input(1, gateway,
+                                  (struct sockaddr *) &sa6) < 0) {
+               inet6_aftype.herror(gateway);
+               return (E_LOOKUP);
+           }
+           memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr,
+                  sizeof(struct in6_addr));
+           rt.rtmsg_flags |= RTF_GATEWAY;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "mod")) {
+           args++;
+           rt.rtmsg_flags |= RTF_MODIFIED;
+           continue;
+       }
+       if (!strcmp(*args, "dyn")) {
+           args++;
+           rt.rtmsg_flags |= RTF_DYNAMIC;
+           continue;
+       }
+       if (!strcmp(*args, "device") || !strcmp(*args, "dev")) {
+           args++;
+           if (!*args)
+               return (usage());
+       } else if (args[1])
+           return (usage());
+
+       devname = *args;
+       args++;
+    }
+
+    /* Create a socket to the INET6 kernel. */
+    if ((skfd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+       perror("socket");
+       return (E_SOCK);
+    }
+    if (devname) {
+       memset(&ifr, 0, sizeof(ifr));
+       strcpy(ifr.ifr_name, devname);
+
+       if (ioctl(skfd, SIOGIFINDEX, &ifr) < 0) {
+           perror("SIOGIFINDEX");
+           return (E_SOCK);
+       }
+       rt.rtmsg_ifindex = ifr.ifr_ifindex;
+    } else
+       rt.rtmsg_ifindex = 0;
+
+    /* Tell the kernel to accept this route. */
+    if (action == RTACTION_DEL) {
+       if (ioctl(skfd, SIOCDELRT, &rt) < 0) {
+           perror("SIOCDELRT");
+           close(skfd);
+           return (E_SOCK);
+       }
+    } else {
+       if (ioctl(skfd, SIOCADDRT, &rt) < 0) {
+           perror("SIOCADDRT");
+           close(skfd);
+           return (E_SOCK);
+       }
+    }
+
+    /* Close the socket. */
+    (void) close(skfd);
+    return (0);
+}
+
+int INET6_rinput(int action, int options, char **args)
+{
+    if (action == RTACTION_FLUSH) {
+       fprintf(stderr, _("Flushing `inet6' routing table not supported\n"));
+       return (usage());
+    }
+    if ((*args == NULL) || (action == RTACTION_HELP))
+       return (usage());
+
+    return (INET6_setroute(action, options, args));
+}
+#endif                         /* HAVE_AFINET6 */
diff --git a/lib/inet_gr.c b/lib/inet_gr.c
new file mode 100644 (file)
index 0000000..d1e5efc
--- /dev/null
@@ -0,0 +1,459 @@
+/*
+   $Id: inet_gr.c,v 1.13 2000/10/08 01:00:44 ecki Exp $
+
+   Modifications:
+   1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
+   1999-01-01 - Bernd Eckenfels          - fixed the routing cache printouts
+   1999-10-07 - Kurt Garloff <garloff@suse.de> - do host (instead of network) name
+                                               lookup for gws and hosts
+ */
+
+#include "config.h"
+
+#if HAVE_AFINET
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+/* #include <net/route.h> realy broken */
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "net-features.h"
+#include "proc.h"
+extern struct aftype inet_aftype;
+
+extern char *INET_sprintmask(struct sockaddr *sap, int numeric, 
+                            unsigned int netmask);
+
+int rprint_fib(int ext, int numeric)
+{
+    char buff[1024], iface[16], flags[64];
+    char gate_addr[128], net_addr[128];
+    char mask_addr[128];
+    int num, iflags, metric, refcnt, use, mss, window, irtt;
+    FILE *fp = fopen(_PATH_PROCNET_ROUTE, "r");
+    char *fmt;
+
+    if (!fp) {
+        perror(_PATH_PROCNET_ROUTE);
+        printf(_("INET (IPv4) not configured in this system.\n"));
+       return 1;
+    }
+    printf(_("Kernel IP routing table\n"));
+
+    if (ext == 1)
+       printf(_("Destination     Gateway         Genmask         "
+                "Flags Metric Ref    Use Iface\n"));
+    if (ext == 2)
+       printf(_("Destination     Gateway         Genmask         "
+                "Flags   MSS Window  irtt Iface\n"));
+    if (ext >= 3)
+       printf(_("Destination     Gateway         Genmask         "
+                "Flags Metric Ref    Use Iface    "
+                "MSS   Window irtt\n"));
+
+    irtt = 0;
+    window = 0;
+    mss = 0;
+
+    fmt = proc_gen_fmt(_PATH_PROCNET_ROUTE, 0, fp,
+                      "Iface", "%16s",
+                      "Destination", "%128s",
+                      "Gateway", "%128s",
+                      "Flags", "%X",
+                      "RefCnt", "%d",
+                      "Use", "%d",
+                      "Metric", "%d",
+                      "Mask", "%128s",
+                      "MTU", "%d",
+                      "Window", "%d",
+                      "IRTT", "%d",
+                      NULL);
+    /* "%16s %128s %128s %X %d %d %d %128s %d %d %d\n" */
+
+    if (!fmt)
+       return 1;
+
+    while (fgets(buff, 1023, fp)) {
+        struct sockaddr snet_target, snet_gateway, snet_mask;
+       struct sockaddr_in *sin_netmask;
+
+       num = sscanf(buff, fmt,
+                    iface, net_addr, gate_addr,
+                    &iflags, &refcnt, &use, &metric, mask_addr,
+                    &mss, &window, &irtt);
+       if (num < 10 || !(iflags & RTF_UP))
+           continue;
+
+       /* Fetch and resolve the target address. */
+       (void) inet_aftype.input(1, net_addr, &snet_target);
+
+       /* Fetch and resolve the gateway address. */
+       (void) inet_aftype.input(1, gate_addr, &snet_gateway);
+
+       /* Fetch and resolve the genmask. */
+       (void) inet_aftype.input(1, mask_addr, &snet_mask);
+       
+       sin_netmask = (struct sockaddr_in *)&snet_mask;
+       strcpy(net_addr, INET_sprintmask(&snet_target, 
+                                        (numeric | 0x8000 | (iflags & RTF_HOST? 0x4000: 0)),
+                                        sin_netmask->sin_addr.s_addr));
+       net_addr[15] = '\0';
+
+       strcpy(gate_addr, inet_aftype.sprint(&snet_gateway, numeric | 0x4000));
+       gate_addr[15] = '\0';
+
+       strcpy(mask_addr, inet_aftype.sprint(&snet_mask, 1));
+       mask_addr[15] = '\0';
+
+       /* Decode the flags. */
+       flags[0] = '\0';
+       if (iflags & RTF_UP)
+           strcat(flags, "U");
+       if (iflags & RTF_GATEWAY)
+           strcat(flags, "G");
+#if HAVE_RTF_REJECT
+       if (iflags & RTF_REJECT)
+           strcpy(flags, "!");
+#endif
+       if (iflags & RTF_HOST)
+           strcat(flags, "H");
+       if (iflags & RTF_REINSTATE)
+           strcat(flags, "R");
+       if (iflags & RTF_DYNAMIC)
+           strcat(flags, "D");
+       if (iflags & RTF_MODIFIED)
+           strcat(flags, "M");
+       if (iflags & RTF_DEFAULT)
+           strcat(flags, "d");
+       if (iflags & RTF_ALLONLINK)
+           strcat(flags, "a");
+       if (iflags & RTF_ADDRCONF)
+           strcat(flags, "c");
+       if (iflags & RTF_NONEXTHOP)
+           strcat(flags, "o");
+       if (iflags & RTF_EXPIRES)
+           strcat(flags, "e");
+       if (iflags & RTF_CACHE)
+           strcat(flags, "c");
+       if (iflags & RTF_FLOW)
+           strcat(flags, "f");
+       if (iflags & RTF_POLICY)
+           strcat(flags, "p");
+       if (iflags & RTF_LOCAL)
+           strcat(flags, "l");
+       if (iflags & RTF_MTU)
+           strcat(flags, "u");
+       if (iflags & RTF_WINDOW)
+           strcat(flags, "w");
+       if (iflags & RTF_IRTT)
+           strcat(flags, "i");
+       if (iflags & RTF_NOTCACHED) /* 2.0.36 */
+           strcat(flags, "n");
+
+       /* Print the info. */
+       if (ext == 1) {
+#if HAVE_RTF_REJECT
+           if (iflags & RTF_REJECT)
+               printf("%-15s -               %-15s %-5s %-6d -  %7d -\n",
+                      net_addr, mask_addr, flags, metric, use);
+           else
+#endif
+               printf("%-15s %-15s %-15s %-5s %-6d %-2d %7d %s\n",
+                      net_addr, gate_addr, mask_addr, flags,
+                      metric, refcnt, use, iface);
+       }
+       if (ext == 2) {
+#if HAVE_RTF_REJECT
+           if (iflags & RTF_REJECT)
+               printf("%-15s -               %-15s %-5s     - -          - -\n",
+                      net_addr, mask_addr, flags);
+           else
+#endif
+               printf("%-15s %-15s %-15s %-5s %5d %-5d %6d %s\n",
+                      net_addr, gate_addr, mask_addr, flags,
+                      mss, window, irtt, iface);
+       }
+       if (ext >= 3) {
+#if HAVE_RTF_REJECT
+           if (iflags & RTF_REJECT)
+               printf("%-15s -               %-15s %-5s %-6d -  %7d -        -     -      -\n",
+                      net_addr, mask_addr, flags, metric, use);
+           else
+#endif
+               printf("%-15s %-15s %-15s %-5s %-6d %-3d %6d %-6.6s   %-5d %-6d %d\n",
+                      net_addr, gate_addr, mask_addr, flags,
+                      metric, refcnt, use, iface, mss, window, irtt);
+       }
+    }
+
+    free(fmt);
+    (void) fclose(fp);
+    return (0);
+}
+
+int rprint_cache(int ext, int numeric)
+{
+    char buff[1024], iface[16], flags[64];
+    char gate_addr[128], dest_addr[128], specdst[128];
+    char src_addr[128];
+    struct sockaddr snet;
+    unsigned int iflags;
+    int num, format, metric, refcnt, use, mss, window, irtt, hh, hhref, hhuptod, arp, tos;
+    char *fmt = NULL;
+
+    FILE *fp = fopen(_PATH_PROCNET_RTCACHE, "r");
+
+    if (!fp) {
+        perror(_PATH_PROCNET_RTCACHE);
+        printf(_("INET (IPv4) not configured in this system.\n"));
+       return 1;
+    }
+
+   /* Okay, first thing we need to know is the format of the rt_cache. 
+    * I am aware of two possible layouts:
+    * 2.2.0
+    * "Iface\tDestination\tGateway \tFlags\t\tRefCnt\tUse\tMetric\tSource\t\tMTU\tWindow\tIRTT\tTOS\tHHRef\tHHUptod\tSpecDst"
+    * "%s\t%08lX\t%08lX\t%8X\t%d\t%u\t%d\t%08lX\t%d\t%u\t%u\t%02X\t%d\t%1d\t%08X" 
+    *
+    * 2.0.36
+    * "Iface\tDestination\tGateway \tFlags\tRefCnt\tUse\tMetric\tSource\t\tMTU\tWindow\tIRTT\tHH\tARP"
+    * "%s\t%08lX\t%08lX\t%02X\t%d\t%u\t%d\t%08lX\t%d\t%lu\t%u\t%d\t%1d"
+    */
+    
+    format = proc_guess_fmt(_PATH_PROCNET_RTCACHE, fp, "IRTT",1,"TOS",2,"HHRef",4,"HHUptod",8,"SpecDst",16,"HH",32,"ARP",64,NULL);
+
+    printf(_("Kernel IP routing cache\n"));
+
+    switch(format) {
+       case -1: /* I/O Error */
+         perror(_PATH_PROCNET_RTCACHE);
+         exit(-1);
+         break;
+       case 63: /* 2.2.0 Format */
+         format = 2;
+         break;
+       case 97: /* 2.0.36 Format */
+         format = 1;
+         break;
+       default:
+         printf("ERROR: proc_guess_fmt(%s,... returned: %d\n",_PATH_PROCNET_RTCACHE, format);
+         break;
+    }
+    
+    rewind(fp);
+
+    if (ext == 1)
+      printf(_("Source          Destination     Gateway         "
+               "Flags Metric Ref    Use Iface\n"));
+    if (ext == 2)
+      printf(_("Source          Destination     Gateway         "
+               "Flags   MSS Window  irtt Iface\n"));
+
+    if (format == 1) {
+      if (ext >= 3)
+       printf(_("Source          Destination     Gateway         "
+                "Flags Metric Ref    Use Iface    "
+                "MSS   Window irtt  HH  Arp\n"));
+
+      fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp,
+                      "Iface", "%16s",
+                      "Destination", "%128s",
+                      "Gateway", "%128s",
+                      "Flags", "%X",
+                      "RefCnt", "%d",
+                      "Use", "%d",
+                      "Metric", "%d",
+                      "Source", "%128s",
+                      "MTU", "%d",
+                      "Window", "%d",
+                      "IRTT", "%d",
+                      "HH", "%d",
+                      "ARP", "%d",
+                      NULL);
+      /* "%16s %128s %128s %X %d %d %d %128s %d %d %d %d %d\n" */
+    }
+
+    if (format == 2) {
+      if (ext >= 3)
+       printf(_("Source          Destination     Gateway         "
+                "Flags Metric Ref    Use Iface    "
+                "MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"));
+        fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp,
+                      "Iface", "%16s",
+                      "Destination", "%128s",
+                      "Gateway", "%128s",
+                      "Flags", "%X",
+                      "RefCnt", "%d",
+                      "Use", "%d",
+                      "Metric", "%d",
+                      "Source", "%128s",
+                      "MTU", "%d",
+                      "Window", "%d",
+                      "IRTT", "%d",
+                      "TOS", "%d",
+                      "HHRef", "%d",
+                      "HHUptod", "%d",
+                      "SpecDst", "%128s",
+                      NULL);
+      /* "%16s %128s %128s %X %d %d %d %128s %d %d %d %d %d %128s\n" */
+    }
+
+
+    irtt = 0;
+    window = 0;
+    mss = 0;
+    hh = 0; hhref = 0; hhuptod = 0;
+    arp = 0; tos = 0;
+    while (fgets(buff, 1023, fp)) {
+        if (format == 1) {
+         num = sscanf(buff, fmt,
+                    iface, dest_addr, gate_addr,
+                    &iflags, &refcnt, &use, &metric, src_addr,
+                    &mss, &window, &irtt, &hh, &arp);
+         if (num < 12)
+           continue;
+       }
+        if (format == 2) {
+         num = sscanf(buff, fmt,
+                    iface, dest_addr, gate_addr,
+                    &iflags, &refcnt, &use, &metric, src_addr,
+                    &mss, &window, &irtt, &tos, &hhref, &hhuptod, &specdst);
+         if (num < 12)
+           continue;
+       }
+       
+
+       /* Fetch and resolve the target address. */
+       (void) inet_aftype.input(1, dest_addr, &snet);
+       strcpy(dest_addr, inet_aftype.sprint(&snet, numeric));
+       dest_addr[15] = '\0';
+
+       /* Fetch and resolve the gateway address. */
+       (void) inet_aftype.input(1, gate_addr, &snet);
+       strcpy(gate_addr, inet_aftype.sprint(&snet, numeric));
+       gate_addr[15] = '\0';
+
+       /* Fetch and resolve the source. */
+       (void) inet_aftype.input(1, src_addr, &snet);
+       strcpy(src_addr, inet_aftype.sprint(&snet, numeric));
+       src_addr[15] = '\0';
+
+       /* Fetch and resolve the SpecDst addrerss. */
+       (void) inet_aftype.input(1, specdst, &snet);
+       strcpy(specdst, inet_aftype.sprint(&snet, numeric));
+       specdst[15] = '\0';
+
+       /* Decode the flags. */
+       flags[0] = '\0';
+if (format == 1) {
+       if (iflags & RTF_UP)
+           strcat(flags, "U");
+       if (iflags & RTF_HOST)
+           strcat(flags, "H");
+}
+       if (iflags & RTF_GATEWAY)
+           strcat(flags, "G");
+#if HAVE_RTF_REJECT
+       if (iflags & RTF_REJECT)
+           strcpy(flags, "!");
+#endif
+       if (iflags & RTF_REINSTATE)
+           strcat(flags, "R");
+       if (iflags & RTF_DYNAMIC)
+           strcat(flags, "D");
+       if (iflags & RTF_MODIFIED)
+           strcat(flags, "M");
+
+/* possible collision with 2.0 flags U and H */
+if (format == 2) {
+       if (iflags & RTCF_DEAD)
+           strcat(flags, "-");
+       if (iflags & RTCF_ONLINK)
+           strcat(flags, "o");
+}
+       if (iflags & RTCF_NOTIFY)
+           strcat(flags, "n");
+       if (iflags & RTCF_DIRECTDST)
+           strcat(flags, "d");
+       if (iflags & RTCF_TPROXY)
+           strcat(flags, "t");
+       if (iflags & RTCF_FAST)
+           strcat(flags, "f");
+       if (iflags & RTCF_MASQ)
+           strcat(flags, "q");
+       if (iflags & RTCF_SNAT)
+           strcat(flags, "Ns");
+       if (iflags & RTCF_DOREDIRECT)
+           strcat(flags, "r");
+       if (iflags & RTCF_DIRECTSRC)
+           strcat(flags, "i");
+       if (iflags & RTCF_DNAT)
+           strcat(flags, "Nd");
+       if (iflags & RTCF_BROADCAST)
+           strcat(flags, "b");
+       if (iflags & RTCF_MULTICAST)
+           strcat(flags, "m");
+       if (iflags & RTCF_REJECT)
+           strcat(flags, "#");
+       if (iflags & RTCF_LOCAL)
+           strcat(flags, "l");
+       /* Print the info. */
+       if (ext == 1) {
+               printf("%-15s %-15s %-15s %-5s %-6d %-2d %7d %s\n",
+                      src_addr, dest_addr, gate_addr, flags,
+                      metric, refcnt, use, iface);
+       }
+       if (ext == 2) {
+               printf("%-15s %-15s %-15s %-5s %5d %-5d %6d %s\n",
+                      src_addr, dest_addr, gate_addr, flags,
+                      mss, window, irtt, iface);
+       }
+       if (format == 1) {
+         if (ext >= 3) {
+               printf("%-15s %-15s %-15s %-5s %-6d %-3d %6d %-6.6s   %-5d %-6d %-5d %-3d %d\n",
+                      src_addr, dest_addr, gate_addr, flags,
+                metric, refcnt, use, iface, mss, window, irtt, hh, arp);
+         }
+       }
+       if (format == 2) {
+         if (ext >= 3) {
+               printf("%-15s %-15s %-15s %-5s %-6d %-3d %6d %-6.6s   %-5d %-6d %-5d %-3d %-3d   %-3d %15s\n",
+                      src_addr, dest_addr, gate_addr, flags,
+                metric, refcnt, use, iface, mss, window, irtt, tos, hhref, hhuptod, specdst);
+         }
+       }
+    }
+
+    free(fmt);
+    (void) fclose(fp);
+    return (0);
+}
+
+int INET_rprint(int options)
+{
+    int ext = options & FLAG_EXT;
+    int numeric = options & (FLAG_NUM_HOST | FLAG_SYM);
+    int rc = E_INTERN;
+
+    if (options & FLAG_FIB)
+       if ((rc = rprint_fib(ext, numeric)))
+           return (rc);
+    if (options & FLAG_CACHE)
+       rc = rprint_cache(ext, numeric);
+
+    return (rc);
+}
+
+#endif                         /* HAVE_AFINET */
diff --git a/lib/inet_sr.c b/lib/inet_sr.c
new file mode 100644 (file)
index 0000000..6d010d5
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+   Modifications:
+   1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets
+   1999-10-07 - Kurt Garloff            - for -host and gws: prefer host names
+                                               over networks (or even reject)
+ */
+
+#include "config.h"
+
+#if HAVE_AFINET
+#include <asm/types.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <net/route.h> /* realy broken */
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "net-features.h"
+#include "util.h"
+
+#if HAVE_NEW_ADDRT
+#define mask_in_addr(x) (((struct sockaddr_in *)&((x).rt_genmask))->sin_addr.s_addr)
+#define full_mask(x) (x)
+#else
+#define mask_in_addr(x) ((x).rt_genmask)
+#define full_mask(x) (((struct sockaddr_in *)&(x))->sin_addr.s_addr)
+#endif
+
+extern struct aftype inet_aftype;
+
+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 supported\n"));
+    return (E_USAGE);
+}
+
+static int INET_setroute(int action, int options, char **args)
+{
+    struct rtentry rt;
+    char target[128], gateway[128] = "NONE", netmask[128] = "default";
+    int xflag, isnet;
+
+    xflag = 0;
+
+    if (!strcmp(*args, "#net")) {
+       xflag = 1;
+       args++;
+    } else if (!strcmp(*args, "#host")) {
+       xflag = 2;
+       args++;
+    }
+    if (*args == NULL)
+       return (usage());
+
+    safe_strncpy(target, *args++, (sizeof target));
+
+    /* Clean out the RTREQ structure. */
+    memset((char *) &rt, 0, sizeof(struct rtentry));
+
+    /* Special hack for /prefix syntax */
+    {
+       union {
+           struct sockaddr_in m;
+           struct sockaddr d;
+       } mask;
+       int n;
+
+       n = inet_aftype.getmask(target, &mask.d, netmask);
+       if (n < 0)
+           return usage();
+       else if (n)
+           rt.rt_genmask = full_mask(mask.d);
+    }
+
+    /* Prefer hostname lookup is -host flag was given */
+    if ((isnet = inet_aftype.input((xflag!=2? 0: 256), target, &rt.rt_dst)) < 0) {
+       inet_aftype.herror(target);
+       return (1);
+    }
+    switch (xflag) {
+    case 1:
+       isnet = 1; break;
+    case 2:
+       isnet = 0; break;
+    default:
+    }
+
+    /* Fill in the other fields. */
+    rt.rt_flags = (RTF_UP | RTF_HOST);
+    if (isnet)
+       rt.rt_flags &= ~RTF_HOST;
+
+    while (*args) {
+       if (!strcmp(*args, "metric")) {
+           int metric;
+
+           args++;
+           if (!*args || !isdigit(**args))
+               return (usage());
+           metric = atoi(*args);
+#if HAVE_NEW_ADDRT
+           rt.rt_metric = metric + 1;
+#else
+           ENOSUPP("inet_setroute", "NEW_ADDRT (metric)");
+#endif
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "netmask")) {
+           struct sockaddr mask;
+
+           args++;
+           if (!*args || mask_in_addr(rt))
+               return (usage());
+           safe_strncpy(netmask, *args, (sizeof netmask));
+           if ((isnet = inet_aftype.input(0, netmask, &mask)) < 0) {
+               inet_aftype.herror(netmask);
+               return (E_LOOKUP);
+           }
+           rt.rt_genmask = full_mask(mask);
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "gw") || !strcmp(*args, "gateway")) {
+           args++;
+           if (!*args)
+               return (usage());
+           if (rt.rt_flags & RTF_GATEWAY)
+               return (usage());
+           safe_strncpy(gateway, *args, (sizeof gateway));
+           if ((isnet = inet_aftype.input(256, gateway, &rt.rt_gateway)) < 0) {
+               inet_aftype.herror(gateway);
+               return (E_LOOKUP);
+           }
+           if (isnet) {
+               fprintf(stderr, _("route: %s: cannot use a NETWORK as gateway!\n"),
+                       gateway);
+               return (E_OPTERR);
+           }
+           rt.rt_flags |= RTF_GATEWAY;
+           args++;
+           continue;
+       }
+       if (!strcmp(*args, "mss") || !strcmp(*args,"mtu")) {
+           args++;
+           rt.rt_flags |= RTF_MSS;
+           if (!*args)
+               return (usage());
+           rt.rt_mss = atoi(*args);
+           args++;
+           if (rt.rt_mss < 64 || rt.rt_mss > 65536) {
+               fprintf(stderr, _("route: Invalid MSS/MTU.\n"));
+               return (E_OPTERR);
+           }
+           continue;
+       }
+       if (!strcmp(*args, "window")) {
+           args++;
+           if (!*args)
+               return (usage());
+           rt.rt_flags |= RTF_WINDOW;
+           rt.rt_window = atoi(*args);
+           args++;
+           if (rt.rt_window < 128) {
+               fprintf(stderr, _("route: Invalid window.\n"));
+               return (E_OPTERR);
+           }
+           continue;
+       }
+       if (!strcmp(*args, "irtt")) {
+           args++;
+           if (!*args)
+               return (usage());
+           args++;
+#if HAVE_RTF_IRTT
+           rt.rt_flags |= RTF_IRTT;
+           rt.rt_irtt = atoi(*(args - 1));
+           rt.rt_irtt *= (HZ / 100);   /* FIXME */
+#if 0                          /* FIXME: do we need to check anything of this? */
+           if (rt.rt_irtt < 1 || rt.rt_irtt > (120 * HZ)) {
+               fprintf(stderr, _("route: Invalid initial rtt.\n"));
+               return (E_OPTERR);
+           }
+#endif
+#else
+           ENOSUPP("inet_setroute", "RTF_IRTT");
+#endif
+           continue;
+       }
+       if (!strcmp(*args, "reject")) {
+           args++;
+#if HAVE_RTF_REJECT
+           rt.rt_flags |= RTF_REJECT;
+#else
+           ENOSUPP("inet_setroute", "RTF_REJECT");
+#endif
+           continue;
+       }
+       if (!strcmp(*args, "mod")) {
+           args++;
+           rt.rt_flags |= RTF_MODIFIED;
+           continue;
+       }
+       if (!strcmp(*args, "dyn")) {
+           args++;
+           rt.rt_flags |= RTF_DYNAMIC;
+           continue;
+       }
+       if (!strcmp(*args, "reinstate")) {
+           args++;
+           rt.rt_flags |= RTF_REINSTATE;
+           continue;
+       }
+       if (!strcmp(*args, "device") || !strcmp(*args, "dev")) {
+           args++;
+           if (rt.rt_dev || *args == NULL)
+               return usage();
+           rt.rt_dev = *args++;
+           continue;
+       }
+       /* nothing matches */
+       if (!rt.rt_dev) {
+           rt.rt_dev = *args++;
+           if (*args)
+               return usage(); /* must be last to catch typos */
+       } else
+           return usage();
+    }
+
+#if HAVE_RTF_REJECT
+    if ((rt.rt_flags & RTF_REJECT) && !rt.rt_dev)
+       rt.rt_dev = "lo";
+#endif
+
+    /* sanity checks.. */
+    if (mask_in_addr(rt)) {
+       __u32 mask = ~ntohl(mask_in_addr(rt));
+       if ((rt.rt_flags & RTF_HOST) && mask != 0xffffffff) {
+           fprintf(stderr, _("route: netmask %.8x doesn't make sense with host route\n"), mask);
+           return (E_OPTERR);
+       }
+       if (mask & (mask + 1)) {
+           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, _("route: netmask doesn't match route address\n"));
+           return (E_OPTERR);
+       }
+    }
+    /* Fill out netmask if still unset */
+    if ((action == RTACTION_ADD) && rt.rt_flags & RTF_HOST)
+       mask_in_addr(rt) = 0xffffffff;
+
+    /* Create a socket to the INET kernel. */
+    if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+       perror("socket");
+       return (E_SOCK);
+    }
+    /* Tell the kernel to accept this route. */
+    if (action == RTACTION_DEL) {
+       if (ioctl(skfd, SIOCDELRT, &rt) < 0) {
+           perror("SIOCDELRT");
+           close(skfd);
+           return (E_SOCK);
+       }
+    } else {
+       if (ioctl(skfd, SIOCADDRT, &rt) < 0) {
+           perror("SIOCADDRT");
+           close(skfd);
+           return (E_SOCK);
+       }
+    }
+
+    /* Close the socket. */
+    (void) close(skfd);
+    return (0);
+}
+
+int INET_rinput(int action, int options, char **args)
+{
+    if (action == RTACTION_FLUSH) {
+       fprintf(stderr, _("Flushing `inet' routing table not supported\n"));
+       return (usage());
+    }
+    if (options & FLAG_CACHE) {
+       fprintf(stderr, _("Modifying `inet' routing cache not supported\n"));
+       return (usage());
+    }
+    if ((*args == NULL) || (action == RTACTION_HELP))
+       return (usage());
+
+    return (INET_setroute(action, options, args));
+}
+#endif                         /* HAVE_AFINET */
diff --git a/lib/interface.c b/lib/interface.c
new file mode 100644 (file)
index 0000000..f4d2a9a
--- /dev/null
@@ -0,0 +1,893 @@
+/* Code to manipulate interface information, shared between ifconfig and
+   netstat. 
+
+   10/1998 partly rewriten by Andi Kleen to support an interface list.   
+   I don't claim that the list operations are efficient @).  
+
+   8/2000  Andi Kleen make the list operations a bit more efficient.
+   People are crazy enough to use thousands of aliases now.
+
+   $Id: interface.c,v 1.14 2001/02/10 19:31:15 pb Exp $
+ */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <net/if.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+
+#if HAVE_AFIPX
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
+#include "ipx.h"
+#endif
+#endif
+
+#if HAVE_AFECONET
+#include <neteconet/ec.h>
+#endif
+
+#ifdef HAVE_HWSLIP
+#include <linux/if_slip.h>
+#include <net/if_arp.h>
+#endif
+
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "proc.h"
+
+#include "interface.h"
+#include "sockets.h"
+#include "util.h"
+#include "intl.h"
+
+#ifdef IFF_PORTSEL
+const char *if_port_text[][4] =
+{
+  /* Keep in step with <linux/netdevice.h> */
+    {"unknown", NULL, NULL, NULL},
+    {"10base2", "bnc", "coax", NULL},
+    {"10baseT", "utp", "tpe", NULL},
+    {"AUI", "thick", "db15", NULL},
+    {"100baseT", NULL, NULL, NULL},
+    {"100baseTX", NULL, NULL, NULL},
+    {"100baseFX", NULL, NULL, NULL},
+    {NULL, NULL, NULL, NULL},
+};
+#endif
+
+#define IPV6_ADDR_ANY          0x0000U
+
+#define IPV6_ADDR_UNICAST              0x0001U
+#define IPV6_ADDR_MULTICAST            0x0002U
+#define IPV6_ADDR_ANYCAST      0x0004U
+
+#define IPV6_ADDR_LOOPBACK     0x0010U
+#define IPV6_ADDR_LINKLOCAL    0x0020U
+#define IPV6_ADDR_SITELOCAL    0x0040U
+
+#define IPV6_ADDR_COMPATv4     0x0080U
+
+#define IPV6_ADDR_SCOPE_MASK   0x00f0U
+
+#define IPV6_ADDR_MAPPED       0x1000U
+#define IPV6_ADDR_RESERVED     0x2000U         /* reserved address space */
+
+int procnetdev_vsn = 1;
+
+int ife_short;
+
+static struct interface *int_list, *int_last;
+
+static int if_readlist_proc(char *);
+
+static struct interface *add_interface(char *name)
+{
+    struct interface *ife, **nextp, *new;
+
+    for (ife = int_last; ife; ife = ife->prev) {
+           int n = nstrcmp(ife->name, name); 
+           if (n == 0) 
+                   return ife; 
+           if (n < 0) 
+                   break; 
+    }
+    new(new); 
+    safe_strncpy(new->name, name, IFNAMSIZ); 
+    nextp = ife ? &ife->next : &int_list;
+    new->prev = ife;
+    new->next = *nextp; 
+    if (new->next) 
+           new->next->prev = new; 
+    else
+           int_last = new; 
+    *nextp = new; 
+    return new; 
+}
+
+struct interface *lookup_interface(char *name)
+{
+    struct interface *ife = NULL;
+
+    if (if_readlist_proc(name) < 0) 
+           return NULL; 
+    ife = add_interface(name); 
+    return ife;
+}
+
+int for_all_interfaces(int (*doit) (struct interface *, void *), void *cookie)
+{
+    struct interface *ife;
+
+    if (!int_list && (if_readlist() < 0))
+       return -1;
+    for (ife = int_list; ife; ife = ife->next) {
+       int err = doit(ife, cookie);
+       if (err)
+           return err;
+    }
+    return 0;
+}
+
+int free_interface_list(void)
+{
+    struct interface *ife;
+    while ((ife = int_list) != NULL) {
+       int_list = ife->next;
+       free(ife);
+    }
+    return 0;
+}
+
+static int if_readconf(void)
+{
+    int numreqs = 30;
+    struct ifconf ifc;
+    struct ifreq *ifr;
+    int n, err = -1;
+    int skfd;
+
+    /* SIOCGIFCONF currently seems to only work properly on AF_INET sockets
+       (as of 2.1.128) */ 
+    skfd = get_socket_for_af(AF_INET);
+    if (skfd < 0) {
+       fprintf(stderr, _("warning: no inet socket available: %s\n"),
+               strerror(errno));
+       /* Try to soldier on with whatever socket we can get hold of.  */
+       skfd = sockets_open(0);
+       if (skfd < 0)
+           return -1;
+    }
+
+    ifc.ifc_buf = NULL;
+    for (;;) {
+       ifc.ifc_len = sizeof(struct ifreq) * numreqs;
+       ifc.ifc_buf = xrealloc(ifc.ifc_buf, ifc.ifc_len);
+
+       if (ioctl(skfd, SIOCGIFCONF, &ifc) < 0) {
+           perror("SIOCGIFCONF");
+           goto out;
+       }
+       if (ifc.ifc_len == sizeof(struct ifreq) * numreqs) {
+           /* assume it overflowed and try again */
+           numreqs += 10;
+           continue;
+       }
+       break;
+    }
+
+    ifr = ifc.ifc_req;
+    for (n = 0; n < ifc.ifc_len; n += sizeof(struct ifreq)) {
+       add_interface(ifr->ifr_name);
+       ifr++;
+    }
+    err = 0;
+
+out:
+    free(ifc.ifc_buf);
+    return err;
+}
+
+static char *get_name(char *name, char *p)
+{
+    while (isspace(*p))
+       p++;
+    while (*p) {
+       if (isspace(*p))
+           break;
+       if (*p == ':') {        /* could be an alias */
+           char *dot = p, *dotname = name;
+           *name++ = *p++;
+           while (isdigit(*p))
+               *name++ = *p++;
+           if (*p != ':') {    /* it wasn't, backup */
+               p = dot;
+               name = dotname;
+           }
+           if (*p == '\0')
+               return NULL;
+           p++;
+           break;
+       }
+       *name++ = *p++;
+    }
+    *name++ = '\0';
+    return p;
+}
+
+static int procnetdev_version(char *buf)
+{
+    if (strstr(buf, "compressed"))
+       return 3;
+    if (strstr(buf, "bytes"))
+       return 2;
+    return 1;
+}
+
+static int get_dev_fields(char *bp, struct interface *ife)
+{
+    switch (procnetdev_vsn) {
+    case 3:
+       sscanf(bp,
+       "%llu %llu %lu %lu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu %lu",
+              &ife->stats.rx_bytes,
+              &ife->stats.rx_packets,
+              &ife->stats.rx_errors,
+              &ife->stats.rx_dropped,
+              &ife->stats.rx_fifo_errors,
+              &ife->stats.rx_frame_errors,
+              &ife->stats.rx_compressed,
+              &ife->stats.rx_multicast,
+
+              &ife->stats.tx_bytes,
+              &ife->stats.tx_packets,
+              &ife->stats.tx_errors,
+              &ife->stats.tx_dropped,
+              &ife->stats.tx_fifo_errors,
+              &ife->stats.collisions,
+              &ife->stats.tx_carrier_errors,
+              &ife->stats.tx_compressed);
+       break;
+    case 2:
+       sscanf(bp, "%llu %llu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu",
+              &ife->stats.rx_bytes,
+              &ife->stats.rx_packets,
+              &ife->stats.rx_errors,
+              &ife->stats.rx_dropped,
+              &ife->stats.rx_fifo_errors,
+              &ife->stats.rx_frame_errors,
+
+              &ife->stats.tx_bytes,
+              &ife->stats.tx_packets,
+              &ife->stats.tx_errors,
+              &ife->stats.tx_dropped,
+              &ife->stats.tx_fifo_errors,
+              &ife->stats.collisions,
+              &ife->stats.tx_carrier_errors);
+       ife->stats.rx_multicast = 0;
+       break;
+    case 1:
+       sscanf(bp, "%llu %lu %lu %lu %lu %llu %lu %lu %lu %lu %lu",
+              &ife->stats.rx_packets,
+              &ife->stats.rx_errors,
+              &ife->stats.rx_dropped,
+              &ife->stats.rx_fifo_errors,
+              &ife->stats.rx_frame_errors,
+
+              &ife->stats.tx_packets,
+              &ife->stats.tx_errors,
+              &ife->stats.tx_dropped,
+              &ife->stats.tx_fifo_errors,
+              &ife->stats.collisions,
+              &ife->stats.tx_carrier_errors);
+       ife->stats.rx_bytes = 0;
+       ife->stats.tx_bytes = 0;
+       ife->stats.rx_multicast = 0;
+       break;
+    }
+    return 0;
+}
+
+static int if_readlist_proc(char *target)
+{
+    static int proc_read; 
+    FILE *fh;
+    char buf[512];
+    struct interface *ife;
+    int err;
+
+    if (proc_read) 
+           return 0; 
+    if (!target) 
+           proc_read = 1;
+
+    fh = fopen(_PATH_PROCNET_DEV, "r");
+    if (!fh) {
+               fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"),
+                       _PATH_PROCNET_DEV, strerror(errno)); 
+               return if_readconf();
+       }       
+    fgets(buf, sizeof buf, fh);        /* eat line */
+    fgets(buf, sizeof buf, fh);
+
+#if 0                          /* pretty, but can't cope with missing fields */
+    fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh,
+                      "face", "",      /* parsed separately */
+                      "bytes", "%lu",
+                      "packets", "%lu",
+                      "errs", "%lu",
+                      "drop", "%lu",
+                      "fifo", "%lu",
+                      "frame", "%lu",
+                      "compressed", "%lu",
+                      "multicast", "%lu",
+                      "bytes", "%lu",
+                      "packets", "%lu",
+                      "errs", "%lu",
+                      "drop", "%lu",
+                      "fifo", "%lu",
+                      "colls", "%lu",
+                      "carrier", "%lu",
+                      "compressed", "%lu",
+                      NULL);
+    if (!fmt)
+       return -1;
+#else
+    procnetdev_vsn = procnetdev_version(buf);
+#endif
+
+    err = 0;
+    while (fgets(buf, sizeof buf, fh)) {
+       char *s, name[IFNAMSIZ];
+       s = get_name(name, buf);    
+       ife = add_interface(name);
+       get_dev_fields(s, ife);
+       ife->statistics_valid = 1;
+       if (target && !strcmp(target,name))
+               break;
+    }
+    if (ferror(fh)) {
+       perror(_PATH_PROCNET_DEV);
+       err = -1;
+       proc_read = 0; 
+    }
+
+#if 0
+    free(fmt);
+#endif
+    fclose(fh);
+    return err;
+}
+
+int if_readlist(void) 
+{ 
+    int err = if_readlist_proc(NULL); 
+    if (!err)
+           err = if_readconf();
+    return err;
+} 
+
+/* Support for fetching an IPX address */
+
+#if HAVE_AFIPX
+static int ipx_getaddr(int sock, int ft, struct ifreq *ifr)
+{
+    ((struct sockaddr_ipx *) &ifr->ifr_addr)->sipx_type = ft;
+    return ioctl(sock, SIOCGIFADDR, ifr);
+}
+#endif
+
+/* Fetch the interface configuration from the kernel. */
+int if_fetch(struct interface *ife)
+{
+    struct ifreq ifr;
+    int fd;
+    char *ifname = ife->name; 
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0)
+       return (-1);
+    ife->flags = ifr.ifr_flags;
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
+       memset(ife->hwaddr, 0, 32);
+    else
+       memcpy(ife->hwaddr, ifr.ifr_hwaddr.sa_data, 8);
+
+    ife->type = ifr.ifr_hwaddr.sa_family;
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFMETRIC, &ifr) < 0)
+       ife->metric = 0;
+    else
+       ife->metric = ifr.ifr_metric;
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0)
+       ife->mtu = 0;
+    else
+       ife->mtu = ifr.ifr_mtu;
+
+#ifdef HAVE_HWSLIP
+    if (ife->type == ARPHRD_SLIP || ife->type == ARPHRD_CSLIP ||
+       ife->type == ARPHRD_SLIP6 || ife->type == ARPHRD_CSLIP6 ||
+       ife->type == ARPHRD_ADAPT) {
+#ifdef SIOCGOUTFILL
+       strcpy(ifr.ifr_name, ifname);
+       if (ioctl(skfd, SIOCGOUTFILL, &ifr) < 0)
+           ife->outfill = 0;
+       else
+           ife->outfill = (unsigned int) ifr.ifr_data;
+#endif
+#ifdef SIOCGKEEPALIVE
+       strcpy(ifr.ifr_name, ifname);
+       if (ioctl(skfd, SIOCGKEEPALIVE, &ifr) < 0)
+           ife->keepalive = 0;
+       else
+           ife->keepalive = (unsigned int) ifr.ifr_data;
+#endif
+    }
+#endif
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0)
+       memset(&ife->map, 0, sizeof(struct ifmap));
+    else
+       memcpy(&ife->map, &ifr.ifr_map, sizeof(struct ifmap));
+
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0)
+       memset(&ife->map, 0, sizeof(struct ifmap));
+    else
+       ife->map = ifr.ifr_map;
+
+#ifdef HAVE_TXQUEUELEN
+    strcpy(ifr.ifr_name, ifname);
+    if (ioctl(skfd, SIOCGIFTXQLEN, &ifr) < 0)
+       ife->tx_queue_len = -1; /* unknown value */
+    else
+       ife->tx_queue_len = ifr.ifr_qlen;
+#else
+    ife->tx_queue_len = -1;    /* unknown value */
+#endif
+
+#if HAVE_AFINET
+    /* IPv4 address? */
+    fd = get_socket_for_af(AF_INET);
+    if (fd >= 0) {
+       strcpy(ifr.ifr_name, ifname);
+       ifr.ifr_addr.sa_family = AF_INET;
+       if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
+           ife->has_ip = 1;
+           ife->addr = ifr.ifr_addr;
+           strcpy(ifr.ifr_name, ifname);
+           if (ioctl(fd, SIOCGIFDSTADDR, &ifr) < 0)
+               memset(&ife->dstaddr, 0, sizeof(struct sockaddr));
+           else
+               ife->dstaddr = ifr.ifr_dstaddr;
+
+           strcpy(ifr.ifr_name, ifname);
+           if (ioctl(fd, SIOCGIFBRDADDR, &ifr) < 0)
+               memset(&ife->broadaddr, 0, sizeof(struct sockaddr));
+           else
+               ife->broadaddr = ifr.ifr_broadaddr;
+
+           strcpy(ifr.ifr_name, ifname);
+           if (ioctl(fd, SIOCGIFNETMASK, &ifr) < 0)
+               memset(&ife->netmask, 0, sizeof(struct sockaddr));
+           else
+               ife->netmask = ifr.ifr_netmask;
+       } else
+           memset(&ife->addr, 0, sizeof(struct sockaddr));
+    }
+#endif
+
+#if HAVE_AFATALK
+    /* DDP address maybe ? */
+    fd = get_socket_for_af(AF_APPLETALK);
+    if (fd >= 0) {
+       strcpy(ifr.ifr_name, ifname);
+       if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
+           ife->ddpaddr = ifr.ifr_addr;
+           ife->has_ddp = 1;
+       }
+    }
+#endif
+
+#if HAVE_AFIPX
+    /* Look for IPX addresses with all framing types */
+    fd = get_socket_for_af(AF_IPX);
+    if (fd >= 0) {
+       strcpy(ifr.ifr_name, ifname);
+       if (!ipx_getaddr(fd, IPX_FRAME_ETHERII, &ifr)) {
+           ife->has_ipx_bb = 1;
+           ife->ipxaddr_bb = ifr.ifr_addr;
+       }
+       strcpy(ifr.ifr_name, ifname);
+       if (!ipx_getaddr(fd, IPX_FRAME_SNAP, &ifr)) {
+           ife->has_ipx_sn = 1;
+           ife->ipxaddr_sn = ifr.ifr_addr;
+       }
+       strcpy(ifr.ifr_name, ifname);
+       if (!ipx_getaddr(fd, IPX_FRAME_8023, &ifr)) {
+           ife->has_ipx_e3 = 1;
+           ife->ipxaddr_e3 = ifr.ifr_addr;
+       }
+       strcpy(ifr.ifr_name, ifname);
+       if (!ipx_getaddr(fd, IPX_FRAME_8022, &ifr)) {
+           ife->has_ipx_e2 = 1;
+           ife->ipxaddr_e2 = ifr.ifr_addr;
+       }
+    }
+#endif
+
+#if HAVE_AFECONET
+    /* Econet address maybe? */
+    fd = get_socket_for_af(AF_ECONET);
+    if (fd >= 0) {
+       strcpy(ifr.ifr_name, ifname);
+       if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
+           ife->ecaddr = ifr.ifr_addr;
+           ife->has_econet = 1;
+       }
+    }
+#endif
+
+    return 0;
+}
+
+int do_if_fetch(struct interface *ife)
+{ 
+    if (if_fetch(ife) < 0) {
+       char *errmsg; 
+       if (errno == ENODEV) { 
+           /* Give better error message for this case. */ 
+           errmsg = _("Device not found"); 
+       } else { 
+           errmsg = strerror(errno); 
+       }
+       fprintf(stderr, _("%s: error fetching interface information: %s\n"),
+               ife->name, errmsg);
+       return -1;
+    }
+    return 0; 
+}
+
+int do_if_print(struct interface *ife, void *cookie)
+{
+    int *opt_a = (int *) cookie;
+    int res; 
+
+    res = do_if_fetch(ife); 
+    if (res >= 0) {   
+       if ((ife->flags & IFF_UP) || *opt_a)
+           ife_print(ife);
+    }
+    return res;
+}
+
+void ife_print_short(struct interface *ptr)
+{
+    printf("%-5.5s ", ptr->name);
+    printf("%5d %3d", ptr->mtu, ptr->metric);
+    /* If needed, display the interface statistics. */
+    if (ptr->statistics_valid) {
+       printf("%8llu %6lu %6lu %6lu",
+              ptr->stats.rx_packets, ptr->stats.rx_errors,
+              ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors);
+       printf("%8llu %6lu %6lu %6lu ",
+              ptr->stats.tx_packets, ptr->stats.tx_errors,
+              ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors);
+    } else {
+       printf("%-56s", _("     - no statistics available -"));
+    }
+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_long, too */
+    if (ptr->flags == 0)
+       printf(_("[NO FLAGS]"));
+    if (ptr->flags & IFF_ALLMULTI)
+       printf("A");
+    if (ptr->flags & IFF_BROADCAST)
+       printf("B");
+    if (ptr->flags & IFF_DEBUG)
+       printf("D");
+    if (ptr->flags & IFF_LOOPBACK)
+       printf("L");
+    if (ptr->flags & IFF_MULTICAST)
+       printf("M");
+#ifdef HAVE_DYNAMIC
+    if (ptr->flags & IFF_DYNAMIC)
+       printf("d");
+#endif
+    if (ptr->flags & IFF_PROMISC)
+       printf("P");
+    if (ptr->flags & IFF_NOTRAILERS)
+       printf("N");
+    if (ptr->flags & IFF_NOARP)
+       printf("O");
+    if (ptr->flags & IFF_POINTOPOINT)
+       printf("P");
+    if (ptr->flags & IFF_SLAVE)
+       printf("s");
+    if (ptr->flags & IFF_MASTER)
+       printf("m");
+    if (ptr->flags & IFF_RUNNING)
+       printf("R");
+    if (ptr->flags & IFF_UP)
+       printf("U");
+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_long, too */
+    printf("\n");
+}
+
+void ife_print_long(struct interface *ptr)
+{
+    struct aftype *ap;
+    struct hwtype *hw;
+    int hf;
+    int can_compress = 0;
+    unsigned long long rx, tx, short_rx, short_tx;
+    char Rext[5]="b";
+    char Text[5]="b";
+
+#if HAVE_AFIPX
+    static struct aftype *ipxtype = NULL;
+#endif
+#if HAVE_AFECONET
+    static struct aftype *ectype = NULL;
+#endif
+#if HAVE_AFATALK
+    static struct aftype *ddptype = NULL;
+#endif
+#if HAVE_AFINET6
+    FILE *f;
+    char addr6[40], devname[20];
+    struct sockaddr_in6 sap;
+    int plen, scope, dad_status, if_idx;
+    extern struct aftype inet6_aftype;
+    char addr6p[8][5];
+#endif
+
+    ap = get_afntype(ptr->addr.sa_family);
+    if (ap == NULL)
+       ap = get_afntype(0);
+
+    hf = ptr->type;
+
+    if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6)
+       can_compress = 1;
+
+    hw = get_hwntype(hf);
+    if (hw == NULL)
+       hw = get_hwntype(-1);
+
+    printf(_("%-9.9s Link encap:%s  "), ptr->name, hw->title);
+    /* For some hardware types (eg Ash, ATM) we don't print the 
+       hardware address if it's null.  */
+    if (hw->print != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
+                                 hw->suppress_null_addr)))
+       printf(_("HWaddr %s  "), hw->print(ptr->hwaddr));
+#ifdef IFF_PORTSEL
+    if (ptr->flags & IFF_PORTSEL) {
+       printf(_("Media:%s"), if_port_text[ptr->map.port][0]);
+       if (ptr->flags & IFF_AUTOMEDIA)
+           printf(_("(auto)"));
+    }
+#endif
+    printf("\n");
+
+#if HAVE_AFINET
+    if (ptr->has_ip) {
+       printf(_("          %s addr:%s "), ap->name,
+              ap->sprint(&ptr->addr, 1));
+       if (ptr->flags & IFF_POINTOPOINT) {
+           printf(_(" P-t-P:%s "), ap->sprint(&ptr->dstaddr, 1));
+       }
+       if (ptr->flags & IFF_BROADCAST) {
+           printf(_(" Bcast:%s "), ap->sprint(&ptr->broadaddr, 1));
+       }
+       printf(_(" Mask:%s\n"), ap->sprint(&ptr->netmask, 1));
+    }
+#endif
+
+#if HAVE_AFINET6
+    /* FIXME: should be integrated into interface.c.   */
+
+    if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
+       while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
+                     addr6p[0], addr6p[1], addr6p[2], addr6p[3],
+                     addr6p[4], addr6p[5], addr6p[6], addr6p[7],
+                 &if_idx, &plen, &scope, &dad_status, devname) != EOF) {
+           if (!strcmp(devname, ptr->name)) {
+               sprintf(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 *) &sap);
+               printf(_("          inet6 addr: %s/%d"),
+                inet6_aftype.sprint((struct sockaddr *) &sap, 1), plen);
+               printf(_(" Scope:"));
+               switch (scope) {
+               case 0:
+                   printf(_("Global"));
+                   break;
+               case IPV6_ADDR_LINKLOCAL:
+                   printf(_("Link"));
+                   break;
+               case IPV6_ADDR_SITELOCAL:
+                   printf(_("Site"));
+                   break;
+               case IPV6_ADDR_COMPATv4:
+                   printf(_("Compat"));
+                   break;
+               case IPV6_ADDR_LOOPBACK:
+                   printf(_("Host"));
+                   break;
+               default:
+                   printf(_("Unknown"));
+               }
+               printf("\n");
+           }
+       }
+       fclose(f);
+    }
+#endif
+
+#if HAVE_AFIPX
+    if (ipxtype == NULL)
+       ipxtype = get_afntype(AF_IPX);
+
+    if (ipxtype != NULL) {
+       if (ptr->has_ipx_bb)
+           printf(_("          IPX/Ethernet II addr:%s\n"),
+                  ipxtype->sprint(&ptr->ipxaddr_bb, 1));
+       if (ptr->has_ipx_sn)
+           printf(_("          IPX/Ethernet SNAP addr:%s\n"),
+                  ipxtype->sprint(&ptr->ipxaddr_sn, 1));
+       if (ptr->has_ipx_e2)
+           printf(_("          IPX/Ethernet 802.2 addr:%s\n"),
+                  ipxtype->sprint(&ptr->ipxaddr_e2, 1));
+       if (ptr->has_ipx_e3)
+           printf(_("          IPX/Ethernet 802.3 addr:%s\n"),
+                  ipxtype->sprint(&ptr->ipxaddr_e3, 1));
+    }
+#endif
+
+#if HAVE_AFATALK
+    if (ddptype == NULL)
+       ddptype = get_afntype(AF_APPLETALK);
+    if (ddptype != NULL) {
+       if (ptr->has_ddp)
+           printf(_("          EtherTalk Phase 2 addr:%s\n"), ddptype->sprint(&ptr->ddpaddr, 1));
+    }
+#endif
+
+#if HAVE_AFECONET
+    if (ectype == NULL)
+       ectype = get_afntype(AF_ECONET);
+    if (ectype != NULL) {
+       if (ptr->has_econet)
+           printf(_("          econet addr:%s\n"), ectype->sprint(&ptr->ecaddr, 1));
+    }
+#endif
+
+    printf("          ");
+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short, too */
+    if (ptr->flags == 0)
+       printf(_("[NO FLAGS] "));
+    if (ptr->flags & IFF_UP)
+       printf(_("UP "));
+    if (ptr->flags & IFF_BROADCAST)
+       printf(_("BROADCAST "));
+    if (ptr->flags & IFF_DEBUG)
+       printf(_("DEBUG "));
+    if (ptr->flags & IFF_LOOPBACK)
+       printf(_("LOOPBACK "));
+    if (ptr->flags & IFF_POINTOPOINT)
+       printf(_("POINTOPOINT "));
+    if (ptr->flags & IFF_NOTRAILERS)
+       printf(_("NOTRAILERS "));
+    if (ptr->flags & IFF_RUNNING)
+       printf(_("RUNNING "));
+    if (ptr->flags & IFF_NOARP)
+       printf(_("NOARP "));
+    if (ptr->flags & IFF_PROMISC)
+       printf(_("PROMISC "));
+    if (ptr->flags & IFF_ALLMULTI)
+       printf(_("ALLMULTI "));
+    if (ptr->flags & IFF_SLAVE)
+       printf(_("SLAVE "));
+    if (ptr->flags & IFF_MASTER)
+       printf(_("MASTER "));
+    if (ptr->flags & IFF_MULTICAST)
+       printf(_("MULTICAST "));
+#ifdef HAVE_DYNAMIC
+    if (ptr->flags & IFF_DYNAMIC)
+       printf(_("DYNAMIC "));
+#endif
+    /* DONT FORGET TO ADD THE FLAGS IN ife_print_short */
+    printf(_(" MTU:%d  Metric:%d"),
+          ptr->mtu, ptr->metric ? ptr->metric : 1);
+#ifdef SIOCSKEEPALIVE
+    if (ptr->outfill || ptr->keepalive)
+       printf(_("  Outfill:%d  Keepalive:%d"),
+              ptr->outfill, ptr->keepalive);
+#endif
+    printf("\n");
+
+    /* If needed, display the interface statistics. */
+
+    if (ptr->statistics_valid) {
+       /* XXX: statistics are currently only printed for the primary address,
+        *      not for the aliases, although strictly speaking they're shared
+        *      by all addresses.
+        */
+       printf("          ");
+
+       printf(_("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"),
+              ptr->stats.rx_packets, ptr->stats.rx_errors,
+              ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
+              ptr->stats.rx_frame_errors);
+       if (can_compress)
+           printf(_("             compressed:%lu\n"), ptr->stats.rx_compressed);
+
+       rx = ptr->stats.rx_bytes;  
+       tx = ptr->stats.tx_bytes;
+       short_rx = rx * 10;  
+       short_tx = tx * 10;
+       if (rx > 1048576) { short_rx /= 1048576;  strcpy(Rext, "Mb"); }
+       else if (rx > 1024) { short_rx /= 1024;  strcpy(Rext, "Kb"); }
+       if (tx > 1048576) { short_tx /= 1048576;  strcpy(Text, "Mb"); }
+       else if (tx > 1024) { short_tx /= 1024;  strcpy(Text, "Kb"); }
+
+       printf("          ");
+       printf(_("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"),
+              ptr->stats.tx_packets, ptr->stats.tx_errors,
+              ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
+              ptr->stats.tx_carrier_errors);
+       printf(_("          collisions:%lu "), ptr->stats.collisions);
+       if (can_compress)
+           printf(_("compressed:%lu "), ptr->stats.tx_compressed);
+       if (ptr->tx_queue_len != -1)
+           printf(_("txqueuelen:%d "), ptr->tx_queue_len);
+       printf("\n          ");
+       printf(_("RX bytes:%llu (%lu.%lu %s)  TX bytes:%llu (%lu.%lu %s)\n"),
+              rx, (unsigned long)(short_rx / 10), 
+              (unsigned long)(short_rx % 10), Rext, 
+              tx, (unsigned long)(short_tx / 10), 
+              (unsigned long)(short_tx % 10), Text);
+    }
+
+    if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma ||
+        ptr->map.base_addr)) {
+       printf("          ");
+       if (ptr->map.irq)
+           printf(_("Interrupt:%d "), ptr->map.irq);
+       if (ptr->map.base_addr >= 0x100)        /* Only print devices using it for 
+                                                  I/O maps */
+           printf(_("Base address:0x%x "), ptr->map.base_addr);
+       if (ptr->map.mem_start) {
+           printf(_("Memory:%lx-%lx "), ptr->map.mem_start, ptr->map.mem_end);
+       }
+       if (ptr->map.dma)
+           printf(_("DMA chan:%x "), ptr->map.dma);
+       printf("\n");
+    }
+    printf("\n");
+}
+
+void ife_print(struct interface *i)
+{
+    if (ife_short)
+       ife_print_short(i);
+    else
+       ife_print_long(i);
+}
diff --git a/lib/ipx.c b/lib/ipx.c
new file mode 100644 (file)
index 0000000..0e760a3
--- /dev/null
+++ b/lib/ipx.c
@@ -0,0 +1,180 @@
+/*
+ *            IPX protocol output functions.
+ *              [Not yet input]
+ *
+ *                      Alan Cox  <Alan.Cox@linux.org>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ * Modifications:
+ * 1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets,
+ *                                         snprintf instead of sprintf
+ */
+#include "config.h"
+
+#if HAVE_AFIPX
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
+#include "ipx.h"
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+#if (IPX_NODE_LEN != 6)
+#error "IPX_NODE_LEN != 6"
+#endif
+
+/* Display a ipx domain address. */
+static char *IPX_print(unsigned char *ptr)
+{
+    static char buff[64];
+    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) (ptr - 2);
+    int t;
+
+
+    for (t = IPX_NODE_LEN; t; t--)
+       if (sipx->sipx_node[t - 1])
+           break;
+
+    if (t && ntohl(sipx->sipx_network))
+       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))
+       snprintf(buff, sizeof(buff), "%08lX", (long int) ntohl(sipx->sipx_network));
+    else if (t && !ntohl(sipx->sipx_network))
+       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]);
+    else
+       buff[0] = '\0';
+    return (buff);
+}
+
+
+/* Display a ipx domain address. */
+static char *IPX_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family != AF_IPX)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (IPX_print(sap->sa_data));
+}
+
+
+static int IPX_getsock(char *bufp, struct sockaddr *sap)
+{
+    char *sp = bufp, *bp;
+    unsigned int i;
+    unsigned char val;
+    struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) sap;
+
+    sipx->sipx_port = 0;
+
+    val = 0;
+    bp = (char *) sipx->sipx_node;
+    for (i = 0; i < sizeof(sipx->sipx_node); i++) {
+       *sp = toupper(*sp);
+
+       if ((*sp >= 'A') && (*sp <= 'F'))
+           bp[i] |= (int) (*sp - 'A') + 10;
+       else if ((*sp >= '0') && (*sp <= '9'))
+           bp[i] |= (int) (*sp - '0');
+       else
+           return (-1);
+
+       bp[i] <<= 4;
+       sp++;
+       *sp = toupper(*sp);
+
+       if ((*sp >= 'A') && (*sp <= 'F'))
+           bp[i] |= (int) (*sp - 'A') + 10;
+       else if ((*sp >= '0') && (*sp <= '9'))
+           bp[i] |= (int) (*sp - '0');
+       else
+           return (-1);
+
+       sp++;
+    }
+    if ((memcmp(sipx->sipx_node, "\0\0\0\0\0\0\0\0", IPX_NODE_LEN) == 0) ||
+       (memcmp(sipx->sipx_node, "\377\377\377\377\377\377", IPX_NODE_LEN) == 0))
+       return (-1);
+
+    return (0);
+}
+
+/* XXX define type which makes verbose format checks AF_input */
+
+static int IPX_input(int type, char *bufp, struct sockaddr *sap)
+{
+    struct sockaddr_ipx *sai = (struct sockaddr_ipx *) sap;
+    unsigned long netnum;
+    char *ep;
+    int nbo;
+
+    sai->sipx_family = AF_IPX;
+    sai->sipx_network = htonl(0);
+    sai->sipx_node[0] = sai->sipx_node[1] = sai->sipx_node[2] =
+       sai->sipx_node[3] = sai->sipx_node[4] = sai->sipx_node[5] = '\0';
+    sai->sipx_port = 0;
+
+    if (type & 4)
+       nbo = 1;
+    else
+       nbo = 0;
+
+    type &= 3;
+    if (type <= 1) {
+       netnum = strtoul(bufp, &ep, 16);
+       if ((netnum == 0xffffffffL) || (netnum == 0L))
+           return (-1);
+       if (nbo)
+           sai->sipx_network = netnum;
+       else
+           sai->sipx_network = htonl(netnum);
+    }
+    if (type == 1) {
+       if (*ep != '\0')
+           return (-2);
+       return (0);
+    }
+    if (type == 0) {
+       if (*ep != ':')
+           return (-3);
+       bufp = ep + 1;
+    }
+    return (IPX_getsock(bufp, sap));
+}
+
+
+struct aftype ipx_aftype =
+{
+    "ipx", NULL, /*"IPX", */ AF_IPX, 0,
+    IPX_print, IPX_sprint, IPX_input, NULL,
+    NULL /*IPX_rprint */ , NULL, NULL,
+    -1,
+    "/proc/net/ipx"
+};
+
+#endif
diff --git a/lib/ipx_gr.c b/lib/ipx_gr.c
new file mode 100644 (file)
index 0000000..3d7ef1d
--- /dev/null
@@ -0,0 +1,85 @@
+/* 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"
+
+#if HAVE_AFIPX
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netipx/ipx.h>
+#else
+#include "ipx.h"
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+/* UGLY */
+
+int IPX_rprint(int options)
+{
+    /* int ext = options & FLAG_EXT; */
+    int numeric = options & FLAG_NUM_HOST;
+    char buff[1024];
+    char net[128], router_net[128];
+    char router_node[128];
+    int num;
+    FILE *fp = fopen(_PATH_PROCNET_IPX_ROUTE, "r");
+    struct aftype *ap;
+    struct sockaddr sa;
+
+    if ((ap = get_afntype(AF_IPX)) == NULL) {
+       EINTERN("lib/ipx_rt.c", "AF_IPX missing");
+       return (-1);
+    }
+
+    if (!fp) {
+        perror(_PATH_PROCNET_IPX_ROUTE);
+        printf(_("IPX not configured in this system.\n"));
+       return 1;
+    }
+
+    printf(_("Kernel IPX routing table\n"));   /* xxx */
+    printf(_("Destination               Router Net                Router Node\n"));
+
+    fgets(buff, 1023, fp);
+
+    while (fgets(buff, 1023, fp)) {
+       num = sscanf(buff, "%s %s %s", net, router_net, router_node);
+       if (num < 3)
+           continue;
+
+       /* Fetch and resolve the Destination */
+       (void) ap->input(5, net, &sa);
+       strcpy(net, ap->sprint(&sa, numeric));
+
+       /* Fetch and resolve the Router Net */
+       (void) ap->input(5, router_net, &sa);
+       strcpy(router_net, ap->sprint(&sa, numeric));
+
+       /* Fetch and resolve the Router Node */
+       (void) ap->input(2, router_node, &sa);
+       strcpy(router_node, ap->sprint(&sa, numeric));
+
+       printf("%-25s %-25s %-25s\n", net, router_net, router_node);
+    }
+
+    (void) fclose(fp);
+    return (0);
+}
+
+#endif                         /* HAVE_AFIPX */
diff --git a/lib/ipx_sr.c b/lib/ipx_sr.c
new file mode 100644 (file)
index 0000000..cb3263b
--- /dev/null
@@ -0,0 +1,36 @@
+#include "config.h"
+
+#if HAVE_AFIPX
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+#include "net-features.h"
+
+extern struct aftype ipx_aftype;
+
+/* static int skfd = -1; */
+
+int IPX_rinput(int action, int ext, char **args)
+{
+
+    fprintf(stderr, _("IPX: this needs to be written\n"));
+    return (0);
+}
+#endif                         /* HAVE_AFIPX */
diff --git a/lib/irda.c b/lib/irda.c
new file mode 100644 (file)
index 0000000..fa147fe
--- /dev/null
@@ -0,0 +1,76 @@
+/*********************************************************************
+ *                
+ * Filename:      irda.c
+ * Version:       0.1
+ * Description:   A first attempt to make ifconfig understand IrDA
+ * Status:        Experimental.
+ * Author:        Dag Brattli <dagb@cs.uit.no>
+ * Created at:    Wed Apr 21 09:03:09 1999
+ * Modified at:   Wed Apr 21 09:17:05 1999
+ * Modified by:   Dag Brattli <dagb@cs.uit.no>
+ * 
+ *     This program is free software; you can redistribute it and/or 
+ *     modify it under the terms of the GNU General Public License as 
+ *     published by the Free Software Foundation; either version 2 of 
+ *     the License, or (at your option) any later version.
+ * 
+ *     This program is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *     GNU General Public License for more details.
+ * 
+ *     You should have received a copy of the GNU General Public License 
+ *     along with this program; if not, write to the Free Software 
+ *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
+ *     MA 02111-1307 USA
+ *     
+ ********************************************************************/
+
+#include "config.h"
+
+#if HAVE_AFIRDA || HAVE_HWIRDA
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+/* Probably not a good idea to include <linux/if_arp.h> */
+#ifndef ARPHRD_IRDA
+#define ARPHRD_IRDA 783
+#endif
+
+/*
+ * Function irda_print (ptr)
+ *
+ *    Print hardware address of interface
+ *
+ */
+static char *irda_print(unsigned char *ptr)
+{
+    static char buff[8];
+
+    sprintf(&buff[strlen(buff)], "%02x:%02x:%02x:%02x", ptr[3], ptr[2], 
+           ptr[1], ptr[0]);
+
+    return (buff);
+}
+
+struct hwtype irda_hwtype =
+{
+     "irda", NULL, ARPHRD_IRDA, 2,
+     irda_print, NULL, NULL, 0
+};
+
+#endif                         /* HAVE_xxIRDA */
diff --git a/lib/loopback.c b/lib/loopback.c
new file mode 100644 (file)
index 0000000..0f08ac2
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * lib/loopback.c     This file contains the general hardware types.
+ *
+ * Version:     $Id: loopback.c,v 1.7 1999/09/27 11:00:48 philip Exp $
+ *
+ * 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
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+/* Display an UNSPEC address. */
+static char *pr_unspec(unsigned char *ptr)
+{
+    static char buff[64];
+    char *pos;
+    unsigned int i;
+
+    pos = buff;
+    for (i = 0; i < sizeof(struct sockaddr); i++) {
+       pos += sprintf(pos, "%02X-", (*ptr++ & 0377));
+    }
+    buff[strlen(buff) - 1] = '\0';
+    return (buff);
+}
+
+struct hwtype unspec_hwtype =
+{
+    "unspec", NULL, /*"UNSPEC", */ -1, 0,
+    pr_unspec, NULL, NULL
+};
+
+struct hwtype loop_hwtype =
+{
+    "loop", NULL, /*"Local Loopback", */ ARPHRD_LOOPBACK, 0,
+    NULL, NULL, NULL
+};
diff --git a/lib/masq_info.c b/lib/masq_info.c
new file mode 100644 (file)
index 0000000..45ca689
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * lib/masq_info.c    This file contains a the functio masq_info
+ *                      to print a table of current masquerade connections.
+ *
+ * NET-LIB      A collection of functions used from the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system. (net-tools, net-drivers)
+ *
+ * Version:     $Id: masq_info.c,v 1.7 2000/10/08 01:00:44 ecki Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
+ *              Copyright 1999 Bernd Eckenfels, Germany
+ *
+ * Modifications:
+ *
+ *960217 {0.01} Bernd Eckenfels:        creatin from the code of
+ *                                      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
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <stdio.h>
+#include <malloc.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+#include "net-features.h"
+
+#if HAVE_FW_MASQUERADE
+
+struct masq {
+    unsigned long expires;     /* Expiration timer */
+    char *proto;               /* Which protocol are we talking? */
+    struct sockaddr_in src, dst;       /* Source and destination IP addresses */
+    unsigned short sport, dport;       /* Source and destination ports */
+    unsigned short mport;      /* Masqueraded port */
+    unsigned long initseq;     /* Add delta from this seq. on */
+    short delta;               /* Delta in sequence numbers */
+    short pdelta;              /* Delta in sequence numbers before last */
+};
+
+static struct aftype *ap;      /* current address family       */
+static int has_pdelta;
+
+static void print_masq(struct masq *ms, int numeric_host, int numeric_port,
+                      int ext)
+{
+    unsigned long minutes, seconds, sec100s;
+
+    printf("%-4s", ms->proto);
+
+    sec100s = ms->expires % 100L;
+    seconds = (ms->expires / 100L) % 60;
+    minutes = ms->expires / 6000L;
+
+    printf("%3ld:%02ld.%02ld ", minutes, seconds, sec100s);
+
+    if (ext > 1) {
+       if (has_pdelta)
+           printf("%10lu %5hd %5hd ", ms->initseq,
+                  ms->delta, ms->pdelta);
+       else
+           printf("%10lu %5hd     - ", ms->initseq,
+                  ms->delta);
+    }
+    printf("%-20s ", ap->sprint((struct sockaddr *) &(ms->src), numeric_host));
+    printf("%-20s ", ap->sprint((struct sockaddr *) &(ms->dst), numeric_host));
+
+    printf("%s -> ", get_sname(ms->sport, ms->proto, numeric_port));
+    printf("%s", get_sname(ms->dport, ms->proto, numeric_port));
+    printf(" (%s)\n", get_sname(ms->mport, ms->proto, numeric_port));
+}
+
+
+static int read_masqinfo(FILE * f, struct masq *mslist, int nmslist)
+{
+    int n, nread = 0;
+    struct masq *ms;
+    char buf[256];
+
+    for (nread = 0; nread < nmslist; nread++) {
+       ms = &mslist[nread];
+       if (has_pdelta) {
+           if ((n = fscanf(f, " %s %lX:%hX %lX:%hX %hX %lX %hd %hd %lu",
+                           buf,
+                 (unsigned long *) &ms->src.sin_addr.s_addr, &ms->sport,
+                 (unsigned long *) &ms->dst.sin_addr.s_addr, &ms->dport,
+                           &ms->mport, &ms->initseq, &ms->delta,
+                           &ms->pdelta, &ms->expires)) == -1)
+               return nread;
+       } else {
+           if ((n = fscanf(f, " %s %lX:%hX %lX:%hX %hX %lX %hd %lu",
+                           buf,
+                 (unsigned long *) &ms->src.sin_addr.s_addr, &ms->sport,
+                 (unsigned long *) &ms->dst.sin_addr.s_addr, &ms->dport,
+                           &ms->mport, &ms->initseq, &ms->delta,
+                           &ms->expires)) == -1)
+               return nread;
+       }
+       if ((has_pdelta && (n != 10)) || (!has_pdelta && (n != 9))) {
+           EINTERN("masq_info.c", "ip_masquerade format error");
+           return (-1);
+       }
+       ms->src.sin_family = AF_INET;
+       ms->dst.sin_family = AF_INET;
+
+       if (strcmp("TCP", buf) == 0)
+           ms->proto = "tcp";
+       else if (strcmp("UDP", buf) == 0)
+           ms->proto = "udp";
+       else if (strcmp("ICMP", buf) == 0)
+           ms->proto = "icmp";
+       else if (strcmp("GRE", buf) == 0)
+           ms->proto = "gre";
+       else if (strcmp("ESP", buf) == 0)
+           ms->proto = "esp";
+       else {
+           EINTERN("masq_info.c", "ip_masquerade unknown type");
+           return (-1);
+       }
+
+       /* we always keep these addresses in network byte order */
+       ms->src.sin_addr.s_addr = htonl(ms->src.sin_addr.s_addr);
+       ms->dst.sin_addr.s_addr = htonl(ms->dst.sin_addr.s_addr);
+       ms->sport = htons(ms->sport);
+       ms->dport = htons(ms->dport);
+       ms->mport = htons(ms->mport);
+    }
+    return nread;
+}
+
+
+int ip_masq_info(int numeric_host, int numeric_port, int ext)
+{
+    FILE *f;
+    int i;
+    char buf[256];
+    struct masq *mslist;
+    int ntotal = 0, nread;
+
+    if (!(f = fopen(_PATH_PROCNET_IP_MASQ, "r"))) {
+       if (errno != ENOENT) {
+           perror(_PATH_PROCNET_IP_MASQ);
+           return (-1);
+       }
+       ESYSNOT("netstat", "ip_masquerade");
+       return (1);
+    }
+    if ((ap = get_aftype("inet")) == NULL) {
+       ENOSUPP("masq_info", "AF INET");
+       fclose(f);
+       return (-1);
+    }
+    fgets(buf, sizeof(buf), f);
+    has_pdelta = strstr(buf, "PDelta") ? 1 : 0;
+
+    mslist = (struct masq *) malloc(16 * sizeof(struct masq));
+    if (!mslist) {
+       EINTERN("masq_info", "malloc() failed");
+       fclose(f);
+       return (-1);
+    }
+    while ((nread = read_masqinfo(f, &(mslist[ntotal]), 16)) == 16) {
+       ntotal += nread;
+       mslist = (struct masq *) realloc(mslist,
+                                   (ntotal + 16) * sizeof(struct masq));
+       if (!mslist) {
+           EINTERN("masq_info", "realloc() failed");
+           fclose(f);
+           return (-1);
+       }
+    }
+    fclose(f);
+
+    if (nread < 0) {
+       if (mslist)
+           free(mslist);
+       return (-1);
+    }
+    ntotal += nread;
+
+    if (ntotal > 0) {
+       printf(_("IP masquerading entries\n"));
+       switch (ext) {
+       case 1:
+           printf(_("prot   expire source               destination          ports\n"));
+           break;
+       default:
+           printf(_("prot   expire    initseq delta prevd source               destination          ports\n"));
+           break;
+       }
+       for (i = 0; i < ntotal; i++)
+           print_masq(&(mslist[i]), numeric_host, numeric_port, ext);
+       if (mslist)
+           free(mslist);
+
+    }
+    return 0;
+}
+#endif
diff --git a/lib/net-features.h b/lib/net-features.h
new file mode 100644 (file)
index 0000000..0de2730
--- /dev/null
@@ -0,0 +1,304 @@
+/*
+ * lib/net-features.h This file contains the definitions of all kernel
+ *                      dependend features.
+ *
+ * Version:     features.h 0.03 (1996-03-22)
+ *
+ * Author:      Bernd Eckenfels <net-tools@lina.inka.de>
+ *              Copyright 1996 Bernd Eckenfels, Germany
+ *
+ * Modifications:
+ *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
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+
+/* 
+ *    This needs to be included AFTER the KErnel Header Files
+ *      one of the FEATURE_ should be defined to get the Feature Variable
+ *      definition included
+ */
+
+#ifndef _NET_FEATURES_H
+#define _NET_FEATURES_H
+
+/* detect the present features */
+
+#if defined (SIOCADDRTOLD) || defined (RTF_IRTT)       /* route */
+#define HAVE_NEW_ADDRT 1
+#endif
+
+#ifdef RTF_IRTT                        /* route */
+#define HAVE_RTF_IRTT 1
+#endif
+
+#ifdef RTF_REJECT              /* route */
+#define HAVE_RTF_REJECT 1
+#endif
+
+/* compose the feature information string */
+
+#if defined (FEATURE_ARP) || defined (FEATURE_ROUTE) || defined (FEATURE_NETSTAT)
+static char *Features =
+
+/* ---------------------------------------------------- */
+#ifdef FEATURE_ROUTE
+
+#if HAVE_NEW_ADDRT
+"+"
+#else
+"-"
+#endif
+"NEW_ADDRT "
+
+#if HAVE_RTF_IRTT
+"+"
+#else
+"-"
+#endif
+"RTF_IRTT "
+
+#if HAVE_RTF_REJECT
+"+"
+#else
+"-"
+#endif
+"RTF_REJECT "
+
+#endif                         /* FEATURE_ROUTE */
+/* ---------------------------------------------------- */
+
+
+/* ---------------------------------------------------- */
+#ifdef FEATURE_NETSTAT
+
+#if HAVE_NEW_ADDRT
+"+"
+#else
+"-"
+#endif
+"NEW_ADDRT "
+
+#if HAVE_RTF_IRTT
+"+"
+#else
+"-"
+#endif
+"RTF_IRTT "
+
+#if HAVE_RTF_REJECT
+"+"
+#else
+"-"
+#endif
+"RTF_REJECT "
+
+#if HAVE_FW_MASQUERADE
+"+"
+#else
+"-"
+#endif
+"FW_MASQUERADE "
+
+#endif                         /* FEATURE_NETSTAT */
+/* ---------------------------------------------------- */
+
+
+#if I18N
+"+I18N"
+#else
+"-I18N"
+#endif                         /* I18N */
+
+
+"\nAF: "
+#ifdef DFLT_AF
+"(" DFLT_AF ")"
+#endif
+
+#if HAVE_AFUNIX
+" +"
+#else
+" -"
+#endif
+"UNIX "
+#if HAVE_AFINET
+"+"
+#else
+"-"
+#endif
+"INET "
+#if HAVE_AFINET6
+"+"
+#else
+"-"
+#endif
+"INET6 "
+#if HAVE_AFIPX
+"+"
+#else
+"-"
+#endif
+"IPX "
+#if HAVE_AFAX25
+"+"
+#else
+"-"
+#endif
+"AX25 "
+#if HAVE_AFNETROM
+"+"
+#else
+"-"
+#endif
+"NETROM "
+#if HAVE_AFX25
+"+"
+#else
+"-"
+#endif
+"X25 "
+#if HAVE_AFATALK
+"+"
+#else
+"-"
+#endif
+"ATALK "
+#if HAVE_AFECONET
+"+"
+#else
+"-"
+#endif
+"ECONET "
+#if HAVE_AFROSE
+"+"
+#else
+"-"
+#endif
+"ROSE "
+
+"\nHW: "
+
+#ifdef DFLT_HW
+"(" DFLT_HW ")"
+#endif
+
+#if HAVE_HWETHER
+" +"
+#else
+" -"
+#endif
+"ETHER "
+#if HAVE_HWARC
+"+"
+#else
+"-"
+#endif
+"ARC "
+#if HAVE_HWSLIP
+"+"
+#else
+"-"
+#endif
+"SLIP "
+#if HAVE_HWPPP
+"+"
+#else
+"-"
+#endif
+"PPP "
+#if HAVE_HWTUNNEL
+"+"
+#else
+"-"
+#endif
+"TUNNEL "
+#if HAVE_HWTR
+"+"
+#else
+"-"
+#endif
+"TR "
+#if HAVE_HWAX25
+"+"
+#else
+"-"
+#endif
+"AX25 "
+
+#if HAVE_HWNETROM
+"+"
+#else
+"-"
+#endif
+"NETROM "
+
+#if HAVE_HWX25
+"+"
+#else
+"-"
+#endif
+"X25 "
+
+#if HAVE_HWFR
+"+"
+#else
+"-"
+#endif
+"FR "
+
+#if HAVE_HWROSE
+"+"
+#else
+"-"
+#endif
+"ROSE "
+
+#if HAVE_HWASH
+"+"
+#else
+"-"
+#endif
+"ASH "
+
+#if HAVE_HWSIT
+"+"
+#else
+"-"
+#endif
+"SIT "
+
+#if HAVE_HWFDDI
+"+"
+#else
+"-"
+#endif
+"FDDI "
+
+#if HAVE_HWHIPPI
+"+"
+#else
+"-"
+#endif
+"HIPPI "
+
+#if HAVE_HWHDLCLAPB
+"+"
+#else
+"-"
+#endif
+"HDLC/LAPB "
+;
+
+
+#endif                         /* FEATURE_* */
+
+#endif                         /* _NET_FEATURES_H */
+/* End of features.h */
diff --git a/lib/net-support.h b/lib/net-support.h
new file mode 100644 (file)
index 0000000..568fe81
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * lib/support.h      This file contains the definitions of what is in the
+ *                      support library.  Most of all, it defines structures
+ *                      for accessing support modules, and the function proto-
+ *                      types.
+ *
+ * NET-LIB      A collection of functions used from the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system. (net-tools, net-drivers)
+ *
+ * Version:     lib/net-support.h 1.35 (1996-01-01)
+ *
+ * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ * Modifications:
+ *960125 {1.20} Bernd Eckenfels:        reformated, layout
+ *960202 {1.30} Bernd Eckenfels:        rprint in aftype
+ *960206 {1.31} Bernd Eckenfels:        route_init
+ *960219 {1.32} Bernd Eckenfels:        type for ap->input()
+ *960322 {1.33} Bernd Eckenfels:        activate_ld and const in get_hwtype
+ *960413 {1.34} Bernd Eckenfels:        new RTACTION suport
+ *990101 {1.35} Bernd Eckenfels:       print_(hw|af)list support, added kerneldefines
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <sys/socket.h>
+
+/* This structure defines protocol families and their handlers. */
+struct aftype {
+    char *name;
+    char *title;
+    int af;
+    int alen;
+    char *(*print) (unsigned char *);
+    char *(*sprint) (struct sockaddr *, int numeric);
+    int (*input) (int type, char *bufp, struct sockaddr *);
+    void (*herror) (char *text);
+    int (*rprint) (int options);
+    int (*rinput) (int typ, int ext, char **argv);
+
+    /* may modify src */
+    int (*getmask) (char *src, struct sockaddr * mask, char *name);
+
+    int fd;
+    char *flag_file;
+};
+
+extern struct aftype *aftypes[];
+
+/* This structure defines hardware protocols and their handlers. */
+struct hwtype {
+    char *name;
+    char *title;
+    int type;
+    int alen;
+    char *(*print) (unsigned char *);
+    int (*input) (char *, struct sockaddr *);
+    int (*activate) (int fd);
+    int suppress_null_addr;
+};
+
+
+extern struct hwtype *get_hwtype(const char *name);
+extern struct hwtype *get_hwntype(int type);
+extern void          print_hwlist(int type);
+extern struct aftype *get_aftype(const char *name);
+extern struct aftype *get_afntype(int type);
+extern void          print_aflist(int type);
+extern int           hw_null_address(struct hwtype *hw, void *addr);
+
+extern int getargs(char *string, char *arguments[]);
+
+extern int get_socket_for_af(int af);
+
+extern void getroute_init(void);
+extern void setroute_init(void);
+extern void activate_init(void);
+extern int route_info(const char *afname, int flags);
+extern int route_edit(int action, const char *afname, int flags, char **argv);
+extern int activate_ld(const char *hwname, int fd);
+
+#define RTACTION_ADD   1
+#define RTACTION_DEL   2
+#define RTACTION_HELP  3
+#define RTACTION_FLUSH 4
+#define RTACTION_SHOW  5
+
+#define FLAG_EXT       3               /* AND-Mask */
+#define FLAG_NUM_HOST  4
+#define FLAG_NUM_PORT  8
+#define FLAG_NUM_USER 16
+#define FLAG_NUM     (FLAG_NUM_HOST|FLAG_NUM_PORT|FLAG_NUM_USER)
+#define FLAG_SYM      32
+#define FLAG_CACHE    64
+#define FLAG_FIB     128
+#define FLAG_VERBOSE 256
+
+extern int ip_masq_info(int numeric_host, int numeric_port, int ext);
+
+extern int INET_rprint(int options);
+extern int INET6_rprint(int options);
+extern int DDP_rprint(int options);
+extern int IPX_rprint(int options);
+extern int NETROM_rprint(int options);
+extern int AX25_rprint(int options);
+extern int X25_rprint(int options);
+
+extern int INET_rinput(int action, int flags, char **argv);
+extern int INET6_rinput(int action, int flags, char **argv);
+extern int DDP_rinput(int action, int flags, char **argv);
+extern int IPX_rinput(int action, int flags, char **argv);
+extern int NETROM_rinput(int action, int flags, char **argv);
+extern int AX25_rinput(int action, int flags, char **argv);
+extern int X25_rinput(int action, int flags, char **argv);
+
+extern int aftrans_opt(const char *arg);
+extern void aftrans_def(char *tool, char *argv0, char *dflt);
+
+extern char *get_sname(int socknumber, char *proto, int numeric);
+
+extern int flag_unx;
+extern int flag_ipx;
+extern int flag_ax25;
+extern int flag_ddp;
+extern int flag_netrom;
+extern int flag_x25;
+extern int flag_inet;
+extern int flag_inet6;
+
+extern char afname[];
+
+#define AFTRANS_OPTS \
+       {"ax25",        0,      0,      1}, \
+       {"x25",         0,      0,      1}, \
+       {"ip",          0,      0,      1}, \
+       {"ipx",         0,      0,      1}, \
+       {"appletalk",   0,      0,      1}, \
+       {"netrom",      0,      0,      1}, \
+       {"inet",        0,      0,      1}, \
+       {"inet6",       0,      0,      1}, \
+       {"ddp",         0,      0,      1}, \
+       {"unix",        0,      0,      1}, \
+       {"tcpip",       0,      0,      1}
+#define AFTRANS_CNT 11
+
+#define EINTERN(file, text) fprintf(stderr, \
+       _("%s: Internal Error `%s'.\n"),file,text);
+
+#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, _("%s: no support for `%s' on this system.\n"),A,B)
+
+#define E_NOTFOUND     8
+#define E_SOCK         7
+#define E_LOOKUP       6
+#define E_VERSION      5
+#define E_USAGE                4
+#define E_OPTERR       3
+#define E_INTERN       2
+#define E_NOSUPP       1
+
+
+/* ========== Kernel Defines =============
+ * Since it is not a good idea to depend on special kernel sources for the headers
+ * and since the libc6 Headers are not always up to date, we keep a copy of the
+ * most often used Flags in this file. We realy need a way to keep them up-to-date.
+ * Perhaps anybody knows how the glibc2 folk is doing it? -ecki
+ */
+
+/* Keep this ins sync with /usr/src/linux/include/linux/rtnetlink.h */
+#define RTNH_F_DEAD            1       /* Nexthop is dead (used by multipath)  */
+#define RTNH_F_PERVASIVE       2       /* Do recursive gateway lookup  */
+#define RTNH_F_ONLINK          4       /* Gateway is forced on link    */
+
+/* Keep this in sync with /usr/src/linux/include/linux/in_route.h */
+#define RTCF_DEAD       RTNH_F_DEAD
+#define RTCF_ONLINK     RTNH_F_ONLINK
+/* #define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC */
+#define RTCF_NOTIFY     0x00010000
+#define RTCF_DIRECTDST  0x00020000
+#define RTCF_REDIRECTED 0x00040000
+#define RTCF_TPROXY     0x00080000
+#define RTCF_FAST       0x00200000
+#define RTCF_MASQ       0x00400000
+#define RTCF_SNAT       0x00800000
+#define RTCF_DOREDIRECT 0x01000000
+#define RTCF_DIRECTSRC  0x04000000
+#define RTCF_DNAT       0x08000000
+#define RTCF_BROADCAST  0x10000000
+#define RTCF_MULTICAST  0x20000000
+#define RTCF_REJECT     0x40000000
+#define RTCF_LOCAL      0x80000000
+
+/* Keep this in sync with /usr/src/linux/include/linux/ipv6_route.h */
+#ifndef RTF_DEFAULT
+#define RTF_DEFAULT     0x00010000      /* default - learned via ND     */
+#endif
+#define RTF_ALLONLINK   0x00020000      /* fallback, no routers on link */
+#ifndef RTF_ADDRCONF
+#define RTF_ADDRCONF    0x00040000      /* addrconf route - RA          */
+#endif
+#define RTF_NONEXTHOP   0x00200000      /* route with no nexthop        */
+#define RTF_EXPIRES     0x00400000
+#define RTF_CACHE       0x01000000      /* cache entry                  */
+#define RTF_FLOW        0x02000000      /* flow significant route       */
+#define RTF_POLICY      0x04000000      /* policy route                 */
+#define RTF_LOCAL       0x80000000
+
+/* Keep this in sync with /usr/src/linux/include/linux/route.h */
+#define RTF_UP          0x0001          /* route usable                 */
+#define RTF_GATEWAY     0x0002          /* destination is a gateway     */
+#define RTF_HOST        0x0004          /* host entry (net otherwise)   */
+#define RTF_REINSTATE   0x0008          /* reinstate route after tmout  */
+#define RTF_DYNAMIC     0x0010          /* created dyn. (by redirect)   */
+#define RTF_MODIFIED    0x0020          /* modified dyn. (by redirect)  */
+#define RTF_MTU         0x0040          /* specific MTU for this route  */
+#ifndef RTF_MSS
+#define RTF_MSS         RTF_MTU         /* Compatibility :-(            */
+#endif
+#define RTF_WINDOW      0x0080          /* per route window clamping    */
+#define RTF_IRTT        0x0100          /* Initial round trip time      */
+#define RTF_REJECT      0x0200          /* Reject route                 */
+
+/* this is a 2.0.36 flag from /usr/src/linux/include/linux/route.h */
+#define RTF_NOTCACHED   0x0400          /* this route isn't cached        */
+
+#ifdef HAVE_AFECONET
+#ifndef AF_ECONET
+#define AF_ECONET       19      /* Acorn Econet */
+#endif
+#endif
+
+/* End of lib/support.h */
+
diff --git a/lib/netrom.c b/lib/netrom.c
new file mode 100644 (file)
index 0000000..1de9dc3
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * lib/netrom.c       This file contains an implementation of the "NET/ROM"
+ *              support functions for the NET-2 base distribution.
+ *
+ * Version:     $Id: netrom.c,v 1.8 2000/03/05 11:26:03 philip Exp $
+ *
+ * NOTE:        I will redo this module as soon as I got the libax25.a
+ *              library sorted out.  This library contains some useful
+ *              and often used address conversion functions, database
+ *              lookup stuff, and more of the like.
+ *
+ * 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
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFNETROM || HAVE_HWNETROM
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#include <netax25/ax25.h>
+#else
+#include <linux/ax25.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+static char netrom_errmsg[128];
+
+extern struct aftype netrom_aftype;
+
+static char *NETROM_print(unsigned char *ptr)
+{
+    static char buff[8];
+    int i;
+
+    for (i = 0; i < 6; i++) {
+       buff[i] = ((ptr[i] & 0377) >> 1);
+       if (buff[i] == ' ')
+           buff[i] = '\0';
+    }
+    buff[6] = '\0';
+    i = ((ptr[6] & 0x1E) >> 1);
+    if (i != 0)
+       sprintf(&buff[strlen(buff)], "-%d", i);
+    return (buff);
+}
+
+
+/* Display an AX.25 socket address. */
+static char *NETROM_sprint(struct sockaddr *sap, int numeric)
+{
+    char buf[64];
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (NETROM_print(((struct sockaddr_ax25 *) sap)->sax25_call.ax25_call));
+}
+
+
+static int NETROM_input(int type, char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char *orig, c;
+    unsigned int i;
+
+    sap->sa_family = netrom_aftype.af;
+    ptr = ((struct sockaddr_ax25 *) sap)->sax25_call.ax25_call;
+
+    /* First, scan and convert the basic callsign. */
+    orig = bufp;
+    i = 0;
+    while ((*bufp != '\0') && (*bufp != '-') && (i < 6)) {
+       c = *bufp++;
+       if (islower(c))
+           c = toupper(c);
+       if (!(isupper(c) || isdigit(c))) {
+           safe_strncpy(netrom_errmsg, _("Invalid callsign"), sizeof(netrom_errmsg));
+#ifdef DEBUG
+           fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) ((c << 1) & 0xFE);
+       i++;
+    }
+
+    /* Callsign too long? */
+    if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) {
+       safe_strncpy(netrom_errmsg, _("Callsign too long"), sizeof(netrom_errmsg));
+#ifdef DEBUG
+       fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig);
+#endif
+       errno = E2BIG;
+       return (-1);
+    }
+    /* Nope, fill out the address bytes with blanks. */
+    while (i++ < sizeof(ax25_address) - 1) {
+       *ptr++ = (unsigned char) ((' ' << 1) & 0xFE);
+    }
+
+    /* See if we need to add an SSID field. */
+    if (*bufp == '-') {
+       i = atoi(++bufp);
+       *ptr = (unsigned char) ((i << 1) & 0xFE);
+    } else {
+       *ptr = (unsigned char) '\0';
+    }
+
+    /* All done. */
+#ifdef DEBUG
+    fprintf(stderr, "netrom_input(%s): ", orig);
+    for (i = 0; i < sizeof(ax25_address); i++)
+       fprintf(stderr, "%02X ", sap->sa_data[i] & 0377);
+    fprintf(stderr, "\n");
+#endif
+
+    return (0);
+}
+
+
+/* Display an error message. */
+static void NETROM_herror(char *text)
+{
+    if (text == NULL)
+       fprintf(stderr, "%s\n", netrom_errmsg);
+    else
+       fprintf(stderr, "%s: %s\n", text, netrom_errmsg);
+}
+
+
+static int NETROM_hinput(char *bufp, struct sockaddr *sap)
+{
+    if (NETROM_input(0, bufp, sap) < 0)
+       return (-1);
+    sap->sa_family = ARPHRD_NETROM;
+    return (0);
+}
+
+#if 0
+/* Set the line discipline of a terminal line. */
+static int KISS_set_disc(int fd, int disc)
+{
+    if (ioctl(fd, TIOCSETD, &disc) < 0) {
+       fprintf(stderr, "KISS_set_disc(%d): %s\n", disc, strerror(errno));
+       return (-errno);
+    }
+    return (0);
+}
+
+
+/* Start the KISS encapsulation on the file descriptor. */
+static int KISS_init(int fd)
+{
+    if (KISS_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (ioctl(fd, SIOCSIFENCAP, 4) < 0)
+       return (-1);
+    return (0);
+}
+#endif
+
+struct hwtype netrom_hwtype =
+{
+    "netrom", NULL, /* "AMPR NET/ROM", */ ARPHRD_NETROM, 7,
+    NETROM_print, NETROM_hinput, NULL, 0
+};
+
+struct aftype netrom_aftype =
+{
+    "netrom", NULL, /* "AMPR NET/ROM", */ AF_NETROM, 7,
+    NETROM_print, NETROM_sprint, NETROM_input, NETROM_herror,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/net/nr"
+};
+
+#endif                         /* HAVE_AFNETROM */
diff --git a/lib/netrom_gr.c b/lib/netrom_gr.c
new file mode 100644 (file)
index 0000000..adf54b2
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * lib/netrom_gr.c    This file contains an implementation of the NET/ROM
+ *                      route support functions.
+ *
+ * Version:     $Id: netrom_gr.c,v 1.5 2000/10/08 01:00:44 ecki Exp $
+ *
+ * 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
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFNETROM
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+/* UGLY */
+
+int NETROM_rprint(int options)
+{
+    FILE *f1 = fopen(_PATH_PROCNET_NR_NODES, "r");
+    FILE *f2 = fopen(_PATH_PROCNET_NR_NEIGH, "r");
+    char buffer[256];
+    int qual, n, w;
+    /*int ext = options & FLAG_EXT;
+       int numeric = options & FLAG_NUM_HOST; */
+
+    f1 = fopen(_PATH_PROCNET_NR_NODES, "r");
+    if (!f1) perror(_PATH_PROCNET_NR_NODES);
+    f2 = fopen(_PATH_PROCNET_NR_NEIGH, "r");
+    if (!f2) perror(_PATH_PROCNET_NR_NEIGH);
+
+    if (f1 == NULL || f2 == NULL) {
+       printf(_("NET/ROM not configured in this system.\n"));
+       return 1;
+    }
+    printf(_("Kernel NET/ROM routing table\n"));
+    printf(_("Destination  Mnemonic  Quality  Neighbour  Iface\n"));
+    fgets(buffer, 256, f1);
+    while (fgets(buffer, 256, f1)) {
+       buffer[9] = 0;
+       buffer[17] = 0;
+       w = atoi(buffer + 19) - 1;
+       printf("%-9s    %-7s   ",
+              buffer, buffer + 10);
+       qual = atoi(buffer + 24 + 15 * w);
+       n = atoi(buffer + 32 + 15 * w);
+       rewind(f2);
+       fgets(buffer, 256, f2);
+       while (fgets(buffer, 256, f2)) {
+           if (atoi(buffer) == n) {
+               buffer[15] = 0;
+               buffer[20] = 0;
+               printf("%3d      %-9s  %s\n",
+                      qual, buffer + 6, buffer + 16);
+               break;
+           }
+       }
+    }
+    fclose(f1);
+    fclose(f2);
+    return 0;
+}
+
+#endif                         /* HAVE_AFNETROM */
diff --git a/lib/netrom_sr.c b/lib/netrom_sr.c
new file mode 100644 (file)
index 0000000..12815a1
--- /dev/null
@@ -0,0 +1,47 @@
+#include "config.h"
+
+#if HAVE_AFNETROM
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+/* #include <net/route.h> realy broken */
+#include <sys/ioctl.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.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"));
+
+    return (E_USAGE);
+}
+#endif
+
+
+int NETROM_rinput(int action, int ext, char **args)
+{
+
+    fprintf(stderr, _("NET/ROM: this needs to be written\n"));
+    return (0);
+}
+#endif                         /* HAVE_AFNETROM */
diff --git a/lib/nstrcmp.c b/lib/nstrcmp.c
new file mode 100644 (file)
index 0000000..8b1ff30
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright 1998 by Andi Kleen. Subject to the GPL. */
+/* $Id: nstrcmp.c,v 1.2 1998/11/15 20:11:38 freitag Exp $ */ 
+#include <ctype.h>
+#include <stdlib.h>
+#include "util.h"
+
+/* like strcmp(), but knows about numbers */
+int nstrcmp(const char *astr, const char *b)
+{
+    const char *a = astr;
+
+    while (*a == *b) {
+       if (*a == '\0')
+           return 0;
+       a++;
+       b++;
+    }
+    if (isdigit(*a)) {
+       if (!isdigit(*b))
+           return -1;
+       while (a > astr) {
+           a--;
+           if (!isdigit(*a)) {
+               a++;
+               break;
+           }
+           if (!isdigit(*b))
+               return -1;
+           b--;
+       }
+       return atoi(a) > atoi(b) ? 1 : -1;
+    }
+    return *a - *b;
+}
diff --git a/lib/pathnames.h b/lib/pathnames.h
new file mode 100644 (file)
index 0000000..1f7fefb
--- /dev/null
@@ -0,0 +1,52 @@
+
+/*
+ * lib/pathnames.h    This file contains the definitions of the path 
+ *                      names used by the NET-LIB.
+ *
+ * NET-LIB      
+ *
+ * Version:     lib/pathnames.h 1.37 (1997-08-23)
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ */
+
+/* pathnames of the procfs files used by NET. */
+#define _PATH_PROCNET_IGMP             "/proc/net/igmp"
+#define _PATH_PROCNET_IGMP6            "/proc/net/igmp6"
+#define _PATH_PROCNET_TCP              "/proc/net/tcp"
+#define _PATH_PROCNET_TCP6             "/proc/net/tcp6"
+#define _PATH_PROCNET_UDP              "/proc/net/udp"
+#define _PATH_PROCNET_UDP6             "/proc/net/udp6"
+#define _PATH_PROCNET_RAW              "/proc/net/raw"
+#define _PATH_PROCNET_RAW6             "/proc/net/raw6"
+#define _PATH_PROCNET_UNIX             "/proc/net/unix"
+#define _PATH_PROCNET_ROUTE            "/proc/net/route"
+#define _PATH_PROCNET_ROUTE6           "/proc/net/ipv6_route"
+#define _PATH_PROCNET_RTCACHE          "/proc/net/rt_cache"
+#define _PATH_PROCNET_AX25_ROUTE       "/proc/net/ax25_route"
+#define _PATH_PROCNET_NR               "/proc/net/nr"
+#define _PATH_PROCNET_NR_NEIGH         "/proc/net/nr_neigh"
+#define _PATH_PROCNET_NR_NODES         "/proc/net/nr_nodes"
+#define _PATH_PROCNET_ARP              "/proc/net/arp"
+#define _PATH_PROCNET_AX25             "/proc/net/ax25"
+#define _PATH_PROCNET_IPX              "/proc/net/ipx"
+#define _PATH_PROCNET_IPX_ROUTE                "/proc/net/ipx_route"
+#define _PATH_PROCNET_ATALK            "/proc/net/appletalk"
+#define _PATH_PROCNET_IP_BLK           "/proc/net/ip_block"
+#define _PATH_PROCNET_IP_FWD           "/proc/net/ip_forward"
+#define _PATH_PROCNET_IP_ACC           "/proc/net/ip_acct"
+#define _PATH_PROCNET_IP_MASQ          "/proc/net/ip_masquerade"
+#define _PATH_PROCNET_NDISC            "/proc/net/ndisc"
+#define _PATH_PROCNET_IFINET6          "/proc/net/if_inet6"
+#define _PATH_PROCNET_DEV              "/proc/net/dev"
+#define _PATH_PROCNET_RARP             "/proc/net/rarp"
+#define _PATH_ETHERS                   "/etc/ethers"
+#define _PATH_PROCNET_ROSE_ROUTE       "/proc/net/rose_routes"
+#define _PATH_PROCNET_X25              "/proc/net/x25"
+#define _PATH_PROCNET_X25_ROUTE                "/proc/net/x25_routes"
+#define _PATH_PROCNET_DEV_MCAST                "/proc/net/dev_mcast"
+
+/* pathname for the netlink device */
+#define _PATH_DEV_ROUTE        "/dev/route"
+
+/* End of pathnames.h */
diff --git a/lib/ppp.c b/lib/ppp.c
new file mode 100644 (file)
index 0000000..8bf1499
--- /dev/null
+++ b/lib/ppp.c
@@ -0,0 +1,56 @@
+/*
+ * lib/ppp.c  This file contains the SLIP support for the NET-2 base
+ *              distribution.
+ *
+ * Version:     $Id: ppp.c,v 1.4 2000/03/05 11:26:03 philip Exp $
+ *
+ * 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
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWPPP
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+/* Start the PPP encapsulation on the file descriptor. */
+static int do_ppp(int fd)
+{
+    fprintf(stderr, _("You cannot start PPP with this program.\n"));
+    return -1;
+}
+
+
+struct hwtype ppp_hwtype =
+{
+    "ppp", NULL, /*"Point-Point Protocol", */ ARPHRD_PPP, 0,
+    NULL, NULL, do_ppp, 0
+};
+
+
+#endif                         /* HAVE_PPP */
diff --git a/lib/ppp_ac.c b/lib/ppp_ac.c
new file mode 100644 (file)
index 0000000..3b534f9
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * lib/ppp_ac.c       This file contains the activation for the
+ *              PPP line disciplines, called from activate_ld().
+ *
+ * Version:     $Id: ppp_ac.c,v 1.3 1998/11/15 20:11:50 freitag Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWPPP
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.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 */
+    return (-1);
+}
+
+#endif                         /* HAVE_HWPPP */
diff --git a/lib/proc.c b/lib/proc.c
new file mode 100644 (file)
index 0000000..bf34dbe
--- /dev/null
@@ -0,0 +1,74 @@
+/* Tolerant /proc file parser. Copyright 1998 Andi Kleen */
+/* $Id: proc.c,v 1.4 1999/01/05 20:54:00 philip Exp $ */ 
+/* Fixme: cannot currently cope with removed fields */ 
+
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <ctype.h>
+
+/* Caller must free return string. */
+
+char *proc_gen_fmt(char *name, int more, FILE * fh,...)
+{
+    char buf[512], format[512] = "";
+    char *title, *head, *hdr;
+    va_list ap;
+
+    if (!fgets(buf, (sizeof buf) - 1, fh))
+       return NULL;
+    strcat(buf, " ");
+
+    va_start(ap, fh);
+    title = va_arg(ap, char *);
+    for (hdr = buf; hdr;) {
+       while (isspace(*hdr) || *hdr == '|')
+           hdr++;
+       head = hdr;
+       hdr = strpbrk(hdr, "| \t\n");
+       if (hdr)
+           *hdr++ = 0;
+
+       if (!strcmp(title, head)) {
+           strcat(format, va_arg(ap, char *));
+           title = va_arg(ap, char *);
+           if (!title || !head)
+               break;
+       } else {
+           strcat(format, "%*s");      /* XXX */
+       }
+       strcat(format, " ");
+    }
+    va_end(ap);
+
+    if (!more && title) {
+       fprintf(stderr, "warning: %s does not contain required field %s\n",
+               name, title);
+       return NULL;
+    }
+    return strdup(format);
+}
+
+/* 
+ * this will generate a bitmask of present/missing fields in the header of
+ * a /proc file.
+ */
+int proc_guess_fmt(char *name, FILE *fh, ...)
+{
+    char buf[512];
+    char *tmp;
+    int flag = 0;
+    va_list ap;
+
+    if (!fgets(buf, (sizeof buf) - 1, fh))
+       return -1;
+    strcat(buf, "\0");
+    va_start(ap, fh);
+    while((tmp = va_arg(ap, char *))) {
+      int f = va_arg(ap, int);
+      if (strstr(buf,tmp) != 0)
+        flag |= f;
+    }
+    va_end(ap);
+    return flag;
+}
diff --git a/lib/proc.h b/lib/proc.h
new file mode 100644 (file)
index 0000000..91f803c
--- /dev/null
@@ -0,0 +1,5 @@
+
+
+/* Generate a suitable scanf format for a column title line */
+char *proc_gen_fmt(char *name, int more, FILE * fh,...);
+int   proc_guess_fmt(char *name, FILE* fh,...);
diff --git a/lib/rose.c b/lib/rose.c
new file mode 100644 (file)
index 0000000..381226b
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * lib/rose.c This file contains an implementation of the "ROSE"
+ *              support functions for the NET-2 base distribution.
+ *
+ * Version:     $Id: rose.c,v 1.7 2000/03/05 11:26:03 philip Exp $
+ *
+ * Author:      Terry Dawson, VK2KTJ, <terry@perf.no.itg.telstra.com.au>
+ *              based on ax25.c by:
+ *              Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFROSE || HAVE_HWROSE
+#include <features.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>                /* ARPHRD_ROSE */
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+#ifndef _NETROSE_ROSE_H
+#include <linux/ax25.h>
+#include <linux/rose.h>
+/* this will check for the broken #define PF_ROSE AF_ROSE define in some older kernel headers */
+#undef AF_ROSE
+#if PF_ROSE == AF_ROSE
+#warning "Your <linux/rose.h> is broken and defines PF_ROSE, better remove the define in /usr/include/linux/rose.h (using private define for PF_ROSE meanwhile)"
+#undef PF_ROSE
+#define PF_ROSE         11      /* Amateur Radio X.25 PLP       */
+#endif
+/* now restore the value of AF_ROSE (which had to be deleted to catch the case where #define AF_ROSE PF_ROSE) */
+#define AF_ROSE         PF_ROSE
+#endif
+
+static char ROSE_errmsg[128];
+
+extern struct aftype rose_aftype;
+
+static char *
+ ROSE_print(unsigned char *ptr)
+{
+    static char buff[12];
+
+    snprintf(buff, sizeof(buff), "%02x%02x%02x%02x%02x", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4]);
+    buff[10] = '\0';
+    return (buff);
+}
+
+/* Display a ROSE socket address. */
+static char *
+ ROSE_sprint(struct sockaddr *sap, int numeric)
+{
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return _("[NONE SET]");
+
+    return (ROSE_print(((struct sockaddr_rose *) sap)->srose_addr.rose_addr));
+}
+
+
+static int ROSE_input(int type, char *bufp, struct sockaddr *sap)
+{
+    char *ptr;
+    int i, o;
+
+    sap->sa_family = rose_aftype.af;
+    ptr = ((struct sockaddr_rose *) sap)->srose_addr.rose_addr;
+
+    /* Node address the correct length ? */
+    if (strlen(bufp) != 10) {
+       strcpy(ROSE_errmsg, _("Node address must be ten digits"));
+#ifdef DEBUG
+       fprintf(stderr, "rose_input(%s): %s !\n", ROSE_errmsg, orig);
+#endif
+       errno = EINVAL;
+       return (-1);
+    }
+    /* Ok, lets set it */
+    for (i = 0, o = 0; i < 5; i++) {
+       o = i * 2;
+       ptr[i] = (((bufp[o] - '0') << 4) | (bufp[o + 1] - '0'));
+    }
+
+    /* All done. */
+#ifdef DEBUG
+    fprintf(stderr, "rose_input(%s): ", orig);
+    for (i = 0; i < sizeof(rose_address); i++)
+       fprintf(stderr, "%02X ", sap->sa_data[i] & 0377);
+    fprintf(stderr, "\n");
+#endif
+
+    return (0);
+}
+
+
+/* Display an error message. */
+static void ROSE_herror(char *text)
+{
+    if (text == NULL)
+       fprintf(stderr, "%s\n", ROSE_errmsg);
+    else
+       fprintf(stderr, "%s: %s\n", text, ROSE_errmsg);
+}
+
+
+static int ROSE_hinput(char *bufp, struct sockaddr *sap)
+{
+    if (ROSE_input(0, bufp, sap) < 0)
+       return (-1);
+    sap->sa_family = ARPHRD_ROSE;
+    return (0);
+}
+
+struct hwtype rose_hwtype =
+{
+    "rose", NULL, /*"AMPR ROSE", */ ARPHRD_ROSE, 10,
+    ROSE_print, ROSE_hinput, NULL
+};
+
+struct aftype rose_aftype =
+{
+    "rose", NULL, /*"AMPR ROSE", */ AF_ROSE, 10,
+    ROSE_print, ROSE_sprint, ROSE_input, ROSE_herror,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/net/rose"
+};
+
+#endif                         /* HAVE_xxROSE */
diff --git a/lib/rose_gr.c b/lib/rose_gr.c
new file mode 100644 (file)
index 0000000..cf0a60a
--- /dev/null
@@ -0,0 +1,68 @@
+
+/*
+ * lib/rose_gr.c      This file contains an implementation of the "ROSE"
+ *                      route print support functions.
+ *
+ * Version:     $Id: rose_gr.c,v 1.4 1999/01/05 20:54:07 philip Exp $
+ *
+ * Author:      Terry Dawson, VK2KTJ, <terry@perf.no.itg.telstra.com.au>
+ *              based on ax25_gr.c by:
+ *              Bernd Eckenfels, <ecki@lina.inka.de>
+ *              Copyright 1999 Bernd Eckenfels, Germany
+ *              base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFROSE
+#if 0
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/rose.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>                /* ARPHRD_ROSE */
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+int ROSE_rprint(int options)
+{
+    FILE *f = NULL;
+    char buffer[256];
+    int use;
+
+    f=fopen(_PATH_PROCNET_ROSE_ROUTE, "r");
+    if (f == NULL) {
+       perror(_PATH_PROCNET_ROSE_ROUTE);
+       printf(_("ROSE not configured in this system.\n"));     /* xxx */
+       return 1;
+    }
+    printf(_("Kernel ROSE routing table\n"));
+    printf(_("Destination  Iface    Use\n"));
+    fgets(buffer, 256, f);
+    while (fgets(buffer, 256, f)) {
+       buffer[9] = 0;
+       buffer[14] = 0;
+       use = atoi(buffer + 15);
+       printf("%-9s    %-5s  %5d\n",
+              buffer, buffer + 10, use);
+    }
+    fclose(f);
+    return 0;
+}
+
+#endif                         /* HAVE_AFROSE */
diff --git a/lib/setroute.c b/lib/setroute.c
new file mode 100644 (file)
index 0000000..9ea1a4d
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * lib/setroute.c     This file contains a small interface function to
+ *                      use the AF specific input routine for the routing
+ *                      table.
+ *
+ * NET-LIB      A collection of functions used from the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system. (net-tools, net-drivers)
+ *
+ * Version:     $Id: setroute.c,v 1.4 2000/05/20 13:38:10 pb Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels <net-tools@lina.inka.de>
+ *              Copyright 1999 Bernd Eckenfels, Germany
+ *
+ * Modifications:
+ *
+ *960221 {0.01} Bernd Eckenfels:        generated from getroute.c
+ *960413 {0.02} Bernd Eckenfels:        new RTACTION support
+ *960809        Frank Strauss:          INET6
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include <stdio.h>
+#include <string.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+
+extern struct aftype unspec_aftype;
+extern struct aftype unix_aftype;
+extern struct aftype inet_aftype;
+extern struct aftype inet6_aftype;
+extern struct aftype ax25_aftype;
+extern struct aftype netrom_aftype;
+extern struct aftype ipx_aftype;
+extern struct aftype ddp_aftype;
+extern struct aftype x25_aftype;
+
+void setroute_init(void)
+{
+#if HAVE_AFINET
+    inet_aftype.rinput = INET_rinput;
+#endif
+#if HAVE_AFINET6
+    inet6_aftype.rinput = INET6_rinput;
+#endif
+#if HAVE_AFNETROM
+    netrom_aftype.rinput = NETROM_rinput;
+#endif
+#if HAVE_AFIPX
+    ipx_aftype.rinput = IPX_rinput;
+#endif
+#if HAVE_AFX25
+    x25_aftype.rinput = X25_rinput;
+#endif
+#if 0
+#if HAVE_AFAX25
+    ax25_aftype.rinput = AX25_rinput;
+#endif
+#if HAVE_AFATALK
+    ddp_aftype.rinput = DDP_rinput;
+#endif
+#endif
+}
+
+
+int route_edit(int action, const char *afname, int options, char **argv)
+{
+    struct aftype *ap;
+
+    ap = get_aftype(afname);
+
+    if (!ap) {
+       fprintf(stderr, _("Address family `%s' not supported.\n"), afname);
+       return (E_OPTERR);
+    }
+    if (!ap->rinput) {
+       fprintf(stderr, _("No routing for address family `%s'.\n"), ap->name);
+       return (E_OPTERR);
+    }
+    return (ap->rinput(action, options, argv));
+}
diff --git a/lib/sit.c b/lib/sit.c
new file mode 100644 (file)
index 0000000..ebb0123
--- /dev/null
+++ b/lib/sit.c
@@ -0,0 +1,47 @@
+/*
+ * lib/sit.c  This file contains the SIT HW-type support.
+ *
+ * Version:    $Id: sit.c,v 1.5 2000/03/05 16:14:08 ecki Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              Based on slip.c, modified by Frank Strauss, Aug 1996
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWSIT
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+#ifndef ARPHRD_SIT
+#warning "No definition of ARPHRD_SIT in <net/if_arp.h>, using private value 776"
+#define ARPHRD_SIT 776
+#endif
+
+struct hwtype sit_hwtype =
+{
+    "sit", NULL, /*"IPv6-in-IPv4", */ ARPHRD_SIT, 0,
+    NULL, NULL, NULL, 0
+};
+
+#endif                         /* HAVE_HWSIT */
diff --git a/lib/slip.c b/lib/slip.c
new file mode 100644 (file)
index 0000000..3f9d0d0
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * lib/slip.c This file contains the SLIP HW-type support.
+ *
+ * Version:     $Id: slip.c,v 1.4 1999/09/27 11:00:49 philip Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              Modified by Alan Cox, May 94 to cover NET-3
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWSLIP
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+
+struct hwtype slip_hwtype =
+{
+    "slip", NULL, /*"Serial Line IP", */ ARPHRD_SLIP, 0,
+    NULL, NULL, NULL
+};
+struct hwtype cslip_hwtype =
+{
+    "cslip", NULL, /*"VJ Serial Line IP", */ ARPHRD_CSLIP, 0,
+    NULL, NULL, NULL
+};
+struct hwtype slip6_hwtype =
+{
+    "slip6", NULL, /*"6-bit Serial Line IP", */ ARPHRD_SLIP6, 0,
+    NULL, NULL, NULL
+};
+struct hwtype cslip6_hwtype =
+{
+    "cslip6", NULL, /*"VJ 6-bit Serial Line IP", */ ARPHRD_CSLIP6, 0,
+    NULL, NULL, NULL
+};
+struct hwtype adaptive_hwtype =
+{
+    "adaptive", NULL, /*"Adaptive Serial Line IP", */ ARPHRD_ADAPT, 0,
+    NULL, NULL, NULL
+};
+#endif                         /* HAVE_HWSLIP */
diff --git a/lib/slip_ac.c b/lib/slip_ac.c
new file mode 100644 (file)
index 0000000..c48937b
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * lib/slip_ac.c      This file contains the activation for the
+ *                      SLIP line disciplines, called from activate_ld().
+ *
+ * Version:     $Id: slip_ac.c,v 1.3 1998/11/15 20:12:20 freitag Exp $
+ *
+ * Author:      Bernd 'eckes' Eckenfels
+ *              Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              Modified by Alan Cox, May 94 to cover NET-3
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWSLIP
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+
+/* Set the line discipline of a terminal line. */
+static int SLIP_set_disc(int fd, int disc)
+{
+    if (ioctl(fd, TIOCSETD, &disc) < 0) {
+       fprintf(stderr, "SLIP_set_disc(%d): %s\n", disc, strerror(errno));
+       return (-errno);
+    }
+    return (0);
+}
+
+
+/* Set the encapsulation type of a terminal line. */
+static int SLIP_set_encap(int fd, int encap)
+{
+    if (ioctl(fd, SIOCSIFENCAP, &encap) < 0) {
+       fprintf(stderr, "SLIP_set_encap(%d): %s\n", encap, strerror(errno));
+       return (-errno);
+    }
+    return (0);
+}
+
+
+/* Start the SLIP encapsulation on the file descriptor. */
+int SLIP_activate(int fd)
+{
+    if (SLIP_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (SLIP_set_encap(fd, 0) < 0)
+       return (-1);
+    return (0);
+}
+
+
+/* Start the VJ-SLIP encapsulation on the file descriptor. */
+int CSLIP_activate(int fd)
+{
+    if (SLIP_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (SLIP_set_encap(fd, 1) < 0)
+       return (-1);
+    return (0);
+}
+
+
+/* Start the SLIP-6 encapsulation on the file descriptor. */
+int SLIP6_activate(int fd)
+{
+    if (SLIP_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (SLIP_set_encap(fd, 2) < 0)
+       return (-1);
+    return (0);
+}
+
+
+/* Start the VJ-SLIP-6 encapsulation on the file descriptor. */
+int CSLIP6_activate(int fd)
+{
+    if (SLIP_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (SLIP_set_encap(fd, 3) < 0)
+       return (-1);
+    return (0);
+}
+
+
+/* Start adaptive encapsulation on the file descriptor. */
+int ADAPTIVE_activate(int fd)
+{
+    if (SLIP_set_disc(fd, N_SLIP) < 0)
+       return (-1);
+    if (SLIP_set_encap(fd, 8) < 0)
+       return (-1);
+    return (0);
+}
+#endif                         /* HAVE_HWSLIP */
diff --git a/lib/sockets.c b/lib/sockets.c
new file mode 100644 (file)
index 0000000..737a8f6
--- /dev/null
@@ -0,0 +1,65 @@
+/* sockets.c. Rewriten by Andi Kleen. Subject to the GPL. */
+
+/* philb 14/11/98: we now stash the socket file descriptor inside
+   the `aftype' structure rather than keeping it in a pile of separate
+   variables.  This is necessary so that "ifconfig eth0 broadcast ..."
+   issues ioctls to the right socket for the address family in use;
+   picking one at random doesn't always work.  */
+
+#include <sys/socket.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "config.h"
+#include "sockets.h"
+#include "intl.h"
+#include "util.h"
+#include "net-support.h"
+
+int skfd = -1;                 /* generic raw socket desc.     */
+
+int sockets_open(int family)
+{
+    struct aftype **aft;
+    int sfd = -1;
+    static int force = -1;
+
+    if (force < 0) {
+       force = 0;
+       if (kernel_version() < KRELEASE(2, 1, 0))
+           force = 1;
+       if (access("/proc/net", R_OK))
+           force = 1;
+    }
+    for (aft = aftypes; *aft; aft++) {
+       struct aftype *af = *aft;
+       int type = SOCK_DGRAM;
+       if (af->af == AF_UNSPEC)
+           continue;
+       if (family && family != af->af)
+           continue;
+       if (af->fd != -1) {
+           sfd = af->fd;
+           continue;
+       }
+       /* Check some /proc file first to not stress kmod */
+       if (!family && !force && af->flag_file) {
+           if (access(af->flag_file, R_OK))
+               continue;
+       }
+#if HAVE_AFNETROM
+       if (af->af == AF_NETROM)
+           type = SOCK_SEQPACKET;
+#endif
+#if HAVE_AFX25
+       if (af->af == AF_X25)
+           type = SOCK_SEQPACKET;
+#endif
+       af->fd = socket(af->af, type, 0);
+       if (af->fd >= 0)
+           sfd = af->fd;
+    }
+    if (sfd < 0)
+       fprintf(stderr, _("No usable address families found.\n"));
+    return sfd;
+}
diff --git a/lib/strip.c b/lib/strip.c
new file mode 100644 (file)
index 0000000..fd396ba
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * lib/strip.c This file contains an implementation of the STRIP
+ *             support functions.
+ *
+ * Version:    strip.c 1.20 1999/04/22 eswierk
+ *
+ * Author:     Stuart Cheshire <cheshire@cs.stanford.edu>
+ *
+ *             This program is free software; you can redistribute it
+ *             and/or  modify it under  the terms of  the GNU General
+ *             Public  License as  published  by  the  Free  Software
+ *             Foundation;  either  version 2 of the License, or  (at
+ *             your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWSTRIP
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/types.h>
+#include <linux/if_strip.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "util.h"
+#include "intl.h"
+
+
+extern struct hwtype strip_hwtype;
+
+static char *
+pr_strip(unsigned char *ptr)
+{
+  static char buff[64];
+  if(ptr[1])
+      sprintf(buff, "%02x-%02x%02x-%02x%02x", *(ptr+1), *(ptr+2), *(ptr+3),
+          *(ptr+4), *(ptr+5));
+   else
+      sprintf(buff, "%02x%02x-%02x%02x", *(ptr+2), *(ptr+3), *(ptr+4),
+         *(ptr+5));
+  return buff;
+}
+
+static int
+in_strip(char *bufp, struct sockaddr *sap)
+{
+  int i,i0;
+  MetricomAddress *haddr = (MetricomAddress *) (sap->sa_data);
+
+
+  sap->sa_family = strip_hwtype.type;
+
+  /* figure out what the device-address should be */
+  i0 = i = (bufp[0] == '*') ? 1 : 0;
+
+  while (bufp[i] && (bufp[i] != '-'))
+    i++;
+
+  if (bufp[i] != '-')
+    return -1;
+
+  if(i-i0 == 2)
+  {
+     haddr->c[1] = strtol(&bufp[i0], 0, 16);
+     i++;
+     if(bufp[i] == 0) return -1;
+  }else{
+     haddr->c[1] = 0;
+     i=i0;
+  }
+  haddr->c[2] = strtol(&bufp[i], 0, 16) >> 8;
+  haddr->c[3] = strtol(&bufp[i], 0, 16) & 0xFF;
+
+  while (bufp[i] && (bufp[i] != '-'))
+    i++;
+
+  if (bufp[i] != '-')
+    return -1;
+
+  haddr->c[4] = strtol(&bufp[i+1], 0, 16) >> 8;
+  haddr->c[5] = strtol(&bufp[i+1], 0, 16) & 0xFF;
+  haddr->c[0] = 0;
+
+  return 0;
+}
+
+
+
+/* Start the STRIP encapsulation on the file descriptor. */
+static int do_strip(int fd)
+       {
+       int disc = N_STRIP;
+       if (ioctl(fd, TIOCSETD, &disc) < 0)
+               {
+               fprintf(stderr, "STRIP_set_disc(%d): %s\n", disc, strerror(errno));
+               return(-errno);
+               }
+       return(0);
+       }
+
+struct hwtype strip_hwtype = {
+  "strip", "Metricom Starmode IP", ARPHRD_METRICOM, sizeof(MetricomAddress),
+  pr_strip, in_strip, do_strip, 0
+};
+
+#endif /* HAVE_HWSTRIP */
diff --git a/lib/tr.c b/lib/tr.c
new file mode 100644 (file)
index 0000000..8d86aa7
--- /dev/null
+++ b/lib/tr.c
@@ -0,0 +1,136 @@
+/*
+ * lib/tr.c   This file contains an implementation of the "Tokenring"
+ *              support functions.
+ *
+ * Version:     $Id: tr.c,v 1.8 2000/02/02 08:56:30 freitag Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_HWTR
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/if_tr.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+
+extern struct hwtype tr_hwtype;
+
+static char *pr_tr(unsigned char *ptr)
+{
+    static char buff[64];
+
+    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)
+       );
+    return (buff);
+}
+
+
+static int in_tr(char *bufp, struct sockaddr *sap)
+{
+    unsigned char *ptr;
+    char c, *orig;
+    int i, val;
+
+    sap->sa_family = tr_hwtype.type;
+    ptr = sap->sa_data;
+
+    i = 0;
+    orig = bufp;
+    while ((*bufp != '\0') && (i < TR_ALEN)) {
+       val = 0;
+       c = *bufp++;
+       if (isdigit(c))
+           val = c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val = c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val = c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       val <<= 4;
+       c = *bufp++;
+       if (isdigit(c))
+           val |= c - '0';
+       else if (c >= 'a' && c <= 'f')
+           val |= c - 'a' + 10;
+       else if (c >= 'A' && c <= 'F')
+           val |= c - 'A' + 10;
+       else {
+#ifdef DEBUG
+           fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig);
+#endif
+           errno = EINVAL;
+           return (-1);
+       }
+       *ptr++ = (unsigned char) (val & 0377);
+       i++;
+
+       /* We might get a semicolon here - not required. */
+       if (*bufp == ':') {
+           if (i == TR_ALEN) {
+#ifdef DEBUG
+               fprintf(stderr, _("in_tr(%s): trailing : ignored!\n"),
+                       orig)
+#endif
+                   ;           /* nothing */
+           }
+           bufp++;
+       }
+    }
+
+    /* That's it.  Any trailing junk? */
+    if ((i == TR_ALEN) && (*bufp != '\0')) {
+#ifdef DEBUG
+       fprintf(stderr, _("in_tr(%s): trailing junk!\n"), orig);
+       errno = EINVAL;
+       return (-1);
+#endif
+    }
+#ifdef DEBUG
+    fprintf(stderr, "in_tr(%s): %s\n", orig, pr_tr(sap->sa_data));
+#endif
+
+    return (0);
+}
+
+
+struct hwtype tr_hwtype =
+{
+    "tr", NULL /* "16/4 Mbps Token Ring" */, ARPHRD_IEEE802, TR_ALEN,
+    pr_tr, in_tr, NULL
+};
+#ifdef ARPHRD_IEEE802_TR
+struct hwtype tr_hwtype1 =
+{
+    "tr", NULL /* "16/4 Mbps Token Ring" */, ARPHRD_IEEE802_TR, TR_ALEN,
+    pr_tr, in_tr, NULL
+};
+#endif
+
+
+#endif                         /* HAVE_HWTR */
diff --git a/lib/tunnel.c b/lib/tunnel.c
new file mode 100644 (file)
index 0000000..19606c1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ *    Tunnel.c, Alan Cox 1995.
+ *
+ */
+
+#include "config.h"
+
+#if HAVE_HWTUNNEL
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if_arp.h>
+#include <linux/if_ether.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+
+extern struct hwtype ether_hwtype;
+
+static char *pr_tunnel(unsigned char *ptr)
+{
+    return ("");
+}
+
+
+static int in_tunnel(char *bufp, struct sockaddr *sap)
+{
+    return (-1);
+}
+
+
+struct hwtype tunnel_hwtype =
+{
+    "tunnel", NULL, /*"IPIP Tunnel", */ ARPHRD_TUNNEL, 0,
+    pr_tunnel, in_tunnel, NULL, 0
+};
+
+
+#endif                         /* HAVE_HWTUNNEL */
diff --git a/lib/unix.c b/lib/unix.c
new file mode 100644 (file)
index 0000000..fb4dcce
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * lib/unix.c This file contains the general hardware types.
+ *
+ * Version:     $Id: unix.c,v 1.6 1998/11/19 13:02:04 philip Exp $
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Copyright 1993 MicroWalt Corporation
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ */
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#if HAVE_AFUNIX
+#include <sys/un.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#include "intl.h"
+#include "util.h"
+
+
+/* Display an UNSPEC address. */
+static char *UNSPEC_print(unsigned char *ptr)
+{
+    static char buff[64];
+    char *pos;
+    unsigned int i;
+
+    pos = buff;
+    for (i = 0; i < sizeof(struct sockaddr); i++) {
+       pos += sprintf(pos, "%02X-", (*ptr++ & 0377));
+    }
+    buff[strlen(buff) - 1] = '\0';
+    return (buff);
+}
+
+
+/* Display an UNSPEC socket address. */
+static char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (UNSPEC_print(sap->sa_data));
+}
+
+
+#if HAVE_AFUNIX
+
+/* Display a UNIX domain address. */
+static char *UNIX_print(unsigned char *ptr)
+{
+    return (ptr);
+}
+
+
+/* Display a UNIX domain address. */
+static char *UNIX_sprint(struct sockaddr *sap, int numeric)
+{
+    static char buf[64];
+
+    if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+       return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf));
+    return (UNIX_print(sap->sa_data));
+}
+
+
+struct aftype unix_aftype =
+{
+    "unix", NULL, /*"UNIX Domain", */ AF_UNIX, 0,
+    UNIX_print, UNIX_sprint, NULL, NULL,
+    NULL, NULL, NULL,
+    -1,
+    "/proc/net/unix"
+};
+#endif                         /* HAVE_AFUNIX */
+
+
+struct aftype unspec_aftype =
+{
+    "unspec", NULL, /*"UNSPEC", */ AF_UNSPEC, 0,
+    UNSPEC_print, UNSPEC_sprint, NULL, NULL,
+    NULL,
+};
diff --git a/lib/util-ank.c b/lib/util-ank.c
new file mode 100644 (file)
index 0000000..43a7f1c
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ * utils.c
+ *
+ *             This program is free software; you can redistribute it and/or
+ *             modify it under the terms of the GNU General Public License
+ *             as published by the Free Software Foundation; either version
+ *             2 of the License, or (at your option) any later version.
+ *
+ * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ *
+ *
+ * Changes:
+ *
+ * Rani Assaf <rani@magic.metawire.com> 980929:        resolve addresses
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <fcntl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#include <resolv.h>
+
+#include "intl.h"
+#include "util-ank.h"
+
+#ifndef AF_INET6
+#define AF_INET6       10
+#endif
+
+int scan_number(char *arg, unsigned *val)
+{
+       unsigned long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtoul(arg, &ptr, 0);
+       if (!ptr || ptr == arg || *ptr || res > UINT_MAX)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_integer(int *val, char *arg, int base)
+{
+       long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtol(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > INT_MAX || res < INT_MIN)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_unsigned(unsigned *val, char *arg, int base)
+{
+       unsigned long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtoul(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > UINT_MAX)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_u32(__u32 *val, char *arg, int base)
+{
+       unsigned long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtoul(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > 0xFFFFFFFFUL)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_u16(__u16 *val, char *arg, int base)
+{
+       unsigned long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtoul(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > 0xFFFF)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_u8(__u8 *val, char *arg, int base)
+{
+       unsigned long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtoul(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > 0xFF)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_s16(__s16 *val, char *arg, int base)
+{
+       long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtol(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > 0x7FFF || res < -0x8000)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_s8(__s8 *val, char *arg, int base)
+{
+       long res;
+       char *ptr;
+
+       if (!arg || !*arg)
+               return -1;
+       res = strtol(arg, &ptr, base);
+       if (!ptr || ptr == arg || *ptr || res > 0x7F || res < -0x80)
+               return -1;
+       *val = res;
+       return 0;
+}
+
+int get_addr_1(inet_prefix *addr, char *name, int family)
+{
+       char *cp;
+       unsigned char *ap = (unsigned char*)addr->data;
+       int i;
+
+       memset(addr, 0, sizeof(*addr));
+
+       if (strcmp(name, "default") == 0 || strcmp(name, "any") == 0) {
+               addr->family = family;
+               addr->bytelen = (family == AF_INET6 ? 16 : 4);
+               addr->bitlen = -1;
+               return 0;
+       }
+
+       if (strchr(name, ':')) {
+               addr->family = AF_INET6;
+               if (family != AF_UNSPEC && family != AF_INET6)
+                       return -1;
+               if (inet_pton(AF_INET6, name, addr->data) <= 0)
+                       return -1;
+               addr->bytelen = 16;
+               addr->bitlen = -1;
+               return 0;
+       }
+
+       addr->family = AF_INET;
+       if (family != AF_UNSPEC && family != AF_INET)
+               return -1;
+       addr->bytelen = 4;
+       addr->bitlen = -1;
+       for (cp=name, i=0; *cp; cp++) {
+               if (*cp <= '9' && *cp >= '0') {
+                       ap[i] = 10*ap[i] + (*cp-'0');
+                       continue;
+               }
+               if (*cp == '.' && ++i <= 3)
+                       continue;
+               return -1;
+       }
+       return 0;
+}
+
+int get_prefix_1(inet_prefix *dst, char *arg, int family)
+{
+       int err;
+       unsigned plen;
+       char *slash;
+
+       memset(dst, 0, sizeof(*dst));
+
+       if (strcmp(arg, "default") == 0 || strcmp(arg, "any") == 0) {
+               dst->family = family;
+               dst->bytelen = 0;
+               dst->bitlen = 0;
+               return 0;
+       }
+
+       slash = strchr(arg, '/');
+       if (slash)
+               *slash = 0;
+       err = get_addr_1(dst, arg, family);
+       if (err == 0) {
+               dst->bitlen = (dst->family == AF_INET6 ? 128 : 32);
+               if (slash) {
+                       if (scan_number(slash+1, &plen) || plen > dst->bitlen) {
+                               err = -1;
+                               goto done;
+                       }
+                       dst->bitlen = plen;
+               }
+       }
+done:
+       if (slash)
+               *slash = '/';
+       return err;
+}
+
+int get_addr(inet_prefix *dst, char *arg, int family)
+{
+       if (get_addr_1(dst, arg, family)) {
+               fprintf(stderr, _("ip: %s is invalid inet address\n"), arg);
+               exit(1);
+       }
+       return 0;
+}
+
+int get_prefix(inet_prefix *dst, char *arg, int family)
+{
+       if (get_prefix_1(dst, arg, family)) {
+               fprintf(stderr, _("ip: %s is invalid inet prefix\n"), arg);
+               exit(1);
+       }
+       return 0;
+}
+
+__u32 get_addr32(char *name)
+{
+       inet_prefix addr;
+       if (get_addr_1(&addr, name, AF_INET)) {
+               fprintf(stderr, _("ip: %s is invalid IPv4 address\n"), name);
+               exit(1);
+       }
+       return addr.data[0];
+}
+
+void invarg(char *msg)
+{
+       fprintf(stderr, _("ip: argument is wrong: %s\n"), msg);
+       exit(1);
+}
+
+int matches(char *cmd, char *pattern)
+{
+       int len = strlen(cmd);
+       if (len > strlen(pattern))
+               return -1;
+       return memcmp(pattern, cmd, len);
+}
+
+int inet_addr_match(inet_prefix *a, inet_prefix *b, int bits)
+{
+       __u32 *a1 = a->data;
+       __u32 *a2 = b->data;
+       int words = bits >> 0x05;
+
+       bits &= 0x1f;
+
+       if (words)
+               if (memcmp(a1, a2, words << 2))
+                       return -1;
+
+       if (bits) {
+               __u32 w1, w2;
+               __u32 mask;
+
+               w1 = a1[words];
+               w2 = a2[words];
+
+               mask = htonl((0xffffffff) << (0x20 - bits));
+
+               if ((w1 ^ w2) & mask)
+                       return 1;
+       }
+
+       return 0;
+}
+
+const char *format_host(int af, void *addr, __u8 *abuf, int alen)
+{
+#ifdef RESOLVE_HOSTNAMES
+       if (resolve_hosts) {
+               int addrlen = 0;
+               struct hostent *h_ent;
+               switch (af) {
+               case AF_INET:
+                       addrlen = 4;
+                       break;
+               case AF_INET6:
+                       addrlen = 16;
+                       break;
+               }
+               if (addrlen &&
+                   (h_ent = gethostbyaddr(addr, addrlen, af)) != NULL) {
+                       snprintf(abuf, alen-1, "%s", h_ent->h_name);
+                       return abuf;
+               }
+       }
+#endif
+       return inet_ntop(af, addr, abuf, alen);
+}
diff --git a/lib/util.c b/lib/util.c
new file mode 100644 (file)
index 0000000..ac932f4
--- /dev/null
@@ -0,0 +1,51 @@
+/* Copyright 1998 by Andi Kleen. Subject to the GPL. */ 
+/* $Id: util.c,v 1.4 1998/11/17 15:17:02 freitag Exp $ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/utsname.h>
+
+#include "util.h"
+
+
+static void oom(void)
+{
+    fprintf(stderr, "out of virtual memory\n");
+    exit(2);
+}
+
+void *xmalloc(size_t sz)
+{
+    void *p = calloc(sz, 1);
+    if (!p)
+       oom();
+    return p;
+}
+
+void *xrealloc(void *oldp, size_t sz)
+{
+    void *p = realloc(oldp, sz);
+    if (!p)
+       oom();
+    return p;
+}
+
+int kernel_version(void)
+{
+    struct utsname uts;
+    int major, minor, patch;
+
+    if (uname(&uts) < 0)
+       return -1;
+    if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) != 3)
+       return -1;
+    return KRELEASE(major, minor, patch);
+}
+
+
+/* Like strncpy but make sure the resulting string is always 0 terminated. */  
+char *safe_strncpy(char *dst, const char *src, size_t size)
+{   
+    dst[size-1] = '\0';
+    return strncpy(dst,src,size-1);   
+}
diff --git a/lib/util.h b/lib/util.h
new file mode 100644 (file)
index 0000000..6acb158
--- /dev/null
@@ -0,0 +1,16 @@
+#include <stddef.h>
+
+void *xmalloc(size_t sz);
+void *xrealloc(void *p, size_t sz);
+
+#define new(p) ((p) = xmalloc(sizeof(*(p))))
+
+
+int kernel_version(void);
+#define KRELEASE(maj,min,patch) ((maj) * 10000 + (min)*1000 + (patch))
+
+
+int nstrcmp(const char *, const char *);
+
+char *safe_strncpy(char *dst, const char *src, size_t size); 
+
diff --git a/lib/x25.c b/lib/x25.c
new file mode 100644 (file)
index 0000000..1ffb569
--- /dev/null
+++ b/lib/x25.c
@@ -0,0 +1,164 @@
+/*
+ * lib/x25.c   This file contains an implementation of the "X.25"
+ *             support functions for the NET-3 base distribution.
+ *
+ * Version:    @(#)x25.c       1.00    08/15/98
+ *
+ * Author:     Stephane Fillod, <sfillod@charybde.gyptis.frmug.org>
+ *             based on ax25.c by:
+ *             Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *             Copyright 1993 MicroWalt Corporation
+ *
+ *             This program is free software; you can redistribute it
+ *             and/or  modify it under  the terms of  the GNU General
+ *             Public  License as  published  by  the  Free  Software
+ *             Foundation;  either  version 2 of the License, or  (at
+ *             your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFX25 || HAVE_HWX25
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <linux/x25.h>
+#include <net/if_arp.h>                /* ARPHRD_X25 */
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+#include "net-support.h"
+#include "pathnames.h"
+#define  EXTERN
+#if 0
+#include "net-locale.h"
+#endif
+#include "intl.h"
+
+static char X25_errmsg[128];
+
+
+extern struct aftype x25_aftype;
+
+/* is in net/x25.h, not in the public header file linux/x25.h. Why?*/
+#ifndef X25_ADDR_LEN
+#define X25_ADDR_LEN 16
+#endif
+
+
+static char *
+X25_print(unsigned char *ptr)
+{
+  static char buff[X25_ADDR_LEN+1];
+
+  strncpy(buff, ptr, X25_ADDR_LEN);
+  buff[X25_ADDR_LEN] = '\0';
+  return(buff);
+
+}
+
+
+/* Display an X.25 socket address. */
+static char *
+X25_sprint(struct sockaddr *sap, int numeric)
+{
+  if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
+    return( _("[NONE SET]"));
+  return(X25_print(((struct sockaddr_x25 *)sap)->sx25_addr.x25_addr));
+}
+
+
+/*
+ * return the sigdigits of the address
+ */
+static int
+X25_input(int type, char *bufp, struct sockaddr *sap)
+{
+  unsigned char *ptr;
+  char *p;
+  unsigned int sigdigits;
+
+  sap->sa_family = x25_aftype.af;
+  ptr = ((struct sockaddr_x25 *)sap)->sx25_addr.x25_addr;
+
+
+  /* Address the correct length ? */
+  if (strlen(bufp)>18) {
+        strcpy(X25_errmsg, _("Address can't exceed eighteen digits with sigdigits"));
+#ifdef DEBUG
+        fprintf(stderr, "x25_input(%s): %s !\n", X25_errmsg, orig);
+#endif
+        errno = EINVAL;
+        return(-1);
+  }
+
+
+  if ((p = strchr(bufp, '/')) != NULL) {
+        *p = '\0';
+        sigdigits = atoi(p + 1);
+  } else {
+        sigdigits = strlen(bufp);
+  }
+
+  if (strlen(bufp) < 1 || strlen(bufp) > 15 || sigdigits > strlen(bufp)) {
+       *p = '/';
+        strcpy(X25_errmsg, _("Invalid address"));
+#ifdef DEBUG
+        fprintf(stderr, "x25_input(%s): %s !\n", X25_errmsg, orig);
+#endif
+        errno = EINVAL;
+        return(-1);
+  }
+
+  strncpy(ptr, bufp, sigdigits+1);
+
+  /* All done. */
+#ifdef DEBUG
+  fprintf(stderr, "x25_input(%s): ", orig);
+  for (i = 0; i < sizeof(x25_address); i++)
+       fprintf(stderr, "%02X ", sap->sa_data[i] & 0377);
+  fprintf(stderr, "\n");
+#endif
+
+  return sigdigits;
+}
+
+
+/* Display an error message. */
+static void
+X25_herror(char *text)
+{
+  if (text == NULL) fprintf(stderr, "%s\n", X25_errmsg);
+    else fprintf(stderr, "%s: %s\n", text, X25_errmsg);
+}
+
+
+static int
+X25_hinput(char *bufp, struct sockaddr *sap)
+{
+  if (X25_input(0, bufp, sap) < 0) return(-1);
+  sap->sa_family = ARPHRD_X25;
+  return(0);
+}
+
+
+struct hwtype x25_hwtype = {
+  "x25",       NULL, /*"CCITT X.25",*/         ARPHRD_X25,     X25_ADDR_LEN,
+  X25_print,   X25_hinput,     NULL
+};
+
+struct aftype x25_aftype =
+{   
+    "x25", NULL, /*"CCITT X.25", */ AF_X25, X25_ADDR_LEN,
+    X25_print, X25_sprint, X25_input, X25_herror,
+    X25_rprint, X25_rinput, NULL /* getmask */,
+    -1,
+    "/proc/net/x25"
+};
+
+
+#endif /* HAVE_xxX25 */
diff --git a/lib/x25_gr.c b/lib/x25_gr.c
new file mode 100644 (file)
index 0000000..187fc05
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * lib/x25_gr.c        This file contains an implementation of the "X.25"
+ *             route print support functions.
+ *
+ * Version:    lib/x25_gr.c    1.00    08/15/98
+ *
+ * Author:     Stephane Fillod, <sfillod@charybde.gyptis.frmug.org>
+ *             based on ax25_gr.c by:
+ *             Bernd Eckenfels, <ecki@lina.inka.de>
+ *             Copyright 1999 Bernd Eckenfels, Germany
+ *             base on Code from Jonathan Naylor <jsn@Cs.Nott.AC.UK>
+ *
+ *             This program is free software; you can redistribute it
+ *             and/or  modify it under  the terms of  the GNU General
+ *             Public  License as  published  by  the  Free  Software
+ *             Foundation;  either  version 2 of the License, or  (at
+ *             your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFX25
+#if 0
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <linux/x25.h>
+#include <linux/if_arp.h>      /* ARPHRD_X25 */
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <termios.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include "net-support.h"
+#include "pathnames.h"
+#define  EXTERN
+#if 0
+#include "net-locale.h"
+#endif
+#include "intl.h"
+
+/* is in net/x25.h, not in the public header file linux/x25.h. Why?*/
+#ifndef X25_ADDR_LEN
+#define X25_ADDR_LEN 16
+#endif
+
+int X25_rprint(int options)
+{
+       FILE *f=fopen(_PATH_PROCNET_X25_ROUTE, "r");
+       char buffer[256];
+       char *p;
+       int  digits;
+
+       if(f==NULL)
+       {
+               printf( _("X.25 not configured in this system.\n")); /* xxx */
+               return 1;
+       }
+       printf( _("Kernel X.25 routing table\n")); /* xxx */
+       printf( _("Destination          Iface\n")); /* xxx */
+       fgets(buffer,256,f);
+       while(fgets(buffer,256,f))
+       {
+               p = strchr(buffer,'\n');
+               if (p)
+                       *p=0;
+
+               buffer[24]=0;
+               buffer[35]=0;
+               digits=atoi(buffer+17);
+               if (digits < 0 || digits > 15)
+                       digits=15;
+               buffer[digits]=0;
+               if (digits == 0)
+                       printf("*                    %-5s\n", buffer+25);
+               else
+                       printf("%s/%*d   %-5s\n",
+                               buffer,digits-17,digits,buffer+25);
+       }
+       fclose(f);
+       return 0;
+}
+
+#endif /* HAVE_AFX25 */
diff --git a/lib/x25_sr.c b/lib/x25_sr.c
new file mode 100644 (file)
index 0000000..8637c98
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * lib/x25_sr.c        This file contains an implementation of the "X.25"
+ *             route change support functions.
+ *
+ * Version:    @(#)x25_sr.c    1.00    08/15/98
+ *
+ * Author:     Stephane Fillod, <sfillod@charybde.gyptis.frmug.org>
+ *             based on inet_sr.c
+ *
+ *             This program is free software; you can redistribute it
+ *             and/or  modify it under  the terms of  the GNU General
+ *             Public  License as  published  by  the  Free  Software
+ *             Foundation;  either  version 2 of the License, or  (at
+ *             your option) any later version.
+ */
+#include "config.h"
+
+#if HAVE_AFX25
+#include <asm/types.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <linux/x25.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include "version.h"
+#include "net-support.h"
+#include "pathnames.h"
+#define  EXTERN
+#if 0
+#include "net-locale.h"
+#endif
+#include "intl.h"
+
+#include "net-features.h"
+
+extern     struct aftype   x25_aftype;
+
+static int skfd = -1;
+
+
+static int usage(void)
+{
+  fprintf(stderr,"Usage: x25_route [-v] del Target[/mask] [dev] If\n");
+  fprintf(stderr,"       x25_route [-v] add Target[/mask] [dev] If\n");
+  return(E_USAGE);
+}
+
+
+static int X25_setroute(int action, int options, char **args)
+{
+  struct x25_route_struct rt;
+  struct sockaddr_x25 sx25;
+  char target[128];
+  signed int sigdigits;
+
+  if (*args == NULL)
+       return(usage());
+
+  strcpy(target, *args++);
+
+  /* Clean out the x25_route_struct structure. */
+  memset((char *) &rt, 0, sizeof(struct x25_route_struct));
+
+
+  if ((sigdigits = x25_aftype.input(0, target, (struct sockaddr *)&sx25)) < 0) {
+       x25_aftype.herror(target);
+       return (1);
+  }
+  rt.sigdigits=sigdigits;
+
+  /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
+  memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
+
+  while (*args) {
+       if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
+               args++;
+               if (!*args)
+                       return(usage());
+       } else
+               if (args[1])
+                       return(usage());
+       if (rt.device[0])
+               return(usage());
+       strcpy(rt.device, *args);
+       args++;
+  }
+  if (rt.device[0]=='\0')
+       return(usage());
+
+  /* sanity checks.. */
+       if (rt.sigdigits > 15) {
+               fprintf(stderr, _("route: bogus netmask %d\n"), rt.sigdigits);
+               return(E_OPTERR);
+       }
+
+       if (rt.sigdigits > strlen(rt.address.x25_addr)) {
+               fprintf(stderr, _("route: netmask doesn't match route address\n"));
+               return(E_OPTERR);
+       }
+
+  /* Create a socket to the X25 kernel. */
+  if ((skfd = socket(AF_X25, SOCK_SEQPACKET, 0)) < 0) {
+       perror("socket");
+       return(E_SOCK);
+  }
+  
+  /* Tell the kernel to accept this route. */
+  if (action==RTACTION_DEL) {
+       if (ioctl(skfd, SIOCDELRT, &rt) < 0) {
+               perror("SIOCDELRT");
+               close(skfd);
+               return(E_SOCK);
+       }
+  } else {
+       if (ioctl(skfd, SIOCADDRT, &rt) < 0) {
+               perror("SIOCADDRT");
+               close(skfd);
+               return(E_SOCK);
+       }
+  }
+
+  /* Close the socket. */
+  (void) close(skfd);
+  return(0);
+}
+
+int X25_rinput(int action, int options, char **args)
+{
+  if (action == RTACTION_FLUSH) {
+       fprintf(stderr,"Flushing `x25' routing table not supported\n");
+       return(usage());
+  }    
+  if (options & FLAG_CACHE) {
+       fprintf(stderr,"Modifying `x25' routing cache not supported\n");
+       return(usage());
+  }    
+  if ((*args == NULL) || (action == RTACTION_HELP))
+       return(usage());
+  
+  return(X25_setroute(action, options, args));
+}
+#endif /* HAVE_AFX25 */
diff --git a/man/Makefile b/man/Makefile
new file mode 100644 (file)
index 0000000..4ef1af8
--- /dev/null
@@ -0,0 +1,65 @@
+#
+# man/Makefile man/ Makefile for the net-tools Package
+#
+# NET-TOOLS    A collection of programs that form the base set of the
+#              NET-3 Networking Distribution for the LINUX operating
+#              system.
+#
+# Version:     Makefile 0.03 (2000-10-08)
+#
+# 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 :)
+#001008 {0.03}  Bernd Eckenfels:       RH patch for FHS (man page now in mandir)
+#
+#
+#      This program is free software; you can redistribute it
+#      and/or  modify it under  the terms of  the GNU General
+#      Public  License as  published  by  the  Free  Software
+#      Foundation;  either  version 2 of the License, or  (at
+#      your option) any later version.
+#
+
+INSTALL=install
+mandir=/usr/share/man
+
+-include ../config.make
+ifeq ($(I18N),1)
+LANGS=`ls -d * | grep -v Makefile`
+else
+LANGS=en_US
+endif
+
+all:
+
+clean:
+               rm -f DEADJOE *~ *.orig
+               rm -f */DEADJOE */*~ */*.orig
+
+clobber:       clean
+
+install:
+               LANGS=$(LANGS) ; \
+               for LANG in $$LANGS; do \
+                       cd $$LANG; \
+                       for SECTION in 1 5 8; do \
+                               if [ "$$LANG" = "en_US" ] ; then \
+                                       MAN_DIR=${BASEDIR}${mandir}/man$$SECTION; \
+                               else \
+                                       MAN_DIR=${BASEDIR}${mandir}/$$LANG/man$$SECTION; \
+                               fi ; \
+                               CMDS=`ls *.$$SECTION`; \
+                               [ -z "$$CMDS" ] && continue; \
+                               $(INSTALL) -d -m 755 $$MAN_DIR; \
+                               for CMD in $$CMDS; do \
+                                       $(INSTALL) -m 644 $$CMD $$MAN_DIR; \
+                               done; \
+                       done; \
+                       cd ..; \
+               done
+
+# End of man/Makefile.
diff --git a/man/de_DE/arp.8 b/man/de_DE/arp.8
new file mode 100644 (file)
index 0000000..debd879
--- /dev/null
@@ -0,0 +1,185 @@
+.TH ARP 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+.SH NAME
+arp \- Manipulation des ARP-Caches
+.SH SYNOPSIS
+.B arp 
+.RB [ \-vn ] 
+.RB [ "\-H Typ" ] 
+.RB [ "-i Schnittstelle" ] 
+.B -a 
+.RB [ Rechnername ]
+.PP
+.B arp 
+.RB [ \-v ]
+.RB [ "\-i if" ] 
+.B "\-d Rechnername"
+.RB [ pub ]
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H Typ" ] 
+.RB [ "\-i Schnittstelle" ] 
+.B -s Rechnername hw_adr
+.RB [ temp ] 
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H Typ" ] 
+.RB [ "\-i Interface" ] 
+.B -s Rechnername hw_adr
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H Typ" ] 
+.RB [ "\-i Schnittstelle" ] 
+.B -Ds Rechnername ifa
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-vnD ]
+.RB [ "\-H Typ" ] 
+.RB [ "-i Schnittstelle" ]
+.B -f [Dateiname]
+
+.SH BESCHREIBUNG
+.B Arp
+kann den ARP-Cache des Kernels auf verschiedene Arten manipulieren.  Die
+haupts\(:achliche Verwendung ist es Adresszuordnungseintr\(:age zu
+l\(:oschen und von Hand neue zu erzeugen.  Zum Zweck der Fehlersuche ist
+moeglich mit dem
+.B arp
+Programm den Inhalt des ARP-Caches vollst\(:andig auszugeben.
+.SH OPTIONEN
+.TP
+.B "\-v, \-\-verbose"
+Ausf\(:uhrlichere Ausgaben.
+.TP
+.B "\-n, \-\-numeric"
+macht numerische Adressausgaben anstatt zu versuche, den symbolischen Rechner-,
+Port- oder Benutzernamen zu ermitteln.
+.TP
+.B "\-H type, \-\-hw-type type"
+Beim Setzen oder Auslesen des ARP-Caches schr\(:ankt diese Option
+ein, auf welcher Klasse von Eintr\(:agen 
+.B arp
+operieren soll.  Der Standardwert dieses Arguments ist
+.B ether
+(d.h. Hardwarecode 0x01 f\(:ur IEEE 802.3 10Mbps Ethernet).
+Andere m\(:ogliche Werte sind Netzwerkstechnologien so wie z.B.
+.RB "ARCnet (" arcnet ")"
+,
+.RB "PROnet (" pronet ")"
+,
+.RB "AX.25 (" ax25 ")"
+and
+.RB "NET/ROM (" netrom ")."
+.TP
+.B "\-a [Rechnername], \-\-display [Rechnername]"
+Zeigt die Eintr\(:age der angegebenen Rechner an.  Wird kein
+.B hostname
+Argument verwendet, so werden alle Eintr\(:age aufgelistet.
+.TP
+.B "\-d Rechnername, \-\-delete Rechnername"
+Alle Eintr\(:age f\(:ur den angegebenen Host entfernen.  Dies kann z.B.
+benutzt werden, wenn ein System angehalten wird.
+.TP
+.B "\-D, \-\-use-device"
+Die Hardwareadresse der Netzwerksschnittstelle
+.B ifa
+verwenden.
+.TP
+.B "\-i If, \-\-device Schnittstelle"
+Eine Netzwerksschnittstelle ausw\(:ahlen.  Es werden nur Eintr\(:age
+f\(:ur die angegebene Schnittstelle ausgedruckt.  Beim Setzen von von
+permanenten oder tempor\(:aren Eintr\(:agen wird diese Schnittstelle mit
+dem Eintrag assoziiert.  Wird diese Option nicht verwendet, so versucht der
+Kernel auf Basis der Routentabelle eine Schnittstelle auszuw\(:ahlen.  F\(:ur
+.B pub
+Eintr\(:age ist die angegebene Schnittstelle diejenige, auf der ARP-Anfragen
+beantwortet werden.
+.br
+.B ANMERKUNG:
+Diese Schnittstelle mu\(ss eine andere sein als die, auf die die IP-Datagramme
+weitergeleitet werden.
+.TP
+.B "\-s Rechnername hw_addr, \-\-set Rechnername"
+Erzeugt manuel einen ARP Adresseintrag f\(:ur den Rechner
+.B Rechnername
+in dem die Hardwareadresse auf
+.B hw_addr
+gesetzt ist.  Das genaue Format der Hardwareadresse ist abh\(:angig von der
+Hardwareklasse aber f\(:ur die meisten Klassen kann man davon ausgehen, da\(ss
+die \(:ubliche Darstellung verwendet wird.  F\(:ur die Ethernetklasse sind
+dies sechs hexadezimale, von Doppelpunkten getrennte Bytes.  Beim Zuf\(:ugen
+von Proxy-ARP-Entr\(:agen (das sind die mit der gesetzten
+.BR pub lizieren
+Flagge) kann
+.B Netmaske
+f\(:ur ARP-Eintr\(:age f\(:ur ganze Subnetze angegeben werde.  Von dieser
+Praxis wird abgeraten.  Sie wird von \(:alteren Kerneln unterst\(:utzt, da
+sie gelegentlich n\(:utzlich ist.  Wird die
+If the
+.B temp
+Flagge nicht angegeben, so werden die erzeugten Eintr\(:age nicht dauerhaft
+in den ARP-Cache eingetragen.
+.br
+.B ANMERKUNG:
+Ab der Kernelversion 2.2.0 ist es nicht mehr m\(:oglich ARP-Eintr\(:age f\(:ur
+ganze Teilnetze zu erzeugen. Statt dessen wird automatisches Proxy ARP
+durchgef\(:uhrt, d.h. wenn eine Route existiert und Forwarding eingeschaltet
+ist wird automatisch ein tempor\(:arer Proxyarpeintrag erzeugt. 
+Siehe auch
+.BR arp (7)
+f\(:ur mehr Details.
+.TP
+.B "\-f Dateiname, \-\-file Dateiname"
+\(:Ahnlich der
+.B \-s
+Option, au\(sser, da\(ss diesmal die Adressinformation aus der Datei
+.B Dateiname
+verwendet wird.  Dies kann verwendet werden, wenn ARP-Eintr\(:age f\(:ur
+etliche Rechner erzeugt werden m\(:ussen.  Der Name dieser Datei ist oft
+.IR /etc/ethers , 
+aber dies ist nicht offizieil standardisiert. Wenn kein Dateinamen 
+angeben ist wird /etc/ethers benutzt.
+.sp 1
+Das Format der Datei ist einfach; es enth\(:alt nur ASCII-Textzeilen, die
+aus einem Rechnernamen und einer Hardwareadresse getrennt von einem
+Zwischenraum bestehen.  Zus\(:atzlich k\(:onnen die Flaggen
+.BR "pub" , " temp" " and" " netmask"
+angegeben werden.
+.LP
+\(:Uberall, wo
+.B Rechnername
+erwartet wird, kann auch eine
+.B "IP-Adresse"
+in Form eines durch Punkte getrennten Dezimalquadrupels angegeben werden.
+.P
+Aus Kompatiblit\(:atsgr\(:unden k\(:onnen Rechnername und die 
+Hardwareadresse auch vertauscht werden.
+.LP 
+Jeder vollst\(:andige Eintrag wird im ARP-Cache mit der
+.B C
+Flagge markiert. Permanente Eintr\(:age werden mit
+.B M
+und zu publizierende Eintr\(:age mit der 
+.B P
+Flagge.
+.SH DATEIEN
+.I /proc/net/arp,
+.br
+.I /etc/networks
+.br
+.I /etc/hosts
+.br
+.I /etc/ethers
+.SH SIEHE AUCH
+ethers(5), rarp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTOREN
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> mit vielen Verbesserungen vom
+Verwalter der Net-Tools Bernd Eckenfels <net-tools@lina.inka.de>.
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/dnsdomainname.1 b/man/de_DE/dnsdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/de_DE/domainname.1 b/man/de_DE/domainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/de_DE/ethers.5 b/man/de_DE/ethers.5
new file mode 100644 (file)
index 0000000..fd74bd3
--- /dev/null
@@ -0,0 +1,37 @@
+.\"
+.\" Original by ??
+.\"
+.\" German translation by Ralf Baechle (ralf@gnu.org)
+.\"
+.TH ETHERS 5 "6. M\(:arz, 1999" "" "Dateiformate"
+.SH NAME \"{{{roff}}}\"{{{
+ethers \- Zuordnung von Ethernetadressen nach IP-Adressen 
+.\"}}}
+.SH BESCHREIBUNG \"{{{
+\fB/etc/ethers\fP enth\(:alt 48 bit Ethernetadressen und die dazu equivalenten
+IP-Nummern, eine Zeile pro IP-Nummer.
+.sp
+.RS
+\fIEthernet-adresse\fP  \fIIP-Nummer\fP
+.RE
+.sp
+Diese zwei Felder d\(:urfen durch eine beliebige Anzahl von SPACE- oder
+TAB-Zeichen getrennt sein.  Hinter einem #-Zeichen am Anfang der Zeile beginnt
+ein Kommentar, der sich bis zum Ende der Zeile erstreckt.  Die
+\fIEthernet-adresse\fP wird als .IR x : x : x : x : x : x geschrieben, wobei
+\fIx\fP eine hexadecimale Zahl zwischen \fB0\fP und \fBff\fP ist, die ein
+Byte der Adresse repr\(:asentiert, die in Netzwerksbyteorder (big-endian) ist.
+Die \fIIP-Nummer\fP kann ein Hostname, der \(:uber DNS resolviert werden kann
+oder eine IP-Adresse in in Punktnotation sein.
+.\"}}}
+.SH BEISPIEL \"{{{
+08:00:20:00:61:CA  pal
+.\"}}}
+.SH DATEIEN \"{{{
+/etc/ethers
+.\"}}}
+.SH "SIEHE AUCH" \"{{{
+rarp(8)
+.\"}}}
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/hostname.1 b/man/de_DE/hostname.1
new file mode 100644 (file)
index 0000000..ce0cadb
--- /dev/null
@@ -0,0 +1,229 @@
+.\"
+.\" Original by ??
+.\"
+.\" German translation by Ralf Baechle (ralf@gnu.org)
+.\"
+.TH HOSTNAME 1 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+
+.SH NAME
+hostname \- den Rechnernamen anzeigen oder setzen.
+.br
+domainname \- den NIS/YP Domainnamen anzeigen oder setzen
+.br
+dnsdomainname \- den DNS Domainnamen des Systems anzeigen
+.br
+nisdomainname \- den NIS/YP Domainnamen anzeigen oder setzen
+.br
+ypdomainname \- den NIS/YP Domainnamen anzeigen oder setzen
+.br
+nodename \- den DECnet-Knotennamen anzeigen oder setzen
+
+.SH SYNOPSIS
+.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 ]
+.RB [ \-n ]
+.RB [ \-\-node ]
+
+.PP
+.B hostname 
+.RB [ \-v ]
+.RB [ \-F\ Dateiname ]
+.RB [ \-\-file\ Dateiname ]
+.RB [ Rechnername ]
+
+.PP
+.B domainname
+.RB [ \-v ]
+.RB [ \-F\ Dateiname ]
+.RB [ \-\-file\ Dateiname ]
+.RB [ Name ]
+
+.PP 
+.B nodename
+.RB [ \-v ]
+.RB [ \-F\ Dateiname ]
+.RB [ \-\-file\ Dateiname ]
+.RB [ Name ]
+
+.PP
+.B hostname
+.RB [ \-v ]
+.RB [ \-h ]
+.RB [ \-\-help ]
+.RB [ \-V ]
+.RB [ \-\-version ]
+
+.PP
+.B dnsdomainname
+.RB [ \-v ]
+.br
+.B nisdomainname
+.RB [ \-v ]
+.br
+.B ypdomainname
+.RB [ \-v ]
+
+.SH BESCHREIBUNG
+.B Hostname
+ist das Programm, das zum Anzeigen oder setzen des aktuellen Host-, Domain-,
+oder Knotennamens des Systems verwendet wird.  Diese Namen werden von vielen
+der Netzwerksprogrammen zur Identifikation der Maschine verwendet.
+Au\(sserdem wird der Domainname von NIS/YP verwendet.
+
+.SS "NAMEN AUSLESEN"
+Wenn ohne Argumente augerufen, zeigen die Programme den aktuellen Namen an:
+
+.LP
+.B hostname
+zeigt den aktuellen Rechnernamen des Systems, wie von der 
+.BR gethostname (2)
+Funktion ermittelt wird, an.
+
+.LP
+.B "domainname, nisdomainname, ypdomainname"
+zeigen den Namen des Systems, wie er von der
+.BR getdomainname (2)
+Funktion ermittelt wird, an.  Dieser Name wird auch der YP/NIS Domainname
+des Systems genannt.
+
+.LP
+.B nodename
+druckt den DECnet-Knotennamen des Systems, wie er von der
+.BR getnodename (2)
+Function ermittelt wird, aus.
+
+.LP
+.B dnsdomainname
+druckt den Domainteil des FQDN (Fully Qualified Domain Name oder zu deutsch
+vollst\(:andig spezifizierter Domainname) aus.  Der vollst\(:andige FQDN
+des Systems wird von
+.B "hostname \-\-fqdn"
+ausgegeben.
+
+.SS "NAME SETZEN"
+Wenn mit nur einem Argument oder mit der
+.B \-\-file
+Option aufgerufen, dann setzen diese Kommandos den Rechnernamen, den NIS/YP
+Domainnamen oder den DECnet-Knotennamen.
+
+.LP
+Nur der Superuser darf den Namen \(:andern.
+
+.LP
+Es ist nicht m\(:ogich den FQDN oder den DNS Domainnamen mit dem
+.B dnsdomainname 
+Befehl (Siehe 
+.B "Der FQDN"
+unten) zu setzen.
+
+.LP
+Der Rechnername wird \(:ublicherweise einmal beim Systemstart in
+.I /etc/rc.d/rc.inet1
+or
+.I /etc/init.d/boot
+gesetzt.  Der Rechnername wird dabei \(:ublicherweise aus einer Datei
+die den Rechnernamen, z.B.
+.I /etc/HOSTNAME
+gesetzt.
+
+.SS DER FQDN
+Der FQDN (wie er von
+.B "hostname \-\-fqdn"
+ausgegeben wird) 
+oder der DNS-Domainname (wie er von
+.B "dnsdomainname"
+ausgegeben wird) 
+kann nicht mit diesem Befehl ge\(:andert werden.  Der FQDN eines Systems ist
+der Name, den der
+.BR resolver (3)
+als den Namen des Systems zur\(:uckgibt.
+
+.LP
+Technisch: Der FQDN ist der Name, den
+.BR gethostbyname (2)
+f\(:ur den Rechnernamen zur\(:uckgibt, den
+.B gethostname (2)
+zur\(:uckgibt.
+Der DNS-Domainname ist der Teil nach dem ersten Punkt.
+.LP
+Deshalb h\(:angt es \(:ublicherweise von der Konfiguration in
+.IR /etc/host.conf )
+wie der Name ge\(:andert werden kann.  \(:Ublicherweise (wenn die Hosts Datei
+gelesen wird, bevor auf DNS oder NIS/YP zugegriffen wird) kann er in
+.I /etc/hosts
+ge\(:andert werden.
+
+
+.SH OPTIONEN
+.TP
+.I "\-a, \-\-alias"
+Den Aliasnamen des Rechners ausgeben, falls benutzt.
+.TP
+.I "\-d, \-\-domain"
+Den Namen der DNS-Domain ausgeben.  Der Befehl
+.B domainname
+kann nicht dazu verwendet werden um den Namen der DNS-Dom\(:ane auszugeben,
+da er den NIS Domainname und nicht den DNS Domainnamen ausgibt.  Zu diesem
+Zweck dient der Befehl
+.BR dnsdomainname .
+.TP
+.I "\-F, \-\-file filename"
+Den Rechnernamen aus der angegebenen Datei lesen.   Zeilen, die mit einem
+#-Zeichen anfangen sind Kommentare und werden ignoriert.
+.TP
+.I "\-f, \-\-fqdn, \-\-long"
+Den FQDN (Fully Qualified Domain Name) anzeigen.  Ein FQDN besteht aus einem
+kurzen Rechnernamen ohne Punkt und dem DNS-Domainnamen.  Au\(sser wenn BIND
+oder NIS zum Aufl\(:osen von Rechnernamen verwendet wird, kann der FQDN und
+der DNS-Domainname, der Teil des FQDN ist, in der Datei \fI/etc/hosts\fR
+ge\(:andert werden.
+.TP
+.I "\-h, \-\-help"
+Kurzanleitung ausdrucken und beenden.
+.TP
+.I "\-i, \-\-ip-address"
+Die IP-Adresse(n) des Rechners anzeigen und beenden.
+.TP
+.I "\-n, \-\-node"
+Den DECnet-Knotennamen anzeigen.  Wenn ein Argument oder die
+.B \-\-file name
+Option angegeben wird, dann kann Root auch einen neuen Knotennamen setzen.
+.TP
+.I "\-s, \-\-short"
+Den Kurznamen anzeigen.  Dies ist der ab dem ersten Punkt abgeschnittene
+Rechnername.
+.TP
+.I "\-V, \-\-version"
+Versionsinformation auf der Standardausgabe ausgeben und erfolgreich beenden.
+.TP
+.I "\-v, \-\-verbose"
+Ausf\(:uhrlichere Ausgaben.
+.TP
+.I "\-y, \-\-yp, \-\-nis"
+Den NIS-Domainnamen anzeigen.  Wenn ein Argument oder die 
+.B \-\-file name
+Option gegeben wird, dann kann Root auch eine neue NIS-Domain setzen.
+.SH DATEIEN
+.B /etc/hosts
+.SH AUTOREN
+Peter Tobias, <tobias@et-inf.fho-emden.de>
+.br
+Bernd Eckenfels, <net-tools@lina.inka.de> (NIS and manpage).
+.br
+Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage).
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/ifconfig.8 b/man/de_DE/ifconfig.8
new file mode 100644 (file)
index 0000000..aa2a4a0
--- /dev/null
@@ -0,0 +1,206 @@
+.TH IFCONFIG 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+.SH NAME
+ifconfig \- Konfiguration einer Netzwerkskarte
+.SH SYNOPSIS
+.B "ifconfig [Schnittstelle]"
+.br
+.B "ifconfig Schnittstelle [AF-Typ] Optionen | Adresse ..."
+.SH BESCHREIBUNG
+.B Ifconfig
+wird benutzt um kernel-residente Netzwerksschnittstellen zu konfigurieren.
+Es wird zur Systemstartzeit verwendet, um die Schnittstellen nach Notwendigkeit
+zu initialisieren.  Danach wird es \(:ublicherweise nur zur Fehlersuche oder
+zur Verfeinerung der Systemkonfiguration verwendet.
+.LP
+Wenn keine Argumente angegeben werden, dann zeigt
+.B ifconfig
+den Zustand der Augenblicklich aktiven Netzwerksschnittstellen.
+Wird ein einzelne
+.BR Schnittstelle nargument
+angegeben, so zeigt es nur den Zustand der angegebenen Netzwerksschnittstelle
+an.  Wird ein einzelne
+.B -a
+Option angegeben, zeigt es den Zustand aller Schnittstellen an, selbst wenn
+diese inaktiviert sind.  Ansonsten konfiguriert
+.B ifconfig
+eine Schnittstelle.
+
+.SH Adressfamilien
+Wird das erste Argument hinter dem Schnittstellennamen als der Name einer
+unterst\(:utzten Adressfamilie erkannt, so wird diese Adressfamilie dazu
+benutzt um alle Protokolladressen zu dekodieren und darzustellen.  Zur
+Zeit werden u.A. folgende Adressfamilien unterst\(:utzt.
+.B inet
+(TCP/IP, standard), 
+.B inet6
+(IPv6),
+.B ax25
+(AMPR Packet Radio),
+.B ddp
+(Appletalk Phase 2),
+.B ipx
+(Novell IPX) and
+.B netrom
+(AMPR Packet radio).
+.SH OPTIONEN
+.TP
+.B Schnittstelle
+Der Name einer Netzwerksschnittstelle.  Dies ist \(:ublicherweise ein Treiber
+gefolgt von einer laufenden Nummer, z.B. eth0 f\(:ur die erste
+Ethernetschnittstelle
+.TP
+.B up
+Diese Flagge aktiviert die Schnittstelle.  Sie wird implizit gesetzt, wenn
+eine Adresse einer Schnittstelle zugewiesen wird.
+.TP
+.B down
+Durch diese Flagge wird der Treiber f\(:ur die Schnittstelle deaktiviert.
+.TP
+.B "[\-]arp"
+Schaltet das ARP-Protokoll auf dieser Schnittstelle ein oder aus.
+.TP
+.B "[\-]promisc"
+Ein-/Ausschalten des
+.B promiscuous
+Modus der Schnittstelle.  Ist er eingeschaltet, so werden alle Pakete vom
+Netzwerk empfangen unabh\(:angig davon ob sie an die Schnittstelle adressiert
+sind.
+.TP
+.B "[\-]allmulti"
+Ein-/Ausschalten des
+.B all-multicast
+Modus.  Ist er eingeschaltet, so werden alle Multicastpakete vom Netzwerk
+empfangen unabh\(:angig davon, ob sie an die Schnittstelle adressiert sind
+oder nicht.
+.TP
+.B "metric N"
+Dieses Argument setzt den Metrik-Wert f\(:ur die Schnittstelle auf N.
+.TP
+.B "mtu N"
+Dieses Argument setzt die Maximum Transfer Unit (MTU) der Schnittstelle,
+das ist das gr\(:o\(sste Paket, dass gesendet werden kann.
+.TP
+.B "dstaddr addr"
+Setzt die IP-Adresse der Gegenseite f\(:ur Punkt-zu-Punkt-Verbinungen wie z.B.
+PPP.  Dieses Schl\(:usselwort ist \(:uberholt; statt dessen sollte das
+.B pointopoint
+Schl\(:usselwort verwendet werden.
+.TP
+.B "netmask Adr"
+Setzt die IP Netzwerksmaske f\(:ur diese Schnittstelle.  Die Voreinstellung
+ist abh\(:angig von der IP-Adresse der Schnittstelle die Maske f\(:ur ein
+Klasse A, B oder C Netzwerk, kann aber auf jeden beliebigen Wert gesetzt
+werden.
+.TP
+.B "add Adr/Prefixl\(:ange"
+F\(:ugt der Schnittstelle eine IPv6-Adresse zu.
+.TP
+.B "del addr/prefixlen"
+Entfernt eine IPv6-Adresse von der Schnittstelle.
+.TP
+.B "tunnel aa.bb.cc.dd"
+Erzeugt ein neues SIT (IPv6-in-IPv4) Ger\(:at, das Pakete zum angegebenen
+Ziel tunnelt.
+.TP
+.B "irq addr"
+Setzt die Interruptleitung, die von diesem Ger\(:at benutzt wird.  Nicht alle
+Ger\(:ate koennen ihre Interruptkonfiguration dynamisch \(:andern.
+.TP
+.B "io_addr Adr"
+Setzt die I/O-Basisadresse f\(:ur dieses Ger\(:at.
+.TP
+.B "mem_start Adr"
+Setzt die Startadresse f\(:ur shared memory der von diesem Ger\(:at benutzt
+wird.  Dies wird nur von wenigen Ger\(:aten ben\(:otigt.
+.TP
+.B "media Typ"
+Setzt den physikalischen Anschluss oder den Mediumstyp, der vom Ger\(:at
+verwendet wird.  Nicht alle Ger\(:ate k\(:onnen diese Einstellung \(:andern,
+und bei denjenigen, bei denen dies m\(:oglich ist, variieren die
+unterst\(:utzten Werte.  Typische Werte f\(:ur
+.B Typ
+sind
+.B 10base2
+(thin Ethernet),
+.B 10baseT
+(twisted-pair 10Mbps Ethernet),
+.B AUI 
+(Externer Transceiver) und so weiter.  Der spezielle Mediumstyp
+.B auto
+kann benutzt werden, damit der Treiber automatischen den Typ des Mediums
+erkennt.  Wiederum unterst\(:utzen dies nicht alle Treiber.
+.TP
+.B "[-]broadcast [Adr]"
+Wird das Adressargument gegeben, so wird die Protokolladresse f\(:ur Broadcast
+f\(:ur diese Schnittstelle gesetzt.  Ansonsten wird die
+.B IFF_BROADCAST
+Flagge f\(:ur diese Schnittstelle gesetzt bzw. gel\(:oscht.
+.TP
+.B "[-]pointopoint [Adr]"
+Dieses Schl\(:usselwort aktiviert den
+.B Punkt-zu-Punkt
+Modus einer Schnittstelle.  Das bedeutet, da\(ss eine Verbindung zwischen zwei
+Maschine direkt ist ohne da\(ss weitere Maschinen mith\(:oren.
+.br
+Wird auch ein Adressargument gegeben, so wird die Protokolladrsse auf der
+Gegenseite der Verbindung gesetzt, genau wie beim jetzt \(:uberholten
+.B dstaddr
+Schl\(:usselwort.  Ansonsten wird die
+.B IFF_POINTOPOINT
+Flagge f\(:ur die Schnittstelle gesetzt bzw. gel\(:oscht.
+.TP
+.B hw Klasse Adresse
+Setzt die Hardwareadresse dieser Schnittstelle, wenn der Ger\(:atetreiber
+diese Operation unterst\(:utzt.  Das Schl\(:usselwort mu\(ss vom Namen der
+Hardwareklasse und der ASCII-Darstellung der Hardwareadresse gefolgt werden.
+Zur Zeit werden unter anderem folgende Hardwareklassen unterst\(:utzt:
+.B ether
+(Ethernet),
+.B ax25
+(AMPR AX.25),
+.B ARCnet
+and
+.B netrom
+(AMPR NET/ROM).
+.TP
+.B multicast
+Setzt die Multicastflagge der Schnittstelle.  Dies sollte im Normalfall nicht
+ben\(:otigt werden, da die Treiber die Flagge selbst setzen.
+.TP
+.B Adresse
+Die IP-Adresse, die der Schnittstelle zugewiesen wird.
+.TP
+.B txqueuelen L\(:ange
+Setzt die L\(:ange der Sendewarteschlange des Ger\(:ats.  Es kann n\(:utzlich
+sein, diesen Wert auf eine kleinen Wert f\(:ur langsame Ger\(:ate mit hoher
+Paketlaufzeit (Modems, ISDN) zu setzen um zu verhindern, da\(ss schnelle
+Gro\(ss\(:ubertragungen interaktiven Verkehr wie Telnet zu sehr st\(:oren.
+.SH BEMERKUNGEN
+Seit Kernel Version 2.2 gibt es keine expliziten Statistiken f\(:ur
+Schnittstellenaliase mehr.  Die Statistiken f\(:ur die Originaladresse werden
+mit allen Aliasen auf das gleiche Ger\(:at geteilt.  Um Statistiken per
+Adresse zu erhalten sollte explizite EIntr\(:age f\(:ur die Adresse mit dem
+.BR ipchains(8)
+Kommando gemacht werden.
+
+.SH DATEIEN
+.I /proc/net/socket 
+.br
+.I /proc/net/dev
+.br
+.I /proc/net/if_inet6
+.SH FEHLER
+W\(:ahrend AppleTalk DDP und IPX Adressen angezeigt werden, k\(:onnen sie mit
+diesem Kommando nicht ge\(:andert werden.
+.SH SIEHE AUCH
+route(8), netstat(8), arp(8), rarp(8), ipchains(8)
+.SH AUTOREN
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
+.br
+Andi Kleen, 
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/netstat.8 b/man/de_DE/netstat.8
new file mode 100644 (file)
index 0000000..f59aec0
--- /dev/null
@@ -0,0 +1,508 @@
+.\"
+.\" netstat.8 
+.\"
+.\" Original: (mdw@tc.cornell.edu & dc6iq@insu1.etec.uni-karlsruhe.de)
+.\" German translation: Ralf Baechle (ralf@gnu.org)
+.\"
+.\" Modified: Bernd.Eckenfels@inka.de
+.\" Modified: Andi Kleen ak@muc.de 
+.\" Modified: Tuan Hoang tuan@optimus.mitre.org 
+.\"
+.\"
+.TH NETSTAT 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+
+.SH NAME
+netstat \- Anzeige von Netzwerksverbindungen, Routentabellen, Schnittstellenstatistiken, maskierten Verbindungen, Netlink-Nachrichten und Mitgliedschaft in Multicastgruppen
+
+.SH SYNOPSIS
+
+.B netstat 
+.RB [ \-venaoc ]
+.RB [ \-\-tcp | \-t ]
+.RB [ \-\-udp | \-u ]
+.RB [ \-\-raw | \-w ]
+.RB [ \-\-groups | \-g ]
+.RB [ \-\-unix | \-x ] 
+.RB [ \-\-inet | \-\-ip ]
+.RB [ \-\-ax25 ]
+.RB [ \-\-ipx ] 
+.RB [ \-\-netrom ]
+
+.PP
+
+.B netstat 
+.RB [ \-veenc ]
+.RB [ \-\-inet ] 
+.RB [ \-\-ipx ]
+.RB [ \-\-netrom ] 
+.RB [ \-\-ddp ]
+.RB [ \-\-ax25 ]
+.RB { \-\-route | \-r }
+
+.PP
+
+.B netstat
+.RB [ \-veenpac ]
+.RB { \-\-interfaces | \-i }
+.RI [ Schnittstelle ]
+
+.PP
+
+.B netstat
+.RB [ \-enc ]
+.RB { \-\-masquerade | \-M }
+
+.PP
+
+.B netstat 
+.RB [ \-cn ]
+.RB { \-\-netlink | \-N }
+
+.PP
+
+.B netstat 
+.RB { \-V | \-\-version }
+.RB { \-h | \-\-help }
+
+.PP
+.SH BESCHREIBUNG
+.B Netstat
+zeigt Informationen des Linux Netzwerkssystems an.
+
+.SS "(no option)"
+Ohne Optionen zeigt
+.B netstat
+den Zustand von offenen Sockets an.  Wird keine Adressfamilie angegeben, dann
+werden die offenen Sockets aller konfigurierten Adressfamilien gedruckt.
+Die Option
+.B -e
+gibt zus\(:atzliche Informationen aus (User ID).  Mit der Option
+.B -v
+gibt
+.B netstat
+zus\(:atzlich Fehlermeldungen \(:uber von Kernel nicht unterst\(:utzte
+Adressfamilien aus.  Die Option
+.B -p
+gibt zus\(:atzlich die PID und den Namen des Programms, das den Socket
+ge\(:offnet hat, aus.
+.B -a
+druckt alle Sockets einschlie\(sslich der auf Verbinungen wartenden
+Serversockets aus.  Die Adressfamilie
+.B inet
+zeigt RAW, UDP und TCP Sockets an.
+
+.SS "\-r, \-\-route"
+Die
+.BR \-r ", " \-\-route
+Option gibt die Routentabellen des Kernels im gleichen Format wie
+.B "route -e" 
+aus.
+.B "netstat -er" 
+benutzt das Ausgabeformat von
+.BR route .
+Wegen Details siehe
+.BR route (8).
+
+.SS "\-i, \-\-interface \fISchnittstelle\fI"
+Wird die
+.BR -i ", " --interfaces
+Option verwendet,  so wird eine Tabelle aller (oder der angegebenen
+.IR Schnittstellen ) 
+ausgedruckt.  Die Ausgabe ist im Format von
+.B "ifconfig -e"
+und wird in
+.BR ifconfig (8)
+beschrieben.
+.B "netstat -ei" 
+druckt eine Tabelle oder einen Eintrag f\(:ur einen einzelnes Interface wie
+.BR ifconfig .
+Die
+.B -a
+Option schlie\(sst Schnittstellen, die gar nicht konfiguriert sind in die
+Ausgabe ein, d.h. die die
+.BR U = UP
+Flagge nicht gesetzt haben).
+
+.SS "\-M, \-\-masquerade"
+
+Eine Liste aller maskierten Sitzungen wird dargestellt.  Der
+.B -e 
+Schalter schlie\(sst zus\(:atzlich Information \(:uber Sequenznummern und
+Deltas, die durch das Umschreiben von FTP-Sitzungen (PORT Kommando) verursacht
+werden.  Maskieren wird dazu verwendet um Maschinen mit inoffiziellen
+Netzwerkssitzungen vor der Au\(ssenwelt zu verstecken.  Dies wird in
+.BR ipfw (4),
+.BR ipfwadm (8)
+und
+.BR ipfw (8)
+beschrieben.
+
+.SS "\-N, \-\-netlink"
+
+Aktuelle Kern unterst\(:utzen die Kommunikation zwischen Kern und Anwendungen
+durch eine Option namens Netlink.  Netlink erm\(:oglicht es Informationen
+\(:uber die Erzeugung und das L\(:oschen von Schnittstellen oder Routen von
+.I /dev/route
+(36,0) zu erhalten.
+
+.PP
+.SH OPTIONEN
+.SS "\-v, \-\-verbose"
+macht detailiertere Ausgaben.  Insbesondere wird ausgegeben, welche
+Adressfamilien nicht im Kern konfiguriert sind.
+
+.SS "\-n, \-\-numeric"
+gibt numerische Adressen aus, anstelle zu versuchen, den symbolischen
+Rechner, Port oder Benutzernamen auszugeben.
+
+.SS "\-p, \-\-programs"
+Zeigt den Prozessnamen und die PID des Eigent\(:umers des Sockets, der
+ausgegeben wird.  Nur der Eigent\(:umer eines Prozess oder
+.B Root
+haben alle die dazu n\(:otigen Privilegien.
+
+.SS "\-A, \-\-af \fIFamilie\fI"
+benutzt einen alternativen Weg, um Adressfamilien zu setzen.
+.I Familie 
+ist eine von Kommatas abgetrennte Liste von Schl\(:usselworten f\(:ur
+Adressfamilien wie
+.BR inet , 
+.BR unix , 
+.BR ipx , 
+.BR ax25 , 
+.B netrom 
+und
+.BR ddp .
+Dies hat den gleichen Effekt wie die Langoptionen
+.BR \-\-inet ,
+.BR \-\-unix ,
+.BR \-\-ipx ,
+.BR \-\-ax25 ,
+.B \-\-netrom
+und
+.BR \-\-ddp.
+
+.SS "\-c, \-\-continous"
+Mit dieser Option wiederholt
+.B netstat
+im Sekundenabstand die Ausgabe, bis es abgebrochen wird.
+
+.PP
+.SH AUSGABE
+
+.PP
+.SS Aktive Internet-Verbindungen \fR(TCP, UDP, RAW)\fR
+
+.SS "Proto" 
+Das von Socket verwendete Protokoll (TCP, UDP, RAW).
+
+.SS "Recv-Q"
+Die Anzahl von Bytes, die noch nicht von der Anwendung vom Socket abgeholt
+wurden.
+
+.SS "Send-Q"
+Die Anzahl von Bytes, die von der Gegenseite noch nicht best\(:atigt wurde.
+
+.SS "Lokale Adresse" 
+Die lokale Adresse (lokaler Rechnername) und Portnummer des Sockets.  Au\(sser
+bei Verwendung der
+.B -n
+Option wird die Socketadresse nach dem kanonischen Rechnernamen und die
+Portnummer in den zugeh\(:origen Dienstenamen aufgel\(sst.
+
+.SS "Gegenadresse"
+Die Adresse und Portnummer der Gegenseite des Sockets.  Wie bei lokalen
+Adressen schaltet der
+.B -n
+Schalter die Umwandlung von Rechneradresse und Portnummer ab.
+
+.SS "State"
+Der Zustand des Sockets.  Da RAW-Sockets keinen und UDP-Sockets
+\(:ublicherweise keinen Zustand haben, kann diese Spalte leer bleiben.
+Normalerweise ist sie einer von mehreren Werten:
+.TP
+.I
+VERBUNDEN
+The socket has an established connection.
+.TP
+.I
+SYN_SENT
+Es wird versucht auf dem Socket eine Verbindung aufzubauen.
+.TP
+.I
+SYN_RECV
+Eine Verbindungsanfrage wurde von der Gegenseite empfangen.
+.TP
+.I
+FIN_WAIT1
+Der Socket wurde geschlo\(ssen und die Verbindung wird beendet.
+.TP
+.I
+FIN_WAIT2
+Die Verbindung ist geschl\(ssen und der Socket wartet darauf, da\(ss sie
+von der Gegenseite ebenfalls geschlo\(ssen wird.
+.TP
+.I
+TIME_WAIT
+Der Socket ist nach dem Schlie\(ssen im Wartezustand um Pakete handzuhaben,
+die sich eventuell noch im Netzwerk befinden.
+.TP
+.I
+CLOSE
+Der Socket wird nicht benutzt.
+.TP
+.I
+CLOSE_WAIT
+Die Gegenseite hat die Verbindung beendet und das Schlie\(ssen des Sockets
+wird erwartet.
+.TP
+.I
+LAST_ACK
+Die Gegenseite hat die Verbindung beendet und der Socket ist geschlo\(ssen;
+die Best\(:atigung wird abgewartet.
+.TP
+.I
+LISTEN
+Der Socket wartet auf eingehende Verbindungen.  Diese Sockets werden nur
+angezeit, wenn die
+The socket is listening for incoming connections. Those sockets are only
+displayed if the
+.BR -a , --listening
+Option gegeben wird.
+.TP
+.I
+CLOSING
+Beide Sockets sind geschlo\(ssen es wurden aber noch nicht alle Daten
+geschickt.
+.TP
+.I
+UNKNOWN
+Der Zustand des Sockets ist unbekannt.
+
+.SS "Benutzer"
+Der Name oder die Benutzer-ID des Eigent\(:umers des Sockets.
+
+.SS "PID/Program name"
+Durch einen Schr\(:agstrich abgetrenntes Paar von Prozess-ID und Programmname
+des Programms, das diesen Socket besitzt.  Die Option
+.B -p
+schaltet die Anzeige dieser Spalte ein.  Es werden
+.B root
+Privilegien ben\(:otigt um die n\(:otigen Daten zu erhalten.  F\(:ur IPX
+Sockets sind diese Daten nicht verf\(:ugbar.
+
+.SS "Timer"
+(Dies mu\(ss noch geschrieben werden)
+
+.PP
+.SS Aktive Sockets in der UNIX Dom\(:ane
+
+.SS "Proto" 
+Das Protokoll (in der Regel unix), das vom Socket verwendet wird.
+
+.SS "RefZ\(:ah"
+Der Referenzz\(:ahler, d.h. die Zahl der Prozesse, die diesen Socket benutzen.
+
+.SS "Flaggen"
+Die Flaggen, die angezeigt werden sind SO_ACCEPTON (angezeigt als
+.BR ACC ),
+SO_WAITDATA 
+.RB ( W )
+oder SO_NOSPACE 
+.RB ( N ). 
+SO_ACCECPTON 
+wird auf unverbundenen Sockets verwendet, wenn die zugeh\(:origen Sockets
+auf Verbindungsanfragen warten.  Die anderen Flaggen sind normalerweise nicht
+von Interesse.
+
+.SS "Typ"
+Es gibt verschiedene Arten von Socketzugriff:
+.TP
+.I
+SOCK_DGRAM
+Der Socket wird im verbindungslosen Datagram-Modus verwendet.
+.TP
+.I
+SOCK_STREAM
+Dies ist ein verbindungsorientierter Stream-Socket.
+.TP
+.I
+SOCK_RAW
+Der Socket wird als RAW-Socket verwendet.
+.TP
+.I
+SOCK_RDM
+Dieser Socket bedient zuverl\(ssig zugestellte Nachrichten.
+.TP
+.I
+SOCK_SEQPACKET
+Dies ist ein Socket, der die Zustellung in der richtigen Reihenfolge
+garantiert.
+.TP
+.I
+SOCK_PACKET
+Socket mit direktem (RAW) Zugriff auf die Schnittstelle.
+.TP
+.I
+UNKNOWN
+Wer wei\(ss, was uns die Zukunft bringt soll es hier hinschreiben :-)
+
+.PP
+.SS "Zustand"
+Dieses Feld enth\(:alt eines der folgenden Schl\(:usselworte:
+.TP
+.I
+FREI
+Der Socket ist unbenutzt
+.TP
+.I
+H\(:Ort
+Der Socket lauscht nach Verbindungsanfragen.  Diese Sockets werden nur
+angezeigt, wenn die
+.BR -a , --listening
+Option gesetzt ist.
+.TP
+.I
+VERBINDUNGSAUFBAU
+Auf dem Socket wird gerade eine Verbindung aufgebaut.
+.TP
+.I
+VERBUNDEN
+Auf dem Socket ist Verbindung aufgebaut.
+.TP
+.I
+VERBINDUNGSABBAU
+Die Verbindung des Sockets wird gerade abgebaut.
+.TP
+.I
+(empty)
+Der Socket hat keine Verbundung zu einem anderen Socket.
+.TP
+.I
+UNKNOWN
+Ein Socket sollte niemals in diesem Zustand sein.
+
+.SS "PID/Programmname"
+Prozess-ID und Programmname des Programs, das diesen Socket h\(:alt.  Details
+siehe oben unter
+.BR "Aktive Internetverbindungen" .
+
+.SS "Pfad"
+This displays the path name as which the corresponding processes attached
+to the socket.
+
+.PP
+.SS Aktive IPX-Sockets
+
+(Dieser Abschnitt sollte von jemandem, der davon Ahnung hat geschrieben
+werden.)
+
+.PP
+.SS Aktive NET/ROM-Verdingungen
+
+(Dieser Abschnitt sollte von jemandem, der davon Ahnung hat geschrieben
+werden.)
+
+.PP
+.SS Aktive AX.25-Verbindungen
+
+(Dieser Abschnitt sollte von jemandem, der davon Ahnung hat geschrieben
+werden.)
+
+.PP
+.SH BEMERKUNGEN
+Seit der Kern Version 2.2 zeigt netstat -i keine Schnittstellenstatistiken
+von Schnittstellenaliasen mehr an.  Um Statistiken per Schnittstelle zur
+erhalten, m\(:ussen jetzt mit dem
+.BR ipchains(8) 
+Befehl explizite Regeln zugef\(:ugt werden.
+
+.SH DATEIEN
+.ta
+.I /etc/services
+-- Die Zuordungstabelle f\(:ur Netzwerksdienste
+
+.I /proc/net/dev
+-- Informationen \(:ueber Netzwerksschnittstellen
+
+.I /proc/net/raw
+-- Informationen \(:uber RAW-Sockets
+
+
+.I /proc/net/tcp
+-- Informationen \(:uber TCP-Sockets
+
+.I /proc/net/udp
+-- Informationen \(:uber UDP-Sockets
+
+.I /proc/net/igmp
+-- IGMP-bezogene Informationen
+
+.I /proc/net/unix
+-- Informationen \(:uber UNIX-Sockets
+
+.I /proc/net/ipx
+-- Informationen \(:ueber IPX-Sockets
+
+.I /proc/net/ax25
+-- Informationen \(:uber AX25-Sockets
+
+.I /proc/net/appeltalk
+-- Informationen \(:uber Appletalk-/DDP-Sockets
+
+.I /proc/net/nr
+-- Informationen \(:uber NET/ROM-Sockets
+
+.I /proc/net/route
+-- Informationen zu Kernelrouten
+
+.I /proc/net/ax25_route
+-- Kernelinformationen zum AX25-Routen
+
+.I /proc/net/ipx_route
+-- Kernelinformationen zum IPX-Routen
+
+.I /proc/net/nr_nodes
+-- Kernelliste der NET/ROM-Knoten
+
+.I /proc/net/nr_neigh
+-- Kernelliste der NET/ROM-Nachbarn
+
+.I /proc/net/ip_masquerade
+-- Liste der maskierten Verbindungen.
+
+.fi
+
+.PP
+.SH SIEHE AUCH
+.BR route (8), 
+.BR ifconfig (8), 
+.BR ipfw (4), 
+.BR ipfw (8), 
+.BR ipfwadm (8)
+.BR ipchains (8)
+
+.PP
+.SH PROBLEME
+\(:Andert sich der Zustand des Sockets w\(:ahrend er gerade angezeigt wird,
+so kann unsinnige Information ausgegeben werden.  Dies ist jedoch
+unwahrscheinlich.
+.br
+Die
+.B netstat -i
+die beschrieben wird sollte nach einigem S\(:aubern der BETA-Version des
+Codes des Net-Tools Packets funktionieren.
+
+.PP
+.SH AUTOREN
+Die Benutzerschnittstelle wurde von Fred Baumgarten
+<dc6iq@insu1.etec.uni-karlsruhe.de> geschrieben, die Manpage zum gr\(:o\(ssten
+Teil von Matt Welsh <mdw@tc.cornell.edu>.  Sie wurde von Alan Cox
+<Alan.Cox@linux.org> aktualisiert, ben\(:otigt aber weitere Arbeit.
+.br
+Die Manpage und der eigentliche
+.B netstat
+Befehl wuren von Bernd Eckenfels <ecki@linux.de> vollst\(:andig neu
+geschrieben.
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/nisdomainname.1 b/man/de_DE/nisdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/de_DE/plipconfig.8 b/man/de_DE/plipconfig.8
new file mode 100644 (file)
index 0000000..85709d8
--- /dev/null
@@ -0,0 +1,51 @@
+.TH PLIPCONFIG 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+.SH NAME
+plipconfig \- Einstellung von PLIP Schnittstellen-Parametern
+.SH SYNOPSIS
+.B "plipconfig Schnittstelle"
+.br
+.B "plipconfig Schnittstelle [nibble NN] [trigger NN] [unit NN]"
+.SH BESCHREIBUNG
+.B Plipconfig
+wird dazu benutzt um (hoffentlich) durch die Einstellung von Zeitparametern
+des PLIP-Protokolls die Leistung von PLIP zu verbessern.  Die Ergebnisse
+h\(:angen von der verwendeten Parallelporttechnik, dem Kabel und der
+Geschwindigkeit der Rechner auf beiden Seiten der PLIP-Verbindung ab.
+.LP
+Wenn eine einzelne
+.B Schnittstelle
+als Argument gegeben wird, dann zeigt
+.B plipconfig
+nur den Zustand einer bestimmten Schnittstelle an.  Ansonsten wird versucht
+Optionen zu setzen.
+.SH OPTIONEN
+.TP
+.B "nibble NN"
+Setzt die Wartezeit pro Nibble in Microsekunden.  Die Voreinstellung ist
+3000.
+.TP
+.B "trigger NN"
+Setzt die Dauer der Triggerwartezeit in Mikrosekunden.  Voreinstellung ist 500.
+.LP
+Der PLIP-Durchsatz kann in einigen F\(:allen durch die Absenkung der
+voreingestellten Werte verbessert werden.  Zu niedrige Werte k\(:onnen in
+\(:uberh\(:ohter Prozessorbelastung, schlechten Interruptantwortzeit, dem
+dem Verlust von Zeichen auf seriellen Schnittstellen oder PLIP-Paketen
+resultieren.  The \(:Anderung der PLIP MTU kann ebenfalls Auswirkungen auf
+den Durchsatz.
+.SH ANKERKUNG
+Kommen \(:uberhaupt keine Antworten an, so ist es wahrscheinlicher, da\(ss
+der Interrupt falsch eingestellt ist und mit
+.BR ifconfig (8)
+eingestellt werden mu\(ss.  F\(:ur den Fall sehr langer Kabel sind die
+Voreinstellungen zu langsam.  Dies sollte immer vermieden werden, da die
+parallele Schnittstelle zum Treiben von langen Kabeln weder spezifiziert
+noch geeignet ist.
+.SH SIEHE AUCH
+.I ifconfig(8)
+.SH FEHLER
+Keine.
+.SH AUTOREN
+John Paul Morrison, <jmorriso@bogomips.ee.ubc.ca>, <ve7jpm@ve7jpm.ampr.org>
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/rarp.8 b/man/de_DE/rarp.8
new file mode 100644 (file)
index 0000000..30d9e78
--- /dev/null
@@ -0,0 +1,82 @@
+.TH RARP 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+.SH NAME
+rarp \- Manipulation des RARP-Caches
+.SH SYNOPSIS
+.B "rarp [-V] [--version] [-h] [--help]"
+.br
+.B "rarp -a"
+.br
+.B "rarp [-v] -d Rechnername ..."
+.br
+.B "rarp [-v] [-t type] -s Rechnername hw_addr"
+.SH BESCHREIBUNG
+.B Rarp
+kann die RARP-Tabelle des Kernels auf verschiedene Arten manipulieren.  Die
+wichtigsten Anwendungen sind das L\(:oschen und manuelle Erstellen von
+Eintr\(:agen.  Zur Fehlersuche kann
+.B rarp
+die RARP-Tabelle vollst\(:andig ausgeben.
+.SH OPTIONEN
+.TP
+.B \-V
+Zeigt die Version von
+.BR rarp (8)
+an.
+.TP
+.B \-v
+Schaltet ausf\(:uhrliche Ausgaben an.
+.TP
+.B "\-t Typ"
+Beim Auslesen oder Setzen der RARP-Tabelle teilt dieses optionale Argument
+.B rarp
+mit, welche Klasse von Eintr\(:agen bearbeitet wird.  Die Voreinstellung f\(:ur
+diesen Wert ist
+.B ether
+(z.B. Hardwarecode
+.B 0x01
+f\(:ur
+.B "IEEE 802.3 10Mbps Ethernet".
+Andere Werte k\(:onnen Netzwerkstechniken wie z.B.
+.B AX.25 (ax25)
+und
+.B NET/ROM (netrom)
+sein.
+.TP
+.B "\-a"
+.TP
+.B "\-\-list"
+Druckt die Eintr\(:age der RARP-Tabelle aus.
+.TP
+.B "\-d Rechnername"
+.TP
+.B "\-\-delete Rechnername"
+Alle RARP-Eintr\(:age f\(:ur den gegebenen Rechner l\(:oschen.
+.TP
+.B "\-s Rechnername hw_addr"
+.TP
+.B "\-\-set hostname hw_addr"
+Erzeugt einen Eintrag in der RARP-Tabelle f\(:ur den Rechner
+.B Rechnername
+dessen Hardwareadresse auf
+.B hw_addr
+gesetzt ist.  Das Format der Hardware Adresse ist von der Hardwareklasse
+abh\(:angig. F\(:ur die meisten Hardwareklassen wird die \(:ubliche
+Repr\(:asentation verwendet.  F\(:ur die Ethernetklasse sind dies sechs
+hexadezimale, durch Doppelpunkte getrennte Bytes.
+.SH WARNUNG
+Einige Systeme, insbesondere alte Suns, gehen davon aus, da\(ss das System,
+das RARP-Anfragen beantwortet auch weitere Bootdienste anbietet.  Deshalb
+sollten niemals einfach beliebige RARP-Eintr\(:age erzeugt werden, au\(sser
+man m\(:ochte einen Netzwerksverwalter in seiner Rollte als BOFH erleben.
+.SH DATEIEN
+.I /proc/net/rarp,
+.SH SIEHE AUCH
+arp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTOREN
+Ross D. Martin, <martin@trcsun3.eas.asu.edu>
+.br
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/route.8 b/man/de_DE/route.8
new file mode 100644 (file)
index 0000000..a28c9d1
--- /dev/null
@@ -0,0 +1,350 @@
+.TH ROUTE 8 "6. M\(:arz 1999" "net-tools" "Handbuch f\(:ur Linuxprogrammierer"
+.SH NAME
+route \- Anzeigen der IP-Routen-Tabelle
+.SH SYNOPSIS
+.B route
+.RB [ \-CFvnee ]
+.TP
+.B route 
+.RB [ \-v ]
+.RB [ \-A
+Addressfamilie] 
+.B add 
+.RB [ \-net | \-host ] 
+Ziel
+.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 ] 
+Schnittstelle]
+.TP
+.B route 
+.RB [ \-v ] 
+.RB [ \-A
+Adressfamilie]
+.B del 
+.RB [ \-net | \-host ] 
+Ziel
+.RB [ gw 
+Router] 
+.RB [ netmask 
+Nm] 
+.RB [ metric 
+N] 
+.RB [[ dev ]
+Schnittstelle]
+.TP
+.B route 
+.RB [ \-V ] 
+.RB [ \-\-version ]
+.RB [ \-h ]
+.RB [ \--help ]
+.SH BESCHREIBUNG
+.B Route
+wird zum \(:Andern der IP-Routing-Tabelle der Kernels verwendet.  Seine
+prim\(:are Verwendung ist statische Routen f\*:ur bestimmte Rechner oder
+Netzwerke \(:uber eine Schnittstelle einzutragen, nachdem diese mit dem
+Programm
+.BR ifconfig (8)
+konfiguriert wurde.
+
+.SH OPTIONEN
+.TP
+.B \-v
+schaltet ausf\(:uhrliche Ausgaben an.
+
+.TP
+.B \-A Adressfamilie
+Benutzt die angegebene Adresse, z.B. inet oder inet6.
+
+.TP
+.B \-n
+zeigt numerische Adressen an, d.h. es wird nicht mehr versucht IP-Adressen
+in symbolische Hostnamen umzuwandeln.  Dies kann z.B. n\(:utzlich sein, wenn
+der Nameserver nicht mehr erreichbar ist, z.B. weil keine Route existiert.
+
+.TP
+.B \-e
+Schaltet das Ausgabeformat von
+.BR netstat (8)
+f\(:ur die Anzeige der Routentabelle an.
+.B \-ee 
+gibt eine sehr lange Zeile mit allen Routenparametern aus der Routentabelle
+aus.
+
+.TP
+.B \-net
+Das
+.B Ziel
+ist ein Netzwerk.
+
+.TP
+.B -host
+daS
+.B Ziel
+ist ein Rechner
+
+.TP 
+.B -F
+Zeit die FIB Routentabelle des Kerns an.  Das Ausgabeformat kann mit den
+Optionen
+.B \-e
+and
+.B \-ee
+ge\(:andert werden.
+
+.TP 
+.B -C
+zeigt den Routencache des Kernels an.
+
+.TP
+.B del
+L\(:oescht eine Route.
+
+.TP 
+.B add 
+f\(:ugt eine Route zu.
+
+.TP
+.B Ziel
+Das Zielnetzwerk oder -System.  Die Angabe von sowohl IP-Adressen in Form
+von dezimalen durch Punkt getrennten Quadrupeln als auch Rechner- und
+Netznamen ist zul\(:assig.
+
+.TP
+.B netmask Nm
+\(:andert die Netzwerksmaske der Route, die zugef\(:ugt werden soll.
+
+.TP
+.B gw Router
+Alle IP-Pakete f\(:ur das Zielnetzwerk / -System werden zum angegebenen
+Router weitergeleitet.
+
+.B ANMERKUNG:
+Das angegebene Ziel mu\(ss zuerst erreichbar sein.  \(:Ublicherweise bedeutet
+das, das zuerst eine statische Route zum Router eingetragen werden.  Wird
+die Adresse einer lokalen Schnittstelle angegeben, so wird sie benutzt um
+zu entscheiden zu welcher Schnittstelle die Pakete weitergeleitet werden.
+Dieses Merkmal dient der Kompatibilit\(:at mit BSD.
+
+.TP
+.B metric M
+Setzt das Metric-Feld der Routentabelle, das von Routend\(:amonen verwendet
+wird, auf M.
+
+.TP 
+.B mss M
+Setzt den MSS-Wert (Maximum Segment Size) f\(:ur TCP-Verbindungen \(:uber
+diese Route auf M bytes.  Diese Einstellung kann verwendet werden um eine
+kleinere MTU zu erzwingen, wenn
+Path MTU Discovery nicht funktioniert (normalerweise weil ein Firewall
+dazwischen ist der ICMP Fragmentation Needed blockt). Die Standardeinstellung
+ist die MTU des Netzwerkinterfaces minus Headers oder eine kleinere falls 
+bekannt.
+
+
+
+.TP 
+.B window W 
+Setzt das TCP-Fenster f\(:ur Verbindungen \(:uber diese Route auf W bytes.
+Dies wird \(:ublicherweise nur auf AX.25-Netzwerken und mit Treibern, die
+Probleme mit aufeinanderfolgenden Paketen haben, benutzt.
+
+.TP
+.B irtt A
+Setzt die Anf\(:angliche Paketumlaufzeit (IRTT, Initial Round Trip Time)
+f\(:ur TCP-Verbindungen auf A millisekunden.  Erlaubte Werte sind im Bereich
+von 1-12000 Milisekunden.  Dies wird \(:ublicherweise nur auf AX.25
+Netzwerken benutzt.  Wenn ausgelassen, dann wird der Standardwert aus
+RFC1122 von 300ms benutzt.
+
+.TP
+.B reject
+Installiert eine Blockaderoute, die im Abbruch der Suche nach einer Route
+resultiert.  Dies wird zum Beispiel benutzt um Netzwerke auszumaskieren,
+bevor die Standardroute verwendet wird.  Dieses Merkmal ist NICHT zur
+Verwendung als Firewall gedacht.
+
+.TP
+.B mod, dyn, reinstate
+Installiert eine dynamische oder modifizierte Route.  Beide Flaggen werden im
+allgemeinen nur von Routend\(:amonen verwendet und dienen im
+.BR route (8)
+Kommando nur zu diagnostischen Zwecken.
+
+.TP
+.B dev Schnittstelle
+Erzwingt, da\(ss die Route mit der angegebenen Schnittstelle assoziiert wird.
+Ansonsten w\(:urde der Kern selbstst\(:andig versuchen, die Schnittstelle
+durch \(:Uberpr\(:ufung bereits existierender Routen,
+Schnittstellenspezifikationen und der Stelle, zu der die Route zugef\(:ugt
+wird.  In den meisten normalen Netzwerken wird dies nicht ben\(:otigt.
+
+Wird als letzte Option
+.B dev Schnittstelle
+angegeben, so kann das Schl\(:usselwort
+.B dev
+ausgelassen werden, da es Standardwert ist.  Ansonsten ist die Reihenfolge
+der Optionen (metric, netmask, gw und dev), die die Route ver\(:andern, egal.
+
+.SH BEISPIELE
+.TP
+.B route add -net 127.0.0.0
+erzeugt die normale Loopbackroute mit der Netzmaske 255.0.0.0 (Netzwerk Klasse
+A, ermittelt aus der Zieladresse) und assoziert sie mit der Schnittstelle lo
+unter der Annahme, da\(ss dieses Ger\(:at vorher mit
+.BR ifconfig (8)
+konfiguriert wurde. 
+
+.TP 
+.B route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
+Legt eine Route zum Netzwerk 192.56.76.x \(:uber eth0 an.  Die Angabe der
+Klasse C Netzmaske ist in diesem Fall nicht n\(:otig, 192.* Klasse C
+IP-Adressen sind.  Das Wort dev darf in diesem Fall ausgelassen werden.
+
+.TP
+.B route add default gw mango-gw
+legt eine Standardroute, d.h. eine Route die verwendet wird, wenn keine andere
+Route passt, an.  Alle Pakete \(:uber diese Route werden \(:uber mango-gw
+weitergeleitet.  Die Schnittstelle, die tats\(:achlich f\(:ur diese Route
+verwendet wird, h\(:angt davon ab, wie mango-gw erreicht werden kann.  Zuvor
+mu\(ss mango-gw bereits \(:uber eine andere Route erreicht werden k\(:onnen.
+
+.TP
+.B route add ipx4 sl0
+Legt eine Route zum Rechner ipx4 \(:uber die SLIP-Schnittstelle an.  Dabei
+wird angenommen da\(ss ipx4 der SLIP-Rechner auf der Gegenseite ist.
+
+.TP
+.B route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
+Dieses Kommando sorgt daf\(:ur, dass das Netz 192.57.66.x \(:uber die
+obige Route \(:uber die SLIP-Schnittstelle weitergeleitet wird.
+
+.TP
+.B route add 224.0.0.0 netmask 240.0.0.0 dev eth0
+Dieses etwas obscure Beispiel wird hier dokumentiert, um zu zeigen, wie
+Multicastrouten angelegt werden.  Durch diese Route werden alle Pakete der
+Klasse D (Multicast) \(:uber eth0 weitergeleitet.  Diese die korrekte
+Konfiguration f\(:ur einen Kern mit Multicast-Unterst\(:utzung.
+
+.TP
+.B route add 10.0.0.0 netmask 255.0.0.0 reject
+Dies installiert eine zur\(:uckweisende Route f\(:ur das private Netzwerk
+10.x.x.x.
+
+.LP
+.SH AUSGABE
+Die Ausgabe der Kernelroutentabelle besteht aus folgenden Spalten
+.TP
+.B Ziel
+Das Zielnetzwerk oder -System.
+.TP
+.B Router
+Die Adresse des weiterleitenden Routers oder "*", wenn keine gesetzt ist.
+.TP
+.B Genmask         
+Die Netzmaske f\(:ur das Zielnetz; '255.255.255.255' f\(:ur eine einzeles
+Zielsystem und '0.0.0.0' f\(:ur die Standardroute (.
+.BR default ).
+.TP
+.B Flaggen
+M\(:ogliche Flaggen sind
+.br
+.B U
+Route ist aktiviert (
+.BR up )
+.br
+.B H
+Ziel ist ein einzelner
+.BR Rechner
+.br
+.B G
+Benutzt einen Router als
+.BR gateway
+.br
+.B R
+modifiziert eine Route bei dynamischem Routen
+.br
+.B D
+Route ist dynamisch von einem daemon oder redirect-Paket erzeugt worden.
+.br
+.B M
+modified von einem Routend\(:amon oder redirekt-Paket.
+.br
+.B !
+.RB ( zur\(:uckweisende Route)
+.TP
+.B Metric 
+Der Abstand zum Ziel, d.h. \(:ublicherweise die Anzahl der Zwischenrouter.
+Dieser Wert wird von aktuellen Kernen nicht verwendet, kann aber u.U.
+von Routend\(:amonen ben\(:otigt werden.
+.TP
+.B Ref    
+Anzahl der Referenzen auf diese Route.  Wird vom Linux Kern nicht benutzt.
+.TP
+.B Benutzer
+Zahl der Suchvorg\(:ange nach dieser Route.  Abh\(:angig von -F und -C
+werden entweder fehlgeschlagene Suchen im Cache (-F) oder Cache-Treffer (-C)
+Count of lookups for the route.  Depending on the use of -F and -C this will
+be either route cache misses (-F) or hits (-C).
+.TP
+.B Schnittstelle
+Schnittstelle auf die Pakete f\(:ur diese Route geleitet werden.
+.TP
+.B MSS 
+Maximale Segmentgr\(:o\(sse f\(:ur TCP-Verbindungen \(:uber diese Route.
+.TP
+.B Fenster
+Voreinstellung f\(:ur die Fenstergr\(:o\(sse von Verbindungen \(:uber diese
+Route.
+.TP
+.B irtt
+Anf\(:angliche Paketumlaufszeit (IRTT, Initial Round Trip Time).  Der Kern
+benutzt diesen Wert um die bestm\(:oglichen Parameter f\(:ur das
+TCP-Protokoll abzusch\(:atzen ohne m\(:oglicherweise auf eventuell langsame
+Antworten warten zu m\(:ussen.
+.TP
+.B HH (cached only)
+Die Anzahl der ARP-Eintr\(:age und gecachten Routen, die den Hardware-
+headercache der gecachten Route referenzieren.  Die ist \-1 wenn keine
+Hardwareadresse nicht f\(:ur den Eintrag der gecachten Route
+ben\(:otigt wird, z.B. f\(:ur lo.
+.TP
+.B Arp (nur gecachet)
+Nur wenn die Hardwareadresse f\(:ur die gecachte Route aktuell ist.
+.LP
+.SH DATEIEN
+.I /proc/net/ipv6_route
+.br
+.I /proc/net/route
+.br
+.I /proc/net/rt_cache
+.LP
+.SH SIEHE AUCH
+.I ifconfig(8), netstat(8), arp(8), rarp(8)
+.LP
+.SH GESCHICHTE
+.B Route
+f\(:ur Linux wurde urspr\(:unglich von Fred N. van Kempen geschrieben
+(waltje@uwalt.nl.mugnet.org) und dann von Johannes Stille und Linus Torvalds
+f\(:ur pl15.  Alan Cox hat die mss und window Optionen f\(:ur Linux 1.1.22
+zugef\(:ugt.  Bernd Eckenfels hat schlie\(sslich die Unterst\(:utzung f\(:ur
+irtt beigesteuert und den Code mit dem von Netstat vereinigt.
+.SH AUTOREN
+.B Route
+wird zur Zeit von Phil Blundel (Philip.Blundell@pobox.com) gewartet.
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/slattach.8 b/man/de_DE/slattach.8
new file mode 100644 (file)
index 0000000..603281c
--- /dev/null
@@ -0,0 +1,106 @@
+.TH SLATTACH 8 "6. M\(:arz 1999" "net-tools" "slattach"
+.SH NAME
+slattach \- Anbindung einer Netzwerksschnittstelle an eine serielle Verbindung
+.SH SYNOPSIS
+.B "slattach [-dehlLmnqv] [-c Kommando] [-p Protokoll] [-s Geschwindigkeit]
+[Terminal]"
+.br
+.SH BESCHREIBUNG
+.B Slattach
+ist ein Programm, das dazu benutzt wird, um ein Terminalger\(:at auf eine
+Reihe von m\(:oglichen Netzwerksmodi umzuschalten.  Dadurch wird es
+m\(:oglich, es zur Verbindung mit anderen Computern zu verwenden.
+.SH OPTIONEN
+.TP
+.B "[-c Kommando]"
+Den Befehl
+.B Kommando
+beim Auflegen der Verbindung ausf\(:uhren.  Die kann benutzt werden um
+Skripte laufen zu lassen oder eine Verbindung nach Abbruch wiederaufzubauen.
+.TP
+.B "[-d]"
+Zus\(:atzliche Ausgaben zur Fehlersuche einschalten.  N\(:utzlich, wenn
+eine Konfiguration nicht arbeitet.
+.TP
+.B "[-h]"
+Beenden, wenn der Tr\(:ager verloren geht.  Dies funktioniert sowohl auf
+/dev/tty als auch auf /dev/cua Ger\(:aten dadurch, da\(ss der Tr\(:ager
+alle 15 Sekunden \(:uberpr\(:uft wird.
+.B "[-v]"
+Ausf\(:uhrliche Ausgaben.  Die ist n\(:utzlich in Shellskripten.
+.TP
+.B "[-q]"
+Schaltet alle Ausgaben aus.
+.TP
+.B "[-l]"
+Erzeugt eine Sperrdatei in /var/lock \(:ahnlich wie UUCP.
+.TP
+.B "[-n]"
+Equivalent mit dem
+.B mesg n
+Befehl.
+.TP
+.B "[-m]"
+Versetzt \fBnot\fP die Verbindung in den 8-bit raw-Modus.
+.TP
+.B "[-e]"
+Beenden sofort nach der Initialisierung des Ger\(:ats anstelle darauf zu
+warten, da\(ss die Leitung aufgelegt wird.
+.TP
+.B "[-L]"
+Aktiviert 3-Draht-Betrieb.  Das Terminal wird in die CLOCAL Betriebsart
+geschaltet und der Tr\(:ager wird nicht \(:uberwacht.
+.TP
+.B "[-p Protokoll]"
+Setzt ein spezifisches Protkoll um eine Leitung zu benutzen.  Die
+Voreinstellung ist
+.BR cslip ,
+d.h. komprimiertes SLIP.  Andere m\(:ogliche Werte sind z.B.
+.B "slip"
+(normales SLIP), 
+.B "adaptive"
+(adaptives CSLIP/SLIP),
+.B "ppp"
+(Point-to-Point Protocol)
+und
+.B "kiss"
+(ein Protokoll, das zur Kommunikation \(:uber AX.25 Packet Radio Terminal Node
+Controller verwendet wird).
+Die spezielle Option
+.B "Terminal"
+kann benutzt werden um das Ger\(:at wieder in die normale serielle Betriebsart
+zur\(:uckzuversetzen.  Die Benutztung der Betriebsart
+.B ppp
+ist normalerweise nicht sinnvoll, da ppp einen zurs\(:atzlichen ppp-D\(:amon
+ben\(:otigt um eine Leitung zu betreiben.
+F\(:ur
+.B kiss
+Verbindungen sollte stattdessen das
+.B axattach
+Programm verwendet werden.
+.TP
+.B "[-s Geschwindigkeit]"
+Setzt eine von der Voreinstellung abweichende \(:Ubertragungseschwindigkeit.
+.PP
+Werden keine Argument gegeben, sie wird das aktuelle Terminal, das ist
+\(:ublicherweise das Terminalger\(:at auf dem man sich eingeloggt hat,
+benutzt.  Ansonten wird ein Versuch gemacht, den angegebenen seriellen Port
+zu erhalten, f\(:ur andere zu sperren und zu \(:offnen.
+.SH DATEIEN
+.I /dev/cua* /var/lock/LCK.*
+.SH FEHLER
+Keine bekannt.
+.SH SIEHE ALSO
+axattach(8), dip(8) pppd(8), sliplogin(8).
+.SH AUTOREN
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Miquel van Smoorenburg, <miquels@drinkel.ow.org>
+.br
+George Shearer, <gshearer@one.net>
+.br
+Yossi Gottlieb, <yogo@math.tau.ac.il>
+.SH \(:Ubersetzung
+Ralf B\(:achle <ralf@gnu.org>
diff --git a/man/de_DE/ypdomainname.1 b/man/de_DE/ypdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/en_US/arp.8 b/man/en_US/arp.8
new file mode 100644 (file)
index 0000000..d859b46
--- /dev/null
@@ -0,0 +1,182 @@
+.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Programmer's Manual"
+.SH NAME
+arp \- manipulate the system ARP cache
+.SH SYNOPSIS
+.B arp 
+.RB [ \-vn ] 
+.RB [ "\-H type" ] 
+.RB [ "-i if" ] 
+.B -a 
+.RB [ hostname ]
+.PP
+.B arp 
+.RB [ \-v ]
+.RB [ "\-i if" ] 
+.B "\-d hostname"
+.RB [ pub ]
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -s hostname hw_addr
+.RB [ temp ] 
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -s hostname hw_addr
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -Ds hostname ifa
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-vnD ]
+.RB [ "\-H type" ] 
+.RB [ "-i if" ]
+.B -f [filename]
+
+.SH DESCRIPTION
+.B Arp
+manipulates the kernel's ARP cache in various ways.  The primary options
+are clearing an address mapping entry and manually setting up one.  For
+debugging purposes, the
+.B arp
+program also allows a complete dump of the ARP cache.
+.SH OPTIONS
+.TP
+.B "\-v, \-\-verbose"
+Tell the user what is going on by being verbose.
+.TP
+.B "\-n, \-\-numeric"
+shows numerical addresses instead of trying to determine symbolic host, port
+or user names.
+.TP
+.B "\-H type, \-\-hw-type type"
+When setting or reading the ARP cache, this optional parameter tells
+.B arp
+which class of entries it should check for.  The default value of
+this parameter is
+.B ether
+(i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet).
+Other values might include network technologies such as
+.RB "ARCnet (" arcnet ")"
+,
+.RB "PROnet (" pronet ")"
+,
+.RB "AX.25 (" ax25 ")"
+and
+.RB "NET/ROM (" netrom ")."
+.TP
+.B "\-a [hostname], \-\-display [hostname]"
+Shows the entries of the specified hosts.  If the
+.B hostname
+parameter is not used,
+.B all
+entries will be displayed.
+.TP
+.B "\-d hostname, \-\-delete hostname"
+Remove any entry for the specified host.  This can be used if the
+indicated host is brought down, for example.
+.TP
+.B "\-D, \-\-use-device"
+Use the interface
+.BR ifa "'s"
+hardware address.
+.TP
+.B "\-i If, \-\-device If"
+Select an interface. When dumping the ARP cache only entries matching
+the specified interface will be printed. When setting a permanent or
+.B temp
+ARP entry this interface will be associated with the entry; if this
+option is not used, the kernel will guess based on the routing
+table. For
+.B pub
+entries the specified interface is the interface on which ARP requests will
+be answered. 
+.br
+.B NOTE:
+This has to be different from the interface to which the IP
+datagrams will be routed.
+.TP
+.B "\-s hostname hw_addr, \-\-set hostname"
+Manually create an ARP address mapping entry for host
+.B hostname
+with hardware address set to
+.B hw_addr
+.  The format of the hardware address is dependent on the hardware
+class, but for most classes one can assume that the usual presentation
+can be used.  For the Ethernet class, this is 6 bytes in hexadecimal,
+separated by colons. When adding proxy arp entries (that is those with
+the 
+.BR pub lish 
+flag set a 
+.B netmask 
+may be specified to proxy arp for entire subnets. This is not good
+practice, but is supported by older kernels because it can be
+useful. If the
+.B temp
+flag is not supplied entries will be permanent stored into the ARP
+cache.
+.br
+.B NOTE:
+As of kernel 2.2.0 it is no longer possible to set an ARP entry for an 
+entire subnet. Linux instead does automagic proxy arp when a route
+exists and it is forwarding. See 
+.BR arp (7)
+for details.
+.TP
+.B "\-f filename, \-\-file filename"
+Similar to the
+.B \-s
+option, only this time the address info is taken from file
+.B filename
+.  This can be used if ARP entries for a lot of hosts have to be
+set up.  The name of the data file is very often
+.IR /etc/ethers , 
+but this is not official. If no filename is specified /etc/ethers
+is used as default.
+.sp 1
+The format of the file is simple; it
+only contains ASCII text lines with a hostname, and a hardware
+address separated by whitespace. Additionally the 
+.BR "pub" , " temp" " and" " netmask"
+flags can be used.
+.LP
+In all places where a
+.B hostname
+is expected, one can also enter an
+.B "IP address"
+in dotted-decimal notation.
+.P
+As a special case for compatibility the order of the hostname and 
+the hardware address can be exchanged.
+.LP 
+Each complete entry in the ARP cache will be marked with the
+.B C
+flag. Permanent entries are marked with
+.B M
+and published entries have the
+.B P
+flag.
+.SH FILES
+.I /proc/net/arp,
+.br
+.I /etc/networks
+.br
+.I /etc/hosts
+.br
+.I /etc/ethers
+.SH SEE ALSO
+rarp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTHORS
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> with a lot of improvements
+from net-tools Maintainer Bernd Eckenfels <net-tools@lina.inka.de>.
diff --git a/man/en_US/dnsdomainname.1 b/man/en_US/dnsdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/en_US/domainname.1 b/man/en_US/domainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/en_US/ethers.5 b/man/en_US/ethers.5
new file mode 100644 (file)
index 0000000..f3ba116
--- /dev/null
@@ -0,0 +1,31 @@
+.TH ETHERS 5 "April 26th, 1996" "" "File formats"
+.SH NAME \"{{{roff}}}\"{{{
+ethers \- Ethernet address to IP number database
+.\"}}}
+.SH DESCRIPTION \"{{{
+\fB/etc/ethers\fP contains 48 bit Ethernet addresses and their corresponding
+IP numbers, one line for each IP number:
+.sp
+.RS
+\fIEthernet-address\fP  \fIIP-number\fP
+.RE
+.sp
+The two items are separated by any number of SPACE and/or TAB char
+acters.   A \fB#\fP at the beginning of a line starts a comment
+which extends to the end of the line.  The \fIEthernet-address\fP is
+written as
+.IR x : x : x : x : x : x ,
+where \fIx\fP is a hexadecimal number between \fB0\fP and \fBff\fP
+which represents one byte of the address, which is in network byte
+order (big-endian).  The \fIIP-number\fP may be a hostname which
+can be resolved by DNS or a dot separated number.
+.\"}}}
+.SH EXAMPLES \"{{{
+08:00:20:00:61:CA  pal
+.\"}}}
+.SH FILES \"{{{
+/etc/ethers
+.\"}}}
+.SH "SEE ALSO" \"{{{
+rarp(8)
+.\"}}}
diff --git a/man/en_US/hostname.1 b/man/en_US/hostname.1
new file mode 100644 (file)
index 0000000..cea3f6e
--- /dev/null
@@ -0,0 +1,213 @@
+.TH HOSTNAME 1 "28 Jan 1996" "net-tools" "Linux Programmer's Manual"
+
+.SH NAME
+hostname \- show or set the system's host name
+.br
+domainname \- show or set the system's NIS/YP domain name
+.br
+dnsdomainname \- show the system's DNS domain name
+.br
+nisdomainname \- show or set system's NIS/YP domain name
+.br
+ypdomainname \- show or set the system's NIS/YP domain name
+.br
+nodename \- show or set the system's DECnet node name
+
+.SH SYNOPSIS
+.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 ]
+.RB [ \-n ]
+.RB [ \-\-node ]
+
+.PP
+.B hostname 
+.RB [ \-v ]
+.RB [ \-F\ filename ]
+.RB [ \-\-file\ filename ]
+.RB [ hostname ]
+
+.PP
+.B domainname
+.RB [ \-v ]
+.RB [ \-F\ filename ]
+.RB [ \-\-file\ filename ]
+.RB [ name ]
+
+.PP 
+.B nodename
+.RB [ \-v ]
+.RB [ \-F\ filename ]
+.RB [ \-\-file\ filename ]
+.RB [ name ]
+
+.PP
+.B hostname
+.RB [ \-v ]
+.RB [ \-h ]
+.RB [ \-\-help ]
+.RB [ \-V ]
+.RB [ \-\-version ]
+
+.PP
+.B dnsdomainname
+.RB [ \-v ]
+.br
+.B nisdomainname
+.RB [ \-v ]
+.br
+.B ypdomainname
+.RB [ \-v ]
+
+.SH DESCRIPTION
+.B Hostname
+is the program that is used to either set or display
+the current host, domain or node name of the system.  These names are used
+by many of the networking programs to identify the machine. The domain 
+name is also used by NIS/YP.
+
+.SS "GET NAME"
+When called without any arguments, the program displays the current
+names:
+
+.LP
+.B hostname
+will print the name of the system as returned by the
+.BR gethostname (2)
+function.
+
+.LP
+.B "domainname, nisdomainname, ypdomainname"
+will print the name of the system as returned by the
+.BR getdomainname (2)
+function. This is also known as the YP/NIS domain name of the system.
+
+.LP
+.B nodename
+will print the DECnet node name of the system as returned by the
+.BR getnodename (2)
+function.
+
+.LP
+.B dnsdomainname
+will print the domain part of the FQDN (Fully Qualified Domain Name). The
+complete FQDN of the system is returned with
+.BR "hostname \-\-fqdn" .
+
+.SS "SET NAME"
+When called with one argument or with the 
+.B \-\-file
+option, the commands set the host name, the NIS/YP domain name or
+the node name. 
+
+.LP
+Note, that only the super-user can change the names. 
+
+.LP
+It is not possible to set the FQDN or the DNS domain name with the 
+.B dnsdomainname 
+command (see 
+.B "THE FQDN"
+below).
+
+.LP
+The host name is usually set once at system startup in
+.I /etc/rc.d/rc.inet1
+or
+.I /etc/init.d/boot
+(normally by reading the contents of a file which contains
+the host name, e.g. 
+.IR /etc/hostname ).
+
+.SS THE FQDN
+You can't change the FQDN (as returned by 
+.BR "hostname \-\-fqdn" ) 
+or the DNS domain name (as returned by
+.BR "dnsdomainname" ) 
+with this command. The FQDN of the system is the name that the
+.BR resolver (3)
+returns for the host name. 
+
+.LP
+Technically: The FQDN is the name
+.BR gethostbyname (2)
+returns for the host name returned by
+.BR gethostname (2).
+The DNS domain name is the part after the first dot.
+.LP
+Therefore it depends on the configuration (usually in 
+.IR /etc/host.conf )
+how you can change it. Usually (if the hosts file is parsed before DNS or 
+NIS) you can change it in 
+.IR /etc/hosts .
+
+
+.SH OPTIONS
+.TP
+.I "\-a, \-\-alias"
+Display the alias name of the host (if used).
+.TP
+.I "\-d, \-\-domain"
+Display the name of the DNS domain. Don't use the command
+.B domainname
+to get the DNS domain name because it will show the NIS domain name and
+not the DNS domain name. Use
+.B dnsdomainname 
+instead.
+.TP
+.I "\-F, \-\-file filename"
+Read the host name from the specified file. Comments (lines starting with
+a `#') are ignored.
+.TP
+.I "\-f, \-\-fqdn, \-\-long"
+Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a
+short host name and the DNS domain name. Unless you are using bind or NIS
+for host lookups you can change the FQDN and the DNS domain name (which is
+part of the FQDN) in the \fI/etc/hosts\fR file.
+.TP
+.I "\-h, \-\-help"
+Print a usage message and exit.
+.TP
+.I "\-i, \-\-ip-address"
+Display the IP address(es) of the host.
+.TP
+.I "\-n, \-\-node"
+Display the DECnet node name. If a parameter is given (or
+.B \-\-file name
+) the root can also set a new node name.
+.TP
+.I "\-s, \-\-short"
+Display the short host name. This is the host name cut at the first dot.
+.TP
+.I "\-V, \-\-version"
+Print version information on standard output and exit successfully.
+.TP
+.I "\-v, \-\-verbose"
+Be verbose and tell what's going on.
+.TP
+.I "\-y, \-\-yp, \-\-nis"
+Display the NIS domain name. If a parameter is given (or 
+.B \-\-file name
+) then root can also set a new NIS domain.
+.SH FILES
+.B /etc/hosts
+.SH AUTHOR
+Peter Tobias, <tobias@et-inf.fho-emden.de>
+.br
+Bernd Eckenfels, <net-tools@lina.inka.de> (NIS and manpage).
+.br
+Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage).
+
diff --git a/man/en_US/ifconfig.8 b/man/en_US/ifconfig.8
new file mode 100644 (file)
index 0000000..e75cf59
--- /dev/null
@@ -0,0 +1,200 @@
+.TH IFCONFIG 8 "14 August 2000" "net-tools" "Linux Programmer's Manual"
+.SH NAME
+ifconfig \- configure a network interface
+.SH SYNOPSIS
+.B "ifconfig [interface]"
+.br
+.B "ifconfig interface [aftype] options | address ..."
+.SH DESCRIPTION
+.B Ifconfig
+is used to configure the kernel-resident network interfaces.  It is
+used at boot time to set up interfaces as necessary.  After that, it
+is usually only needed when debugging or when system tuning is needed.
+.LP
+If no arguments are given,
+.B ifconfig
+displays the status of the currently active interfaces.  If
+a single
+.B interface
+argument is given, it displays the status of the given interface
+only; if a single
+.B -a
+argument is given, it displays the status of all interfaces, even
+those that are down.  Otherwise, it configures an interface.
+
+.SH Address Families
+If the first argument after the interface name is recognized as
+the name of a supported address family, that address family is
+used for decoding and displaying all protocol addresses.  Currently
+supported address families include
+.B inet
+(TCP/IP, default), 
+.B inet6
+(IPv6),
+.B ax25
+(AMPR Packet Radio),
+.B ddp
+(Appletalk Phase 2),
+.B ipx
+(Novell IPX) and
+.B netrom
+(AMPR Packet radio).
+.SH OPTIONS
+.TP
+.B interface
+The name of the interface.  This is usually a driver name followed by
+a unit number, for example
+.B eth0
+for the first Ethernet interface.
+.TP
+.B up
+This flag causes the interface to be activated.  It is implicitly
+specified if an address is assigned to the interface.
+.TP
+.B down
+This flag causes the driver for this interface to be shut down.
+.TP
+.B "[\-]arp"
+Enable or disable the use of the ARP protocol on this interface.
+.TP
+.B "[\-]promisc"
+Enable or disable the
+.B promiscuous
+mode of the interface.  If selected, all packets on the network will
+be received by the interface.
+.TP
+.B "[\-]allmulti"
+Enable or disable 
+.B all-multicast
+mode.  If selected, all multicast packets on the network will be
+received by the interface.
+.TP
+.B "metric N"
+This parameter sets the interface metric.
+.TP
+.B "mtu N"
+This parameter sets the Maximum Transfer Unit (MTU) of an interface.
+.TP
+.B "dstaddr addr"
+Set the remote IP address for a point-to-point link (such as
+PPP).  This keyword is now obsolete; use the
+.B pointopoint
+keyword instead.
+.TP
+.B "netmask addr"
+Set the IP network mask for this interface.  This value defaults to the
+usual class A, B or C network mask (as derived from the interface IP
+address), but it can be set to any value.
+.TP
+.B "add addr/prefixlen"
+Add an IPv6 address to an interface. 
+.TP
+.B "del addr/prefixlen"
+Remove an IPv6 address from an interface.
+.TP
+.B "tunnel aa.bb.cc.dd"
+Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
+.TP
+.B "irq addr"
+Set the interrupt line used by this device.  Not all devices can
+dynamically change their IRQ setting.
+.TP
+.B "io_addr addr"
+Set the start address in I/O space for this device. 
+.TP
+.B "mem_start addr"
+Set the start address for shared memory used by this device.  Only a
+few devices need this.
+.TP
+.B "media type"
+Set the physical port or medium type to be used by the device.  Not
+all devices can change this setting, and those that can vary in what
+values they support.  Typical values for
+.B type
+are 
+.B 10base2
+(thin Ethernet),
+.B 10baseT
+(twisted-pair 10Mbps Ethernet),
+.B AUI 
+(external transceiver) and so on.  The special medium type of
+.B auto
+can be used to tell the driver to auto-sense the media.  Again, not
+all drivers can do this.
+.TP
+.B "[-]broadcast [addr]"
+If the address argument is given, set the protocol broadcast
+address for this interface.  Otherwise, set (or clear) the
+.B IFF_BROADCAST
+flag for the interface.
+.TP
+.B "[-]pointopoint [addr]"
+This keyword enables the
+.B point-to-point
+mode of an interface, meaning that it is a direct link between two
+machines with nobody else listening on it.
+.br
+If the address argument is also given, set the protocol address of
+the other side of the link, just like the obsolete
+.B dstaddr
+keyword does.  Otherwise, set or clear the
+.B IFF_POINTOPOINT
+flag for the interface. 
+.TP
+.B hw class address
+Set the hardware address of this interface, if the device driver
+supports this operation.  The keyword must be followed by the
+name of the hardware class and the printable ASCII equivalent of
+the hardware address.  Hardware classes currently supported include
+.B ether
+(Ethernet),
+.B ax25
+(AMPR AX.25),
+.B ARCnet
+and
+.B netrom
+(AMPR NET/ROM).
+.TP
+.B multicast
+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 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
+to small values for slower devices with a high latency (modem links, ISDN)
+to prevent fast bulk transfers from disturbing interactive traffic like
+telnet too much. 
+.SH NOTES
+Since kernel release 2.2 there are no explicit interface statistics for
+alias interfaces anymore. The statistics printed for the original address
+are shared with all alias addresses on the same device. If you want per-address
+statistics you should add explicit accounting
+rules for the address using the 
+.BR ipchains(8)
+command.
+.LP
+Interrupt problems with Ethernet device drivers fail with EAGAIN. See
+.I http://cesdis.gsfc.nasa.gov/linux/misc/irq-conflict.html
+for more information.
+.SH FILES
+.I /proc/net/socket 
+.br
+.I /proc/net/dev
+.br
+.I /proc/net/if_inet6
+.SH BUGS
+While appletalk DDP and IPX addresses will be displayed they cannot be
+altered by this command.
+.SH SEE ALSO
+route(8), netstat(8), arp(8), rarp(8), ipchains(8)
+.SH AUTHORS
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
+.br
+Andi Kleen
diff --git a/man/en_US/mii-tool.8 b/man/en_US/mii-tool.8
new file mode 100644 (file)
index 0000000..6b773ec
--- /dev/null
@@ -0,0 +1,78 @@
+.\" Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org
+.\" mii-tool.8 1.5 2000/04/25 22:58:19
+.\"
+.TH MII-TOOL 8 "2000/04/25 22:58:19" "net-tools"
+
+.SH NAME
+mii-tool \- view, manipulate media-independent interface status
+
+.SH SYNOPSIS
+.B mii-tool
+[\fB\-v\fR, \fB\-\-verbose\fR]
+[\fB\-V\fR, \fB\-\-version\fR]
+[\fB\-R\fR, \fB\-\-reset\fR]
+[\fB\-r\fR, \fB\-\-restart\fR]
+[\fB\-w\fR, \fB\-\-watch\fR]
+[\fB\-l\fR, \fB\-\-log\fR]
+[\fB\-A\fR, \fB\-\-advertise=\fImedia,...\fR]
+[\fB\-F\fR, \fB\-\-force=\fImedia\fR]
+.RI [ "interface\ ..." ]
+
+.SH DESCRIPTION
+This utility checks or sets the status of a network interface's Media
+Independent Interface (MII) unit.  Most fast ethernet adapters use an
+MII to autonegotiate link speed and duplex setting.
+.PP
+Most intelligent network devices use an autonegotiation protocol to
+communicate what media technologies they support, and then select the
+fastest mutually supported media technology.  The \fB\-A\fR or
+\fB\-\-advertise\fR options can be used to tell the MII to only
+advertise a subset of its capabilities.  Some passive devices, such as
+single-speed hubs, are unable to autonegotiate.  To handle such
+devices, the MII protocol also allows for establishing a link by
+simply detecting either a 10baseT or 100baseT link beat.  The \fB\-F\fR
+or \fB\-\-force\fR options can be used to force the MII to operate in
+one mode, instead of autonegotiating.  The \fB\-A\fR and \fB-F\fR
+options are mutually exclusive.
+.PP
+The default short output reports the negotiated link speed and link
+status for each interface.  If an interface or interfaces are not
+specified on the command line, then \fBmii-tool\fR will check any
+available interfaces from \fBeth0\fR through \fBeth7\fR.
+.SH OPTIONS
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+Display more detailed MII status information.  If used twice, also
+display raw MII register contents.
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Display program version information.
+.TP
+\fB\-R\fR, \fB\-\-reset\fR
+Reset the MII to its default configuration.
+.TP
+\fB\-r\fR, \fB\-\-restart\fR
+Restart autonegotiation.
+.TP
+\fB\-w\fR, \fB\-\-watch\fR
+Watch interface(s) and report changes in link status.  The MII
+interfaces are polled at one second intervals.
+.TP
+\fB\-l\fR, \fB\-\-log\fR
+Used with \fB-w\fR, records link status changes in the system log
+instead of printing on standard output.
+.TP
+\fB\-F\fI media\fR, \fB\-\-force=\fImedia\fR
+Disable autonegotiation, and force the MII to either \fB100baseTx-FD\fR,
+\fB100baseTx-HD\fR, \fB10baseT-FD\fR, or \fB10baseT-HD\fR operation.
+.TP
+\fB\-A\fI media,...\fR, \fB\-\-advertise=\fImedia,...\fR
+Enable and restart autonegotiation, and advertise only the specified
+media technologies.  Multiple technologies should be separated by
+commas.  Valid media are \fB100baseT4\fR, \fB100baseTx-FD\fR,
+\fB100baseTx-HD\fR, \fB10baseT-FD\fR, and \fB10baseT-HD\fR.
+
+.SH AUTHORS
+David Hinds \- dhinds@pcmcia.sourceforge.org
+.br
+Donald Becker \- becker@scyld.com
diff --git a/man/en_US/nameif.8 b/man/en_US/nameif.8
new file mode 100644 (file)
index 0000000..ff2430f
--- /dev/null
@@ -0,0 +1,35 @@
+.TH NAMEIF 8 "18 Oct 2000" "net-tools" "Linux's Administrator's Manual"
+.SH NAME
+nameif \- name network interfaces based on MAC addresses
+.SH SYNOPSIS
+.B "nameif [-c configfile] [-s]"
+.br
+.B "nameif [-c configfile] [-s] {interface macaddress}"
+.SH DESCRIPTION
+.B nameif 
+renames network interfaces based on mac addresses. When no arguments are
+given 
+.I /etc/mactab
+is read. Each line  of it contains an interface name and a Ethernet MAC 
+address. Comments are allowed starting with #. 
+Otherwise the interfaces specified on the command line are processed.
+.I nameif
+looks for the interface with the given MAC address and renames it to the
+name given.
+
+When the 
+.I -s
+argument is given all error messages go to the syslog.
+
+When the 
+.I -c 
+argument is given with a file name that file is read instead of /etc/mactab.
+
+.SH NOTES
+.I nameif
+should be run before the interface is up, otherwise it'll fail.
+
+.SH FILES
+/etc/mactab
+.SH BUGS
+Only works for Ethernet currently.
diff --git a/man/en_US/netstat.8 b/man/en_US/netstat.8
new file mode 100644 (file)
index 0000000..b33996a
--- /dev/null
@@ -0,0 +1,449 @@
+.\"
+.\" netstat.8 
+.\"
+.\" Original: (mdw@tc.cornell.edu & dc6iq@insu1.etec.uni-karlsruhe.de)
+.\"
+.\" Modified: Bernd.Eckenfels@inka.de
+.\" Modified: Andi Kleen ak@muc.de 
+.\" Modified: Tuan Hoang tqhoang@bigfoot.com 
+.\"
+.\"
+.TH NETSTAT 8 "19 December 2000" "net-tools" "Linux Programmer's Manual"
+
+.SH NAME
+netstat \- Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
+
+.SH SYNOPSIS
+
+.B netstat 
+.RI [ address_family_options ]
+.RB [ \-\-tcp | \-t ]
+.RB [ \-\-udp | \-u ]
+.RB [ \-\-raw | \-w ]
+.RB [ \-\-listening | \-l ]
+.RB [ \-\-all | \-a ]
+.RB [ \-\-numeric | \-n ]
+.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+.RB [ \-\-symbolic | \-N ]
+.RB [ \-\-extend | \-e  [ \-\-extend | \-e] ]
+.RB [ \-\-timers | \-o ]
+.RB [ \-\-program | \-p ]
+.RB [ \-\-verbose | \-v ]
+.RB [ \-\-continuous | \-c]
+.P
+.B netstat 
+.RB { \-\-route | \-r }
+.RI [ address_family_options ]
+.RB [ \-\-extend | \-e  [ \-\-extend | \-e] ]
+.RB [ \-\-verbose | \-v ]
+.RB [ \-\-numeric | \-n ]
+.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+.RB [ \-\-continuous | \-c]
+.P
+.B netstat
+.RB { \-\-interfaces | \-i }
+.RI [ iface ]
+.RB [ \-\-all | \-a ]
+.RB [ \-\-extend | \-e  [ \-\-extend | \-e] ]
+.RB [ \-\-verbose | \-v ]
+.RB [ \-\-program | \-p ]
+.RB [ \-\-numeric | \-n ]
+.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+.RB [ \-\-continuous | \-c]
+.P
+.B netstat
+.RB { \-\-groups | \-g }
+.RB [ \-\-numeric | \-n ]
+.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+.RB [ \-\-continuous | \-c]
+.P
+.B netstat
+.RB { \-\-masquerade | \-M }
+.RB [ \-\-extend | \-e ]
+.RB [ \-\-numeric | \-n ]
+.RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+.RB [ \-\-continuous | \-c]
+.P
+.B netstat
+.RB { \-\-statistics | -s }
+.RB [ \-\-tcp | \-t ]
+.RB [ \-\-udp | \-u ]
+.RB [ \-\-raw | \-w ]
+.P
+.B netstat 
+.RB { \-\-version | \-V }
+.P
+.B netstat 
+.RB { \-\-help | \-h }
+.P
+.IR address_family_options :
+.PP
+.RB [ \-\-protocol= { inet , unix , ipx , ax25 , netrom , ddp }[, ...] ]
+.RB [ \-\-unix | \-x ] 
+.RB [ \-\-inet | \-\-ip ]
+.RB [ \-\-ax25 ]
+.RB [ \-\-ipx ] 
+.RB [ \-\-netrom ]
+.RB [ \-\-ddp ]
+
+.SH DESCRIPTION
+.B Netstat
+prints information about the Linux networking subsystem.  The type of
+information printed is controlled by the first argument, as follows:
+.SS (none)
+By default,
+.B
+netstat 
+displays a list of open sockets.  If you don't specify any
+address families, then the active sockets of all configured address
+families will be printed.
+.SS "\-\-route , \-r"
+Display the kernel routing tables.
+.SS "\-\-groups , \-g"
+Display multicast group membership information for IPv4 and IPv6.
+.SS "\-\-interface=\fIiface \fR, \fB\-i"
+Display a table of all network interfaces, or the specified
+.IR iface ) .
+.SS "\-\-masquerade , \-M"
+Display a list of masqueraded connections.
+.SS "\-\-statistics , \-s"
+Display summary statistics for each protocol.
+.SH OPTIONS
+.SS "\-\-verbose , \-v"
+Tell the user what is going on by being verbose. Especially print some
+useful information about unconfigured address families.
+.SS "\-\-numeric , \-n"
+Show numerical addresses instead of trying to determine symbolic host, port
+or user names.
+.SS "\-\-numeric-hosts"
+shows numerical host addresses but does not affect the resolution of
+port or user names.
+.SS "\-\-numeric-ports"
+shows numerical port numbers but does not affect the resolution of
+host or user names.
+.SS "\-\-numeric-users"
+shows numerical user IDs but does not affect the resolution of host or
+port names.
+
+.SS "\-\-protocol=\fIfamily \fR, \fB\-A"
+Specifies the address families (perhaps better described as low level
+protocols) for which connections are to be shown.
+.I family 
+is a comma (',') separated list of address family keywords like
+.BR inet , 
+.BR unix , 
+.BR ipx , 
+.BR ax25 , 
+.BR netrom ,
+and
+.BR ddp .
+This has the same effect as using the 
+.BR \-\-inet ,
+.BR \-\-unix " (" \-x ),
+.BR \-\-ipx ,
+.BR \-\-ax25 ,
+.BR \-\-netrom ,
+and
+.B \-\-ddp 
+options.
+.P
+The address family
+.B inet
+includes raw, udp and tcp protocol sockets.
+.SS "\-c, \-\-continuous"
+This will cause
+.B netstat
+to print the selected information every second continuously.
+.SS "\-e, \-\-extend"
+Display additional information.  Use this option twice for maximum detail.
+.SS "\-o, \-\-timers"
+Include information related to networking timers.
+.SS "\-p, \-\-program"
+Show the PID and name of the program to which each socket belongs.
+.SS "\-l, \-\-listening"
+Show only listening sockets.  (These are omitted by default.)
+.SS "\-a, \-\-all"
+Show both listening and non-listening sockets.  With the
+.B --interfaces
+option, show interfaces that are not marked 
+.SS "\-F"
+Print routing information from the FIB.  (This is the default.)
+.SS "\-C"
+Print routing information from the route cache.
+.IR UP .
+.P
+.SH OUTPUT
+.P
+.SS Active Internet connections \fR(TCP, UDP, raw)\fR
+.SS "Proto" 
+The protocol (tcp, udp, raw) used by the socket. 
+.SS "Recv-Q"
+The count of bytes not copied by the user program connected to this socket.
+.SS "Send-Q"
+The count of bytes not acknowledged by the remote host.
+.SS "Local Address" 
+Address and port number of the local end of the socket.  Unless the
+.BR \-\-numeric " (" \-n )
+option is specified, the socket address is resolved to its canonical
+host name (FQDN), and the port number is translated into the
+corresponding service name.
+.SS "Foreign Address"
+Address and port number of the remote end of the socket.
+Analogous to "Local Address."
+.SS "State"
+The state of the socket. Since there are no states in raw mode and usually no
+states used in UDP, this column may be left blank. Normally this can be one
+of several values:
+.TP
+.I
+ESTABLISHED
+The socket has an established connection.
+.TP
+.I
+SYN_SENT
+The socket is actively attempting to establish a connection.
+.TP
+.I
+SYN_RECV
+A connection request has been received from the network.
+.TP
+.I
+FIN_WAIT1
+The socket is closed, and the connection is shutting down.
+.TP
+.I
+FIN_WAIT2
+Connection is closed, and the socket is waiting for a shutdown from the
+remote end.
+.TP
+.I
+TIME_WAIT
+The socket is waiting after close to handle packets still in the network.
+.TP
+.I
+CLOSED
+The socket is not being used.
+.TP
+.I
+CLOSE_WAIT
+The remote end has shut down, waiting for the socket to close.
+.TP
+.I
+LAST_ACK
+The remote end has shut down, and the socket is closed. Waiting for
+acknowledgement.
+.TP
+.I
+LISTEN
+The socket is listening for incoming connections.  Such sockets are 
+not included in the output unless you specify the 
+.BR \-\-listening " (" \-l )
+or 
+.BR \-\-all " (" \-a )
+option.
+.TP
+.I
+CLOSING
+Both sockets are shut down but we still don't have all our data
+sent.
+.TP
+.I
+UNKNOWN
+The state of the socket is unknown.
+.SS "User"
+The username or the user id (UID) of the owner of the socket.
+.SS "PID/Program name"
+Slash-separated pair of the process id (PID) and process name of the 
+process that owns the socket.
+.B --program
+causes this column to be included.  You will also need
+.I superuser
+privileges to see this information on sockets you don't own.  This
+identification information is not yet available for IPX sockets.
+.SS "Timer"
+(this needs to be written)
+.P
+.SS Active UNIX domain Sockets
+.SS "Proto" 
+The protocol (usually unix) used by the socket.
+.SS "RefCnt"
+The reference count (i.e. attached processes via this socket).
+.SS "Flags"
+The flags displayed is SO_ACCEPTON (displayed as 
+.BR ACC ),
+SO_WAITDATA 
+.RB ( W )
+or SO_NOSPACE 
+.RB ( N ). 
+SO_ACCECPTON 
+is used on unconnected sockets if their corresponding
+processes are waiting for a connect request. The other flags are not
+of normal interest.
+.SS "Type"
+There are several types of socket access:
+.TP
+.I
+SOCK_DGRAM
+The socket is used in Datagram (connectionless) mode.
+.TP
+.I
+SOCK_STREAM
+This is a stream (connection) socket.
+.TP
+.I
+SOCK_RAW
+The socket is used as a raw socket.
+.TP
+.I
+SOCK_RDM
+This one serves reliably-delivered messages.
+.TP
+.I
+SOCK_SEQPACKET
+This is a sequential packet socket.
+.TP
+.I
+SOCK_PACKET
+Raw interface access socket.
+.TP
+.I
+UNKNOWN
+Who ever knows what the future will bring us - just fill in here :-)
+.PP
+.SS "State"
+This field will contain one of the following Keywords:
+.TP
+.I FREE
+The socket is not allocated
+.TP
+.I LISTENING 
+The socket is listening for a connection request.  Such
+sockets are only included in the output if you specify the
+.BR \-\-listening " (" \-l )
+or
+.BR \-\-all " (" \-a )
+option.
+.TP
+.I CONNECTING
+The socket is about to establish a connection.
+.TP
+.I CONNECTED
+The socket is connected.
+.TP
+.I DISCONNECTING
+The socket is disconnecting.
+.TP
+.I (empty)
+The socket is not connected to another one.
+.TP
+.I UNKNOWN
+This state should never happen.
+.SS "PID/Program name"
+Process ID (PID) and process name of the process that has the socket open. 
+More info available in
+.B "Active Internet connections"
+section written above.
+.SS "Path"
+This is the path name as which the corresponding processes attached
+to the socket.
+.P
+.SS Active IPX sockets
+(this needs to be done by somebody who knows it)
+.P
+.SS Active NET/ROM sockets
+(this needs to be done by somebody who knows it)
+.P
+.SS Active AX.25 sockets
+(this needs to be done by somebody who knows it)
+.PP
+.SH NOTES
+Starting with Linux release 2.2 
+.B netstat -i 
+does not show interface statistics for alias interfaces. To get per
+alias interface counters you need to setup explicit rules using the
+.BR ipchains(8) 
+command.  
+
+.SH FILES
+.ta
+.I /etc/services
+-- The services translation file
+
+.I /proc
+-- Mount point for the proc filesystem, which gives access to kernel 
+status information via the following files.
+
+.I /proc/net/dev
+-- device information
+
+.I /proc/net/raw
+-- raw socket information
+
+.I /proc/net/tcp
+-- TCP socket information
+
+.I /proc/net/udp
+-- UDP socket information
+
+.I /proc/net/igmp
+-- IGMP multicast information
+
+.I /proc/net/unix
+-- Unix domain socket information
+
+.I /proc/net/ipx
+-- IPX socket information
+
+.I /proc/net/ax25
+-- AX25 socket information
+
+.I /proc/net/appletalk
+-- DDP (appletalk) socket information
+
+.I /proc/net/nr
+-- NET/ROM socket information
+
+.I /proc/net/route
+-- IP routing information
+
+.I /proc/net/ax25_route
+-- AX25 routing information
+
+.I /proc/net/ipx_route
+-- IPX routing information
+
+.I /proc/net/nr_nodes
+-- NET/ROM nodelist
+
+.I /proc/net/nr_neigh
+-- NET/ROM neighbours
+
+.I /proc/net/ip_masquerade
+-- masqueraded connections
+
+.I /proc/net/snmp
+-- statistics
+.fi
+.P
+.SH SEE ALSO
+.BR route (8), 
+.BR ifconfig (8), 
+.BR ipchains (8),
+.BR iptables (8),
+.BR proc (5)
+.P
+.SH BUGS
+Occasionally strange information may appear if a socket changes
+as it is viewed. This is unlikely to occur.
+.P
+.SH AUTHORS
+The netstat user interface was written by Fred Baumgarten
+<dc6iq@insu1.etec.uni-karlsruhe.de> the man page basically
+by Matt Welsh <mdw@tc.cornell.edu>. It was updated by
+Alan Cox <Alan.Cox@linux.org> but could do with a bit more
+work.  It was updated again by Tuan Hoang
+<tqhoang@bigfoot.com>.
+.br
+The man page and the command included in the net-tools
+package is totally rewritten by Bernd Eckenfels 
+<ecki@linux.de>.
diff --git a/man/en_US/nisdomainname.1 b/man/en_US/nisdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/en_US/plipconfig.8 b/man/en_US/plipconfig.8
new file mode 100644 (file)
index 0000000..c6d2567
--- /dev/null
@@ -0,0 +1,45 @@
+.TH PLIPCONFIG 8 "17 February 1995" "" ""
+.SH NAME
+plipconfig \- fine tune PLIP device parameters 
+.SH SYNOPSIS
+.B "plipconfig interface"
+.br
+.B "plipconfig interface [nibble NN] [trigger NN] [unit NN]"
+.SH DESCRIPTION
+.B Plipconfig
+is used to (hopefully) improve PLIP performance by changing the default
+timing parameters used by the PLIP protocol. Results are dependent on
+the parallel port hardware, cable, and the CPU speed of each machine
+on each end of the PLIP link.
+.LP
+If the single 
+.B interface
+argument is given,
+.B plipconfig
+displays the status of the given interface
+only.  Otherwise, it will try to set the options.
+.SH OPTIONS
+.TP
+.B "nibble NN"
+Sets the nibble wait value in microseconds. Default is 3000.
+.TP
+.B "trigger NN"
+Sets the trigger wait value in microseconds. Default is 500.
+.LP
+PLIP speed can in some cases be improved by lowering the default values.
+Values which are too low may cause excess use of CPU, poor interrupt 
+response time resulting in serial ports dropping characters, or in dropping
+of PLIP packets. Changing the plip MTU can also affect PLIP speed.
+.SH NOTE
+If you get no response it is far more likely the irq is wrong and needs
+setting with ifconfig. The few cases where the default parameters will
+be too fast are those using very long cables. Something you should
+never do as the parallel port is not specified or designed for driving
+long cable runs.
+.SH SEE ALSO
+.I ifconfig(8)
+.SH BUGS
+Non.
+.SH AUTHOR
+John Paul Morrison, <jmorriso@bogomips.ee.ubc.ca>, <ve7jpm@ve7jpm.ampr.org>
+
diff --git a/man/en_US/rarp.8 b/man/en_US/rarp.8
new file mode 100644 (file)
index 0000000..e462799
--- /dev/null
@@ -0,0 +1,83 @@
+.TH RARP 8 "4 August 1997" "net-tools" "Linux Programmer's Manual"
+.SH NAME
+rarp \- manipulate the system RARP table
+.SH SYNOPSIS
+.B "rarp [-V] [--version] [-h] [--help]"
+.br
+.B "rarp -a"
+.br
+.B "rarp [-v] -d hostname ..."
+.br
+.B "rarp [-v] [-t type] -s hostname hw_addr"
+.SH NOTE
+.P
+This program is obsolete.  From version 2.3, the Linux kernel 
+no longer contains RARP support.  For a replacement RARP daemon, see
+.I
+ftp://ftp.dementia.org/pub/net-tools
+.SH DESCRIPTION
+.B Rarp
+manipulates the kernel's RARP table in various ways.  The primary options
+are clearing an address mapping entry and manually setting up one.  For
+debugging purposes, the
+.B rarp
+program also allows a complete dump of the RARP table.
+.SH OPTIONS
+.TP
+.B \-V
+Display the version of RARP in use.
+.TP
+.B \-v
+Tell the user what is going on by being verbose.
+.TP
+.B "\-t type"
+When setting or reading the RARP table, this optional parameter tells
+.B rarp
+which class of entries it should check for.  The default value of
+this parameter is
+.B ether
+(i.e. hardware code
+.B 0x01
+for
+.B "IEEE 802.3 10Mbps Ethernet".
+Other values might include network technologies such as
+.B AX.25 (ax25)
+and
+.B NET/ROM (netrom).
+.TP
+.B "\-a"
+.TP
+.B "\-\-list"
+Lists the entries in the RARP table.
+.TP
+.B "\-d hostname"
+.TP
+.B "\-\-delete hostname"
+Remove all RARP entries for the specified host.
+.TP
+.B "\-s hostname hw_addr"
+.TP
+.B "\-\-set hostname hw_addr"
+Create a RARP address mapping entry for host
+.B hostname
+with hardware address set to
+.B hw_addr
+.  The format of the hardware address is dependent on the hardware
+class, but for most classes one can assume that the usual presentation
+can be used.  For the Ethernet class, this is 6 bytes in hexadecimal,
+separated by colons.
+.SH WARNING
+Some systems (notably older Suns) assume that the host replying to
+a RARP query can also provide other remote boot services. Therefore 
+never gratuitously add rarp entries unless you wish to meet the wrath
+of the network administrator.
+.SH FILES
+.I /proc/net/rarp,
+.SH SEE ALSO
+arp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTHORS
+Ross D. Martin, <martin@trcsun3.eas.asu.edu>
+.br
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
diff --git a/man/en_US/route.8 b/man/en_US/route.8
new file mode 100644 (file)
index 0000000..f59c074
--- /dev/null
@@ -0,0 +1,326 @@
+.TH ROUTE 8 "2 January 2000" "net-tools" "Linux Programmer's Manual"
+.SH NAME
+route \- show / manipulate the IP routing table
+.SH SYNOPSIS
+.B route
+.RB [ \-CFvnee ]
+.TP
+.B route 
+.RB [ \-v ]
+.RB [ \-A
+family] 
+.B add 
+.RB [ \-net | \-host ] 
+target 
+.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 ] 
+.RB [ \-A
+family]
+.B del 
+.RB [ \-net | \-host ] 
+target 
+.RB [ gw 
+Gw] 
+.RB [ netmask 
+Nm] 
+.RB [ metric 
+N] 
+.RB [[ dev ]
+If]
+.TP
+.B route 
+.RB [ \-V ] 
+.RB [ \-\-version ]
+.RB [ \-h ]
+.RB [ \--help ]
+.SH DESCRIPTION
+.B Route
+manipulates the kernel's IP routing tables.  Its primary use is to set
+up static routes to specific hosts or networks via an interface after
+it has been configured with the
+.BR ifconfig (8)
+program.
+
+When the
+.B add
+or
+.B del
+options are used,
+.B route
+modifies the routing tables.  Without these options,
+.B route
+displays the current contents of the routing tables.
+
+.SH OPTIONS
+.TP
+.B \-A family
+use the specified address family (eg `inet'; use `route --help' for a full 
+list).
+
+.TP 
+.B -F
+operate on the kernel's FIB (Forwarding Information Base) routing
+table. 
+This is the default.
+.TP 
+.B -C
+operate on the kernel's routing cache.
+
+.TP
+.B \-v
+select verbose operation.
+.TP
+.B \-n
+show numerical addresses instead of trying to determine symbolic host
+names. This is useful if you are trying to determine why the route to your
+nameserver has vanished.
+.TP
+.B \-e
+use
+.BR netstat (8)-format
+for displaying the routing table.
+.B \-ee 
+will generate a very long line with all parameters from the routing table.
+
+.TP
+.B del
+delete a route.
+.TP 
+.B add 
+add a new route.
+.TP
+.B target
+the destination network or host. You can provide IP addresses in dotted
+decimal or host/network names.
+.TP
+.B \-net
+the
+.B target
+is a network.
+.TP
+.B -host
+the
+.B target 
+is a host.
+.TP
+.B netmask NM
+when adding a network route, the netmask to be used.
+.TP
+.B gw GW
+route packets via a gateway.
+.B NOTE:
+The specified gateway must be reachable first. This usually means that
+you have to set up a static route to the gateway beforehand. If you specify
+the address of one of your local interfaces, it will be used to decide about
+the interface to which the packets should be routed to. This is a BSDism
+compatibility hack.
+.TP
+.B metric M
+set the metric field in the routing table (used by routing daemons) to M.
+.TP 
+.B mss M
+set the TCP Maximum Segment Size (MSS) for connections over this route
+to M bytes. 
+The default is the device MTU minus headers, or a lower MTU when path mtu 
+discovery occured. This setting can be used to force smaller TCP packets on the
+other end when path mtu discovery does not work (usually because of
+misconfigured firewalls that block ICMP Fragmentation Needed)
+.TP 
+.B window W 
+set the TCP window size for connections over this route to W
+bytes. This is typically only used on AX.25 networks and with drivers
+unable to handle back to back frames.
+.TP
+.B irtt I
+set the initial round trip time (irtt) for TCP connections over this
+route to I milliseconds (1-12000). This is typically only used on
+AX.25 networks. If omitted the RFC 1122 default of 300ms is used.
+.TP
+.B reject
+install a blocking route, which will force a route lookup to fail.
+This is for example used to mask out networks before using the default
+route.  This is NOT for firewalling.
+.TP
+.B mod, dyn, reinstate
+install a dynamic or modified route. These flags are for diagnostic
+purposes, and are generally only set by routing daemons.
+.TP
+.B dev If
+force the route to be associated with the specified device, as the
+kernel will otherwise try to determine the device on its own (by
+checking already existing routes and device specifications, and where
+the route is added to). In most normal networks you won't need this.
+
+If 
+.B dev If
+is the last option on the command line, the word 
+.B dev
+may be omitted, as it's the default. Otherwise the order of the route
+modifiers (metric - netmask - gw - dev) doesn't matter.
+
+.SH EXAMPLES
+.TP
+.B route add -net 127.0.0.0
+adds the normal loopback entry, using netmask 255.0.0.0 (class A net,
+determined from the destination address) and associated with the 
+"lo" device (assuming this device was prviously set up correctly with
+.BR ifconfig (8)). 
+
+.TP 
+.B route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
+adds a route to the network 192.56.76.x via 
+"eth0". The Class C netmask modifier is not really necessary here because
+192.* is a Class C IP address. The word "dev" can be omitted here. 
+
+.TP
+.B route add default gw mango-gw
+adds a default route (which will be used if no other route matches).
+All packets using this route will be gatewayed through "mango-gw". The
+device which will actually be used for that route depends on how we
+can reach "mango-gw" - the static route to "mango-gw" will have to be
+set up before. 
+
+.TP
+.B route add ipx4 sl0
+Adds the route to the "ipx4" host via the SLIP interface (assuming that
+"ipx4" is the SLIP host).
+
+.TP
+.B route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
+This command adds the net "192.57.66.x" to be gatewayed through the former
+route to the SLIP interface.
+
+.TP
+.B route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
+This is an obscure one documented so people know how to do it. This sets
+all of the class D (multicast) IP routes to go via "eth0". This is the
+correct normal configuration line with a multicasting kernel. 
+
+.TP
+.B route add -net 10.0.0.0 netmask 255.0.0.0 reject
+This installs a rejecting route for the private network "10.x.x.x."
+
+.LP
+.SH OUTPUT
+The output of the kernel routing table is organized in the following columns
+.TP
+.B Destination     
+The destination network or destination host.
+.TP
+.B Gateway
+The gateway address or '*' if none set.
+.TP
+.B Genmask         
+The netmask for the destination net; '255.255.255.255' for a host destination
+and '0.0.0.0' for the 
+.B default
+route.
+.TP
+.B Flags 
+Possible flags include
+.br
+.B U
+(route is
+.BR up )
+.br
+.B H
+(target is a
+.BR host )
+.br
+.B G
+(use
+.BR gateway )
+.br
+.B R
+.RB ( reinstate
+route for dynamic routing)
+.br
+.B D
+.RB ( dynamically
+installed by daemon or redirect)
+.br
+.B M
+.RB ( modified
+from routing daemon or redirect)
+.br
+.B A
+(installed by
+.BR addrconf )
+.br
+.B C
+.RB ( cache
+entry)
+.br
+.B !
+.RB ( reject
+route)
+.TP
+.B Metric 
+The 'distance' to the target (usually counted in hops). It is not used by
+recent kernels, but may be needed by routing daemons.
+.TP
+.B Ref    
+Number of references to this route. (Not used in the Linux kernel.)
+.TP
+.B Use
+Count of lookups for the route.  Depending on the use of -F and -C this will
+be either route cache misses (-F) or hits (-C).
+.TP
+.B Iface
+Interface to which packets for this route will be sent.
+.TP
+.B MSS 
+Default maximum segement size for TCP connections over this route.
+.TP
+.B Window  
+Default window size for TCP connections over this route.
+.TP
+.B irtt
+Initial RTT (Round Trip Time). The kernel uses this to guess about the best
+TCP protocol parameters without waiting on (possibly slow) answers.
+.TP
+.B HH (cached only)
+The number of ARP entries and cached routes that refer to the hardware
+header cache for the cached route. This will be \-1 if a hardware
+address is not needed for the interface of the cached route (e.g. lo).
+.TP
+.B Arp (cached only)
+Whether or not the hardware address for the cached route is up to date.
+.LP
+.SH FILES
+.I /proc/net/ipv6_route
+.br
+.I /proc/net/route
+.br
+.I /proc/net/rt_cache
+.LP
+.SH SEE ALSO
+.I ifconfig(8), netstat(8), arp(8), rarp(8)
+.LP
+.SH HISTORY
+.B Route
+for Linux was originally written by Fred N.  van Kempen,
+<waltje@uwalt.nl.mugnet.org> and then modified by Johannes Stille and
+Linus Torvalds for pl15. Alan Cox added the mss and window options for
+Linux 1.1.22. irtt support and merged with netstat from Bernd Eckenfels.
+.SH AUTHOR
+Currently maintained by Phil Blundell <Philip.Blundell@pobox.com>.
diff --git a/man/en_US/slattach.8 b/man/en_US/slattach.8
new file mode 100644 (file)
index 0000000..0c4c863
--- /dev/null
@@ -0,0 +1,95 @@
+.TH SLATTACH 8 "12 Feb 1994" "" ""
+.SH NAME
+slattach \- attach a network interface to a serial line
+.SH SYNOPSIS
+.B "slattach [-dehlLmnqv] [-c command] [-p proto] [-s speed] [tty]"
+.br
+.SH DESCRIPTION
+.B Slattach
+is a tiny little program that can be used to put a normal terminal
+("serial") line into one of several "network" modes, thus allowing
+you to use it for point-to-point links to other computers.
+.SH OPTIONS
+.TP
+.B "[-c command]"
+Execute
+.B command
+when the line is hung up. This can be used to run scripts or re-establish
+connections when a link goes down.
+.TP
+.B "[-d]"
+Enable debugging output.  Useful when determining why a given
+setup doesn't work.
+.TP
+.B "[-h]"
+Exit when the carrier is lost. This works on both /dev/tty and /dev/cua
+devices by directly monitoring the carrier status every 15 seconds.
+.B "[-v]"
+Enable verbose output.  Useful in shell scripts.
+.TP
+.B "[-q]"
+Operate in quiet mode - no messages at all.
+.TP
+.B "[-l]"
+Create an UUCP-style lockfile for the device in /var/lock.
+.TP
+.B "[-n]"
+Equivalent to the "mesg n" command.
+.TP
+.B "[-m]"
+Do \fBnot\fP initialize the line into 8 bits raw mode.
+.TP
+.B "[-e]"
+Exit right after initializing device, instead of waiting for the
+line to hangup.
+.TP
+.B "[-L]"
+Enable 3 wire operation. The terminal is moved into CLOCAL mode, 
+carrier watching is disabled.
+.TP
+.B "[-p proto]"
+Set a specific kind of protocol to use on the line.  The default
+is set to
+.B "cslip"
+, i.e. compressed SLIP.  Other possible values are
+.B "slip"
+(normal SLIP), 
+.B "adaptive"
+(adaptive CSLIP/SLIP),
+.B "ppp"
+(Point-to-Point Protocol)
+and
+.B "kiss"
+(a protocol used for communicating with AX.25 packet radio terminal node controllers).
+The special argument
+.B "tty"
+can be used to put the device back into normal serial operation.
+Using 'ppp' mode is not normally useful as ppp requires an additional ppp daemon
+.B pppd
+to be active on the line. For kiss connections the 
+.B axattach
+program should be used.
+.TP
+.B "[-s speed]"
+Set a specific line speed, other than the default.
+.PP
+If no arguments are given, the current terminal line (usually: the
+login device) is used.  Otherwise, an attempt is made to claim the
+indicated terminal port, lock it, and open it.
+.SH FILES
+.I /dev/cua* /var/lock/LCK.*
+.SH BUGS
+None known.
+.SH SEE ALSO
+axattach(8), dip(8) pppd(8), sliplogin(8).
+.SH AUTHORS
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Miquel van Smoorenburg, <miquels@drinkel.ow.org>
+.br
+George Shearer, <gshearer@one.net>
+.br
+Yossi Gottlieb, <yogo@math.tau.ac.il>
+.br
diff --git a/man/en_US/ypdomainname.1 b/man/en_US/ypdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/fr_FR/arp.8 b/man/fr_FR/arp.8
new file mode 100644 (file)
index 0000000..df37e8b
--- /dev/null
@@ -0,0 +1,184 @@
+.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Programmer's Manual"
+.SH NOM
+arp \- manipule la table ARP du système
+.SH SYNOPSIS
+.B arp 
+.RB [ \-vn ] 
+.RB [ "\-H type" ] 
+.RB [ "-i if" ] 
+.B -a 
+.RB [ nom_hôte ]
+.PP
+.B arp 
+.RB [ \-v ]
+.RB [ "\-i if" ] 
+.B "\-d nom_hôte"
+.RB [ pub ]
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -s nom_hôte hw_addr
+.RB [ temp ] 
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -s nom_hôte hw_addr
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-v ] 
+.RB [ "\-H type" ] 
+.RB [ "\-i if" ] 
+.B -Ds nom_hôte ifa
+.RB [ "netmask nm" ] 
+.B pub
+.PP
+.B arp 
+.RB [ \-vnD ]
+.RB [ "\-H type" ] 
+.RB [ "-i if" ]
+.B -f nom_fichier
+
+.SH DESCRIPTION
+.B Arp
+manipule la table ARP du noyau de différentes façons.  Les options principales
+permettent d'effacer une correspondance d'adresses   et d'en définir
+une manuellement.
+Pour les besoins de débogage, le programme
+.B arp
+permet aussi d'effectuer un dump complet de la table ARP.
+.SH OPTIONS
+.TP
+.B "\-v, \-\-verbose"
+Dit à l'utilisateur ce qui se passe en étant verbeux.
+.TP
+.B "\-n, \-\-numeric"
+Affiche les adresses numériques au lieu d'essayer de déterminer les nom
+d'hôtes symboliques.
+.TP
+.B "\-H type, \-\-hw-type type"
+En positionnant ou lisant les entrées ARP, ce paramètre optionnel indique
+à 
+.B arp
+les classes d'entrées qu'il doit contrôler.  La valeur par défaut de
+ce paramètre est
+.B ether
+(i.e. code de matériel
+.B 0x01
+pour
+.B "IEEE 802.3 10Mbps Ethernet".
+D'autres valeurs doivent correspondre à des technologies réseaux telles que
+.RB "ARCnet (" arcnet ")"
+,
+.RB "PROnet (" pronet ")"
+,
+.RB "AX.25 (" ax25 ")"
+and
+.RB "NET/ROM (" netrom ")."
+.TP
+.B "\-a [nom_d_hôte], \-\-display [nom_d_hôte]"
+Affiche les entrées concernant l'hôte spécifié.  Si le paramètre
+.B nom_d_hôte
+n'est pas utilisé,
+.B toutes
+les entrées seront affichées.
+.TP
+.B "\-d nom_d_hôte, \-\-delete nom_d_hôte"
+Enlève une entrée pour l'hôte spécifié.  Ceci peut être
+utilisé si l'hôte concerné ne fonctionne plus, par exemple.
+.TP
+.B "\-D, \-\-use-device"
+Utilise l'adresse matérielle de l'interface
+.BR ifa
+.
+.TP
+.B "\-i If, \-\-device If"
+Sélectionne une interface. Lors du dump du cache ARP, seules les entrées
+correspondant à l'interface spécifiée seront affichées. Lorsque l'on définit
+une entrée permanente ou une entrée
+.B temp
+, cette interface lui sera associée; si cette option n'est pas utilisée,
+le noyau fera des tentatives de résolution selon la table de routage. Pour
+les entrées 
+.B pub
+l'interface spécifiée est celle pour laquelle les requêtes ARP auront trouvé
+une réponse. 
+.br
+.B NOTE:
+Ceci est différent de l'interface vers laquelle les datagrammes IP seront routés.
+.TP
+.B "\-s nom_d_hôte hw_addr, \-\-set hostname hw_addr"
+Crée manuellement une correspondance d'adresses ARP pour l'hôte
+.B nom_d_hôte
+avec l'adresse matérielle positionnée à
+.B hw_addr.
+Le format de l'adresse matérielle est dépendant de la classe du matériel,
+mais pour la plupart on peut considérer que la présentation classique
+peut être utilisée.  Pour la classe Ethernet, c'est 6 octets en hexadécimal,
+séparés par des double-points. Pour ajouter des entrées proxy-arp
+(Ce sont celles avec l'indicateur
+.BR pub lish 
+positionné)
+un masque réseau (
+.B netmask 
+) peut être spécifié au proxy-arp pour le
+sous-réseau entier. Ceci n'est pas très recommandé, mais est supporté par
+les anciens noyaux, car c'est utile dans certains cas. Si l'indicateur
+.B temp
+n'est pas fourni, les entrées ARP seront permanentes.
+.br
+.B NOTE:
+A partir du noyau 2.2.0 il n'est plus possible de définir des entrées ARP
+pour un sous réseau entier.
+.TP
+.B "\-f nom_de_fichier, \-\-file nom_de_fichier"
+Similaire à l'option 
+.B \-s
+, mais cette fois les informations d'adresses sont prises dans le fichier
+.B nom_de_fichier
+. Ceci peut être utilisé si les entrées ARP à configurer sont
+nombreuses.  Le nom du fichier de données est très souvent nommé
+.B /etc/ethers
+, mais ce n'est pas officiel.
+.sp 1
+Le format du fichier est simple; Il contient
+seulement des lignes de texte ASCII avec sur chaque ligne un nom d'hôte et
+une adresse matérielle, séparés par des espaces. Les indicateurs
+.BR "pub" , " temp" " et" " netmask"
+peuvent également être utilisés.
+.LP
+A tous les endroits où un
+.B nom d'hôte
+est attendu, on peut aussi entrer une
+.B "addresse IP"
+en notation décimale pointée.
+.LP
+Chaque entrée complète se trouvant dans le cache ARP est marquée de
+l'indicateur
+.B C
+. Les entrées permanentes sont marquées de l'indicateur
+.B M
+et les entrées 'pub' ont l'indicateur
+.B P
+.
+.SH FICHIERS
+.I /proc/net/arp,
+.br
+.I /etc/networks
+.br
+.I /etc/hosts
+.br
+.I /etc/ethers
+.SH VOIR AUSSI
+rarp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTEUR
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> avec les améliorations
+apportées par le mainteneur des net-tools Bernd Eckenfels
+<net-tools@lina.inka.de>.
+.SH TRADUCTION
+Jean Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/dnsdomainname.1 b/man/fr_FR/dnsdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/fr_FR/domainname.1 b/man/fr_FR/domainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/fr_FR/ethers.5 b/man/fr_FR/ethers.5
new file mode 100644 (file)
index 0000000..5e70929
--- /dev/null
@@ -0,0 +1,37 @@
+.\"
+.\" Original by ??
+.\"
+.\" French translation by J.M.Vansteene (vanstee@worldnet.fr)
+.\"
+.TH ETHERS 5 "26 Avril 1996" "" "Formats de fichiers"
+.SH NOM \"{{{roff}}}\"{{{
+ethers \- Base de données adresses Ethernet - adresses IP
+.\"}}}
+.SH DESCRIPTION \"{{{
+\fB/etc/ethers\fP contient des adresses Ethernet sur 48 bits et leur
+adresse IP correspondante, une ligne par adresses IP:
+.sp
+.RS
+\fIAdresse-Ethernet\fP  \fIAdresse-IP\fP
+.RE
+.sp
+Les deux items sont séparés par un ou plusieurs espaces et/ou tabulations.
+Un \fB#\fP en début de ligne est un commentaire pour tout le reste de la ligne.
+L'\fIadresse-Ethernet\fP est écrite sous la forme
+.IR x : x : x : x : x : x ,
+où \fIx\fP est une valeur héxadecimale comprise entre \fB0\fP et \fBff\fP
+représentant un octet de l'adresse, dans l'ordre du réseau (big-endian).
+L'\fIAdresse-IP\fP peut être soit un nom d'hôte résolu par DNS ou une adresse
+en notation décimale pointée.
+.\"}}}
+.SH EXEMPLES \"{{{
+08:00:20:00:61:CA  pal
+.\"}}}
+.SH FICHIERS \"{{{
+/etc/ethers
+.\"}}}
+.SH "VOIR AUSSI" \"{{{
+rarp(8)
+.\"}}}
+.SH TRADUCTION
+Jean Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/hostname.1 b/man/fr_FR/hostname.1
new file mode 100644 (file)
index 0000000..c4cd412
--- /dev/null
@@ -0,0 +1,212 @@
+.TH HOSTNAME 1 "15 Mars 1999" "net-tools" "Linux Programmer's Manual"
+.SH NOM
+hostname \- affiche ou définit le nom d'hôte du système
+.br
+domainname \- affiche le nom de domaine NIS/YP du système
+.br
+dnsdomainname \- affiche le nom de domaine du système
+.br
+nisdomainname \- affiche ou définit le nom de domaine NIS/YP du système
+.br
+ypdomainname \- affiche ou définit le nom de domaine NIS/YP du système
+.br
+nodename \- affiche ou définit le nom de domaine DECnet du système
+
+.SH SYNOPSIS
+.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 ]
+.RB [ \-n ]
+.RB [ \-\-node ]
+
+.PP
+.B hostname 
+.RB [ \-v ]
+.RB [ \-F\ nom_fichier ]
+.RB [ \-\-file\ nom_fichier ]
+.RB [ hostname ]
+
+.PP
+.B domainname
+.RB [ \-v ]
+.RB [ \-F\ nom_fichier ]
+.RB [ \-\-file\ nom_fichier ]
+.RB [ name ]
+
+.PP 
+.B nodename
+.RB [ \-v ]
+.RB [ \-F\ nom_fichier ]
+.RB [ \-\-file\ nom_fichier ]
+.RB [ name ]
+
+.PP
+.B hostname
+.RB [ \-v ]
+.RB [ \-h ]
+.RB [ \-\-help ]
+.RB [ \-V ]
+.RB [ \-\-version ]
+
+.PP
+.B dnsdomainname
+.RB [ \-v ]
+.br
+.B nisdomainname
+.RB [ \-v ]
+.br
+.B ypdomainname
+.RB [ \-v ]
+
+.SH DESCRIPTION
+.B Hostname
+est le programme utilisé soit pour définir le nom d'hôte, soit
+pour visualiser le nom d'hôte ou de domaine du système. Ce nom est
+utilisé par différents programmes réseaux pour identifier la machine. Le
+nom de domaine est également utilisé par les NIS/YP.
+
+.SS "OBTENTION DU NOM"
+Appelé sans argument, le programme affiche les noms courants:
+
+.LP
+.B hostname
+fournit le nom du système tel qu'il est retourné par la fonction
+.BR getdomainname (2)
+. Ceci est connu comme nom de domaine YP/NIS du système.
+
+
+.LP
+.B nodename
+fournit le nom de noeud DECnet du système tel qu'il est retourné par la
+fonction
+.BR getnodename (2)
+.
+
+.LP
+.B dnsdomainname
+fournit la partie domaine du nom complètement qualifié - FQDN (Fully
+Qualified Domain Name). Le nom FQDN du système est retourné par la commande
+.BR "hostname \-\-fqdn" .
+
+.SS "SET NAME"
+Appelé avec un argument ou avec l'option
+.B \-\-file
+, la commande définit le nom d'hôte, le nom de domaine NIS/YP ou
+le nom de noeud. 
+
+.LP
+Notez que seul le super-utilisateur peut changer les noms.
+
+.LP
+Il n'est pas possible de définir le nom FQDN ou le nom de domaine DNS avec
+la commande 
+.B dnsdomainname 
+ (voir 
+.B "LE FQDN"
+ci-dessous).
+
+.LP
+Le nom d'hôte est générallement définit une seule fois, au
+démarrage du système, par le script de configuration
+.I /etc/rc.d/rc.inet1.
+ou
+.I /etc/init.d/boot
+(normallement en lisant un fichier contenant ce nom, p.ex. 
+.IR /etc/hostname ).
+
+.SS LE FQDN
+Vous pouvez modifier le FQDN (tel que fourni par la commande 
+.BR "hostname \-\-fqdn" ) 
+ou le nom de domaine DNS (tel que fourni par la commande
+.BR "dnsdomainname" ) 
+avec cette commande. Le FQDN du système est le nom que le resolveur (
+.BR resolver (3)
+ ) retourne comme nom d'hôte. 
+
+.LP
+Techniquement: Le FQDN est le nom fourni par
+.BR gethostbyname (2)
+à partir du nom d'hôte retourné par
+.BR gethostname (2).
+Le nom de domaine DNS est la partie suivant le premier point.
+.LP
+La façon dont vous pouvez le changer dépend de la configuration
+(habituellement dans 
+.IR /etc/host.conf )
+. Si le fichier 'hosts' est analysé avant d'interroger le DNS ou 
+NIS) vous pouvez le changer dans le fichier 
+.IR /etc/hosts .
+
+.SH OPTIONS
+.TP
+.I "\-a, \-\-alias"
+Affiche l'alias de l'hôte (si utilisé).
+.TP
+.I "\-d, \-\-domain"
+Affiche le nom du domaine DNS. Ne pas utiliser la commande
+.B domainname
+pour obtenir le nom de domaine DNS car vous obtiendrez en réalité le
+nom de domaine NIS. Utilisez plutôt la commande
+.B dnsdomainname 
+.
+.TP
+.I "\-F, \-\-file nom_fichier"
+Lit le nom d'hôte à partir du fichier spécifié. Les commentaires (lignes commençant
+par un `#') sont ignorés.
+.TP
+.I "\-f, \-\-fqdn, \-\-long"
+Affiche le nom pleinement qualifié - FQDN (Fully Qualified Domain Name). un
+FQDN consiste en un nom d'hôte court et un nom de domaine. A moins que vous
+utilisiez 'bind' ou les NIS pour la recherche d'hôtes, vous pouvez changer
+le nom FQDN et le nom de domaine (qui fait partie du FQDN) dans le fichier
+\fI/etc/hosts\fR.
+.TP
+.I "\-h, \-\-help"
+Affiche un message d'aide et se termine.
+.TP
+.I "\-i, \-\-ip-address"
+Affiche la (les) adresse(s) IP de l'hôte.
+.TP
+.I "\-n, \-\-node"
+Affiche le nom de noeud DECnet. Si un paramètre est fourni (ou
+.B \-\-file nom_fichier
+) le super-utilisateur peut également définir un nouveau nom de neud.
+.TP
+.I "\-s, \-\-short"
+Affiche le nom d'hôte en format court. Il s'agit du nom d'hôte coupé au
+premier point.
+.TP
+.I "\-V, \-\-version"
+Affiche les informations sur la version sur la sortie standard et se
+termine correctement.
+.TP
+.I "\-v, \-\-verbose"
+Mode verbeux.
+.TP
+.I "\-y, \-\-yp, \-\-nis"
+Affiche le nom de domaine NIS. Si un paramètre est fourni (ou
+.B \-\-file nom_fichier
+) le super-utilisateur peut également définir un nouveau nom de domaine NIS.
+.SH FICHIERS
+.B /etc/hosts
+.SH AUTEURS
+Peter Tobias, <tobias@et-inf.fho-emden.de>
+.br
+Bernd Eckenfels, <net-tools@lina.inka.de> (NIS et pages de manuel).
+.br
+Steve Whitehouse, <SteveW@ACM.org> (Support DECnet et pages de manuel).
+.SH TRADUCTION
+Jean Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/ifconfig.8 b/man/fr_FR/ifconfig.8
new file mode 100644 (file)
index 0000000..0c29eb0
--- /dev/null
@@ -0,0 +1,209 @@
+.TH IFCONFIG 8 "4 August 1997" "net-tools" "Linux Programmer's Manual"
+.SH NOM
+ifconfig \- configure une interface réseau
+.SH SYNOPSIS
+.B "ifconfig [interface]"
+.br
+.B "ifconfig interface [aftype] options | adresse ..."
+.SH DESCRIPTION
+.B Ifconfig
+est utilisé pour configurer (et maintenir ensuite) les interfaces
+réseau résidentes dans le noyau.  Il est utilisé lors du boot pour
+configurer la plupart d'entre-elles et ainsi rendre le système
+opérationnel.  Après, ce n'est quasiment plus utilisé que pour
+le débogage ou pour des réglages si nécessaire.
+.LP
+Si aucun argument n'est donné,
+.B ifconfig
+affiche simplement l'état des interfaces actuellement définies. Si
+seul le paramètre
+.B interface
+est donné, il affiche seulement l'état de l'interface correspondante;
+si seul le paramètre
+.B -a
+est fourni, il affiche l'état de toutes les interfaces, même celles qui
+ne sont pas actives.
+Autrement, il considère qu'il faut positionner de nouvelles valeurs.
+
+.SH Familles d'adresses
+Si le premier argument après le nom de l'interface est reconnu comme
+étant un nom de famille d'adresses supporté, cette famille d'adresses
+est utilisée pour décoder et afficher toutes les adresses
+protocolaires.  Les familles d'adresses actuellement supportées comprennent
+.B inet
+(TCP/IP, default) 
+.B ax25
+(AMPR Packet Radio.) 
+.B ddp
+(Appletalk Phase 2) and
+.B ipx
+(Novell IPX).
+.SH OPTIONS
+.TP
+.B interface
+Le nom de l'interface réseau.  C'est généralement un nom de pilote suivi
+d'un numéro d'ordre comme
+.B eth0
+pour la première interface Ethernet.
+.TP
+.B up
+Cette option active l'interface.  Elle est implicitement spécifiée
+si une nouvelle adresse est affectée à l'interface (voir plus loin).
+.TP
+.B down
+Cette option arrête le fonctionnement du pilote pour cette interface, et
+est utilisée lorsque les choses commencent à aller mal.
+.TP
+.B "[\-]arp"
+Valide ou invalide l'utilisation du protocole ARP sur cette interface. Si
+le signe moins (\-) est présent, l'option est invalidée.
+.TP
+.B "[\-]promisc"
+Valide ou invalide le mode
+.B promiscuous
+.  S'il est validé, tous les paquets circulant sur le réseau
+seront reçus sur cette interface.
+.TP
+.B "[\-]allmulti"
+Valide ou invalide le fonctionnement de l'interface en mode
+.B all-multicast
+.  S'il est validé, tous les paquets multicast circulant sur le réseau
+seront reçus sur cette interface.
+.TP
+.B "metric N"
+Ce paramètre définit la métrique de l'interface. Il n'est pour
+l'instant pas implémenté, mais le sera prochainement.
+.TP
+.B "mtu N"
+Ce     paramètre  définit le  MTU     (Maximum  Transfer Unit)  d'une
+interface.
+.TP
+.B "dstaddr adr"
+Définit l'adresse IP de "l'autre bout" dans le cas d'un lien
+point-à-point, comme PPP. Ce paramètre est obsolète; utilisez plutôt
+le paramètre 
+.B pointopoint.
+.TP
+.B "netmask adr"
+Définit le masque de réseau IP pour cette interface. La valeur par
+défaut de cette valeur correspond au masque réseau usuel pour les
+classes A, B ou C (déduite de l'adresse IP), mais toute autre valeur peut
+être définie selon les besoins en sous-réseaux.
+.TP
+.B "add adr/lg_prefix"
+Ajoute une adresse IPv6 à une interface. 
+.TP
+.B "del adr/lg_prefix"
+Supprime une adresse IPv6 d'une interface.
+.TP
+.B "tunnel aa.bb.cc.dd"
+Crée un nouveau périphérique SIT (IPv6-dans-IPv4), en mode
+tunnel jusqu'à la destination.
+.TP
+.B "irq adr"
+Définit la ligne d'interruption utilisée par ce
+périphérique. Certains périphériques ne supportent pas le
+changement dynamique de l'IRQ.
+.TP
+.B "io_addr adr"
+Définit pour ce périphérique, l'adresse de début dans l'espace
+d'entrée-sortie I/O.
+.TP
+.B "mem_start adr"
+Définit l'adresse de début de mémoire partagée pour ce périphérique. Seuls
+quelques périphériques ont besoin de ce paramètre.
+.TP
+.B "media type"
+Définit le port physique ou le type de medium utilisé par ce périphérique.
+Tous les périphériques ne peuvent pas changer de configuration et les
+valeurs supportées varient de l'un à l'autre. Les valeur typiques sont
+.B 10base2
+(Ethernet fin),
+.B 10baseT
+(10Mbps Ethernet paire torsadée),
+.B AUI 
+(transceiver externe) etc.  Le type
+.B auto
+permet d'indiquer au pilote de détecter automatiquement le medium
+utilisé. Une fois de plus, tous les périphériques ne supportent pas cette
+option.
+.TP
+.B "[-]broadcast [adr]"
+Si l'adresse est également donnée, définit l'adresse broadcast
+protocolaire pour cette interface. Autrement, il permet d'armer (ou désarmer)
+l'indicateur
+.B IFF_BROADCAST
+de l'interface.
+.TP
+.B "[-]pointopoint [adr]"
+Ce mot clé valide le mode
+.B point-à-point
+d'une interface, signifiant qu'il existe un lien direct entre 2 machines,
+sans que personne d'autre ne puisse être à l'écoute.
+.br
+Si l'argument d'adresse est également donné, il définit l'adresse
+de l'autre machine, de la même manière que le paramètre obsolète
+.B dstaddr
+.
+Autrement il arme (ou désarme) l'indicateur 
+.B IFF_POINTOPOINT
+de l'interface.
+.TP
+.B hw classe adresse
+Définit l'adresse matérielle de l'interface, si le pilote du
+périphérique supporte cette opération. Le mot clé doit être
+suivi du nom de la classe matérielle et de l'adresse matérielle en
+caractères imprimables ASCII. Les classes matérielles actuellement
+supportées comprennent 
+.B ether
+(Ethernet),
+.B ax25
+(AMPR AX.25),
+.B ARCnet
+et
+.B netrom
+(AMPR NET/ROM).
+.TP
+.B multicast
+Positionne l'indicateur multicast sur l'interface. Elle n'est
+généralement pas nécessaire puisque les pilotes positionnent
+l'option correcte eux même.
+.TP
+.B adresse
+L'adresse IP de cette interface.
+.TP
+.B txqueuelen length
+Set the length of the transmit queue of the device. It is useful to set this
+to small values for slower devices with a high latency (modem links, ISDN)
+to prevent fast bulk transfers from disturbing interactive traffic like
+telnet too much. 
+.SH NOTES
+Depuis le noyau 2.2 il n'y a plus de statistiques d'interface explicite
+pour les interfaces en alias. Les statistiques affichées pour la véritable
+adresse sont partagées avec toutes les adresses alias du même périphérique.
+Si vous voulez des adresses par interface, vous devez ajouter des règles de
+comptabilité particulières pour l'adresse en utilisant la commande 
+.BR ipchains(8)
+.
+
+.SH FICHIERS
+.I /proc/net/socket 
+.br
+.I /proc/net/dev
+.br
+.I /proc/net/if_inet6
+.SH BUGS
+Même si les adresses appletalk DDP et IPX peuvent être affichées,
+elles ne peuvent être modifiées avec cette commande.
+.SH VOIR AUSSI
+route(8), netstat(8), arp(8), rarp(8), ipchains(8)
+.SH AUTHORS
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
+.br
+Andi Kleen, 
+.SH TRADUCTION
+Jean-Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/netstat.8 b/man/fr_FR/netstat.8
new file mode 100644 (file)
index 0000000..bf16bc6
--- /dev/null
@@ -0,0 +1,501 @@
+.\"
+.\" netstat.8 
+.\"
+.\" Original: (mdw@tc.cornell.edu & dc6iq@insu1.etec.uni-karlsruhe.de)
+.\"
+.\" Modified: Bernd.Eckenfels@inka.de
+.\" Modified: Andi Kleen ak@muc.de 
+.\" Modified: Tuan Hoang tuan@optimus.mitre.org 
+.\"
+.\"
+.TH NETSTAT 8 "25 Fév 1999" "net-tools" "Linux Programmer's Manual"
+
+.SH NAME
+netstat \- Affiche les connexions réseau, les tables de routage, les
+statistiques des interfaces, les connexions masquées, les messages netlink,
+et les membres multicast.
+
+.SH SYNOPSIS
+
+.B netstat 
+.RB [ \-venaoc ]
+.RB [ \-\-tcp | \-t ]
+.RB [ \-\-udp | \-u ]
+.RB [ \-\-raw | \-w ]
+.RB [ \-\-groups | \-g ]
+.RB [ \-\-unix | \-x ] 
+.RB [ \-\-inet | \-\-ip ]
+.RB [ \-\-ax25 ]
+.RB [ \-\-ipx ] 
+.RB [ \-\-netrom ]
+
+.PP
+
+.B netstat 
+.RB [ \-veenc ]
+.RB [ \-\-inet ] 
+.RB [ \-\-ipx ]
+.RB [ \-\-netrom ] 
+.RB [ \-\-ddp ]
+.RB [ \-\-ax25 ]
+.RB { \-\-route | \-r }
+
+.PP
+
+.B netstat
+.RB [ \-veenpac ]
+.RB { \-\-interfaces | \-i }
+.RI [ iface ]
+
+.PP
+
+.B netstat
+.RB [ \-enc ]
+.RB { \-\-masquerade | \-M }
+
+.PP
+
+.B netstat 
+.RB [ \-cn ]
+.RB { \-\-netlink | \-N }
+
+.PP
+
+.B netstat 
+.RB { \-V | \-\-version }
+.RB { \-h | \-\-help }
+
+.PP
+.SH DESCRIPTION
+.B Netstat
+affiche les informations du sous-système réseau de Linux
+
+.SS "(no option)"
+Vous pouvez voir l'état des connexions réseau en listant les sockets
+ouvertes. C'est l'option par défaut : si vous ne spécifiez aucune famille
+d'adresses, les sockets actives de toutes les familles d'adresses seront
+affichées.
+Avec le paramètre
+.B -e
+vous obtenez quelques informations supplémentaires (userid). Avec le paramètre
+.B -v
+vous pouvez demander à netstat de signaler des familles d'adresses connues
+non supportées par le noyau. Le paramètre
+.B -o
+affiche des informations supplémentaires sur les timers réseau. En donnant
+le paramètre
+.B -p
+vous verrez le PID et le nom du processus à qui appartient la socket. Le paramètre
+.B -a
+affiche toutes les sockets, y compris les sockets d'écoute des serveurs. La famille
+d'adresses
+.B inet
+affiche les sockets raw, udp et tcp.
+
+.SS "\-r, \-\-route"
+Avec le paramètre
+.BR \-r ", " \-\-route
+vous pouvez visualiser les tables de routage dans le même format qu'avec la
+commande
+.B "route -e" 
+.
+.B "netstat -er" 
+utilisera le format de la commande
+.BR route .
+Veuillez consulter
+.BR route (8)
+pour plus de détails.
+
+.SS "\-i, \-\-interface \fIiface\fI"
+Si vous utilisez l'option
+.BR -i ", " --interfaces
+, une table de toutes (ou de l'interface
+.IR iface 
+spécifiée) les interfaces réseau sera affichée. Le format de sortie est le
+même que celui de la commande
+.B "ifconfig -e"
+, et est décrit dans
+.BR ifconfig (8).
+.B "netstat -ei"
+affiche une table ou une seule entrée d'interface comme la commande 
+.B ifconfig
+. Avec le paramètre
+.B -a
+, vous pouvez inclure les interfaces qui ne sont pas configurées (c.a.d qui
+n'ont pas l'indicateur
+.BR U = UP
+armé).
+
+.SS "\-M, \-\-masquerade"
+
+Permet de voir les sessions ayant de l'IP-masquerade. Avec le paramètre
+.B -e 
+vous pouvez inclure quelques informations concernant les numéros de
+séquence et les deltas causés par des réécritures de données sur des
+sessions FTP (commande PORT). Le support de l'IP-Masquerade est utilisé
+pour cacher au monde extérieur des hôtes appartenant à un réseau (et ayant
+des adresses) non officiel, tel que décrit dans
+.BR ipfw (4), ipfwadm "(8) et " ipfw (8).
+
+.SS "\-N, \-\-netlink"
+
+Les noyaux récents supportent une communication avec l'utilisateur appelée
+netlink. Vous pouvez obtenir des messages relatifs à la création, la
+suppression d'interfaces ou de routes à partir de 
+.I /dev/route
+(36,0).
+
+.PP
+.SH OPTIONS
+.SS "\-v, \-\-verbose"
+active le mode verbeux. Affiche quelques informations utiles concernant les
+familles d'adresses non configurées.
+
+.SS "\-n, \-\-numeric"
+affiche les adresses en format numérique au lieu d'essayer de déterminer le
+nom symbolique d'hôte, de port ou d'utilisateur.
+
+.SS "\-p, \-\-programs"
+affiche le nom et le PID des processus propriétaires de chaque socket
+décrite. Vous devez être le propriétaire d'un processus pour visualiser les
+sockets qui lui appartiennent ou être l'utilisateur
+.B root
+pour disposer de toutes les informations.
+
+.SS "\-A, \-\-af \fIfamille\fI"
+utilise une méthode différente pour affecter les familles d'adresses.
+.I famille 
+est une liste de familles d'adresses séparées par des (',') telles que
+.BR inet , 
+.BR unix , 
+.BR ipx , 
+.BR ax25 , 
+.B netrom 
+et
+.BR ddp .
+L'utilisation des options longues suivantes a le même effet
+.BR \-\-inet ,
+.BR \-\-unix ,
+.BR \-\-ipx ,
+.BR \-\-ax25 ,
+.B \-\-netrom
+et
+.BR \-\-ddp.
+
+.SS "\-c, \-\-continous"
+Demandera à 
+.B netstat
+d'afficher la table sélectionnée chaque seconde jusqu'à ce que vous
+l'interrompiez.
+
+.PP
+.SH RESULTATS
+
+.PP
+.SS Connexions Internet actives \fR(TCP, UDP, RAW)\fR
+
+.SS "Proto" 
+Le protocole (TCP, UDP, RAW) utilisé par la socket. 
+
+.SS "Recv-Q"
+Le nombre d'octets non encore lus par le programme utilisateur connecté
+à cette socket.
+
+.SS "Send-Q"
+Le nombre d'octets non encore acquittés par l'hôte distant.
+
+.SS "Local Address (Adresse locale)" 
+L'adresse locale (nom d'hôte local) et numéro de port de la
+socket. Sauf si l'option
+.B -n
+est donnée, l'adresse de la prise est traduite en nom d'hôte,
+et le numéro de port est traduit en nom de service correspondant.
+
+.SS "Foreign Address (Adresse distante)"
+L'adresse distante (nom d'hôte distant) et le numéro de port de
+la prise. Comme pour l'adresse locale et le numéro de port, l'option
+.B -n
+invalide la traduction du nom d'hôte et de service.
+
+.SS "State (Etat)"
+L'état de la socket. Puisqu'il n'y a pas d'état dans le mode RAW
+et généralement pas d'état utilisé en UDP, cette colonne
+peut se trouver vierge. Normalement, on trouvera une des valeur suivante:
+
+.TP
+.I
+ESTABLISHED
+La socket a une connexion établie.
+.TP
+.I
+SYN_SENT
+La socket attend activement d'établir une connexion.
+.TP
+.I
+SYN_RECV
+Une requête de connexion a été reçue du réseau.
+.TP
+.I
+FIN_WAIT1
+La socket est fermée, et la connexion est en cours de terminaison.
+.TP
+.I
+FIN_WAIT2
+La connexion est fermée, et la socket attend une terminaison du distant.
+.TP
+.I
+TIME_WAIT
+La socket attend le traitement de tous les paquets encore sur le réseau
+avant d'entreprendre la fermeture.
+.TP
+.I
+CLOSED
+La socket n'est pas utilisée.
+.TP
+.I
+CLOSE_WAIT
+Le distant a arrêté, attendant la fermeture de la socket.
+.TP
+.I
+LAST_ACK
+Le distant termine, et la socket est fermée. Attente d'acquittement.
+.TP
+.I
+LISTEN
+La socket est à l'écoute de connexions entrantes. Ces sockets ne sont
+affichées que si le paramètre
+.BR -a , --listening
+est fourni.
+.TP
+.I
+CLOSING
+Les deux prises sont arrêtées mais toutes les données locales n'ont
+pas encore été envoyées.
+.TP
+.I
+UNKNOWN
+L'état de la prise est inconnu.
+
+.SS "User (Utilisateur)"
+Le nom d'utilisateur ou l'UID du propriétaire de la socket.
+
+.SS "PID/Program name (PID/Nom de Programme)"
+Le PID et le nom du programme (séparés par un slash) propriétaire de la
+socket. Le paramètre
+.B -p
+active l'affichage de cette colonne. Vous devez avoir les droits de
+.B root
+puisque vous devez avoir les droits d'accès aux processus pour visualiser
+les sockets qui lui correspondent. Ces informations ne sont pas disponibles
+avec les sockets IPX.
+
+.SS "Timer"
+(Ceci doit être rédigé)
+
+
+.PP
+.SS Sockets actives du domaine UNIX
+
+
+.SS "Proto" 
+Le protocole (habituellement UNIX) utilisé par la socket.
+
+.SS "RefCnt"
+Le nombre de références (i.e. processus attachés via cette socket).
+
+.SS "Flags (indicateurs)"
+Les indicateurs affichée sont SO_ACCEPTON (affiché  
+.BR ACC ),
+SO_WAITDATA 
+.RB ( W )
+ou SO_NOSPACE 
+.RB ( N ). 
+SO_ACCECPTON est utilisé pour les sockets
+non-connectées si les processus correspondant sont en attente de
+demande de connexion. Les autres indicateurs sont d'un intérêt limité.
+
+.SS "Type"
+Il y a différents types d'accès aux sockets :
+.TP
+.I
+SOCK_DGRAM
+La prise est utilisée en mode Datagram (sans connexion).
+.TP
+.I
+SOCK_STREAM
+C'est une socket `stream' (connexion).
+.TP
+.I
+SOCK_RAW
+La prise est utilisée en mode `raw'.
+.TP
+.I
+SOCK_RDM
+Celle-ci est utilisée pour les messages délivrée de manière fiable.
+.TP
+.I
+SOCK_SEQPACKET
+C'est une socket en mode paquets séquentiels.
+.TP
+.I
+SOCK_PACKET
+Prise d'accès à l'interface RAW.
+.TP
+.I
+UNKNOWN
+Qui sait ce que l'avenir nous réserve - Juste à remplir ici :-)
+
+.PP
+.SS "State (Etat)"
+Ce champ contient un des mots clés suivants :
+.TP
+.I
+FREE
+La socket n'est pas allouée
+.TP
+.I
+LISTENING
+La socket est à l'écoute de demandes de connexions. Ces sockets ne sont
+affichées que si le paramètre
+.BR -a , --listening
+est fourni.
+.TP
+.I
+CONNECTING
+La prise est en cours d'établissement de connexion.
+.TP
+.I
+CONNECTED
+La socket est connectée.
+.TP
+.I
+DISCONNECTING
+La socket est en cours de déconnexion.
+.TP
+.I
+(empty)
+La socket n'est connectée à aucune autre.
+.TP
+.I
+UNKNOWN
+Cet état ne devrait pas apparaître.
+
+.SS "PID/Program name (PID/Nom de programme"
+Le PID et le nom du programme propriétaire de la socket. Plus
+d'informations sont disponibles dans la section
+.B "Connexions Internet actives"
+ci-dessus.
+
+.SS "Path (chemin)"
+Affiche le chemin correspondant à l'attachement des processus à la socket.
+
+.PP
+.SS Sockets IPX actives
+
+(à faire par quelqu'un qui connaît)
+
+.PP
+.SS Sockets NET/ROM actives
+
+(à faire par quelqu'un qui connaît)
+
+.PP
+.SS Sockets AX.25 actives
+
+(à faire par quelqu'un qui connaît)
+
+.PP
+.SH NOTES
+Depuis la version 2.2 du noyau, netstat -i n'affiche plus les statistiques
+des interfaces alias. Pour obtenir les compteurs par interface alias, vous
+devez définir des règles spécifiques à l'aide de la commande
+.BR ipchains(8) 
+.  
+
+.SH FICHIERS
+.ta
+.I /etc/services
+-- Le fichier de correspondance des services
+
+.I /proc/net/dev
+-- informations périphériques
+
+.I /proc/net/raw
+-- informations sockets RAW
+
+.I /proc/net/tcp
+-- informations sockets TCP
+
+.I /proc/net/udp
+-- informations sockets UDP
+
+.I /proc/net/igmp
+-- informations multicast IGMP
+
+.I /proc/net/unix
+-- informations sockets domaine UNIX
+
+.I /proc/net/ipx
+-- informations sockets IPX
+
+.I /proc/net/ax25
+-- informations sockets AX25
+
+.I /proc/net/appeltalk
+-- informations sockets DDP (appeltalk)
+
+.I /proc/net/nr
+-- informations sockets NET/ROM
+
+.I /proc/net/route
+-- informations routage IP du noyau
+
+.I /proc/net/ax25_route
+-- informations routage AX25 du noyau
+
+.I /proc/net/ipx_route
+-- informations routage IPX du noyau
+
+.I /proc/net/nr_nodes
+-- informations routage NET/ROM du noyau
+
+.I /proc/net/nr_neigh
+-- Voisinage NET/ROM noyau
+
+.I /proc/net/ip_masquerade
+-- Connexion avec masquerade noyau
+
+.fi
+
+.PP
+.SH VOIR AUSSI
+.BR route (8), 
+.BR ifconfig (8), 
+.BR ipfw (4), 
+.BR ipfw (8), 
+.BR ipfwadm (8)
+.BR ipchains (8)
+
+.PP
+.SH BUGS
+Des informations étranges peuvent apparaitre occasionnellement
+si une socket change d'état au moment ou elle est visualisée.
+Ceci est peut probable.
+.br
+Le paramètre
+.B netstat -i
+est décrit tel qu'il fonctionnera lorsque le code de la version BETA du
+paquetage net-tools aura été nettoyé.
+
+.PP
+.SH AUTEURS
+L'interface utilisateur de netstat a été développée par
+Fred Baumgarten <dc6iq@insu1.etec.uni-karlsruhe.de>. Les pages du
+manuel essentiellement écrites par Matt Welsh
+<mdw@tc.cornell.edu>. Mis à jour par Alan Cox <Alan.Cox@linux.org>.
+.br
+La page de manuel et la commande incluse dans le paquetage net-tools
+a été totallement réécrite par Bernd Eckenfels 
+<ecki@linux.de>.
+.SH TRADUCTION
+Jean Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/nisdomainname.1 b/man/fr_FR/nisdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/fr_FR/plipconfig.8 b/man/fr_FR/plipconfig.8
new file mode 100644 (file)
index 0000000..cd44449
--- /dev/null
@@ -0,0 +1,49 @@
+.TH PLIPCONFIG 8 "17 February 1995" "" ""
+.SH NOM
+plipconfig \- réglage fin des paramètres du périphérique PLIP
+.SH SYNOPSIS
+.B "plipconfig interface"
+.br
+.B "plipconfig interface [nibble NN] [trigger NN] [unit NN]"
+.SH DESCRIPTION
+.B Plipconfig
+est utilisé pour améliorer (espérons-le) les performances PLIP
+en changeant les timings par défaut utilisés par le protocole PLIP. Les
+résultats dépendent du port parallèle
+utilisé, du cable, et de la vitesse CPU de chaque machine
+à chaque bout du lien PLIP.
+.LP
+Si le seul argument est l'
+.B interface
+,
+.B plipconfig
+affiche seulement l'état de cette interface. Autrement, il essaiera de
+positionner les options données.
+.SH OPTIONS
+.TP
+.B "nibble NN"
+Définit la valeur d'attente des digits en microsecondes. Par défault : 3000.
+.TP
+.B "trigger NN"
+Définit le délai de déclenchement en microsecondes. Par défault : 500.
+.LP
+La vitesse de PLIP peut, dans certains cas, être améliorée en
+diminuant les valeurs par défaut.
+Les valeurs trop petites peuvent engendrer une utilisation excessive de CPU,
+et un temps de réponse aux interruptions mauvais, dont le résultat est
+la perte de caractères lus sur le port, ou de paquets PLIP.
+La modification du MTU PLIP peut aussi affecter la vitesse PLIP.
+.SH NOTE
+Si vous n'obtenez aucune réponse, il est fort probable que l'IRQ configurée
+soit mauvaise, et qu'elle nécessite une configuration avec ifconfig.
+Les quelques cas pour lesquels les timings par défaut sont trop courts,
+arrivent lorque l'on utilise de longs cables. Quelque chose à ne pas faire,
+puisque le port parallèle n'est pas fait pour fonctionner avec de longs cables.
+.SH VOIR AUSSI
+.I ifconfig(8)
+.SH BUGS
+Non.
+.SH AUTEURS
+John Paul Morrison, <jmorriso@bogomips.ee.ubc.ca>, <ve7jpm@ve7jpm.ampr.org>
+.SH TRADUCTION
+Jean-Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/rarp.8 b/man/fr_FR/rarp.8
new file mode 100644 (file)
index 0000000..73e9328
--- /dev/null
@@ -0,0 +1,81 @@
+.TH RARP 8 "4 Août 1997" "net-tools" "Linux Programmer's Manual"
+.SH NOM
+rarp \- manipule la table système RARP
+.SH SYNOPSIS
+.B "rarp [-V] [--version] [-h] [--help]"
+.br
+.B "rarp -a"
+.br
+.B "rarp [-v] -d nom_d_hote ..."
+.br
+.B "rarp [-v] [-t type] -s nom_d_hote adr_materiel"
+.SH DESCRIPTION
+.B Rarp
+manipule la table RARP du noyau de différentes façons.  Les options de base
+permettent d'effacer une entrée de correspondance d'adresses et d'en
+redéfinir une manuellement.  Pour des besoins de débogage, le programme
+.B rarp
+permet aussi de vider complètement la table RARP.
+.SH OPTIONS
+.TP
+.B \-V
+Affiche la version de RARP utilisé.
+.TP
+.B \-v
+Dit à l'utilisateur ce qui se passe, en étant verbeux.
+.TP
+.B "\-t type"
+En définissant ou lisant la table RARP, ce paramètre optionnel dit à
+.B rarp
+quelles classes d'entrées il doit contrôler.  La valeur par défaut de
+ce paramètre est
+.B ether
+(i.e. code matériel
+.B 0x01
+pour
+.B "IEEE 802.3 10Mbps Ethernet".
+D'autres valeurs doivent correspondre à des technologies réseaux telles que
+.B AX.25 (ax25).
+et
+.B NET/ROM (netrom).
+.TP
+.B "\-a"
+.TP
+.B "\-\-list"
+Liste les entrées de la table RARP.
+.TP
+.B "\-d nom_d_hote"
+.TP
+.B "\-\-delete nom_d_hote"
+Supprime toutes les entrées RARP relatives à l'hôte spécifié.
+.TP
+.B "\-s nom_d_hote adr_materielle"
+.TP
+.B "\-\-set nom_d_hote adr_materielle"
+Crée manuellement une correspondance d'adresses RARP pour l'hôte
+.B nom_d_hôte
+avec l'adresse matérielle
+.B adr_materielle
+. Le format de l'adresse matérielle est dépendant du matériel,
+mais pour la plupart on peut considérer que la présentation classique
+peut être utilisée.  Pour la classe Ethernet, c'est 6 octets en hexadécimal,
+séparés par des double-points.
+
+.SH ATTENTION
+Certains systèmes (notamment des vieux Sun's) supposent que l'hôte
+répondant à une requête RARP peut aussi fournir d'autres services
+de boot à distance. Par conséquent n'ajoutez jamais
+d'entrées RARP à la légère à moins que vous souhaitiez affronter la
+colère de votre administrateur réseau.
+.SH FICHIERS
+.I /proc/net/rarp,
+.SH VOIR AUSSI
+arp(8), route(8), ifconfig(8), netstat(8)
+.SH AUTEURS
+Ross D. Martin, <martin@trcsun3.eas.asu.edu>
+.br
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Phil Blundell, <Philip.Blundell@pobox.com>
+.SH TRADUCTION
+Jean-Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/route.8 b/man/fr_FR/route.8
new file mode 100644 (file)
index 0000000..9109e8d
--- /dev/null
@@ -0,0 +1,335 @@
+.TH ROUTE 8 "8 Août 1997" "net-tools" "Linux Programmer's Manual"
+.SH NAME
+route \- affiche / manipule la table de routage IP
+.SH SYNOPSIS
+.B route
+.RB [ \-CFvnee ]
+.TP
+.B route 
+.RB [ \-v ]
+.RB [ \-A
+famille] 
+.B add 
+.RB [ \-net | \-host ] 
+cible 
+.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 ] 
+.RB [ \-A
+famille]
+.B del 
+.RB [ \-net | \-host ] 
+cible 
+.RB [ gw 
+Gw] 
+.RB [ netmask 
+Nm] 
+.RB [ metric 
+N] 
+.RB [[ dev ]
+If]
+.TP
+.B route 
+.RB [ \-V ] 
+.RB [ \-\-version ]
+.RB [ \-h ]
+.RB [ \--help ]
+.SH DESCRIPTION
+.B Route
+manipule la table de routage IP du noyau.  Son utilisation première
+consiste à configurer des routes statiques vers des hôtes ou des réseaux
+via une interface, après sa configuration par le programme
+.B ifconfig(8).
+
+.SH OPTIONS
+.TP
+.B \-v
+Active le mode verbeux.
+
+.TP
+.B \-A famille
+Utilise la famille d'adresses spécifiée (p.ex. `inet', `inet6').
+
+.TP
+.B \-n
+Affiche les adresses numériques, au lieu
+d'essayer de déterminer les noms d'hôtes. C'est utile si vous essayer de
+savoir pourquoi la route vers votre serveur de nom a disparu.
+
+.TP
+.B \-e
+utilise
+.BR netstat (8)-format
+pour l'affichage de la table de routage.
+.B \-ee 
+Génère une très longue ligne avec tous les paramètres à partir de la table
+de routage.
+
+.TP
+.B \-net
+la
+.B cible
+est un réseau.
+
+.TP
+.B -host
+la
+.B cible 
+est un hôte.
+
+.TP 
+.B -F
+affiche la table de routage FIB du noyau. L'organisation peut être changée avec
+.B \-e
+et
+.B \-ee
+.
+
+.TP 
+.B -C
+affiche le cache de routage du noyau. 
+
+.TP
+.B del
+supprime une route.
+
+.TP 
+.B add 
+ajoute une route.
+
+.TP
+.B cible
+L'hôte ou le réseau destination. Vous pouvez fournir une adresse IP en
+notation décimale pointée ou un nom d'hôte ou de réseau.
+
+.TP
+.B netmask Nm
+spécifie le masque réseau de la route à ajouter.
+
+.TP
+.B gw Gw
+signifie que tout paquet IP envoyé à cette adresse  sera routé par
+la passerelle spécifiée.
+.B NOTE:
+La passerelle concernée doit pouvoir être atteinte. Ceci signifie
+qu'une route statique vers cette passerelle doit préalablement exister.
+Si vous spécifiez l'adresse de l'une de vos interfaces locales, elle sera
+utilisée pour décider de l'interface vers laquelle les paquets seront
+envoyés. Ceci est une bidouille permettant d'être compatible BSD.
+
+.TP
+.B metric M
+Affecte la valeur M au champ métrique de la table de routage (utilisé par
+les démons de routage).
+
+.TP 
+.B mss M
+Spécifie le MSS (Maximum Segment Size, Taille maximum de segment) de TCP,
+pour les connexions empreintant cette route. Ce n'est normalement utilisé
+que pour des optimisations fines des configurations de routage. 
+
+
+.TP 
+.B window W 
+Définit la taille de fenêtre TCP à W octets pour les connexions relatives 
+à cette route. C'est en général uniquement utilisé sur les réseaux AX.25 et
+avec les pilotes incapables de manipuler les trames dos à dos.
+
+.TP
+.B irtt I
+Définit le iRTT initial (round trip time) pour les connexions TCP sur cette
+route à I millisecondes (1-12000). C'est en général uniquement utilisé sur
+les réseaux AX.25. Si omis, la valeur par défaut (300 ms selon le RFC 1122)
+est utilisée.
+
+.TP
+.B reject
+Installe une route bloquante, qui forcera l'échec d'une recherche.
+C'est par exemple utilisé pour masquer les réseaux avant d'utiliser la
+route par défaut. Ce n'est pas une fonction de pare-feu.
+
+.TP
+.B mod, dyn, reinstate
+Installe une route dynamique ou modifiée. Les deux indicateurs ne sont en
+général positionnés que par le démon de routage. Cela ne sert que pour des
+besoins de diagnostics.
+
+.TP
+.B dev If
+Force la route à être associée au périphérique spécifié, sinon le noyau
+tentera de le déterminer par lui-même (en consultant les routes existantes
+et les spécifications de périphériques). Dans la plupart des réseaux
+normaux, vous n'aurez pas besoin de ceci.
+
+If 
+.B dev If
+est la dernière option de la ligne de commande, le mot
+.B dev
+peut être omis, puisque c'est la valeur par défaut. Autrement l'ordre des
+modificateurs de route (metric - netmask - gw - dev) n'a pas d'importance.
+
+.SH EXEMPLES
+.TP
+.B route add -net 127.0.0.0
+ajoute l'entrée loopback normale, en utilisant le masque 255.0.0.0 (réseau
+de classe A, selon l'adresse de destination) et associée avec l'interface 
+"lo" (en supposant que ce périphérique a été correctement configuré avec
+.BR ifconfig (8)). 
+
+.TP 
+.B route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
+ajoute une route vers le réseau 192.56.76.x via 
+"eth0". Le masque de classe C n'est pas vraiment nécessaire ici car
+192.* est une adresse IP de classe C. Le mot "dev" peut être omis. 
+
+.TP
+.B route add default gw mango-gw
+ajoute une route par défaut (qui sera utilisée si aucune autre route ne
+convient). Tous les paquets empreintant cette route passeront par
+"mango-gw". Le périphérique qui sera effectivement utilisé pour cette route
+dépend de la façon dont on atteint "mango-gw" - la route statique vers
+"mango-gw" devra être préalablement configurée. 
+
+.TP
+.B route add ipx4 sl0
+ajoute une route vers l'hôte "ipx4" via l'interface SLIP (en supposant que
+"ipx4" est l'hôte SLIP).
+
+.TP
+.B route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4
+Cette commande route le réseau "192.57.66.x" par l'ancienne route vers l'interface SLIP.
+
+.TP
+.B route add 224.0.0.0 netmask 240.0.0.0 dev eth0
+Ceci est une commande mal documentée et les gens savent ce qu'il faut
+faire? Ceci force toutes les routes IP des classes D (multicast) à
+passer par "eth0". C'est la configuration correcte, normale pour un noyau
+supportant le multicast.
+
+.TP
+.B route add 10.0.0.0 netmask 255.0.0.0 reject
+Installe une route 'rejetée' pour le réseau privé "10.x.x.x."
+
+.LP
+.SH RESULTATS
+Le contenu des tables de routage du noyaus est affiché en colonnes comme
+suit
+.TP
+.B Destination     
+Le réseau ou hôte destination.
+.TP
+.B Gateway
+L'adresse de la passerelle ou '*' si indéfini.
+.TP
+.B Genmask         
+Le masque de réseau pour le réseau destinataire; '255.255.255.255' pour un hôte
+et '0.0.0.0' pour la route par défaut (
+.B default
+).
+.TP
+.B Indicateurs 
+Les indicateurs possibles sont
+.br
+.B U
+(la route est active = 
+.BR up )
+.br
+.B H
+(la cible est un 
+.BR hôte )
+.br
+.B G
+(utilise comme
+.BR passerelle )
+.br
+.B R
+.RB ( rétablit 
+la route pour le routage dynamique)
+.br
+.B D
+.RB ( dynamiquement
+configurée par le démon ou par redirect)
+.br
+.B M
+.RB ( modifiée
+par le démon de routage ou par redirect)
+.br
+.B !
+.RB ( rejète
+la route)
+.TP
+.B Metric 
+La 'distance' à la cible (habituellement comptée en hops). Ce n'est pas
+utilisé par les noyaux récents, mais peut-être requis par certains démons
+de routage.
+.TP
+.B Ref    
+Nombre de références à cette route. (Pas utilisé dans le noyau Linux.)
+.TP
+.B Use
+Count of lookups for the route.  Depending on the use of -F and -C this will
+be either route cache misses (-F) or hits (-C).
+.TP
+.B Iface
+Interface vers laquelle les paquets empruntant cette route seront envoyés.
+.TP
+.B MSS 
+Taille de segment maximum par défaut pour les connexions TCP sur cette
+route.
+.TP
+.B Window  
+Taille de fenêtre par défaut pour les connexions TCP sur cette route.
+.TP
+.B irtt
+RTT Initial (Round Trip Time). Le noyau utilise ceci pour essayer les
+meilleurs paramètres protocolaires TCP sans attendre de réponse
+(éventuellement tardive).
+.TP
+.B HH (seulement caché)
+Le nombre d'entrées ARP et de routes cachées faisant référence au cache
+d'en-tête matériel pour la route en cache. Ce sera la valeur \-1 si aucune adresse
+matérielle n'est nécessaire pour l'interface de la route cachée (p.ex. lo).
+.TP
+.B Arp (seulement caché)
+Indique si oui ou non l'adresse matérielle pour la route en cache est encore
+à jour.
+.LP
+.SH FICHIERS
+.I /proc/net/ipv6_route
+.br
+.I /proc/net/route
+.br
+.I /proc/net/rt_cache
+.LP
+.SH VOIR AUSSI
+.I ifconfig(8), netstat(8), arp(8), rarp(8)
+.LP
+.SH HISTORIQUE
+.B Route 
+pour Linux a été originellement écrit par Fred N. van Kempen,
+<waltje@uwalt.nl.mugnet.org> puis modifié par Johannes Stille et
+Linus Torvalds pour pl15. Alan Cox a ajouté les options concernant 
+la gestion des fenêtres et MSS pour Linux 1.1.22. Le support de irtt 
+et la fusion avec netstat ont été réalisés par Bernd Eckenfels.
+.SH AUTEUR
+Maintenu par Phil Blundell <Philip.Blundell@pobox.com>.
+.SH TRADUCTION
+Jean-Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/slattach.8 b/man/fr_FR/slattach.8
new file mode 100644 (file)
index 0000000..512d514
--- /dev/null
@@ -0,0 +1,103 @@
+.TH SLATTACH 8 "12 Feb 1994" "" ""
+.SH NOM
+slattach \- attache une interface réseau à une ligne série
+.SH SYNOPSIS
+.B "slattach [-dehlLmnqv] [-c commande] [-p proto] [-s vitesse] [tty]"
+.br
+.SH DESCRIPTION
+.B Slattach
+est un minuscule programme qui peut être utilisé pour attacher
+un terminal normal ("série") dans un des différents modes "réseau",
+ceci vous permettant de l'utiliser pour des liaisons point-à-point
+vers d'autres systèmes.
+.SH OPTIONS
+.TP
+.B "[-c commande]"
+Exécute
+.B `commande'
+lorsque la ligne est suspendue. Ceci peut être utilisé pour lancer
+des scripts ou réétablir des connexions quand un lien tombe.
+.TP
+.B "[-d]"
+Valide le débogage.  Utile pour déterminer pourquoi une configuration
+ne fonctionne pas.
+.TP
+.B "[-h]"
+Termine lorsque la porteuse est perdue. Ceci fonctionne à la fois sur
+les périphériques /dev/tty et /dev/cua en contrôlant directement
+l'état de la porteuse toutes les 15 secondes.
+.TP
+.B "[-v]"
+Valide le mode verbeux.  Utile pour les shell scripts.
+.TP
+.B "[-q]"
+Opère en mode silencieux - pas de messages du tout.
+.TP
+.B "[-l]"
+Crée un fichier de vérouillage pour le périphérique comme
+pour UUCP dans /var/lock.
+.TP
+.B "[-n]"
+Equivalent à la commande "mesg n".
+.TP
+.B "[-m]"
+\fBn'\fPinitialise \fBpas\fP la ligne en mode raw 8 bits.
+.TP
+.B "[-e]"
+Termine correctement après l'initialisation du périphérique,
+au lieu d'attendre que la ligne soit suspendue.
+.TP
+.B "[-L]"
+Valide les opérations 3 lignes. Le terminal est mis en mode CLOCAL, 
+la surveillance de porteuse est invalidée.
+.TP
+.B "[-p proto]"
+Définit le protocole spécifique à utiliser sur la ligne.
+La valeur par défaut est 
+.B "cslip"
+, c'est-à-dire SLIP compressé.  Les autres valeurs possibles sont :
+.B "slip"
+(SLIP normal), 
+.B "adaptive"
+(CSLIP/SLIP adaptatifs),
+.B "ppp"
+(Protocole Point-à-Point)
+et
+.B "kiss"
+(un protocole utilisé pour communiquer avec des controleurs AX.25 paquets radios).
+L'argument spécifique
+.B "tty"
+peut être utilisé pour refaire passer le périphérique en
+fonctionnement série normal. L'utilisation du mode 'ppp' n'est en
+principe pas utile puisque ppp nécessite le démon additionnel
+.B pppd
+pour être actif sur la ligne. Pour les connexions `kiss', le programme 
+.B axattach
+doit être utilisé.
+.TP
+.B "[-s vitesse]"
+Définit la vitesse de la ligne, différente de la valeur par défaut.
+.PP
+Si aucun argument n'est donné, la ligne courante du terminal
+(habituellement liée au login) est utilisée. Autrement, une tentative
+est effectuée pour obtenir le port du terminal indiqué, puis il est
+vérouillé et ouvert.
+.SH FICHIERS
+.I /dev/cua* /var/lock/LCK.*
+.SH BUGS
+Aucun connu.
+.SH VOIR AUSSI
+axattach(8), dip(8) pppd(8), sliplogin(8).
+.SH AUTEURS
+Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+.br
+Alan Cox, <Alan.Cox@linux.org>
+.br
+Miquel van Smoorenburg, <miquels@drinkel.ow.org>
+.br
+George Shearer, <gshearer@one.net>
+.br
+Yossi Gottlieb, <yogo@math.tau.ac.il>
+.br
+.SH TRADUCTION
+Jean-Michel VANSTEENE (vanstee@worldnet.fr)
diff --git a/man/fr_FR/ypdomainname.1 b/man/fr_FR/ypdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/pt_BR/arp.8 b/man/pt_BR/arp.8
new file mode 100644 (file)
index 0000000..41c8fd6
--- /dev/null
@@ -0,0 +1,177 @@
+.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.
diff --git a/man/pt_BR/dnsdomainname.1 b/man/pt_BR/dnsdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/pt_BR/domainname.1 b/man/pt_BR/domainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/pt_BR/hostname.1 b/man/pt_BR/hostname.1
new file mode 100644 (file)
index 0000000..fe00879
--- /dev/null
@@ -0,0 +1,191 @@
+.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
diff --git a/man/pt_BR/ifconfig.8 b/man/pt_BR/ifconfig.8
new file mode 100644 (file)
index 0000000..0a97683
--- /dev/null
@@ -0,0 +1,180 @@
+.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 NOTAS
+
++Since kernel release 2.2 there are no explicit interface statistics for
++alias interfaces anymore. The statistics printed for the original address
++are shared with all alias addresses on the same device. If you want per-address
++statistics you should add explicit accounting
++rules for the address using the
++.BR ipchains(8)
++command.
+
+Deste o kernel 2.2 não existem mais estatísticas explícitas para os apelidos (aliases)
+de interfaces. As estatísticas mostradas para o endereço original são compartilhadas
+como todos os endereços associados ao mesmo dispositivo. Se desejar estatísticas
+por endereço você deve explicitamente adicionar regras de contabilização para os
+endereços usando o comando
+.BR ipchains(8)
+.
+
+.SH ARQUIVOS
+.I /proc/net/socket 
+.br
+.I /proc/net/dev
+.SH BUGS
+Os endereços appletalk DDP e IPX serão mostrados, mas não podem ser alterados
+com este comando.
+.SH VEJA TAMBÉM
+route(8), netstat(8), arp(8), rarp(8), ipchains(8)
+.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)
+
diff --git a/man/pt_BR/netstat.8 b/man/pt_BR/netstat.8
new file mode 100644 (file)
index 0000000..b9b359a
--- /dev/null
@@ -0,0 +1,469 @@
+.\"
+.\" netstat.8 
+.\"
+.\" Original: (mdw@tc.cornell.edu & dc6iq@insu1.etec.uni-karlsruhe.de)
+.\"
+.\" Modificado por: Bernd.Eckenfels@inka.de
+.\" Modificado por: Andi Kleen ak@muc.de
+.\" Traduzido para português por Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+.\" Revisado por Jorge Luiz Godoy Filho <jorge@bestway.com.br>
+.\"
+.TH NETSTAT 8 "19 de maio de 1997" "net-tools" "Manual do Programador Linux"
+
+.SH NOME
+netstat \- Mostra conexões de rede, tabelas de roteamento, estatísticas de interface e conexões
+mascaradas.
+.SH SINOPSE
+
+.B netstat 
+.RB [ \-venaoc ]
+.RB [ \-\-tcp | \-t ]
+.RB [ \-\-udp | \-u ]
+.RB [ \-\-raw | \-w ]
+.RB [ \-\-unix | \-x ] 
+.RB [ \-\-inet | \-\-ip ]
+.RB [ \-\-ax25 ]
+.RB [ \-\-ipx ] 
+.RB [ \-\-netrom ]
+
+.PP
+
+.B netstat 
+.RB [ \-veenc ]
+.RB [ \-\-inet ] 
+.RB [ \-\-ipx ]
+.RB [ \-\-netrom ] 
+.RB [ \-\-ddp ]
+.RB [ \-\-ax25 ]
+.RB { \-\-route | \-r }
+
+.PP
+
+.B netstat
+.RB [ \-veenac ]
+.RB { \-\-interfaces | \-i }
+.RI [ iface ]
+
+.PP
+
+.B netstat
+.RB [ \-enc ]
+.RB { \-\-masquerade | \-M }
+
+.PP
+
+.B netstat 
+.\".RB [ \-cn ]
+.RB { \-\-statistics | \-s }
+
+.PP
+
+.B netstat 
+.RB { \-V | \-\-version }
+.RB { \-h | \-\-help }
+
+.PP
+.SH DESCRIÇÃO
+.B netstat
+mostra informações do subsistema de rede do Linux.
+
+.SS "(sem opções)"
+Você pode ver o estado das conexões de rede através da listagem dos sockets
+abertos. Esta é a operação padrão: se você não especificar nenhuma
+família de endereços, os sockets ativos de todas as famílias de endereços
+configuradas serão mostrados. Com
+.B -e
+você obterá informações adicionais (userid). Com a chave
+.B -v
+você poderá fazer com que o netstat reclame sobre famílias de endereços
+conhecidas que não sejam suportadas pelo kernel. A opção
+.B -o
+mostra algumas informações adicionais sobre temporizadores de rede.
+.B -a
+mostra todos os sockets, incluindo sockets de servidores. A família de
+endereços
+.B inet
+mostrará sockets raw, udp e tcp.
+
+.SS "\-r, \-\-route"
+Com a opção
+.BR \-r ", " \-\-route
+você obterá as tabelas de roteamento do kernel no mesmo formato usado por
+.BR "route -e" .
+.B "netstat -er" 
+usará o formato de apresentação do comando
+.BR route .
+Por favor veja
+.BR route (8)
+para maiores detalhes.
+
+.SS "\-i, \-\-interface \fIiface\fI"
+Se você usar a opção
+.BR -i ", " --interfaces
+, uma tabela de todas (ou da
+.IR iface
+especificada) as interfaces de rede será mostrada. A saída usa o formato
+.B "ifconfig -e"
+, e é descrita em
+.BR ifconfig (8).
+.B "netstat -ei" 
+mostrará uma tabela ou uma entrada de interface como
+.B ifconfig
+mostra. Com a chave
+.B -a
+, você pode incluir interfaces que não estejam configuradas (i.e. não tem
+a flag 
+.BR U = UP
+configurada).
+
+.SS "\-M, \-\-masquerade"
+
+Uma lista de todas as sessões mascaradas também pode ser vista. Com a chave
+.B -e 
+você pode incluir mais algumas informações sobre numeração sequencial e deltas
+, causados por reescritas de dados em sessões FTP (comando PORT).
+O suporte a mascaramento é usado para esconder máquinas em endereços de
+rede não oficiais do resto do mundo, como descrito em
+.BR ipfw (4), ipfwadm "(8) e ipfw (8).
+
+.SS "\-s, \-\-statistics"
+
+Mostra estatísticas sobre o subsistema de rede do kernel do Linux, que 
+são lidas a partir de
+.IR /proc/net/snmp .
+
+.PP
+.SH OPÇÕES
+.SS "\-v, \-\-verbose"
+Informa ao usuário o que está ocorrendo, sendo detalhado. Especialmente 
+mostra algumas informações úteis sobre famílias de endereços não 
+configuradas.
+
+.SS "\-n, \-\-numeric"
+Mostra endereços numéricos, sem tentar resolver os nomes da máquina, porta ou
+usuário.
+
+.SS "\-A, \-\-af \fIfamília\fI"
+Usa um método diferente para configurar as famílias de endereços.
+.I família 
+é uma lista de palavras-chave de famílias de endereços separadas por vírgulas
+(',') como
+.BR inet , 
+.BR unix , 
+.BR ipx , 
+.BR ax25 , 
+.B netrom 
+e
+.BR ddp .
+Tem o mesmo efeito de usar as opções longas
+.BR \-\-inet ,
+.BR \-\-unix ,
+.BR \-\-ipx ,
+.BR \-\-ax25 ,
+.B \-\-netrom
+e
+.BR \-\-ddp.
+
+.SS "\-c, \-\-continuous"
+Isto fará com que 
+.B netstat
+mostre a tabela selecionada a cada segundo, continuamente na tela até que
+você o interrompa.
+
+.PP
+.SH SAÍDA
+
+.PP
+.SS Conexões Internet Ativas \fR(TCP, UDP, RAW)\fR
+
+.SS "Proto" 
+O protocolo (tcp, udp, raw) usado pelo socket.
+
+.SS "Recv-Q"
+O contador de bytes não copiados pelo programa conectado a este socket.
+
+.SS "Send-Q"
+O contador de bytes não confirmados pela máquina remota.
+
+.SS "Endereço Local" 
+O endereço local (nome da máquina local) e o numero da porta do socket. A menos
+que a chave
+.B -n
+seja especificada o endereço do socket será resolvido para seu nome de máquina
+canônico e o número da porta será traduzido para o serviço correspondente.
+
+.SS "Endereço Remoto"
+O endereço remoto (nome da máquina remota) e o número da porta do socket. Como
+com o endereço local, a chave
+.B -n
+desliga a resolução do nome da máquina e do serviço.
+
+.SS "Estado"
+O estado do socket. Uma vez que não existem estados no modo RAW e normalmente
+nenhum estado é usado em UDP, esta linha pode ser deixada em branco. Normalmente
+ele pode assumir um de vários valores:
+.TP
+.I
+ESTABELECIDO
+O socket tem uma conexão estabelecida.
+.TP
+.I
+SYN_SENT
+O socket está ativamente tentando estabelecer uma conexão.
+.TP
+.I
+SYN_RECV
+Uma requisição de conexão foi recebida da rede.
+.TP
+.I
+FIN_WAIT1
+O socket está fechado e a conexão está terminando.
+.TP
+.I
+FIN_WAIT2
+A conexão está fechada e o socket está esperando por uma terminação pela
+máquina remota.
+.TP
+.I
+TIME_WAIT
+O socket está esperando após o fechamento para tratar os pacotes ainda na rede.
+.TP
+.I
+FECHADO
+O socket não está sendo usado.
+.TP
+.I
+CLOSE_WAIT
+O lado remoto terminou, esperando pelo fechamento do socket.
+.TP
+.I
+ÚLTIMO_ACK
+O lado remoto terminou, e o socket está fechado. Esperando por uma
+confirmação.
+.TP
+.I
+OUVINDO
+O socket está ouvindo por conexões. Estes socket são somente mostrados se
+a chave
+.BR -a , --listening
+for especificada.
+.TP
+.I
+FECHANDO
+Ambos os sockets estão terminados mas nós ainda não enviamos todos os nossos
+dados.
+.TP
+.I
+DESCONHECIDO
+O estado do socket é desconhecido.
+
+.SS "Usuário"
+O nome ou UID do dono do socket.
+
+.SS "Temporizador"
+(precisa ser escrito)
+
+
+.PP
+.SS UNIX domain sockets Ativos
+
+
+.SS "Proto" 
+O protocolo (normalmente unix) usado pelo socket.
+
+.SS "CntRef"
+O contador de referências (i.e. processos conectados via este socket).
+
+.SS "Flags"
+As flags mostradas são SO_ACCEPTON (mostrada como 
+.BR ACC ),
+SO_WAITDATA 
+.RB ( W )
+ou SO_NOSPACE 
+.RB ( N ). 
+SO_ACCECPTON 
+é usada para sockets não-conectados se seus processos correspondentes
+estiverem esperando por uma solicitação de conexão. As demais flags não
+são de interesse comum.
+
+.SS "Tipos"
+Há diversos tipos de acesso a sockets:
+.TP
+.I
+SOCK_DGRAM
+O socket é usado no modo de Datagramas (sem conexão).
+.TP
+.I
+SOCK_STREAM
+É um socket usado quando há conexões (stream socket).
+.TP
+.I
+SOCK_RAW
+É usado como o socket básico (raw socket).
+.TP
+.I
+SOCK_RDM
+Este é usado para confirmação de entrega de mensagens.
+.TP
+.I
+SOCK_SEQPACKET
+É um socket para um pacote sequencial.
+.TP
+.I
+SOCK_PACKET
+Socket para acesso da interface BÁSICA.
+.TP
+.I
+UNKNOWN
+Quem sabe o que nos trará o futuro? Preencha aqui :-)
+
+.PP
+.SS "Estados"
+Este campo conterá uma das seguintes palavras-chave:
+.TP
+.I
+FREE
+Este socket não está alocado.
+.TP
+.I
+LISTENING
+O socket está aguardando por uma solicitação de conexão. São mostrados
+apenas se as opções
+.BR -a , --listening
+forem selecionadas.
+.TP
+.I
+CONNECTING
+O socket está por estabelecer uma conexão.
+.TP
+.I
+CONNECTED
+O socket está conectado.
+.TP
+.I
+DISCONNECTING
+O socket está desconectado.
+.TP
+.I
+(nada)
+O socket não está conectado a nenhum outro.
+.TP
+.I
+UNKNOWN
+Isto não deve acontecer nunca.
+
+.SS "Path"
+Mostra o caminho (path) do processo do qual está tratando esse socket.
+
+.PP
+.SS Sockets IPX ativos
+
+(Isso precisa ser feito por alguém que saiba fazê-lo.)
+
+.PP
+.SS Sockets NET/ROM ativos
+
+(Isso precisa ser feito por alguém que saiba fazê-lo.)
+
+.PP
+.SS Sockets AX.25 ativos
+
+(Isso precisa ser feito por alguém que saiba fazê-lo.)
+
+.PP
+.SH NOTAS
+Desde o kernel 2.2 o netstat -i não mostra estatísticas para apelidos (aliases)
+de interfaces. Para obter contadores por apelido de interface você precisa
+configurar regras explícitas usando o comando
++.BR ipchains(8)
+.
+.SH FILES
+.ta
+.I /etc/services
+-- O arquivo de "tradução" (correspondência) entre socket e serviço.
+
+.I /proc/net/dev
+-- Informações de dispositivos.
+
+.I /proc/net/snmp
+-- Estatísticas da rede.
+
+.I /proc/net/raw
+-- Informação sobre o socket BÁSICO (RAW).
+
+.I /proc/net/tcp
+-- Informação sobre o socket TCP.
+
+.I /proc/net/udp
+-- Informação sobre o socket UDP.
+
+.I /proc/net/unix
+-- Informação sobre o socket de domínio Unix.
+
+.I /proc/net/ipx
+-- Informação sobre o socket IPX.
+
+.I /proc/net/ax25
+-- Informação sobre o socket AX25.
+
+.I /proc/net/appletalk
+-- Informação sobre o socket DDP (Appletalk).
+
+.I /proc/net/nr
+-- Informação sobre o socket NET/ROM.
+
+.I /proc/net/route
+-- Informação sobre os roteamentos IP realizados pelo kernel
+
+.I /proc/net/ax25_route
+-- Informação sobre os roteamentos AX25 realizados pelo kernel
+
+.I /proc/net/ipx_route
+-- Informação sobre os roteamentos IPX realizados pelo kernel
+
+.I /proc/net/nr_nodes
+-- Lista de nós NET/ROM do kernel
+
+.I /proc/net/nr_neigh
+-- "Vizinhos" NET/ROM do kernel
+
+.I /proc/net/ip_masquerade
+-- Conexões mascaradas do kernel
+
+.fi
+
+.PP
+.SH VEJA TAMBÉM
+.BR route (8), 
+.BR ifconfig (8), 
+.BR ipfw (4), 
+.BR ipfw (8), 
+.BR ipfwadm (8)
+.BR ipchains (8)
+
+.PP
+.SH BUGS
+Ocasionalmente informações estranhas podem surgir se um socket mudar
+enquanto é visualizado. Isso é incomum.
+.br
+As opções descritas para
+.B netstat -i
+foram descritas como deverão funcionar após alguma limpeza da liberação
+BETA do pacote net-tools.
+
+.PP
+.SH AUTORES
+A interface com o usuário foi escrita por Fred Baumgarten
+<dc6iq@insu1.etec.uni-karlsruhe.de> a página do manual basicamente
+por Matt Welsh <mdw@tc.cornell.edu>. Foi atualizada por
+Alan Cox <Alan.Cox@linux.org> mas poderia ter sido feita com um pouco
+mais de trabalho.
+.BR
+.LP
+A página do manual e os comandos incluídos no pacote net-tools
+foram totalmente reescritos desde Bernd Eckenfels
+<ecki@linux.de>.
+.BR
+.SH TRADUÇÃO E REVISÃO PARA PORTUGUÊS
+Traduzido para o português por Arnaldo Carvalho de Melo
+<acme@conectiva.com.br> e Jorge Luiz Godoy Filho <jorge@bestway.com.br>.
diff --git a/man/pt_BR/nisdomainname.1 b/man/pt_BR/nisdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/man/pt_BR/rarp.8 b/man/pt_BR/rarp.8
new file mode 100644 (file)
index 0000000..de31931
--- /dev/null
@@ -0,0 +1,70 @@
+.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 rarp
+também permite um dump completo da tabela RARP.
+.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
diff --git a/man/pt_BR/route.8 b/man/pt_BR/route.8
new file mode 100644 (file)
index 0000000..c440974
--- /dev/null
@@ -0,0 +1,327 @@
+.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. 
+
+.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 :)
diff --git a/man/pt_BR/ypdomainname.1 b/man/pt_BR/ypdomainname.1
new file mode 100644 (file)
index 0000000..1f45128
--- /dev/null
@@ -0,0 +1 @@
+.so man1/hostname.1
diff --git a/mii-tool.c b/mii-tool.c
new file mode 100644 (file)
index 0000000..ef2d48a
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+
+    mii-tool: monitor and control the MII for a network interface
+
+    Usage:
+
+       mii-tool [-VvRrw] [-A media,... | -F media] [interface ...]
+
+    This program is based on Donald Becker's "mii-diag" program, which
+    is more capable and verbose than this tool, but also somewhat
+    harder to use.
+
+    Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org
+
+    mii-diag is written/copyright 1997-2000 by Donald Becker
+        <becker@scyld.com>
+
+    This program is free software; you can redistribute it
+    and/or modify it under the terms of the GNU General Public
+    License as published by the Free Software Foundation.
+
+    Donald Becker may be reached as becker@scyld.com, or C/O
+    Scyld Computing Corporation, 410 Severn Av., Suite 210,
+    Annapolis, MD 21403
+
+    References
+       http://www.scyld.com/diag/mii-status.html
+       http://www.scyld.com/expert/NWay.html
+       http://www.national.com/pf/DP/DP83840.html
+*/
+
+static char version[] =
+"mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)\n";
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <time.h>
+#include <syslog.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#ifndef __GLIBC__
+#include <linux/if_arp.h>
+#include <linux/if_ether.h>
+#endif
+#include "mii.h"
+
+#define MAX_ETH                8               /* Maximum # of interfaces */
+
+/* Table of known MII's */
+static struct {
+    u_short    id1, id2;
+    char       *name;
+} mii_id[] = {
+    { 0x0022, 0x5610, "AdHoc AH101LF" },
+    { 0x0022, 0x5520, "Altimata AC101LF" },
+    { 0x0000, 0x6b90, "AMD 79C901A HomePNA" },
+    { 0x0000, 0x6b70, "AMD 79C901A 10baseT" },
+    { 0x0181, 0xb800, "Davicom DM9101" },
+    { 0x0043, 0x7411, "Enable EL40-331" },
+    { 0x0015, 0xf410, "ICS 1889" },
+    { 0x0015, 0xf420, "ICS 1890" },
+    { 0x0015, 0xf430, "ICS 1892" },
+    { 0x02a8, 0x0150, "Intel 82555" },
+    { 0x7810, 0x0000, "Level One LXT970/971" },
+    { 0x2000, 0x5c00, "National DP83840A" },
+    { 0x0181, 0x4410, "Quality QS6612" },
+    { 0x0282, 0x1c50, "SMSC 83C180" },
+    { 0x0300, 0xe540, "TDK 78Q2120" },
+};
+#define NMII (sizeof(mii_id)/sizeof(mii_id[0]))
+
+/*--------------------------------------------------------------------*/
+
+struct option longopts[] = {
+ /* { name  has_arg  *flag  val } */
+    {"advertise",      1, 0, 'A'},     /* Change capabilities advertised. */
+    {"force",          1, 0, 'F'},     /* Change capabilities advertised. */
+    {"phy",            1, 0, 'p'},     /* Set PHY (MII address) to report. */
+    {"log",            0, 0, 'l'},     /* Set PHY (MII address) to report. */
+    {"restart",                0, 0, 'r'},     /* Restart link negotiation */
+    {"reset",          0, 0, 'R'},     /* Reset the transceiver. */
+    {"verbose",        0, 0, 'v'},     /* Report each action taken.  */
+    {"version",        0, 0, 'V'},     /* Emit version information.  */
+    {"watch",          0, 0, 'w'},     /* Constantly monitor the port.  */
+    {"help",           0, 0, '?'},     /* Give help */
+    { 0, 0, 0, 0 }
+};
+
+static unsigned int
+    verbose = 0,
+    opt_version = 0,
+    opt_restart = 0,
+    opt_reset = 0,
+    opt_log = 0,
+    opt_watch = 0;
+static int nway_advertise = 0;
+static int fixed_speed = 0;
+static int override_phy = -1;
+
+static int skfd = -1;          /* AF_INET socket for ioctl() calls. */
+static struct ifreq ifr;
+
+/*--------------------------------------------------------------------*/
+
+static int mdio_read(int skfd, int location)
+{
+    struct mii_data *mii = (struct mii_data *)&ifr.ifr_data;
+    mii->reg_num = location;
+    if (ioctl(skfd, SIOCGMIIREG, &ifr) < 0) {
+       fprintf(stderr, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name,
+               strerror(errno));
+       return -1;
+    }
+    return mii->val_out;
+}
+
+static void mdio_write(int skfd, int location, int value)
+{
+    struct mii_data *mii = (struct mii_data *)&ifr.ifr_data;
+    mii->reg_num = location;
+    mii->val_in = value;
+    if (ioctl(skfd, SIOCSMIIREG, &ifr) < 0) {
+       fprintf(stderr, "SIOCSMIIREG on %s failed: %s\n", ifr.ifr_name,
+               strerror(errno));
+    }
+}
+
+/*--------------------------------------------------------------------*/
+
+const struct {
+    char       *name;
+    u_short    value;
+} media[] = {
+    /* The order through 100baseT4 matches bits in the BMSR */
+    { "10baseT-HD",    MII_AN_10BASET_HD },
+    { "10baseT-FD",    MII_AN_10BASET_FD },
+    { "100baseTx-HD",  MII_AN_100BASETX_HD },
+    { "100baseTx-FD",  MII_AN_100BASETX_FD },
+    { "100baseT4",     MII_AN_100BASET4 },
+    { "100baseTx",     MII_AN_100BASETX_FD | MII_AN_100BASETX_HD },
+    { "10baseT",       MII_AN_10BASET_FD | MII_AN_10BASET_HD },
+};
+#define NMEDIA (sizeof(media)/sizeof(media[0]))
+       
+/* Parse an argument list of media types */
+static int parse_media(char *arg)
+{
+    int mask, i;
+    char *s;
+    mask = strtoul(arg, &s, 16);
+    if ((*arg != '\0') && (*s == '\0')) {
+       if ((mask & MII_AN_ABILITY_MASK) &&
+           !(mask & ~MII_AN_ABILITY_MASK))
+           return mask;
+       goto failed;
+    } else {
+       mask = 0;
+       s = strtok(arg, ", ");
+       do {
+           for (i = 0; i < NMEDIA; i++)
+               if (strcasecmp(media[i].name, s) == 0) break;
+           if (i == NMEDIA) goto failed;
+           mask |= media[i].value;
+       } while ((s = strtok(NULL, ", ")) != NULL);
+    }
+    return mask;
+failed:
+    fprintf(stderr, "Invalid media specification '%s'.\n", arg);
+    return -1;
+}
+
+/*--------------------------------------------------------------------*/
+
+static char *media_list(int mask, int best)
+{
+    static char buf[100];
+    int i;
+    *buf = '\0';
+    mask >>= 5;
+    for (i = 4; i >= 0; i--) {
+       if (mask & (1<<i)) {
+           strcat(buf, " ");
+           strcat(buf, media[i].name);
+           if (best) break;
+       }
+    }
+    if (mask & (1<<5))
+       strcat(buf, " flow-control");
+    return buf;
+}
+
+int show_basic_mii(int sock, int phy_id)
+{
+    char buf[100];
+    int i, mii_val[32];
+    int bmcr, bmsr, advert, lkpar;
+
+    /* Some bits in the BMSR are latched, but we can't rely on being
+       the only reader, so only the current values are meaningful */
+    mdio_read(sock, MII_BMSR);
+    for (i = 0; i < ((verbose > 1) ? 32 : 8); i++)
+       mii_val[i] = mdio_read(sock, i);
+
+    if (mii_val[MII_BMCR] == 0xffff) {
+       fprintf(stderr, "  No MII transceiver present!.\n");
+       return -1;
+    }
+
+    /* Descriptive rename. */
+    bmcr = mii_val[MII_BMCR]; bmsr = mii_val[MII_BMSR];
+    advert = mii_val[MII_ANAR]; lkpar = mii_val[MII_ANLPAR];
+
+    sprintf(buf, "%s: ", ifr.ifr_name);
+    if (bmcr & MII_BMCR_AN_ENA) {
+       if (bmsr & MII_BMSR_AN_COMPLETE) {
+           if (advert & lkpar) {
+               strcat(buf, (lkpar & MII_AN_ACK) ?
+                      "negotiated" : "no autonegotiation,");
+               strcat(buf, media_list(advert & lkpar, 1));
+               strcat(buf, ", ");
+           } else {
+               strcat(buf, "autonegotiation failed, ");
+           }
+       } else if (bmcr & MII_BMCR_RESTART) {
+           strcat(buf, "autonegotiation restarted, ");
+       }
+    } else {
+       sprintf(buf+strlen(buf), "%s Mbit, %s duplex, ",
+              (bmcr & MII_BMCR_100MBIT) ? "100" : "10",
+              (bmcr & MII_BMCR_DUPLEX) ? "full" : "half");
+    }
+    strcat(buf, (bmsr & MII_BMSR_LINK_VALID) ? "link ok" : "no link");
+
+    if (opt_watch) {
+       if (opt_log) {
+           syslog(LOG_INFO, buf);
+       } else {
+           char s[20];
+           time_t t = time(NULL);
+           strftime(s, sizeof(s), "%T", localtime(&t));
+           printf("%s %s\n", s, buf);
+       }
+    } else {
+       printf("%s\n", buf);
+    }
+
+    if (verbose > 1) {
+       printf("  registers for MII PHY %d: ", phy_id);
+       for (i = 0; i < 32; i++)
+           printf("%s %4.4x", ((i % 8) ? "" : "\n   "), mii_val[i]);
+       printf("\n");
+    }
+
+    if (verbose) {
+       printf("  product info: ");
+       for (i = 0; i < NMII; i++)
+           if ((mii_id[i].id1 == mii_val[2]) &&
+               (mii_id[i].id2 == (mii_val[3] & 0xfff0)))
+               break;
+       if (i < NMII)
+           printf("%s rev %d\n", mii_id[i].name, mii_val[3]&0x0f);
+       else
+           printf("vendor %02x:%02x:%02x, model %d rev %d\n",
+                  mii_val[2]>>10, (mii_val[2]>>2)&0xff,
+                  ((mii_val[2]<<6)|(mii_val[3]>>10))&0xff,
+                  (mii_val[3]>>4)&0x3f, mii_val[3]&0x0f);
+       printf("  basic mode:   ");
+       if (bmcr & MII_BMCR_RESET)
+           printf("software reset, ");
+       if (bmcr & MII_BMCR_LOOPBACK)
+           printf("loopback, ");
+       if (bmcr & MII_BMCR_ISOLATE)
+           printf("isolate, ");
+       if (bmcr & MII_BMCR_COLTEST)
+           printf("collision test, ");
+       if (bmcr & MII_BMCR_AN_ENA) {
+           printf("autonegotiation enabled\n");
+       } else {
+           printf("%s Mbit, %s duplex\n",
+                  (bmcr & MII_BMCR_100MBIT) ? "100" : "10",
+                  (bmcr & MII_BMCR_DUPLEX) ? "full" : "half");
+       }
+       printf("  basic status: ");
+       if (bmsr & MII_BMSR_AN_COMPLETE)
+           printf("autonegotiation complete, ");
+       else if (bmcr & MII_BMCR_RESTART)
+           printf("autonegotiation restarted, ");
+       if (bmsr & MII_BMSR_REMOTE_FAULT)
+           printf("remote fault, ");
+       printf((bmsr & MII_BMSR_LINK_VALID) ? "link ok" : "no link");
+       printf("\n  capabilities:%s", media_list(bmsr >> 6, 0));
+       printf("\n  advertising: %s", media_list(advert, 0));
+       if (lkpar & MII_AN_ABILITY_MASK)
+           printf("\n  link partner:%s", media_list(lkpar, 0));
+       printf("\n");
+    }
+    return 0;
+}
+
+/*--------------------------------------------------------------------*/
+
+static int do_one_xcvr(int skfd, char *ifname, int maybe)
+{
+    struct mii_data *mii = (struct mii_data *)&ifr.ifr_data;
+
+    /* Get the vitals from the interface. */
+    strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    if (ioctl(skfd, SIOCGMIIPHY, &ifr) < 0) {
+       if (!maybe || (errno != ENODEV))
+           fprintf(stderr, "SIOCGMIIPHY on '%s' failed: %s\n",
+                   ifname, strerror(errno));
+       return 1;
+    }
+
+    if (override_phy >= 0) {
+       printf("using the specified MII index %d.\n", override_phy);
+       mii->phy_id = override_phy;
+    }
+
+    if (opt_reset) {
+       printf("resetting the transceiver...\n");
+       mdio_write(skfd, MII_BMCR, MII_BMCR_RESET);
+    }
+    if (nway_advertise) {
+       mdio_write(skfd, MII_ANAR, nway_advertise | 1);
+       opt_restart = 1;
+    }
+    if (opt_restart) {
+       printf("restarting autonegotiation...\n");
+       mdio_write(skfd, MII_BMCR, 0x0000);
+       mdio_write(skfd, MII_BMCR, MII_BMCR_AN_ENA|MII_BMCR_RESTART);
+    }
+    if (fixed_speed) {
+       int bmcr = 0;
+       if (fixed_speed & (MII_AN_100BASETX_FD|MII_AN_100BASETX_HD))
+           bmcr |= MII_BMCR_100MBIT;
+       if (fixed_speed & (MII_AN_100BASETX_FD|MII_AN_10BASET_FD))
+           bmcr |= MII_BMCR_DUPLEX;
+       mdio_write(skfd, MII_BMCR, bmcr);
+    }
+
+    if (!opt_restart && !opt_reset && !fixed_speed && !nway_advertise)
+       show_basic_mii(skfd, mii->phy_id);
+
+    return 0;
+}
+
+/*--------------------------------------------------------------------*/
+
+static void watch_one_xcvr(int skfd, char *ifname, int index)
+{
+    struct mii_data *mii = (struct mii_data *)&ifr.ifr_data;
+    static int status[MAX_ETH] = { 0, /* ... */ };
+    int now;
+
+    /* Get the vitals from the interface. */
+    strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+    if (ioctl(skfd, SIOCGMIIPHY, &ifr) < 0) {
+       if (errno != ENODEV)
+           fprintf(stderr, "SIOCGMIIPHY on '%s' failed: %s\n",
+                   ifname, strerror(errno));
+       return;
+    }
+    now = (mdio_read(skfd, MII_BMCR) |
+          (mdio_read(skfd, MII_BMSR) << 16));
+    if (status[index] && (status[index] != now))
+       show_basic_mii(skfd, mii->phy_id);
+    status[index] = now;
+}
+
+/*--------------------------------------------------------------------*/
+
+const char *usage =
+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
+       -V, --version               display version information
+       -v, --verbose               more verbose output
+       -R, --reset                 reset MII to poweron state
+       -r, --restart               restart autonegotiation
+       -w, --watch                 monitor for link status changes
+       -l, --log                   with -w, write events to syslog
+       -A, --advertise=media,...   advertise only specified media
+       -F, --force=media           force specified media technology
+media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
+       (to advertise both HD and FD) 100baseTx, 10baseT\n";
+
+int main(int argc, char **argv)
+{
+    int i, c, ret, errflag = 0;
+    char s[6];
+    
+    while ((c = getopt_long(argc, argv, "A:F:p:lrRvVw?", longopts, 0)) != EOF)
+       switch (c) {
+       case 'A': nway_advertise = parse_media(optarg); break;
+       case 'F': fixed_speed = parse_media(optarg); break;
+       case 'p': override_phy = atoi(optarg); break;
+       case 'r': opt_restart++;        break;
+       case 'R': opt_reset++;          break;
+       case 'v': verbose++;            break;
+       case 'V': opt_version++;        break;
+       case 'w': opt_watch++;          break;
+       case 'l': opt_log++;            break;
+       case '?': errflag++;
+       }
+    /* Check for a few inappropriate option combinations */
+    if (opt_watch) verbose = 0;
+    if (errflag || (fixed_speed & (fixed_speed-1)) ||
+       (fixed_speed && (opt_restart || nway_advertise))) {
+       fprintf(stderr, usage, argv[0]);
+       return 2;
+    }
+
+    if (opt_version)
+       printf(version);
+
+    /* Open a basic socket. */
+    if ((skfd = socket(AF_INET, SOCK_DGRAM,0)) < 0) {
+       perror("socket");
+       exit(-1);
+    }
+
+    /* No remaining args means show all interfaces. */
+    if (optind == argc) {
+       ret = 1;
+       for (i = 0; i < MAX_ETH; i++) {
+           sprintf(s, "eth%d", i);
+           ret &= do_one_xcvr(skfd, s, 1);
+       }
+       if (ret)
+           fprintf(stderr, "no MII interfaces found\n");
+    } else {
+       ret = 0;
+       for (i = optind; i < argc; i++) {
+           ret |= do_one_xcvr(skfd, argv[i], 0);
+       }
+    }
+
+    if (opt_watch && (ret == 0)) {
+       while (1) {
+           sleep(1);
+           if (optind == argc) {
+               for (i = 0; i < MAX_ETH; i++) {
+                   sprintf(s, "eth%d", i);
+                   watch_one_xcvr(skfd, s, i);
+               }
+           } else {
+               for (i = optind; i < argc; i++)
+                   watch_one_xcvr(skfd, argv[i], i-optind);
+           }
+       }
+    }
+
+    close(skfd);
+    return ret;
+}
diff --git a/nameif.c b/nameif.c
new file mode 100644 (file)
index 0000000..8d79b50
--- /dev/null
+++ b/nameif.c
@@ -0,0 +1,302 @@
+/* 
+ * Name Interfaces based on MAC address.
+ * Writen 2000 by Andi Kleen.
+ * Subject to the Gnu Public License, version 2.  
+ * TODO: make it support token ring etc.
+ * $Id: nameif.c,v 1.1 2000/10/18 17:26:29 ak Exp $
+ */ 
+#ifndef _GNU_SOURCE 
+#define _GNU_SOURCE
+#endif
+#include <stdio.h>
+#include <getopt.h>
+#include <sys/syslog.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdarg.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <linux/sockios.h>
+#include <errno.h>
+#include "intl.h" 
+
+const char default_conf[] = "/etc/mactab"; 
+const char *fname = default_conf; 
+int use_syslog; 
+int ctl_sk = -1; 
+
+void err(char *msg) 
+{ 
+       if (use_syslog) { 
+               syslog(LOG_ERR,"%s: %m", msg); 
+       } else { 
+               perror(msg); 
+       } 
+       exit(1); 
+}
+
+void complain(char *fmt, ...) 
+{ 
+       va_list ap;
+       va_start(ap,fmt);
+       if (use_syslog) { 
+               vsyslog(LOG_ERR,fmt,ap);
+       } else {
+               vfprintf(stderr,fmt,ap);
+               fputc('\n',stderr); 
+       }
+       va_end(ap); 
+       exit(1);
+} 
+
+void warning(char *fmt, ...) 
+{ 
+       va_list ap;
+       va_start(ap,fmt);
+       if (use_syslog) { 
+               vsyslog(LOG_ERR,fmt,ap);
+       } else {
+               vfprintf(stderr,fmt,ap);
+               fputc('\n',stderr); 
+       }
+       va_end(ap); 
+} 
+
+int parsemac(char *str, unsigned char *mac)
+{ 
+       char *s; 
+       while ((s = strsep(&str, ":")) != NULL) { 
+               unsigned byte;
+               if (sscanf(s,"%x", &byte)!=1 || byte > 0xff) 
+                       return -1;
+               *mac++ = byte; 
+       }  
+       return 0;
+} 
+
+void *xmalloc(unsigned sz)
+{ 
+       void *p = calloc(sz,1);
+       if (!p) errno=ENOMEM, err("xmalloc"); 
+       return p; 
+} 
+
+void opensock(void)
+{
+       if (ctl_sk < 0) 
+               ctl_sk = socket(PF_INET,SOCK_DGRAM,0); 
+}
+
+#ifndef ifr_newname
+#define ifr_newname ifr_ifru.ifru_slave
+#endif
+
+int  setname(char *oldname, char *newname)
+{
+       struct ifreq ifr;
+       opensock(); 
+       memset(&ifr,0,sizeof(struct ifreq));
+       strcpy(ifr.ifr_name, oldname); 
+       strcpy(ifr.ifr_newname, newname); 
+       return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
+}
+
+int getmac(char *name, unsigned char *mac)
+{
+       int r;
+       struct ifreq ifr;
+       opensock(); 
+       memset(&ifr,0,sizeof(struct ifreq));
+       strcpy(ifr.ifr_name, name); 
+       r = ioctl(ctl_sk, SIOCGIFHWADDR, &ifr);
+       memcpy(mac, ifr.ifr_hwaddr.sa_data, 6); 
+       return r; 
+}
+
+struct change { 
+       struct change *next,**pprev;
+       char ifname[IFNAMSIZ+1];
+       unsigned char mac[6];
+}; 
+struct change *clist;
+
+struct change *lookupmac(unsigned char *mac) 
+{ 
+       struct change *ch;
+       for (ch = clist;ch;ch = ch->next) 
+               if (!memcmp(ch->mac, mac, 6))
+                       return ch;
+       return NULL; 
+} 
+
+int addchange(char *p, struct change *ch, char *pos)
+{
+       if (strchr(ch->ifname, ':'))
+               warning(_("alias device %s at %s probably has no mac"), 
+                       ch->ifname, pos); 
+       if (parsemac(p,ch->mac) < 0) 
+               complain(_("cannot parse MAC `%s' at %s"), p, pos); 
+       if (clist) 
+               clist->pprev = &ch->next;
+       ch->next = clist;
+       ch->pprev = &clist;
+       clist = ch;
+       return 0; 
+}
+
+void readconf(void)
+{
+       char *line; 
+       size_t linel; 
+       int linenum; 
+       FILE *ifh;
+       char *p;
+       int n;
+
+       ifh = fopen(fname, "r");
+       if (!ifh) 
+               complain(_("opening configuration file %s: %s"),fname,strerror(errno)); 
+
+       line = NULL; 
+       linel = 0;
+       linenum = 1; 
+       while (getdelim(&line, &linel, '\n', ifh) > 0) {
+               struct change *ch = xmalloc(sizeof(struct change)); 
+               char pos[20]; 
+
+               sprintf(pos, _("line %d"), linenum); 
+
+               if ((p = strchr(line,'#')) != NULL)
+                       *p = '\0';
+               p = line; 
+               while (isspace(*p))
+                       ++p; 
+               if (*p == '\0')
+                       continue; 
+               n = strcspn(p, " \t"); 
+               if (n > IFNAMSIZ) 
+                       complain(_("interface name too long at line %d"), line);  
+               memcpy(ch->ifname, p, n); 
+               ch->ifname[n] = 0; 
+               p += n; 
+               p += strspn(p, " \t"); 
+               n = strspn(p, "0123456789ABCDEFabcdef:"); 
+               p[n] = 0; 
+               addchange(p, ch, pos);
+               linenum++;
+       }   
+       fclose(ifh); 
+}
+
+struct option lopt[] = { 
+       {"syslog", 0, NULL, 's' },
+       {"config-file", 1, NULL, 'c' },
+       {"help", 0, NULL, '?' }, 
+       {NULL}, 
+}; 
+
+void usage(void)
+{
+       fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}")); 
+       exit(1); 
+}
+
+int main(int ac, char **av) 
+{ 
+       FILE *ifh; 
+       char *p;
+       int n;
+       int linenum; 
+       char *line = NULL;
+       size_t linel = 0;
+
+       for (;;) {
+               int c = getopt_long(ac,av,"c:s",lopt,NULL);
+               if (c == -1) break;
+               switch (c) { 
+               default:
+               case '?':
+                       usage(); 
+               case 'c':
+                       fname = optarg;
+                       break;
+               case 's':
+                       use_syslog = 1;
+                       break;
+               }
+       }
+
+       if (use_syslog) 
+               openlog("nameif",0,LOG_LOCAL0);
+               
+       while (optind < ac) { 
+               struct change *ch = xmalloc(sizeof(struct change)); 
+               char pos[30];
+
+               if ((ac-optind) & 1) 
+                       usage();
+               if (strlen(av[optind])+1>IFNAMSIZ) 
+                       complain(_("interface name `%s' too long"), av[optind]);
+               strcpy(ch->ifname, av[optind]); 
+               optind++; 
+               sprintf(pos,_("argument %d"),optind); 
+               addchange(av[optind], ch, pos); 
+               optind++; 
+       } 
+
+       if (!clist || fname != default_conf) 
+               readconf(); 
+
+       ifh = fopen("/proc/net/dev", "r"); 
+       if (!ifh)  complain(_("open of /proc/net/dev: %s"), strerror(errno)); 
+
+
+       linenum = 0;
+       while (getdelim(&line, &linel, '\n', ifh) > 0) {
+               struct change *ch; 
+               unsigned char mac[6];
+
+               if (linenum++ < 2) 
+                       continue;
+                       
+               p = line; 
+               while (isspace(*p)) 
+                       ++p;
+               n = strcspn(p, ": \t");  
+               p[n] = 0; 
+               
+               if (n > IFNAMSIZ-1) 
+                       complain(_("interface name `%s' too long"), p); 
+                       
+               if (getmac(p, mac) < 0) 
+                       continue;
+                       
+               ch = lookupmac(mac); 
+               if (!ch) 
+                       continue;
+                       
+               *ch->pprev = ch->next;
+               if (strcmp(p, ch->ifname)) { 
+                       if (setname(p, ch->ifname) < 0)  
+                               complain(_("cannot change name of %s to %s: %s"),
+                                               p, ch->ifname, strerror(errno)); 
+               } 
+               free(ch);
+       } 
+       fclose(ifh); 
+       
+       while (clist) { 
+               struct change *ch = clist;
+               clist = clist->next;
+               warning(_("interface '%s' not found"), ch->ifname); 
+               free(ch); 
+       }
+
+       if (use_syslog)
+               closelog();
+       return 0;
+} 
+
diff --git a/netstat.c b/netstat.c
new file mode 100644 (file)
index 0000000..1ef790e
--- /dev/null
+++ b/netstat.c
@@ -0,0 +1,1854 @@
+/*
+ * netstat    This file contains an implementation of the command
+ *              that helps in debugging the networking modules.
+ *
+ * NET-TOOLS    A collection of programs that form the base set of the
+ *              NET-3 Networking Distribution for the LINUX operating
+ *              system.
+ *
+ * Version:     $Id: netstat.c,v 1.43 2001/04/15 14:41:17 pb Exp $
+ *
+ * Authors:     Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
+ *              Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              Phil Packer, <pep@wicked.demon.co.uk>
+ *              Johannes Stille, <johannes@titan.os.open.de>
+ *              Bernd Eckenfels, <net-tools@lina.inka.de>
+ *              Phil Blundell <philb@gnu.org>
+ *              Tuan Hoang <tqhoang@bigfoot.com>
+ *
+ * Tuned for NET3 by:
+ *              Alan Cox, <A.Cox@swansea.ac.uk>
+ *              Copyright (c) 1993  Fred Baumgarten
+ *
+ * Modified:
+ *
+ *960116 {1.01} Bernd Eckenfels:        verbose, cleanups
+ *960204 {1.10} Bernd Eckenfels:        aftrans, usage, new route_info, 
+ *                                      DLFT_AF
+ *960204 {1.11} Bernd Eckenfels:        netlink support
+ *960204 {1.12} Bernd Eckenfels:        route_init()
+ *960215 {1.13} Bernd Eckenfels:        netlink_print honors HAVE_
+ *960217 {1.14} Bernd Eckenfels:        masq_info from Jos Vos and 
+ *                                      ax25_info from Jonathan Naylor.
+ *960218 {1.15} Bernd Eckenfels:        ipx_info rewritten, -e for tcp/ipx
+ *960220 {1.16} Bernd Eckenfels:        minor output reformats, -a for -x
+ *960221 {1.17} Bernd Eckenfels:        route_init->getroute_init
+ *960426 {1.18} Bernd Eckenfels:        new RTACTION, SYM/NUM, FIB/CACHE
+ *960517 {1.19} Bernd Eckenfels:        usage() spelling fix and --unix inode, 
+ *                                      ':' is part of sock_addr for --inet
+ *960822 {x.xx} Frank Strauss:          INET6 support
+ *
+ *970406 {1.33} Philip Copeland         Added snmp reporting support module -s
+ *                                      code provided by Andi Kleen
+ *                                      (relly needs to be kernel hooked but 
+ *                                      this will do in the meantime)
+ *                                      minor header file misplacement tidy up.
+ *980815 {1.xx} Stephane Fillod:       X.25 support
+ *980411 {1.34} Arnaldo Carvalho        i18n: catgets -> gnu gettext, substitution
+ *                                      of sprintf for snprintf
+ *10/1998      Andi Kleen              Use new interface primitives.
+ *990101 {1.36}        Bernd Eckenfels         usage updated to include -s and -C -F,
+ *                                     fixed netstat -rC output (lib/inet_gr.c)
+ *                                     removed broken NETLINK Support
+ *                                     fixed format for /proc/net/udp|tcp|raw
+ *                                     added -w,-t,-u TcpExt support to -s
+ *990131 {1.37} Jan Kratochvil          added -p for prg_cache() & friends
+ *                                      Flames to <short@ucw.cz>.
+ *              Tuan Hoang              added IGMP support for IPv4 and IPv6
+ *
+ *990420 {1.38} Tuan Hoang              removed a useless assignment from igmp_do_one()
+ *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale
+ *
+ *              This program is free software; you can redistribute it
+ *              and/or  modify it under  the terms of  the GNU General
+ *              Public  License as  published  by  the  Free  Software
+ *              Foundation;  either  version 2 of the License, or  (at
+ *              your option) any later version.
+ *
+ */
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <paths.h>
+#include <pwd.h>
+#include <getopt.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <dirent.h>
+
+#include "net-support.h"
+#include "pathnames.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+#include "sockets.h"
+#include "interface.h"
+#include "util.h"
+
+#define PROGNAME_WIDTH 20
+
+#if !defined(s6_addr32) && defined(in6a_words)
+#define s6_addr32 in6a_words   /* libinet6                     */
+#endif
+
+/* prototypes for statistics.c */
+void parsesnmp(int, int, int);
+void inittab(void);
+
+typedef enum {
+    SS_FREE = 0,               /* not allocated                */
+    SS_UNCONNECTED,            /* unconnected to any socket    */
+    SS_CONNECTING,             /* in process of connecting     */
+    SS_CONNECTED,              /* connected to socket          */
+    SS_DISCONNECTING           /* in process of disconnecting  */
+} socket_state;
+
+#define SO_ACCEPTCON    (1<<16)        /* performed a listen           */
+#define SO_WAITDATA     (1<<17)        /* wait data to read            */
+#define SO_NOSPACE      (1<<18)        /* no space to write            */
+
+#define DFLT_AF "inet"
+
+#define FEATURE_NETSTAT
+#include "lib/net-features.h"
+
+char *Release = RELEASE, *Version = "netstat 1.42 (2001-04-15)", *Signature = "Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others";
+
+
+#define E_READ  -1
+#define E_IOCTL -3
+
+int flag_int = 0;
+int flag_rou = 0;
+int flag_mas = 0;
+int flag_sta = 0;
+
+int flag_all = 0;
+int flag_lst = 0;
+int flag_cnt = 0;
+int flag_deb = 0;
+int flag_not = 0;
+int flag_cf  = 0;
+int flag_opt = 0;
+int flag_raw = 0;
+int flag_tcp = 0;
+int flag_udp = 0;
+int flag_igmp= 0;
+int flag_rom = 0;
+int flag_exp = 1;
+int flag_prg = 0;
+int flag_arg = 0;
+int flag_ver = 0;
+
+FILE *procinfo;
+
+#define INFO_GUTS1(file,name,proc)                     \
+  procinfo = fopen((file), "r");                       \
+  if (procinfo == NULL) {                              \
+    if (errno != ENOENT) {                             \
+      perror((file));                                  \
+      return -1;                                       \
+    }                                                  \
+    if (flag_arg || flag_ver)                          \
+      ESYSNOT("netstat", (name));                      \
+    if (flag_arg)                                      \
+      rc = 1;                                          \
+  } else {                                             \
+    do {                                               \
+      if (fgets(buffer, sizeof(buffer), procinfo))     \
+        (proc)(lnr++, buffer);                         \
+    } while (!feof(procinfo));                         \
+    fclose(procinfo);                                  \
+  }
+
+#if HAVE_AFINET6
+#define INFO_GUTS2(file,proc)                          \
+  lnr = 0;                                             \
+  procinfo = fopen((file), "r");                       \
+  if (procinfo != NULL) {                              \
+    do {                                               \
+      if (fgets(buffer, sizeof(buffer), procinfo))     \
+       (proc)(lnr++, buffer);                          \
+    } while (!feof(procinfo));                         \
+    fclose(procinfo);                                  \
+  }
+#else
+#define INFO_GUTS2(file,proc)
+#endif
+
+#define INFO_GUTS3                                     \
+ return rc;
+
+#define INFO_GUTS6(file,file6,name,proc)               \
+ char buffer[8192];                                    \
+ int rc = 0;                                           \
+ int lnr = 0;                                          \
+ if (!flag_arg || flag_inet) {                         \
+    INFO_GUTS1(file,name,proc)                         \
+ }                                                     \
+ if (!flag_arg || flag_inet6) {                                \
+    INFO_GUTS2(file6,proc)                             \
+ }                                                     \
+ INFO_GUTS3
+
+#define INFO_GUTS(file,name,proc)                      \
+ char buffer[8192];                                    \
+ int rc = 0;                                           \
+ int lnr = 0;                                          \
+ INFO_GUTS1(file,name,proc)                            \
+ INFO_GUTS3
+
+#define PROGNAME_WIDTHs PROGNAME_WIDTH1(PROGNAME_WIDTH)
+#define PROGNAME_WIDTH1(s) PROGNAME_WIDTH2(s)
+#define PROGNAME_WIDTH2(s) #s
+
+#define PRG_HASH_SIZE 211
+
+static struct prg_node {
+    struct prg_node *next;
+    int inode;
+    char name[PROGNAME_WIDTH];
+} *prg_hash[PRG_HASH_SIZE];
+
+static char prg_cache_loaded = 0;
+
+#define PRG_HASHIT(x) ((x) % PRG_HASH_SIZE)
+
+#define PROGNAME_BANNER "PID/Program name"
+
+#define print_progname_banner() do { if (flag_prg) printf("%-" PROGNAME_WIDTHs "s"," " PROGNAME_BANNER); } while (0)
+
+#define PRG_LOCAL_ADDRESS "local_address"
+#define PRG_INODE       "inode"
+#define PRG_SOCKET_PFX    "socket:["
+#define PRG_SOCKET_PFXl (strlen(PRG_SOCKET_PFX))
+#define PRG_SOCKET_PFX2   "[0000]:"
+#define PRG_SOCKET_PFX2l  (strlen(PRG_SOCKET_PFX2))
+
+
+#ifndef LINE_MAX
+#define LINE_MAX 4096
+#endif
+
+#define PATH_PROC         "/proc"
+#define PATH_FD_SUFF   "fd"
+#define PATH_FD_SUFFl       strlen(PATH_FD_SUFF)
+#define PATH_PROC_X_FD      PATH_PROC "/%s/" PATH_FD_SUFF
+#define PATH_CMDLINE   "cmdline"
+#define PATH_CMDLINEl       strlen(PATH_CMDLINE)
+/* NOT working as of glibc-2.0.7: */
+#undef  DIRENT_HAVE_D_TYPE_WORKS
+
+static void prg_cache_add(int inode, char *name)
+{
+    unsigned hi = PRG_HASHIT(inode);
+    struct prg_node **pnp,*pn;
+
+    prg_cache_loaded=2;
+    for (pnp=prg_hash+hi;(pn=*pnp);pnp=&pn->next) {
+       if (pn->inode==inode) {
+           /* Some warning should be appropriate here
+              as we got multiple processes for one i-node */
+           return;
+       }
+    }
+    if (!(*pnp=malloc(sizeof(**pnp)))) 
+       return;
+    pn=*pnp;
+    pn->next=NULL;
+    pn->inode=inode;
+    if (strlen(name)>sizeof(pn->name)-1) 
+       name[sizeof(pn->name)-1]='\0';
+    strcpy(pn->name,name);
+}
+
+static const char *prg_cache_get(int inode)
+{
+    unsigned hi=PRG_HASHIT(inode);
+    struct prg_node *pn;
+
+    for (pn=prg_hash[hi];pn;pn=pn->next)
+       if (pn->inode==inode) return(pn->name);
+    return("-");
+}
+
+static void prg_cache_clear(void)
+{
+    struct prg_node **pnp,*pn;
+
+    if (prg_cache_loaded == 2)
+       for (pnp=prg_hash;pnp<prg_hash+PRG_HASH_SIZE;pnp++)
+           while ((pn=*pnp)) {
+               *pnp=pn->next;
+               free(pn);
+           }
+    prg_cache_loaded=0;
+}
+
+static void extract_type_1_socket_inode(const char lname[], long * inode_p) {
+
+    /* If lname is of the form "socket:[12345]", extract the "12345"
+       as *inode_p.  Otherwise, return -1 as *inode_p.
+       */
+
+    if (strlen(lname) < PRG_SOCKET_PFXl+3) *inode_p = -1;
+    else if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) *inode_p = -1;
+    else if (lname[strlen(lname)-1] != ']') *inode_p = -1;
+    else {
+        char inode_str[strlen(lname + 1)];  /* e.g. "12345" */
+        const int inode_str_len = strlen(lname) - PRG_SOCKET_PFXl - 1;
+        char *serr;
+
+        strncpy(inode_str, lname+PRG_SOCKET_PFXl, inode_str_len);
+        inode_str[inode_str_len] = '\0';
+        *inode_p = strtol(inode_str,&serr,0);
+        if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) 
+            *inode_p = -1;
+    }
+}
+
+
+
+static void extract_type_2_socket_inode(const char lname[], long * inode_p) {
+
+    /* If lname is of the form "[0000]:12345", extract the "12345"
+       as *inode_p.  Otherwise, return -1 as *inode_p.
+       */
+
+    if (strlen(lname) < PRG_SOCKET_PFX2l+1) *inode_p = -1;
+    else if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) *inode_p = -1;
+    else {
+        char *serr;
+
+        *inode_p=strtol(lname + PRG_SOCKET_PFX2l,&serr,0);
+        if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) 
+            *inode_p = -1;
+    }
+}
+
+
+
+static void prg_cache_load(void)
+{
+    char line[LINE_MAX],eacces=0;
+    int procfdlen,fd,cmdllen,lnamelen;
+    char lname[30],cmdlbuf[512],finbuf[PROGNAME_WIDTH];
+    long inode;
+    const char *cs,*cmdlp;
+    DIR *dirproc=NULL,*dirfd=NULL;
+    struct dirent *direproc,*direfd;
+
+    if (prg_cache_loaded || !flag_prg) return;
+    prg_cache_loaded=1;
+    cmdlbuf[sizeof(cmdlbuf)-1]='\0';
+    if (!(dirproc=opendir(PATH_PROC))) goto fail;
+    while (errno=0,direproc=readdir(dirproc)) {
+#ifdef DIRENT_HAVE_D_TYPE_WORKS
+       if (direproc->d_type!=DT_DIR) continue;
+#endif
+       for (cs=direproc->d_name;*cs;cs++)
+           if (!isdigit(*cs)) 
+               break;
+       if (*cs) 
+           continue;
+       procfdlen=snprintf(line,sizeof(line),PATH_PROC_X_FD,direproc->d_name);
+       if (procfdlen<=0 || procfdlen>=sizeof(line)-5) 
+           continue;
+       errno=0;
+       dirfd=opendir(line);
+       if (! dirfd) {
+           if (errno==EACCES) 
+               eacces=1;
+           continue;
+       }
+       line[procfdlen] = '/';
+       cmdlp = NULL;
+       while ((direfd = readdir(dirfd))) {
+#ifdef DIRENT_HAVE_D_TYPE_WORKS
+           if (direfd->d_type!=DT_LNK) 
+               continue;
+#endif
+           if (procfdlen+1+strlen(direfd->d_name)+1>sizeof(line)) 
+               continue;
+           memcpy(line + procfdlen - PATH_FD_SUFFl, PATH_FD_SUFF "/",
+                  PATH_FD_SUFFl+1);
+           strcpy(line + procfdlen + 1, direfd->d_name);
+           lnamelen=readlink(line,lname,sizeof(lname)-1);
+            lname[lnamelen] = '\0';  /*make it a null-terminated string*/
+
+            extract_type_1_socket_inode(lname, &inode);
+
+            if (inode < 0) extract_type_2_socket_inode(lname, &inode);
+
+            if (inode < 0) continue;
+
+           if (!cmdlp) {
+               if (procfdlen - PATH_FD_SUFFl + PATH_CMDLINEl >= 
+                   sizeof(line) - 5) 
+                   continue;
+               strcpy(line + procfdlen-PATH_FD_SUFFl, PATH_CMDLINE);
+               fd = open(line, O_RDONLY);
+               if (fd < 0) 
+                   continue;
+               cmdllen = read(fd, cmdlbuf, sizeof(cmdlbuf) - 1);
+               if (close(fd)) 
+                   continue;
+               if (cmdllen == -1) 
+                   continue;
+               if (cmdllen < sizeof(cmdlbuf) - 1) 
+                   cmdlbuf[cmdllen]='\0';
+               if ((cmdlp = strrchr(cmdlbuf, '/'))) 
+                   cmdlp++;
+               else 
+                   cmdlp = cmdlbuf;
+           }
+
+           snprintf(finbuf, sizeof(finbuf), "%s/%s", direproc->d_name, cmdlp);
+           prg_cache_add(inode, finbuf);
+       }
+       closedir(dirfd); 
+       dirfd = NULL;
+    }
+    if (dirproc) 
+       closedir(dirproc);
+    if (dirfd) 
+       closedir(dirfd);
+    if (!eacces) 
+       return;
+    if (prg_cache_loaded == 1) {
+    fail:
+       fprintf(stderr,_("(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"),
+               geteuid());
+    }
+    else
+       fprintf(stderr, _("(Not all processes could be identified, non-owned process info\n"
+                        " will not be shown, you would have to be root to see it all.)\n"));
+}
+
+#if HAVE_AFNETROM
+static const char *netrom_state[] =
+{
+    N_("LISTENING"),
+    N_("CONN SENT"),
+    N_("DISC SENT"),
+    N_("ESTABLISHED")
+};
+
+static int netrom_info(void)
+{
+    FILE *f;
+    char buffer[256], dev[16];
+    int st, vs, vr, sendq, recvq, ret;
+
+    f = fopen(_PATH_PROCNET_NR, "r");
+    if (f == NULL) {
+       if (errno != ENOENT) {
+           perror(_PATH_PROCNET_NR);
+           return (-1);
+       }
+       if (flag_arg || flag_ver)
+           ESYSNOT("netstat", "AF NETROM");
+       if (flag_arg)
+           return (1);
+       else
+           return (0);
+    }
+    printf(_("Active NET/ROM sockets\n"));
+    printf(_("User       Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"));
+    fgets(buffer, 256, f);
+
+    while (fgets(buffer, 256, f)) {
+       buffer[9] = 0;
+       buffer[19] = 0;
+       buffer[29] = 0;
+       ret = sscanf(buffer + 30, "%s %*x/%*x %*x/%*x %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d %d %d %*d",
+              dev, &st, &vs, &vr, &sendq, &recvq);
+       if (ret != 6) {
+           printf(_("Problem reading data from %s\n"), _PATH_PROCNET_NR);
+           continue;
+       }
+       printf("%-9s  %-9s  %-9s  %-6s  %-11s  %03d/%03d  %-6d  %-6d\n",
+              buffer, buffer + 10, buffer + 20,
+              dev,
+              _(netrom_state[st]),
+              vr, vs, sendq, recvq);
+    }
+    fclose(f);
+    return 0;
+}
+#endif
+
+/* These enums are used by IPX too. :-( */
+enum {
+    TCP_ESTABLISHED = 1,
+    TCP_SYN_SENT,
+    TCP_SYN_RECV,
+    TCP_FIN_WAIT1,
+    TCP_FIN_WAIT2,
+    TCP_TIME_WAIT,
+    TCP_CLOSE,
+    TCP_CLOSE_WAIT,
+    TCP_LAST_ACK,
+    TCP_LISTEN,
+    TCP_CLOSING                        /* now a valid state */
+};
+
+#if HAVE_AFINET || HAVE_AFINET6
+
+static const char *tcp_state[] =
+{
+    "",
+    N_("ESTABLISHED"),
+    N_("SYN_SENT"),
+    N_("SYN_RECV"),
+    N_("FIN_WAIT1"),
+    N_("FIN_WAIT2"),
+    N_("TIME_WAIT"),
+    N_("CLOSE"),
+    N_("CLOSE_WAIT"),
+    N_("LAST_ACK"),
+    N_("LISTEN"),
+    N_("CLOSING")
+};
+
+static void finish_this_one(int uid, unsigned long inode, const char *timers)
+{
+    struct passwd *pw;
+
+    if (flag_exp > 1) {
+       if (!(flag_not & FLAG_NUM_USER) && ((pw = getpwuid(uid)) != NULL))
+           printf("%-10s ", pw->pw_name);
+       else
+           printf("%-10d ", uid);
+       printf("%-10ld ",inode);
+    }
+    if (flag_prg)
+       printf("%-" PROGNAME_WIDTHs "s",prg_cache_get(inode));
+    if (flag_opt)
+       printf("%s", timers);
+    putchar('\n');
+}
+
+static void igmp_do_one(int lnr, const char *line)
+{
+    char mcast_addr[128];
+#if HAVE_AFINET6
+    struct sockaddr_in6 mcastaddr;
+    char addr6[INET6_ADDRSTRLEN];
+    struct in6_addr in6;
+    extern struct aftype inet6_aftype;
+#else
+    struct sockaddr_in mcastaddr;
+#endif
+    struct aftype *ap;
+    static int idx_flag = 0;
+    static int igmp6_flag = 0;
+    static char device[16];
+    int num, idx, refcnt;
+
+    if (lnr == 0) {
+       /* IPV6 ONLY */
+       /* igmp6 file does not have any comments on first line */
+       if ( strstr( line, "Device" ) == NULL ) {
+           igmp6_flag = 1;
+       } else {
+           /* IPV4 ONLY */
+           /* 2.1.x kernels and up have Idx field */
+           /* 2.0.x and below do not have Idx field */
+           if ( strncmp( line, "Idx", strlen("Idx") ) == 0 )
+               idx_flag = 1;
+           else
+               idx_flag = 0;
+           return;
+       }
+    }
+
+    if (igmp6_flag) {    /* IPV6 */
+#if HAVE_AFINET6
+       num = sscanf( line, "%d %15s %64[0-9A-Fa-f] %d", &idx, device, mcast_addr, &refcnt );
+       if (num == 4) {
+           /* Demangle what the kernel gives us */
+           sscanf(mcast_addr, "%08X%08X%08X%08X",
+                  &in6.s6_addr32[0], &in6.s6_addr32[1],
+           &in6.s6_addr32[2], &in6.s6_addr32[3]);
+           in6.s6_addr32[0] = htonl(in6.s6_addr32[0]);
+           in6.s6_addr32[1] = htonl(in6.s6_addr32[1]);
+           in6.s6_addr32[2] = htonl(in6.s6_addr32[2]);
+           in6.s6_addr32[3] = htonl(in6.s6_addr32[3]);
+        inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+           inet6_aftype.input(1, addr6, (struct sockaddr *) &mcastaddr);
+           mcastaddr.sin6_family = AF_INET6;
+       } else {
+           fprintf(stderr, _("warning, got bogus igmp6 line %d.\n"), lnr);
+           return;
+       }
+
+       if ((ap = get_afntype(((struct sockaddr *) &mcastaddr)->sa_family)) == NULL) {
+           fprintf(stderr, _("netstat: unsupported address family %d !\n"),
+                   ((struct sockaddr *) &mcastaddr)->sa_family);
+           return;
+       }
+       safe_strncpy(mcast_addr, ap->sprint((struct sockaddr *) &mcastaddr, 
+                                     flag_not), sizeof(mcast_addr));
+       printf("%-15s %-6d %s\n", device, refcnt, mcast_addr);
+#endif
+    } else {    /* IPV4 */
+#if HAVE_AFINET
+       if (line[0] != '\t') {
+           if (idx_flag) {
+               if ((num = sscanf( line, "%d\t%10c", &idx, device)) < 2) {
+                   fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
+                   return;
+               }
+           } else {
+               if ( (num = sscanf( line, "%10c", device )) < 1 ) {
+                   fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
+                   return;
+               }
+           }
+           device[10] = '\0';
+           return;
+       } else if ( line[0] == '\t' ) {
+           if ( (num = sscanf(line, "\t%8[0-9A-Fa-f] %d", mcast_addr, &refcnt)) < 2 ) {
+               fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
+               return;
+           }
+           sscanf( mcast_addr, "%X",
+                   &((struct sockaddr_in *) &mcastaddr)->sin_addr.s_addr );
+           ((struct sockaddr *) &mcastaddr)->sa_family = AF_INET;
+       } else {
+           fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr);
+           return;
+       }
+       
+       if ((ap = get_afntype(((struct sockaddr *) &mcastaddr)->sa_family)) == NULL) {
+           fprintf(stderr, _("netstat: unsupported address family %d !\n"),
+                   ((struct sockaddr *) &mcastaddr)->sa_family);
+           return;
+       }
+       safe_strncpy(mcast_addr, ap->sprint((struct sockaddr *) &mcastaddr, 
+                                     flag_not), sizeof(mcast_addr));
+       printf("%-15s %-6d %s\n", device, refcnt, mcast_addr );
+#endif
+    }    /* IPV4 */
+}
+
+#if HAVE_AFX25
+static int x25_info(void)
+{
+       FILE *f=fopen(_PATH_PROCNET_X25, "r");
+       char buffer[256],dev[16];
+       int st,vs,vr,sendq,recvq,lci;
+       static char *x25_state[5]=
+       {
+               "LISTENING",
+               "SABM_SENT",
+               "DISC_SENT",
+               "ESTABLISHED",
+               "RECOVERY"
+       };
+       if(!(f=fopen(_PATH_PROCNET_X25, "r")))
+       {
+               if (errno != ENOENT) {
+                       perror(_PATH_PROCNET_X25);
+                       return(-1);
+               }
+               if (flag_arg || flag_ver)
+                       ESYSNOT("netstat","AF X25");
+               if (flag_arg)
+                       return(1);
+               else
+                       return(0);
+       }
+       printf( _("Active X.25 sockets\n"));
+       /* IMHO, Vr/Vs is not very usefull --SF */
+       printf( _("Dest         Source          Device  LCI  State        Vr/Vs  Send-Q  Recv-Q\n"));
+       fgets(buffer,256,f);
+       while(fgets(buffer,256,f))
+       {
+               buffer[10]=0;
+               buffer[20]=0;
+               sscanf(buffer+22,"%s %d %d %d %d %*d %*d %*d %*d %*d %*d %d %d %*d",
+                       dev,&lci,&st,&vs,&vr,&sendq,&recvq);
+               if (!(flag_all || lci))
+                       continue;
+               printf("%-15s %-15s %-7s %-3d  %-11s  %02d/%02d  %-6d  %-6d\n",
+                       buffer,buffer+11,
+                       dev,
+                       lci,
+                       x25_state[st],
+                       vr,vs,sendq,recvq);
+       }
+       fclose(f);
+       return 0;               
+}
+#endif
+
+static int igmp_info(void)
+{
+    INFO_GUTS6(_PATH_PROCNET_IGMP, _PATH_PROCNET_IGMP6, "AF INET (igmp)",
+              igmp_do_one);
+}
+
+static void tcp_do_one(int lnr, const char *line)
+{
+    unsigned long rxq, txq, time_len, retr, inode;
+    int num, local_port, rem_port, d, state, uid, timer_run, timeout;
+    char rem_addr[128], local_addr[128], timers[64], buffer[1024], more[512];
+    struct aftype *ap;
+#if HAVE_AFINET6
+    struct sockaddr_in6 localaddr, remaddr;
+    char addr6[INET6_ADDRSTRLEN];
+    struct in6_addr in6;
+    extern struct aftype inet6_aftype;
+#else
+    struct sockaddr_in localaddr, remaddr;
+#endif
+
+    if (lnr == 0)
+       return;
+
+    num = sscanf(line,
+    "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
+                &d, local_addr, &local_port, rem_addr, &rem_port, &state,
+                &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+
+    if (strlen(local_addr) > 8) {
+#if HAVE_AFINET6
+       /* Demangle what the kernel gives us */
+       sscanf(local_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+           &in6.s6_addr32[2], &in6.s6_addr32[3]);
+       inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &localaddr);
+       sscanf(rem_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+              &in6.s6_addr32[2], &in6.s6_addr32[3]);
+       inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &remaddr);
+       localaddr.sin6_family = AF_INET6;
+       remaddr.sin6_family = AF_INET6;
+#endif
+    } else {
+       sscanf(local_addr, "%X",
+              &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr);
+       sscanf(rem_addr, "%X",
+              &((struct sockaddr_in *) &remaddr)->sin_addr.s_addr);
+       ((struct sockaddr *) &localaddr)->sa_family = AF_INET;
+       ((struct sockaddr *) &remaddr)->sa_family = AF_INET;
+    }
+
+    if (num < 11) {
+       fprintf(stderr, _("warning, got bogus tcp line.\n"));
+       return;
+    }
+    if ((ap = get_afntype(((struct sockaddr *) &localaddr)->sa_family)) == NULL) {
+       fprintf(stderr, _("netstat: unsupported address family %d !\n"),
+               ((struct sockaddr *) &localaddr)->sa_family);
+       return;
+    }
+    if (state == TCP_LISTEN) {
+       time_len = 0;
+       retr = 0L;
+       rxq = 0L;
+       txq = 0L;
+    }
+    safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+                                       flag_not), sizeof(local_addr));
+    safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not),
+                sizeof(rem_addr));
+    if (flag_all || (flag_lst && !rem_port) || (!flag_lst && rem_port)) {
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(local_port), "tcp",
+                          flag_not & FLAG_NUM_PORT));
+
+       if ((strlen(local_addr) + strlen(buffer)) > 22)
+           local_addr[22 - strlen(buffer)] = '\0';
+
+       strcat(local_addr, ":");
+       strcat(local_addr, buffer);
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
+
+       if ((strlen(rem_addr) + strlen(buffer)) > 22)
+           rem_addr[22 - strlen(buffer)] = '\0';
+
+       strcat(rem_addr, ":");
+       strcat(rem_addr, buffer);
+       timers[0] = '\0';
+
+       if (flag_opt)
+           switch (timer_run) {
+           case 0:
+               snprintf(timers, sizeof(timers), _("off (0.00/%ld/%d)"), retr, timeout);
+               break;
+
+           case 1:
+               snprintf(timers, sizeof(timers), _("on (%2.2f/%ld/%d)"),
+                        (double) time_len / HZ, retr, timeout);
+               break;
+
+           case 2:
+               snprintf(timers, sizeof(timers), _("keepalive (%2.2f/%ld/%d)"),
+                        (double) time_len / HZ, retr, timeout);
+               break;
+
+           case 3:
+               snprintf(timers, sizeof(timers), _("timewait (%2.2f/%ld/%d)"),
+                        (double) time_len / HZ, retr, timeout);
+               break;
+
+           default:
+               snprintf(timers, sizeof(timers), _("unkn-%d (%2.2f/%ld/%d)"),
+                        timer_run, (double) time_len / HZ, retr, timeout);
+               break;
+           }
+       printf("tcp   %6ld %6ld %-23s %-23s %-12s",
+              rxq, txq, local_addr, rem_addr, _(tcp_state[state]));
+
+       finish_this_one(uid,inode,timers);
+    }
+}
+
+static int tcp_info(void)
+{
+    INFO_GUTS6(_PATH_PROCNET_TCP, _PATH_PROCNET_TCP6, "AF INET (tcp)",
+              tcp_do_one);
+}
+
+static void udp_do_one(int lnr, const char *line)
+{
+    char buffer[8192], local_addr[64], rem_addr[64];
+    char *udp_state, timers[64], more[512];
+    int num, local_port, rem_port, d, state, timer_run, uid, timeout;
+#if HAVE_AFINET6
+    struct sockaddr_in6 localaddr, remaddr;
+    char addr6[INET6_ADDRSTRLEN];
+    struct in6_addr in6;
+    extern struct aftype inet6_aftype;
+#else
+    struct sockaddr_in localaddr, remaddr;
+#endif
+    struct aftype *ap;
+    unsigned long rxq, txq, time_len, retr, inode;
+
+    if (lnr == 0)
+       return;
+
+    more[0] = '\0';
+    num = sscanf(line,
+                "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
+                &d, local_addr, &local_port,
+                rem_addr, &rem_port, &state,
+         &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+
+    if (strlen(local_addr) > 8) {
+#if HAVE_AFINET6
+       sscanf(local_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+              &in6.s6_addr32[2], &in6.s6_addr32[3]);
+       inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &localaddr);
+       sscanf(rem_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+              &in6.s6_addr32[2], &in6.s6_addr32[3]);
+       inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &remaddr);
+       localaddr.sin6_family = AF_INET6;
+       remaddr.sin6_family = AF_INET6;
+#endif
+    } else {
+       sscanf(local_addr, "%X",
+              &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr);
+       sscanf(rem_addr, "%X",
+              &((struct sockaddr_in *) &remaddr)->sin_addr.s_addr);
+       ((struct sockaddr *) &localaddr)->sa_family = AF_INET;
+       ((struct sockaddr *) &remaddr)->sa_family = AF_INET;
+    }
+
+    retr = 0L;
+    if (!flag_opt)
+       more[0] = '\0';
+
+    if (num < 10) {
+       fprintf(stderr, _("warning, got bogus udp line.\n"));
+       return;
+    }
+    if ((ap = get_afntype(((struct sockaddr *) &localaddr)->sa_family)) == NULL) {
+       fprintf(stderr, _("netstat: unsupported address family %d !\n"),
+               ((struct sockaddr *) &localaddr)->sa_family);
+       return;
+    }
+    switch (state) {
+    case TCP_ESTABLISHED:
+       udp_state = _("ESTABLISHED");
+       break;
+
+    case TCP_CLOSE:
+       udp_state = "";
+       break;
+
+    default:
+       udp_state = _("UNKNOWN");
+       break;
+    }
+
+#if HAVE_AFINET6
+#define notnull(A) (((A.sin6_family == AF_INET6) && \
+        ((A.sin6_addr.s6_addr32[0]) ||            \
+         (A.sin6_addr.s6_addr32[1]) ||            \
+         (A.sin6_addr.s6_addr32[2]) ||            \
+         (A.sin6_addr.s6_addr32[3]))) ||          \
+       ((A.sin6_family == AF_INET) &&             \
+        ((struct sockaddr_in *) &A)->sin_addr.s_addr))
+#else
+#define notnull(A) (A.sin_addr.s_addr)
+#endif
+
+    if (flag_all || (notnull(remaddr) && !flag_lst) || (!notnull(remaddr) && flag_lst))
+    {
+        safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+                                           flag_not), sizeof(local_addr));
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(local_port), "udp",
+                          flag_not & FLAG_NUM_PORT));
+       if ((strlen(local_addr) + strlen(buffer)) > 22)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+       strcat(local_addr, buffer);
+
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
+        safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
+                                         flag_not), sizeof(rem_addr));
+       if ((strlen(rem_addr) + strlen(buffer)) > 22)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+       strcat(rem_addr, buffer);
+
+       timers[0] = '\0';
+       if (flag_opt)
+           switch (timer_run) {
+           case 0:
+               snprintf(timers, sizeof(timers), _("off (0.00/%ld/%d)"), retr, timeout);
+               break;
+
+           case 1:
+           case 2:
+               snprintf(timers, sizeof(timers), _("on%d (%2.2f/%ld/%d)"), timer_run, (double) time_len / 100, retr, timeout);
+               break;
+
+           default:
+               snprintf(timers, sizeof(timers), _("unkn-%d (%2.2f/%ld/%d)"), timer_run, (double) time_len / 100,
+                        retr, timeout);
+               break;
+           }
+       printf("udp   %6ld %6ld %-23s %-23s %-12s",
+              rxq, txq, local_addr, rem_addr, udp_state);
+
+       finish_this_one(uid,inode,timers);
+    }
+}
+
+static int udp_info(void)
+{
+    INFO_GUTS6(_PATH_PROCNET_UDP, _PATH_PROCNET_UDP6, "AF INET (udp)",
+              udp_do_one);
+}
+
+static void raw_do_one(int lnr, const char *line)
+{
+    char buffer[8192], local_addr[64], rem_addr[64];
+    char timers[64], more[512];
+    int num, local_port, rem_port, d, state, timer_run, uid, timeout;
+#if HAVE_AFINET6
+    struct sockaddr_in6 localaddr, remaddr;
+    char addr6[INET6_ADDRSTRLEN];
+    struct in6_addr in6;
+    extern struct aftype inet6_aftype;
+#else
+    struct sockaddr_in localaddr, remaddr;
+#endif
+    struct aftype *ap;
+    unsigned long rxq, txq, time_len, retr, inode;
+
+    if (lnr == 0)
+       return;
+
+    more[0] = '\0';
+    num = sscanf(line,
+                "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
+                &d, local_addr, &local_port, rem_addr, &rem_port, &state,
+         &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+
+    if (strlen(local_addr) > 8) {
+#if HAVE_AFINET6
+       sscanf(local_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+           &in6.s6_addr32[2], &in6.s6_addr32[3]);
+    inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &localaddr);
+       sscanf(rem_addr, "%08X%08X%08X%08X",
+              &in6.s6_addr32[0], &in6.s6_addr32[1],
+           &in6.s6_addr32[2], &in6.s6_addr32[3]);
+    inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &remaddr);
+       localaddr.sin6_family = AF_INET6;
+       remaddr.sin6_family = AF_INET6;
+#endif
+    } else {
+       sscanf(local_addr, "%X",
+              &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr);
+       sscanf(rem_addr, "%X",
+              &((struct sockaddr_in *) &remaddr)->sin_addr.s_addr);
+       ((struct sockaddr *) &localaddr)->sa_family = AF_INET;
+       ((struct sockaddr *) &remaddr)->sa_family = AF_INET;
+    }
+#if HAVE_AFINET6
+    if ((ap = get_afntype(localaddr.sin6_family)) == NULL) {
+       fprintf(stderr, _("netstat: unsupported address family %d !\n"), localaddr.sin6_family);
+       return;
+    }
+#else
+    if ((ap = get_afntype(localaddr.sin_family)) == NULL) {
+       fprintf(stderr, _("netstat: unsupported address family %d !\n"), localaddr.sin_family);
+       return;
+    }
+#endif
+
+    if (!flag_opt)
+       more[0] = '\0';
+
+    if (num < 10) {
+       fprintf(stderr, _("warning, got bogus raw line.\n"));
+       return;
+    }
+
+    if (flag_all || (notnull(remaddr) && !flag_lst) || (!notnull(remaddr) && flag_lst))
+    {
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(local_port), "raw",
+                          flag_not & FLAG_NUM_PORT));
+        safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+                                           flag_not), sizeof(local_addr));
+       if ((strlen(local_addr) + strlen(buffer)) > 22)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+       strcat(local_addr, buffer);
+
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
+        safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
+                                         flag_not), sizeof(rem_addr));
+       if ((strlen(rem_addr) + strlen(buffer)) > 22)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+       strcat(rem_addr, buffer);
+
+       timers[0] = '\0';
+       if (flag_opt)
+           switch (timer_run) {
+           case 0:
+               snprintf(timers, sizeof(timers), _("off (0.00/%ld/%d)"), retr, timeout);
+               break;
+
+           case 1:
+            case 2:
+               snprintf(timers, sizeof(timers), _("on%d (%2.2f/%ld/%d)"), timer_run, (double) time_len / 100,
+                        retr, timeout);
+               break;
+
+           default:
+               snprintf(timers, sizeof(timers), _("unkn-%d (%2.2f/%ld/%d)"),
+                        timer_run, (double) time_len / 100,
+                        retr, timeout);
+               break;
+           }
+       printf("raw   %6ld %6ld %-23s %-23s %-12d",
+              rxq, txq, local_addr, rem_addr, state);
+
+       finish_this_one(uid,inode,timers);
+    }
+}
+
+static int raw_info(void)
+{
+    INFO_GUTS6(_PATH_PROCNET_RAW, _PATH_PROCNET_RAW6, "AF INET (raw)",
+              raw_do_one);
+}
+
+#endif
+
+
+#if HAVE_AFUNIX
+
+#define HAS_INODE 1
+
+static void unix_do_one(int nr, const char *line)
+{
+    static int has = 0;
+    char path[MAXPATHLEN], ss_flags[32];
+    char *ss_proto, *ss_state, *ss_type;
+    int num, state, type, inode;
+    void *d;
+    unsigned long refcnt, proto, flags;
+
+    if (nr == 0) {
+       if (strstr(line, "Inode"))
+           has |= HAS_INODE;
+       return;
+    }
+    path[0] = '\0';
+    num = sscanf(line, "%p: %lX %lX %lX %X %X %d %s",
+                &d, &refcnt, &proto, &flags, &type, &state, &inode, path);
+    if (num < 6) {
+       fprintf(stderr, _("warning, got bogus unix line.\n"));
+       return;
+    }
+    if (!(has & HAS_INODE))
+       snprintf(path,sizeof(path),"%d",inode);
+
+    if (!flag_all) {
+       if ((state == SS_UNCONNECTED) && (flags & SO_ACCEPTCON)) {
+               if (!flag_lst)
+                       return;
+       } else {
+               if (flag_lst)
+                       return;
+       }
+    }
+
+    switch (proto) {
+    case 0:
+       ss_proto = "unix";
+       break;
+
+    default:
+       ss_proto = "??";
+    }
+
+    switch (type) {
+    case SOCK_STREAM:
+       ss_type = _("STREAM");
+       break;
+
+    case SOCK_DGRAM:
+       ss_type = _("DGRAM");
+       break;
+
+    case SOCK_RAW:
+       ss_type = _("RAW");
+       break;
+
+    case SOCK_RDM:
+       ss_type = _("RDM");
+       break;
+
+    case SOCK_SEQPACKET:
+       ss_type = _("SEQPACKET");
+       break;
+
+    default:
+       ss_type = _("UNKNOWN");
+    }
+
+    switch (state) {
+    case SS_FREE:
+       ss_state = _("FREE");
+       break;
+
+    case SS_UNCONNECTED:
+       /*
+        * Unconnected sockets may be listening
+        * for something.
+        */
+       if (flags & SO_ACCEPTCON) {
+           ss_state = _("LISTENING");
+       } else {
+           ss_state = "";
+       }
+       break;
+
+    case SS_CONNECTING:
+       ss_state = _("CONNECTING");
+       break;
+
+    case SS_CONNECTED:
+       ss_state = _("CONNECTED");
+       break;
+
+    case SS_DISCONNECTING:
+       ss_state = _("DISCONNECTING");
+       break;
+
+    default:
+       ss_state = _("UNKNOWN");
+    }
+
+    strcpy(ss_flags, "[ ");
+    if (flags & SO_ACCEPTCON)
+       strcat(ss_flags, "ACC ");
+    if (flags & SO_WAITDATA)
+       strcat(ss_flags, "W ");
+    if (flags & SO_NOSPACE)
+       strcat(ss_flags, "N ");
+
+    strcat(ss_flags, "]");
+
+    printf("%-5s %-6ld %-11s %-10s %-13s ",
+          ss_proto, refcnt, ss_flags, ss_type, ss_state);
+    if (has & HAS_INODE)
+       printf("%-6d ",inode);
+    else
+       printf("-      ");
+    if (flag_prg)
+       printf("%-" PROGNAME_WIDTHs "s",(has & HAS_INODE?prg_cache_get(inode):"-"));
+    puts(path);
+}
+
+static int unix_info(void)
+{
+
+    printf(_("Active UNIX domain sockets "));
+    if (flag_all)
+       printf(_("(servers and established)"));
+    else {
+      if (flag_lst)
+       printf(_("(only servers)"));
+      else
+       printf(_("(w/o servers)"));
+    }
+
+    printf(_("\nProto RefCnt Flags       Type       State         I-Node"));
+    print_progname_banner();
+    printf(_(" Path\n"));      /* xxx */
+
+    {
+       INFO_GUTS(_PATH_PROCNET_UNIX, "AF UNIX", unix_do_one);
+    }
+}
+#endif
+
+
+#if HAVE_AFAX25
+static int ax25_info(void)
+{
+    FILE *f;
+    char buffer[256], buf[16];
+    char *src, *dst, *dev, *p;
+    int st, vs, vr, sendq, recvq, ret;
+    int new = -1;              /* flag for new (2.1.x) kernels */
+    static char *ax25_state[5] =
+    {
+       N_("LISTENING"),
+       N_("SABM SENT"),
+       N_("DISC SENT"),
+       N_("ESTABLISHED"),
+       N_("RECOVERY")
+    };
+    if (!(f = fopen(_PATH_PROCNET_AX25, "r"))) {
+       if (errno != ENOENT) {
+           perror(_PATH_PROCNET_AX25);
+           return (-1);
+       }
+       if (flag_arg || flag_ver)
+           ESYSNOT("netstat", "AF AX25");
+       if (flag_arg)
+           return (1);
+       else
+           return (0);
+    }
+    printf(_("Active AX.25 sockets\n"));
+    printf(_("Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"));
+    while (fgets(buffer, 256, f)) {
+       if (new == -1) {
+           if (!strncmp(buffer, "dest_addr", 9)) {
+               new = 0;
+               continue;       /* old kernels have a header line */
+           } else
+               new = 1;
+       }
+       /*
+        * In a network connection with no user socket the Snd-Q, Rcv-Q
+        * and Inode fields are empty in 2.0.x and '*' in 2.1.x
+        */
+       sendq = 0;
+       recvq = 0;
+       if (new == 0) {
+           dst = buffer;
+           src = buffer + 10;
+           dst[9] = 0;
+           src[9] = 0;
+           ret = sscanf(buffer + 20, "%s %d %d %d %*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d/%*d %*d %*d %*d %d %d %*d",
+                  buf, &st, &vs, &vr, &sendq, &recvq);
+           if (ret != 4 && ret != 6) {
+               printf(_("Problem reading data from %s\n"), _PATH_PROCNET_AX25);
+               continue;
+           }
+           dev = buf;
+       } else {
+           p = buffer;
+           while (*p != ' ') p++;
+           p++;
+           dev = p;
+           while (*p != ' ') p++;
+           *p++ = 0;
+           src = p;
+           while (*p != ' ') p++;
+           *p++ = 0;
+           dst = p;
+           while (*p != ' ') p++;
+           *p++ = 0;
+           ret = sscanf(p, "%d %d %d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %d %d %*d",
+                  &st, &vs, &vr, &sendq, &recvq);
+           if (ret != 3 && ret != 5) {
+                   printf(_("problem reading data from %s\n"), _PATH_PROCNET_AX25);
+                   continue;
+           }
+           /*
+            * FIXME: digipeaters should be handled somehow.
+            * For now we just strip them.
+            */
+           p = dst;
+           while (*p && *p != ',') p++;
+           *p = 0;
+       }
+       printf("%-9s  %-9s  %-6s  %-11s  %03d/%03d  %-6d  %-6d\n",
+              dst, src,
+              dev,
+              _(ax25_state[st]),
+              vr, vs, sendq, recvq);
+    }
+    fclose(f);
+    return 0;
+}
+#endif
+
+
+#if HAVE_AFIPX
+static int ipx_info(void)
+{
+    FILE *f;
+    char buf[256];
+    unsigned long txq, rxq;
+    unsigned int state;
+    unsigned int uid;
+    char *st;
+    int nc;
+    struct aftype *ap;
+    struct passwd *pw;
+    char sad[50], dad[50];
+    struct sockaddr sa;
+    unsigned sport = 0, dport = 0;
+
+    if (!(f = fopen(_PATH_PROCNET_IPX, "r"))) {
+       if (errno != ENOENT) {
+           perror(_PATH_PROCNET_IPX);
+           return (-1);
+       }
+       if (flag_arg || flag_ver)
+           ESYSNOT("netstat", "AF IPX");
+       if (flag_arg)
+           return (1);
+       else
+           return (0);
+    }
+    printf(_("Active IPX sockets\nProto Recv-Q Send-Q Local Address              Foreign Address            State"));  /* xxx */
+    if (flag_exp > 1)
+       printf(_(" User"));     /* xxx */
+    printf("\n");
+    if ((ap = get_afntype(AF_IPX)) == NULL) {
+       EINTERN("netstat.c", "AF_IPX missing");
+       return (-1);
+    }
+    fgets(buf, 255, f);
+
+    while (fgets(buf, 255, f) != NULL) {
+       sscanf(buf, "%s %s %lX %lX %d %d",
+              sad, dad, &txq, &rxq, &state, &uid);
+       if ((st = rindex(sad, ':'))) {
+           *st++ = '\0';
+           sscanf(st, "%X", &sport);   /* net byt order */
+           sport = ntohs(sport);
+       } else {
+           EINTERN("netstat.c", _PATH_PROCNET_IPX " sport format error");
+           return (-1);
+       }
+       nc = 0;
+       if (strcmp(dad, "Not_Connected") != 0) {
+           if ((st = rindex(dad, ':'))) {
+               *st++ = '\0';
+               sscanf(st, "%X", &dport);       /* net byt order */
+               dport = ntohs(dport);
+           } else {
+               EINTERN("netstat.c", _PATH_PROCNET_IPX " dport format error");
+               return (-1);
+           }
+       } else
+           nc = 1;
+
+       switch (state) {
+       case TCP_ESTABLISHED:
+           st = _("ESTAB");
+           break;
+
+       case TCP_CLOSE:
+           st = "";
+           break;
+
+       default:
+           st = _("UNK.");
+           break;
+       }
+
+       /* Fetch and resolve the Source */
+       (void) ap->input(4, sad, &sa);
+       safe_strncpy(buf, ap->sprint(&sa, flag_not), sizeof(buf));
+       snprintf(sad, sizeof(sad), "%s:%04X", buf, sport);
+
+       if (!nc) {
+           /* Fetch and resolve the Destination */
+           (void) ap->input(4, dad, &sa);
+           safe_strncpy(buf, ap->sprint(&sa, flag_not), sizeof(buf));
+           snprintf(dad, sizeof(dad), "%s:%04X", buf, dport);
+       } else
+           strcpy(dad, "-");
+
+       printf("IPX   %6ld %6ld %-26s %-26s %-5s", txq, rxq, sad, dad, st);
+       if (flag_exp > 1) {
+           if (!(flag_not & FLAG_NUM_USER) && ((pw = getpwuid(uid)) != NULL))
+               printf(" %-10s", pw->pw_name);
+           else
+               printf(" %-10d", uid);
+       }
+       printf("\n");
+    }
+    fclose(f);
+    return 0;
+}
+#endif
+
+static int iface_info(void)
+{
+    if (skfd < 0) {
+       if ((skfd = sockets_open(0)) < 0) {
+           perror("socket");
+           exit(1);
+       }
+       printf(_("Kernel Interface table\n"));
+    }
+    if (flag_exp < 2) {
+       ife_short = 1;
+       printf(_("Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+    }
+
+    if (for_all_interfaces(do_if_print, &flag_all) < 0) {
+       perror(_("missing interface information"));
+       exit(1);
+    }
+    if (flag_cnt)
+       free_interface_list();
+    else {
+       close(skfd);
+       skfd = -1;
+    }
+
+    return 0;
+}
+
+
+static void version(void)
+{
+    printf("%s\n%s\n%s\n%s\n", Release, Version, Signature, Features);
+    exit(E_VERSION);
+}
+
+
+static void usage(void)
+{
+    fprintf(stderr, _("usage: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}\n"));
+    fprintf(stderr, _("       netstat [-vnNcaeol] [<Socket> ...]\n"));
+    fprintf(stderr, _("       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n\n"));
+
+    fprintf(stderr, _("        -r, --route              display routing table\n"));
+    fprintf(stderr, _("        -i, --interfaces         display interface table\n"));
+    fprintf(stderr, _("        -g, --groups             display multicast group memberships\n"));
+    fprintf(stderr, _("        -s, --statistics         display networking statistics (like SNMP)\n"));
+#if HAVE_FW_MASQUERADE
+    fprintf(stderr, _("        -M, --masquerade         display masqueraded connections\n\n"));
+#endif
+    fprintf(stderr, _("        -v, --verbose            be verbose\n"));
+    fprintf(stderr, _("        -n, --numeric            don't resolve names\n"));
+    fprintf(stderr, _("        --numeric-hosts          don't resolve host names\n"));
+    fprintf(stderr, _("        --numeric-ports          don't resolve port names\n"));
+    fprintf(stderr, _("        --numeric-users          don't resolve user names\n"));
+    fprintf(stderr, _("        -N, --symbolic           resolve hardware names\n"));
+    fprintf(stderr, _("        -e, --extend             display other/more information\n"));
+    fprintf(stderr, _("        -p, --programs           display PID/Program name for sockets\n"));
+    fprintf(stderr, _("        -c, --continuous         continuous listing\n\n"));
+    fprintf(stderr, _("        -l, --listening          display listening server sockets\n"));
+    fprintf(stderr, _("        -a, --all, --listening   display all sockets (default: connected)\n"));
+    fprintf(stderr, _("        -o, --timers             display timers\n"));
+    fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
+    fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
+
+    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+    fprintf(stderr, _("  <AF>=Use '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+    fprintf(stderr, _("  List of possible address families (which support routing):\n"));
+    print_aflist(1); /* 1 = routeable */
+    exit(E_USAGE);
+}
+
+
+int main
+ (int argc, char *argv[]) {
+    int i;
+    int lop;
+    struct option longopts[] =
+    {
+       AFTRANS_OPTS,
+       {"version", 0, 0, 'V'},
+       {"interfaces", 0, 0, 'i'},
+       {"help", 0, 0, 'h'},
+       {"route", 0, 0, 'r'},
+#if HAVE_FW_MASQUERADE
+       {"masquerade", 0, 0, 'M'},
+#endif
+       {"protocol", 1, 0, 'A'},
+       {"tcp", 0, 0, 't'},
+       {"udp", 0, 0, 'u'},
+       {"raw", 0, 0, 'w'},
+       {"unix", 0, 0, 'x'},
+       {"listening", 0, 0, 'l'},
+       {"all", 0, 0, 'a'},
+       {"timers", 0, 0, 'o'},
+       {"continuous", 0, 0, 'c'},
+       {"extend", 0, 0, 'e'},
+       {"programs", 0, 0, 'p'},
+       {"verbose", 0, 0, 'v'},
+       {"statistics", 0, 0, 's'},
+       {"numeric", 0, 0, 'n'},
+       {"numeric-hosts", 0, 0, '!'},
+       {"numeric-ports", 0, 0, '@'},
+       {"numeric-users", 0, 0, '#'},
+       {"symbolic", 0, 0, 'N'},
+       {"cache", 0, 0, 'C'},
+       {"fib", 0, 0, 'F'},
+       {"groups", 0, 0, 'g'},
+       {NULL, 0, 0, 0}
+    };
+
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+    getroute_init();           /* Set up AF routing support */
+
+    afname[0] = '\0';
+    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+       case 1:
+           if (lop < 0 || lop >= AFTRANS_CNT) {
+               EINTERN("netstat.c", "longopts 1 range");
+               break;
+           }
+           if (aftrans_opt(longopts[lop].name))
+               exit(1);
+           break;
+       case 'A':
+           if (aftrans_opt(optarg))
+               exit(1);
+           break;
+       case 'M':
+           flag_mas++;
+           break;
+       case 'a':
+           flag_all++;
+           break;
+       case 'l':
+           flag_lst++;
+           break;
+       case 'c':
+           flag_cnt++;
+           break;
+
+       case 'd':
+           flag_deb++;
+           break;
+       case 'g':
+           flag_igmp++;
+           break;
+       case 'e':
+           flag_exp++;
+           break;
+       case 'p':
+           flag_prg++;
+           break;
+       case 'i':
+           flag_int++;
+           break;
+       case 'n':
+           flag_not |= FLAG_NUM;
+           break;
+       case '!':
+           flag_not |= FLAG_NUM_HOST;
+           break;
+       case '@':
+           flag_not |= FLAG_NUM_PORT;
+           break;
+       case '#':
+           flag_not |= FLAG_NUM_USER;
+           break;
+       case 'N':
+           flag_not |= FLAG_SYM;
+           break;
+       case 'C':
+           flag_cf |= FLAG_CACHE;
+           break;
+       case 'F':
+           flag_cf |= FLAG_FIB;
+           break;
+       case 'o':
+           flag_opt++;
+           break;
+       case 'V':
+           version();
+           /*NOTREACHED */
+       case 'v':
+           flag_ver |= FLAG_VERBOSE;
+           break;
+       case 'r':
+           flag_rou++;
+           break;
+
+       case 't':
+           flag_tcp++;
+           break;
+
+       case 'u':
+           flag_udp++;
+           break;
+       case 'w':
+           flag_raw++;
+           break;
+       case 'x':
+           if (aftrans_opt("unix"))
+               exit(1);
+           break;
+       case '?':
+       case 'h':
+           usage();
+       case 's':
+           flag_sta++;
+       }
+
+    if (flag_int + flag_rou + flag_mas + flag_sta > 1)
+       usage();
+
+    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))
+       flag_tcp = flag_udp = flag_raw = 1;
+
+    if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+        flag_inet = flag_inet6 = 1;
+
+    flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
+       + flag_ax25 + flag_netrom + flag_igmp + flag_x25;
+
+    if (flag_mas) {
+#if HAVE_FW_MASQUERADE && HAVE_AFINET
+#if MORE_THAN_ONE_MASQ_AF
+       if (!afname[0])
+           strcpy(afname, DFLT_AF);
+#endif
+       for (;;) {
+           i = ip_masq_info(flag_not & FLAG_NUM_HOST,
+                            flag_not & FLAG_NUM_PORT, flag_exp);
+           if (i || !flag_cnt)
+               break;
+           sleep(1);
+       }
+#else
+       ENOSUPP("netstat.c", "FW_MASQUERADE");
+       i = -1;
+#endif
+       return (i);
+    }
+
+    if (flag_sta) {
+        inittab();
+       parsesnmp(flag_raw, flag_tcp, flag_udp);
+       exit(0);
+    }
+    
+    if (flag_rou) {
+       int options = 0;
+
+       if (!afname[0])
+           strcpy(afname, DFLT_AF);
+
+       if (flag_exp == 2)
+           flag_exp = 1;
+       else if (flag_exp == 1)
+           flag_exp = 2;
+
+       options = (flag_exp & FLAG_EXT) | flag_not | flag_cf | flag_ver;
+       if (!flag_cf)
+           options |= FLAG_FIB;
+
+       for (;;) {
+           i = route_info(afname, options);
+           if (i || !flag_cnt)
+               break;
+           sleep(1);
+       }
+       return (i);
+    }
+    if (flag_int) {
+       for (;;) {
+           i = iface_info();
+           if (!flag_cnt || i)
+               break;
+           sleep(1);
+       }
+       return (i);
+    }
+    for (;;) {
+       if (!flag_arg || flag_tcp || flag_udp || flag_raw) {
+#if HAVE_AFINET
+           prg_cache_load();
+           printf(_("Active Internet connections "));  /* xxx */
+
+           if (flag_all)
+               printf(_("(servers and established)"));
+           else {
+             if (flag_lst)
+               printf(_("(only servers)"));
+             else
+               printf(_("(w/o servers)"));
+           }
+           printf(_("\nProto Recv-Q Send-Q Local Address           Foreign Address         State      "));     /* xxx */
+           if (flag_exp > 1)
+               printf(_(" User       Inode     "));
+           print_progname_banner();
+           if (flag_opt)
+               printf(_(" Timer"));    /* xxx */
+           printf("\n");
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF INET");
+           }
+#endif
+       }
+#if HAVE_AFINET
+       if (!flag_arg || flag_tcp) {
+           i = tcp_info();
+           if (i)
+               return (i);
+       }
+       if (!flag_arg || flag_udp) {
+           i = udp_info();
+           if (i)
+               return (i);
+       }
+       if (!flag_arg || flag_raw) {
+           i = raw_info();
+           if (i)
+               return (i);
+       }
+
+       if (flag_igmp) {
+#if HAVE_AFINET6
+           printf( "IPv6/");
+#endif
+           printf( _("IPv4 Group Memberships\n") );
+           printf( _("Interface       RefCnt Group\n") );
+           printf( "--------------- ------ ---------------------\n" );
+           i = igmp_info();
+           if (i)
+               return (i);
+       }
+#endif
+
+       if (!flag_arg || flag_unx) {
+#if HAVE_AFUNIX
+           prg_cache_load();
+           i = unix_info();
+           if (i)
+               return (i);
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF UNIX");
+           }
+#endif
+       }
+       if (!flag_arg || flag_ipx) {
+#if HAVE_AFIPX
+           i = ipx_info();
+           if (i)
+               return (i);
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF IPX");
+           }
+#endif
+       }
+       if (!flag_arg || flag_ax25) {
+#if HAVE_AFAX25
+           i = ax25_info();
+           if (i)
+               return (i);
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF AX25");
+           }
+#endif
+       }
+       if(!flag_arg || flag_x25) {
+#if HAVE_AFX25
+           /* FIXME */
+           i = x25_info();
+           if (i)
+               return(i);
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF X25");
+           }
+#endif
+       }
+       if (!flag_arg || flag_netrom) {
+#if HAVE_AFNETROM
+           i = netrom_info();
+           if (i)
+               return (i);
+#else
+           if (flag_arg) {
+               i = 1;
+               ENOSUPP("netstat", "AF NETROM");
+           }
+#endif
+       }
+       if (!flag_cnt || i)
+           break;
+       sleep(1);
+       prg_cache_clear();
+    }
+    return (i);
+}
diff --git a/packaging/ether-wake.8 b/packaging/ether-wake.8
new file mode 100644 (file)
index 0000000..26b4f85
--- /dev/null
@@ -0,0 +1,81 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH ETHER-WAKE 8 "March 31, 2003" "Scyld"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+ether-wake \- A tool to send a Wake-On-LAN "Magic Packet"
+.SH SYNOPSIS
+.B ether-wake
+.RI [ options ] " Host-ID"
+.SH DESCRIPTION
+This manual page documents the usage of the
+.B ether-wake
+command.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBether-wake\fP is a program that generates and transmits a Wake-On-LAN 
+(WOL) "Magic Packet", used for restarting machines that have been
+soft-powered-down (ACPI D3-warm state). It generates the standard
+AMD Magic Packet format, optionally with a password included.  The
+single required parameter is a station (MAC) address or a host ID that can
+be translated to a MAC address by an
+.BR ethers (5)
+database specified in
+.BR nsswitch.conf (5)
+.
+.SH OPTIONS
+\fBether-wake\fP needs a single dash (´-´) in front of options.
+A summary of options is included below.
+.TP
+.B \-b
+Send the wake-up packet to the broadcast address.
+.TP
+.B \-D
+Increase the Debug Level.
+.TP
+.B \-i ifname
+Use interface ifname instead of the default "eth0".
+.TP
+.B \-p passwd
+Append a four or six byte password to the packet. Only a few adapters
+need or support this. A six byte password may be specified in Ethernet hex
+format (00:22:44:66:88:aa) or four byte dotted decimal (192.168.1.1) format.
+A four byte password must use the dotted decimal format.
+
+.TP
+.B \-V
+Show the program version information.
+
+.SH EXIT STATUS
+This program returns 0 on success.
+A permission failures (e.g. run as a non-root user) results in an exit
+status of 2.  Unrecognized or invalid parameters result in an exit
+status of 3.  Failure to retrieve network interface information or send
+a packet will result in an exit status of 1.
+
+.SH SEE ALSO
+.BR arp (8).
+.br
+.SH SECURITY
+On some non-Linux systems dropping root capability allows the process to be
+dumped, traced or debugged.
+If someone traces this program, they get control of a raw socket.
+Linux handles this safely, but beware when porting this program.
+.SH AUTHOR
+The etherwake program was written by Donald Becker at Scyld Computing
+Corporation for use with the Scyld(\*(Tm) Beowulf System.
diff --git a/packaging/ether-wake.c b/packaging/ether-wake.c
new file mode 100644 (file)
index 0000000..eef22a7
--- /dev/null
@@ -0,0 +1,392 @@
+/* ether-wake.c: Send a magic packet to wake up sleeping machines. */
+
+static char version_msg[] =
+"ether-wake.c: v1.09 11/12/2003 Donald Becker, http://www.scyld.com/";
+static char brief_usage_msg[] =
+"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
+"   Use '-u' to see the complete set of options.\n";
+static char usage_msg[] =
+"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
+"\n"
+"      This program generates and transmits a Wake-On-LAN (WOL)\n"
+"      \"Magic Packet\", used for restarting machines that have been\n"
+"      soft-powered-down (ACPI D3-warm state).\n"
+"      It currently generates the standard AMD Magic Packet format, with\n"
+"      an optional password appended.\n"
+"\n"
+"      The single required parameter is the Ethernet MAC (station) address\n"
+"      of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
+"      The MAC address may be found with the 'arp' program while the target\n"
+"      machine is awake.\n"
+"\n"
+"      Options:\n"
+"              -b      Send wake-up packet to the broadcast address.\n"
+"              -D      Increase the debug level.\n"
+"              -i ifname       Use interface IFNAME instead of the default 'eth0'.\n"
+"              -p <pw>         Append the four or six byte password PW to the packet.\n"
+"                                      A password is only required for a few adapter types.\n"
+"                                      The password may be specified in ethernet hex format\n"
+"                                      or dotted decimal (Internet address)\n"
+"              -p 00:22:44:66:88:aa\n"
+"              -p 192.168.1.1\n";
+
+/*
+       This program generates and transmits a Wake-On-LAN (WOL) "Magic Packet",
+       used for restarting machines that have been soft-powered-down
+       (ACPI D3-warm state).  It currently generates the standard AMD Magic Packet
+       format, with an optional password appended.
+
+       This software may be used and distributed according to the terms
+       of the GNU Public License, incorporated herein by reference.
+       Contact the author for use under other terms.
+
+       This source file was originally part of the network tricks package, and
+       is now distributed to support the Scyld Beowulf system.
+       Copyright 1999-2003 Donald Becker and Scyld Computing Corporation.
+
+       The author may be reached as becker@scyld, or C/O
+        Scyld Computing Corporation
+        914 Bay Ridge Road, Suite 220
+        Annapolis MD 21403
+
+  Notes:
+  On some systems dropping root capability allows the process to be
+  dumped, traced or debugged.
+  If someone traces this program, they get control of a raw socket.
+  Linux handles this safely, but beware when porting this program.
+
+  An alternative to needing 'root' is using a UDP broadcast socket, however
+  doing so only works with adapters configured for unicast+broadcast Rx
+  filter.  That configuration consumes more power.
+*/
+\f
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ctype.h>
+#include <string.h>
+
+#if 0                                                  /* Only exists on some versions. */
+#include <ioctls.h>
+#endif
+
+#include <sys/socket.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/if.h>
+
+#include <features.h>
+#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
+#include <netpacket/packet.h>
+#include <net/ethernet.h>
+#else
+#include <asm/types.h>
+#include <linux/if_packet.h>
+#include <linux/if_ether.h>
+#endif
+#include <netdb.h>
+#include <netinet/ether.h>
+
+/* Grrr, no consistency between include versions.
+   Enable this if setsockopt() isn't declared with your library. */
+#if 0
+extern int setsockopt __P ((int __fd, int __level, int __optname,
+                                                       __ptr_t __optval, int __optlen));
+#else                          /* New, correct head files.  */
+#include <sys/socket.h>
+#endif
+
+u_char outpack[1000];
+int outpack_sz = 0;
+int debug = 0;
+u_char wol_passwd[6];
+int wol_passwd_sz = 0;
+
+static int opt_no_src_addr = 0, opt_broadcast = 0;
+
+static int get_dest_addr(const char *arg, struct ether_addr *eaddr);
+static int get_fill(unsigned char *pkt, struct ether_addr *eaddr);
+static int get_wol_pw(const char *optarg);
+
+int main(int argc, char *argv[])
+{
+       char *ifname = "eth0";
+       int one = 1;                            /* True, for socket options. */
+       int s;                                          /* Raw socket */
+       int errflag = 0, verbose = 0, do_version = 0;
+       int perm_failure = 0;
+       int i, c, pktsize;
+#if defined(PF_PACKET)
+       struct sockaddr_ll whereto;
+#else
+       struct sockaddr whereto;        /* who to wake up */
+#endif
+       struct ether_addr eaddr;
+
+       while ((c = getopt(argc, argv, "bDi:p:uvV")) != -1)
+               switch (c) {
+               case 'b': opt_broadcast++;      break;
+               case 'D': debug++;                      break;
+               case 'i': ifname = optarg;      break;
+               case 'p': get_wol_pw(optarg); break;
+               case 'u': printf(usage_msg); return 0;
+               case 'v': verbose++;            break;
+               case 'V': do_version++;         break;
+               case '?':
+                       errflag++;
+               }
+       if (verbose || do_version)
+               printf("%s\n", version_msg);
+       if (errflag) {
+               fprintf(stderr, brief_usage_msg);
+               return 3;
+       }
+
+       if (optind == argc) {
+               fprintf(stderr, "Specify the Ethernet address as 00:11:22:33:44:55.\n");
+               return 3;
+       }
+
+       /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to
+          work as non-root, but we need SOCK_PACKET to specify the Ethernet
+          destination address. */
+#if defined(PF_PACKET)
+       s = socket(PF_PACKET, SOCK_RAW, 0);
+#else
+       s = socket(AF_INET, SOCK_PACKET, SOCK_PACKET);
+#endif
+       if (s < 0) {
+               if (errno == EPERM)
+                       fprintf(stderr, "ether-wake: This program must be run as root.\n");
+               else
+                       perror("ether-wake: socket");
+               perm_failure++;
+       }
+       /* Don't revert if debugging allows a normal user to get the raw socket. */
+       setuid(getuid());
+
+       /* We look up the station address before reporting failure so that
+          errors may be reported even when run as a normal user.
+       */
+       if (get_dest_addr(argv[optind], &eaddr) != 0)
+               return 3;
+       if (perm_failure && ! debug)
+               return 2;
+
+       pktsize = get_fill(outpack, &eaddr);
+
+       /* Fill in the source address, if possible.
+          The code to retrieve the local station address is Linux specific. */
+       if (! opt_no_src_addr) {
+               struct ifreq if_hwaddr;
+               unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
+
+               strcpy(if_hwaddr.ifr_name, ifname);
+               if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) {
+                       fprintf(stderr, "SIOCGIFHWADDR on %s failed: %s\n", ifname,
+                                       strerror(errno));
+                       /* Magic packets still work if our source address is bogus, but
+                          we fail just to be anal. */
+                       return 1;
+               }
+               memcpy(outpack+6, if_hwaddr.ifr_hwaddr.sa_data, 6);
+
+               if (verbose) {
+                       printf("The hardware address (SIOCGIFHWADDR) of %s is type %d  "
+                                  "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x.\n", ifname,
+                                  if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
+                                  hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
+               }
+       }
+
+       if (wol_passwd_sz > 0) {
+               memcpy(outpack+pktsize, wol_passwd, wol_passwd_sz);
+               pktsize += wol_passwd_sz;
+       }
+
+       if (verbose > 1) {
+               printf("The final packet is: ");
+               for (i = 0; i < pktsize; i++)
+                       printf(" %2.2x", outpack[i]);
+               printf(".\n");
+       }
+
+       /* This is necessary for broadcasts to work */
+       if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&one, sizeof(one)) < 0)
+               perror("setsockopt: SO_BROADCAST");
+
+#if defined(PF_PACKET)
+       {
+               struct ifreq ifr;
+               strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+               if (ioctl(s, SIOCGIFINDEX, &ifr) == -1) {
+                       fprintf(stderr, "SIOCGIFINDEX on %s failed: %s\n", ifname,
+                                       strerror(errno));
+                       return 1;
+               }
+               memset(&whereto, 0, sizeof(whereto));
+               whereto.sll_family = AF_PACKET;
+               whereto.sll_ifindex = ifr.ifr_ifindex;
+               /* The manual page incorrectly claims the address must be filled.
+                  We do so because the code may change to match the docs. */
+               whereto.sll_halen = ETH_ALEN;
+               memcpy(whereto.sll_addr, outpack, ETH_ALEN);
+
+       }
+#else
+       whereto.sa_family = 0;
+       strcpy(whereto.sa_data, ifname);
+#endif
+
+       if ((i = sendto(s, outpack, pktsize, 0, (struct sockaddr *)&whereto,
+                                       sizeof(whereto))) < 0)
+               perror("sendto");
+       else if (debug)
+               printf("Sendto worked ! %d.\n", i);
+
+#ifdef USE_SEND
+       if (bind(s, (struct sockaddr *)&whereto, sizeof(whereto)) < 0)
+               perror("bind");
+       else if (send(s, outpack, 100, 0) < 0)
+               perror("send");
+#endif
+#ifdef USE_SENDMSG
+       {
+               struct msghdr msghdr = { 0,};
+               struct iovec iovector[1];
+               msghdr.msg_name = &whereto;
+               msghdr.msg_namelen = sizeof(whereto);
+               msghdr.msg_iov = iovector;
+               msghdr.msg_iovlen = 1;
+               iovector[0].iov_base = outpack;
+               iovector[0].iov_len = pktsize;
+               if ((i = sendmsg(s, &msghdr, 0)) < 0)
+                       perror("sendmsg");
+               else if (debug)
+                       printf("sendmsg worked, %d (%d).\n", i, errno);
+       }
+#endif
+
+       return 0;
+}
+
+/* Convert the host ID string to a MAC address.
+   The string may be a
+       Host name
+    IP address string
+       MAC address string
+*/
+
+static int get_dest_addr(const char *hostid, struct ether_addr *eaddr)
+{
+       struct ether_addr *eap;
+
+       eap = ether_aton(hostid);
+       if (eap) {
+               *eaddr = *eap;
+               if (debug)
+                       fprintf(stderr, "The target station address is %s.\n",
+                                       ether_ntoa(eaddr));
+       } else if (ether_hostton(hostid, eaddr) == 0) {
+               if (debug)
+                       fprintf(stderr, "Station address for hostname %s is %s.\n",
+                                       hostid, ether_ntoa(eaddr));
+       } else {
+               (void)fprintf(stderr,
+                                         "ether-wake: The Magic Packet host address must be "
+                                         "specified as\n"
+                                         "  - a station address, 00:11:22:33:44:55, or\n"
+                                         "  - a hostname with a known 'ethers' entry.\n");
+               return -1;
+       }
+       return 0;
+}
+
+
+static int get_fill(unsigned char *pkt, struct ether_addr *eaddr)
+{
+       int offset, i;
+       unsigned char *station_addr = eaddr->ether_addr_octet;
+
+       if (opt_broadcast)
+               memset(pkt+0, 0xff, 6);
+       else
+               memcpy(pkt, station_addr, 6);
+       memcpy(pkt+6, station_addr, 6);
+       pkt[12] = 0x08;                         /* Or 0x0806 for ARP, 0x8035 for RARP */
+       pkt[13] = 0x42;
+       offset = 14;
+
+       memset(pkt+offset, 0xff, 6);
+       offset += 6;
+
+       for (i = 0; i < 16; i++) {
+               memcpy(pkt+offset, station_addr, 6);
+               offset += 6;
+       }
+       if (debug) {
+               fprintf(stderr, "Packet is ");
+               for (i = 0; i < offset; i++)
+                       fprintf(stderr, " %2.2x", pkt[i]);
+               fprintf(stderr, ".\n");
+       }
+       return offset;
+}
+
+static int get_wol_pw(const char *optarg)
+{
+       int passwd[6];
+       int byte_cnt;
+       int i;
+
+       byte_cnt = sscanf(optarg, "%2x:%2x:%2x:%2x:%2x:%2x",
+                                         &passwd[0], &passwd[1], &passwd[2],
+                                         &passwd[3], &passwd[4], &passwd[5]);
+       if (byte_cnt < 4)
+               byte_cnt = sscanf(optarg, "%d.%d.%d.%d",
+                                                 &passwd[0], &passwd[1], &passwd[2], &passwd[3]);
+       if (byte_cnt < 4) {
+               fprintf(stderr, "Unable to read the Wake-On-LAN password.\n");
+               return 0;
+       }
+       printf(" The Magic packet password is %2.2x %2.2x %2.2x %2.2x (%d).\n",
+                  passwd[0], passwd[1], passwd[2], passwd[3], byte_cnt);
+       for (i = 0; i < byte_cnt; i++)
+               wol_passwd[i] = passwd[i];
+       return wol_passwd_sz = byte_cnt;
+}
+
+#if 0
+{
+       to = (struct sockaddr_in *)&whereto;
+       to->sin_family = AF_INET;
+       if (inet_aton(target, &to->sin_addr)) {
+               hostname = target;
+       }
+       memset (&sa, 0, sizeof sa);
+       sa.sa_family = AF_INET;
+       strncpy (sa.sa_data, interface, sizeof sa.sa_data);
+       sendto (sock, buf, bufix + len, 0, &sa, sizeof sa);
+       strncpy (sa.sa_data, interface, sizeof sa.sa_data);
+#if 1
+       sendto (sock, buf, bufix + len, 0, &sa, sizeof sa);
+#else
+       bind (sock, &sa, sizeof sa);
+       connect();
+       send (sock, buf, bufix + len, 0);
+#endif
+}
+#endif
+
+\f
+/*
+ * Local variables:
+ *  compile-command: "gcc -O -Wall -o ether-wake ether-wake.c"
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  c-indent-level: 4
+ *  tab-width: 4
+ * End:
+ */
diff --git a/packaging/mii-diag.8 b/packaging/mii-diag.8
new file mode 100644 (file)
index 0000000..aa0dc0b
--- /dev/null
@@ -0,0 +1,160 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" $Revision: 1.1 $ $Date: 2003/09/06 17:20:17 $
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH MII-DIAG 8 "September 9, 2003" "Scyld Beowulf\*(Tm"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+mii-diag \- Network adapter control and monitoring
+.SH SYNOPSIS
+.B mii-diag
+.RI [ options ] <interface>
+.SH DESCRIPTION
+This manual page documents briefly the
+.B mii-diag
+network adapter control and monitoring command.
+Addition documentation is available from http://scyld.com/diag/index.html.
+
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invoke bold face and italics, 
+.\" respectively.
+.PP
+This \fBmii-diag\fP command configures, controls and monitors the
+transceiver management registers for network interfaces, and configures
+driver operational parameters.  For transceiver control \fBmii-diag\fP
+uses the Media Independent Interface (MII) standard (thus the command name).
+It also has additional Linux-specific controls to communicate parameters
+such as message enable settings and buffer sizes to the underlying device
+driver.
+.PP
+The MII standard defines registers that control and report network
+transceiver capabilities, link settings and errors.  Examples are link
+speed, duplex, capabilities advertised to the link partner, status LED
+indications and link error counters.
+
+.SH OPTIONS
+The \fBmii-diag\fP command supports both single character and long
+option names.  Short options use a single dash (´-´) in front of the option
+character.  For options without parameters, multiple options may be
+concatenated after a single dash.  Long options are prefixed by two
+dashes (´--´), and may be abbreviated with a unique prefix.
+A long option may take a parameter of the form --arg=param or --arg param.
+
+.PP
+A summary of options is as follows.
+
+.TP
+.B \-A, --advertise <speed|setting>
+.BR
+.B \-F, --fixed-speed <speed|setting>
+
+Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD, 10baseT,
+10baseT-FD, 10baseT-HD.  For more precise control an explict numeric
+register setting is also allowed.
+
+
+.TP
+.B \-a, \--all-interfaces
+Show the status of all interfaces.  This option is not recommended with
+any other option, especially ones that change settings.
+
+.TP
+.B \-s,\--status
+Return exit status 2 if there is no link beat.
+
+.TP
+.B \-D
+Increase the debugging level.  This may be used to understand the
+actions the command is taking.
+
+.TP
+.B \-g, \--read-parameters
+Show driver-specific parameters.
+
+.TP
+.B \-G, \--set-parameters value[,value...]
+Set driver-specific parameters.
+Set a adapter-specific parameters.
+Parameters are comma separated, with missing elements retaining the
+existing value.
+
+.TP
+.B \-v
+Increase the verbosity level.  Additional "-v" options increase the
+level further.
+
+.TP
+.B \-V
+Show the program version information.
+
+.TP
+.B \-w, \--watch
+Continuously monitor the transceiver and report changes.
+
+.TP
+.B \-?
+Emit usage information.
+
+.SH DESCRIPTION
+
+.PP
+Calling the command with just the interface name (which defaults to
+'eth0' if missing) produces extensive output describing the transceiver
+capabilities, configuration and current status.
+
+.PP
+The '--monitor' option allows scripting link beat changes.
+.PP
+This option is similar to --watch, but with lower overhead and simplifed
+output.  It polls the interface only once a second and the output format
+is a single line per link change with three fixed words
+  <unknown|down||negotiating|up> <STATUS> <PARTNER-CAP>
+.PP
+Example output:  mii-diag --monitor eth0
+   down         0x7809 0x0000
+   negotiating  0x7829 0x45e1
+   up           0x782d 0x45e1
+   down         0x7809 0x0000
+
+.PP
+This may be used as
+  mii-diag --monitor eth0 |
+    while read linkstatus bmsr linkpar; do
+     case $linkstatus in
+        up)   ifup eth0 ;;
+        down) ifdown eth0 ;;
+     esac
+    done
+
+.PP
+It may be useful to shorten the DHCP client daemon timeout if it does
+not receive an address by adding the following setting to
+/etc/sysconfig/network:
+DHCPCDARGS="-t 3"
+
+.SH SEE ALSO
+.BR ether-wake (8), net-diag (8), mii-tool (8).
+.br
+Addition documentation is available from http://scyld.com/diag/index.html.
+
+.SH KNOWN BUGS
+The --all-interfaces option is quirky.  There are very few settings that
+are usefully applied to all interfaces.
+
+.SH AUTHOR
+The manual pages, diagnostic commands, and many of the underlying Linux
+network drivers were written by Donald Becker for the Scyld
+Beowulf(\*(Tm) cluster system.
+
diff --git a/packaging/mii-diag.c b/packaging/mii-diag.c
new file mode 100644 (file)
index 0000000..17d8bef
--- /dev/null
@@ -0,0 +1,650 @@
+/* Mode: C;
+ * mii-diag.c: Examine and set the MII registers of a network interfaces.
+
+       Usage:  mii-diag [-vw] interface.
+
+       This program reads and writes the Media Independent Interface (MII)
+       management registers on network transceivers.  The registers control
+       and report network link settings and errors.  Examples are link speed,
+       duplex, capabilities advertised to the link partner, status LED
+       indications and link error counters.
+
+       Notes:
+       The compile-command is at the end of this source file.
+       This program works with drivers that implement MII ioctl() calls.
+
+       Written/copyright 1997-2003 by Donald Becker <becker@scyld.com>
+
+       This program is free software; you can redistribute it
+       and/or modify it under the terms of the GNU General Public
+       License as published by the Free Software Foundation.
+
+       The author may be reached as becker@scyld.com, or C/O
+        Scyld Computing Corporation
+        914 Bay Ridge Road, Suite 220
+        Annapolis MD 21403
+
+       References
+       http://scyld.com/expert/mii-status.html
+       http://scyld.com/expert/NWay.html
+       http://www.national.com/pf/DP/DP83840.html
+*/
+
+static char version[] =
+"mii-diag.c:v2.11 3/21/2005 Donald Becker (becker@scyld.com)\n"
+" http://www.scyld.com/diag/index.html\n";
+
+static const char usage_msg[] =
+"Usage: %s [--help] [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n";
+static const char long_usage_msg[] =
+"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n\
+\n\
+  This program configures and monitors the transceiver management registers\n\
+  for network interfaces.  It uses the Media Independent Interface (MII)\n\
+  standard with additional Linux-specific controls to communicate with the\n\
+  underlying device driver.  The MII registers control and report network\n\
+  link settings and errors.  Examples are link speed, duplex, capabilities\n\
+  advertised to the link partner, status LED indications and link error\n\
+  counters.\n\
+\n\
+   The common usage is\n\
+      mii-diag eth0\n\
+\n\
+   The default interface is \"eth0\".\n\
+ Frequently used options are\n\
+   -A  --advertise <speed|setting>\n\
+   -F  --fixed-speed <speed>\n\
+       Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD,\n\
+                        10baseT, 10baseT-FD, 10baseT-HD\n\
+   -s  --status     Return exit status 2 if there is no link beat.\n\
+\n\
+ Less frequently used options are\n\
+   -a  --all-interfaces  Show the status all interfaces\n\
+              (Not recommended with options that change settings.)\n\
+   -D  --debug\n\
+   -g  --read-parameters       Get driver-specific parameters.\n\
+   -G  --set-parameters PARMS  Set driver-specific parameters.\n\
+       Parameters are comma separated, missing parameters retain\n\
+       their previous values.\n\
+   -M  --msg-level LEVEL       Set the driver message bit map.\n\
+   -p  --phy ADDR              Set the PHY (MII address) to report.\n\
+   -r  --restart       Restart the link autonegotiation.\n\
+   -R  --reset         Reset the transceiver.\n\
+   -v  --verbose       Report each action taken.\n\
+   -V  --version       Emit version information.\n\
+   -w  --watch         Continuously monitor the transceiver and report changes.\n\
+\n\
+   This command returns success (zero) if the interface information can be\n\
+   read.  If the --status option is passed, a zero return means that the\n\
+   interface has link beat.\n\
+";
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#ifdef use_linux_libc5
+#include <linux/if_arp.h>
+#include <linux/if_ether.h>
+#endif
+
+typedef u_int32_t u32;
+typedef u_int16_t u16;
+typedef u_int8_t u8;
+
+#if defined(SIOCGPARAMS)  && SIOCGPARAMS != SIOCDEVPRIVATE+3
+#error Changed definition for SIOCGPARAMS
+#else
+#define SIOCGPARAMS (SIOCDEVPRIVATE+3)                 /* Read operational parameters. */
+#define SIOCSPARAMS (SIOCDEVPRIVATE+4)                 /* Set operational parameters. */
+#endif
+
+const char shortopts[] = "aA:C:DfF:gG:hmM:p:rRsvVw?";
+struct option longopts[] = {
+ /* { name  has_arg  *flag  val } */
+    {"all-interfaces", 0, 0, 'a'},     /* Show all interfaces. */
+       {"advertise",   1, 0, 'A'},             /* Change the capabilities advertised. */
+       {"BMCR",                1, 0, 'C'},             /* Set the control register. */
+    {"debug",       0, 0, 'D'},                /* Increase the debug level. */
+    {"force",       0, 0, 'f'},                /* Force the operation. */
+    {"fixed-speed", 1, 0, 'F'},                /* Fixed speed name. */
+    {"read-parameters", 0, 0, 'g'}, /* Show general settings values. */
+    {"set-parameters",  1, 0, 'G'},    /* Write general settings values. */
+    {"help",           0, 0, 'h'},             /* Print a long usage message. */
+    {"monitor",                0, 0, 'm'},             /* Monitor status register. */
+    {"msg-level",      1, 0, 'M'},             /* Set the driver message level. */
+    {"phy",                    1, 0, 'p'},             /* Set the PHY (MII address) to report. */
+    {"restart",                0, 0, 'r'},             /* Restart the link negotiation */
+    {"reset",          0, 0, 'R'},             /* Reset the transceiver. */
+    {"status",         0, 0, 's'},             /* Non-zero exit status w/ no link beat. */
+    {"verbose",        0, 0, 'v'},             /* Report each action taken.  */
+    {"version",        0, 0, 'V'},             /* Emit version information.  */
+    {"watch",          0, 0, 'w'},             /* Constantly monitor the port.  */
+    {"error",          0, 0, '?'},             /* Return the error message. */
+    { 0, 0, 0, 0 }
+};
+
+/* Usually in libmii.c, but trivial substitions are below. */
+extern int  show_mii_details(long ioaddr, int phy_id);
+extern void monitor_mii(long ioaddr, int phy_id);
+int  show_mii_details(long ioaddr, int phy_id) __attribute__((weak));
+void monitor_mii(long ioaddr, int phy_id) __attribute__((weak));
+
+
+/* Command-line flags. */
+unsigned int opt_a = 0,                                        /* Show-all-interfaces flag. */
+       opt_f = 0,                                      /* Force the operation. */
+       opt_g = 0,
+       opt_G = 0,
+       verbose = 0,                            /* Verbose flag. */
+       debug = 0,
+       opt_version = 0,
+       opt_restart = 0,
+       opt_reset = 0,
+       opt_status = 0,
+       opt_watch = 0;
+static int msg_level = -1;
+static int set_BMCR = -1;
+static int nway_advertise = 0;
+static int fixed_speed = -1;
+static int override_phy = -1;
+char *opt_G_string = NULL;
+
+/* Internal values. */
+int new_ioctl_nums;
+int skfd = -1;                                 /* AF_INET socket for ioctl() calls.    */
+struct ifreq ifr;
+
+int do_one_xcvr(int skfd);
+int show_basic_mii(long ioaddr, int phy_id);
+int mdio_read(int skfd, int phy_id, int location);
+void mdio_write(int skfd, int phy_id, int location, int value);
+static int parse_advertise(const char *capabilities);
+static void monitor_status(long ioaddr, int phy_id);
+
+
+int
+main(int argc, char **argv)
+{
+       int c, errflag = 0;
+       char **spp, *ifname;
+    char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0];
+
+       while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF)
+               switch (c) {
+               case 'a': opt_a++; break;
+               case 'A': nway_advertise |= parse_advertise(optarg);
+                       if (nway_advertise == -1) errflag++;
+                       break;
+               case 'C': set_BMCR = strtoul(optarg, NULL, 16); break;
+               case 'D': debug++;                      break;
+               case 'f': opt_f++; break;
+               case 'F': fixed_speed = parse_advertise(optarg);
+                       if (fixed_speed == -1) errflag++;
+                       break;
+               case 'g': opt_g++; break;
+               case 'G': opt_G++; opt_G_string = strdup(optarg); break;
+               case 'm': opt_watch++; opt_status++; break;
+               case 'M': msg_level = strtoul(optarg, NULL, 0); break;
+               case 'h': fprintf(stderr, long_usage_msg, progname); return 0;
+               case 'p': override_phy = atoi(optarg); break;
+               case 'r': opt_restart++;        break;
+               case 'R': opt_reset++;          break;
+               case 's': opt_status++;         break;
+               case 'v': verbose++;            break;
+               case 'V': opt_version++;        break;
+               case 'w': opt_watch++;          break;
+               case '?': errflag++;            break;
+               }
+       if (errflag) {
+               fprintf(stderr, usage_msg, progname);
+               return 2;
+       }
+
+       if (verbose || opt_version)
+               printf(version);
+
+       /* Open a basic socket. */
+       if ((skfd = socket(AF_INET, SOCK_DGRAM,0)) < 0) {
+               perror("socket");
+               return 1;
+       }
+
+       if (debug)
+               fprintf(stderr, "DEBUG: argc=%d, optind=%d and argv[optind] is %s.\n",
+                               argc, optind, argv[optind]);
+
+       /* No remaining args means show all interfaces. */
+       if (optind == argc) {
+               ifname = "eth0";
+               fprintf(stderr, "Using the default interface 'eth0'.\n");
+       } else {
+               /* Copy the interface name. */
+               spp = argv + optind;
+               ifname = *spp++;
+       }
+
+       if (ifname == NULL) {
+               ifname = "eth0";
+               fprintf(stderr, "Using the default interface 'eth0'.\n");
+       }
+
+       /* Verify that the interface supports the ioctl(), and if
+          it is using the new or old SIOCGMIIPHY value (grrr...).
+        */
+       {
+               u16 *data = (u16 *)(&ifr.ifr_data);
+
+               strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+               data[0] = 0;
+
+               if (ioctl(skfd, 0x8947, &ifr) >= 0) {
+                       new_ioctl_nums = 1;
+               } else if (ioctl(skfd, SIOCDEVPRIVATE, &ifr) >= 0) {
+                       new_ioctl_nums = 0;
+               } else {
+                       fprintf(stderr, "SIOCGMIIPHY on %s failed: %s\n", ifname,
+                                       strerror(errno));
+                       (void) close(skfd);
+                       return 1;
+               }
+               if (verbose)
+                       printf("  Using the %s SIOCGMIIPHY value on PHY %d "
+                                  "(BMCR 0x%4.4x).\n",
+                                  new_ioctl_nums ? "new" : "old", data[0], data[3]);
+       }
+
+       do_one_xcvr(skfd);
+
+       (void) close(skfd);
+       return 0;
+}
+
+int do_one_xcvr(int skfd)
+{
+       u16 *data = (u16 *)(&ifr.ifr_data);
+       u32 *data32 = (u32 *)(&ifr.ifr_data);
+       unsigned phy_id = data[0];
+
+       if (override_phy >= 0) {
+               printf("Using the specified MII PHY index %d.\n", override_phy);
+               phy_id = override_phy;
+       }
+
+       if (opt_g || opt_G || msg_level >= 0) {
+               if (ioctl(skfd, SIOCGPARAMS, &ifr) < 0) {
+                       fprintf(stderr, "SIOCGPARAMS on %s failed: %s\n", ifr.ifr_name,
+                                       strerror(errno));
+                       return -1;
+               }
+       }
+       if (opt_g) {
+               int i;
+               printf("Driver general parameter settings:");
+               for (i = 0; i*sizeof(u32) < sizeof(ifr.ifr_ifru); i++) {
+                       printf(" %d", data32[i]);
+               }
+               printf(".\n");
+       }
+       if (opt_G) {
+               /* Set up to four arbitrary driver parameters from the -G parameter.
+                  The format is comma separated integers, with a missing element
+                  retaining the previous value.
+               */
+               char *str = opt_G_string;
+               int i;
+               for (i = 0; str && i < 4; i++) {
+                       char *endstr;
+                       u32 newval = strtol(str, &endstr, 0);
+                       if (debug)
+                               printf(" parse string '%s'  value %d end '%s'.\n",
+                                          str, newval, endstr);
+                       if (str == endstr) {
+                               if (endstr[0] == ',') /* No parameter */
+                                       str = endstr+1;
+                               else {
+                                       fprintf(stderr, "Invalid driver parameter '%s'.\n", str);
+                                       str = index(str, ',');
+                               }
+                       } else if (endstr[0] == ',') {
+                               data32[i] = newval;
+                               str = endstr + 1;
+                       } else if (endstr[0] == 0) {
+                               data32[i] = newval;
+                               break;
+                       }
+               }
+               printf("Setting new driver general parameters:");
+               for (i = 0; i*sizeof(u32) < sizeof(ifr.ifr_ifru); i++) {
+                       printf(" %d", data32[i]);
+               }
+               printf(".\n");
+               if (ioctl(skfd, SIOCSPARAMS, &ifr) < 0) {
+                       fprintf(stderr, "SIOCSPARAMS on %s failed: %s\n", ifr.ifr_name,
+                                       strerror(errno));
+                       return -1;
+               }
+       }
+       if (msg_level >= 0) {
+               data32[0] = msg_level;
+               if (ioctl(skfd, SIOCSPARAMS, &ifr) < 0) {
+                       fprintf(stderr, "SIOCSPARAMS on %s failed: %s\n", ifr.ifr_name,
+                                       strerror(errno));
+                       return -1;
+               }
+       }
+
+       if (opt_reset) {
+               printf("Resetting the transceiver...\n");
+               mdio_write(skfd, phy_id, 0, 0x8000);
+       }
+       /* Note: PHY addresses > 32 are pseudo-MII devices, usually built-in. */
+       if (phy_id < 64  &&  nway_advertise > 0) {
+               printf(" Setting the media capability advertisement register of "
+                          "PHY #%d to 0x%4.4x.\n", phy_id, nway_advertise | 1);
+               mdio_write(skfd, phy_id, 4, nway_advertise | 1);
+               mdio_write(skfd, phy_id, 0, 0x1000);
+       }
+
+       if (opt_restart) {
+               printf("Restarting negotiation...\n");
+               mdio_write(skfd, phy_id, 0, 0x0000);
+               mdio_write(skfd, phy_id, 0, 0x1200);
+       }
+       /* To force 100baseTx-HD do  mdio_write(skfd, phy_id, 0, 0x2000); */
+       if (fixed_speed >= 0) {
+               int reg0_val = 0;
+               if (fixed_speed & 0x0180)               /* 100mpbs */
+                       reg0_val |=  0x2000;
+               if ((fixed_speed & 0x0140) &&           /* A full duplex type and */
+                       ! (fixed_speed & 0x0820))               /* no half duplex types. */
+                       reg0_val |= 0x0100;
+               printf("Setting the speed to \"fixed\", Control register %4.4x.\n",
+                          reg0_val);
+               mdio_write(skfd, phy_id, 0, reg0_val);
+       }
+       if (set_BMCR >= 0) {
+               printf("Setting the Basic Mode Control Register to 0x%4.4x.\n",
+                          set_BMCR);
+               mdio_write(skfd, phy_id, 0, set_BMCR);
+       }
+
+       if (opt_watch && opt_status)
+               monitor_status(skfd, phy_id);
+
+       show_basic_mii(skfd, phy_id);
+#ifdef LIBMII
+       if (verbose)
+               show_mii_details(skfd, phy_id);
+#else
+       if (verbose || debug) {
+               int mii_reg, mii_val;
+               printf(" MII PHY #%d transceiver registers:", phy_id);
+               for (mii_reg = 0; mii_reg < 32; mii_reg++) {
+                       mii_val = mdio_read(skfd, phy_id, mii_reg);
+                       printf("%s %4.4x", (mii_reg % 8) == 0 ? "\n  " : "",
+                                  mii_val);
+               }
+               printf("\n");
+       }
+#endif
+
+       if (opt_watch)
+               monitor_mii(skfd, phy_id);
+       if (opt_status &&
+               (mdio_read(skfd, phy_id, 1) & 0x0004) == 0)
+               exit(2);
+       return 0;
+}
+
+int mdio_read(int skfd, int phy_id, int location)
+{
+       u16 *data = (u16 *)(&ifr.ifr_data);
+
+       data[0] = phy_id;
+       data[1] = location;
+
+       if (ioctl(skfd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) < 0) {
+               fprintf(stderr, "SIOCGMIIREG on %s failed: %s\n", ifr.ifr_name,
+                               strerror(errno));
+               return -1;
+       }
+       return data[3];
+}
+
+void mdio_write(int skfd, int phy_id, int location, int value)
+{
+       u16 *data = (u16 *)(&ifr.ifr_data);
+
+       data[0] = phy_id;
+       data[1] = location;
+       data[2] = value;
+
+       if (ioctl(skfd, new_ioctl_nums ? 0x8949 : SIOCDEVPRIVATE+2, &ifr) < 0) {
+               fprintf(stderr, "SIOCSMIIREG on %s failed: %s\n", ifr.ifr_name,
+                               strerror(errno));
+       }
+}
+
+/* Parse the command line argument for advertised capabilities. */
+static int parse_advertise(const char *capabilities)
+{
+       const char *mtypes[] = {
+               "100baseT4", "100baseTx", "100baseTx-FD", "100baseTx-HD",
+               "10baseT", "10baseT-FD", "10baseT-HD", 0,
+       };
+       char *endptr;
+       int cap_map[] = { 0x0200, 0x0180, 0x0100, 0x0080, 0x0060, 0x0040, 0x0020,};
+       int i;
+       if ( ! capabilities) {
+               fprintf(stderr, "You passed -A 'NULL'.  You must provide a media"
+                               " list to advertise!\n");
+               return -1;
+       }
+       if (debug)
+               fprintf(stderr, "Advertise string is '%s'.\n", capabilities);
+       for (i = 0; mtypes[i]; i++)
+               if (strcasecmp(mtypes[i], capabilities) == 0)
+                       return cap_map[i];
+       if ((i = strtol(capabilities, &endptr, 16)) <= 0xffff  &&  endptr[0] == 0)
+               return i;
+       fprintf(stderr, "Invalid media advertisement value '%s'.\n"
+                       "  Either pass a numeric value or one of the following names:\n",
+                       capabilities);
+       for (i = 0; mtypes[i]; i++)
+               fprintf(stderr, "   %-14s %3.3x\n", mtypes[i], cap_map[i]);
+       return -1;
+}
+
+/* Trivial versions if we don't link against libmii.c */
+static const char *media_names[] = {
+       "10baseT", "10baseT-FD", "100baseTx", "100baseTx-FD", "100baseT4",
+       "Flow-control", 0,
+};
+/* Various non-good bits in the command register. */
+static const char *bmcr_bits[] = {
+       "  Internal Collision-Test enabled!\n", "",             /* 0x0080,0x0100 */
+       "  Restarted auto-negotiation in progress!\n",
+       "  Transceiver isolated from the MII!\n",
+       "  Transceiver powered down!\n", "", "",
+       "  Transceiver in loopback mode!\n",
+       "  Transceiver currently being reset!\n",
+};
+
+int show_basic_mii(long ioaddr, int phy_id)
+{
+       int mii_reg, i;
+       u16 mii_val[32];
+       u16 bmcr, bmsr, new_bmsr, nway_advert, lkpar;
+
+       for (mii_reg = 0; mii_reg < 8; mii_reg++)
+               mii_val[mii_reg] = mdio_read(ioaddr, phy_id, mii_reg);
+       if ( ! verbose) {
+               printf("Basic registers of MII PHY #%d: ", phy_id);
+               for (mii_reg = 0; mii_reg < 8; mii_reg++)
+                       printf(" %4.4x", mii_val[mii_reg]);
+               printf(".\n");
+       }
+
+       if (mii_val[0] == 0xffff  ||  mii_val[1] == 0x0000) {
+               printf("  No MII transceiver present!.\n");
+               if (! opt_f) {
+                       printf("  Use '--force' to view the information anyway.\n");
+                       return -1;
+               }
+       }
+       /* Descriptive rename. */
+       bmcr = mii_val[0];
+       bmsr = mii_val[1];
+       nway_advert = mii_val[4];
+       lkpar = mii_val[5];
+
+       if (lkpar & 0x4000) {
+               int negotiated = nway_advert & lkpar & 0x3e0;
+               int max_capability = 0;
+               /* Scan for the highest negotiated capability, highest priority
+                  (100baseTx-FDX) to lowest (10baseT-HDX). */
+               int media_priority[] = {8, 9, 7, 6, 5};         /* media_names[i-5] */
+               printf(" The autonegotiated capability is %4.4x.\n", negotiated);
+               for (i = 0; media_priority[i]; i++)
+                       if (negotiated & (1 << media_priority[i])) {
+                               max_capability = media_priority[i];
+                               break;
+                       }
+               if (max_capability)
+                       printf("The autonegotiated media type is %s.\n",
+                                  media_names[max_capability - 5]);
+               else
+                       printf("No common media type was autonegotiated!\n"
+                                  "This is extremely unusual and typically indicates a "
+                                  "configuration error.\n" "Perhaps the advertised "
+                                  "capability set was intentionally limited.\n");
+       }
+       printf(" Basic mode control register 0x%4.4x:", bmcr);
+       if (bmcr & 0x1000)
+               printf(" Auto-negotiation enabled.\n");
+       else
+               printf(" Auto-negotiation disabled, with\n"
+                          " Speed fixed at 10%s mbps, %s-duplex.\n",
+                          bmcr & 0x2000 ? "0" : "",
+                          bmcr & 0x0100 ? "full":"half");
+       for (i = 0; i < 9; i++)
+               if (bmcr & (0x0080<<i))
+                       printf(bmcr_bits[i]);
+
+       new_bmsr = mdio_read(ioaddr, phy_id, 1);
+       if ((bmsr & 0x0016) == 0x0004)
+               printf( " You have link beat, and everything is working OK.\n");
+       else
+               printf(" Basic mode status register 0x%4.4x ... %4.4x.\n"
+                          "   Link status: %sestablished.\n",
+                          bmsr, new_bmsr,
+                          bmsr & 0x0004 ? "" :
+                          (new_bmsr & 0x0004) ? "previously broken, but now re" : "not ");
+       if (verbose) {
+               printf("   This transceiver is capable of ");
+               if (bmsr & 0xF800) {
+                       for (i = 15; i >= 11; i--)
+                               if (bmsr & (1<<i))
+                                       printf(" %s", media_names[i-11]);
+               } else
+                       printf("<Warning! No media capabilities>");
+               printf(".\n");
+               printf("   %s to perform Auto-negotiation, negotiation %scomplete.\n",
+                          bmsr & 0x0008 ? "Able" : "Unable",
+                          bmsr & 0x0020 ? "" : "not ");
+       }
+
+       if (bmsr & 0x0010)
+               printf(" Remote fault detected!\n");
+       if (bmsr & 0x0002)
+               printf("   *** Link Jabber! ***\n");
+
+       if (lkpar & 0x4000) {
+               printf(" Your link partner advertised %4.4x:",
+                          lkpar);
+               for (i = 5; i >= 0; i--)
+                       if (lkpar & (0x20<<i))
+                               printf(" %s", media_names[i]);
+               printf("%s.\n", lkpar & 0x0400 ? ", w/ 802.3X flow control" : "");
+       } else if (lkpar & 0x00A0)
+               printf(" Your link partner is generating %s link beat  (no"
+                          " autonegotiation).\n",
+                          lkpar & 0x0080 ? "100baseTx" : "10baseT");
+       else if ( ! (bmcr & 0x1000))
+               printf(" Link partner information is not exchanged when in"
+                          " fixed speed mode.\n");
+       else if ( ! (new_bmsr & 0x004))
+                                                       ;       /* If no partner, do not report status. */
+       else if (lkpar == 0x0001  ||  lkpar == 0x0000) {
+               printf(" Your link partner does not do autonegotiation, and this "
+                          "transceiver type\n  does not report the sensed link "
+                          "speed.\n");
+       } else
+               printf(" Your link partner is strange, status %4.4x.\n", lkpar);
+
+       printf("   End of basic transceiver information.\n\n");
+       return 0;
+}
+
+static void monitor_status(long ioaddr, int phy_id)
+{
+       unsigned int baseline_1 = 0x55555555;   /* Always show initial status. */
+
+       while (1) {
+               unsigned int new_1 = mdio_read(ioaddr, phy_id, 1);
+               if (new_1 != baseline_1) {
+                       printf("%-12s 0x%4.4x 0x%4.4x\n",
+                                  new_1 & 0x04 ? (new_1==0xffff ? "unknown" : "up") :
+                                  new_1 & 0x20 ? "negotiating" : "down",
+                                  new_1, mdio_read(ioaddr, phy_id, 5));
+                       fflush(stdout);
+                       baseline_1 = new_1;
+               }
+               sleep(1);
+       }
+}
+
+int  show_mii_details(long ioaddr, int phy_id)
+{
+       int mii_reg, mii_val;
+       printf(" MII PHY #%d transceiver registers:", phy_id);
+       for (mii_reg = 0; mii_reg < 32; mii_reg++) {
+               mii_val = mdio_read(skfd, phy_id, mii_reg);
+               printf("%s %4.4x", (mii_reg % 8) == 0 ? "\n  " : "",
+                          mii_val);
+       }
+       printf("\nThis version of 'mii-diag' has not been linked with "
+                       "the libmii.c library.\n"
+                       "  That library provides extended transceiver status reports.\n");
+       return 0;
+}
+
+void monitor_mii(long ioaddr, int phy_id)
+{
+       fprintf(stderr, "\nThis version of 'mii-diag' has not been linked with "
+                       "the libmii.c library \n"
+                       "  required for the media monitor option.\n");
+}
+
+
+\f
+/*
+ * Local variables:
+ *  version-control: t
+ *  kept-new-versions: 5
+ *  c-indent-level: 4
+ *  c-basic-offset: 4
+ *  tab-width: 4
+ *  compile-command: "gcc -Wall -Wstrict-prototypes -O mii-diag.c -DLIBMII libmii.c -o mii-diag"
+ *  simple-compile-command: "gcc mii-diag.c -o mii-diag"
+ * End:
+ */
diff --git a/packaging/net-tools-1.57-bug22040.patch b/packaging/net-tools-1.57-bug22040.patch
new file mode 100644 (file)
index 0000000..76f04d5
--- /dev/null
@@ -0,0 +1,50 @@
+--- net-tools-1.57/arp.c.orig  Sun May 14 17:57:41 2000
++++ net-tools-1.57/arp.c       Sat Nov 25 15:05:27 2000
+@@ -618,6 +618,7 @@
+     fprintf(stderr, _("  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      <-''-\n\n"));
+     
+     fprintf(stderr, _("        -a                       display (all) hosts in alternative (BSD) style\n"));
++    fprintf(stderr, _("        -e                       display (all) hosts in default (Linux) style\n"));
+     fprintf(stderr, _("        -s, --set                set a new ARP entry\n"));
+     fprintf(stderr, _("        -d, --delete             delete a specified entry\n"));
+     fprintf(stderr, _("        -v, --verbose            be verbose\n"));
+--- net-tools-1.57/man/en_US/arp.8.orig        Sat Nov 25 15:13:26 2000
++++ net-tools-1.57/man/en_US/arp.8     Sat Nov 25 15:15:12 2000
+@@ -3,7 +3,7 @@
+ arp \- manipulate the system ARP cache
+ .SH SYNOPSIS
+ .B arp 
+-.RB [ \-vn ] 
++.RB [ \-evn ] 
+ .RB [ "\-H type" ] 
+ .RB [ "-i if" ] 
+ .B -a 
+@@ -60,7 +60,7 @@
+ shows numerical addresses instead of trying to determine symbolic host, port
+ or user names.
+ .TP
+-.B "\-H type, \-\-hw-type type"
++.B "\-H type, \-\-hw-type type, \-t type"
+ When setting or reading the ARP cache, this optional parameter tells
+ .B arp
+ which class of entries it should check for.  The default value of
+@@ -81,7 +81,8 @@
+ .B hostname
+ parameter is not used,
+ .B all
+-entries will be displayed.
++entries will be displayed.  
++The entries will be displayed in alternate (BSD) style.
+ .TP
+ .B "\-d hostname, \-\-delete hostname"
+ Remove any entry for the specified host.  This can be used if the
+@@ -91,6 +92,9 @@
+ Use the interface
+ .BR ifa "'s"
+ hardware address.
++.TP
++.B "\-e"
++Shows the entries in default (Linux) style.
+ .TP
+ .B "\-i If, \-\-device If"
+ Select an interface. When dumping the ARP cache only entries matching
diff --git a/packaging/net-tools-1.60-a-option.patch b/packaging/net-tools-1.60-a-option.patch
new file mode 100644 (file)
index 0000000..b17db8d
--- /dev/null
@@ -0,0 +1,44 @@
+--- net-tools-1.60/man/de_DE/arp.8.a-option    2008-07-08 16:35:08.000000000 +0200
++++ net-tools-1.60/man/de_DE/arp.8     2008-07-08 16:35:35.000000000 +0200
+@@ -77,7 +77,7 @@ Andere m\(:ogliche Werte sind Netzwerkst
+ and
+ .RB "NET/ROM (" netrom ")."
+ .TP
+-.B "\-a [Rechnername], \-\-display [Rechnername]"
++.B "\-a [Rechnername], \-\-all [Rechnername]"
+ Zeigt die Eintr\(:age der angegebenen Rechner an.  Wird kein
+ .B hostname
+ Argument verwendet, so werden alle Eintr\(:age aufgelistet.
+--- net-tools-1.60/man/en_US/arp.8.a-option    2008-07-08 16:35:41.000000000 +0200
++++ net-tools-1.60/man/en_US/arp.8     2008-07-08 16:35:48.000000000 +0200
+@@ -76,7 +76,7 @@ Other values might include network techn
+ and
+ .RB "NET/ROM (" netrom ")."
+ .TP
+-.B "\-a [hostname], \-\-display [hostname]"
++.B "\-a [hostname], \-\-all [hostname]"
+ Shows the entries of the specified hosts.  If the
+ .B hostname
+ parameter is not used,
+--- net-tools-1.60/man/fr_FR/arp.8.a-option    2008-07-08 16:35:53.000000000 +0200
++++ net-tools-1.60/man/fr_FR/arp.8     2008-07-08 16:36:03.000000000 +0200
+@@ -81,7 +81,7 @@ D'autres valeurs doivent correspondre à 
+ and
+ .RB "NET/ROM (" netrom ")."
+ .TP
+-.B "\-a [nom_d_hôte], \-\-display [nom_d_hôte]"
++.B "\-a [nom_d_hôte], \-\-all [nom_d_hôte]"
+ Affiche les entrées concernant l'hôte spécifié.  Si le paramètre
+ .B nom_d_hôte
+ n'est pas utilisé,
+--- net-tools-1.60/man/pt_BR/arp.8.a-option    2008-07-08 16:38:13.000000000 +0200
++++ net-tools-1.60/man/pt_BR/arp.8     2008-07-08 16:38:20.000000000 +0200
+@@ -77,7 +77,7 @@ Outros valores podem incluir tecnologias
+ e
+ .RB "NET/ROM (" netrom ")."
+ .TP
+-.B "\-a [máquina], \-\-display [máquina]"
++.B "\-a [máquina], \-\-all [máquina]"
+ Mostra as entradas das máquinas especificadas. Se o parâmetro
+ .B máquina
+ não for usado,
diff --git a/packaging/net-tools-1.60-arp-unaligned-access.patch b/packaging/net-tools-1.60-arp-unaligned-access.patch
new file mode 100644 (file)
index 0000000..ed0c99a
--- /dev/null
@@ -0,0 +1,116 @@
+--- net-tools-1.60/arp.c       2001-04-08 10:05:05.000000000 -0700
++++ net-tools-1.60.new/arp.c   2006-01-31 13:10:01.479716750 -0800
+@@ -100,7 +100,7 @@ static int arp_del(char **args)
+ {
+     char host[128];
+     struct arpreq req;
+-    struct sockaddr sa;
++    struct sockaddr_storage ss;
+     int flags = 0;
+     int err;
+@@ -112,12 +112,12 @@ static int arp_del(char **args)
+       return (-1);
+     }
+     safe_strncpy(host, *args, (sizeof host));
+-    if (ap->input(0, host, &sa) < 0) {
++    if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
+       ap->herror(host);
+       return (-1);
+     }
+     /* If a host has more than one address, use the correct one! */
+-    memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
++    memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
+     if (hw_set)
+       req.arp_ha.sa_family = hw->type;
+@@ -177,11 +177,11 @@ static int arp_del(char **args)
+               usage();
+           if (strcmp(*args, "255.255.255.255") != 0) {
+               strcpy(host, *args);
+-              if (ap->input(0, host, &sa) < 0) {
++              if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
+                   ap->herror(host);
+                   return (-1);
+               }
+-              memcpy((char *) &req.arp_netmask, (char *) &sa,
++              memcpy((char *) &req.arp_netmask, (char *) &ss,
+                      sizeof(struct sockaddr));
+               req.arp_flags |= ATF_NETMASK;
+           }
+@@ -260,7 +260,7 @@ static int arp_set(char **args)
+ {
+     char host[128];
+     struct arpreq req;
+-    struct sockaddr sa;
++    struct sockaddr_storage ss;
+     int flags;
+     memset((char *) &req, 0, sizeof(req));
+@@ -271,12 +271,12 @@ static int arp_set(char **args)
+       return (-1);
+     }
+     safe_strncpy(host, *args++, (sizeof host));
+-    if (ap->input(0, host, &sa) < 0) {
++    if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
+       ap->herror(host);
+       return (-1);
+     }
+     /* If a host has more than one address, use the correct one! */
+-    memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
++    memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
+     /* Fetch the hardware address. */
+     if (*args == NULL) {
+@@ -346,11 +346,11 @@ static int arp_set(char **args)
+               usage();
+           if (strcmp(*args, "255.255.255.255") != 0) {
+               strcpy(host, *args);
+-              if (ap->input(0, host, &sa) < 0) {
++              if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
+                   ap->herror(host);
+                   return (-1);
+               }
+-              memcpy((char *) &req.arp_netmask, (char *) &sa,
++              memcpy((char *) &req.arp_netmask, (char *) &ss,
+                      sizeof(struct sockaddr));
+               flags |= ATF_NETMASK;
+           }
+@@ -519,7 +519,7 @@ static void arp_disp(char *name, char *i
+ static int arp_show(char *name)
+ {
+     char host[100];
+-    struct sockaddr sa;
++    struct sockaddr_storage ss;
+     char ip[100];
+     char hwa[100];
+     char mask[100];
+@@ -535,11 +535,11 @@ static int arp_show(char *name)
+     if (name != NULL) {
+       /* Resolve the host name. */
+       safe_strncpy(host, name, (sizeof host));
+-      if (ap->input(0, host, &sa) < 0) {
++      if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
+           ap->herror(host);
+           return (-1);
+       }
+-      safe_strncpy(host, ap->sprint(&sa, 1), sizeof(host));
++      safe_strncpy(host, ap->sprint((struct sockaddr*)&ss, 1), sizeof(host));
+     }
+     /* Open the PROCps kernel table. */
+     if ((fp = fopen(_PATH_PROCNET_ARP, "r")) == NULL) {
+@@ -575,10 +575,11 @@ static int arp_show(char *name)
+           if (opt_n)
+               hostname = "?";
+           else {
+-              if (ap->input(0, ip, &sa) < 0)
++              if (ap->input(0, ip, (struct sockaddr*)&ss) < 0)
+                   hostname = ip;
+               else
+-                  hostname = ap->sprint(&sa, opt_n | 0x8000);
++                  hostname = ap->sprint((struct sockaddr*)&ss, 
++                                        opt_n | 0x8000);
+               if (strcmp(hostname, ip) == 0)
+                   hostname = "?";
+           }
+
diff --git a/packaging/net-tools-1.60-arp_man.patch b/packaging/net-tools-1.60-arp_man.patch
new file mode 100644 (file)
index 0000000..7175ddc
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/man/en_US/arp.8.old 2006-05-02 14:38:10.000000000 +0200
++++ net-tools-1.60/man/en_US/arp.8     2006-05-02 14:44:23.000000000 +0200
+@@ -150,8 +150,8 @@
+ is used as default.
+ .sp 1
+ The format of the file is simple; it
+-only contains ASCII text lines with a hostname, and a hardware
+-address separated by whitespace. Additionally the 
++only contains ASCII text lines with a hardware
++address and a hostname separated by whitespace. Additionally the 
+ .BR "pub" , " temp" " and" " netmask"
+ flags can be used.
+ .LP
diff --git a/packaging/net-tools-1.60-arp_overflow.patch b/packaging/net-tools-1.60-arp_overflow.patch
new file mode 100644 (file)
index 0000000..4679a51
--- /dev/null
@@ -0,0 +1,11 @@
+--- net-tools-1.60/arp.c.old   2005-08-03 08:23:46.000000000 +0200
++++ net-tools-1.60/arp.c       2005-08-03 11:02:10.000000000 +0200
+@@ -235,7 +235,7 @@
+     struct ifreq ifr;
+     struct hwtype *xhw;
+-    strcpy(ifr.ifr_name, ifname);
++    strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+     if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) {
+       fprintf(stderr, _("arp: cant get HW-Address for `%s': %s.\n"), ifname, strerror(errno));
+       return (-1);
diff --git a/packaging/net-tools-1.60-bcast.patch b/packaging/net-tools-1.60-bcast.patch
new file mode 100644 (file)
index 0000000..9489e26
--- /dev/null
@@ -0,0 +1,99 @@
+--- net-tools-1.60/ifconfig.c.broadcast        2004-11-03 12:05:30.000000000 +0100
++++ net-tools-1.60/ifconfig.c  2004-11-04 15:39:32.817077232 +0100
+@@ -36,6 +36,7 @@
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+ #include <net/if.h>
++#include <netinet/ip.h>
+ #include <net/if_arp.h>
+ #include <stdio.h>
+ #include <errno.h>
+@@ -138,6 +139,7 @@
+       perror("SIOCSIFFLAGS");
+       return -1;
+     }
++    
+     return (0);
+ }
+@@ -212,17 +214,41 @@
+     exit(0);
+ }
+-static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa)
++static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa, int new_bcast)
+ {
+     int err = 0;
+-
+-    memcpy((char *) &ifr->ifr_netmask, (char *) sa,
+-         sizeof(struct sockaddr));
++      struct sockaddr_in * ip_addr, * netmask, *bcast;
++    struct ifreq ifraddr;
++      struct ifreq ifrbcast;
++              
++      memcpy((char *) &ifr->ifr_netmask, (char *) sa,
++         sizeof(struct sockaddr)); 
+     if (ioctl(skfd, SIOCSIFNETMASK, ifr) < 0) {
+       fprintf(stderr, "SIOCSIFNETMASK: %s\n",
+               strerror(errno));
+       err = 1;
+     }
++      
++      if (new_bcast) {
++              memcpy(&ifraddr,ifr,sizeof(struct ifreq));
++              memcpy(&ifrbcast,ifr,sizeof(struct ifreq));
++      
++              if (ioctl(skfd, SIOCGIFADDR, &ifraddr) < 0) {
++                      fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno));
++                      err = 1;
++      }
++      
++              ip_addr = (struct sockaddr_in *)&ifraddr.ifr_addr;
++              netmask = (struct sockaddr_in *)&ifr->ifr_netmask;
++              bcast = (struct sockaddr_in *)&ifrbcast.ifr_broadaddr;
++              /* calculate new broadcast adress */
++              bcast->sin_addr.s_addr = ip_addr->sin_addr.s_addr | ~netmask->sin_addr.s_addr;
++              /* set new broadcast adress   */
++      if (ioctl(skfd, SIOCSIFBRDADDR, &ifrbcast) < 0) {
++                      fprintf(stderr, "SIOCSIFBROADCAST: %s\n", strerror(errno));
++                      err = 1;
++      }
++    }
+     return 0;
+ }
+@@ -234,7 +260,7 @@
+     struct aftype *ap;
+     struct hwtype *hw;
+     struct ifreq ifr;
+-    int goterr = 0, didnetmask = 0, donetmask = 0;
++    int goterr = 0, didnetmask = 0, donetmask = 0, dobcast = 1;
+     char **spp;
+     int fd;
+ #if HAVE_AFINET6
+@@ -506,6 +532,7 @@
+                           strerror(errno));
+                   goterr = 1;
+               }
++              dobcast = 0;
+               spp++;
+           }
+           goterr |= set_flag(ifr.ifr_name, IFF_BROADCAST);
+@@ -542,7 +569,7 @@
+               continue;
+           }
+           didnetmask++;
+-          goterr = set_netmask(ap->fd, &ifr, &sa);
++          goterr = set_netmask(ap->fd, &ifr, &sa, dobcast);
+           spp++;
+           continue;
+       }
+@@ -964,7 +991,7 @@
+       /* set CIDR netmask */
+       if (donetmask) {
+               donetmask = 0;
+-              goterr = set_netmask(skfd, &ifr, &sa_netmask);
++              goterr = set_netmask(skfd, &ifr, &sa_netmask, dobcast);
+               didnetmask++;
+       }
diff --git a/packaging/net-tools-1.60-bitkeeper.patch b/packaging/net-tools-1.60-bitkeeper.patch
new file mode 100644 (file)
index 0000000..85676b8
--- /dev/null
@@ -0,0 +1,17 @@
+--- net-tools-1.60/netplug-1.2.9/Makefile.kill_bitkeeper       2005-01-10 11:36:32.000000000 +0100
++++ net-tools-1.60/netplug-1.2.9/Makefile      2005-01-10 11:38:01.796744224 +0100
+@@ -24,10 +24,12 @@
+       install $(install_opts) -m 755 scripts/rc.netplugd $(initdir)/netplugd
+       install $(install_opts) -m 444 man/man8/netplugd.8 $(mandir)/man8
+-bk_root := $(shell bk root)
++#bk_root := $(shell bk root)
++bk_root := $(shell)
+ tar_root := netplug-$(version)
+ tar_file := $(bk_root)/$(tar_root).tar.bz2
+-files := $(shell bk sfiles -Ug)
++#files := $(shell bk sfiles -Ug)
++file := $(shell)
+ tarball: $(tar_file)
diff --git a/packaging/net-tools-1.60-clear-flag.patch b/packaging/net-tools-1.60-clear-flag.patch
new file mode 100644 (file)
index 0000000..b8f3c59
--- /dev/null
@@ -0,0 +1,38 @@
+--- net-tools-1.60/ifconfig.c.clear-flag       2008-07-08 11:21:33.000000000 +0200
++++ net-tools-1.60/ifconfig.c  2008-07-08 11:22:55.000000000 +0200
+@@ -465,7 +465,7 @@ int main(int argc, char **argv)
+       }
+       if (!strcmp(*spp, "-allmulti")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_ALLMULTI);
+-          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++          if (test_flag(ifr.ifr_name, IFF_ALLMULTI) > 0)
+               fprintf(stderr, _("Warning: Interface %s still in ALLMULTI mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+@@ -488,7 +488,7 @@ int main(int argc, char **argv)
+       }
+       if (!strcmp(*spp, "-dynamic")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_DYNAMIC);
+-          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++          if (test_flag(ifr.ifr_name, IFF_DYNAMIC) > 0)
+               fprintf(stderr, _("Warning: Interface %s still in DYNAMIC mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+@@ -547,7 +547,7 @@ int main(int argc, char **argv)
+       if (!strcmp(*spp, "-broadcast")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_BROADCAST);
+-          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++          if (test_flag(ifr.ifr_name, IFF_BROADCAST) > 0)
+               fprintf(stderr, _("Warning: Interface %s still in BROADCAST mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+@@ -676,7 +676,7 @@ int main(int argc, char **argv)
+       }
+       if (!strcmp(*spp, "-pointopoint")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT);
+-          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++          if (test_flag(ifr.ifr_name, IFF_POINTOPOINT) > 0)
+               fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
diff --git a/packaging/net-tools-1.60-config.h b/packaging/net-tools-1.60-config.h
new file mode 100644 (file)
index 0000000..a739c92
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+* config.h     Automatically generated configuration includefile
+*
+* NET-TOOLS    A collection of programs that form the base set of the
+*              NET-3 Networking Distribution for the LINUX operating
+*              system.
+*
+*              DO  NOT  EDIT  DIRECTLY
+*
+*/
+
+/* 
+ * 
+ * Internationalization
+ * 
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese.  Other translations are, of
+ * course, welcome.  Answer `n' here if you have no support for
+ * internationalization on your system.
+ * 
+ */
+#define I18N 1
+
+/* 
+ * 
+ * Protocol Families.
+ * 
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 1
+#define HAVE_AFATALK 1
+#define HAVE_AFAX25 1
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 1
+#define HAVE_AFX25 1
+#define HAVE_AFECONET 1
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 1
+
+/* 
+ * 
+ * Device Hardware types.
+ * 
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 1
+#define HAVE_HWTR 1
+#define HAVE_HWAX25 1
+#define HAVE_HWROSE 1
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 1
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 1
+#define HAVE_HWFDDI 1
+#define HAVE_HWHIPPI 1
+#define HAVE_HWASH 1
+#define HAVE_HWHDLCLAPB 1
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 1
+#define HAVE_HWIB 1
+
+/* 
+ * 
+ * Other Features.
+ * 
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
diff --git a/packaging/net-tools-1.60-config.make b/packaging/net-tools-1.60-config.make
new file mode 100644 (file)
index 0000000..e7cfc99
--- /dev/null
@@ -0,0 +1,37 @@
+I18N=1
+HAVE_AFUNIX=1
+HAVE_AFINET=1
+HAVE_AFINET6=1
+HAVE_AFIPX=1
+HAVE_AFATALK=1
+HAVE_AFAX25=1
+HAVE_AFNETROM=1
+HAVE_AFROSE=1
+HAVE_AFX25=1
+HAVE_AFECONET=1
+# HAVE_AFDECnet=0
+HAVE_AFASH=1
+HAVE_HWETHER=1
+HAVE_HWARC=1
+HAVE_HWSLIP=1
+HAVE_HWPPP=1
+HAVE_HWTUNNEL=1
+HAVE_HWSTRIP=1
+HAVE_HWTR=1
+HAVE_HWAX25=1
+HAVE_HWROSE=1
+HAVE_HWNETROM=1
+HAVE_HWX25=1
+HAVE_HWFR=1
+HAVE_HWSIT=1
+HAVE_HWFDDI=1
+HAVE_HWHIPPI=1
+HAVE_HWASH=1
+HAVE_HWHDLCLAPB=1
+HAVE_HWIRDA=1
+HAVE_HWEC=1
+HAVE_HWIB=1
+HAVE_FW_MASQUERADE=1
+HAVE_IP_TOOLS=1
+HAVE_MII=1
+HAVE_SELINUX=1
diff --git a/packaging/net-tools-1.60-cycle.patch b/packaging/net-tools-1.60-cycle.patch
new file mode 100644 (file)
index 0000000..ce659ec
--- /dev/null
@@ -0,0 +1,311 @@
+--- net-tools-1.60/lib/interface.c.cycle       2003-02-11 14:29:29.000000000 +0100
++++ net-tools-1.60/lib/interface.c     2003-02-11 14:29:29.000000000 +0100
+@@ -90,6 +90,7 @@
+ static struct interface *int_list, *int_last;
+ static int if_readlist_proc(char *);
++static int if_readlist_rep(char *, struct interface *);
+ static struct interface *add_interface(char *name)
+ {
+@@ -128,11 +129,13 @@
+ int for_all_interfaces(int (*doit) (struct interface *, void *), void *cookie)
+ {
+     struct interface *ife;
++    int err;
+     if (!int_list && (if_readlist() < 0))
+       return -1;
+     for (ife = int_list; ife; ife = ife->next) {
+-      int err = doit(ife, cookie);
++        if_readlist_rep(ife->name, ife);
++      err = doit(ife, cookie);
+       if (err)
+           return err;
+     }
+@@ -369,6 +372,42 @@
+     return err;
+ }
++
++static int if_readlist_rep(char *target, struct interface *ife)
++{
++    FILE *fh;
++    char buf[512];
++    int err;
++
++    fh = fopen(_PATH_PROCNET_DEV, "r");
++    if (!fh) {
++              fprintf(stderr, _("Warning: cannot open %s (%s). Limited output.\n"),
++                      _PATH_PROCNET_DEV, strerror(errno)); 
++              return if_readconf();
++      }       
++    fgets(buf, sizeof buf, fh);       /* eat line */
++    fgets(buf, sizeof buf, fh);
++
++    procnetdev_vsn = procnetdev_version(buf);
++
++    err = 0;
++    while (fgets(buf, sizeof buf, fh)) {
++      char *s, name[IFNAMSIZ];
++      s = get_name(name, buf);    
++      get_dev_fields(s, ife);
++      ife->statistics_valid = 1;
++      if (target && !strcmp(target,name))
++              break;
++    }
++    if (ferror(fh)) {
++      perror(_PATH_PROCNET_DEV);
++      err = -1;
++    }
++
++    fclose(fh);
++    return err;
++}
++
+ int if_readlist(void) 
+ { 
+     int err = if_readlist_proc(NULL); 
+--- net-tools-1.60/man/en_US/netstat.8.cycle   2001-01-07 13:43:57.000000000 +0100
++++ net-tools-1.60/man/en_US/netstat.8 2003-02-11 14:29:29.000000000 +0100
+@@ -30,6 +30,7 @@
+ .RB [ \-\-program | \-p ]
+ .RB [ \-\-verbose | \-v ]
+ .RB [ \-\-continuous | \-c]
++.RB [delay]
+ .P
+ .B netstat 
+ .RB { \-\-route | \-r }
+@@ -39,6 +40,7 @@
+ .RB [ \-\-numeric | \-n ]
+ .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+ .RB [ \-\-continuous | \-c]
++.RB [delay]
+ .P
+ .B netstat
+ .RB { \-\-interfaces | \-i }
+@@ -50,12 +52,14 @@
+ .RB [ \-\-numeric | \-n ]
+ .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+ .RB [ \-\-continuous | \-c]
++.RB [delay]
+ .P
+ .B netstat
+ .RB { \-\-groups | \-g }
+ .RB [ \-\-numeric | \-n ]
+ .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+ .RB [ \-\-continuous | \-c]
++.RB [delay]
+ .P
+ .B netstat
+ .RB { \-\-masquerade | \-M }
+@@ -63,12 +67,14 @@
+ .RB [ \-\-numeric | \-n ]
+ .RB [ \-\-numeric-hosts ] [ \-\-numeric-ports ] [ \-\-numeric-ports ]
+ .RB [ \-\-continuous | \-c]
++.RB [delay]
+ .P
+ .B netstat
+ .RB { \-\-statistics | -s }
+ .RB [ \-\-tcp | \-t ]
+ .RB [ \-\-udp | \-u ]
+ .RB [ \-\-raw | \-w ]
++.RB [delay]
+ .P
+ .B netstat 
+ .RB { \-\-version | \-V }
+@@ -170,6 +176,10 @@
+ Print routing information from the FIB.  (This is the default.)
+ .SS "\-C"
+ Print routing information from the route cache.
++.SS delay
++Netstat will cycle printing through statistics every 
++.B delay 
++seconds.
+ .IR UP .
+ .P
+ .SH OUTPUT
+--- net-tools-1.60/netstat.c.cycle     2003-02-11 14:29:29.000000000 +0100
++++ net-tools-1.60/netstat.c   2003-02-11 15:07:26.000000000 +0100
+@@ -102,7 +102,7 @@
+ #endif
+ /* prototypes for statistics.c */
+-void parsesnmp(int, int, int);
++int parsesnmp(int, int, int);
+ void inittab(void);
+ typedef enum {
+@@ -1440,6 +1440,8 @@
+ static int iface_info(void)
+ {
++    static int count=0;
++
+     if (skfd < 0) {
+       if ((skfd = sockets_open(0)) < 0) {
+           perror("socket");
+@@ -1449,20 +1451,21 @@
+     }
+     if (flag_exp < 2) {
+       ife_short = 1;
+-      printf(_("Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
++      if(!(count % 8))
++          printf(_("Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+     }
+     if (for_all_interfaces(do_if_print, &flag_all) < 0) {
+       perror(_("missing interface information"));
+       exit(1);
+     }
+-    if (flag_cnt)
++    if (!flag_cnt) {
+       free_interface_list();
+-    else {
+       close(skfd);
+       skfd = -1;
+     }
++    count++;
+     return 0;
+ }
+@@ -1478,7 +1481,7 @@
+ {
+     fprintf(stderr, _("usage: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}\n"));
+     fprintf(stderr, _("       netstat [-vnNcaeol] [<Socket> ...]\n"));
+-    fprintf(stderr, _("       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n\n"));
++    fprintf(stderr, _("       netstat { [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
+     fprintf(stderr, _("        -r, --route              display routing table\n"));
+     fprintf(stderr, _("        -i, --interfaces         display interface table\n"));
+@@ -1514,6 +1517,7 @@
+  (int argc, char *argv[]) {
+     int i;
+     int lop;
++    int reptimer = 1;
+     struct option longopts[] =
+     {
+       AFTRANS_OPTS,
+@@ -1655,6 +1659,12 @@
+           flag_sta++;
+       }
++    if(argc == optind + 1) {
++      if((reptimer = atoi(argv[optind])) <= 0)
++      usage();
++      flag_cnt++;
++    }
++    
+     if (flag_int + flag_rou + flag_mas + flag_sta > 1)
+       usage();
+@@ -1666,7 +1676,7 @@
+     flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
+       + flag_ax25 + flag_netrom + flag_igmp + flag_x25;
+-
++    
+     if (flag_mas) {
+ #if HAVE_FW_MASQUERADE && HAVE_AFINET
+ #if MORE_THAN_ONE_MASQ_AF
+@@ -1678,7 +1688,7 @@
+                            flag_not & FLAG_NUM_PORT, flag_exp);
+           if (i || !flag_cnt)
+               break;
+-          sleep(1);
++          sleep(reptimer);
+       }
+ #else
+       ENOSUPP("netstat.c", "FW_MASQUERADE");
+@@ -1688,9 +1698,15 @@
+     }
+     if (flag_sta) {
++      for(;;) {
+         inittab();
+-      parsesnmp(flag_raw, flag_tcp, flag_udp);
+-      exit(0);
++      i = parsesnmp(flag_raw, flag_tcp, flag_udp);
++      
++      if(i || !flag_cnt)
++        break;
++      sleep(reptimer);
++      }
++      return(i);
+     }
+     
+     if (flag_rou) {
+@@ -1712,7 +1728,7 @@
+           i = route_info(afname, options);
+           if (i || !flag_cnt)
+               break;
+-          sleep(1);
++          sleep(reptimer);
+       }
+       return (i);
+     }
+@@ -1721,7 +1737,7 @@
+           i = iface_info();
+           if (!flag_cnt || i)
+               break;
+-          sleep(1);
++          sleep(reptimer);
+       }
+       return (i);
+     }
+@@ -1847,7 +1863,7 @@
+       }
+       if (!flag_cnt || i)
+           break;
+-      sleep(1);
++      sleep(reptimer);
+       prg_cache_clear();
+     }
+     return (i);
+--- net-tools-1.60/statistics.c.cycle  2001-02-02 19:01:23.000000000 +0100
++++ net-tools-1.60/statistics.c        2003-02-11 14:29:29.000000000 +0100
+@@ -338,7 +338,7 @@
+ }
+-void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
++int parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+ {
+     FILE *f;
+@@ -347,12 +347,14 @@
+     f = fopen("/proc/net/snmp", "r");
+     if (!f) {
+       perror(_("cannot open /proc/net/snmp"));
+-      return;
++      return(1);
+     }
+     process_fd(f);
+-    if (ferror(f))
++    if (ferror(f)) {
+       perror("/proc/net/snmp");
++      return(1);
++    }
+     fclose(f);
+@@ -361,12 +363,14 @@
+     if (f) {
+       process_fd(f);
+-        if (ferror(f))
+-          perror("/proc/net/netstat");
++        if (ferror(f)) {
++        perror("/proc/net/netstat");
++        return(1);
++      }
+     
+         fclose(f);
+     }
+-    return;
++    return(0);
+ }
+     
diff --git a/packaging/net-tools-1.60-de.patch b/packaging/net-tools-1.60-de.patch
new file mode 100644 (file)
index 0000000..f015f13
--- /dev/null
@@ -0,0 +1,11 @@
+--- net-tools-1.60/po/de.po.old        2005-02-16 16:46:02.000000000 +0100
++++ net-tools-1.60/po/de.po    2005-02-16 16:54:07.886323928 +0100
+@@ -64,7 +64,7 @@
+ #: ../arp.c:467
+ msgid "(incomplete)"
+-msgstr "(unvollsändig)"
++msgstr "(unvollständig)"
+ #: ../arp.c:484
+ #, c-format
diff --git a/packaging/net-tools-1.60-duplicate-tcp.patch b/packaging/net-tools-1.60-duplicate-tcp.patch
new file mode 100644 (file)
index 0000000..1b6f3b0
--- /dev/null
@@ -0,0 +1,194 @@
+--- net-tools-1.60/netstat.c.foo       Mon Apr 22 14:25:20 2002
++++ net-tools-1.60/netstat.c   Mon Apr 22 14:25:22 2002
+@@ -435,6 +435,162 @@
+                        " will not be shown, you would have to be root to see it all.)\n"));
+ }
++#define TCP_HASH_SIZE 1009
++
++static struct tcp_node {
++  struct tcp_node *next;
++  char            *socket_pair;
++} *tcp_node_hash[TCP_HASH_SIZE];
++
++static unsigned int tcp_node_compute_string_hash(const char *p)
++{
++  unsigned int h = *p;
++
++  if (h)
++    for (p += 1; *p != '\0'; p++)
++      h = (h << 5) - h + *p;
++
++  return h;
++}
++
++#define TCP_NODE_HASH_STRING(x) \
++  (tcp_node_compute_string_hash(x) % TCP_HASH_SIZE)
++
++static void tcp_node_hash_clear(void)
++{
++  int i;
++  struct tcp_node *next_node;
++  struct tcp_node *tmp_node;
++  for (i=0; i < TCP_HASH_SIZE; i++) {
++    if (tcp_node_hash[i]) {
++      /* free the children of this hash bucket */
++      next_node = tcp_node_hash[i]->next;
++      while (next_node) {
++      tmp_node = next_node;
++      next_node = next_node->next;
++      free(tmp_node->socket_pair);
++      free(tmp_node);
++      }
++
++      /* free the bucket itself */
++      free(tcp_node_hash[i]);
++      tcp_node_hash[i] = NULL;
++    }
++  }
++}
++
++/* This function takes a socket pair string.  If it already exists in
++   the hash it returns -1, otherwise it returns 0. */
++
++static int tcp_node_hash_check_and_append(const char *local_addr,
++                                        int local_port,
++                                        const char *rem_addr,
++                                        int rem_port)
++{
++  unsigned int hash_val;
++  struct tcp_node *tmp_node;
++  int   tmp_string_len;
++  char *tmp_string;;
++
++  /* Size of the string is the size of the two lengths of the address
++     strings plus enough sizes for the colons and the ports. */
++  tmp_string_len = strlen(local_addr) + strlen(rem_addr) + 32;
++  tmp_string = malloc(tmp_string_len);
++  if (!tmp_string)
++    return 0;
++
++  if (snprintf(tmp_string, tmp_string_len - 1, "%s:%d:%s:%d",
++             local_addr, local_port, rem_addr, rem_port) < 0) {
++    free(tmp_string);
++    return 0;
++  }
++
++  hash_val = TCP_NODE_HASH_STRING(tmp_string);
++
++  /* See if we have to allocate this node */
++  if (!tcp_node_hash[hash_val]) {
++    tcp_node_hash[hash_val] = malloc(sizeof(struct tcp_node));
++    if (!tcp_node_hash[hash_val]) {
++      free(tmp_string);
++      return 0;
++    }
++
++    memset(tcp_node_hash[hash_val], 0, sizeof(struct tcp_node));
++
++    /* Stuff this new value into the hash bucket and return early */
++    tcp_node_hash[hash_val]->socket_pair = tmp_string;
++    return 0;
++  }
++
++  /* Try to find the value in the hash bucket. */
++  tmp_node = tcp_node_hash[hash_val];
++  while (tmp_node) {
++    if (!strcmp(tmp_node->socket_pair, tmp_string)) {
++      free(tmp_string);
++      return -1;
++    }
++    tmp_node = tmp_node->next;
++  }
++
++  /* If we got this far it means that it isn't in the hash bucket.
++     Add it to the front since it's faster that way. */
++  tmp_node = tcp_node_hash[hash_val];
++
++  tcp_node_hash[hash_val] = malloc(sizeof(struct tcp_node));
++  if (!tcp_node_hash[hash_val]) {
++    free(tmp_string);
++    tcp_node_hash[hash_val] = tmp_node;
++    return 0;
++  }
++
++  tcp_node_hash[hash_val]->socket_pair = tmp_string;
++  tcp_node_hash[hash_val]->next = tmp_node;
++
++  return 0;
++}
++
++#if 0
++static void tcp_node_hash_report_bucket_size(void)
++{
++  int max = 0;
++  int min = 0;
++  int num = 0;
++  int total = 0;
++  struct tcp_node *tmp_node;
++  int tmp, i;
++  float avg;
++
++  for (i=0; i < TCP_HASH_SIZE; i++) {
++    tmp_node = tcp_node_hash[i];
++    if (!tmp_node)
++      continue;
++
++    tmp = 0;
++
++    num++;
++    tmp = 1;
++
++    while (tmp_node) {
++      tmp++;
++      tmp_node = tmp_node->next;
++    }
++    
++    total += tmp;
++    if (tmp > max)
++      max = tmp;
++    
++    if (min == 0 || tmp < min)
++      min = tmp;
++  }
++
++  avg = (float)total/(float)num;
++
++  printf("%d nodes in %d buckets min/max/avg %d/%d/%.2f\n",
++       total, num, min, max, avg);
++
++}
++#endif
++
+ #if HAVE_AFNETROM
+ static const char *netrom_state[] =
+ {
+@@ -752,11 +908,20 @@
+       fprintf(stderr, _("warning, got bogus tcp line.\n"));
+       return;
+     }
++
+     if ((ap = get_afntype(((struct sockaddr *) &localaddr)->sa_family)) == NULL) {
+       fprintf(stderr, _("netstat: unsupported address family %d !\n"),
+               ((struct sockaddr *) &localaddr)->sa_family);
+       return;
+     }
++
++    /* make sure that we haven't seen this socket pair before */
++    if (tcp_node_hash_check_and_append(local_addr, local_port,
++                                     rem_addr, rem_port) < 0) {
++  /*  fprintf(stderr, _("warning, got duplicate tcp line.\n")); */
++      return;
++    }
++
+     if (state == TCP_LISTEN) {
+       time_len = 0;
+       retr = 0L;
+@@ -1880,6 +2045,7 @@
+           break;
+       sleep(reptimer);
+       prg_cache_clear();
++      tcp_node_hash_clear();
+     }
+     return (i);
+ }
diff --git a/packaging/net-tools-1.60-ec_hw_null.patch b/packaging/net-tools-1.60-ec_hw_null.patch
new file mode 100644 (file)
index 0000000..add9a0d
--- /dev/null
@@ -0,0 +1,11 @@
+diff -up net-tools-1.60/lib/ec_hw.c.old net-tools-1.60/lib/ec_hw.c
+--- net-tools-1.60/lib/ec_hw.c.old     1999-11-20 22:02:53.000000000 +0100
++++ net-tools-1.60/lib/ec_hw.c 2008-02-25 09:04:00.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <net/if_arp.h>
+ #include "net-support.h"
++#define NULL ((void *) 0)
+ struct hwtype ec_hwtype =
+ {
diff --git a/packaging/net-tools-1.60-fgets.patch b/packaging/net-tools-1.60-fgets.patch
new file mode 100644 (file)
index 0000000..27641da
--- /dev/null
@@ -0,0 +1,41 @@
+Fix for when arp_disp_2() is called without opt_n set.  If there is a DNS lookup, an
+entry is added to /proc/net/arp after fopen(), resulting in a duplicate entry.
+
+--- net-tools-1.60/arp.c.fgets 2005-12-10 14:52:04.000000000 -0500
++++ net-tools-1.60/arp.c       2005-12-11 00:15:59.000000000 -0500
+@@ -528,7 +528,7 @@ static int arp_show(char *name)
+     int type, flags;
+     FILE *fp;
+     char *hostname;
+-    int num, entries = 0, showed = 0;
++    int num, entries, showed = 0;
+     host[0] = '\0';
+@@ -546,18 +546,21 @@ static int arp_show(char *name)
+       perror(_PATH_PROCNET_ARP);
+       return (-1);
+     }
++    /* Count number of entries, in case file changes */
++    for (entries = 0; fgets(line, sizeof(line), fp); entries++);
++    entries--;
++    fseek (fp, 0L, SEEK_SET);
+     /* Bypass header -- read until newline */
+     if (fgets(line, sizeof(line), fp) != (char *) NULL) {
+       strcpy(mask, "-");
+       strcpy(dev, "-");
+       /* Read the ARP cache entries. */
+-      for (; fgets(line, sizeof(line), fp);) {
+-          num = sscanf(line, "%s 0x%x 0x%x %100s %100s %100s\n",
+-                       ip, &type, &flags, hwa, mask, dev);
+-          if (num < 4)
++      for (num = 0; num < entries; num++) {
++          fgets(line, sizeof(line), fp);
++          if (sscanf(line, "%s 0x%x 0x%x %100s %100s %100s\n",
++                       ip, &type, &flags, hwa, mask, dev) < 4)
+               break;
+-          entries++;
+           /* if the user specified hw-type differs, skip it */
+           if (hw_set && (type != hw->type))
+               continue;
diff --git a/packaging/net-tools-1.60-gcc33.patch b/packaging/net-tools-1.60-gcc33.patch
new file mode 100644 (file)
index 0000000..a6ae422
--- /dev/null
@@ -0,0 +1,31 @@
+--- net-tools-1.60/mii-tool.c.gcc33    2003-05-22 23:34:06.000000000 -0400
++++ net-tools-1.60/mii-tool.c  2003-05-22 23:34:57.000000000 -0400
+@@ -378,17 +378,17 @@
+ /*--------------------------------------------------------------------*/
+-const char *usage =
+-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
+-       -V, --version               display version information
+-       -v, --verbose               more verbose output
+-       -R, --reset                 reset MII to poweron state
+-       -r, --restart               restart autonegotiation
+-       -w, --watch                 monitor for link status changes
+-       -l, --log                   with -w, write events to syslog
+-       -A, --advertise=media,...   advertise only specified media
+-       -F, --force=media           force specified media technology
+-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
++const char *usage = "\
++usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n\
++       -V, --version               display version information\n\
++       -v, --verbose               more verbose output\n\
++       -R, --reset                 reset MII to poweron state\n\
++       -r, --restart               restart autonegotiation\n\
++       -w, --watch                 monitor for link status changes\n\
++       -l, --log                   with -w, write events to syslog\n\
++       -A, --advertise=media,...   advertise only specified media\n\
++       -F, --force=media           force specified media technology\n\
++media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n\
+        (to advertise both HD and FD) 100baseTx, 10baseT\n";
+ int main(int argc, char **argv)
diff --git a/packaging/net-tools-1.60-gcc34.patch b/packaging/net-tools-1.60-gcc34.patch
new file mode 100644 (file)
index 0000000..5f700c1
--- /dev/null
@@ -0,0 +1,36 @@
+--- net-tools-1.60/lib/inet_sr.c.gcc34 2000-02-20 22:46:45.000000000 +0100
++++ net-tools-1.60/lib/inet_sr.c       2004-03-30 15:57:25.276049571 +0200
+@@ -105,6 +105,7 @@
+     case 2:
+        isnet = 0; break;
+     default:
++       ;
+     }
+     /* Fill in the other fields. */
+--- net-tools-1.60/hostname.c.gcc34    2004-03-30 15:58:12.979830341 +0200
++++ net-tools-1.60/hostname.c  2004-03-30 15:58:47.110380585 +0200
+@@ -98,6 +98,7 @@
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
++      ;
+       }
+       exit(1);
+     };
+@@ -117,6 +118,7 @@
+           fprintf(stderr, _("%s: name too long\n"), program_name);
+           break;
+       default:
++        ;
+       }
+       exit(1);
+     };
+@@ -180,6 +182,7 @@
+       printf("%s\n", hp->h_name);
+       break;
+     default:
++    ;
+     }
+ }
diff --git a/packaging/net-tools-1.60-hostname_man.patch b/packaging/net-tools-1.60-hostname_man.patch
new file mode 100644 (file)
index 0000000..84a4051
--- /dev/null
@@ -0,0 +1,35 @@
+--- net-tools-1.60/man/en_US/hostname.1.gethostbyname  2005-10-14 11:33:41.000000000 +0200
++++ net-tools-1.60/man/en_US/hostname.1        2005-10-15 11:46:14.646697600 +0200
+@@ -99,6 +99,32 @@
+ complete FQDN of the system is returned with
+ .BR "hostname \-\-fqdn" .
++.LP
++The function 
++.BR gethostname(2)
++is used to get the hostname.  Only when the 
++.BR "hostname \-s" 
++is called will 
++.BR gethostbyname(3)
++be called.  The difference in 
++.BR gethostname(2)
++and
++.BR gethostbyname(3)
++is that
++.BR gethostbyname(3)
++is network aware, so it consults 
++.IR /etc/nsswitch.conf
++and
++.IR /etc/host.conf
++to decide whether to read information in
++.IR /etc/sysconfig/network
++or
++.IR /etc/hosts
++. To add another dimension to this,
++the 
++.B hostname 
++is also set when the network interface is brought up.
++
+ .SS "SET NAME"
+ When called with one argument or with the 
+ .B \-\-file
diff --git a/packaging/net-tools-1.60-i-option.patch b/packaging/net-tools-1.60-i-option.patch
new file mode 100644 (file)
index 0000000..3534202
--- /dev/null
@@ -0,0 +1,57 @@
+--- net-tools-1.60/netstat.c.i-option  2008-07-10 10:56:29.000000000 +0200
++++ net-tools-1.60/netstat.c   2008-07-10 13:46:27.000000000 +0200
+@@ -2042,7 +2042,7 @@ static void usage(void)
+     fprintf(stderr, _("       netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
+     fprintf(stderr, _("        -r, --route                display routing table\n"));
+-    fprintf(stderr, _("        -I, --interface=[<Iface>] display interface table for <Iface>\n"));
++    fprintf(stderr, _("        -I, --interfaces=<Iface>   display interface table for <Iface>\n"));
+     fprintf(stderr, _("        -i, --interfaces           display interface table\n"));
+     fprintf(stderr, _("        -g, --groups               display multicast group memberships\n"));
+     fprintf(stderr, _("        -s, --statistics           display networking statistics (like SNMP)\n"));
+@@ -2085,7 +2085,6 @@ int main
+       AFTRANS_OPTS,
+       {"version", 0, 0, 'V'},
+       {"interfaces", 2, 0, 'I'},
+-      {"interfaces", 0, 0, 'i'},
+       {"help", 0, 0, 'h'},
+       {"route", 0, 0, 'r'},
+ #if HAVE_FW_MASQUERADE
+@@ -2173,10 +2172,6 @@ int main
+               if (optarg[0] == '=') optarg++;
+             if (optarg && strcmp(optarg, "(null)")) 
+               flag_int_name = strdup(optarg);
+-            else {
+-              usage();
+-              exit(1);
+-            }
+           flag_int++;
+           break;
+       case 'i':
+--- net-tools-1.60/man/en_US/netstat.8.i-option        2008-07-10 13:55:04.000000000 +0200
++++ net-tools-1.60/man/en_US/netstat.8 2008-07-15 12:21:51.000000000 +0200
+@@ -43,10 +43,10 @@ netstat \- Print network connections, ro
+ .RB [delay]
+ .P
+ .B netstat
+-.RB { \-\-interfaces | \-i }
++.RB { \-\-interfaces | \-I | \-i } 
+ .RI [ iface ]
+ .RB [ \-\-all | \-a ]
+-.RB [ \-\-extend | \-e  [ \-\-extend | \-e] ]
++.RB [ \-\-extend | \-e  ]
+ .RB [ \-\-verbose | \-v ]
+ .RB [ \-\-program | \-p ]
+ .RB [ \-\-numeric | \-n ]
+@@ -107,9 +107,8 @@ families will be printed.
+ Display the kernel routing tables.
+ .SS "\-\-groups , \-g"
+ Display multicast group membership information for IPv4 and IPv6.
+-.SS "\-\-interface=\fIiface \fR, \fB\-i"
+-Display a table of all network interfaces, or the specified
+-.IR iface ) .
++.SS "\-\-interfaces=\fIiface \fR, \fB\-I=\fIiface \fR, \fB\-i"
++Display a table of all network interfaces, or the specified \fIiface\fR.
+ .SS "\-\-masquerade , \-M"
+ Display a list of masqueraded connections.
+ .SS "\-\-statistics , \-s"
diff --git a/packaging/net-tools-1.60-ifaceopt.patch b/packaging/net-tools-1.60-ifaceopt.patch
new file mode 100644 (file)
index 0000000..a561d07
--- /dev/null
@@ -0,0 +1,52 @@
+--- net-tools-1.60/netstat.c.ifaceopt  2005-03-01 12:11:43.695661632 +0100
++++ net-tools-1.60/netstat.c   2005-03-01 12:16:37.601981080 +0100
+@@ -1658,10 +1658,11 @@
+ {
+     fprintf(stderr, _("usage: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}\n"));
+     fprintf(stderr, _("       netstat [-vnNcaeol] [<Socket> ...]\n"));
+-    fprintf(stderr, _("       netstat { [-veenNac] -i[<Iface>] | [-cnNe] -M | -s } [delay]\n\n"));
++    fprintf(stderr, _("       netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
+     fprintf(stderr, _("        -r, --route                display routing table\n"));
+-    fprintf(stderr, _("        -i, --interfaces=[<Iface>] display interface table\n"));
++    fprintf(stderr, _("        -I, --interfaces=[<Iface>] display interface table for <Iface>\n"));
++    fprintf(stderr, _("        -i, --interfaces           display interface table\n"));
+     fprintf(stderr, _("        -g, --groups               display multicast group memberships\n"));
+     fprintf(stderr, _("        -s, --statistics           display networking statistics (like SNMP)\n"));
+ #if HAVE_FW_MASQUERADE
+@@ -1700,7 +1701,8 @@
+     {
+       AFTRANS_OPTS,
+       {"version", 0, 0, 'V'},
+-      {"interfaces", 2, 0, 'i'},
++      {"interfaces", 2, 0, 'I'},
++      {"interfaces", 0, 0, 'i'},
+       {"help", 0, 0, 'h'},
+       {"route", 0, 0, 'r'},
+ #if HAVE_FW_MASQUERADE
+@@ -1738,7 +1740,8 @@
+     getroute_init();          /* Set up AF routing support */
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphi::nNorstuVv?wxl", longopts, &lop)) != EOF)
++
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxl", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+@@ -1779,11 +1782,14 @@
+       case 'p':
+           flag_prg++;
+           break;
+-      case 'i':
++      case 'I':
+             if (optarg && strcmp(optarg, "(null)"))
+                 flag_int_name = strdup(optarg);
+           flag_int++;
+           break;
++      case 'i':
++              flag_int++;
++          break;
+       case 'n':
+           flag_not |= FLAG_NUM;
+           break;
diff --git a/packaging/net-tools-1.60-ifconfig-long-iface-crasher.patch b/packaging/net-tools-1.60-ifconfig-long-iface-crasher.patch
new file mode 100644 (file)
index 0000000..87fcc5d
--- /dev/null
@@ -0,0 +1,36 @@
+diff -Naurp net-tools-1.60-ifconfig-new/lib/interface.c net-tools-1.60-ifconfig/lib/interface.c
+--- net-tools-1.60-ifconfig-new/lib/interface.c        2006-03-23 07:02:48.000000000 +0100
++++ net-tools-1.60-ifconfig/lib/interface.c    2006-03-23 09:58:45.000000000 +0100
+@@ -203,6 +203,7 @@ out:
+ static char *get_name(char **namep, char *p)
+ {
++    int count = 0;    
+     while (isspace(*p))
+       p++;
+     char *name = *namep = p;
+@@ -211,8 +212,13 @@ static char *get_name(char **namep, char
+       if (*p == ':') {        /* could be an alias */
+           char *dot = p, *dotname = name;
+           *name++ = *p++;
+-          while (isdigit(*p))
++          count++;
++          while (isdigit(*p)){
+               *name++ = *p++;
++              count++;
++              if (count == (IFNAMSIZ-1))
++                    break;
++          }
+           if (*p != ':') {    /* it wasn't, backup */
+               p = dot;
+               name = dotname;
+@@ -223,6 +229,9 @@ static char *get_name(char **namep, char
+           break;
+       }
+       *name++ = *p++;
++      count++;
++      if (count == (IFNAMSIZ-1))
++            break;
+     }
+     *name++ = '\0';
+     return p;
diff --git a/packaging/net-tools-1.60-ifconfig.patch b/packaging/net-tools-1.60-ifconfig.patch
new file mode 100644 (file)
index 0000000..a209bd4
--- /dev/null
@@ -0,0 +1,107 @@
+--- net-tools-1.60/ifconfig.c.new      2005-07-20 12:47:29.000000000 +0200
++++ net-tools-1.60/ifconfig.c  2005-07-20 12:54:57.000000000 +0200
+@@ -175,6 +175,32 @@
+     return (0);
+ }
++/** test is a specified flag is set */
++static int test_flag(char *ifname, short flags)
++{
++    struct ifreq ifr;
++    int fd;
++
++    if (strchr(ifname, ':')) {
++        /* This is a v4 alias interface.  Downing it via a socket for
++         another AF may have bad consequences. */
++        fd = get_socket_for_af(AF_INET);
++      if (fd < 0) {
++          fprintf(stderr, _("No support for INET on this system.\n"));
++          return -1;
++      }
++    } else
++        fd = skfd;
++
++    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
++    if (ioctl(fd, SIOCGIFFLAGS, &ifr) < 0) {
++      fprintf(stderr, _("%s: ERROR while testing interface flags: %s\n"), 
++              ifname, strerror(errno));
++      return -1;
++    }
++    return (ifr.ifr_flags & flags);
++}
++
+ static void usage(void)
+ {
+     fprintf(stderr, _("Usage:\n  ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]\n"));
+@@ -249,7 +275,7 @@
+                       err = 1;
+       }
+     }
+-    return 0;
++    return err;
+ }
+ int main(int argc, char **argv)
+@@ -415,6 +441,8 @@
+       }
+       if (!strcmp(*spp, "-promisc")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_PROMISC);
++          if (test_flag(ifr.ifr_name, IFF_PROMISC) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in promisc mode... maybe other application is running?\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
+@@ -425,6 +453,8 @@
+       }
+       if (!strcmp(*spp, "-multicast")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_MULTICAST);
++          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in MULTICAST mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
+@@ -435,6 +465,8 @@
+       }
+       if (!strcmp(*spp, "-allmulti")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_ALLMULTI);
++          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in ALLMULTI mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
+@@ -456,6 +488,8 @@
+       }
+       if (!strcmp(*spp, "-dynamic")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_DYNAMIC);
++          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in DYNAMIC mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
+@@ -513,6 +547,8 @@
+       if (!strcmp(*spp, "-broadcast")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_BROADCAST);
++          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in BROADCAST mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
+@@ -569,7 +605,7 @@
+               continue;
+           }
+           didnetmask++;
+-          goterr = set_netmask(ap->fd, &ifr, &sa, dobcast);
++          goterr |= set_netmask(ap->fd, &ifr, &sa, dobcast);
+           spp++;
+           continue;
+       }
+@@ -640,6 +676,8 @@
+       }
+       if (!strcmp(*spp, "-pointopoint")) {
+           goterr |= clr_flag(ifr.ifr_name, IFF_POINTOPOINT);
++          if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0)
++              fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name);
+           spp++;
+           continue;
+       }
diff --git a/packaging/net-tools-1.60-ifconfig_ib.patch b/packaging/net-tools-1.60-ifconfig_ib.patch
new file mode 100644 (file)
index 0000000..b5a234f
--- /dev/null
@@ -0,0 +1,202 @@
+--- net-tools-1.60/config.in.ifconfig_ib       2000-05-21 16:32:12.000000000 +0200
++++ net-tools-1.60/config.in   2005-02-09 10:36:26.000000000 +0100
+@@ -82,6 +82,7 @@
+ bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB n
+ bool 'IrDA support' HAVE_HWIRDA y
+ bool 'Econet hardware support' HAVE_HWEC n
++bool 'InfiniBand hardware support' HAVE_HWIB y
+ *
+ *
+ *           Other Features.
+--- net-tools-1.60/lib/hw.c.ifconfig_ib        2000-05-20 20:27:25.000000000 +0200
++++ net-tools-1.60/lib/hw.c    2005-02-09 10:36:26.000000000 +0100
+@@ -73,6 +73,8 @@
+ extern struct hwtype ec_hwtype;
++extern struct hwtype ib_hwtype;
++
+ static struct hwtype *hwtypes[] =
+ {
+@@ -144,6 +146,9 @@
+ #if HAVE_HWX25
+     &x25_hwtype,
+ #endif
++#if HAVE_HWIB
++    &ib_hwtype,
++#endif
+     &unspec_hwtype,
+     NULL
+ };
+@@ -217,6 +222,9 @@
+ #if HAVE_HWEC
+     ec_hwtype.title = _("Econet");
+ #endif
++#if HAVE_HWIB
++    ib_hwtype.title = _("InfiniBand");
++#endif
+     sVhwinit = 1;
+ }
+--- net-tools-1.60/lib/ib.c.ifconfig_ib        2005-02-09 10:36:26.000000000 +0100
++++ net-tools-1.60/lib/ib.c    2005-02-09 10:42:21.000000000 +0100
+@@ -0,0 +1,147 @@
++/*
++ * lib/ib.c        This file contains an implementation of the "Infiniband"
++ *              support functions.
++ *
++ * Version:     $Id: ib.c,v 1.1 2005/02/06 11:00:47 tduffy Exp $
++ *
++ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
++ *              Copyright 1993 MicroWalt Corporation
++ *             Tom Duffy <tduffy@sun.com>
++ *
++ *              This program is free software; you can redistribute it
++ *              and/or  modify it under  the terms of  the GNU General
++ *              Public  License as  published  by  the  Free  Software
++ *              Foundation;  either  version 2 of the License, or  (at
++ *              your option) any later version.
++ */
++#include "config.h"
++
++#if HAVE_HWIB
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <net/if_arp.h>
++/*#include <linux/if_infiniband.h> - not in gcc-kernheaders*/
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <ctype.h>
++#include <string.h>
++#include <unistd.h>
++#include "net-support.h"
++#include "pathnames.h"
++#include "intl.h"
++#include "util.h"
++
++extern struct hwtype ib_hwtype;
++
++#define INFINIBAND_ALEN         20
++
++/* Display an InfiniBand address in readable format. */
++static char *pr_ib(unsigned char *ptr)
++{
++    static char buff[128];
++    char *pos;
++    unsigned int i;
++
++    pos = buff;
++    for (i = 0; i < INFINIBAND_ALEN; i++) {
++      pos += sprintf(pos, "%02X:", (*ptr++ & 0377));
++    }
++    buff[strlen(buff) - 1] = '\0';
++
++    /* 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)
++      );
++    */
++    return (buff);
++}
++
++
++/* Input an Infiniband address and convert to binary. */
++static int in_ib(char *bufp, struct sockaddr *sap)
++{
++    unsigned char *ptr;
++    char c, *orig;
++    int i;
++    unsigned val;
++
++    sap->sa_family = ib_hwtype.type;
++    ptr = sap->sa_data;
++
++    i = 0;
++    orig = bufp;
++    while ((*bufp != '\0') && (i < INFINIBAND_ALEN)) {
++      val = 0;
++      c = *bufp++;
++      if (isdigit(c))
++          val = c - '0';
++      else if (c >= 'a' && c <= 'f')
++          val = c - 'a' + 10;
++      else if (c >= 'A' && c <= 'F')
++          val = c - 'A' + 10;
++      else {
++#ifdef DEBUG
++          fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
++#endif
++          errno = EINVAL;
++          return (-1);
++      }
++      val <<= 4;
++      c = *bufp;
++      if (isdigit(c))
++          val |= c - '0';
++      else if (c >= 'a' && c <= 'f')
++          val |= c - 'a' + 10;
++      else if (c >= 'A' && c <= 'F')
++          val |= c - 'A' + 10;
++      else if (c == ':' || c == 0)
++          val >>= 4;
++      else {
++#ifdef DEBUG
++          fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig);
++#endif
++          errno = EINVAL;
++          return (-1);
++      }
++      if (c != 0)
++          bufp++;
++      *ptr++ = (unsigned char) (val & 0377);
++      i++;
++
++      /* We might get a semicolon here - not required. */
++      if (*bufp == ':') {
++          if (i == INFINIBAND_ALEN) {
++#ifdef DEBUG
++              fprintf(stderr, _("in_ib(%s): trailing : ignored!\n"),
++                      orig)
++#endif
++                  ;           /* nothing */
++          }
++          bufp++;
++      }
++    }
++
++    /* That's it.  Any trailing junk? */
++    if ((i == INFINIBAND_ALEN) && (*bufp != '\0')) {
++#ifdef DEBUG
++      fprintf(stderr, _("in_ib(%s): trailing junk!\n"), orig);
++      errno = EINVAL;
++      return (-1);
++#endif
++    }
++#ifdef DEBUG
++    fprintf(stderr, "in_ib(%s): %s\n", orig, pr_ib(sap->sa_data));
++#endif
++
++    return (0);
++}
++
++
++struct hwtype ib_hwtype =
++{
++    "infiniband", NULL, ARPHRD_INFINIBAND, INFINIBAND_ALEN,
++    pr_ib, in_ib, NULL
++};
++
++#endif /* HAVE_HWIB */
+--- net-tools-1.60/lib/Makefile.ifconfig_ib    2000-10-28 12:59:42.000000000 +0200
++++ net-tools-1.60/lib/Makefile        2005-02-09 10:36:26.000000000 +0100
+@@ -16,7 +16,7 @@
+ #
+-HWOBJS         = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o
++HWOBJS         = hw.o loopback.o slip.o ether.o ax25.o ppp.o arcnet.o tr.o tunnel.o frame.o sit.o rose.o ash.o fddi.o hippi.o hdlclapb.o strip.o irda.o ec_hw.o x25.o ib.o
+ AFOBJS         = unix.o inet.o inet6.o ax25.o ipx.o ddp.o ipx.o netrom.o af.o rose.o econet.o x25.o
+ AFGROBJS = inet_gr.o inet6_gr.o ipx_gr.o ddp_gr.o netrom_gr.o ax25_gr.o rose_gr.o getroute.o x25_gr.o
+ AFSROBJS = inet_sr.o inet6_sr.o netrom_sr.o ipx_sr.o setroute.o x25_sr.o
diff --git a/packaging/net-tools-1.60-ifconfig_man.patch b/packaging/net-tools-1.60-ifconfig_man.patch
new file mode 100644 (file)
index 0000000..f3509da
--- /dev/null
@@ -0,0 +1,14 @@
+--- net-tools-1.60/man/en_US/ifconfig.8.addr_man       2006-03-30 12:32:56.000000000 +0200
++++ net-tools-1.60/man/en_US/ifconfig.8        2006-03-30 12:38:43.000000000 +0200
+@@ -39,6 +39,11 @@
+ (Novell IPX) and
+ .B netrom
+ (AMPR Packet radio).
++All numbers supplied as parts in IPv4 dotted decimal notation may be decimal,
++octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x
++or 0X implies hexadecimal; otherwise, a leading '0' implies octal; otherwise,
++the number is interpreted as decimal). Use of hexamedial and octal numbers
++is not RFC-compliant and therefore its use is discouraged and may go away.
+ .SH OPTIONS
+ .TP
+ .B interface
diff --git a/packaging/net-tools-1.60-inet6-lookup.patch b/packaging/net-tools-1.60-inet6-lookup.patch
new file mode 100644 (file)
index 0000000..3d4854a
--- /dev/null
@@ -0,0 +1,81 @@
+--- net-tools-1.60/lib/inet6.c.inet6-lookup    2000-10-28 13:04:00.000000000 +0200
++++ net-tools-1.60/lib/inet6.c 2003-05-21 15:28:50.000000000 +0200
+@@ -133,28 +133,9 @@
+ }
+-static int INET6_getsock(char *bufp, struct sockaddr *sap)
+-{
+-    struct sockaddr_in6 *sin6;
+-
+-    sin6 = (struct sockaddr_in6 *) sap;
+-    sin6->sin6_family = AF_INET6;
+-    sin6->sin6_port = 0;
+-
+-    if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0)
+-      return (-1);
+-
+-    return 16;                        /* ?;) */
+-}
+-
+ static int INET6_input(int type, char *bufp, struct sockaddr *sap)
+ {
+-    switch (type) {
+-    case 1:
+-      return (INET6_getsock(bufp, sap));
+-    default:
+-      return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
+-    }
++    return (INET6_resolve(bufp, (struct sockaddr_in6 *) sap));
+ }
+--- net-tools-1.60/lib/inet6_gr.c.inet6-lookup 2001-04-01 16:48:06.000000000 +0200
++++ net-tools-1.60/lib/inet6_gr.c      2003-05-21 15:28:50.000000000 +0200
+@@ -100,7 +100,7 @@
+                addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
+       inet6_aftype.input(1, addr6, (struct sockaddr *) &saddr6);
+       snprintf(addr6, sizeof(addr6), "%s/%d",
+-               inet6_aftype.sprint((struct sockaddr *) &saddr6, 1),
++               inet6_aftype.sprint((struct sockaddr *) &saddr6, numeric),
+                prefix_len);
+       /* Fetch and resolve the nexthop address. */
+@@ -109,7 +109,7 @@
+                naddr6p[4], naddr6p[5], naddr6p[6], naddr6p[7]);
+       inet6_aftype.input(1, naddr6, (struct sockaddr *) &snaddr6);
+       snprintf(naddr6, sizeof(naddr6), "%s",
+-               inet6_aftype.sprint((struct sockaddr *) &snaddr6, 1));
++               inet6_aftype.sprint((struct sockaddr *) &snaddr6, numeric));
+       /* Decode the flags. */
+       strcpy(flags, "U");
+--- net-tools-1.60/lib/inet6_sr.c.inet6-lookup 2000-05-22 23:18:37.000000000 +0200
++++ net-tools-1.60/lib/inet6_sr.c      2003-05-21 15:28:50.000000000 +0200
+@@ -63,7 +63,7 @@
+     if (*args == NULL)
+       return (usage());
+-    strcpy(target, *args++);
++    safe_strncpy(target, *args++, sizeof(target));
+     if (!strcmp(target, "default")) {
+         prefix_len = 0;
+       memset(&sa6, 0, sizeof(sa6));
+@@ -112,7 +112,7 @@
+               return (usage());
+           if (rt.rtmsg_flags & RTF_GATEWAY)
+               return (usage());
+-          strcpy(gateway, *args);
++          safe_strncpy(gateway, *args, sizeof(gateway));
+           if (inet6_aftype.input(1, gateway,
+                                  (struct sockaddr *) &sa6) < 0) {
+               inet6_aftype.herror(gateway);
+@@ -152,7 +152,7 @@
+     }
+     if (devname) {
+       memset(&ifr, 0, sizeof(ifr));
+-      strcpy(ifr.ifr_name, devname);
++      safe_strncpy(ifr.ifr_name, devname, sizeof(ifr.ifr_name));
+       if (ioctl(skfd, SIOGIFINDEX, &ifr) < 0) {
+           perror("SIOGIFINDEX");
diff --git a/packaging/net-tools-1.60-interface.patch b/packaging/net-tools-1.60-interface.patch
new file mode 100644 (file)
index 0000000..3a1bc91
--- /dev/null
@@ -0,0 +1,110 @@
+--- net-tools-1.60/netstat.c.interface 2003-08-25 17:06:30.000000000 +0200
++++ net-tools-1.60/netstat.c   2003-08-25 17:08:41.000000000 +0200
+@@ -129,6 +129,7 @@
+ #define E_IOCTL -3
+ int flag_int = 0;
++char *flag_int_name = NULL;
+ int flag_rou = 0;
+ int flag_mas = 0;
+ int flag_sta = 0;
+@@ -1441,6 +1442,7 @@
+ static int iface_info(void)
+ {
+     static int count=0;
++    struct interface *ife = NULL;
+     if (skfd < 0) {
+       if ((skfd = sockets_open(0)) < 0) {
+@@ -1455,7 +1457,11 @@
+           printf(_("Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+     }
+-    if (for_all_interfaces(do_if_print, &flag_all) < 0) {
++    if (flag_int_name) {
++        ife = lookup_interface(flag_int_name);
++        do_if_print(ife, &flag_all);
++    }
++    else if (for_all_interfaces(do_if_print, &flag_all) < 0) {
+       perror(_("missing interface information"));
+       exit(1);
+     }
+@@ -1481,30 +1487,31 @@
+ {
+     fprintf(stderr, _("usage: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}\n"));
+     fprintf(stderr, _("       netstat [-vnNcaeol] [<Socket> ...]\n"));
+-    fprintf(stderr, _("       netstat { [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
++    fprintf(stderr, _("       netstat { [-veenNac] -i[<Iface>] | [-cnNe] -M | -s } [delay]\n\n"));
+-    fprintf(stderr, _("        -r, --route              display routing table\n"));
+-    fprintf(stderr, _("        -i, --interfaces         display interface table\n"));
+-    fprintf(stderr, _("        -g, --groups             display multicast group memberships\n"));
+-    fprintf(stderr, _("        -s, --statistics         display networking statistics (like SNMP)\n"));
++    fprintf(stderr, _("        -r, --route                display routing table\n"));
++    fprintf(stderr, _("        -i, --interfaces=[<Iface>] display interface table\n"));
++    fprintf(stderr, _("        -g, --groups               display multicast group memberships\n"));
++    fprintf(stderr, _("        -s, --statistics           display networking statistics (like SNMP)\n"));
+ #if HAVE_FW_MASQUERADE
+-    fprintf(stderr, _("        -M, --masquerade         display masqueraded connections\n\n"));
++    fprintf(stderr, _("        -M, --masquerade           display masqueraded connections\n\n"));
+ #endif
+-    fprintf(stderr, _("        -v, --verbose            be verbose\n"));
+-    fprintf(stderr, _("        -n, --numeric            don't resolve names\n"));
+-    fprintf(stderr, _("        --numeric-hosts          don't resolve host names\n"));
+-    fprintf(stderr, _("        --numeric-ports          don't resolve port names\n"));
+-    fprintf(stderr, _("        --numeric-users          don't resolve user names\n"));
+-    fprintf(stderr, _("        -N, --symbolic           resolve hardware names\n"));
+-    fprintf(stderr, _("        -e, --extend             display other/more information\n"));
+-    fprintf(stderr, _("        -p, --programs           display PID/Program name for sockets\n"));
+-    fprintf(stderr, _("        -c, --continuous         continuous listing\n\n"));
+-    fprintf(stderr, _("        -l, --listening          display listening server sockets\n"));
+-    fprintf(stderr, _("        -a, --all, --listening   display all sockets (default: connected)\n"));
+-    fprintf(stderr, _("        -o, --timers             display timers\n"));
+-    fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
+-    fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
++    fprintf(stderr, _("        -v, --verbose              be verbose\n"));
++    fprintf(stderr, _("        -n, --numeric              don't resolve names\n"));
++    fprintf(stderr, _("        --numeric-hosts            don't resolve host names\n"));
++    fprintf(stderr, _("        --numeric-ports            don't resolve port names\n"));
++    fprintf(stderr, _("        --numeric-users            don't resolve user names\n"));
++    fprintf(stderr, _("        -N, --symbolic             resolve hardware names\n"));
++    fprintf(stderr, _("        -e, --extend               display other/more information\n"));
++    fprintf(stderr, _("        -p, --programs             display PID/Program name for sockets\n"));
++    fprintf(stderr, _("        -c, --continuous           continuous listing\n\n"));
++    fprintf(stderr, _("        -l, --listening            display listening server sockets\n"));
++    fprintf(stderr, _("        -a, --all, --listening     display all sockets (default: connected)\n"));
++    fprintf(stderr, _("        -o, --timers               display timers\n"));
++    fprintf(stderr, _("        -F, --fib                  display Forwarding Information Base (default)\n"));
++    fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n\n"));
++    fprintf(stderr, _("  <Iface>: Name of interface to monitor/list.\n"));
+     fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+     fprintf(stderr, _("  <AF>=Use '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+     fprintf(stderr, _("  List of possible address families (which support routing):\n"));
+@@ -1522,7 +1529,7 @@
+     {
+       AFTRANS_OPTS,
+       {"version", 0, 0, 'V'},
+-      {"interfaces", 0, 0, 'i'},
++      {"interfaces", 2, 0, 'i'},
+       {"help", 0, 0, 'h'},
+       {"route", 0, 0, 'r'},
+ #if HAVE_FW_MASQUERADE
+@@ -1560,7 +1567,7 @@
+     getroute_init();          /* Set up AF routing support */
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuVv?wxl", longopts, &lop)) != EOF)
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphi::nNorstuVv?wxl", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+@@ -1602,6 +1609,8 @@
+           flag_prg++;
+           break;
+       case 'i':
++            if (optarg && strcmp(optarg, "(null)"))
++                flag_int_name = strdup(optarg);
+           flag_int++;
+           break;
+       case 'n':
diff --git a/packaging/net-tools-1.60-interface_stack.patch b/packaging/net-tools-1.60-interface_stack.patch
new file mode 100644 (file)
index 0000000..c16f539
--- /dev/null
@@ -0,0 +1,115 @@
+Bugzilla Bug 176714 – *** stack smashing detected ***: /sbin/ifconfig terminated
+
+--- lib/interface.c-old        2005-12-30 11:08:15.000000000 -0800
++++ lib/interface.c    2005-12-30 11:17:02.000000000 -0800
+@@ -201,10 +201,11 @@
+     return err;
+ }
+-static char *get_name(char *name, char *p)
++static char *get_name(char **namep, char *p)
+ {
+     while (isspace(*p))
+       p++;
++    char *name = *namep = p;
+     while (*p) {
+       if (isspace(*p))
+           break;
+@@ -305,9 +306,10 @@
+ {
+     static int proc_read; 
+     FILE *fh;
+-    char buf[512];
+     struct interface *ife;
+     int err;
++    char *line = NULL;
++    size_t linelen = 0;
+     if (proc_read) 
+           return 0; 
+@@ -320,8 +322,11 @@
+                       _PATH_PROCNET_DEV, strerror(errno)); 
+               return if_readconf();
+       }       
+-    fgets(buf, sizeof buf, fh);       /* eat line */
+-    fgets(buf, sizeof buf, fh);
++    if (getline(&line, &linelen, fh) == -1 /* eat line */
++      || getline(&line, &linelen, fh) == -1) {
++              err = -1;
++              goto out;
++    }
+ #if 0                         /* pretty, but can't cope with missing fields */
+     fmt = proc_gen_fmt(_PATH_PROCNET_DEV, 1, fh,
+@@ -346,13 +351,13 @@
+     if (!fmt)
+       return -1;
+ #else
+-    procnetdev_vsn = procnetdev_version(buf);
++    procnetdev_vsn = procnetdev_version(line);
+ #endif
+     err = 0;
+-    while (fgets(buf, sizeof buf, fh)) {
+-      char *s, name[IFNAMSIZ];
+-      s = get_name(name, buf);    
++    while (getline(&line, &linelen, fh) != -1) {
++      char *s, *name;
++      s = get_name(&name, line);    
+       ife = add_interface(name);
+       get_dev_fields(s, ife);
+       ife->statistics_valid = 1;
+@@ -368,6 +373,8 @@
+ #if 0
+     free(fmt);
+ #endif
++  out:
++    free(line);
+     fclose(fh);
+     return err;
+ }
+@@ -376,8 +383,9 @@
+ static int if_readlist_rep(char *target, struct interface *ife)
+ {
+     FILE *fh;
+-    char buf[512];
+     int err;
++    char *line = NULL;
++    size_t linelen = 0;
+     fh = fopen(_PATH_PROCNET_DEV, "r");
+     if (!fh) {
+@@ -385,15 +393,18 @@
+                       _PATH_PROCNET_DEV, strerror(errno)); 
+               return if_readconf();
+       }       
+-    fgets(buf, sizeof buf, fh);       /* eat line */
+-    fgets(buf, sizeof buf, fh);
++    if (getline(&line, &linelen, fh) == -1 /* eat line */
++      || getline(&line, &linelen, fh) == -1) {
++              err = -1;
++              goto out;
++    }
+-    procnetdev_vsn = procnetdev_version(buf);
++    procnetdev_vsn = procnetdev_version(line);
+     err = 0;
+-    while (fgets(buf, sizeof buf, fh)) {
+-      char *s, name[IFNAMSIZ];
+-      s = get_name(name, buf);    
++    while (getline(&line, &linelen, fh) != -1) {
++      char *s, *name;
++      s = get_name(&name, line);    
+       get_dev_fields(s, ife);
+       if (target && !strcmp(target,name))
+       {
+@@ -406,6 +417,8 @@
+       err = -1;
+     }
++  out:
++    free(line);
+     fclose(fh);
+     return err;
+ }
diff --git a/packaging/net-tools-1.60-ip.patch b/packaging/net-tools-1.60-ip.patch
new file mode 100644 (file)
index 0000000..09ac217
--- /dev/null
@@ -0,0 +1,14 @@
+Index: net-tools-1.60/iptunnel.c
+===================================================================
+--- net-tools-1.60.orig/iptunnel.c
++++ net-tools-1.60/iptunnel.c
+@@ -25,8 +25,8 @@
+ #include <fcntl.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
++#include <linux/ip.h>
+ #include <netinet/in.h>
+-#include <netinet/ip.h>
+ #include <arpa/inet.h>
+ #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
+ #include <net/if.h>
diff --git a/packaging/net-tools-1.60-ipx.patch b/packaging/net-tools-1.60-ipx.patch
new file mode 100644 (file)
index 0000000..d4458b9
--- /dev/null
@@ -0,0 +1,36 @@
+diff -urN net-tools-1.60/lib/ipx_gr.c net-tools-1.60.new/lib/ipx_gr.c
+--- net-tools-1.60/lib/ipx_gr.c        2000-10-28 12:59:42.000000000 +0200
++++ net-tools-1.60.new/lib/ipx_gr.c    2003-05-20 10:54:37.000000000 +0200
+@@ -64,7 +64,7 @@
+           continue;
+       /* Fetch and resolve the Destination */
+-      (void) ap->input(5, net, &sa);
++      (void) ap->input(1, net, &sa);
+       strcpy(net, ap->sprint(&sa, numeric));
+       /* Fetch and resolve the Router Net */
+diff -urN net-tools-1.60/netstat.c net-tools-1.60.new/netstat.c
+--- net-tools-1.60/netstat.c   2003-05-20 11:00:57.000000000 +0200
++++ net-tools-1.60.new/netstat.c       2003-05-20 10:58:25.000000000 +0200
+@@ -1412,13 +1412,13 @@
+       }
+       /* Fetch and resolve the Source */
+-      (void) ap->input(4, sad, &sa);
++      (void) ap->input(0, sad, &sa);
+       safe_strncpy(buf, ap->sprint(&sa, flag_not), sizeof(buf));
+       snprintf(sad, sizeof(sad), "%s:%04X", buf, sport);
+       if (!nc) {
+           /* Fetch and resolve the Destination */
+-          (void) ap->input(4, dad, &sa);
++          (void) ap->input(0, dad, &sa);
+           safe_strncpy(buf, ap->sprint(&sa, flag_not), sizeof(buf));
+           snprintf(dad, sizeof(dad), "%s:%04X", buf, dport);
+       } else
+diff -urN net-tools-1.60/version.h net-tools-1.60.new/version.h
+--- net-tools-1.60/version.h   1970-01-01 01:00:00.000000000 +0100
++++ net-tools-1.60.new/version.h       2003-05-19 16:07:49.000000000 +0200
+@@ -0,0 +1 @@
++#define RELEASE "net-tools 1.60"
diff --git a/packaging/net-tools-1.60-isofix.patch b/packaging/net-tools-1.60-isofix.patch
new file mode 100644 (file)
index 0000000..4bbaff1
--- /dev/null
@@ -0,0 +1,33 @@
+--- net-tools-1.60/po/de.po.isofix     2000-10-28 12:59:43.000000000 +0200
++++ net-tools-1.60/po/de.po    2005-01-10 11:29:29.407639208 +0100
+@@ -9,7 +9,7 @@
+ "Last-Translator: Ralf Bächle <ralf@gnu.org>\n"
+ "Language-Team:\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=iso8859-1\n"
++"Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ #: ../arp.c:110 ../arp.c:269
+--- net-tools-1.60/po/fr.po.isofix     2000-02-20 22:47:00.000000000 +0100
++++ net-tools-1.60/po/fr.po    2005-01-10 11:29:23.613520048 +0100
+@@ -9,7 +9,7 @@
+ "Last-Translator: J.M.Vansteene <vanstee@worldnet.fr>\n"
+ "Language-Team:\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=iso8859-1\n"
++"Content-Type: text/plain; charset=iso-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ #: ../arp.c:110 ../arp.c:269
+--- net-tools-1.60/po/pt_BR.po.isofix  2000-02-20 22:47:06.000000000 +0100
++++ net-tools-1.60/po/pt_BR.po 2005-01-10 11:29:16.294632688 +0100
+@@ -14,7 +14,7 @@
+ "PO-Revision-Date: 1999-03-01 02:38+0100\n"
+ "Last-Translator: Arnaldo Carvalho de Melo <acme@conectiva.com.br>\n"
+ "MIME-Version: 1.0\n"
+-"Content-Type: text/plain; charset=ISO8859-9\n"
++"Content-Type: text/plain; charset=iso-8859-9\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ #: ../arp.c:110 ../arp.c:269
diff --git a/packaging/net-tools-1.60-man.patch b/packaging/net-tools-1.60-man.patch
new file mode 100644 (file)
index 0000000..2deac4a
--- /dev/null
@@ -0,0 +1,132 @@
+--- net-tools-1.60/man/en_US/ifconfig.8.man    2000-10-28 12:59:42.000000000 +0200
++++ net-tools-1.60/man/en_US/ifconfig.8        2003-05-22 16:58:41.000000000 +0200
+@@ -177,7 +177,7 @@
+ command.
+ .LP
+ Interrupt problems with Ethernet device drivers fail with EAGAIN. See
+-.I http://cesdis.gsfc.nasa.gov/linux/misc/irq-conflict.html
++.I http://www.scyld.com/expert/irq-conflict.html
+ for more information.
+ .SH FILES
+ .I /proc/net/socket 
+--- net-tools-1.60/man/en_US/hostname.1.man    1999-02-27 13:11:14.000000000 +0100
++++ net-tools-1.60/man/en_US/hostname.1        2003-05-22 17:04:30.000000000 +0200
+@@ -10,8 +10,6 @@
+ nisdomainname \- show or set system's NIS/YP domain name
+ .br
+ ypdomainname \- show or set the system's NIS/YP domain name
+-.br
+-nodename \- show or set the system's DECnet node name
+ .SH SYNOPSIS
+ .B hostname
+@@ -96,12 +94,6 @@
+ function. This is also known as the YP/NIS domain name of the system.
+ .LP
+-.B nodename
+-will print the DECnet node name of the system as returned by the
+-.BR getnodename (2)
+-function.
+-
+-.LP
+ .B dnsdomainname
+ will print the domain part of the FQDN (Fully Qualified Domain Name). The
+ complete FQDN of the system is returned with
+@@ -184,11 +176,6 @@
+ .I "\-i, \-\-ip-address"
+ Display the IP address(es) of the host.
+ .TP
+-.I "\-n, \-\-node"
+-Display the DECnet node name. If a parameter is given (or
+-.B \-\-file name
+-) the root can also set a new node name.
+-.TP
+ .I "\-s, \-\-short"
+ Display the short host name. This is the host name cut at the first dot.
+ .TP
+--- net-tools-1.60/man/fr_FR/hostname.1.man    1999-04-18 21:23:46.000000000 +0200
++++ net-tools-1.60/man/fr_FR/hostname.1        2003-05-22 17:05:04.000000000 +0200
+@@ -9,8 +9,6 @@
+ nisdomainname \- affiche ou définit le nom de domaine NIS/YP du système
+ .br
+ ypdomainname \- affiche ou définit le nom de domaine NIS/YP du système
+-.br
+-nodename \- affiche ou définit le nom de domaine DECnet du système
+ .SH SYNOPSIS
+ .B hostname
+@@ -87,14 +85,6 @@
+ .BR getdomainname (2)
+ . Ceci est connu comme nom de domaine YP/NIS du système.
+-
+-.LP
+-.B nodename
+-fournit le nom de noeud DECnet du système tel qu'il est retourné par la
+-fonction
+-.BR getnodename (2)
+-.
+-
+ .LP
+ .B dnsdomainname
+ fournit la partie domaine du nom complètement qualifié - FQDN (Fully
+@@ -180,11 +170,6 @@
+ .I "\-i, \-\-ip-address"
+ Affiche la (les) adresse(s) IP de l'hôte.
+ .TP
+-.I "\-n, \-\-node"
+-Affiche le nom de noeud DECnet. Si un paramètre est fourni (ou
+-.B \-\-file nom_fichier
+-) le super-utilisateur peut également définir un nouveau nom de neud.
+-.TP
+ .I "\-s, \-\-short"
+ Affiche le nom d'hôte en format court. Il s'agit du nom d'hôte coupé au
+ premier point.
+--- net-tools-1.60/man/de_DE/hostname.1.man    1999-03-15 21:31:16.000000000 +0100
++++ net-tools-1.60/man/de_DE/hostname.1        2003-05-22 17:06:01.000000000 +0200
+@@ -15,8 +15,6 @@
+ nisdomainname \- den NIS/YP Domainnamen anzeigen oder setzen
+ .br
+ ypdomainname \- den NIS/YP Domainnamen anzeigen oder setzen
+-.br
+-nodename \- den DECnet-Knotennamen anzeigen oder setzen
+ .SH SYNOPSIS
+ .B hostname
+@@ -101,12 +99,6 @@
+ des Systems genannt.
+ .LP
+-.B nodename
+-druckt den DECnet-Knotennamen des Systems, wie er von der
+-.BR getnodename (2)
+-Function ermittelt wird, aus.
+-
+-.LP
+ .B dnsdomainname
+ druckt den Domainteil des FQDN (Fully Qualified Domain Name oder zu deutsch
+ vollst\(:andig spezifizierter Domainname) aus.  Der vollst\(:andige FQDN
+@@ -117,8 +109,8 @@
+ .SS "NAME SETZEN"
+ Wenn mit nur einem Argument oder mit der
+ .B \-\-file
+-Option aufgerufen, dann setzen diese Kommandos den Rechnernamen, den NIS/YP
+-Domainnamen oder den DECnet-Knotennamen.
++Option aufgerufen, dann setzen diese Kommandos den Rechnernamen oder den NIS/YP
++Domainnamen.
+ .LP
+ Nur der Superuser darf den Namen \(:andern.
+@@ -198,11 +190,6 @@
+ .I "\-i, \-\-ip-address"
+ Die IP-Adresse(n) des Rechners anzeigen und beenden.
+ .TP
+-.I "\-n, \-\-node"
+-Den DECnet-Knotennamen anzeigen.  Wenn ein Argument oder die
+-.B \-\-file name
+-Option angegeben wird, dann kann Root auch einen neuen Knotennamen setzen.
+-.TP
+ .I "\-s, \-\-short"
+ Den Kurznamen anzeigen.  Dies ist der ab dem ersten Punkt abgeschnittene
+ Rechnername.
diff --git a/packaging/net-tools-1.60-manydevs.patch b/packaging/net-tools-1.60-manydevs.patch
new file mode 100644 (file)
index 0000000..d07ffba
--- /dev/null
@@ -0,0 +1,13 @@
+--- lib/nstrcmp.c.bak  Fri Apr 12 00:15:01 2002
++++ lib/nstrcmp.c      Fri Apr 12 00:15:29 2002
+@@ -16,8 +16,8 @@
+       b++;
+     }
+     if (isdigit(*a)) {
+-      if (!isdigit(*b))
+-          return -1;
++        if (!isdigit(*b))
++          return 1;
+       while (a > astr) {
+           a--;
+           if (!isdigit(*a)) {
diff --git a/packaging/net-tools-1.60-metric-tunnel-man.patch b/packaging/net-tools-1.60-metric-tunnel-man.patch
new file mode 100644 (file)
index 0000000..b949f87
--- /dev/null
@@ -0,0 +1,21 @@
+diff -up net-tools-1.60/man/en_US/ifconfig.8.metric-tunnel-man net-tools-1.60/man/en_US/ifconfig.8
+--- net-tools-1.60/man/en_US/ifconfig.8.metric-tunnel-man      2008-09-18 09:20:49.000000000 +0200
++++ net-tools-1.60/man/en_US/ifconfig.8        2008-09-18 09:26:41.000000000 +0200
+@@ -70,7 +70,7 @@ mode.  If selected, all multicast packet
+ received by the interface.
+ .TP
+ .B "metric N"
+-This parameter sets the interface metric.
++This parameter sets the interface metric. It is not available under GNU/Linux.
+ .TP
+ .B "mtu N"
+ This parameter sets the Maximum Transfer Unit (MTU) of an interface.
+@@ -92,7 +92,7 @@ Add an IPv6 address to an interface. 
+ .B "del addr/prefixlen"
+ Remove an IPv6 address from an interface.
+ .TP
+-.B "tunnel aa.bb.cc.dd"
++.B "tunnel ::aa.bb.cc.dd"
+ Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.
+ .TP
+ .B "irq addr"
diff --git a/packaging/net-tools-1.60-mii-tool-obsolete.patch b/packaging/net-tools-1.60-mii-tool-obsolete.patch
new file mode 100644 (file)
index 0000000..efb7f27
--- /dev/null
@@ -0,0 +1,25 @@
+--- net-tools-1.60/man/en_US/mii-tool.8.obsolete       2000-05-21 16:21:38.000000000 +0200
++++ net-tools-1.60/man/en_US/mii-tool.8        2004-11-11 10:45:51.155113000 +0100
+@@ -18,6 +18,12 @@
+ [\fB\-F\fR, \fB\-\-force=\fImedia\fR]
+ .RI [ "interface\ ..." ]
++.SH NOTE
++.P 
++This program is obsolete. Valid media are only \fB100baseT4\fR, 
++\fB100baseTx-FD\fR,\fB100baseTx-HD\fR, \fB10baseT-FD\fR and 
++\fB10baseT-HD\fR ethernet cards. For replacement check \fBethtool\fB.
++
+ .SH DESCRIPTION
+ This utility checks or sets the status of a network interface's Media
+ Independent Interface (MII) unit.  Most fast ethernet adapters use an
+@@ -72,6 +78,9 @@
+ commas.  Valid media are \fB100baseT4\fR, \fB100baseTx-FD\fR,
+ \fB100baseTx-HD\fR, \fB10baseT-FD\fR, and \fB10baseT-HD\fR.
++.SH SEE ALSO
++ethtool(8)
++
+ .SH AUTHORS
+ David Hinds \- dhinds@pcmcia.sourceforge.org
+ .br
diff --git a/packaging/net-tools-1.60-miiioctl.patch b/packaging/net-tools-1.60-miiioctl.patch
new file mode 100644 (file)
index 0000000..4859273
--- /dev/null
@@ -0,0 +1,17 @@
+--- net-tools-1.60/include/mii.h.bar   Tue Jul 31 11:49:39 2001
++++ net-tools-1.60/include/mii.h       Tue Jul 31 11:49:33 2001
+@@ -11,11 +11,9 @@
+ /* network interface ioctl's for MII commands */
+ #ifndef SIOCGMIIPHY
+-#define SIOCGMIIPHY (SIOCDEVPRIVATE)  /* Read from current PHY */
+-#define SIOCGMIIREG (SIOCDEVPRIVATE+1)        /* Read any PHY register */
+-#define SIOCSMIIREG (SIOCDEVPRIVATE+2)        /* Write any PHY register */
+-#define SIOCGPARAMS (SIOCDEVPRIVATE+3)        /* Read operational parameters */
+-#define SIOCSPARAMS (SIOCDEVPRIVATE+4)        /* Set operational parameters */
++#define SIOCGMIIPHY 0x8947    /* Read from current PHY */
++#define SIOCGMIIREG 0x8948    /* Read any PHY register */
++#define SIOCSMIIREG 0x8949    /* Write any PHY register */
+ #endif
+ #include <linux/types.h>
diff --git a/packaging/net-tools-1.60-nameif.patch b/packaging/net-tools-1.60-nameif.patch
new file mode 100644 (file)
index 0000000..7ba1f00
--- /dev/null
@@ -0,0 +1,67 @@
+--- net-tools-1.60/nameif.c.nameif     2000-10-18 19:26:29.000000000 +0200
++++ net-tools-1.60/nameif.c    2003-03-19 11:02:01.000000000 +0100
+@@ -3,7 +3,7 @@
+  * Writen 2000 by Andi Kleen.
+  * Subject to the Gnu Public License, version 2.  
+  * TODO: make it support token ring etc.
+- * $Id: nameif.c,v 1.1 2000/10/18 17:26:29 ak Exp $
++ * $Id: nameif.c,v 1.3 2003/03/06 23:26:52 ecki Exp $
+  */ 
+ #ifndef _GNU_SOURCE 
+ #define _GNU_SOURCE
+@@ -117,7 +117,8 @@
+ }
+ struct change { 
+-      struct change *next,**pprev;
++      struct change *next;
++      int found;
+       char ifname[IFNAMSIZ+1];
+       unsigned char mac[6];
+ }; 
+@@ -139,10 +140,7 @@
+                       ch->ifname, pos); 
+       if (parsemac(p,ch->mac) < 0) 
+               complain(_("cannot parse MAC `%s' at %s"), p, pos); 
+-      if (clist) 
+-              clist->pprev = &ch->next;
+       ch->next = clist;
+-      ch->pprev = &clist;
+       clist = ch;
+       return 0; 
+ }
+@@ -200,7 +198,7 @@
+ void usage(void)
+ {
+-      fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}")); 
++      fprintf(stderr, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n")); 
+       exit(1); 
+ }
+@@ -277,21 +275,21 @@
+               ch = lookupmac(mac); 
+               if (!ch) 
+                       continue;
+-                      
+-              *ch->pprev = ch->next;
++              
++              ch->found = 1;  
+               if (strcmp(p, ch->ifname)) { 
+                       if (setname(p, ch->ifname) < 0)  
+                               complain(_("cannot change name of %s to %s: %s"),
+                                               p, ch->ifname, strerror(errno)); 
+               } 
+-              free(ch);
+       } 
+       fclose(ifh); 
+       
+       while (clist) { 
+               struct change *ch = clist;
+               clist = clist->next;
+-              warning(_("interface '%s' not found"), ch->ifname); 
++              if (!ch->found)
++                      warning(_("interface '%s' not found"), ch->ifname); 
+               free(ch); 
+       }
diff --git a/packaging/net-tools-1.60-nameif_strncpy.patch b/packaging/net-tools-1.60-nameif_strncpy.patch
new file mode 100644 (file)
index 0000000..7568e21
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/nameif.c.ncpy       2006-10-03 14:24:21.000000000 +0200
++++ net-tools-1.60/nameif.c    2006-10-03 14:22:43.000000000 +0200
+@@ -100,8 +100,8 @@
+       struct ifreq ifr;
+       opensock(); 
+       memset(&ifr,0,sizeof(struct ifreq));
+-      strcpy(ifr.ifr_name, oldname); 
+-      strcpy(ifr.ifr_newname, newname); 
++      strncpy(ifr.ifr_name, oldname, IF_NAMESIZE); 
++      strncpy(ifr.ifr_newname, newname, IF_NAMESIZE); 
+       return ioctl(ctl_sk, SIOCSIFNAME, &ifr);
+ }
diff --git a/packaging/net-tools-1.60-netdevice.patch b/packaging/net-tools-1.60-netdevice.patch
new file mode 100644 (file)
index 0000000..08bdb58
--- /dev/null
@@ -0,0 +1,22 @@
+--- net-tools-1.60/lib/fddi.c.netdevice        2000-03-05 12:26:02.000000000 +0100
++++ net-tools-1.60/lib/fddi.c  2006-05-09 11:19:51.000000000 +0200
+@@ -26,6 +26,8 @@
+ #error "No FDDI Support in your current Kernelsource Tree."
+ #error "Disable HW Type FDDI"
+ #endif
++#include <linux/netdevice.h>
++#include <asm/byteorder.h>
+ #if __GLIBC__ >= 2
+ #include <netinet/if_fddi.h>
+ #else
+--- net-tools-1.60/lib/x25_sr.c.netdevice      2000-05-20 15:38:10.000000000 +0200
++++ net-tools-1.60/lib/x25_sr.c        2006-05-09 11:20:15.000000000 +0200
+@@ -77,7 +77,7 @@
+   rt.sigdigits=sigdigits;
+   /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
+-  memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
++  memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
+   while (*args) {
+       if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
diff --git a/packaging/net-tools-1.60-netmask.patch b/packaging/net-tools-1.60-netmask.patch
new file mode 100644 (file)
index 0000000..532898a
--- /dev/null
@@ -0,0 +1,61 @@
+--- net-tools-1.60/ifconfig.c.netmask  2001-04-13 20:25:18.000000000 +0200
++++ net-tools-1.60/ifconfig.c  2004-11-02 15:31:56.454594456 +0100
+@@ -23,6 +23,7 @@
+  *        20001008 - Bernd Eckenfels, Patch from RH for setting mtu 
+  *                    (default AF was wrong)
+  *          20010404 - Arnaldo Carvalho de Melo, use setlocale
++ *          20040831 - Florin Malita <fmalita@glenayre.com> delayed CIDR netmask
+  */
+ #define DFLT_AF "inet"
+@@ -227,13 +228,13 @@
+ int main(int argc, char **argv)
+ {
+-    struct sockaddr sa;
++    struct sockaddr sa, sa_netmask;
+     struct sockaddr_in sin;
+     char host[128];
+     struct aftype *ap;
+     struct hwtype *hw;
+     struct ifreq ifr;
+-    int goterr = 0, didnetmask = 0;
++    int goterr = 0, didnetmask = 0, donetmask = 0;
+     char **spp;
+     int fd;
+ #if HAVE_AFINET6
+@@ -903,16 +904,16 @@
+       /* FIXME: sa is too small for INET6 addresses, inet6 should use that too, 
+          broadcast is unexpected */
+       if (ap->getmask) {
+-          switch (ap->getmask(host, &sa, NULL)) {
++          switch (ap->getmask(host, &sa_netmask, NULL)) {
+           case -1:
+               usage();
+               break;
+           case 1:
+               if (didnetmask)
+                   usage();
+-
+-              goterr = set_netmask(skfd, &ifr, &sa);
+-              didnetmask++;
++              
++              /* delay setting the CIDR netmask till after setting the addr */
++              donetmask = 1;
+               break;
+           }
+       }
+@@ -960,6 +961,13 @@
+           }
+       }
++      /* set CIDR netmask */
++      if (donetmask) {
++              donetmask = 0;
++              goterr = set_netmask(skfd, &ifr, &sa_netmask);
++              didnetmask++;
++      }
++
+        /*
+         * Don't do the set_flag() if the address is an alias with a - at the
+         * end, since it's deleted already! - Roman
diff --git a/packaging/net-tools-1.60-netplugd_init.patch b/packaging/net-tools-1.60-netplugd_init.patch
new file mode 100644 (file)
index 0000000..6bef116
--- /dev/null
@@ -0,0 +1,32 @@
+--- net-tools-1.60/netplug-1.2.9/scripts/rc.netplugd.old       2007-06-08 13:03:45.000000000 +0200
++++ net-tools-1.60/netplug-1.2.9/scripts/rc.netplugd   2007-06-08 13:04:01.000000000 +0200
+@@ -17,11 +17,6 @@
+ # Source networking configuration.
+ . /etc/sysconfig/network
+-# Check that networking is up.
+-[ ${NETWORKING} = "no" ] && exit 0
+-
+-[ -x /sbin/netplugd ] || exit 0
+-
+ if [ -f /etc/sysconfig/netplugd ]; then
+     . /etc/sysconfig/netplugd
+ fi
+@@ -30,6 +25,8 @@
+ case "$1" in
+   start)
+       # Start daemon.
++      [ ${NETWORKING} = "no" ] && exit 1
++      [ -x /sbin/netplugd ] || exit 1
+       echo -n $"Starting network plug daemon: "
+       daemon /sbin/netplugd ${NETPLUGDARGS} -p /var/run/netplugd.pid
+       RETVAL=$?
+@@ -57,7 +54,7 @@
+       ;;
+   *)
+       echo $"Usage: $0 {start|stop|status|restart}"
+-      RETVAL=1
++      RETVAL=3
+       ;;
+ esac
diff --git a/packaging/net-tools-1.60-netstat-I-fix.patch b/packaging/net-tools-1.60-netstat-I-fix.patch
new file mode 100644 (file)
index 0000000..ab89201
--- /dev/null
@@ -0,0 +1,10 @@
+--- net-tools-1.60/netstat.c.old       2006-10-02 12:03:49.000000000 +0200
++++ net-tools-1.60/netstat.c   2006-10-02 12:02:12.000000000 +0200
+@@ -2233,6 +2233,7 @@ int main
+           break;
+       case 'I':
+             if (optarg && strcmp(optarg, "(null)"))
++              if (optarg[0] == '=') optarg++;
+                 flag_int_name = strdup(optarg);
+           flag_int++;
+           break;
diff --git a/packaging/net-tools-1.60-netstat-interfaces-crash.patch b/packaging/net-tools-1.60-netstat-interfaces-crash.patch
new file mode 100644 (file)
index 0000000..bb99932
--- /dev/null
@@ -0,0 +1,25 @@
+--- net-tools-1.60/netstat.c.old       2007-03-27 09:28:28.000000000 +0200
++++ net-tools-1.60/netstat.c   2007-03-27 09:26:39.000000000 +0200
+@@ -2105,7 +2105,7 @@
+     fprintf(stderr, _("       netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]\n\n"));
+     fprintf(stderr, _("        -r, --route                display routing table\n"));
+-    fprintf(stderr, _("        -I, --interfaces=[<Iface>] display interface table for <Iface>\n"));
++    fprintf(stderr, _("        -I, --interface=[<Iface>] display interface table for <Iface>\n"));
+     fprintf(stderr, _("        -i, --interfaces           display interface table\n"));
+     fprintf(stderr, _("        -g, --groups               display multicast group memberships\n"));
+     fprintf(stderr, _("        -s, --statistics           display networking statistics (like SNMP)\n"));
+@@ -2234,7 +2234,12 @@
+       case 'I':
+             if (optarg && strcmp(optarg, "(null)"))
+               if (optarg[0] == '=') optarg++;
+-                flag_int_name = strdup(optarg);
++            if (optarg && strcmp(optarg, "(null)")) 
++              flag_int_name = strdup(optarg);
++            else {
++              usage();
++              exit(1);
++            }
+           flag_int++;
+           break;
+       case 'i':
diff --git a/packaging/net-tools-1.60-netstat-probe.patch b/packaging/net-tools-1.60-netstat-probe.patch
new file mode 100644 (file)
index 0000000..d6d7342
--- /dev/null
@@ -0,0 +1,15 @@
+diff -up net-tools-1.60/netstat.c.probe net-tools-1.60/netstat.c
+--- net-tools-1.60/netstat.c.probe     2008-10-15 12:47:41.000000000 +0200
++++ net-tools-1.60/netstat.c   2008-10-15 12:49:48.000000000 +0200
+@@ -1061,6 +1061,11 @@ static void tcp_do_one(int lnr, const ch
+                        (double) time_len / HZ, retr, timeout);
+               break;
++          case 4:
++              snprintf(timers, sizeof(timers), _("probe (%2.2f/%ld/%d)"),
++                       (double) time_len / HZ, retr, timeout);
++              break;
++
+           default:
+               snprintf(timers, sizeof(timers), _("unkn-%d (%2.2f/%ld/%d)"),
+                        timer_run, (double) time_len / HZ, retr, timeout);
diff --git a/packaging/net-tools-1.60-netstat_inode.patch b/packaging/net-tools-1.60-netstat_inode.patch
new file mode 100644 (file)
index 0000000..4bce9a8
--- /dev/null
@@ -0,0 +1,186 @@
+--- net-tools-1.60/netstat.c.inode     2006-02-23 09:28:23.000000000 +0100
++++ net-tools-1.60/netstat.c   2006-02-23 09:33:57.000000000 +0100
+@@ -231,7 +231,7 @@
+ static struct prg_node {
+     struct prg_node *next;
+-    int inode;
++    unsigned long inode;
+     char name[PROGNAME_WIDTH];
+     char scon[SELINUX_WIDTH];
+ } *prg_hash[PRG_HASH_SIZE];
+@@ -268,7 +268,7 @@
+ /* NOT working as of glibc-2.0.7: */
+ #undef  DIRENT_HAVE_D_TYPE_WORKS
+-static void prg_cache_add(int inode, char *name, char *scon)
++static void prg_cache_add(unsigned long inode, char *name, char *scon)
+ {
+     unsigned hi = PRG_HASHIT(inode);
+     struct prg_node **pnp,*pn;
+@@ -332,15 +332,16 @@
+     prg_cache_loaded=0;
+ }
+-static void extract_type_1_socket_inode(const char lname[], long * inode_p) {
++static void extract_type_1_socket_inode(const char lname[], unsigned long * inode_p, int * status) {
+     /* If lname is of the form "socket:[12345]", extract the "12345"
+-       as *inode_p.  Otherwise, return -1 as *inode_p.
++       as *inode_p.  Otherwise, return -1 as *status.
+        */
+-    if (strlen(lname) < PRG_SOCKET_PFXl+3) *inode_p = -1;
+-    else if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) *inode_p = -1;
+-    else if (lname[strlen(lname)-1] != ']') *inode_p = -1;
++    *status = 0;
++    if (strlen(lname) < PRG_SOCKET_PFXl+3) *status = -1;
++    else if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) *status = -1;
++    else if (lname[strlen(lname)-1] != ']') *status = -1;
+     else {
+         char inode_str[strlen(lname + 1)];  /* e.g. "12345" */
+         const int inode_str_len = strlen(lname) - PRG_SOCKET_PFXl - 1;
+@@ -348,28 +349,30 @@
+         strncpy(inode_str, lname+PRG_SOCKET_PFXl, inode_str_len);
+         inode_str[inode_str_len] = '\0';
+-        *inode_p = strtol(inode_str,&serr,0);
+-        if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) 
+-            *inode_p = -1;
++        errno = 0;
++        *inode_p = strtoul(inode_str,&serr,0);
++        if (!serr || *serr || errno) 
++            *status = -1;
+     }
+ }
+-static void extract_type_2_socket_inode(const char lname[], long * inode_p) {
++static void extract_type_2_socket_inode(const char lname[], unsigned long * inode_p, int * status) {
+     /* If lname is of the form "[0000]:12345", extract the "12345"
+-       as *inode_p.  Otherwise, return -1 as *inode_p.
++       as *inode_p.  Otherwise, return -1 as *status.
+        */
+-    if (strlen(lname) < PRG_SOCKET_PFX2l+1) *inode_p = -1;
+-    else if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) *inode_p = -1;
++    if (strlen(lname) < PRG_SOCKET_PFX2l+1) *status = -1;
++    else if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) *status = -1;
+     else {
+         char *serr;
+-        *inode_p=strtol(lname + PRG_SOCKET_PFX2l,&serr,0);
+-        if (!serr || *serr || *inode_p < 0 || *inode_p >= INT_MAX) 
+-            *inode_p = -1;
++        errno = 0;
++        *inode_p=strtoul(lname + PRG_SOCKET_PFX2l,&serr,0);
++        if (!serr || *serr || errno) 
++            *status = -1;
+     }
+ }
+@@ -380,11 +383,12 @@
+     char line[LINE_MAX],eacces=0;
+     int procfdlen,fd,cmdllen,lnamelen;
+     char lname[30],cmdlbuf[512],finbuf[PROGNAME_WIDTH];
+-    long inode;
++    unsigned long inode;
+     const char *cs,*cmdlp;
+     DIR *dirproc=NULL,*dirfd=NULL;
+     struct dirent *direproc,*direfd;
+     security_context_t scon=NULL;
++    int status;
+     if (prg_cache_loaded || !flag_prg) return;
+     prg_cache_loaded=1;
+@@ -424,11 +428,11 @@
+           lnamelen=readlink(line,lname,sizeof(lname)-1);
+             lname[lnamelen] = '\0';  /*make it a null-terminated string*/
+-            extract_type_1_socket_inode(lname, &inode);
++            extract_type_1_socket_inode(lname, &inode, &status);
+-            if (inode < 0) extract_type_2_socket_inode(lname, &inode);
++            if (status < 0) extract_type_2_socket_inode(lname, &inode, &status);
+-            if (inode < 0) continue;
++            if (status < 0) continue;
+           if (!cmdlp) {
+               if (procfdlen - PATH_FD_SUFFl + PATH_CMDLINEl >= 
+@@ -732,7 +736,7 @@
+           printf("%-10s ", pw->pw_name);
+       else
+           printf("%-10d ", uid);
+-      printf("%-10ld ",inode);
++      printf("%-10lu ",inode);
+     }
+     if (flag_prg)
+       printf("%-" PROGNAME_WIDTHs "s",prg_cache_get(inode));
+@@ -921,7 +925,7 @@
+       return;
+     num = sscanf(line,
+-    "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
++    "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n",
+                &d, local_addr, &local_port, rem_addr, &rem_port, &state,
+                &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+@@ -1064,7 +1068,7 @@
+     more[0] = '\0';
+     num = sscanf(line,
+-               "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
++               "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n",
+                &d, local_addr, &local_port,
+                rem_addr, &rem_port, &state,
+         &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+@@ -1206,7 +1210,7 @@
+     more[0] = '\0';
+     num = sscanf(line,
+-               "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %ld %512s\n",
++               "%d: %64[0-9A-Fa-f]:%X %64[0-9A-Fa-f]:%X %X %lX:%lX %X:%lX %lX %d %d %lu %512s\n",
+                &d, local_addr, &local_port, rem_addr, &rem_port, &state,
+         &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode, more);
+@@ -1320,9 +1324,9 @@
+     static int has = 0;
+     char path[MAXPATHLEN], ss_flags[32];
+     char *ss_proto, *ss_state, *ss_type;
+-    int num, state, type, inode;
++    int num, state, type;
+     void *d;
+-    unsigned long refcnt, proto, flags;
++    unsigned long refcnt, proto, flags, inode;
+     if (nr == 0) {
+       if (strstr(line, "Inode"))
+@@ -1330,14 +1334,14 @@
+       return;
+     }
+     path[0] = '\0';
+-    num = sscanf(line, "%p: %lX %lX %lX %X %X %d %s",
++    num = sscanf(line, "%p: %lX %lX %lX %X %X %lu %s",
+                &d, &refcnt, &proto, &flags, &type, &state, &inode, path);
+     if (num < 6) {
+       fprintf(stderr, _("warning, got bogus unix line.\n"));
+       return;
+     }
+     if (!(has & HAS_INODE))
+-      snprintf(path,sizeof(path),"%d",inode);
++      snprintf(path,sizeof(path),"%lu",inode);
+     if (!flag_all) {
+       if ((state == SS_UNCONNECTED) && (flags & SO_ACCEPTCON)) {
+@@ -1429,7 +1433,7 @@
+     printf("%-5s %-6ld %-11s %-10s %-13s ",
+          ss_proto, refcnt, ss_flags, ss_type, ss_state);
+     if (has & HAS_INODE)
+-      printf("%-6d ",inode);
++      printf("%-6lu ",inode);
+     else
+       printf("-      ");
+     if (flag_prg)
diff --git a/packaging/net-tools-1.60-netstat_stop_trim.patch b/packaging/net-tools-1.60-netstat_stop_trim.patch
new file mode 100644 (file)
index 0000000..a26d0c4
--- /dev/null
@@ -0,0 +1,92 @@
+--- net-tools-1.60/man/en_US/netstat.8.old     2006-02-10 11:18:11.000000000 +0100
++++ net-tools-1.60/man/en_US/netstat.8 2006-02-10 11:22:19.000000000 +0100
+@@ -176,6 +176,10 @@
+ Print routing information from the FIB.  (This is the default.)
+ .SS "\-C"
+ Print routing information from the route cache.
++.SS "\-Z \-\-context"
++If SELinux enabled print SELinux context.
++.SS "\-T \-\-notrim"
++Stop trimming long addresses.
+ .SS delay
+ Netstat will cycle printing through statistics every 
+ .B delay 
+--- net-tools-1.60/netstat.c.old       2006-02-10 11:18:12.000000000 +0100
++++ net-tools-1.60/netstat.c   2006-02-10 11:13:50.000000000 +0100
+@@ -157,6 +157,9 @@
+ int flag_arg = 0;
+ int flag_ver = 0;
+ int flag_selinux = 0;
++int flag_trim = 0;
++
++
+ FILE *procinfo;
+@@ -980,17 +983,21 @@
+                get_sname(htons(local_port), "tcp",
+                          flag_not & FLAG_NUM_PORT));
+-      if ((strlen(local_addr) + strlen(buffer)) >= 27)
+-          local_addr[27 - strlen(buffer) - 1] = '\0';
++      if (!flag_trim) {
++          if ((strlen(local_addr) + strlen(buffer)) >= 27)
++              local_addr[27 - strlen(buffer) - 1] = '\0';
++      }
+       strcat(local_addr, ":");
+       strncat(local_addr, buffer, sizeof(local_addr));
+       local_addr[sizeof(local_addr)-1] = 0;
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
+-
+-      if ((strlen(rem_addr) + strlen(buffer)) >= 27)
+-          rem_addr[27 - strlen(buffer) - 1] = '\0';
++      
++      if (!flag_trim) {
++          if ((strlen(rem_addr) + strlen(buffer)) >= 27)
++              rem_addr[27 - strlen(buffer) - 1] = '\0';
++      }
+       strcat(rem_addr, ":");
+       strncat(rem_addr, buffer, sizeof(rem_addr));
+@@ -1776,6 +1783,7 @@
+       {"fib", 0, 0, 'F'},
+       {"groups", 0, 0, 'g'},
+       {"context", 0, 0, 'Z'},
++      {"notrim", 0, 0, 'T'},
+       {NULL, 0, 0, 0}
+     };
+@@ -1788,7 +1796,7 @@
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZ", longopts, &lop)) != EOF)
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZT", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+@@ -1904,6 +1912,10 @@
+           usage();
+       case 's':
+           flag_sta++;
++          break;
++      case 'T':
++          flag_trim++;
++          break;
+       }
+     if(argc == optind + 1) {
+--- net-tools-1.60/netstat.c.trim2     2006-04-06 16:12:02.000000000 +0200
++++ net-tools-1.60/netstat.c   2006-04-06 16:18:09.000000000 +0200
+@@ -1737,7 +1737,8 @@
+     fprintf(stderr, _("        -a, --all, --listening     display all sockets (default: connected)\n"));
+     fprintf(stderr, _("        -o, --timers               display timers\n"));
+     fprintf(stderr, _("        -F, --fib                  display Forwarding Information Base (default)\n"));
+-    fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n\n"));
++    fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n"));
++    fprintf(stderr, _("        -T, --notrim               stop trimming long addresses\n"));
+     fprintf(stderr, _("        -Z, --context              display SELinux security context for sockets\n\n"));
+     fprintf(stderr, _("  <Iface>: Name of interface to monitor/list.\n"));
diff --git a/packaging/net-tools-1.60-netstat_ulong.patch b/packaging/net-tools-1.60-netstat_ulong.patch
new file mode 100644 (file)
index 0000000..56869dc
--- /dev/null
@@ -0,0 +1,11 @@
+--- net-tools-1.60/netstat.c.netstat_ulong     2004-11-11 14:28:44.000000000 +0100
++++ net-tools-1.60/netstat.c   2004-11-11 14:31:14.099313000 +0100
+@@ -273,7 +273,7 @@
+     strcpy(pn->name,name);
+ }
+-static const char *prg_cache_get(int inode)
++static const char *prg_cache_get(unsigned long inode)
+ {
+     unsigned hi=PRG_HASHIT(inode);
+     struct prg_node *pn;
diff --git a/packaging/net-tools-1.60-note.patch b/packaging/net-tools-1.60-note.patch
new file mode 100644 (file)
index 0000000..4853ccd
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/man/en_US/hostname.1.note   2004-11-24 12:09:28.000000000 +0100
++++ net-tools-1.60/man/en_US/hostname.1        2004-11-24 12:16:41.121050760 +0100
+@@ -191,6 +191,10 @@
+ ) then root can also set a new NIS domain.
+ .SH FILES
+ .B /etc/hosts
++.B /etc/sysconfig/network
++.SH NOTE
++Note that hostname doesn't change anything permanently. After reboot
++original names from \fI/etc/hosts\fR are used again. 
+ .SH AUTHOR
+ Peter Tobias, <tobias@et-inf.fho-emden.de>
+ .br
diff --git a/packaging/net-tools-1.60-num-ports.patch b/packaging/net-tools-1.60-num-ports.patch
new file mode 100644 (file)
index 0000000..829c9d6
--- /dev/null
@@ -0,0 +1,78 @@
+--- net-tools-1.60/netstat.c.num-ports 2004-11-24 12:19:24.000000000 +0100
++++ net-tools-1.60/netstat.c   2004-11-25 16:00:45.208367104 +0100
+@@ -765,8 +765,8 @@
+       txq = 0L;
+     }
+     safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+-                                      flag_not), sizeof(local_addr));
+-    safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not),
++                                      flag_not & FLAG_NUM_HOST), sizeof(local_addr));
++    safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, flag_not & FLAG_NUM_HOST),
+                sizeof(rem_addr));
+     if (flag_all || (flag_lst && !rem_port) || (!flag_lst && rem_port)) {
+       snprintf(buffer, sizeof(buffer), "%s",
+@@ -921,11 +921,11 @@
+     if (flag_all || (notnull(remaddr) && !flag_lst) || (!notnull(remaddr) && flag_lst))
+     {
+         safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+-                                          flag_not), sizeof(local_addr));
++                                          flag_not & FLAG_NUM_HOST), sizeof(local_addr));
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(local_port), "udp",
+                          flag_not & FLAG_NUM_PORT));
+-      if ((strlen(local_addr) + strlen(buffer)) > 22)
++      if ((strlen(local_addr) + strlen(buffer)) >= 27)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+       strncat(local_addr, buffer, sizeof(local_addr));
+@@ -934,8 +934,8 @@
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
+         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
+-                                        flag_not), sizeof(rem_addr));
+-      if ((strlen(rem_addr) + strlen(buffer)) > 22)
++                                        flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
++      if ((strlen(rem_addr) + strlen(buffer)) >= 27)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+       strncat(rem_addr, buffer, sizeof(rem_addr));
+@@ -958,7 +958,7 @@
+                        retr, timeout);
+               break;
+           }
+-      printf("udp   %6ld %6ld %-23s %-23s %-12s",
++      printf("udp   %6ld %6ld %-27s %-27s %-12s",
+              rxq, txq, local_addr, rem_addr, udp_state);
+       finish_this_one(uid,inode,timers);
+@@ -1045,8 +1045,8 @@
+                get_sname(htons(local_port), "raw",
+                          flag_not & FLAG_NUM_PORT));
+         safe_strncpy(local_addr, ap->sprint((struct sockaddr *) &localaddr, 
+-                                          flag_not), sizeof(local_addr));
+-      if ((strlen(local_addr) + strlen(buffer)) > 22)
++                                          flag_not & FLAG_NUM_HOST), sizeof(local_addr));
++      if ((strlen(local_addr) + strlen(buffer)) >= 27)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+       strncat(local_addr, buffer, sizeof(local_addr));
+@@ -1055,8 +1055,8 @@
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
+         safe_strncpy(rem_addr, ap->sprint((struct sockaddr *) &remaddr, 
+-                                        flag_not), sizeof(rem_addr));
+-      if ((strlen(rem_addr) + strlen(buffer)) > 22)
++                                        flag_not & FLAG_NUM_HOST), sizeof(rem_addr));
++      if ((strlen(rem_addr) + strlen(buffer)) >= 27)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+       strncat(rem_addr, buffer, sizeof(rem_addr));
+@@ -1081,7 +1081,7 @@
+                        retr, timeout);
+               break;
+           }
+-      printf("raw   %6ld %6ld %-23s %-23s %-12d",
++      printf("raw   %6ld %6ld %-27s %-27s %-12d",
+              rxq, txq, local_addr, rem_addr, state);
+       finish_this_one(uid,inode,timers);
diff --git a/packaging/net-tools-1.60-overflow.patch b/packaging/net-tools-1.60-overflow.patch
new file mode 100644 (file)
index 0000000..d363149
--- /dev/null
@@ -0,0 +1,63 @@
+diff -ur net-tools-1.60.orig/netstat.c net-tools-1.60/netstat.c
+--- net-tools-1.60.orig/netstat.c      2004-04-07 11:47:05.000000000 -0400
++++ net-tools-1.60/netstat.c   2004-04-07 16:47:15.000000000 -0400
+@@ -777,7 +777,8 @@
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+-      strcat(local_addr, buffer);
++      strncat(local_addr, buffer, sizeof(local_addr));
++      local_addr[sizeof(local_addr)-1] = 0;
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
+@@ -785,7 +786,8 @@
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+-      strcat(rem_addr, buffer);
++      strncat(rem_addr, buffer, sizeof(rem_addr));
++      rem_addr[sizeof(rem_addr)-1] = 0;
+       timers[0] = '\0';
+       if (flag_opt)
+@@ -926,7 +928,8 @@
+       if ((strlen(local_addr) + strlen(buffer)) > 22)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+-      strcat(local_addr, buffer);
++      strncat(local_addr, buffer, sizeof(local_addr));
++      local_addr[sizeof(local_addr)-1] = 0;
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "udp", flag_not & FLAG_NUM_PORT));
+@@ -935,7 +938,8 @@
+       if ((strlen(rem_addr) + strlen(buffer)) > 22)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+-      strcat(rem_addr, buffer);
++      strncat(rem_addr, buffer, sizeof(rem_addr));
++      rem_addr[sizeof(rem_addr)-1] = 0;
+       timers[0] = '\0';
+       if (flag_opt)
+@@ -1045,7 +1049,8 @@
+       if ((strlen(local_addr) + strlen(buffer)) > 22)
+           local_addr[22 - strlen(buffer)] = '\0';
+       strcat(local_addr, ":");
+-      strcat(local_addr, buffer);
++      strncat(local_addr, buffer, sizeof(local_addr));
++      local_addr[sizeof(local_addr)-1] = 0;
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "raw", flag_not & FLAG_NUM_PORT));
+@@ -1054,7 +1059,8 @@
+       if ((strlen(rem_addr) + strlen(buffer)) > 22)
+           rem_addr[22 - strlen(buffer)] = '\0';
+       strcat(rem_addr, ":");
+-      strcat(rem_addr, buffer);
++      strncat(rem_addr, buffer, sizeof(rem_addr));
++      rem_addr[sizeof(rem_addr)-1] = 0;
+       timers[0] = '\0';
+       if (flag_opt)
diff --git a/packaging/net-tools-1.60-parse.patch b/packaging/net-tools-1.60-parse.patch
new file mode 100644 (file)
index 0000000..25890f1
--- /dev/null
@@ -0,0 +1,70 @@
+--- net-tools-1.60/statistics.c.parse  2004-09-06 10:45:35.595130240 +0200
++++ net-tools-1.60/statistics.c        2004-09-06 10:43:11.000000000 +0200
+@@ -289,7 +289,7 @@
+       return &dummytab;
+ }
+-void process_fd(FILE *f)
++void process_fd(FILE *f,int file_desc)   // added file_desc to show propriate error mesg
+ {
+     char buf1[1024], buf2[1024];
+     char *sp, *np, *p;
+@@ -297,12 +297,16 @@
+       int endflag;
+       struct tabtab *tab;
++      if (strcmp(buf1,"\n") == 0)  // cut leading break
++          if (!fgets(buf1, sizeof buf1, f))
++          break;
+       if (!fgets(buf2, sizeof buf2, f))
+           break;
++
+       sp = strchr(buf1, ':');
+-      np = strchr(buf2, ':');
+-      if (!np || !sp)
+-          goto formaterr;
++      np = strchr(buf2, ':'); 
++      if (!np || !sp) 
++          goto formaterr; 
+       *sp = '\0';
+       tab = newtable(snmptabs, buf1);
+@@ -333,7 +337,12 @@
+   return;
+   
+ formaterr:
+-  perror(_("error parsing /proc/net/snmp"));
++ switch(file_desc) {
++    case 0: perror(_("error parsing /proc/net/snmp"));
++      break;
++    case 1: perror(_("error parsing /proc/net/netstat"));
++      break;
++  }
+   return;
+ }
+@@ -343,13 +352,13 @@
+     FILE *f;
+     f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
+-    
++
+     f = fopen("/proc/net/snmp", "r");
+     if (!f) {
+       perror(_("cannot open /proc/net/snmp"));
+       return(1);
+     }
+-    process_fd(f);
++    process_fd(f,0);
+     if (ferror(f)) {
+       perror("/proc/net/snmp");
+@@ -361,7 +370,7 @@
+     f = fopen("/proc/net/netstat", "r");
+     if (f) {
+-      process_fd(f);
++      process_fd(f,1);
+         if (ferror(f)) {
+         perror("/proc/net/netstat");
diff --git a/packaging/net-tools-1.60-pie.patch b/packaging/net-tools-1.60-pie.patch
new file mode 100644 (file)
index 0000000..d4496ff
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/Makefile.pie        2001-04-15 16:34:31.000000000 +0200
++++ net-tools-1.60/Makefile    2005-02-28 12:41:15.337127680 +0100
+@@ -113,8 +113,8 @@
+ NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
+-CFLAGS        = $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
+-LDFLAGS       = $(LOPTS) -L$(NET_LIB_PATH)
++CFLAGS        += $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
++LDFLAGS       += $(LOPTS) -L$(NET_LIB_PATH)
+ SUBDIRS       = man/ $(NET_LIB_PATH)/
diff --git a/packaging/net-tools-1.60-remove_node.patch b/packaging/net-tools-1.60-remove_node.patch
new file mode 100644 (file)
index 0000000..8fbfe65
--- /dev/null
@@ -0,0 +1,24 @@
+--- net-tools-1.60/man/en_US/hostname.1.old    2007-03-15 13:45:55.000000000 +0100
++++ net-tools-1.60/man/en_US/hostname.1        2007-03-15 13:49:12.000000000 +0100
+@@ -28,8 +28,6 @@
+ .RB [ \-y ]
+ .RB [ \-\-yp ]
+ .RB [ \-\-nis ]
+-.RB [ \-n ]
+-.RB [ \-\-node ]
+ .PP
+ .B hostname 
+--- net-tools-1.60/hostname.c.old      2007-03-15 13:45:55.000000000 +0100
++++ net-tools-1.60/hostname.c  2007-03-15 13:47:27.000000000 +0100
+@@ -234,8 +234,9 @@
+     fprintf(stderr, _("       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"));
+ #if HAVE_AFDECnet
+     fprintf(stderr, _("       nodename [-v] {nodename|-F file}      set DECnet node name (from file)\n"));
++    fprintf(stderr, _("       hostname [-n]                       DECnet domain name\n"));
+ #endif
+-    fprintf(stderr, _("       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"));
++    fprintf(stderr, _("       hostname [-v] [-d|-f|-s|-a|-i|-y]  display formatted 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"));
diff --git a/packaging/net-tools-1.60-return.patch b/packaging/net-tools-1.60-return.patch
new file mode 100644 (file)
index 0000000..8ef10f5
--- /dev/null
@@ -0,0 +1,28 @@
+--- net-tools-1.60/nameif.c.return     2004-08-03 18:01:37.000000000 +0900
++++ net-tools-1.60/nameif.c    2004-08-03 18:03:37.000000000 +0900
+@@ -27,6 +27,7 @@
+ const char *fname = default_conf; 
+ int use_syslog; 
+ int ctl_sk = -1; 
++int frag = 0;
+ void err(char *msg) 
+ { 
+@@ -288,13 +289,15 @@
+       while (clist) { 
+               struct change *ch = clist;
+               clist = clist->next;
+-              if (!ch->found)
++              if (!ch->found){
+                       warning(_("interface '%s' not found"), ch->ifname); 
++                      frag = 1;
++              }
+               free(ch); 
+       }
+       if (use_syslog)
+               closelog();
+-      return 0;
++      return frag;
+ } 
diff --git a/packaging/net-tools-1.60-sctp-addrs.patch b/packaging/net-tools-1.60-sctp-addrs.patch
new file mode 100644 (file)
index 0000000..ff1c062
--- /dev/null
@@ -0,0 +1,346 @@
+--- net-tools-1.60/netstat.c.sctp-addrs        2008-06-18 14:41:29.000000000 +0200
++++ net-tools-1.60/netstat.c   2008-06-18 14:12:03.000000000 +0200
+@@ -1299,23 +1299,21 @@ static void sctp_eps_do_one(int lnr, cha
+     const char *lport_str;
+     const char *uid_str;
+     const char *inode_str;
+-    const char *pladdr_str;
+     char *laddrs_str;
+     
+     if(lnr == 0) {
+-      /* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
++        /* ENDPT     SOCK   STY SST HBKT LPORT   UID INODE LADDRS */
+       return;
+     }
+     
+-    strtok(line," \t\n"); /*skip ptr*/
+-    strtok(0," \t\n");    /*skip ptr*/
++    strtok(line," \t\n"); /*skip endpt*/
++    strtok(0," \t\n");    /*skip sock*/
+     sty_str = strtok(0," \t\n");
+     sst_str = strtok(0," \t\n");
+     strtok(0," \t\n"); /*skip hash bucket*/
+     lport_str=strtok(0," \t\n");
+     uid_str = strtok(0," \t\n");
+     inode_str = strtok(0," \t\n");
+-    pladdr_str = strtok(0," \t\n");
+     laddrs_str=strtok(0,"\t\n");
+     
+     type = atoi(sty_str);
+@@ -1323,61 +1321,35 @@ static void sctp_eps_do_one(int lnr, cha
+     port = atoi(lport_str);
+     uid = atoi(uid_str);
+     inode = strtoul(inode_str,0,0);
+-    
+-    if(flag_sctp<=1) {
+-      /* only print the primary address */
+-      char local_addr[64];
+-      char local_port[16];
+-      
+-      ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+-      if(ap)
+-          safe_strncpy(local_addr,
+-                       ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-                       sizeof(local_addr));
+-      else
+-          sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-      
+-      snprintf(local_port, sizeof(local_port), "%s",
+-               get_sname(htons(port), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-      
+-      printf("sctp                ");
+-      sprintf(buffer,"%s:%s", local_addr, local_port);
+-      printf("%-47s", buffer);
+-      printf(" %-12s", sctp_socket_state_str(state));
+-    } else {
+-      /*print all addresses*/
+-      const char *this_local_addr;
+-      int first=1;
+-      char local_port[16];
+-      snprintf(local_port, sizeof(local_port), "%s",
+-               get_sname(htons(port), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-      for(this_local_addr=strtok(laddrs_str," \t\n");
+-          this_local_addr;
+-          this_local_addr=strtok(0," \t\n"))
+-      {
+-          char local_addr[64];
+-          ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+-          if(ap)
+-              safe_strncpy(local_addr,
+-                           ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-                           sizeof(local_addr));
+-          else
+-              sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-          if(!first) printf("\n");
+-          if(first)
+-              printf("sctp                ");
+-          else
+-              printf("                    ");
+-          sprintf(buffer,"%s:%s", local_addr, local_port);
+-          printf("%-47s", buffer);
+-          printf(" %-12s", first?sctp_socket_state_str(state):"");
+-          first = 0;
+-      }
++    const char *this_local_addr;
++    int first=1;
++    char local_port[16];
++    snprintf(local_port, sizeof(local_port), "%s",
++        get_sname(htons(port), "sctp", flag_not & FLAG_NUM_PORT));
++    for(this_local_addr=strtok(laddrs_str," \t\n");
++        this_local_addr;
++        this_local_addr=strtok(0," \t\n"))
++    {
++        char local_addr[64];
++        ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++        if(ap)
++            safe_strncpy(local_addr,
++                ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                sizeof(local_addr));
++        else
++            sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++        if(!first) printf("\n");
++        if(first)
++            printf("sctp                ");
++        else
++            printf("                    ");
++        sprintf(buffer,"%s:%s", local_addr, local_port);
++        printf("%-55s", buffer);
++        printf(" %-12s", first?sctp_socket_state_str(state):"");
++        first = 0;
+     }
+-
+     finish_this_one(uid,inode,"");
+ }
+@@ -1403,32 +1375,29 @@ static void sctp_assoc_do_one(int lnr, c
+     const char *lport_str,*rport_str;
+     const char *uid_str;
+     const char *inode_str;
+-    const char *pladdr_str;
+     char *laddrs_str;
+-    const char *praddr_str;
+     char *raddrs_str;
+-    
++
+     if(lnr == 0) {
+-      /* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++      /* ASSOC     SOCK   STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT RPORT LADDRS <-> RADDRS */
+       return;
+     }
+-    
+-    strtok(line," \t\n"); /*skip ptr*/
+-    strtok(0," \t\n");    /*skip ptr*/
++
++    strtok(line," \t\n"); /*skip assoc*/
++    strtok(0," \t\n");    /*skip sock*/
+     sty_str = strtok(0," \t\n");
+     sst_str = strtok(0," \t\n");
+     st_str = strtok(0," \t\n");
+     strtok(0," \t\n"); /*skip hash bucket*/
++    strtok(0," \t\n"); /*skip hash assoc-id*/
+     txqueue_str =  strtok(0," \t\n");
+     rxqueue_str =  strtok(0," \t\n");
+     uid_str = strtok(0," \t\n");
+     inode_str = strtok(0," \t\n");
+     lport_str=strtok(0," \t\n");
+     rport_str=strtok(0," \t\n");
+-    pladdr_str = strtok(0," \t\n");
+-    praddr_str = strtok(0," \t\n");
+-    laddrs_str=strtok(0,"<->\t\n");
+-    raddrs_str=strtok(0,"<->\t\n");
++    laddrs_str = strtok(0,"<->\t\n");
++    raddrs_str = strtok(0,"<->\t\n");
+     type = atoi(sty_str);
+     state = atoi(sst_str);
+@@ -1439,116 +1408,81 @@ static void sctp_assoc_do_one(int lnr, c
+     inode = strtoul(inode_str,0,0);
+     lport = atoi(lport_str);
+     rport = atoi(rport_str);
+-    
+-    if(flag_sctp<=1) {
+-      /* only print the primary addresses */
+-      char local_addr[64];
+-      char local_port[16];
+-      char remote_addr[64];
+-      char remote_port[16];
+-      
+-      ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+-      if(ap)
+-          safe_strncpy(local_addr,
+-                       ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-                       sizeof(local_addr));
+-      else
+-          sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-      
+-      snprintf(local_port, sizeof(local_port), "%s",
+-               get_sname(htons(lport), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-      
+-      ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
+-      if(ap)
+-          safe_strncpy(remote_addr,
+-                       ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+-                       sizeof(remote_addr));
+-      else
+-          sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+-      
+-      snprintf(remote_port, sizeof(remote_port), "%s",
+-               get_sname(htons(rport), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-
+-      printf("sctp");
+-      printf("  %6u %6u ", rxqueue, txqueue);
+-      sprintf(buffer,"%s:%s", local_addr, local_port);
+-      printf("%-23s", buffer);
+-      printf(" ");
+-      sprintf(buffer,"%s:%s", remote_addr, remote_port);
+-      printf("%-23s", buffer);
+-      printf(" %-12s", sctp_socket_state_str(state));
+-    } else {
+-      /*print all addresses*/
+-      const char *this_local_addr;
+-      const char *this_remote_addr;
+-      char *ss1,*ss2;
+-      int first=1;
+-      char local_port[16];
+-      char remote_port[16];
+-      snprintf(local_port, sizeof(local_port), "%s",
+-               get_sname(htons(lport), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-      snprintf(remote_port, sizeof(remote_port), "%s",
+-               get_sname(htons(rport), "sctp",
+-                         flag_not & FLAG_NUM_PORT));
+-
+-      this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
+-      this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
+-      while(this_local_addr || this_remote_addr) {
+-          char local_addr[64];
+-          char remote_addr[64];
+-          if(this_local_addr) {
+-              ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+-              if(ap)
+-                  safe_strncpy(local_addr,
+-                               ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-                               sizeof(local_addr));
+-              else
+-                  sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-          }
+-          if(this_remote_addr) {
+-              ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
+-              if(ap)
+-                  safe_strncpy(remote_addr,
+-                               ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+-                               sizeof(remote_addr));
+-              else
+-                  sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+-          }
+-          if(!first) printf("\n");
+-          if(first)
+-              printf("sctp  %6u %6u ", rxqueue, txqueue);
+-          else
+-              printf("                    ");
+-          if(this_local_addr) {
+-              if(first)
+-                  sprintf(buffer,"%s:%s", local_addr, local_port);
++    /*print all addresses*/
++    const char *this_local_addr;
++    const char *this_remote_addr;
++    char *ss1,*ss2;
++    int first=1;
++    char local_port[16];
++    char remote_port[16];
++    snprintf(local_port, sizeof(local_port), "%s",
++             get_sname(htons(lport), "sctp",
++             flag_not & FLAG_NUM_PORT));
++    snprintf(remote_port, sizeof(remote_port), "%s",
++             get_sname(htons(rport), "sctp",
++             flag_not & FLAG_NUM_PORT));
++
++    this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++    this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++    while(this_local_addr || this_remote_addr) {
++        char local_addr[64];
++        char remote_addr[64];
++
++        if(this_local_addr) {
++            if (this_local_addr[0] == '*') {
++                /* skip * */
++                this_local_addr++;
++            }
++            ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++            if(ap)
++                safe_strncpy(local_addr,
++                    ap->sprint((struct sockaddr *) &localaddr, flag_not), sizeof(local_addr));
+               else
+-                  sprintf(buffer,"%s", local_addr);
+-              printf("%-23s", buffer);
+-          } else
+-              printf("%-23s", "");
+-          printf(" ");
+-          if(this_remote_addr) {
+-              if(first)
+-                  sprintf(buffer,"%s:%s", remote_addr, remote_port);
++                    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++        }
++      if(this_remote_addr) {
++            if (this_remote_addr[0] == '*') {
++                /* skip * */
++                this_remote_addr++;
++            }
++            ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++            if(ap)
++                safe_strncpy(remote_addr,
++                    ap->sprint((struct sockaddr *) &remoteaddr, flag_not), sizeof(remote_addr));
+               else
+-                  sprintf(buffer,"%s", remote_addr);
+-              printf("%-23s", buffer);
+-          } else
+-              printf("%-23s", "");
+-
+-          printf(" %-12s", first?sctp_socket_state_str(state):"");
++                    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++       }
+-          first = 0;
+-          this_local_addr=strtok_r(0," \t\n",&ss1);
+-          this_remote_addr=strtok_r(0," \t\n",&ss2);
+-      }
++       if(!first) printf("\n");
++       if(first)
++           printf("sctp  %6u %6u ", rxqueue, txqueue);
++       else
++           printf("                    ");
++       if(this_local_addr) {
++           if(first)
++               sprintf(buffer,"%s:%s", local_addr, local_port);
++           else
++               sprintf(buffer,"%s", local_addr);
++           printf("%-27s", buffer);
++       } else
++           printf("%-27s", "");
++       printf(" ");
++       if(this_remote_addr) {
++           if(first)
++               sprintf(buffer,"%s:%s", remote_addr, remote_port);
++           else
++               sprintf(buffer,"%s", remote_addr);
++           printf("%-27s", buffer);
++       } else
++       printf("%-27s", "");
++
++       printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++       first = 0;
++       this_local_addr=strtok_r(0," \t\n",&ss1);
++       this_remote_addr=strtok_r(0," \t\n",&ss2);
+     }
+-
+     finish_this_one(uid,inode,"");
+ }
diff --git a/packaging/net-tools-1.60-sctp-quiet.patch b/packaging/net-tools-1.60-sctp-quiet.patch
new file mode 100644 (file)
index 0000000..f04c4ca
--- /dev/null
@@ -0,0 +1,11 @@
+--- net-tools-1.60/netstat.c.old       2007-02-22 14:39:39.000000000 +0100
++++ net-tools-1.60/netstat.c   2007-02-22 14:44:22.000000000 +0100
+@@ -2325,7 +2325,7 @@
+       usage();
+     if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
+-      flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
++      flag_tcp = flag_udp = flag_raw = 1;
+     if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+         flag_inet = flag_inet6 = 1;
diff --git a/packaging/net-tools-1.60-sctp.patch b/packaging/net-tools-1.60-sctp.patch
new file mode 100644 (file)
index 0000000..6292999
--- /dev/null
@@ -0,0 +1,617 @@
+--- net-tools-1.60/statistics.c.sctp   2006-04-13 10:06:45.000000000 -0400
++++ net-tools-1.60/statistics.c        2006-04-13 10:06:45.000000000 -0400
+@@ -20,7 +20,7 @@
+ #define UFWARN(x)
+ #endif
+-int print_static,f_raw,f_tcp,f_udp,f_unknown = 1;
++int print_static,f_raw,f_tcp,f_udp,f_sctp,f_unknown = 1;
+ enum State {
+     number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
+@@ -225,6 +225,27 @@
+      { "TCPLoss", N_("%u TCP data loss events") },
+ };
++struct entry Sctptab[] =
++{
++    {"SctpCurrEstab", N_("%u Current Associations"), number},
++    {"SctpActiveEstabs", N_("%u Active Associations"), number},
++    {"SctpPassiveEstabs", N_("%u Passive Associations"), number},
++    {"SctpAborteds", N_("%u Number of Aborteds "), number},
++    {"SctpShutdowns", N_("%u Number of Graceful Terminations"), number},
++    {"SctpOutOfBlues", N_("%u Number of Out of Blue packets"), number},
++    {"SctpChecksumErrors", N_("%u Number of Packets with invalid Checksum"), number},
++    {"SctpOutCtrlChunks", N_("%u Number of control chunks sent"), number},
++    {"SctpOutOrderChunks", N_("%u Number of ordered chunks sent"), number},
++    {"SctpOutUnorderChunks", N_("%u Number of Unordered chunks sent"), number},
++    {"SctpInCtrlChunks", N_("%u Number of control chunks received"), number},
++    {"SctpInOrderChunks", N_("%u Number of ordered chunks received"), number},
++    {"SctpInUnorderChunks", N_("%u Number of Unordered chunks received"), number},
++    {"SctpFragUsrMsgs", N_("%u Number of messages fragmented"), number},
++    {"SctpReasmUsrMsgs", N_("%u Number of messages reassembled "), number},
++    {"SctpOutSCTPPacks", N_("%u Number of SCTP packets sent"), number},
++    {"SctpInSCTPPacks", N_("%u Number of SCTP packets received"), number},
++};
++
+ struct tabtab {
+     char *title;
+     struct entry *tab;
+@@ -238,6 +259,7 @@
+     {"Icmp", Icmptab, sizeof(Icmptab), &f_raw},
+     {"Tcp", Tcptab, sizeof(Tcptab), &f_tcp},
+     {"Udp", Udptab, sizeof(Udptab), &f_udp},
++    {"Sctp", Sctptab, sizeof(Sctptab), &f_sctp},
+     {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp},
+     {NULL}
+ };
+@@ -385,12 +407,39 @@
+   return;
+ }
++/* Process a file with name-value lines (like /proc/net/sctp/snmp) */
++void process_fd2(FILE *f, const char *filename)
++{
++    char buf1[1024];
++    char *sp;
++    struct tabtab *tab;
++    
++    tab = newtable(snmptabs, "Sctp");
++    
++    while (fgets(buf1, sizeof buf1, f)) {
++      sp = buf1 + strcspn(buf1, " \t\n");
++      if (!sp)
++          goto formaterr;
++      *sp = '\0';
++      sp++;
++
++      sp += strspn(sp, " \t\n"); 
+-int parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
++      if (*sp != '\0' && *(tab->flag))        
++          printval(tab, buf1, strtoul(sp, 0, 10));
++    }
++  return;
++  
++formaterr:
++  fprintf(stderr,_("error parsing %s\n"), filename);
++  return;
++}
++
++int parsesnmp(int flag_raw, int flag_tcp, int flag_udp, int flag_sctp)
+ {
+     FILE *f;
+-    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
++    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp; f_sctp = flag_sctp;
+     f = fopen("/proc/net/snmp", "r");
+     if (!f) {
+@@ -418,6 +467,16 @@
+     
+         fclose(f);
+     }
++
++    f = fopen("/proc/net/sctp/snmp", "r");
++    if (f) {
++      process_fd2(f,"/proc/net/sctp/snmp");
++      if (ferror(f))
++          perror("/proc/net/sctp/snmp");
++
++      fclose(f);
++    }
++
+     return(0);
+ }
+     
+--- net-tools-1.60/netstat.c.sctp      2006-04-13 10:06:45.000000000 -0400
++++ net-tools-1.60/netstat.c   2006-04-13 10:10:23.000000000 -0400
+@@ -58,6 +58,7 @@
+  *
+  *990420 {1.38} Tuan Hoang              removed a useless assignment from igmp_do_one()
+  *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale
++ *20050516 {1.40} Ivan Skytte Joergensen:Added SCTP support
+  *
+  *              This program is free software; you can redistribute it
+  *              and/or  modify it under  the terms of  the GNU General
+@@ -108,7 +109,7 @@
+ #endif
+ /* prototypes for statistics.c */
+-int parsesnmp(int, int, int);
++int parsesnmp(int, int, int, int);
+ void inittab(void);
+ typedef enum {
+@@ -119,6 +120,29 @@
+     SS_DISCONNECTING          /* in process of disconnecting  */
+ } socket_state;
++
++#define SCTP_NSTATES  9         /* The number of states in array*/
++
++static const char *sctp_state[] = {
++    N_("EMPTY"),
++    N_("CLOSED"),
++    N_("COOKIE_WAIT"),
++    N_("COOKIE_ECHOED"),
++    N_("ESTABLISHED"),
++    N_("SHUTDOWN_PENDING"),
++    N_("SHUTDOWN_SENT"),
++    N_("SHUTDOWN_RECEIVED"),
++    N_("SHUTDOWN_ACK_SENT")
++};
++
++#define SCTP_NTYPES 3           /* The number of types in array */
++
++static const char *sctp_type[] = {
++    N_("udp"),
++    N_("udp-high-bw"),
++    N_("tcp")
++};
++
+ #define SO_ACCEPTCON    (1<<16)       /* performed a listen           */
+ #define SO_WAITDATA     (1<<17)       /* wait data to read            */
+ #define SO_NOSPACE      (1<<18)       /* no space to write            */
+@@ -150,6 +174,7 @@
+ int flag_raw = 0;
+ int flag_tcp = 0;
+ int flag_udp = 0;
++int flag_sctp= 0;
+ int flag_igmp= 0;
+ int flag_rom = 0;
+ int flag_exp = 1;
+@@ -1189,6 +1214,365 @@
+              udp_do_one);
+ }
++static const char *sctp_socket_type_str(int type) {
++    if(type>=0 && type<SCTP_NTYPES)
++      return sctp_type[type];
++    else {
++      static char type_str_buf[64];
++      sprintf(type_str_buf,"UNKNOWN(%d)",type);
++      return type_str_buf;
++    }
++}
++
++static const char *sctp_state_str(int state)
++{
++    if(state>=0 && state<SCTP_NSTATES)
++      return sctp_state[state];
++    else {
++      static char state_str_buf[64];
++      sprintf(state_str_buf,"UNKNOWN(%d)",state);
++      return state_str_buf;
++    }
++}
++
++static const char *sctp_socket_state_str(int state)
++{
++    if(state>=0 && state<=10)
++        return tcp_state[state];
++    else {
++      static char state_str_buf[64];
++      sprintf(state_str_buf,"UNKNOWN(%d)",state);
++      return state_str_buf;
++    }
++}
++
++static struct aftype *process_sctp_addr_str(const char *addr_str, struct sockaddr *sa)
++{
++    if (strchr(addr_str,':')) {
++#if HAVE_AFINET6
++      extern struct aftype inet6_aftype;
++      /* Demangle what the kernel gives us */
++      struct in6_addr in6;
++      char addr6_str[INET6_ADDRSTRLEN];
++      unsigned u0,u1,u2,u3,u4,u5,u6,u7;
++      sscanf(addr_str, "%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",
++             &u0, &u1, &u2, &u3, &u4, &u5, &u6, &u7);
++      in6.s6_addr16[0] = htons(u0);
++      in6.s6_addr16[1] = htons(u1);
++      in6.s6_addr16[2] = htons(u2);
++      in6.s6_addr16[3] = htons(u3);
++      in6.s6_addr16[4] = htons(u4);
++      in6.s6_addr16[5] = htons(u5);
++      in6.s6_addr16[6] = htons(u6);
++      in6.s6_addr16[7] = htons(u7);
++
++      inet_ntop(AF_INET6, &in6, addr6_str, sizeof(addr6_str));
++      inet6_aftype.input(1, addr6_str, sa);
++      sa->sa_family = AF_INET6;
++#endif
++    } else {
++      ((struct sockaddr_in*)sa)->sin_addr.s_addr = inet_addr(addr_str);
++      sa->sa_family = AF_INET;
++    }
++    return get_afntype(sa->sa_family);
++}
++
++static void sctp_eps_do_one(int lnr, char *line)
++{
++    char buffer[1024];
++    int type, state, port;
++    int uid;
++    unsigned long inode;
++    
++    struct aftype *ap;
++#if HAVE_AFINET6
++    struct sockaddr_in6 localaddr;
++#else
++    struct sockaddr_in localaddr;
++#endif
++    const char *sty_str;
++    const char *sst_str;
++    const char *lport_str;
++    const char *uid_str;
++    const char *inode_str;
++    const char *pladdr_str;
++    char *laddrs_str;
++    
++    if(lnr == 0) {
++      /* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
++      return;
++    }
++    
++    strtok(line," \t\n"); /*skip ptr*/
++    strtok(0," \t\n");    /*skip ptr*/
++    sty_str = strtok(0," \t\n");
++    sst_str = strtok(0," \t\n");
++    strtok(0," \t\n"); /*skip hash bucket*/
++    lport_str=strtok(0," \t\n");
++    uid_str = strtok(0," \t\n");
++    inode_str = strtok(0," \t\n");
++    pladdr_str = strtok(0," \t\n");
++    laddrs_str=strtok(0,"\t\n");
++    
++    type = atoi(sty_str);
++    state = atoi(sst_str);
++    port = atoi(lport_str);
++    uid = atoi(uid_str);
++    inode = strtoul(inode_str,0,0);
++    
++    if(flag_sctp<=1) {
++      /* only print the primary address */
++      char local_addr[64];
++      char local_port[16];
++      
++      ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++      if(ap)
++          safe_strncpy(local_addr,
++                       ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                       sizeof(local_addr));
++      else
++          sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++      
++      snprintf(local_port, sizeof(local_port), "%s",
++               get_sname(htons(port), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++      
++      printf("sctp                ");
++      sprintf(buffer,"%s:%s", local_addr, local_port);
++      printf("%-47s", buffer);
++      printf(" %-12s", sctp_socket_state_str(state));
++    } else {
++      /*print all addresses*/
++      const char *this_local_addr;
++      int first=1;
++      char local_port[16];
++      snprintf(local_port, sizeof(local_port), "%s",
++               get_sname(htons(port), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++      for(this_local_addr=strtok(laddrs_str," \t\n");
++          this_local_addr;
++          this_local_addr=strtok(0," \t\n"))
++      {
++          char local_addr[64];
++          ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++          if(ap)
++              safe_strncpy(local_addr,
++                           ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                           sizeof(local_addr));
++          else
++              sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++          if(!first) printf("\n");
++          if(first)
++              printf("sctp                ");
++          else
++              printf("                    ");
++          sprintf(buffer,"%s:%s", local_addr, local_port);
++          printf("%-47s", buffer);
++          printf(" %-12s", first?sctp_socket_state_str(state):"");
++          first = 0;
++      }
++    }
++
++    finish_this_one(uid,inode,"");
++}
++
++static void sctp_assoc_do_one(int lnr, char *line)
++{
++    char buffer[1024];
++    int type, state, state2, lport,rport;
++    int uid;
++    unsigned rxqueue,txqueue;
++    unsigned long inode;
++    
++    struct aftype *ap;
++#if HAVE_AFINET6
++    struct sockaddr_in6 localaddr,remoteaddr;
++#else
++    struct sockaddr_in localaddr,remoteaddr;
++#endif
++    const char *sty_str;
++    const char *sst_str;
++    const char *st_str;
++    const char *txqueue_str;
++    const char *rxqueue_str;
++    const char *lport_str,*rport_str;
++    const char *uid_str;
++    const char *inode_str;
++    const char *pladdr_str;
++    char *laddrs_str;
++    const char *praddr_str;
++    char *raddrs_str;
++    
++    if(lnr == 0) {
++      /* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++      return;
++    }
++    
++    strtok(line," \t\n"); /*skip ptr*/
++    strtok(0," \t\n");    /*skip ptr*/
++    sty_str = strtok(0," \t\n");
++    sst_str = strtok(0," \t\n");
++    st_str = strtok(0," \t\n");
++    strtok(0," \t\n"); /*skip hash bucket*/
++    txqueue_str =  strtok(0," \t\n");
++    rxqueue_str =  strtok(0," \t\n");
++    uid_str = strtok(0," \t\n");
++    inode_str = strtok(0," \t\n");
++    lport_str=strtok(0," \t\n");
++    rport_str=strtok(0," \t\n");
++    pladdr_str = strtok(0," \t\n");
++    praddr_str = strtok(0," \t\n");
++    laddrs_str=strtok(0,"<->\t\n");
++    raddrs_str=strtok(0,"<->\t\n");
++
++    type = atoi(sty_str);
++    state = atoi(sst_str);
++    state2 = atoi(st_str);
++    txqueue = atoi(txqueue_str);
++    rxqueue = atoi(rxqueue_str);
++    uid = atoi(uid_str);
++    inode = strtoul(inode_str,0,0);
++    lport = atoi(lport_str);
++    rport = atoi(rport_str);
++    
++    if(flag_sctp<=1) {
++      /* only print the primary addresses */
++      char local_addr[64];
++      char local_port[16];
++      char remote_addr[64];
++      char remote_port[16];
++      
++      ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++      if(ap)
++          safe_strncpy(local_addr,
++                       ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                       sizeof(local_addr));
++      else
++          sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++      
++      snprintf(local_port, sizeof(local_port), "%s",
++               get_sname(htons(lport), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++      
++      ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
++      if(ap)
++          safe_strncpy(remote_addr,
++                       ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++                       sizeof(remote_addr));
++      else
++          sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++      
++      snprintf(remote_port, sizeof(remote_port), "%s",
++               get_sname(htons(rport), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++
++      printf("sctp");
++      printf("  %6u %6u ", rxqueue, txqueue);
++      sprintf(buffer,"%s:%s", local_addr, local_port);
++      printf("%-23s", buffer);
++      printf(" ");
++      sprintf(buffer,"%s:%s", remote_addr, remote_port);
++      printf("%-23s", buffer);
++      printf(" %-12s", sctp_socket_state_str(state));
++    } else {
++      /*print all addresses*/
++      const char *this_local_addr;
++      const char *this_remote_addr;
++      char *ss1,*ss2;
++      int first=1;
++      char local_port[16];
++      char remote_port[16];
++      snprintf(local_port, sizeof(local_port), "%s",
++               get_sname(htons(lport), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++      snprintf(remote_port, sizeof(remote_port), "%s",
++               get_sname(htons(rport), "sctp",
++                         flag_not & FLAG_NUM_PORT));
++
++      this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++      this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++      while(this_local_addr || this_remote_addr) {
++          char local_addr[64];
++          char remote_addr[64];
++          if(this_local_addr) {
++              ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++              if(ap)
++                  safe_strncpy(local_addr,
++                               ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                               sizeof(local_addr));
++              else
++                  sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++          }
++          if(this_remote_addr) {
++              ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++              if(ap)
++                  safe_strncpy(remote_addr,
++                               ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++                               sizeof(remote_addr));
++              else
++                  sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++          }
++
++          if(!first) printf("\n");
++          if(first)
++              printf("sctp  %6u %6u ", rxqueue, txqueue);
++          else
++              printf("                    ");
++          if(this_local_addr) {
++              if(first)
++                  sprintf(buffer,"%s:%s", local_addr, local_port);
++              else
++                  sprintf(buffer,"%s", local_addr);
++              printf("%-23s", buffer);
++          } else
++              printf("%-23s", "");
++          printf(" ");
++          if(this_remote_addr) {
++              if(first)
++                  sprintf(buffer,"%s:%s", remote_addr, remote_port);
++              else
++                  sprintf(buffer,"%s", remote_addr);
++              printf("%-23s", buffer);
++          } else
++              printf("%-23s", "");
++
++          printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++          first = 0;
++          this_local_addr=strtok_r(0," \t\n",&ss1);
++          this_remote_addr=strtok_r(0," \t\n",&ss2);
++      }
++    }
++
++    finish_this_one(uid,inode,"");
++}
++
++static int sctp_info_eps(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_EPS)
++#define       _PATH_PROCNET_SCTP_EPS  "/proc/net/sctp/eps"
++#endif
++    INFO_GUTS(_PATH_PROCNET_SCTP_EPS, "AF INET (sctp)",
++              sctp_eps_do_one);
++}
++
++static int sctp_info_assocs(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_ASSOCS)
++#define       _PATH_PROCNET_SCTP_ASSOCS       "/proc/net/sctp/assocs"
++#endif
++    INFO_GUTS(_PATH_PROCNET_SCTP_ASSOCS, "AF INET (sctp)",
++              sctp_assoc_do_one);
++}
++
++static int sctp_info(void)
++{
++    if(flag_all)
++      sctp_info_eps();
++    return sctp_info_assocs();
++}
++
+ static void raw_do_one(int lnr, const char *line)
+ {
+     char buffer[8192], local_addr[64], rem_addr[64];
+@@ -1742,7 +2126,7 @@
+     fprintf(stderr, _("        -Z, --context              display SELinux security context for sockets\n\n"));
+     fprintf(stderr, _("  <Iface>: Name of interface to monitor/list.\n"));
+-    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
++    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+     fprintf(stderr, _("  <AF>=Use '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+     fprintf(stderr, _("  List of possible address families (which support routing):\n"));
+     print_aflist(1); /* 1 = routeable */
+@@ -1769,6 +2153,7 @@
+       {"protocol", 1, 0, 'A'},
+       {"tcp", 0, 0, 't'},
+       {"udp", 0, 0, 'u'},
++      {"sctp", 0, 0, 'S' },
+       {"raw", 0, 0, 'w'},
+       {"unix", 0, 0, 'x'},
+       {"listening", 0, 0, 'l'},
+@@ -1801,7 +2186,7 @@
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZT", longopts, &lop)) != EOF)
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuSVv?wxlZT", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+@@ -1887,10 +2272,12 @@
+       case 't':
+           flag_tcp++;
+           break;
+-
+       case 'u':
+           flag_udp++;
+           break;
++      case 'S':
++          flag_sctp++;
++          break;
+       case 'w':
+           flag_raw++;
+           break;
+@@ -1932,13 +2319,13 @@
+     if (flag_int + flag_rou + flag_mas + flag_sta > 1)
+       usage();
+-    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))
+-      flag_tcp = flag_udp = flag_raw = 1;
++    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
++      flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
+-    if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
++    if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+         flag_inet = flag_inet6 = 1;
+-    flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
++    flag_arg = flag_tcp + flag_udp + flag_sctp + flag_raw + flag_unx + flag_ipx
+       + flag_ax25 + flag_netrom + flag_igmp + flag_x25;
+     
+     if (flag_mas) {
+@@ -1964,7 +2351,7 @@
+     if (flag_sta) {
+       for(;;) {
+         inittab();
+-      i = parsesnmp(flag_raw, flag_tcp, flag_udp);
++      i = parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+       
+       if(i || !flag_cnt)
+         break;
+@@ -2006,7 +2393,7 @@
+       return (i);
+     }
+     for (;;) {
+-      if (!flag_arg || flag_tcp || flag_udp || flag_raw) {
++      if (!flag_arg || flag_tcp || flag_udp || flag_sctp || flag_raw) {
+ #if HAVE_AFINET
+           prg_cache_load();
+           printf(_("Active Internet connections "));  /* xxx */
+@@ -2044,6 +2431,11 @@
+           if (i)
+               return (i);
+       }
++      if (!flag_arg || flag_sctp) {
++          i = sctp_info();
++          if (i)
++              return (i);
++      }
+       if (!flag_arg || flag_raw) {
+           i = raw_info();
+           if (i)
diff --git a/packaging/net-tools-1.60-selinux.patch b/packaging/net-tools-1.60-selinux.patch
new file mode 100644 (file)
index 0000000..811893a
--- /dev/null
@@ -0,0 +1,225 @@
+--- net-tools-1.60/Makefile~   2005-12-24 06:56:57.000000000 -0500
++++ net-tools-1.60/Makefile    2005-12-29 16:54:06.000000000 -0500
+@@ -113,6 +113,12 @@
+ NET_LIB = $(NET_LIB_PATH)/lib$(NET_LIB_NAME).a
++ifeq ($(HAVE_SELINUX),1)
++LDFLAGS += -lselinux
++CFLAGS += -DHAVE_SELINUX
++else
++endif
++
+ CFLAGS        += $(COPTS) -I. -idirafter ./include/ -I$(NET_LIB_PATH)
+ LDFLAGS       += $(LOPTS) -L$(NET_LIB_PATH)
+--- net-tools-1.60/netstat.c~  2005-12-24 06:56:57.000000000 -0500
++++ net-tools-1.60/netstat.c   2005-12-29 16:54:07.000000000 -0500
+@@ -86,6 +86,11 @@
+ #include <net/if.h>
+ #include <dirent.h>
++#if HAVE_SELINUX
++#include <selinux/selinux.h>
++#else
++#define security_context_t char*
++#endif
+ #include "net-support.h"
+ #include "pathnames.h"
+ #include "version.h"
+@@ -96,6 +101,7 @@
+ #include "util.h"
+ #define PROGNAME_WIDTH 20
++#define SELINUX_WIDTH 50
+ #if !defined(s6_addr32) && defined(in6a_words)
+ #define s6_addr32 in6a_words  /* libinet6                     */
+@@ -150,6 +156,7 @@
+ int flag_prg = 0;
+ int flag_arg = 0;
+ int flag_ver = 0;
++int flag_selinux = 0;
+ FILE *procinfo;
+@@ -213,12 +220,17 @@
+ #define PROGNAME_WIDTH1(s) PROGNAME_WIDTH2(s)
+ #define PROGNAME_WIDTH2(s) #s
++#define SELINUX_WIDTHs SELINUX_WIDTH1(SELINUX_WIDTH)
++#define SELINUX_WIDTH1(s) SELINUX_WIDTH2(s)
++#define SELINUX_WIDTH2(s) #s
++
+ #define PRG_HASH_SIZE 211
+ static struct prg_node {
+     struct prg_node *next;
+     int inode;
+     char name[PROGNAME_WIDTH];
++    char scon[SELINUX_WIDTH];
+ } *prg_hash[PRG_HASH_SIZE];
+ static char prg_cache_loaded = 0;
+@@ -226,9 +238,12 @@
+ #define PRG_HASHIT(x) ((x) % PRG_HASH_SIZE)
+ #define PROGNAME_BANNER "PID/Program name"
++#define SELINUX_BANNER "Security Context"
+ #define print_progname_banner() do { if (flag_prg) printf("%-" PROGNAME_WIDTHs "s"," " PROGNAME_BANNER); } while (0)
++#define print_selinux_banner() do { if (flag_selinux) printf("%-" SELINUX_WIDTHs "s"," " SELINUX_BANNER); } while (0)
++
+ #define PRG_LOCAL_ADDRESS "local_address"
+ #define PRG_INODE      "inode"
+ #define PRG_SOCKET_PFX    "socket:["
+@@ -250,7 +265,7 @@
+ /* NOT working as of glibc-2.0.7: */
+ #undef  DIRENT_HAVE_D_TYPE_WORKS
+-static void prg_cache_add(int inode, char *name)
++static void prg_cache_add(int inode, char *name, char *scon)
+ {
+     unsigned hi = PRG_HASHIT(inode);
+     struct prg_node **pnp,*pn;
+@@ -271,6 +286,14 @@
+     if (strlen(name)>sizeof(pn->name)-1) 
+       name[sizeof(pn->name)-1]='\0';
+     strcpy(pn->name,name);
++
++    {
++       int len=(strlen(scon)-sizeof(pn->scon))+1;
++       if (len > 0) 
++           strcpy(pn->scon,&scon[len+1]);
++       else
++         strcpy(pn->scon,scon);
++    }
+ }
+ static const char *prg_cache_get(unsigned long inode)
+@@ -283,6 +306,16 @@
+     return("-");
+ }
++static const char *prg_cache_get_con(unsigned long inode)
++{
++    unsigned hi=PRG_HASHIT(inode);
++    struct prg_node *pn;
++
++    for (pn=prg_hash[hi];pn;pn=pn->next)
++          if (pn->inode==inode) return(pn->scon);
++    return("-");
++}
++
+ static void prg_cache_clear(void)
+ {
+     struct prg_node **pnp,*pn;
+@@ -348,6 +381,7 @@
+     const char *cs,*cmdlp;
+     DIR *dirproc=NULL,*dirfd=NULL;
+     struct dirent *direproc,*direfd;
++    security_context_t scon=NULL;
+     if (prg_cache_loaded || !flag_prg) return;
+     prg_cache_loaded=1;
+@@ -415,7 +449,15 @@
+           }
+           snprintf(finbuf, sizeof(finbuf), "%s/%s", direproc->d_name, cmdlp);
+-          prg_cache_add(inode, finbuf);
++#if HAVE_SELINUX
++          if (getpidcon(atoi(direproc->d_name), &scon) == -1) {
++                  scon=strdup("-");
++          }
++          prg_cache_add(inode, finbuf, scon);
++          freecon(scon);
++#else
++          prg_cache_add(inode, finbuf, "-");
++#endif
+       }
+       closedir(dirfd); 
+       dirfd = NULL;
+@@ -1385,6 +1428,8 @@
+       printf("-      ");
+     if (flag_prg)
+       printf("%-" PROGNAME_WIDTHs "s",(has & HAS_INODE?prg_cache_get(inode):"-"));
++    if (flag_selinux)
++      printf("%-" SELINUX_WIDTHs "s",(has & HAS_INODE?prg_cache_get_con(inode):"-"));
+     puts(path);
+ }
+@@ -1403,6 +1448,7 @@
+     printf(_("\nProto RefCnt Flags       Type       State         I-Node"));
+     print_progname_banner();
++    print_selinux_banner();
+     printf(_(" Path\n"));     /* xxx */
+     {
+@@ -1682,6 +1728,7 @@
+     fprintf(stderr, _("        -o, --timers               display timers\n"));
+     fprintf(stderr, _("        -F, --fib                  display Forwarding Information Base (default)\n"));
+     fprintf(stderr, _("        -C, --cache                display routing cache instead of FIB\n\n"));
++    fprintf(stderr, _("        -Z, --context              display SELinux security context for sockets\n\n"));
+     fprintf(stderr, _("  <Iface>: Name of interface to monitor/list.\n"));
+     fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+@@ -1729,6 +1776,7 @@
+       {"cache", 0, 0, 'C'},
+       {"fib", 0, 0, 'F'},
+       {"groups", 0, 0, 'g'},
++      {"context", 0, 0, 'Z'},
+       {NULL, 0, 0, 0}
+     };
+@@ -1741,7 +1789,7 @@
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxl", longopts, &lop)) != EOF)
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphiI::nNorstuVv?wxlZ", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+@@ -1838,6 +1886,20 @@
+           if (aftrans_opt("unix"))
+               exit(1);
+           break;
++      case 'Z':
++#if HAVE_SELINUX
++          if (is_selinux_enabled() <= 0) {
++              fprintf(stderr, _("SELinux is not enabled on this machine.\n"));
++              exit(1);
++          }
++          flag_prg++;
++          flag_selinux++;
++#else
++            fprintf(stderr, _("SELinux is not enabled for this application.\n"));
++          exit(1);
++#endif
++
++          break;
+       case '?':
+       case 'h':
+           usage();
+--- net-tools-1.60/netstat.c.sel       2007-05-21 14:02:08.000000000 -0400
++++ net-tools-1.60/netstat.c   2007-05-21 14:03:23.000000000 -0400
+@@ -769,6 +769,9 @@ static void finish_this_one(int uid, uns
+     }
+     if (flag_prg)
+       printf("%-" PROGNAME_WIDTHs "s",prg_cache_get(inode));
++    if (flag_selinux)
++      printf("%-" SELINUX_WIDTHs "s",prg_cache_get_con(inode));
++
+     if (flag_opt)
+       printf("%s", timers);
+     putchar('\n');
+@@ -2420,6 +2423,7 @@ int main
+           if (flag_exp > 1)
+               printf(_(" User       Inode     "));
+           print_progname_banner();
++          print_selinux_banner();
+           if (flag_opt)
+               printf(_(" Timer"));    /* xxx */
+           printf("\n");
diff --git a/packaging/net-tools-1.60-siunits.patch b/packaging/net-tools-1.60-siunits.patch
new file mode 100644 (file)
index 0000000..cf6d89c
--- /dev/null
@@ -0,0 +1,80 @@
+--- net-tools-1.60/lib/interface.c.siunits     2004-03-14 12:11:22.000000000 -0600
++++ net-tools-1.60/lib/interface.c     2004-03-14 12:27:31.990679464 -0600
+@@ -262,7 +262,7 @@
+              &ife->stats.tx_compressed);
+       break;
+     case 2:
+-      sscanf(bp, "%llu %llu %lu %lu %lu %lu %llu %llu %lu %lu %lu %lu %lu",
++      sscanf(bp, "%Lu %llu %lu %lu %lu %lu %Lu %Lu %lu %lu %lu %lu %lu",
+              &ife->stats.rx_bytes,
+              &ife->stats.rx_packets,
+              &ife->stats.rx_errors,
+@@ -280,7 +280,7 @@
+       ife->stats.rx_multicast = 0;
+       break;
+     case 1:
+-      sscanf(bp, "%llu %lu %lu %lu %lu %llu %lu %lu %lu %lu %lu",
++      sscanf(bp, "%Lu %lu %lu %lu %lu %Lu %lu %lu %lu %lu %lu",
+              &ife->stats.rx_packets,
+              &ife->stats.rx_errors,
+              &ife->stats.rx_dropped,
+@@ -675,8 +675,8 @@
+     int hf;
+     int can_compress = 0;
+     unsigned long long rx, tx, short_rx, short_tx;
+-    char Rext[5]="b";
+-    char Text[5]="b";
++    const char *Rext = "b";
++    const char *Text = "b";
+ #if HAVE_AFIPX
+     static struct aftype *ipxtype = NULL;
+@@ -882,10 +882,44 @@
+       tx = ptr->stats.tx_bytes;
+       short_rx = rx * 10;  
+       short_tx = tx * 10;
+-      if (rx > 1048576) { short_rx /= 1048576;  strcpy(Rext, "Mb"); }
+-      else if (rx > 1024) { short_rx /= 1024;  strcpy(Rext, "Kb"); }
+-      if (tx > 1048576) { short_tx /= 1048576;  strcpy(Text, "Mb"); }
+-      else if (tx > 1024) { short_tx /= 1024;  strcpy(Text, "Kb"); }
++      if (rx > 1152921504606846976ull) {
++          short_rx /= 1152921504606846976ull;
++          Rext = "EiB";
++      } else if (rx > 1125899906842624ull) {
++          short_rx /= 1125899906842624ull;
++          Rext = "PiB";
++      } else if (rx > 1099511627776ull) {
++          short_rx /= 1099511627776ull;
++          Rext = "TiB";
++      } else if (rx > 1073741824ull) {
++          short_rx /= 1073741824ull;
++          Rext = "GiB";
++      } else if (rx > 1048576) {
++          short_rx /= 1048576;
++          Rext = "MiB";
++      } else if (rx > 1024) {
++          short_rx /= 1024;
++          Rext = "KiB";
++      }
++      if (tx > 1152921504606846976ull) {
++          short_tx /= 1152921504606846976ull;
++          Text = "EiB";
++      } else if (tx > 1125899906842624ull) {
++          short_tx /= 1125899906842624ull;
++          Text = "PiB";
++      } else if (tx > 1099511627776ull) {
++          short_tx /= 1099511627776ull;
++          Text = "TiB";
++      } else if (tx > 1073741824ull) {
++          short_tx /= 1073741824ull;
++          Text = "GiB";
++      } else if (tx > 1048576) {
++          short_tx /= 1048576;
++          Text = "MiB";
++      } else if (tx > 1024) {
++          short_tx /= 1024;
++          Text = "KiB";
++      }
+       printf("          ");
+       printf(_("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"),
diff --git a/packaging/net-tools-1.60-skip.patch b/packaging/net-tools-1.60-skip.patch
new file mode 100644 (file)
index 0000000..a634f43
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/netstat.c.skip      2006-08-07 10:45:25.000000000 +0200
++++ net-tools-1.60/netstat.c   2006-08-07 11:17:37.000000000 +0200
+@@ -444,6 +444,10 @@
+ #ifdef DIRENT_HAVE_D_TYPE_WORKS
+           if (direfd->d_type!=DT_LNK) 
+               continue;
++#else
++      /* Skip . and .. */
++          if (!isdigit(direfd->d_name[0])) 
++              continue;
+ #endif
+           if (procfdlen+1+strlen(direfd->d_name)+1>sizeof(line)) 
+               continue;
diff --git a/packaging/net-tools-1.60-statalias.patch b/packaging/net-tools-1.60-statalias.patch
new file mode 100644 (file)
index 0000000..7c74f74
--- /dev/null
@@ -0,0 +1,15 @@
+--- net-tools-1.60/lib/interface.c.statalias   2005-01-07 12:49:14.084104032 +0100
++++ net-tools-1.60/lib/interface.c     2005-01-07 12:49:38.527388088 +0100
+@@ -395,9 +395,11 @@
+       char *s, name[IFNAMSIZ];
+       s = get_name(name, buf);    
+       get_dev_fields(s, ife);
+-      ife->statistics_valid = 1;
+       if (target && !strcmp(target,name))
++      {
++              ife->statistics_valid = 1;
+               break;
++      }
+     }
+     if (ferror(fh)) {
+       perror(_PATH_PROCNET_DEV);
diff --git a/packaging/net-tools-1.60-statistics.patch b/packaging/net-tools-1.60-statistics.patch
new file mode 100644 (file)
index 0000000..d3a5649
--- /dev/null
@@ -0,0 +1,65 @@
+--- net-tools-1.60/statistics.c.tcpdata        2005-04-26 10:38:10.000000000 +0200
++++ net-tools-1.60/statistics.c        2005-04-26 10:36:19.000000000 +0200
+@@ -1,6 +1,6 @@
+ /*
+  * Copyright 1997,1999,2000 Andi Kleen. Subject to the GPL. 
+- * $Id: statistics.c,v 1.14 2001/02/02 18:01:23 pb Exp $
++ * $Id: statistics.c,v 1.17 2002/04/28 15:41:01 ak Exp $
+  * 19980630 - i18n - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 
+  * 19981113 - i18n fixes - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 
+  * 19990101 - added net/netstat, -t, -u, -w supprt - Bernd Eckenfels 
+@@ -185,6 +185,44 @@
+                           "directly queued to user"), opt_number },
+     { "SockMallocOOM", N_("Ran %lu times out of system memory during " 
+                         "packet sending"), opt_number }, 
++     { "TCPPureAcks", N_("%u acknowledgments not containing data received"), opt_number },
++     { "TCPHPAcks", N_("%u predicted acknowledgments"), opt_number },
++     { "TCPRenoRecovery", N_("%u times recovered from packet loss due to fast retransmit"), opt_number },
++     { "TCPSackRecovery", N_("%u times recovered from packet loss due to SACK data"), opt_number },
++     { "TCPSACKReneging", N_("%u bad SACKs received"), opt_number },
++     { "TCPFACKReorder", N_("Detected reordering %u times using FACK"), opt_number },
++     { "TCPSACKReorder", N_("Detected reordering %u times using SACK"), opt_number },
++     { "TCPTSReorder", N_("Detected reordering %u times using time stamp"), opt_number },
++     { "TCPRenoReorder", N_("Detected reordering %u times using reno fast retransmit"), opt_number },
++     { "TCPFullUndo", N_("%u congestion windows fully recovered"), opt_number }, 
++     { "TCPPartialUndo", N_("%u congestion windows partially recovered using Hoe heuristic"), opt_number },
++     { "TCPDSackUndo", N_("%u congestion window recovered using DSACK"), opt_number },
++     { "TCPLossUndo", N_("%u congestion windows recovered after partial ack"), opt_number },
++     { "TCPLostRetransmits", N_("%u retransmits lost"), opt_number },
++     { "TCPRenoFailures",  N_("%u timeouts after reno fast retransmit"), opt_number },
++     { "TCPSackFailures",  N_("%u timeouts after SACK recovery"), opt_number },
++     { "TCPLossFailures",  N_("%u timeouts in loss state"), opt_number },
++     { "TCPFastRetrans", N_("%u fast retransmits"), opt_number },
++     { "TCPForwardRetrans", N_("%u forward retransmits"), opt_number }, 
++     { "TCPSlowStartRetrans", N_("%u retransmits in slow start"), opt_number },
++     { "TCPTimeouts", N_("%u other TCP timeouts"), opt_number },
++     { "TCPRenoRecoveryFailed", N_("%u reno fast retransmits failed"), opt_number },
++     { "TCPSackRecoveryFail", N_("%u sack retransmits failed"), opt_number },
++     { "TCPSchedulerFailed", N_("%u times receiver scheduled too late for direct processing"), opt_number },
++     { "TCPRcvCollapsed", N_("%u packets collapsed in receive queue due to low socket buffer"), opt_number },
++     { "TCPDSACKOldSent", N_("%u DSACKs sent for old packets"), opt_number },
++     { "TCPDSACKOfoSent", N_("%u DSACKs sent for out of order packets"), opt_number },
++     { "TCPDSACKRecv", N_("%u DSACKs received"), opt_number },
++     { "TCPDSACKOfoRecv", N_("%u DSACKs for out of order packets received"), opt_number },
++     { "TCPAbortOnSyn", N_("%u connections reset due to unexpected SYN"), opt_number },
++     { "TCPAbortOnData", N_("%u connections reset due to unexpected data"), opt_number },
++     { "TCPAbortOnClose", N_("%u connections reset due to early user close"), opt_number },
++     { "TCPAbortOnMemory", N_("%u connections aborted due to memory pressure"), opt_number },
++     { "TCPAbortOnTimeout", N_("%u connections aborted due to timeout"), opt_number },
++     { "TCPAbortOnLinger", N_("%u connections aborted after user close in linger timeout"), opt_number },
++     { "TCPAbortFailed", N_("%u times unabled to send RST due to no memory"), opt_number }, 
++     { "TCPMemoryPressures", N_("TCP ran low on memory %u times"), opt_number }, 
++     { "TCPLoss", N_("%u TCP data loss events") },
+ };
+ struct tabtab {
+@@ -222,7 +260,8 @@
+           ent = bsearch(&key, tab->tab, tab->size / sizeof(struct entry),
+                         sizeof(struct entry), cmpentries);
+     if (!ent) {                       /* try our best */
+-      printf("%*s%s: %d\n", states[state].indent, "", title, val);
++      if (val) 
++              printf("%*s%s: %d\n", states[state].indent, "", title, val);
+       return;
+     }
+     type = ent->type;
diff --git a/packaging/net-tools-1.60-statistics_buffer.patch b/packaging/net-tools-1.60-statistics_buffer.patch
new file mode 100644 (file)
index 0000000..526c490
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up net-tools-1.60/statistics.c.old net-tools-1.60/statistics.c
+--- net-tools-1.60/statistics.c.old    2008-03-04 10:44:41.000000000 +0100
++++ net-tools-1.60/statistics.c        2008-03-04 10:44:11.000000000 +0100
+@@ -352,7 +352,7 @@ struct tabtab *newtable(struct tabtab *t
+ void process_fd(FILE *f,int file_desc)   // added file_desc to show propriate error mesg
+ {
+-    char buf1[1024], buf2[1024];
++    char buf1[2048], buf2[2048];
+     char *sp, *np, *p;
+     while (fgets(buf1, sizeof buf1, f)) {
+       int endflag;
diff --git a/packaging/net-tools-1.60-stdo.patch b/packaging/net-tools-1.60-stdo.patch
new file mode 100644 (file)
index 0000000..4c9d93e
--- /dev/null
@@ -0,0 +1,11 @@
+diff -urN net-tools-1.60/mii-tool.c net-tools-1.60.new/mii-tool.c
+--- net-tools-1.60/mii-tool.c  2000-05-21 16:31:17.000000000 +0200
++++ net-tools-1.60.new/mii-tool.c      2005-03-29 13:00:18.000000000 +0200
+@@ -302,6 +302,7 @@
+           printf("\n  link partner:%s", media_list(lkpar, 0));
+       printf("\n");
+     }
++    fflush(stdout);
+     return 0;
+ }
diff --git a/packaging/net-tools-1.60-trailingblank.patch b/packaging/net-tools-1.60-trailingblank.patch
new file mode 100644 (file)
index 0000000..8c75228
--- /dev/null
@@ -0,0 +1,26 @@
+--- net-tools-1.60/hostname.c.trailingblank    2001-04-08 19:04:23.000000000 +0200
++++ net-tools-1.60/hostname.c  2003-08-19 14:21:17.000000000 +0200
+@@ -153,13 +153,19 @@
+     switch (c) {
+     case 'a':
+-      while (hp->h_aliases[0])
+-          printf("%s ", *hp->h_aliases++);
++      while (hp->h_aliases[0]) {
++          printf("%s", *hp->h_aliases++);
++          if (hp->h_aliases[0])
++                printf(" ");
++      }
+       printf("\n");
+       break;
+     case 'i':
+-      while (hp->h_addr_list[0])
+-          printf("%s ", inet_ntoa(*(struct in_addr *) *hp->h_addr_list++));
++      while (hp->h_addr_list[0]) {
++          printf("%s", inet_ntoa(*(struct in_addr *) *hp->h_addr_list++));
++          if (hp->h_addr_list[0])
++                printf(" ");
++      }
+       printf("\n");
+       break;
+     case 'd':
diff --git a/packaging/net-tools-1.60-trim_iface.patch b/packaging/net-tools-1.60-trim_iface.patch
new file mode 100644 (file)
index 0000000..150722c
--- /dev/null
@@ -0,0 +1,31 @@
+--- net-tools-1.60/ifconfig.c.old      2005-03-30 10:14:03.000000000 +0200
++++ net-tools-1.60/ifconfig.c  2005-03-30 10:40:50.000000000 +0200
+@@ -177,7 +177,7 @@
+ static void usage(void)
+ {
+-    fprintf(stderr, _("Usage:\n  ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]\n"));
++    fprintf(stderr, _("Usage:\n  ifconfig [-a] [-v] [-s] <interface> [[<AF>] <address>]\n"));
+ #if HAVE_AFINET
+     fprintf(stderr, _("  [add <address>[/<prefixlen>]]\n"));
+     fprintf(stderr, _("  [del <address>[/<prefixlen>]]\n"));
+--- net-tools-1.60/lib/interface.c.old 2005-03-30 10:14:03.000000000 +0200
++++ net-tools-1.60/lib/interface.c     2005-03-30 11:05:38.000000000 +0200
+@@ -620,7 +620,7 @@
+ void ife_print_short(struct interface *ptr)
+ {
+-    printf("%-9.9s ", ptr->name);
++    printf("%-9s ", ptr->name);
+     printf("%5d %3d ", ptr->mtu, ptr->metric);
+     /* If needed, display the interface statistics. */
+     if (ptr->statistics_valid) {
+@@ -711,7 +711,7 @@
+     if (hw == NULL)
+       hw = get_hwntype(-1);
+-    printf(_("%-9.9s Link encap:%s  "), ptr->name, hw->title);
++    printf(_("%-9s Link encap:%s  "), ptr->name, hw->title);
+     /* For some hardware types (eg Ash, ATM) we don't print the 
+        hardware address if it's null.  */
+     if (hw->print != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
diff --git a/packaging/net-tools-1.60-trunc.patch b/packaging/net-tools-1.60-trunc.patch
new file mode 100644 (file)
index 0000000..9ff3c0b
--- /dev/null
@@ -0,0 +1,42 @@
+--- net-tools-1.60/netstat.c.trunc     2004-08-31 12:42:08.595426960 +0200
++++ net-tools-1.60/netstat.c   2004-08-31 12:59:55.766192344 +0200
+@@ -773,8 +773,8 @@
+                get_sname(htons(local_port), "tcp",
+                          flag_not & FLAG_NUM_PORT));
+-      if ((strlen(local_addr) + strlen(buffer)) > 22)
+-          local_addr[22 - strlen(buffer)] = '\0';
++      if ((strlen(local_addr) + strlen(buffer)) >= 27)
++          local_addr[27 - strlen(buffer) - 1] = '\0';
+       strcat(local_addr, ":");
+       strncat(local_addr, buffer, sizeof(local_addr));
+@@ -782,8 +782,8 @@
+       snprintf(buffer, sizeof(buffer), "%s",
+                get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
+-      if ((strlen(rem_addr) + strlen(buffer)) > 22)
+-          rem_addr[22 - strlen(buffer)] = '\0';
++      if ((strlen(rem_addr) + strlen(buffer)) >= 27)
++          rem_addr[27 - strlen(buffer) - 1] = '\0';
+       strcat(rem_addr, ":");
+       strncat(rem_addr, buffer, sizeof(rem_addr));
+@@ -816,7 +816,7 @@
+                        timer_run, (double) time_len / HZ, retr, timeout);
+               break;
+           }
+-      printf("tcp   %6ld %6ld %-23s %-23s %-12s",
++      printf("tcp   %6ld %6ld %-27s %-27s %-12s",
+              rxq, txq, local_addr, rem_addr, _(tcp_state[state]));
+       finish_this_one(uid,inode,timers);
+@@ -1770,7 +1770,7 @@
+             else
+               printf(_("(w/o servers)"));
+           }
+-          printf(_("\nProto Recv-Q Send-Q Local Address           Foreign Address         State      "));     /* xxx */
++          printf(_("\nProto Recv-Q Send-Q Local Address               Foreign Address             State      "));     /* xxx */
+           if (flag_exp > 1)
+               printf(_(" User       Inode     "));
+           print_progname_banner();
diff --git a/packaging/net-tools-1.60-ulong.patch b/packaging/net-tools-1.60-ulong.patch
new file mode 100644 (file)
index 0000000..bc7df29
--- /dev/null
@@ -0,0 +1,215 @@
+diff -urN net-tools-1.60/statistics.c net-tools-1.60-patch/statistics.c
+--- net-tools-1.60/statistics.c        2001-02-02 10:01:23.000000000 -0800
++++ net-tools-1.60-patch/statistics.c  2004-06-15 11:09:44.000000000 -0700
+@@ -63,54 +63,54 @@
+ struct entry Iptab[] =
+ {
+     {"Forwarding", N_("Forwarding is %s"), i_forward | I_STATIC},
+-    {"DefaultTTL", N_("Default TTL is %u"), number | I_STATIC},
+-    {"InReceives", N_("%u total packets received"), number},
+-    {"InHdrErrors", N_("%u with invalid headers"), opt_number},
+-    {"InAddrErrors", N_("%u with invalid addresses"), opt_number},
+-    {"ForwDatagrams", N_("%u forwarded"), number},
+-    {"InUnknownProtos", N_("%u with unknown protocol"), opt_number},
+-    {"InDiscards", N_("%u incoming packets discarded"), number},
+-    {"InDelivers", N_("%u incoming packets delivered"), number},
+-    {"OutRequests", N_("%u requests sent out"), number},      /*? */
+-    {"OutDiscards", N_("%u outgoing packets dropped"), opt_number},
+-    {"OutNoRoutes", N_("%u dropped because of missing route"), opt_number},
+-    {"ReasmTimeout", N_("%u fragments dropped after timeout"), opt_number},
+-    {"ReasmReqds", N_("%u reassemblies required"), opt_number},       /* ? */
+-    {"ReasmOKs", N_("%u packets reassembled ok"), opt_number},
+-    {"ReasmFails", N_("%u packet reassembles failed"), opt_number},
+-    {"FragOKs", N_("%u fragments received ok"), opt_number},
+-    {"FragFails", N_("%u fragments failed"), opt_number},
+-    {"FragCreates", N_("%u fragments created"), opt_number}
++    {"DefaultTTL", N_("Default TTL is %lu"), number | I_STATIC},
++    {"InReceives", N_("%lu total packets received"), number},
++    {"InHdrErrors", N_("%lu with invalid headers"), opt_number},
++    {"InAddrErrors", N_("%lu with invalid addresses"), opt_number},
++    {"ForwDatagrams", N_("%lu forwarded"), number},
++    {"InUnknownProtos", N_("%lu with unknown protocol"), opt_number},
++    {"InDiscards", N_("%lu incoming packets discarded"), number},
++    {"InDelivers", N_("%lu incoming packets delivered"), number},
++    {"OutRequests", N_("%lu requests sent out"), number},     /*? */
++    {"OutDiscards", N_("%lu outgoing packets dropped"), opt_number},
++    {"OutNoRoutes", N_("%lu dropped because of missing route"), opt_number},
++    {"ReasmTimeout", N_("%lu fragments dropped after timeout"), opt_number},
++    {"ReasmReqds", N_("%lu reassemblies required"), opt_number},      /* ? */
++    {"ReasmOKs", N_("%lu packets reassembled ok"), opt_number},
++    {"ReasmFails", N_("%lu packet reassembles failed"), opt_number},
++    {"FragOKs", N_("%lu fragments received ok"), opt_number},
++    {"FragFails", N_("%lu fragments failed"), opt_number},
++    {"FragCreates", N_("%lu fragments created"), opt_number}
+ };
+ struct entry Icmptab[] =
+ {
+-    {"InMsgs", N_("%u ICMP messages received"), number},
+-    {"InErrors", N_("%u input ICMP message failed."), number},
+-    {"InDestUnreachs", N_("destination unreachable: %u"), i_inp_icmp | I_TITLE},
+-    {"InTimeExcds", N_("timeout in transit: %u"), i_inp_icmp | I_TITLE},
+-    {"InParmProbs", N_("wrong parameters: %u"), i_inp_icmp | I_TITLE},        /*? */
+-    {"InSrcQuenchs", N_("source quenches: %u"), i_inp_icmp | I_TITLE},
+-    {"InRedirects", N_("redirects: %u"), i_inp_icmp | I_TITLE},
+-    {"InEchos", N_("echo requests: %u"), i_inp_icmp | I_TITLE},
+-    {"InEchoReps", N_("echo replies: %u"), i_inp_icmp | I_TITLE},
+-    {"InTimestamps", N_("timestamp request: %u"), i_inp_icmp | I_TITLE},
+-    {"InTimestampReps", N_("timestamp reply: %u"), i_inp_icmp | I_TITLE},
+-    {"InAddrMasks", N_("address mask request: %u"), i_inp_icmp | I_TITLE},    /*? */
+-    {"InAddrMaskReps", N_("address mask replies: %u"), i_inp_icmp | I_TITLE}, /*? */
+-    {"OutMsgs", N_("%u ICMP messages sent"), number},
+-    {"OutErrors", N_("%u ICMP messages failed"), number},
+-    {"OutDestUnreachs", N_("destination unreachable: %u"), i_outp_icmp | I_TITLE},
+-    {"OutTimeExcds", N_("time exceeded: %u"), i_outp_icmp | I_TITLE},
+-    {"OutParmProbs", N_("wrong parameters: %u"), i_outp_icmp | I_TITLE},      /*? */
+-    {"OutSrcQuenchs", N_("source quench: %u"), i_outp_icmp | I_TITLE},
+-    {"OutRedirects", N_("redirect: %u"), i_outp_icmp | I_TITLE},
+-    {"OutEchos", N_("echo request: %u"), i_outp_icmp | I_TITLE},
+-    {"OutEchoReps", N_("echo replies: %u"), i_outp_icmp | I_TITLE},
+-    {"OutTimestamps", N_("timestamp requests: %u"), i_outp_icmp | I_TITLE},
+-    {"OutTimestampReps", N_("timestamp replies: %u"), i_outp_icmp | I_TITLE},
+-    {"OutAddrMasks", N_("address mask requests: %u"), i_outp_icmp | I_TITLE},
+-    {"OutAddrMaskReps", N_("address mask replies: %u"), i_outp_icmp | I_TITLE},
++    {"InMsgs", N_("%lu ICMP messages received"), number},
++    {"InErrors", N_("%lu input ICMP message failed."), number},
++    {"InDestUnreachs", N_("destination unreachable: %lu"), i_inp_icmp | I_TITLE},
++    {"InTimeExcds", N_("timeout in transit: %lu"), i_inp_icmp | I_TITLE},
++    {"InParmProbs", N_("wrong parameters: %lu"), i_inp_icmp | I_TITLE},       /*? */
++    {"InSrcQuenchs", N_("source quenches: %lu"), i_inp_icmp | I_TITLE},
++    {"InRedirects", N_("redirects: %lu"), i_inp_icmp | I_TITLE},
++    {"InEchos", N_("echo requests: %lu"), i_inp_icmp | I_TITLE},
++    {"InEchoReps", N_("echo replies: %lu"), i_inp_icmp | I_TITLE},
++    {"InTimestamps", N_("timestamp request: %lu"), i_inp_icmp | I_TITLE},
++    {"InTimestampReps", N_("timestamp reply: %lu"), i_inp_icmp | I_TITLE},
++    {"InAddrMasks", N_("address mask request: %lu"), i_inp_icmp | I_TITLE},   /*? */
++    {"InAddrMaskReps", N_("address mask replies: %lu"), i_inp_icmp | I_TITLE},        /*? */
++    {"OutMsgs", N_("%lu ICMP messages sent"), number},
++    {"OutErrors", N_("%lu ICMP messages failed"), number},
++    {"OutDestUnreachs", N_("destination unreachable: %lu"), i_outp_icmp | I_TITLE},
++    {"OutTimeExcds", N_("time exceeded: %lu"), i_outp_icmp | I_TITLE},
++    {"OutParmProbs", N_("wrong parameters: %lu"), i_outp_icmp | I_TITLE},     /*? */
++    {"OutSrcQuenchs", N_("source quench: %lu"), i_outp_icmp | I_TITLE},
++    {"OutRedirects", N_("redirect: %lu"), i_outp_icmp | I_TITLE},
++    {"OutEchos", N_("echo request: %lu"), i_outp_icmp | I_TITLE},
++    {"OutEchoReps", N_("echo replies: %lu"), i_outp_icmp | I_TITLE},
++    {"OutTimestamps", N_("timestamp requests: %lu"), i_outp_icmp | I_TITLE},
++    {"OutTimestampReps", N_("timestamp replies: %lu"), i_outp_icmp | I_TITLE},
++    {"OutAddrMasks", N_("address mask requests: %lu"), i_outp_icmp | I_TITLE},
++    {"OutAddrMaskReps", N_("address mask replies: %lu"), i_outp_icmp | I_TITLE},
+ };
+ struct entry Tcptab[] =
+@@ -119,71 +119,71 @@
+     {"RtoMin", "", number},
+     {"RtoMax", "", number},
+     {"MaxConn", "", number},
+-    {"ActiveOpens", N_("%u active connections openings"), number},
+-    {"PassiveOpens", N_("%u passive connection openings"), number},
+-    {"AttemptFails", N_("%u failed connection attempts"), number},
+-    {"EstabResets", N_("%u connection resets received"), number},
+-    {"CurrEstab", N_("%u connections established"), number},
+-    {"InSegs", N_("%u segments received"), number},
+-    {"OutSegs", N_("%u segments send out"), number},
+-    {"RetransSegs", N_("%u segments retransmited"), number},
+-    {"InErrs", N_("%u bad segments received."), number},
+-    {"OutRsts", N_("%u resets sent"), number},
++    {"ActiveOpens", N_("%lu active connections openings"), number},
++    {"PassiveOpens", N_("%lu passive connection openings"), number},
++    {"AttemptFails", N_("%lu failed connection attempts"), number},
++    {"EstabResets", N_("%lu connection resets received"), number},
++    {"CurrEstab", N_("%lu connections established"), number},
++    {"InSegs", N_("%lu segments received"), number},
++    {"OutSegs", N_("%lu segments send out"), number},
++    {"RetransSegs", N_("%lu segments retransmited"), number},
++    {"InErrs", N_("%lu bad segments received."), number},
++    {"OutRsts", N_("%lu resets sent"), number},
+ };
+ struct entry Udptab[] =
+ {
+-    {"InDatagrams", N_("%u packets received"), number},
+-    {"NoPorts", N_("%u packets to unknown port received."), number},
+-    {"InErrors", N_("%u packet receive errors"), number},
+-    {"OutDatagrams", N_("%u packets sent"), number},
++    {"InDatagrams", N_("%lu packets received"), number},
++    {"NoPorts", N_("%lu packets to unknown port received."), number},
++    {"InErrors", N_("%lu packet receive errors"), number},
++    {"OutDatagrams", N_("%lu packets sent"), number},
+ };
+ struct entry Tcpexttab[] =
+ {
+-    {"SyncookiesSent", N_("%u SYN cookies sent"), opt_number},
+-    {"SyncookiesRecv", N_("%u SYN cookies received"), opt_number},
+-    {"SyncookiesFailed", N_("%u invalid SYN cookies received"), opt_number},
++    {"SyncookiesSent", N_("%lu SYN cookies sent"), opt_number},
++    {"SyncookiesRecv", N_("%lu SYN cookies received"), opt_number},
++    {"SyncookiesFailed", N_("%lu invalid SYN cookies received"), opt_number},
+-    { "EmbryonicRsts", N_("%u resets received for embryonic SYN_RECV sockets"),
++    { "EmbryonicRsts", N_("%lu resets received for embryonic SYN_RECV sockets"),
+       opt_number },  
+-    { "PruneCalled", N_("%u packets pruned from receive queue because of socket"
++    { "PruneCalled", N_("%lu packets pruned from receive queue because of socket"
+                       " buffer overrun"), opt_number },  
+     /* obsolete: 2.2.0 doesn't do that anymore */
+-    { "RcvPruned", N_("%u packets pruned from receive queue"), opt_number },
+-    { "OfoPruned", N_("%u packets dropped from out-of-order queue because of"
++    { "RcvPruned", N_("%lu packets pruned from receive queue"), opt_number },
++    { "OfoPruned", N_("%lu packets dropped from out-of-order queue because of"
+                     " socket buffer overrun"), opt_number }, 
+-    { "OutOfWindowIcmps", N_("%u ICMP packets dropped because they were "
++    { "OutOfWindowIcmps", N_("%lu ICMP packets dropped because they were "
+                            "out-of-window"), opt_number }, 
+-    { "LockDroppedIcmps", N_("%u ICMP packets dropped because"
++    { "LockDroppedIcmps", N_("%lu ICMP packets dropped because"
+                            " socket was locked"), opt_number },
+-    { "TW", N_("%u TCP sockets finished time wait in fast timer"), opt_number },
+-    { "TWRecycled", N_("%u time wait sockets recycled by time stamp"), opt_number }, 
+-    { "TWKilled", N_("%u TCP sockets finished time wait in slow timer"), opt_number },
+-    { "PAWSPassive", N_("%u passive connections rejected because of"
++    { "TW", N_("%lu TCP sockets finished time wait in fast timer"), opt_number },
++    { "TWRecycled", N_("%lu time wait sockets recycled by time stamp"), opt_number }, 
++    { "TWKilled", N_("%lu TCP sockets finished time wait in slow timer"), opt_number },
++    { "PAWSPassive", N_("%lu passive connections rejected because of"
+                       " time stamp"), opt_number },
+-    { "PAWSActive", N_("%u active connections rejected because of "
++    { "PAWSActive", N_("%lu active connections rejected because of "
+                      "time stamp"), opt_number },
+-    { "PAWSEstab", N_("%u packets rejects in established connections because of"
++    { "PAWSEstab", N_("%lu packets rejects in established connections because of"
+                     " timestamp"), opt_number },
+-    { "DelayedACKs", N_("%u delayed acks sent"), opt_number },
+-    { "DelayedACKLocked", N_("%u delayed acks further delayed because of"
++    { "DelayedACKs", N_("%lu delayed acks sent"), opt_number },
++    { "DelayedACKLocked", N_("%lu delayed acks further delayed because of"
+                            " locked socket"), opt_number },
+-    { "DelayedACKLost", N_("Quick ack mode was activated %u times"), opt_number },
+-    { "ListenOverflows", N_("%u times the listen queue of a socket overflowed"),
++    { "DelayedACKLost", N_("Quick ack mode was activated %lu times"), opt_number },
++    { "ListenOverflows", N_("%lu times the listen queue of a socket overflowed"),
+       opt_number },
+-    { "ListenDrops", N_("%u SYNs to LISTEN sockets ignored"), opt_number },
+-    { "TCPPrequeued", N_("%u packets directly queued to recvmsg prequeue."), 
++    { "ListenDrops", N_("%lu SYNs to LISTEN sockets ignored"), opt_number },
++    { "TCPPrequeued", N_("%lu packets directly queued to recvmsg prequeue."), 
+       opt_number },
+-    { "TCPDirectCopyFromBacklog", N_("%u packets directly received"
++    { "TCPDirectCopyFromBacklog", N_("%lu packets directly received"
+                                    " from backlog"), opt_number },
+-    { "TCPDirectCopyFromPrequeue", N_("%u packets directly received"
++    { "TCPDirectCopyFromPrequeue", N_("%lu packets directly received"
+                                     " from prequeue"), opt_number },
+-    { "TCPPrequeueDropped", N_("%u packets dropped from prequeue"), opt_number },
+-    { "TCPHPHits", N_("%u packets header predicted"), number },
+-    { "TCPHPHitsToUser", N_("%u packets header predicted and "
++    { "TCPPrequeueDropped", N_("%lu packets dropped from prequeue"), opt_number },
++    { "TCPHPHits", N_("%lu packets header predicted"), number },
++    { "TCPHPHitsToUser", N_("%lu packets header predicted and "
+                           "directly queued to user"), opt_number },
+-    { "SockMallocOOM", N_("Ran %u times out of system memory during " 
++    { "SockMallocOOM", N_("Ran %lu times out of system memory during " 
+                         "packet sending"), opt_number }, 
+ };
diff --git a/packaging/net-tools-1.60-virtualname.patch b/packaging/net-tools-1.60-virtualname.patch
new file mode 100644 (file)
index 0000000..326df1d
--- /dev/null
@@ -0,0 +1,36 @@
+--- net-tools-1.60/lib/interface.c.virtualname 2001-02-10 20:31:15.000000000 +0100
++++ net-tools-1.60/lib/interface.c     2003-08-19 13:18:01.000000000 +0200
+@@ -579,18 +579,18 @@
+ void ife_print_short(struct interface *ptr)
+ {
+-    printf("%-5.5s ", ptr->name);
+-    printf("%5d %3d", ptr->mtu, ptr->metric);
++    printf("%-9.9s ", ptr->name);
++    printf("%5d %3d ", ptr->mtu, ptr->metric);
+     /* If needed, display the interface statistics. */
+     if (ptr->statistics_valid) {
+-      printf("%8llu %6lu %6lu %6lu",
++      printf("%8llu %6lu %6lu %6lu ",
+              ptr->stats.rx_packets, ptr->stats.rx_errors,
+              ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors);
+       printf("%8llu %6lu %6lu %6lu ",
+              ptr->stats.tx_packets, ptr->stats.tx_errors,
+              ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors);
+     } else {
+-      printf("%-56s", _("     - no statistics available -"));
++      printf("%-60s", _("     - no statistics available -"));
+     }
+     /* DONT FORGET TO ADD THE FLAGS IN ife_print_long, too */
+     if (ptr->flags == 0)
+--- net-tools-1.60/netstat.c.virtualname       2001-04-15 16:41:17.000000000 +0200
++++ net-tools-1.60/netstat.c   2003-08-19 13:18:34.000000000 +0200
+@@ -1449,7 +1449,7 @@
+     }
+     if (flag_exp < 2) {
+       ife_short = 1;
+-      printf(_("Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
++      printf(_("Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg\n"));
+     }
+     if (for_all_interfaces(do_if_print, &flag_all) < 0) {
diff --git a/packaging/net-tools-1.60-x25-proc.patch b/packaging/net-tools-1.60-x25-proc.patch
new file mode 100644 (file)
index 0000000..0495caa
--- /dev/null
@@ -0,0 +1,13 @@
+--- net-tools-1.60/lib/pathnames.h.orig        2006-04-12 22:14:07.943885000 -0400
++++ net-tools-1.60/lib/pathnames.h     2006-04-12 22:19:34.072430000 -0400
+@@ -42,8 +42,8 @@
+ #define _PATH_PROCNET_RARP            "/proc/net/rarp"
+ #define _PATH_ETHERS                  "/etc/ethers"
+ #define _PATH_PROCNET_ROSE_ROUTE      "/proc/net/rose_routes"
+-#define _PATH_PROCNET_X25              "/proc/net/x25"
+-#define _PATH_PROCNET_X25_ROUTE                "/proc/net/x25_routes"
++#define _PATH_PROCNET_X25             "/proc/net/x25"
++#define _PATH_PROCNET_X25_ROUTE               "/proc/net/x25/route"
+ #define _PATH_PROCNET_DEV_MCAST               "/proc/net/dev_mcast"
+ /* pathname for the netlink device */
diff --git a/packaging/net-tools.manifest b/packaging/net-tools.manifest
new file mode 100644 (file)
index 0000000..aa2cfec
--- /dev/null
@@ -0,0 +1,9 @@
+<manifest>
+  <request>
+    <domain name="_"/>
+  </request>
+  <assign>
+    <filesystem path="/bin/*" exec_label="none" />
+    <filesystem path="/sbin/*" exec_label="none" />
+  </assign>
+</manifest>
diff --git a/packaging/net-tools.spec b/packaging/net-tools.spec
new file mode 100755 (executable)
index 0000000..9d77d07
--- /dev/null
@@ -0,0 +1,285 @@
+#specfile originally created for Fedora, modified for Moblin Linux
+%define npversion      1.2.9
+
+Summary: Basic networking tools
+Name: net-tools
+Version: 1.60
+Release: 87.3
+License: GPL+
+Group: System/Base
+URL: http://www.tazenda.demon.co.uk/phil/net-tools/
+Source0: http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-%{version}.tar.bz2
+Source1: http://www.red-bean.com/~bos/netplug/netplug-%{npversion}.tar.bz2
+Source2: net-tools-%{version}-config.h
+Source3: net-tools-%{version}-config.make
+Source4: ether-wake.c
+Source5: ether-wake.8
+Source6: mii-diag.c
+Source7: mii-diag.8
+Source1001: %{name}.manifest
+Patch1: net-tools-1.57-bug22040.patch
+Patch2: net-tools-1.60-miiioctl.patch
+Patch3: net-tools-1.60-manydevs.patch
+Patch4: net-tools-1.60-virtualname.patch
+Patch5: net-tools-1.60-cycle.patch
+Patch6: net-tools-1.60-nameif.patch
+Patch7: net-tools-1.60-ipx.patch
+Patch8: net-tools-1.60-inet6-lookup.patch
+Patch9: net-tools-1.60-man.patch
+Patch10: net-tools-1.60-gcc33.patch
+Patch11: net-tools-1.60-trailingblank.patch
+Patch12: net-tools-1.60-interface.patch
+Patch14: net-tools-1.60-gcc34.patch
+Patch15: net-tools-1.60-overflow.patch
+Patch19: net-tools-1.60-siunits.patch
+Patch20: net-tools-1.60-trunc.patch
+Patch21: net-tools-1.60-return.patch
+Patch22: net-tools-1.60-parse.patch
+Patch23: net-tools-1.60-netmask.patch
+Patch24: net-tools-1.60-ulong.patch
+Patch25: net-tools-1.60-bcast.patch
+Patch26: net-tools-1.60-mii-tool-obsolete.patch
+Patch27: net-tools-1.60-netstat_ulong.patch
+Patch28: net-tools-1.60-note.patch
+Patch29: net-tools-1.60-num-ports.patch
+Patch30: net-tools-1.60-duplicate-tcp.patch
+Patch31: net-tools-1.60-statalias.patch
+Patch32: net-tools-1.60-isofix.patch
+Patch33: net-tools-1.60-bitkeeper.patch
+Patch34: net-tools-1.60-ifconfig_ib.patch
+Patch35: net-tools-1.60-de.patch
+Patch36: netplug-1.2.9-execshield.patch
+Patch37: net-tools-1.60-pie.patch
+Patch38: net-tools-1.60-ifaceopt.patch
+Patch39: net-tools-1.60-trim_iface.patch
+Patch40: net-tools-1.60-stdo.patch
+Patch41: net-tools-1.60-statistics.patch
+Patch42: net-tools-1.60-ifconfig.patch
+Patch43: net-tools-1.60-arp_overflow.patch
+Patch44: net-tools-1.60-hostname_man.patch
+Patch45: net-tools-1.60-interface_stack.patch
+Patch46: net-tools-1.60-selinux.patch
+Patch47: net-tools-1.60-netstat_stop_trim.patch
+Patch48: net-tools-1.60-netstat_inode.patch
+Patch49: net-tools-1.60-fgets.patch
+Patch50: net-tools-1.60-ifconfig_man.patch
+Patch51: net-tools-1.60-x25-proc.patch
+Patch52: net-tools-1.60-sctp.patch
+Patch53: net-tools-1.60-arp_man.patch
+Patch54: net-tools-1.60-ifconfig-long-iface-crasher.patch
+Patch55: net-tools-1.60-netdevice.patch
+Patch56: net-tools-1.60-skip.patch
+Patch57: net-tools-1.60-netstat-I-fix.patch
+Patch58: net-tools-1.60-nameif_strncpy.patch
+Patch59: net-tools-1.60-arp-unaligned-access.patch
+Patch60: net-tools-1.60-sctp-quiet.patch
+Patch61: net-tools-1.60-remove_node.patch
+Patch62: net-tools-1.60-netstat-interfaces-crash.patch
+Patch63: net-tools-1.60-netplugd_init.patch
+Patch64: net-tools-1.60-ec_hw_null.patch
+Patch65: net-tools-1.60-statistics_buffer.patch
+Patch66: net-tools-1.60-sctp-addrs.patch
+Patch67: net-tools-1.60-i-option.patch
+Patch68: net-tools-1.60-a-option.patch
+Patch69: net-tools-1.60-clear-flag.patch
+Patch70: net-tools-1.60-metric-tunnel-man.patch
+Patch71: net-tools-1.60-netstat-probe.patch
+Patch72: net-tools-1.60-ip.patch
+
+BuildRequires: gettext-tools
+
+%description
+The net-tools package contains basic networking tools, including
+ifconfig, netstat, route, and others.
+
+%package extra
+Summary: Extra goodies from net-tools package
+Group: System/Base
+
+%description extra
+net-tools extra goodies, including not-so commonly needed tools
+(netplugd, nisdomainname, ether-wake, ipmaddr, mii-diag and mii-tool,
+plipconfig and slattach), translations of the man pages and
+localized support.
+
+%prep
+%setup -q -a 1
+%patch1 -p1 -b .bug22040
+%patch2 -p1 -b .miiioctl
+%patch3 -p0 -b .manydevs
+%patch4 -p1 -b .virtualname
+%patch5 -p1 -b .cycle
+%patch6 -p1 -b .nameif
+%patch7 -p1 -b .ipx
+%patch8 -p1 -b .inet6-lookup
+%patch9 -p1 -b .man
+%patch10 -p1 -b .gcc33
+%patch11 -p1 -b .trailingblank
+%patch12 -p1 -b .interface
+%patch14 -p1 -b .gcc34
+%patch15 -p1 -b .overflow
+%patch19 -p1 -b .siunits
+%patch20 -p1 -b .trunc
+%patch21 -p1 -b .return
+%patch22 -p1 -b .parse
+%patch23 -p1 -b .netmask
+%patch24 -p1 -b .ulong
+%patch25 -p1 -b .bcast
+%patch26 -p1 -b .obsolete
+%patch27 -p1 -b .netstat_ulong
+%patch28 -p1 -b .note
+%patch29 -p1 -b .num-ports
+%patch30 -p1 -b .dup-tcp
+%patch31 -p1 -b .statalias
+%patch32 -p1 -b .isofix
+%patch33 -p1 -b .bitkeeper
+%patch34 -p1 -b .ifconfig_ib
+%patch35 -p1
+%patch36 -p1 -b .execshield
+%patch37 -p1 -b .pie
+%patch38 -p1 -b .ifaceopt
+%patch39 -p1 -b .trim-iface
+%patch40 -p1 -b .stdo
+%patch41 -p1 -b .statistics
+%patch42 -p1 -b .iface_drop
+%patch43 -p1 -b .overflow
+%patch44 -p1 -b .hostname_man
+%patch45 -p0 -b .stack
+%patch46 -p1 -b .selinux
+%patch47 -p1 -b .trim
+%patch48 -p1 -b .inode
+%patch49 -p1 -b .fgets
+%patch50 -p1 -b .inet_addr
+%patch51 -p1 -b .x25
+%patch52 -p1 -b .sctp
+%patch53 -p1
+%patch54 -p1 -b .long_iface
+%patch55 -p1 -b .netdevice
+%patch56 -p1 -b .skip
+%patch57 -p1
+%patch58 -p1 -b .strncpy
+%patch59 -p1 -b .arp-un-access
+%patch60 -p1 -b .quiet
+%patch61 -p1
+%patch62 -p1 -b .iface-crash
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1 -b .buffer
+%patch66 -p1 -b .sctp-addrs
+%patch67 -p1 -b .i-option
+%patch68 -p1 -b .a-option
+%patch69 -p1 -b .clear-flag
+%patch70 -p1 -b .metric-tunnel-man
+%patch71 -p1 -b .probe
+
+# after splitting the kernel header package, this is not needed anymore?
+%patch72 -p1 -b .iptunnel
+
+
+cp %SOURCE2 ./config.h
+cp %SOURCE3 ./config.make
+cp %SOURCE4 .
+cp %SOURCE5 ./man/en_US
+cp %SOURCE6 .
+cp %SOURCE7 ./man/en_US
+
+
+
+%build
+cp %{SOURCE1001} .
+sed -i "s/HAVE_SELINUX=1/HAVE_SELINUX=0/g" ./config.make
+make
+gcc $RPM_OPT_FLAGS -o ether-wake ether-wake.c
+gcc $RPM_OPT_FLAGS -o mii-diag mii-diag.c
+
+%install
+
+make BASEDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
+
+install -m 755 ether-wake %{buildroot}/sbin
+install -m 755 mii-diag %{buildroot}/sbin
+
+
+rm %{buildroot}/sbin/rarp
+rm -rf %{buildroot}%{_mandir}/*/man*
+
+
+%find_lang %{name}
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
+for keyword in LICENSE COPYING COPYRIGHT;
+do
+       for file in `find %{_builddir} -name $keyword`;
+       do
+               cat $file >> $RPM_BUILD_ROOT%{_datadir}/license/%{name};
+               echo "";
+       done;
+done
+
+%docs_package
+
+%lang_package
+
+%files
+%defattr(-,root,root,-)
+%manifest %{name}.manifest
+%{_datadir}/license/%{name}
+/bin/*
+/sbin/*
+%exclude /bin/nisdomainname
+%exclude /bin/ypdomainname
+%exclude /sbin/ether-wake
+%exclude /sbin/ipmaddr
+%exclude /sbin/mii-diag
+%exclude /sbin/mii-tool
+%exclude /sbin/plipconfig
+%exclude /sbin/slattach
+%doc COPYING
+
+%files extra
+/bin/nisdomainname
+/bin/ypdomainname
+/sbin/ether-wake
+/sbin/ipmaddr
+/sbin/mii-diag
+/sbin/mii-tool
+/sbin/plipconfig
+/sbin/slattach
+
+%changelog
+* Fri Nov 02 2011 Wa-Lyong Cho <walyong.cho@samung.com> - 1.60
+- Add default manifest file.
+* Fri May 27 2011 Anas Nashif <anas.nashif@intel.com> - 1.60
+- Refined auto-documentation
+* Tue May 24 2011 Anas Nashif <anas.nashif@intel.com> - 1.60
+- Remove dependency on chkconfig
+- Repackage documentation/translations
+* Sat Apr 10 2010 Anas Nashif <anas.nashif@intel.com> - 1.60
+- Fixed rpmlint errors
+* Thu Jul 16 2009 Anas Nashif <anas.nashif@intel.com> - 1.60
+- Make it build with new kernel headers
+* Fri Jan  9 2009 Anas Nashif <anas.nashif@intel.com> 1.60
+- Fixed tunnel headers
+* Mon Dec  8 2008 Iñaky Pérez-González <inaky.perez-gonzalez@intel.com> 1.60
+- fold doc/man pages back into main and -extra packages
+- move localized material to -extra
+- fix locale path specification so that the RPM doesn't include the
+  directories, just the files.
+* Fri Dec  5 2008 Anas Nashif <anas.nashif@intel.com> 1.60
+- Kernel headers change, patch for iptunnel not needed
+* Thu Dec  4 2008 Iñaky Pérez-González <inaky.perez-gonzalez@intel.com> 1.60
+- net-tools: clean up spec, split up into -extras and -doc
+  * Move all documentation and xlations to -doc
+  * Move unneeded binaries and netplugd service to -extras.
+* Fri Nov 28 2008 Anas Nashif <anas.nashif@intel.com> 1.60
+- fixed compile error with new kernel headers
+* Fri Nov 28 2008 Anas Nashif <anas.nashif@intel.com> 1.60
+- Fixes from Fedora:
+  * fixed tcp timers info in netstat (#466845)
+  * fixed ifconfig's man page (#454271, #432328)
+  * fixed man pages for arp (#446195)
+  * fixed netstat --interfaces option (#446187)
+  * fixed clearing flags in ifconfig (#450252)
+  * netstat displays correct sctp statistics (#445535) <zprikryl@redhat.com>
+* Wed Jul 23 2008 Martin Xu <martin.xu@intel.com>
+- add %%doc to man file
diff --git a/packaging/netplug-1.2.9-execshield.patch b/packaging/netplug-1.2.9-execshield.patch
new file mode 100644 (file)
index 0000000..d7e66e2
--- /dev/null
@@ -0,0 +1,164 @@
+--- net-tools-1.60/netplug-1.2.9/if_info.c.execshield  2005-01-08 06:57:08.000000000 +0100
++++ net-tools-1.60/netplug-1.2.9/if_info.c     2005-02-28 14:43:05.596799288 +0100
+@@ -95,15 +95,16 @@
+     return buf;
+ }
+-void
+-for_each_iface(int (*func)(struct if_info *))
++struct if_info *
++for_each_iface(int (*func)(struct if_info *, long), long param)
+ {
+     for(int i = 0; i < INFOHASHSZ; i++) {
+         for(struct if_info *info = if_info[i]; info != NULL; info = info->next) {
+-            if ((*func)(info))
+-                return;
++            if ((*func)(info, param))
++                return info;
+         }
+     }
++    return NULL;
+ }
+ /* Reevaluate the state machine based on the current state and flag settings */
+@@ -285,22 +286,20 @@
+ }
+ /* handle a script termination and update the state accordingly */
++int find_pid(struct if_info *i, long param) {
++    if (i->worker == param) {
++        return 1;
++    }
++    return 0;
++}
++
+ void ifsm_scriptdone(pid_t pid, int exitstatus)
+ {
+     int exitok = WIFEXITED(exitstatus) && WEXITSTATUS(exitstatus) == 0;
+     struct if_info *info;
+     assert(WIFEXITED(exitstatus) || WIFSIGNALED(exitstatus));
+-    int find_pid(struct if_info *i) {
+-        if (i->worker == pid) {
+-            info = i;
+-            return 1;
+-        }
+-        return 0;
+-    }
+-
+-    info = NULL;
+-    for_each_iface(find_pid);
++    info = for_each_iface(find_pid, pid);
+     if (info == NULL) {
+         do_log(LOG_INFO, "Unexpected child %d exited with status %d",
+--- net-tools-1.60/netplug-1.2.9/netplug.h.execshield  2005-01-08 06:57:09.000000000 +0100
++++ net-tools-1.60/netplug-1.2.9/netplug.h     2005-02-28 14:43:05.597799136 +0100
+@@ -83,7 +83,7 @@
+                                          struct rtattr *attrs[]);
+ int if_info_save_interface(struct nlmsghdr *hdr, void *arg);
+ void parse_rtattrs(struct rtattr *tb[], int max, struct rtattr *rta, int len);
+-void for_each_iface(int (*func)(struct if_info *));
++struct if_info *for_each_iface(int (*func)(struct if_info *, long), long param);
+ void ifsm_flagpoll(struct if_info *info);
+ void ifsm_flagchange(struct if_info *info, unsigned int newflags);
+--- net-tools-1.60/netplug-1.2.9/Makefile.execshield   2005-02-28 14:43:05.000000000 +0100
++++ net-tools-1.60/netplug-1.2.9/Makefile      2005-02-28 14:47:42.123760800 +0100
+@@ -9,8 +9,8 @@
+ install_opts :=
+-CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
+-      -DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
++CFLAGS += -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
++      -DNP_SCRIPT_DIR='"$(scriptdir)"' -DNP_VERSION='"$(version)"'
+ netplugd: config.o netlink.o lib.o if_info.o main.o
+       $(CC) $(LDFLAGS) -o $@ $^
+--- net-tools-1.60/netplug-1.2.9/main.c.execshield     2005-01-08 06:57:09.000000000 +0100
++++ net-tools-1.60/netplug-1.2.9/main.c        2005-02-28 14:43:05.599798832 +0100
+@@ -161,11 +161,28 @@
+     ce.pid = info->si_pid;
+     ret = waitpid(info->si_pid, &ce.status, 0);
+     if (ret == info->si_pid)
+-        write(child_handler_pipe[1], &ce, sizeof(ce));
++        (void)write(child_handler_pipe[1], &ce, sizeof(ce));
+ }
+ /* Poll the existing interface state, so we can catch any state
+    changes for which we may not have neen a netlink message. */
++static int pollflags(struct if_info *info, long param) {
++    struct ifreq ifr;
++
++    if (!if_match(info->name))
++        return 0;
++
++    memcpy(ifr.ifr_name, info->name, sizeof(ifr.ifr_name));
++    if (ioctl(param, SIOCGIFFLAGS, &ifr) < 0)
++        do_log(LOG_ERR, "%s: can't get flags: %m", info->name);
++    else {
++        ifsm_flagchange(info, ifr.ifr_flags);
++        ifsm_flagpoll(info);
++    }
++
++    return 0;
++}
++
+ static void
+ poll_interfaces(void)
+ {
+@@ -180,24 +197,13 @@
+         close_on_exec(sockfd);
+     }
+-    int pollflags(struct if_info *info) {
+-        struct ifreq ifr;
+-
+-        if (!if_match(info->name))
+-            return 0;
+-
+-        memcpy(ifr.ifr_name, info->name, sizeof(ifr.ifr_name));
+-        if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0)
+-            do_log(LOG_ERR, "%s: can't get flags: %m", info->name);
+-        else {
+-            ifsm_flagchange(info, ifr.ifr_flags);
+-            ifsm_flagpoll(info);
+-        }
+-
+-        return 0;
+-    }
++    for_each_iface(pollflags, sockfd);
++}
+-    for_each_iface(pollflags);
++static int poll_flags(struct if_info *i, long param) {
++    if (if_match(i->name))
++        ifsm_flagpoll(i);
++    return 0;
+ }
+ int debug = 0;
+@@ -331,17 +337,11 @@
+         { child_handler_pipe[0], POLLIN, 0 },
+     };
+-    {
+-        /* Run over each of the interfaces we know and care about, and
+-           make sure the state machine has done the appropriate thing
+-           for their current state. */
+-        int poll_flags(struct if_info *i) {
+-            if (if_match(i->name))
+-                ifsm_flagpoll(i);
+-            return 0;
+-        }
+-        for_each_iface(poll_flags);
+-    }
++    /* Run over each of the interfaces we know and care about, and
++       make sure the state machine has done the appropriate thing
++       for their current state. */
++    for_each_iface(poll_flags, 0);
++
+     for(;;) {
+         int ret;
diff --git a/packaging/netplug-1.2.9.tar.bz2 b/packaging/netplug-1.2.9.tar.bz2
new file mode 100644 (file)
index 0000000..93c9655
Binary files /dev/null and b/packaging/netplug-1.2.9.tar.bz2 differ
diff --git a/plipconfig.c b/plipconfig.c
new file mode 100644 (file)
index 0000000..1f972a7
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+
+   plipconfig.c: plip-ifconfig program for the Linux PLIP device driver
+   Copyright (c) 1994 John Paul Morrison (VE7JPM).
+
+   version 0.2
+   
+   Changed by Alan Cox, to reflect the way SIOCDEVPRIVATE is meant to work
+   and for the extra parameter added by Niibe.
+
+   plipconfig is a quick hack to set PLIP parameters by using driver
+   ioctls.  plipconfig will no doubt be revised many times as the Linux
+   PLIP driver and Linux 1.1 mutates.
+
+*/
+
+/*
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License version 2, as
+   published by the Free Software Foundation.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 675 Mass Ave, Cambridge MA 02139, USA.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <linux/if_plip.h>
+
+#include "config.h"
+#include "intl.h"
+#include "net-support.h"
+#include "version.h"
+
+int opt_a = 0;
+int opt_i = 0;
+int opt_v = 0;
+int skfd = -1;
+
+struct ifreq ifr;
+struct plipconf *plip;
+
+char *Release = RELEASE,
+     *Version = "plipconfig 0.2",
+     *Signature = "John Paul Morrison, Alan Cox et al.";
+
+static void version(void)
+{
+    printf("%s\n%s\n%s\n", Release, Version, Signature);
+    exit(E_VERSION);
+}
+
+void usage(void)
+{
+    fprintf(stderr, _("Usage: plipconfig [-a] [-i] [-v] interface\n"));
+    fprintf(stderr, _("                  [nibble NN] [trigger NN]\n"));
+    fprintf(stderr, _("       plipconfig -V | --version\n"));
+    exit(-1);
+}
+
+void print_plip(void)
+{
+    printf(_("%s\tnibble %lu  trigger %lu\n"), ifr.ifr_name, plip->nibble, plip->trigger);
+}
+
+int main(int argc, char **argv)
+{
+    int ret = 0;
+    char **spp;
+
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+
+    if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+       perror("socket");
+       exit(-1);
+    }
+    /* Find any options. */
+    argc--;
+    argv++;
+    while (argv[0] && *argv[0] == '-') {
+       if (!strcmp(*argv, "-a"))
+           opt_a = 1;
+       if (!strcmp(*argv, "-v"))
+           opt_v = 1;
+       if (!strcmp(*argv, "-V") || !strcmp(*argv, "--version"))
+           version();
+       argv++;
+       argc--;
+    }
+
+    if (argc == 0)
+       usage();
+
+    spp = argv;
+    strncpy(ifr.ifr_name, *spp++, IFNAMSIZ);
+    plip=(struct plipconf *)&ifr.ifr_data;
+
+    plip->pcmd = PLIP_GET_TIMEOUT;     /* get current settings for device */
+    if (ioctl(skfd, SIOCDEVPLIP, &ifr) < 0) {
+       perror("ioctl");
+       exit(-1);
+    }
+    if (*spp == (char *) NULL) {
+       print_plip();
+       (void) close(skfd);
+       exit(0);
+    }
+    while (*spp != (char *) NULL) {
+       if (!strcmp(*spp, "nibble")) {
+           if (*++spp == NULL)
+               usage();
+           plip->nibble = atoi(*spp);
+           spp++;
+           continue;
+       }
+       if (!strcmp(*spp, "trigger")) {
+           if (*++spp == NULL)
+               usage();
+           plip->trigger = atoi(*spp);
+           spp++;
+           continue;
+       }
+       usage();
+    }
+
+    plip->pcmd = PLIP_SET_TIMEOUT;
+    if (ioctl(skfd, SIOCDEVPLIP, &ifr) < 0)
+       perror("ioctl");
+
+    print_plip();
+
+    /* Close the socket. */
+    (void) close(skfd);
+
+    return (ret);
+}
diff --git a/po/.cvsignore b/po/.cvsignore
new file mode 100644 (file)
index 0000000..cd1f2c9
--- /dev/null
@@ -0,0 +1 @@
+*.mo
diff --git a/po/Makefile b/po/Makefile
new file mode 100644 (file)
index 0000000..0fdf82d
--- /dev/null
@@ -0,0 +1,79 @@
+INSTALL=install -c
+INSTALL_PROGRAM= ${INSTALL}
+INSTALL_DATA= ${INSTALL} -m 644
+INSTALLNLSDIR=${BASEDIR}/usr/share/locale
+
+TUPDATE = tupdate
+
+NLSPACKAGE = net-tools
+
+-include ../config.make
+ifeq ($(I18N),1)
+CATALOGS = de.mo fr.mo pt_BR.mo et_EE.mo cs.mo
+else
+CATALOGS =
+endif
+
+POTFILES=../arp.c ../hostname.c ../ifconfig.c ../netstat.c ../rarp.c \
+       ../route.c ../plipconfig.c ../iptunnel.c ../statistics.c \
+       ../lib/activate.c ../lib/af.c ../lib/arcnet.c ../lib/ash.c \
+       ../lib/ax25.c ../lib/ax25_gr.c ../lib/ddp.c ../lib/ddp_gr.c \
+       ../lib/econet.c ../lib/ether.c ../lib/fddi.c ../lib/frame.c \
+       ../lib/getargs.c ../lib/getroute.c ../lib/hdlclapb.c ../lib/hippi.c \
+       ../lib/hw.c ../lib/inet.c ../lib/inet6.c ../lib/inet6_gr.c \
+       ../lib/inet6_sr.c ../lib/inet_gr.c ../lib/inet_sr.c ../lib/ipx.c \
+       ../lib/ipx_gr.c ../lib/ipx_sr.c ../lib/loopback.c ../lib/masq_info.c \
+       ../lib/nstrcmp.c ../lib/netrom.c ../lib/netrom_gr.c ../lib/netrom_sr.c \
+       ../lib/ppp.c ../lib/ppp_ac.c ../lib/proc.c ../lib/rose.c \
+       ../lib/rose_gr.c ../lib/setroute.c ../lib/sit.c ../lib/slip.c \
+       ../lib/slip_ac.c ../lib/tr.c ../lib/tunnel.c ../lib/unix.c \
+       ../lib/util.c ../lib/interface.c ../lib/sockets.c ../lib/util-ank.c \
+       ../ipmaddr.c ../slattach.c ../iptunnel.c
+
+all: $(NLSPACKAGE).pot $(CATALOGS)
+
+$(NLSPACKAGE).pot: $(POTFILES)
+       xgettext --default-domain=$(NLSPACKAGE) \
+         --add-comments --keyword=_ --keyword=N_ $(POTFILES)
+       if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
+           rm -f $(NLSPACKAGE).po; \
+       else \
+           mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
+       fi
+
+
+update-po: Makefile
+       $(MAKE) $(NLSPACKAGE).pot
+       catalogs='$(CATALOGS)'; \
+       for cat in $$catalogs; do \
+               lang=`echo $$cat | sed 's/.mo//'`; \
+               mv $$lang.po $$lang.old.po; \
+               echo "$$lang:"; \
+               if $(TUPDATE) $(NLSPACKAGE).pot $$lang.old.po > $$lang.po; then \
+               rm -f $$lang.old.po; \
+       else \
+               echo "tupdate for $$cat failed!"; \
+               rm -f $$lang.po; \
+               mv $$lang.old.po $$lang.po; \
+       fi; \
+       done
+
+clean:
+       rm -f *mo
+
+distclean: clean
+       rm -f .depend Makefile
+
+depend:
+
+install: $(CATALOGS)
+       catalogs='$(CATALOGS)'; \
+       for n in $$catalogs; do \
+           l=`basename $$n .mo`; \
+           $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
+           $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
+           $(INSTALL) -m 644 $$n $(INSTALLNLSDIR)/$$l/LC_MESSAGES/net-tools.mo; \
+       done
+
+%.mo: %.po
+       msgfmt -o $@ $<
diff --git a/po/cs.po b/po/cs.po
new file mode 100644 (file)
index 0000000..b4b66a1
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,2512 @@
+# Czech translation of net-tools
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Jiøí Pavlovský <pavlovsk@ffcuni.cz>, 1999.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: net-tools-1.51\n"
+"POT-Creation-Date: 2000-02-14 02:31+0100\n"
+"PO-Revision-Date: 1999-08-29 23:20+0200\n"
+"Last-Translator: Jiøí Pavlovský <pavlovsk@ff.cuni.cz>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../arp.c:110 ../arp.c:269
+msgid "arp: need host name\n"
+msgstr "arp: je tøeba jméno poèítaèe\n"
+
+#: ../arp.c:207 ../arp.c:221
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr "Pro %s neexistuje ARP polo¾ka\n"
+
+#: ../arp.c:239
+#, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr "arp: HW adresu `%s' nelze zjistit: %s\n"
+
+#: ../arp.c:243
+msgid "arp: protocol type mismatch.\n"
+msgstr "arp: chybnì zadaný typ protokolu\n"
+
+#: ../arp.c:252
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr "arp: zaøízení `%s' má Hw adresu %s `%s'.\n"
+
+#: ../arp.c:282
+msgid "arp: need hardware address\n"
+msgstr "arp: je tøeba hardwarová adresa\n"
+
+#: ../arp.c:290
+msgid "arp: invalid hardware address\n"
+msgstr "arp: nesprávná hardwarová adresa\n"
+
+#: ../arp.c:387
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr "arp: databázi ethernetových adres %s nelze otevøít!\n"
+
+#: ../arp.c:403
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr "arp: syntaktická chyba na øádku %u databáze ethernetových adres %s!\n"
+
+#: ../arp.c:416
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr ""
+"arp: polo¾ku na øádku %u databáze ethernetových adres %s nelze nastavit!\n"
+
+#: ../arp.c:437
+msgid "Address\t\t\tHWtype\tHWaddress\t    Flags Mask\t\t  Iface\n"
+msgstr "Adresa\t\t\t HWtyp\t HWadresa\t     Pøíz  Maska\t\t   Rozhraní\n"
+
+#: ../arp.c:467
+msgid "(incomplete)"
+msgstr "(nekompletní)"
+
+#: ../arp.c:484
+#, c-format
+msgid "%s (%s) at "
+msgstr "%s (%s) na "
+
+#: ../arp.c:490
+msgid "<incomplete> "
+msgstr "<nekompletní>"
+
+#: ../arp.c:496
+#, c-format
+msgid "netmask %s "
+msgstr "sí»ová maska %s "
+
+#: ../arp.c:513
+#, c-format
+msgid "on %s\n"
+msgstr "na %s\n"
+
+#: ../arp.c:592
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr "Polo¾ky: %d\tVynecháno: %d\tNalezeno: %d\n"
+
+#: ../arp.c:596
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr "%s (%s) -- ¾ádná polo¾ka\n"
+
+#: ../arp.c:598
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr "arp: ¾ádná z polo¾ek (%d) nevyhovuje.\n"
+
+#: ../arp.c:613
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+"Pou¾ití:\n"
+"  arp [-vn]  [<HW>] [-i <if> [-a] [<poèítaè>]             <-Zobrazí ARP "
+"cache\n"
+
+#: ../arp.c:614
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr ""
+"  arp [-v]          [-i <if>] -d <poèítaè> [pub][nopub]   <-Sma¾e polo¾ku "
+"ARP\n"
+
+#: ../arp.c:615
+#, fuzzy
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr ""
+"  arp [-vnD] [<HW>] [-i <if>] -f <soubor>                 <-Pøidá polo¾ku "
+"ze\n"
+"                                                          souboru\n"
+
+#: ../arp.c:616
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+"  arp [-v]   [<HW> [-i <if> -s   <poèítaè> <hwadr> [temp][nopub] <-Pøidá "
+"polo¾ku\n"
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -s <soubor> <hwadr> [sí»mask <èís>]  <-''-\n"
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr ""
+"  arp [-v]   [<HW> [-i <if> -Ds  <poèítaè> <if> [sí»mask <èís>] pub      "
+"<-''-\n"
+
+#: ../arp.c:620
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr ""
+"        -a                       zobrazí jmna v¹ech poèítaèù alternativním\n"
+"                                 (BSD) zpùsobem\n"
+
+#: ../arp.c:621
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr "        -s, --set                nastaví novou ARP polo¾ku\n"
+
+#: ../arp.c:622
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr "        -d, --delete             sma¾e zadanou ARP polo¾ku\n"
+
+#: ../arp.c:623 ../netstat.c:1436 ../route.c:85
+msgid "        -v, --verbose            be verbose\n"
+msgstr ""
+"        -v, --verbose            bude vypisovat podrobné zprávy\n"
+"                                 o èinnosti\n"
+
+#: ../arp.c:624 ../netstat.c:1437 ../route.c:86
+msgid "        -n, --numeric            dont resolve names\n"
+msgstr ""
+"        -n, --numeric            nebude pøevádìt èíselné adresy\n"
+"                                 na kanonická jména\n"
+
+#: ../arp.c:625
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr "        -i, --device             zadává sí»ové rozhraní (napø. eth0)\n"
+
+#: ../arp.c:626
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr "        -D, --use-device         ète <hwadr> ze zadaného zaøízení\n"
+
+#: ../arp.c:627
+#, fuzzy
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr "         -r, --route              vypí¹e smìrovací tabulku\n"
+
+#: ../arp.c:628
+#, fuzzy
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+"        -f, --file               ète nové polo¾ky ze souboru\n"
+"\n"
+
+#: ../arp.c:630 ../rarp.c:181
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr ""
+"  <HW>=Pou¾ijte '-H <hw> pro zadání hardwarového typu adresy.\n"
+"  Implicitnì: %s\n"
+
+#: ../arp.c:631 ../rarp.c:182
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr "  Seznam mo¾ných hardwarových typù (podporujících ARP):\n"
+
+#: ../arp.c:664
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr "hardwarový typ %s není podporován!\n"
+
+#: ../arp.c:668
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr "tøída adres %s není podporována!\n"
+
+#: ../arp.c:703
+msgid "arp: -N not yet supported.\n"
+msgstr "arp: pøepínaè -N není zatím podporován\n"
+
+#: ../arp.c:713
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr "arp: neznámá tøída adres %s.\n"
+
+#: ../arp.c:722
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr "arp: neznámý hardwarový typ %s.\n"
+
+#: ../arp.c:741
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr "arp: %s: jádro podporuje pouze 'inet'.\n"
+
+#: ../arp.c:746
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr "arp: hardwarový typ %s nepodporuje ARP.\n"
+
+#: ../hostname.c:69
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr "Nastavuji jméno uzlu na `%s'\n"
+
+#: ../hostname.c:74
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr "%s: jméno uzlu mù¾e zmìnit pouze superu¾ivatel\n"
+
+#: ../hostname.c:77 ../hostname.c:97 ../hostname.c:116
+#, c-format
+msgid "%s: name too long\n"
+msgstr "jméno %s je pøíli¹ dlouhé\n"
+
+#: ../hostname.c:89
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr "Nastavuji jméno poèítaèe na `%s'\n"
+
+#: ../hostname.c:94
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr "%s: jméno poèítaèe mù¾e zmìnit pouze superu¾ivatel\n"
+
+#: ../hostname.c:108
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr "Nastavuji jméno domény na `%s'\n"
+
+#: ../hostname.c:113
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr "%s: jméno domény mù¾e zmìnit pouze superu¾ivatel\n"
+
+#: ../hostname.c:131
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr "Vyhledávám `%s' ...\n"
+
+#: ../hostname.c:137
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr "Výsledek: h_name=`%s'\n"
+
+#: ../hostname.c:142
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr "Výsledek: h_aliases=`%s'\n"
+
+#: ../hostname.c:147
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr "Výsledek: h_addr_list=`%s'\n"
+
+#: ../hostname.c:209
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr "%s: `%s' nelze otevøít\n"
+
+#: ../hostname.c:223
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+"Pou¾ití:\n"
+"    hostname [-v] {jméno|-F soubor}       nastaví jméno poèítaèe (ze "
+"souboru)\n"
+
+#: ../hostname.c:224
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+"    domainname [-v] {jméno|-F soubor}     nastaví jméno NIS domény (ze\n"
+"                                          souboru)\n"
+
+#: ../hostname.c:226
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr ""
+"    nodename [-v] {jméno|-F soubor}       nastaví jméno DECnet uzlu (ze\n"
+"                                          souboru)\n"
+
+#: ../hostname.c:228
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr "    hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  vypí¹e formátované jméno\n"
+
+#: ../hostname.c:229
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr ""
+"    hostname [-v]                         vypí¹e jméno poèítaèe\n"
+"\n"
+
+#: ../hostname.c:230
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+"    hostname -V|--version|-h|--help       vypí¹e informace a skonèí\n"
+"\n"
+
+#: ../hostname.c:231
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+
+#: ../hostname.c:232
+msgid "    -s, --short           short host name\n"
+msgstr "    -s, --short           krátké jméno poèítaèe\n"
+
+#: ../hostname.c:233
+msgid "    -a, --alias           alias names\n"
+msgstr "    -a, --alias           pøezdívky\n"
+
+#: ../hostname.c:234
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr "    -i, --ip-address      adresy odpovídající jménu poèítaèe\n"
+
+#: ../hostname.c:235
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr "    -f, --fqdn, --long    dlouhé jméno poèítaèe (kanonické)\n"
+
+#: ../hostname.c:236
+msgid "    -d, --domain          DNS domain name\n"
+msgstr "    -d, --domain          jméno DNS domény\n"
+
+#: ../hostname.c:237
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr "    -y, --yp, --nis       jméno NIS/YP domény\n"
+
+#: ../hostname.c:239
+msgid "    -n, --node            DECnet node name\n"
+msgstr "    -n, --node            jméno DECnet uzlu\n"
+
+#: ../hostname.c:241
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+"    -F, --file            ète jméno poèítaèe èi nis domény ze souboru\n"
+"\n"
+
+#: ../hostname.c:243
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+
+#: ../hostname.c:338
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr "%s: Tímto pøíkazem nelze DNS jméno domény zmìnit\n"
+
+#: ../hostname.c:339
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+"\n"
+"Pokud nepou¾íváte bind èi NIS pro vyhledávání jmen poèítaèù, pak mù¾ete "
+"zmìnit\n"
+
+#: ../hostname.c:340
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"DNS jméno domény (je souèástí kanonického jména poèítaèe) v souboru\n"
+"/etc/hosts\n"
+
+#: ../hostname.c:357
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr "gethostname()=`%s'\n"
+
+#: ../hostname.c:374
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr "getdomainname()=`%s'\n"
+
+#: ../hostname.c:389
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr "getnodename()=`%s'\n"
+
+#: ../ifconfig.c:159
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr "%-9.9s Zapouzdøení:%s  "
+
+#: ../ifconfig.c:164
+#, c-format
+msgid "HWaddr %s  "
+msgstr "HWadr %s  "
+
+#: ../ifconfig.c:167
+#, c-format
+msgid "Media:%s"
+msgstr "Médium:%s"
+
+#: ../ifconfig.c:169
+msgid "(auto)"
+msgstr "(auto)"
+
+#: ../ifconfig.c:176
+#, c-format
+msgid "          %s addr:%s "
+msgstr "          %s adr:%s "
+
+#: ../ifconfig.c:179
+#, c-format
+msgid " P-t-P:%s "
+msgstr " P-t-P:%s "
+
+# V ostatních katalozích se pøekládá Broadcast -> v¹esmìrové vysílání.
+# Tudi¾ bcast -> V¹esmìr :)
+#: ../ifconfig.c:182
+#, c-format
+msgid " Bcast:%s "
+msgstr " V¹esmìr:%s "
+
+#: ../ifconfig.c:184
+#, c-format
+msgid " Mask:%s\n"
+msgstr "Maska:%s\n"
+
+#: ../ifconfig.c:201
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr "          inet6-adr: %s/%d"
+
+#: ../ifconfig.c:203
+msgid " Scope:"
+msgstr " Rozsah:"
+
+#: ../ifconfig.c:206
+msgid "Global"
+msgstr "Globál"
+
+#: ../ifconfig.c:209
+msgid "Link"
+msgstr "Linka"
+
+#: ../ifconfig.c:212
+msgid "Site"
+msgstr "Stanovi¹tì"
+
+#: ../ifconfig.c:215
+msgid "Compat"
+msgstr "Kompatibilita"
+
+#: ../ifconfig.c:218
+msgid "Host"
+msgstr "Poèítaè"
+
+#: ../ifconfig.c:221
+msgid "Unknown"
+msgstr "Neznám."
+
+#: ../ifconfig.c:236
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr "          IPX/Ethernet II adr: %s\n"
+
+#: ../ifconfig.c:239
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr "          IPX/Ethernet SNAP adr:%s\n"
+
+#: ../ifconfig.c:242
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr "          IPX/Ethernet 802.2 adr:%s\n"
+
+#: ../ifconfig.c:245
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr "          IPX/Ethernet 802.3 adr:%s\n"
+
+#: ../ifconfig.c:255
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr "          EtherTalk Phase 2 adr:%s\n"
+
+#: ../ifconfig.c:264
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr "          econet adr:%s\n"
+
+# Hic sunt leones ...
+#: ../ifconfig.c:270
+msgid "[NO FLAGS] "
+msgstr "[®ÁDNÉ PØÍZNAKY]"
+
+#: ../ifconfig.c:272
+msgid "UP "
+msgstr "AKTIVOVÁNO "
+
+#: ../ifconfig.c:274
+msgid "BROADCAST "
+msgstr "V©ESMÌROVÉ_VYSÍLÁNÍ "
+
+#: ../ifconfig.c:276
+msgid "DEBUG "
+msgstr "DEBUG "
+
+#: ../ifconfig.c:278
+msgid "LOOPBACK "
+msgstr "SMYÈKA "
+
+#: ../ifconfig.c:280
+msgid "POINTOPOINT "
+msgstr "POINTOPOINT "
+
+# ??
+#: ../ifconfig.c:282
+msgid "NOTRAILERS "
+msgstr "NOTRAILERS "
+
+#: ../ifconfig.c:284
+msgid "RUNNING "
+msgstr "B̮͠"
+
+#: ../ifconfig.c:286
+msgid "NOARP "
+msgstr "NEARP "
+
+#: ../ifconfig.c:288
+msgid "PROMISC "
+msgstr "PROMISK "
+
+#: ../ifconfig.c:290
+msgid "ALLMULTI "
+msgstr "ALLMULTI "
+
+#: ../ifconfig.c:292
+msgid "SLAVE "
+msgstr "SLAVE "
+
+#: ../ifconfig.c:294
+msgid "MASTER "
+msgstr "MASTER "
+
+#: ../ifconfig.c:296
+msgid "MULTICAST "
+msgstr "MULTICAST "
+
+#: ../ifconfig.c:299
+msgid "DYNAMIC "
+msgstr "DYNAMIC "
+
+#: ../ifconfig.c:302
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr " MTU:%d  Metrika:%d"
+
+#: ../ifconfig.c:306
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr "  Outfill:%d  Keepalive:%d"
+
+#: ../ifconfig.c:320
+#, c-format
+msgid "RX packets:%lu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr "pøijmutých paketù:%lu chyb:%lu zahozeno:%lu pøeteèení:%lu rámcù:%lu\n"
+
+#: ../ifconfig.c:325
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr "             komprimováno:%lu\n"
+
+# carrier?
+#: ../ifconfig.c:329
+#, c-format
+msgid "TX packets:%lu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr "odeslaných paketù:%lu chyb:%lu zahozeno:%lu pøeteèení:%lu pøenos:%lu\n"
+
+#: ../ifconfig.c:333
+#, c-format
+msgid "          collisions:%lu "
+msgstr "          kolizí:%lu "
+
+#: ../ifconfig.c:335
+#, c-format
+msgid "compressed:%lu "
+msgstr "komprimováno:%lu "
+
+#: ../ifconfig.c:337
+#, c-format
+msgid "txqueuelen:%d "
+msgstr "délka odchozí fronty:%d "
+
+#: ../ifconfig.c:345
+#, c-format
+msgid "Interrupt:%d "
+msgstr "Pøeru¹ení:%d "
+
+#. Only print devices using it for
+#. I/O maps
+#: ../ifconfig.c:348
+#, c-format
+msgid "Base address:0x%x "
+msgstr "Vstupnì/Výstupní port:0x%x "
+
+#: ../ifconfig.c:350
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr "Pamì»:%lx-%lx "
+
+#: ../ifconfig.c:353
+#, c-format
+msgid "DMA chan:%x "
+msgstr "Kanál DMA:%x "
+
+#: ../ifconfig.c:384 ../ifconfig.c:405
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr "%s: rozhraní %s není známo\n"
+
+#: ../ifconfig.c:421
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <address>]\n"
+msgstr ""
+"Pou¾ití:\n"
+"  ifconfig [-a] [-i] [-v] <rozhraní> [[<AF>] <adresa>]\n"
+
+#: ../ifconfig.c:425
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr "  [add <adresa>[/<délka prefixu>]]\n"
+
+#: ../ifconfig.c:427
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr "  [del <adresa>[/<délka prefixu>]]\n"
+
+#: ../ifconfig.c:432
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr "  [[-]broadcast [<adresa>]]  [[-]pointopoint [<adresa>]]\n"
+
+#: ../ifconfig.c:433
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr "  [netmask <adresa>]  [dstaddr <adresa>]  [tunnel <adresa>]\n"
+
+#: ../ifconfig.c:436
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr "  [outfill <NN>] [keepalive <NN>]\n"
+
+#: ../ifconfig.c:438
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr "  [hw <HW> <adresa>]  [metric <NN>]  [mtu <NN>]\n"
+
+#: ../ifconfig.c:439
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+
+#: ../ifconfig.c:440
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr "  [multicast]  [[-]promisc]\n"
+
+#: ../ifconfig.c:441
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <typ>]\n"
+
+#: ../ifconfig.c:443
+msgid "  [txqueuelen <NN>]\n"
+msgstr "  [txqueuelen délka]\n"
+
+#: ../ifconfig.c:446
+msgid "  [[-]dynamic]\n"
+msgstr "  [[-]dynamic]\n"
+
+#: ../ifconfig.c:448
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+"  [up|down] ...\n"
+"\n"
+
+#: ../ifconfig.c:450
+msgid "  <HW>=Hardware Type.\n"
+msgstr "   <HW>=Hardwarový Typ.\n"
+
+#: ../ifconfig.c:451
+msgid "  List of possible hardware types:\n"
+msgstr "  Seznam mo¾ných hardwarových typù:\n"
+
+#. 1 = ARPable
+#: ../ifconfig.c:453
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr "   <AF>=tøída adres. Implicitní: %s\n"
+
+#: ../ifconfig.c:454
+msgid "  List of possible address families:\n"
+msgstr "  Seznam mo¾ných tøíd adres:\n"
+
+#: ../ifconfig.c:593
+msgid "Unknown media type.\n"
+msgstr "Neznámý typ média.\n"
+
+#: ../ifconfig.c:881
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr "%s: adresa %s je nesprávná.\n"
+
+#: ../ifconfig.c:920 ../ifconfig.c:963 ../ifconfig.c:1011
+msgid "No support for INET6 on this system.\n"
+msgstr "Tento systém nepodporuje INET6.\n"
+
+#: ../ifconfig.c:983
+msgid "Address deletion not supported on this system.\n"
+msgstr "Tento systém nepodporuje mazání adres.\n"
+
+#: ../ifconfig.c:1066
+msgid "No support for INET on this system.\n"
+msgstr "Tento systém nepodporuje INET.\n"
+
+#: ../ifconfig.c:1076
+msgid "No support for ECONET on this system.\n"
+msgstr "Tento systém nepodporuje ECONET.\n"
+
+#: ../ifconfig.c:1084
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr "Nevím, jak nastavit adresu tøídy %d.\n"
+
+#: ../netstat.c:383
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+"(Pro \"-p\" nelze získat ¾ádné informace: geteuid()=%d, ale je tøeba, aby "
+"jste\n"
+"byl superu¾ivatelem)\n"
+
+#: ../netstat.c:387
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+"(V¹echny procesy nemohly být identifikovány. Budou vypsaány informace\n"
+"pouze o procesech, jich¾ jste vlastníkem. Aby jste mohl vidìt v¹e, musel\n"
+"byste být superu¾ivatelem.)\n"
+
+#: ../netstat.c:394 ../netstat.c:1089 ../netstat.c:1166
+msgid "LISTENING"
+msgstr "NASLOUCHÁ"
+
+#: ../netstat.c:395
+msgid "CONN SENT"
+msgstr "CONN ODESLÁN"
+
+#: ../netstat.c:396 ../netstat.c:1168
+msgid "DISC SENT"
+msgstr "DISC ODESLÁN"
+
+#: ../netstat.c:397 ../netstat.c:464 ../netstat.c:809 ../netstat.c:1169
+msgid "ESTABLISHED"
+msgstr "SPOJENO"
+
+#: ../netstat.c:419
+msgid "Active NET/ROM sockets\n"
+msgstr "Aktivní NET/ROM sokety\n"
+
+#: ../netstat.c:420
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"U¾ivatel   Cíl        Zdroj      Zaøízení Stav        Vr/Vs    Odch-F "
+"Pøích-F\n"
+
+#: ../netstat.c:430 ../netstat.c:1208
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr "Chyba pøi ètení dat z %s\n"
+
+# následující radìji ponechat v originále ?!
+#: ../netstat.c:465
+msgid "SYN_SENT"
+msgstr "SYN_SENT"
+
+#: ../netstat.c:466
+msgid "SYN_RECV"
+msgstr "SYN_RECV"
+
+#: ../netstat.c:467
+msgid "FIN_WAIT1"
+msgstr "FIN_WAIT1"
+
+#: ../netstat.c:468
+msgid "FIN_WAIT2"
+msgstr "FIN_WAIT2"
+
+#: ../netstat.c:469
+msgid "TIME_WAIT"
+msgstr "TIME_WAIT"
+
+#: ../netstat.c:470
+msgid "CLOSE"
+msgstr "ZAVØEN"
+
+#: ../netstat.c:471
+msgid "CLOSE_WAIT"
+msgstr "CLOSE_WAIT"
+
+#: ../netstat.c:472
+msgid "LAST_ACK"
+msgstr "POSLEDNÍ ACK"
+
+#: ../netstat.c:473
+msgid "LISTEN"
+msgstr "LISTEN"
+
+#: ../netstat.c:474
+msgid "CLOSING"
+msgstr "ZAVíRÁ"
+
+#: ../netstat.c:544
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr "varování, nesmyslný igmp6 øádek %d.\n"
+
+#: ../netstat.c:549 ../netstat.c:587 ../netstat.c:670 ../netstat.c:803
+#: ../netstat.c:935 ../netstat.c:940
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr "netstat: tøída adres %d není podporována !\n"
+
+#: ../netstat.c:562 ../netstat.c:567 ../netstat.c:575 ../netstat.c:582
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr "varování, nesmyslný igmp øádek %d.\n"
+
+#: ../netstat.c:666
+msgid "warning, got bogus tcp line.\n"
+msgstr "varování, nesmyslný tcp øádek.\n"
+
+#: ../netstat.c:704 ../netstat.c:855 ../netstat.c:975
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr "vyp (0.00/%ld/%d)"
+
+#: ../netstat.c:708
+#, fuzzy, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr "zap%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:713
+#, fuzzy, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr "zap%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:718
+#, fuzzy, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr "zap%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:723 ../netstat.c:864 ../netstat.c:985
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr "nezn-%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:799
+msgid "warning, got bogus udp line.\n"
+msgstr "varování, nesmyslný udp øádek.\n"
+
+#: ../netstat.c:817 ../netstat.c:1075 ../netstat.c:1108
+msgid "UNKNOWN"
+msgstr "NEZNÁM"
+
+#: ../netstat.c:860 ../netstat.c:980
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr "zap%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:949
+msgid "warning, got bogus raw line.\n"
+msgstr "varování, nesmyslný 'raw' øádek.\n"
+
+#: ../netstat.c:1028
+msgid "warning, got bogus unix line.\n"
+msgstr "varování, netstat 'unix' øádek.\n"
+
+#: ../netstat.c:1055
+msgid "STREAM"
+msgstr "STREAM"
+
+#: ../netstat.c:1059
+msgid "DGRAM"
+msgstr "DGRAM"
+
+#: ../netstat.c:1063
+msgid "RAW"
+msgstr "RAW"
+
+#: ../netstat.c:1067
+msgid "RDM"
+msgstr "RDM"
+
+#: ../netstat.c:1071
+msgid "SEQPACKET"
+msgstr "SEQPACKET"
+
+#: ../netstat.c:1080
+msgid "FREE"
+msgstr "NEALOKOVÁN"
+
+#: ../netstat.c:1096
+msgid "CONNECTING"
+msgstr "SPOJUJE"
+
+#: ../netstat.c:1100
+msgid "CONNECTED"
+msgstr "SPOJEN"
+
+#: ../netstat.c:1104
+msgid "DISCONNECTING"
+msgstr "ODPOJUJE"
+
+#: ../netstat.c:1135
+msgid "Active UNIX domain sockets "
+msgstr "Aktivní sokety domény UNIX "
+
+#: ../netstat.c:1137 ../netstat.c:1666
+msgid "(servers and established)"
+msgstr "(servery a navázaná spojení)"
+
+#: ../netstat.c:1140 ../netstat.c:1669
+msgid "(only servers)"
+msgstr "(pouze servery)"
+
+#: ../netstat.c:1142 ../netstat.c:1671
+msgid "(w/o servers)"
+msgstr "(w/o servery)"
+
+#: ../netstat.c:1145
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+"\n"
+"Proto Èítaè  Pøíznaky    Typ        Stav          I-Uzel"
+
+#: ../netstat.c:1147
+msgid " Path\n"
+msgstr " Cesta\n"
+
+#: ../netstat.c:1167
+msgid "SABM SENT"
+msgstr "SABM ODESLÁN"
+
+#: ../netstat.c:1170
+msgid "RECOVERY"
+msgstr "OBNOVA"
+
+#: ../netstat.c:1184
+msgid "Active AX.25 sockets\n"
+msgstr "Aktivní AX.25 sokety\n"
+
+#: ../netstat.c:1185
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr "Cíl        Zdroj      Zaøíz   Stav         Vr/Vs    Odhod-F Pøích-F\n"
+
+#: ../netstat.c:1228
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr "chyba pøi ètení dat z %s\n"
+
+#: ../netstat.c:1279
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+"Aktivní IPX sokety\n"
+"Proto Pøích-F Odch-F Lokál adresa              Vzdálená adresa               "
+" Stav"
+
+#: ../netstat.c:1281
+msgid " User"
+msgstr " U¾ivatel"
+
+#: ../netstat.c:1315
+msgid "ESTAB"
+msgstr "SPOJEN"
+
+#: ../netstat.c:1323
+msgid "UNK."
+msgstr "NEZ."
+
+#: ../netstat.c:1367
+msgid "     - no statistics available -"
+msgstr "     - statistická data nejsou dostupná -"
+
+#: ../netstat.c:1370
+msgid "[NO FLAGS]"
+msgstr "[®ÁDNÉ PØÍZNAKY]"
+
+#: ../netstat.c:1400
+msgid "Kernel Interface table\n"
+msgstr "Tabulka rozhraní v jádru\n"
+
+#: ../netstat.c:1401
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"Rozhr   MTU Met    PØ-OK PØ-CHYB PØ-ZAH PØ-PØT   OD-OK OD-CHYB OD-ZAH OD-PØT "
+"PØZ\n"
+
+#: ../netstat.c:1404
+msgid "missing interface information"
+msgstr "chybí informace o rozhraní"
+
+#: ../netstat.c:1425
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+"Pou¾ití: netstat [--veenNcCF] [<TA>] -r       netstat "
+"{-V|--version|-h|--help}\n"
+
+#: ../netstat.c:1426
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr "         netstat [-vnNcaeol] [<Soket> ...]\n"
+
+#: ../netstat.c:1427
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr ""
+"         netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+
+#: ../netstat.c:1429
+msgid "        -r, --route              display routing table\n"
+msgstr "         -r, --route              vypí¹e smìrovací tabulku\n"
+
+#: ../netstat.c:1430
+msgid "        -i, --interfaces         display interface table\n"
+msgstr "         -i, --interfaces         vypí¹e tabulku rozhraní\n"
+
+#: ../netstat.c:1431
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr ""
+"         -g, --groups             vypí¹e èlenství v multicast skupinách\n"
+
+#: ../netstat.c:1432
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr ""
+"         -s, --statistics         vypí¹e statistiku sí»ové aktivity (jako "
+"SNMP)\n"
+
+#: ../netstat.c:1434
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+"         -M, --masquerade         vypí¹e maskovaná spojení\n"
+"\n"
+
+#: ../netstat.c:1438 ../route.c:87
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr "         -N, --symbolic           pøevede hw jména\n"
+
+#: ../netstat.c:1439 ../route.c:88
+msgid "        -e, --extend             display other/more information\n"
+msgstr "         -e, --extend             vypí¹e podrobnìj¹í informace\n"
+
+#: ../netstat.c:1440
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr ""
+"         -p, --programs           vypí¹e PID/jméno programu pro sokety\n"
+
+#: ../netstat.c:1441
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+"         -c, --continuous         nepøeru¹ovaný výpis\n"
+"\n"
+
+#: ../netstat.c:1442
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr ""
+"         -l, --listening          vypí¹e sokety, na nich¾ je nasloucháno\n"
+
+#: ../netstat.c:1443
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr ""
+"         -a, --all, --listening   vypí¹e v¹echny sokety (implicitnì: "
+"spojené)\n"
+
+#: ../netstat.c:1444
+msgid "        -o, --timers             display timers\n"
+msgstr "         -o, --timers             zobrazí èasovaèe\n"
+
+#: ../netstat.c:1445 ../route.c:89
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+"         -F, --fib                zobrazí Forwarding Infomation Base\n"
+"                                  (implicitní)\n"
+
+#: ../netstat.c:1446 ../route.c:90
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr "         -C, --cache              místo FIB zobrazí smìrovací cache\n"
+
+#: ../netstat.c:1448
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+"  <Soket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+
+#: ../netstat.c:1449 ../route.c:92
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>' Default: %s\n"
+msgstr "   <AF>=Pou¾ijte '-A <af>' or '--<af>' Implicitní: %s\n"
+
+#: ../netstat.c:1450 ../route.c:93
+msgid "  List of possible address families (which support routing):\n"
+msgstr "  Seznam mo¾ných tøíd adres (podporujících smìrování):\n"
+
+#: ../netstat.c:1663
+msgid "Active Internet connections "
+msgstr "Aktivní Internetová spojení "
+
+#: ../netstat.c:1673
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+"\n"
+"Proto Pøích-F Odch-F Místní Adresa          Vzdálená Adresa         Stav     "
+
+#: ../netstat.c:1675
+msgid " User       Inode     "
+msgstr " U¾ivatel   I-uzel    "
+
+#: ../netstat.c:1678
+msgid " Timer"
+msgstr " Èasovaè"
+
+#: ../netstat.c:1708
+msgid "IPv4 Group Memberships\n"
+msgstr "Èlenství v IPv4 skupinách\n"
+
+#: ../netstat.c:1709
+msgid "Interface       RefCnt Group\n"
+msgstr "Rozhraní        Èítaè  Skupina\n"
+
+#: ../rarp.c:43
+msgid "This kernel does not support RARP.\n"
+msgstr "Toto jádro nepodporuje RARP.\n"
+
+#: ../rarp.c:82
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr "pro %s neexistuje RARP polo¾ka.\n"
+
+#: ../rarp.c:95
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr "hardwarová adresa %s je nesprávná\n"
+
+#: ../rarp.c:127
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr "rarp: soubor %s:%s nelze otevøít.\n"
+
+#: ../rarp.c:139
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr "rarp: syntaktická chyba na øádku %2$u souboru %1$s\n"
+
+#: ../rarp.c:143 ../rarp.c:287
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr "rarp: poèítaè %s není znám\n"
+
+#: ../rarp.c:146
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr "rarp: nelze nastavit polo¾ku z øádku %2$u souboru %1$s\n"
+
+#: ../rarp.c:175
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr "Pou¾ití: rarp -a                            vypí¹e polo¾ky z cache.\n"
+
+#: ../rarp.c:176
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr "         rarp -d <jméno>                    sma¾e polo¾ku z cache.\n"
+
+#: ../rarp.c:177
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr ""
+"         rarp [<HW>] -s <jméno> <hwadr>       pøidá polo¾ku do cache.\n"
+
+#: ../rarp.c:178
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+"         rarp -f                               pøidá polo¾ky z /etc/ethers.\n"
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+"         rarp -V                               vypí¹e oznaèení verze "
+"programu.\n"
+"\n"
+
+#: ../rarp.c:236
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr "Kombinace pøepínaèù %s je nesprávná.\n"
+
+#: ../rarp.c:267
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr "rarp: hardwarový typ %s není znám.\n"
+
+#: ../route.c:79
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+"Pou¾ití: route [-nNvee] [-FC] [<AF>]         Zobrazí smìrovací tabulky v "
+"jádru\n"
+
+#: ../route.c:80
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+"       route [-v] [-FC] {add|del|flush} ...  Zmìní smìrovací tabulku pro "
+"AF.\n"
+"\n"
+
+#: ../route.c:82
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+"       route {-h|--help [<AF>]               Nápovìda pro pou¾ití s AF.\n"
+
+#: ../route.c:83
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+"       route {-V|--version}                  Vypí¹e oznaèení verze a autora\n"
+"                                             programu.\n"
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr "Pou¾ití: plipconfig [-a] [-i] [-v] rozhraní\n"
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr "                  [nibble NN] [trigger NN]\n"
+
+#: ../plipconfig.c:68
+msgid "       plipconfig -V | --version\n"
+msgstr "       plipconfig -V | --version\n"
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr "%s\tnibble %lu  trigger %lu\n"
+
+#: ../iptunnel.c:79
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr "Pou¾ití: iptunnel { add | change | del | show } [ JMÉNO ]\n"
+
+#: ../iptunnel.c:80
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr ""
+"          [ mode { ipip | gre | sit } ] [ vzdálená ADR ] [ místní ADR ]\n"
+
+#: ../iptunnel.c:81
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr "          [ [i|o]seq ] [ [i|o]key KLÍÈ ] [ [i|o]csum ]\n"
+
+#: ../iptunnel.c:82
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev ZAØÍZENÍ ]\n"
+
+#: ../iptunnel.c:83
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+"       iptunnel -V | --version\n"
+"\n"
+
+#: ../iptunnel.c:84
+msgid "Where: NAME := STRING\n"
+msgstr "Kde: JMÉNO := ØETÌZEC\n"
+
+#: ../iptunnel.c:85
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr "       ADR := { IP-ADRESA | any }\n"
+
+#: ../iptunnel.c:86
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr "       TOS  := { ÈÍSLO | inherit }\n"
+
+#: ../iptunnel.c:87
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr "       TTL  := { 1..255 | inherit }\n"
+
+#: ../iptunnel.c:88
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr "       KLÍÈ  := { DOTTED_QUAD | ÈÍSLO }\n"
+
+#: ../iptunnel.c:326
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr "S ipip a sit nejsou klíèe povoleny.\n"
+
+#: ../iptunnel.c:346
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr "Tunel se v¹esmìrovým vysíláním vy¾aduje zdrojovou adresu.\n"
+
+#: ../iptunnel.c:361
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr "ttl != 0 a noptmudisc se navzájem vyluèují\n"
+
+#: ../iptunnel.c:373
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr "re¾im tunelu (ipip, gre èi sit) nelze zjistit\n"
+
+#: ../iptunnel.c:411
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr "%s: %s/ip  vzdálený %s  místní %s "
+
+#: ../iptunnel.c:415
+msgid "unknown"
+msgstr "Neznám."
+
+#: ../iptunnel.c:447
+msgid "  Drop packets out of sequence.\n"
+msgstr "  Zahazuje pakety mimo poøadí.\n"
+
+#: ../iptunnel.c:449
+msgid "  Checksum in received packet is required.\n"
+msgstr "  Pøijímané pakety musí mít kontrolní souèet.\n"
+
+# ???
+#: ../iptunnel.c:451
+msgid "  Sequence packets on output.\n"
+msgstr "  Øadí odchozí pakety.\n"
+
+#: ../iptunnel.c:453
+msgid "  Checksum output packets.\n"
+msgstr "  Odchozí pakety budou mít kontrolní souèet.\n"
+
+#: ../iptunnel.c:481
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr "Lituji, formát /proc/net/dev je chybný.\n"
+
+#: ../iptunnel.c:494
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr "Typ [%s] se nepodaøilo zjistit.\n"
+
+#: ../iptunnel.c:510
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr "RX: Pakety     Bajty        Chyby  CsumChyb MimoPoø  Mcasts\n"
+
+#: ../iptunnel.c:513
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr "TX: Pakety     Bajty        Chyby  DeadLoop NoRoute  NoBufs\n"
+
+#: ../statistics.c:45
+msgid "ICMP input histogram:"
+msgstr "histogram ICMP vstupu:"
+
+#: ../statistics.c:46
+msgid "ICMP output histogram:"
+msgstr "histogram ICMP výstupu:"
+
+#: ../statistics.c:63
+#, c-format
+msgid "Forwarding is %s"
+msgstr "Pøedávání je %s"
+
+#: ../statistics.c:64
+#, c-format
+msgid "Default TTL is %d"
+msgstr "Implicitní TTL je %d"
+
+#: ../statistics.c:65
+#, c-format
+msgid "%d total packets received"
+msgstr "celkem pøijmutých paketù: %d"
+
+#: ../statistics.c:66
+#, c-format
+msgid "%d with invalid headers"
+msgstr "s nesprávnými hlavièkami: %d"
+
+#: ../statistics.c:67
+#, c-format
+msgid "%d with invalid addresses"
+msgstr "s nesprávnými adresami: %d"
+
+#: ../statistics.c:68
+#, c-format
+msgid "%d forwarded"
+msgstr "pøedáno: %d"
+
+#: ../statistics.c:69
+#, c-format
+msgid "%d with unknown protocol"
+msgstr "s neznámým protokolem: %d"
+
+#: ../statistics.c:70
+#, c-format
+msgid "%d incoming packets discarded"
+msgstr "poèet zahozených pøíchozích paketù: %d"
+
+#: ../statistics.c:71
+#, c-format
+msgid "%d incoming packets delivered"
+msgstr "poèet doruèených pøíchozích paketù: %d"
+
+#: ../statistics.c:72
+#, c-format
+msgid "%d requests sent out"
+msgstr "poèet odeslaných po¾adavkù: %d"
+
+#. ?
+#: ../statistics.c:73
+#, c-format
+msgid "%d outgoing packets dropped"
+msgstr "poèet zahozených odchozích paketù: %d"
+
+#: ../statistics.c:74
+#, c-format
+msgid "%d dropped because of missing route"
+msgstr "zahozeno kvùli chybìjící cestì: %d"
+
+#: ../statistics.c:75
+#, c-format
+msgid "%d fragments dropped after timeout"
+msgstr "poèet fragmentù zahozených po vypr¹ení èasu: %d"
+
+#: ../statistics.c:76
+#, c-format
+msgid "%d reassemblies required"
+msgstr "poèet nutných znovusestavení: %d"
+
+#. ?
+#: ../statistics.c:77
+#, c-format
+msgid "%d packets reassembled ok"
+msgstr "poèet v poøádku znovu sestavených paketù: %d"
+
+#: ../statistics.c:78
+#, c-format
+msgid "%d packet reassembles failed"
+msgstr "poèet paketù, je¾ se nepodaøilo znovu sestavit: %d"
+
+#: ../statistics.c:79
+#, c-format
+msgid "%d fragments received ok"
+msgstr "poèet v poøádku pøijmutých fragmentù: %d"
+
+#: ../statistics.c:80
+#, c-format
+msgid "%d fragments failed"
+msgstr "poèet chybných fragmentù: %d"
+
+#: ../statistics.c:81
+#, c-format
+msgid "%d fragments created"
+msgstr "poèet vytvoøených fragmentù: %d"
+
+#: ../statistics.c:86
+#, c-format
+msgid "%d ICMP messages received"
+msgstr "poèet pøijmutých ICMP zpráv: %d"
+
+#: ../statistics.c:87
+#, c-format
+msgid "%d input ICMP message failed."
+msgstr "poèet chybných pøíchozích ICMP zpráv: %d"
+
+#: ../statistics.c:88 ../statistics.c:101
+#, c-format
+msgid "destination unreachable: %d"
+msgstr "adresát nedostupný: %d"
+
+#: ../statistics.c:89
+#, c-format
+msgid "timeout in transit: %d"
+msgstr "vypr¹el èas pøi pøenosu: %d"
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "wrong parameters: %d"
+msgstr "chybné parametry: %d"
+
+#. ?
+#: ../statistics.c:91
+#, c-format
+msgid "source quenchs: %d"
+msgstr "øízení toku dat: %d"
+
+#: ../statistics.c:92
+#, c-format
+msgid "redirects: %d"
+msgstr "zmìna cesty: %d"
+
+#: ../statistics.c:93
+#, c-format
+msgid "echo requests: %d"
+msgstr "¾ádost o echo: %d"
+
+#: ../statistics.c:94 ../statistics.c:107
+#, c-format
+msgid "echo replies: %d"
+msgstr "odpovìï na ¾ádost o echo: %d"
+
+#: ../statistics.c:95
+#, c-format
+msgid "timestamp request: %d"
+msgstr "¾ádost o èas: %d"
+
+#: ../statistics.c:96
+#, c-format
+msgid "timestamp reply: %d"
+msgstr "odpovìï na ¾ádost o èas: %d"
+
+#: ../statistics.c:97
+#, c-format
+msgid "address mask request: %d"
+msgstr "¾ádost o masku podsítì: %d"
+
+#. ?
+#: ../statistics.c:98
+msgid "address mask replies"
+msgstr "odpovìdi na ¾ádost o masku podsítì"
+
+#. ?
+#: ../statistics.c:99
+#, c-format
+msgid "%d ICMP messages sent"
+msgstr "poèet odeslaných ICMP zpráv: %d"
+
+#: ../statistics.c:100
+#, c-format
+msgid "%d ICMP messages failed"
+msgstr "poèet chybných ICMP zpráv: %d"
+
+#: ../statistics.c:102
+#, c-format
+msgid "time exceeded: %d"
+msgstr "vypr¹ení ¾ivotnosti: %d"
+
+#. ?
+#: ../statistics.c:104
+#, c-format
+msgid "source quench: %d"
+msgstr "øízení toku dat: %d"
+
+#: ../statistics.c:105
+#, c-format
+msgid "redirect: %d"
+msgstr "zmìna cesty: %d"
+
+#: ../statistics.c:106
+#, c-format
+msgid "echo request: %d"
+msgstr "¾ádost o echo: %d"
+
+#: ../statistics.c:108
+#, c-format
+msgid "timestamp requests: %d"
+msgstr "¾ádost o èas: %d"
+
+#: ../statistics.c:109
+#, c-format
+msgid "timestamp replies: %d"
+msgstr "odpovìï na ¾ádost o èas: %d"
+
+#: ../statistics.c:110
+#, c-format
+msgid "address mask requests: %d"
+msgstr "¾ádost o masku podsítì: %d"
+
+#: ../statistics.c:111
+#, c-format
+msgid "address mask replies: %d"
+msgstr "odpovìï na ¾ádost o masku podsítì: %d"
+
+#: ../statistics.c:116
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr "RTO algoritmus je %s"
+
+#: ../statistics.c:120
+#, c-format
+msgid "%d active connections openings"
+msgstr "poèet aktivnì navázaných spojení: %d"
+
+#: ../statistics.c:121
+#, c-format
+msgid "%d passive connection openings"
+msgstr "poèet pasivnì navázaných spojení: %d"
+
+#: ../statistics.c:122
+#, c-format
+msgid "%d failed connection attempts"
+msgstr "poèet neúspì¹ných pokusù o spojení: %d"
+
+#: ../statistics.c:123
+#, c-format
+msgid "%d connection resets received"
+msgstr "poèet pøijmutých resetù: %d"
+
+#: ../statistics.c:124
+#, c-format
+msgid "%d connections established"
+msgstr "poèet navázaných spojení: %d"
+
+#: ../statistics.c:125
+#, c-format
+msgid "%d segments received"
+msgstr "poèet pøijmutých segmentù: %d"
+
+#: ../statistics.c:126
+#, c-format
+msgid "%d segments send out"
+msgstr "poèet odeslaných segmentù: %d"
+
+#: ../statistics.c:127
+#, c-format
+msgid "%d segments retransmited"
+msgstr "poèet pøenesených segmentù: %d"
+
+#: ../statistics.c:128
+#, c-format
+msgid "%d bad segments received."
+msgstr "poèet chybných pøíchozích segmentù: %d."
+
+#: ../statistics.c:129
+#, c-format
+msgid "%d resets sent"
+msgstr "poèet odeslaných resetù: %d"
+
+#: ../statistics.c:134
+#, c-format
+msgid "%d packets received"
+msgstr "poèet pøijmutých paketù: %d"
+
+#: ../statistics.c:135
+#, c-format
+msgid "%d packets to unknown port received."
+msgstr "poèet paketù pøijmutých pro neznámý port: %d."
+
+#: ../statistics.c:136
+#, c-format
+msgid "%d packet receive errors"
+msgstr "poèet chyb pøi pøíjmu paketù: %d"
+
+#: ../statistics.c:137
+#, c-format
+msgid "%d packets sent"
+msgstr "poèet odeslaných paketù: %d"
+
+#: ../statistics.c:142
+#, c-format
+msgid "%d SYN cookies sent"
+msgstr "poèet odeslaných SYN cookies: %d"
+
+#: ../statistics.c:143
+#, c-format
+msgid "%d SYN cookies received"
+msgstr "poèet pøijmutých SYN cookies: %d"
+
+#: ../statistics.c:144
+#, c-format
+msgid "%d invalid SYN cookies received"
+msgstr "poèet chybných pøíchozích SYN cookies: %d"
+
+#: ../statistics.c:146
+#, c-format
+msgid "%d resets received for embryonic SYN_RECV sockets"
+msgstr "poèet resetù pøijmutých pro sokety ve stavu SYN_PØÍCH: %d"
+
+#: ../statistics.c:148
+#, c-format
+msgid "%d packets pruned from receive queue because of socket buffer overrun"
+msgstr "poèet paketù odstranìných z fronty kvùli pøeteèení bufferu soketu: %d"
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:151
+#, c-format
+msgid "%d packets pruned from out-of-order queue"
+msgstr "poèet paketù odstranìných z fronty mimo-poøadí: %d"
+
+#: ../statistics.c:152
+#, c-format
+msgid ""
+"%d packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr ""
+"poèet paketù zahozených z fronty mimo-poøadí kvùli pøeteèení bufferu soketu: "
+"%d"
+
+#: ../statistics.c:154
+#, c-format
+msgid "%d ICMP packets dropped because they were out-of-window"
+msgstr "poèet ICMP paketù zahozených, proto¾e byly mimo-okno: %d"
+
+#: ../statistics.c:156
+#, c-format
+msgid "%d ICMP packets dropped because socket was locked"
+msgstr "poèet ICMP paketù zahozených kvùli zamèenému soketu: %d"
+
+#: ../statistics.c:222
+msgid "enabled"
+msgstr "zapnuto"
+
+#: ../statistics.c:222
+msgid "disabled"
+msgstr "vypnuto"
+
+#: ../statistics.c:272
+#, c-format
+msgid "unknown title %s\n"
+msgstr "titulek %s je neznámý\n"
+
+#: ../statistics.c:298
+msgid "error parsing /proc/net/snmp"
+msgstr "chyba pøi zpracování /proc/net/snmp"
+
+#: ../statistics.c:311
+msgid "cannot open /proc/net/snmp"
+msgstr "/proc/net/snmp nelze otevøít"
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr "Hardwarový typ `%s' není podporován.\n"
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr "Linkovou disciplínu nelze na `%s' zmìnit.\n"
+
+#: ../lib/af.c:145 ../lib/hw.c:148
+msgid "UNSPEC"
+msgstr "NEZNÁM"
+
+#: ../lib/af.c:147
+msgid "UNIX Domain"
+msgstr "Doména UNIX"
+
+#: ../lib/af.c:150
+msgid "DARPA Internet"
+msgstr "DARPA Internet"
+
+#: ../lib/af.c:153
+msgid "IPv6"
+msgstr "IPv6"
+
+#: ../lib/af.c:156 ../lib/hw.c:169
+msgid "AMPR AX.25"
+msgstr "AMPR AX.25"
+
+#: ../lib/af.c:159 ../lib/hw.c:175
+msgid "AMPR NET/ROM"
+msgstr "AMPR NET/ROM"
+
+#: ../lib/af.c:162
+msgid "Novell IPX"
+msgstr "Novell IPX"
+
+#: ../lib/af.c:165
+msgid "Appletalk DDP"
+msgstr "Appletalk DDP"
+
+#: ../lib/af.c:168 ../lib/hw.c:207
+msgid "Econet"
+msgstr "Econet"
+
+#: ../lib/af.c:171 ../lib/hw.c:172
+msgid "AMPR ROSE"
+msgstr "AMPR ROSE"
+
+#: ../lib/af.c:174 ../lib/hw.c:160
+msgid "Ash"
+msgstr "Ash"
+
+#: ../lib/af.c:232
+msgid "Please don't supply more than one address family.\n"
+msgstr "Nezadávejte více ne¾ jednu tøídu adres.\n"
+
+#: ../lib/af.c:293
+msgid "Too much address family arguments.\n"
+msgstr "Bylo zadáno pøíli¹ mnoho tøíd adres.\n"
+
+#: ../lib/af.c:304
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr "Tøída adres `%s' není známa.\n"
+
+#: ../lib/arcnet.c:53 ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52
+#: ../lib/fddi.c:67 ../lib/hippi.c:68 ../lib/inet.c:244 ../lib/inet.c:259
+#: ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78 ../lib/rose.c:71
+#: ../lib/rose.c:126 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr "[NENASTAVENO]"
+
+#: ../lib/arcnet.c:81 ../lib/arcnet.c:96
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr "in_arcnet(%s): chybná arcnet adresa!\n"
+
+#: ../lib/arcnet.c:108
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr "in_arcnet(%s): nadbyteèné : ignorováno!\n"
+
+#: ../lib/arcnet.c:120
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr "in_arcnet(%s): nadbyteèné znaky!\n"
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr "Chybná Ash adresa"
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr "Nesprávný volací znak"
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr "Volací znak je pøíli¹ dlouhý."
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr "AX.25 není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr "Smìrovací tabulka v jádru pro AX.25\n"
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr "Adresát      Rozhraní U¾ití\n"
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr "Smìrovací tabulka pro `ddp' není zatím podporována.\n"
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr "in_ether(%s): chybná ethernetová adresa!\n"
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr "in_ether(%s): nadbyteèné : ignorováno!\n"
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr "in_ether(%s): nadbyteèné znaky!\n"
+
+#: ../lib/fddi.c:95 ../lib/fddi.c:110
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr "in_fddi(%s): chybná fddi adresa!\n"
+
+#: ../lib/fddi.c:122
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): nadbyteèné : ignorováno!\n"
+
+#: ../lib/fddi.c:134
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): nadbyteèné znaky!\n"
+
+#: ../lib/getroute.c:97 ../lib/setroute.c:76
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr "Tøída adres `%s' není podporována.\n"
+
+#: ../lib/getroute.c:103 ../lib/setroute.c:80
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr "Pro tøídu adres `%s' není ¾ádné smìrování.\n"
+
+#: ../lib/hippi.c:96 ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr "in_hippi(%s): chybná hippi adresa!\n"
+
+#: ../lib/hippi.c:123
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr "in_hippi(%s): nadbyteèné : ignorováno!\n"
+
+#: ../lib/hippi.c:134
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr "in_hippi(%s): nadbyteèné znaky!\n"
+
+#: ../lib/hw.c:147
+msgid "Local Loopback"
+msgstr "Místní smyèka"
+
+#: ../lib/hw.c:150
+msgid "Serial Line IP"
+msgstr "IP po sériové lince"
+
+#: ../lib/hw.c:151
+msgid "VJ Serial Line IP"
+msgstr "Vj IP po sériové lince"
+
+#: ../lib/hw.c:152
+msgid "6-bit Serial Line IP"
+msgstr "6bitový IP po sériové lince"
+
+#: ../lib/hw.c:153
+msgid "VJ 6-bit Serial Line IP"
+msgstr "6bitový VJ IP po sériové lince"
+
+#: ../lib/hw.c:154
+msgid "Adaptive Serial Line IP"
+msgstr "Adaptivní IP po sériové lince"
+
+#: ../lib/hw.c:157
+msgid "Ethernet"
+msgstr "Ethernet"
+
+#: ../lib/hw.c:163
+msgid "Fiber Distributed Data Interface"
+msgstr "Fiber Distributed Data Interface"
+
+#: ../lib/hw.c:166
+msgid "HIPPI"
+msgstr "HIPPI"
+
+#: ../lib/hw.c:178
+msgid "IPIP Tunnel"
+msgstr "IPIP Tunnel"
+
+#: ../lib/hw.c:181
+msgid "Point-to-Point Protocol"
+msgstr "Point-to-Point Protokol"
+
+#: ../lib/hw.c:184
+msgid "(Cisco)-HDLC"
+msgstr "(Cisco)-HDLC"
+
+#: ../lib/hw.c:185
+msgid "LAPB"
+msgstr "LAPB"
+
+#: ../lib/hw.c:188
+msgid "ARCnet"
+msgstr "ARCnet"
+
+#: ../lib/hw.c:191
+msgid "Frame Relay DLCI"
+msgstr "Frame Relay DLCI"
+
+#: ../lib/hw.c:192
+msgid "Frame Relay Access Device"
+msgstr "Pøístupové zaøízení Frame Relay"
+
+#: ../lib/hw.c:195
+msgid "IPv6-in-IPv4"
+msgstr "IPv6-in-IPv4"
+
+#: ../lib/hw.c:198
+msgid "IrLAP"
+msgstr "IrLAP"
+
+#: ../lib/hw.c:201
+msgid "16/4 Mbps Token Ring"
+msgstr "Token Ring 16/4 Mb/s"
+
+#: ../lib/hw.c:203
+#, fuzzy
+msgid "16/4 Mbps Token Ring (New)"
+msgstr "Token Ring 16/4 Mb/s"
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr "rresolve: tøída adres %d není podporována!\n"
+
+#: ../lib/inet6_gr.c:79
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr "INET6 (IPv6) není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/inet6_gr.c:82
+msgid "Kernel IPv6 routing table\n"
+msgstr "Smìrovací tabulka v jádru pro IPv6\n"
+
+#: ../lib/inet6_gr.c:84
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+"Adresát                                     Dal¹í Smìrovaè                   "
+"       Pøízn Metrika Odkaz U¾it Rozhraní\n"
+
+#: ../lib/inet6_gr.c:158
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr "Cache sousedù v jádru pro IPv6\n"
+
+#: ../lib/inet6_gr.c:161
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+"Soused                                      HW Adresa         Rozhraní Pøízn "
+"Odkazy Stav\n"
+
+#: ../lib/inet6_gr.c:165
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+"Soused                                      HW Adresa         Rozhraní "
+"Pøíznaky Odkazy Stav          Pro¹lý(sec) Smazat(sec)\n"
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr "Pou¾ití: inet6_route [-vF] del Cíl\n"
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr "       inet6_route [-vF] add Cíl [gw Gw] [metrika M] [[dev] If]\n"
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr "       inet6_route [-FC] flush      NENÍ podporováno\n"
+
+#: ../lib/inet6_sr.c:182
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr "Smìrovací tabulku `inet6' nelze vyprazdòovat\n"
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr "INET (IPv4) není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr "Smìrovací tabulka v jádru pro IP\n"
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Adresát         Brána           Maska           Pøízn Metrik Odkaz  U¾t "
+"Rozhraní\n"
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Adresát         Brána           Maska           Pøízn   MSS Okno    irtt "
+"Rozhraní\n"
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+"Adresát         Brána           Maska           Pøízn Metrik Odkazy U¾t "
+"Rozhraní MSS   Okno   irtt\n"
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr "Smìrovací cache v jádru pro IP\n"
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Odesílatel      Adresát         Maska           Pøízn Metrik Odkazy U¾t "
+"Rozhraní\n"
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Odesílatel      Adresát         Maska           Pøízn   MSS Okno    irtt "
+"Rozhraní\n"
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+"Odesílatel      Adresát         Maska           Pøízn Metrik Odkazy U¾t "
+"Rozhraní MSS   Okno   irtt HH   Arp\n"
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+"Odesílatel      Adresát         Maska           Pøízn Metrik Odkazy U¾t "
+"Rozhraní MSS    Okno irtt   TOS HHOdk HHAktuál    Zvlá¹tCíl\n"
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+"Pou¾ití: inet_route [-vF] del {-host|-net} Cíl[/prefix] [gw Gw] [metrika M] "
+"[[dev] If]\n"
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Cíl[/prefix] [gw Gw] [metrika M]\n"
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Cíl/[prefix] [metrika M] reject\n"
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr "       inet_route [-FC] flush      NENÍ podporováno\n"
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr "route: %s: sí» nelze pou¾ít jako bránu!\n"
+
+#: ../lib/inet_sr.c:174
+#, fuzzy
+msgid "route: Invalid MSS/MTU.\n"
+msgstr "route: Nesprávné NSS.\n"
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr "route: Nesprávné okno.\n"
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr "route: Nesprávné zahajovací rtt.\n"
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr "route: sí»ová maska %.8x nedává smysl, kdy¾ cílem je cesty poèítaè\n"
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr "route: sí»ová maska %s je nesprávná\n"
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr "route: sí»ová maska nevyhovuje adrese cesty\n"
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr "Smìrovací cache `inet' nelze vyprazdòovat\n"
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr "Smìrovací cache `inet' nelze mìnit\n"
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr "IPX není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr "Smìrovací tabulka v jádru pro IPX\n"
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr "Cíl                       Smìrovaè Sí»              Smìrovaè Uzel\n"
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr "IPX: toto je tøeba ulo¾it\n"
+
+#: ../lib/masq_info.c:197
+msgid "IP masquerading entries\n"
+msgstr "IP maskovací polo¾ky\n"
+
+#: ../lib/masq_info.c:200
+msgid "prot   expire source               destination          ports\n"
+msgstr "prot   ¾ivot  zdroj                cíl                  porty\n"
+
+#: ../lib/masq_info.c:203
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+"prot   ¾ivot     zahajsek delta pøedchd zdroj             cíl                "
+"   porty\n"
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr "NET/ROM není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr "Smìrovací tabulka v jádru pro NET/ROM\n"
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr "Cíl          Mnemonika Kvalita  Soused     Rozhraní\n"
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr "pou¾ití netrom\n"
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr "NET/ROM: toto je potøeba ulo¾it\n"
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr "Tímto programem nelze PPP spustit.\n"
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr "Lituji, pou¾ijte pppd!\n"
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr "Adresa uzlu musí mít 10 èíslic"
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr "ROSE není na tomto systému nakonfigurováno.\n"
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr "Smìrovací tabulka v jádru pro ROSE\n"
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr "in_tr(%s): nesprávná token ring adresa!\n"
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr "in_tr(%s): nadbyteèné: ignorováno!\n"
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr "in_tr(%s): nadbyteèné znaky!\n"
+
+#: ../lib/interface.c:124
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr "varování: není dostupný ¾ádný inet soket: %s\n"
+
+#: ../lib/interface.c:270
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr ""
+
+#. Give better error message for this case.
+#: ../lib/interface.c:504
+msgid "Device not found"
+msgstr "Zaøízení nebylo nalezeno"
+
+#: ../lib/interface.c:508
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr "%s: chyba pøi získávání informací o rozhraní %s\n"
+
+#: ../lib/sockets.c:59
+msgid "No usable address families found.\n"
+msgstr "Nebyla nalezena ¾ádná pou¾itelná tøída adres.\n"
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr "ip: %s není platnou inet adresou\n"
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr "ip: %s není platným inet prefixem\n"
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr "ip: %s není platnou IPv4 adresou\n"
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr "ip: argument %s je nesprávný\n"
+
+#: ../ipmaddr.c:56
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr " Usage: ipmaddr [ add | del ] MULTIADR dev ØETÌZEC\n"
+
+#: ../ipmaddr.c:57
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr "       ipmaddr show [ dev ØETÌZEC ] [ ipv4 | ipv6 | link | all ]\n"
+
+#: ../ipmaddr.c:58
+msgid "       ipmaddr -V | -version\n"
+msgstr "       ipmaddr -V | -version\n"
+
+#: ../ipmaddr.c:258
+#, c-format
+msgid "family %d "
+msgstr "tøída %d "
+
+#: ../ipmaddr.c:267
+#, c-format
+msgid " users %d"
+msgstr " u¾ivatelé %d"
+
+#: ../ipmaddr.c:353
+msgid "Cannot create socket"
+msgstr "Soket nelze vytvoøit"
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr "slattach: zaøízení /dev/%s je ji¾ zamèeno!\n"
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr "slattach: tty_lock: (%s): %s\n"
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr "slattach: do PID souboru nelze zapisovat\n"
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr "slattach: tty_lock: u¾ivatel UUCP %s není znám!\n"
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr "slattach: tty_hangup(DROP): %s\n"
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr "slattach: tty_hangup(RAISE): %s\n"
+
+#: ../slattach.c:486
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr "slattach: tty_open: aktuální stav nelze zjistit!\n"
+
+#: ../slattach.c:493
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr "slattach: tty_open: aktuální linkovou disciplínu nelze zjistit!\n"
+
+#: ../slattach.c:501
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr "slattach: tty_open: re¾im RAW nelze nastavit!\n"
+
+#: ../slattach.c:508
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr "slattach: tty_open: %s bps nelze nastavit!\n"
+
+#: ../slattach.c:518
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr "slattach: tty_open: re¾im 8N1 nelze nastavit!\n"
+
+#: ../slattach.c:686
+#, c-format
+msgid "%s started"
+msgstr "protokol %s spu¹tìn"
+
+#: ../slattach.c:687
+#, c-format
+msgid " on %s"
+msgstr " na %s"
+
+#: ../slattach.c:688
+#, c-format
+msgid " interface %s\n"
+msgstr " rozhraní %s\n"
+
+#~ msgid ""
+#~ "   This comand can read or set the hostname or the NIS domainname. You can\n"
+#~ msgstr ""
+#~ "   Tento program zji¹»uje a nastavuje jméno poèítaèe èi NIS domény. Mù¾e "
+#~ "také\n"
+
+#~ msgid ""
+#~ "   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+#~ msgstr "   zjistit DNS doménu èi kanonické jméno poèítaèe.\n"
+
+#~ msgid ""
+#~ "   Unless you are using bind or NIS for host lookups you can change the\n"
+#~ msgstr ""
+#~ "   Pokud nepou¾íváte bind èi NIS pro vyhledávání jmen poèítaèù, pak mù¾ete\n"
+
+#~ msgid ""
+#~ "   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+#~ msgstr ""
+#~ "   zmìnit kanonické jméno poèítaèe a jméno DNS domény (je souèástí "
+#~ "kanonického\n"
+
+#~ msgid "   part of the FQDN) in the /etc/hosts file.\n"
+#~ msgstr "   jména poèítaèe) v souboru /etc/hosts.\n"
diff --git a/po/de.po b/po/de.po
new file mode 100644 (file)
index 0000000..f884dd9
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,2474 @@
+# $Id: de.po,v 1.10 2000/08/01 03:19:48 ecki Exp $
+# German translation for net-tools 1.51
+# Copyright (C) 1999 Ralf Bächle <ralf@gnu.org>
+msgid ""
+msgstr ""
+"Project-Id-Version: net-tools 1.51\n"
+"POT-Creation-Date: 2000-02-14 02:31+0100\n"
+"PO-Revision-Date: 1998-03-01 00:02+0100\n"
+"Last-Translator: Ralf Bächle <ralf@gnu.org>\n"
+"Language-Team:\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../arp.c:110 ../arp.c:269
+msgid "arp: need host name\n"
+msgstr "arp: Hostname muß angegeben werden\n"
+
+#: ../arp.c:207 ../arp.c:221
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr "Kein ARP Eintrag für %s\n"
+
+#: ../arp.c:239
+#, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr "rarp: Kann Eintrag aus %s : %u nicht setzen.\n"
+
+#: ../arp.c:243
+msgid "arp: protocol type mismatch.\n"
+msgstr "arp: unpassende Protokolltypen.\n"
+
+#: ../arp.c:252
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr "arp: Gerät ,,%s'' hat HW-Adresse %s ,,%s''.\n"
+
+#: ../arp.c:282
+msgid "arp: need hardware address\n"
+msgstr "arp: Hardwareadresse muß angegeben werden\n"
+
+#: ../arp.c:290
+msgid "arp: invalid hardware address\n"
+msgstr "arp: ungültige Hardwareadresse\n"
+
+#: ../arp.c:387
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr "arp: Kann %s nicht öffnen!\n"
+
+#: ../arp.c:403
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr "arp: Formatfehler in Zeile %u von Etherfile %s.\n"
+
+#: ../arp.c:416
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr "arp: Kann Eintrag auf Zeile %u von Etherdatei %s nicht setzen!\n"
+
+#: ../arp.c:437
+msgid "Address\t\t\tHWtype\tHWaddress\t    Flags Mask\t\t  Iface\n"
+msgstr "Adresse\t\t\tHWTyp\tHWAdresse\t    Flags   Maske\t\t  Iface\n"
+
+#: ../arp.c:467
+msgid "(incomplete)"
+msgstr "(unvollsändig)"
+
+#: ../arp.c:484
+#, c-format
+msgid "%s (%s) at "
+msgstr "%s (%s) auf "
+
+#: ../arp.c:490
+msgid "<incomplete> "
+msgstr "<unvollständig> "
+
+#: ../arp.c:496
+#, c-format
+msgid "netmask %s "
+msgstr "netzmaske %s "
+
+#: ../arp.c:513
+#, c-format
+msgid "on %s\n"
+msgstr "auf %s\n"
+
+#: ../arp.c:592
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr "Einträge: %d   Ignoriert: %d   Gefunden: %d\n"
+
+#: ../arp.c:596
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr "%s (%s) -- kein Eintrag\n"
+
+#: ../arp.c:598
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr "arp: In %d Einträgen wurde kein Zutreffender gefunden.\n"
+
+#: ../arp.c:613
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+"Benutzung:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<Hostname>]\n"
+
+#: ../arp.c:614
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr "  arp [-v]          [-i <if>] -d  <Hostname> [pub][nopub]\n"
+
+#: ../arp.c:615
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr "  arp [-vnD] [<HW>] [-i <if>] -f  <Dateiname>           <- Eintrag aus Datei hinzufügen\n"
+
+#: ../arp.c:616
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <Rechnername> <hwaddr> [temp][nopub]\n"
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <Hostname> <hwaddr> [netmask <nm>] pub\n"
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr "  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub\n"
+
+#: ../arp.c:620
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr "        -a                       Alle Hosts im BSD-Format anzeigen\n"
+
+#: ../arp.c:621
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr "        -s, --set                Neuen ARP-Eintrag setzen\n"
+
+#: ../arp.c:622
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr "        -d, --delete             Einen bestimmten Eintrag löschen\n"
+
+#: ../arp.c:623 ../netstat.c:1436 ../route.c:85
+msgid "        -v, --verbose            be verbose\n"
+msgstr "        -v, --verbose            Ausführliche Ausgaben\n"
+
+#: ../arp.c:624 ../netstat.c:1437 ../route.c:86
+msgid "        -n, --numeric            dont resolve names\n"
+msgstr "        -n, --numeric            Adressen nicht nach Namen auflösen\n"
+
+#: ../arp.c:625
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr "        -i, --device             Netzwerksgerät (z.B. eth0) angeben\n"
+
+#: ../arp.c:626
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr "        -D, --use-device         <hwaddr> von gegebenem Gerät lesen\n"
+
+#: ../arp.c:627
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr "        -A, -p, --protocol              Routentabelle anzeigen\n"
+
+#: ../arp.c:628
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+"        -f, --file               Neue Einträge aus Datei lesen\n"
+"\n"
+
+#: ../arp.c:630 ../rarp.c:181
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr "  <HW>='-H <hw>' um Hardwareadresstyp anzugeben.  Standard: %s\n"
+
+#: ../arp.c:631 ../rarp.c:182
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr "  Liste möglicher Hardwaretypen, die ARP unterstützen:\n"
+
+#: ../arp.c:664
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr "%s: Hardwaretyp nicht unterstützt!\n"
+
+#: ../arp.c:668
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr "%s: Adressfamilie nicht unterstützt!\n"
+
+#: ../arp.c:703
+msgid "arp: -N not yet supported.\n"
+msgstr "arp: -N noch nicht unterstützt.\n"
+
+#: ../arp.c:713
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr "arp: %s: unbekannte Adressfamilie.\n"
+
+#: ../arp.c:722
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr "arp: %s: unbekannter Hardwaretyp.\n"
+
+#: ../arp.c:741
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr "arp: %s: Kernel unterstützt nur ,,inet''.\n"
+
+#: ../arp.c:746
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr "arp: %s: Hardware unterstützt kein ARP.\n"
+
+#: ../hostname.c:69
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr "Rechnernamen auf ,,%s'' setzen\n"
+
+#: ../hostname.c:74
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr "%s: Nur Root darf den Rechnernamen ändern\n"
+
+#: ../hostname.c:77 ../hostname.c:97 ../hostname.c:116
+#, c-format
+msgid "%s: name too long\n"
+msgstr "%s: name zu lang\n"
+
+#: ../hostname.c:89
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr "Setze Hostname auf ,,%s''\n"
+
+#: ../hostname.c:94
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr "%s: Nur Root darf then Rechnernamen ändern\n"
+
+#: ../hostname.c:108
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr "Setze domainname auf ,,%s''\n"
+
+#: ../hostname.c:113
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr "%s: Nur Root darf den Domainnamen ändern\n"
+
+#: ../hostname.c:131
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr "Löse ,,%s'' auf ...\n"
+
+#: ../hostname.c:137
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr "Ergebnis: h_name=,,%s''\n"
+
+#: ../hostname.c:142
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr "Ergebnis: h_aliases=,,%s''\n"
+
+#: ../hostname.c:147
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr "Ergebnis: h_addr_list=,,%s''\n"
+
+#: ../hostname.c:209
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr "%s: Kann ,,%s'' nicht öffnen\n"
+
+#: ../hostname.c:223
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+"Benutzung: hostname [-v] {Hostname|-F Datei} Hostname (aus Datei) setzen\n"
+
+#: ../hostname.c:224
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+"       domainname [-v] {nisdomain|-F file}   NIS Domainname (aus Datei) "
+"setzen.\n"
+
+#: ../hostname.c:226
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr "       nodename [-v] {Rechnername|-F Datei}\n"
+
+#: ../hostname.c:228
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]\n"
+
+#: ../hostname.c:229
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr ""
+"       hostname [-v]                         Hostnamen anzeigen\n"
+"\n"
+
+#: ../hostname.c:230
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+"       hostname -V|--version|-h|--help       Information ausdrucken und "
+"beenden.\n"
+"\n"
+
+#: ../hostname.c:231
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+
+#: ../hostname.c:232
+msgid "    -s, --short           short host name\n"
+msgstr "    -s, --short           Kurzer Hostname\n"
+
+#: ../hostname.c:233
+msgid "    -a, --alias           alias names\n"
+msgstr "    -a, --alias           Namensalias\n"
+
+#: ../hostname.c:234
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr "    -i, --ip-address      Adressen für den Hostnamen\n"
+
+#: ../hostname.c:235
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr "    -f, --fqdn, --long    Langer Hostname (FQDN)\n"
+
+#: ../hostname.c:236
+msgid "    -d, --domain          DNS domain name\n"
+msgstr "    -d, --domain          DNS Domainname\n"
+
+#: ../hostname.c:237
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr "    -y, --yp, --nis       NIS/YP Domainname\n"
+
+#: ../hostname.c:239
+msgid "    -n, --node            DECnet node name\n"
+msgstr "    -n, --node            DECnet Knotennamen\n"
+
+#: ../hostname.c:241
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+"    -F, --file            Hostnamen oder NIS Domainnamen aus Datei lesen\n"
+"\n"
+
+#: ../hostname.c:243
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"   Dies Kommando setzt oder gibt den Hostnamen oder NIS Domainnamen aus.\n"
+"   Es ist ebenfalls möglich die DNS Domain oder den FQDN (langen Hostnamen)\n"
+"   ausgeben zu lassen.  Außer wenn DNS oder NIS als Namensdienst verwendet\n"
+"   wird, können FQDN (Fully Qualified Domain Name) und DNS Domainname (welcher\n"
+"   Teil des FQDNs ist) in /etc/hosts geändert werden.\n"
+
+#: ../hostname.c:338
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr "%s: Mit diesem Program kann der DNS Domainname nicht geändert werden\n"
+
+#: ../hostname.c:339
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+"\n"
+"Wenn Bind oder NIS nicht zur Hostnamensauflösung benutzt werden, kann der "
+"DNS\n"
+
+#: ../hostname.c:340
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"Domainname (welcher Teil des FQDN ist) in der Datei /etc/hosts geändert "
+"werden.\n"
+
+#: ../hostname.c:357
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr "gethostname()=,,%s''\n"
+
+#: ../hostname.c:374
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr "getdomainname()=,,%s''\n"
+
+#: ../hostname.c:389
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr "getnodename()=,,%s''\n"
+
+#: ../ifconfig.c:159
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr "%-9.9s Protokoll:%s  "
+
+#: ../ifconfig.c:164
+#, c-format
+msgid "HWaddr %s  "
+msgstr "Hardware Adresse %s  "
+
+#: ../ifconfig.c:167
+#, c-format
+msgid "Media:%s"
+msgstr "Medium:%s"
+
+#: ../ifconfig.c:169
+msgid "(auto)"
+msgstr "(auto)"
+
+#: ../ifconfig.c:176
+#, c-format
+msgid "          %s addr:%s "
+msgstr "          %s Adresse:%s "
+
+#: ../ifconfig.c:179
+#, c-format
+msgid " P-t-P:%s "
+msgstr " P-z-P:%s "
+
+#: ../ifconfig.c:182
+#, c-format
+msgid " Bcast:%s "
+msgstr " Bcast:%s "
+
+#: ../ifconfig.c:184
+#, c-format
+msgid " Mask:%s\n"
+msgstr " Maske:%s\n"
+
+#: ../ifconfig.c:201
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr "          inet6 Adresse: %s/%d"
+
+#: ../ifconfig.c:203
+msgid " Scope:"
+msgstr " Gültigkeitsbereich:"
+
+#: ../ifconfig.c:206
+msgid "Global"
+msgstr "Global"
+
+#: ../ifconfig.c:209
+msgid "Link"
+msgstr "Verbindung"
+
+#: ../ifconfig.c:212
+msgid "Site"
+msgstr "Standort"
+
+#: ../ifconfig.c:215
+msgid "Compat"
+msgstr "Kompatibilität"
+
+#: ../ifconfig.c:218
+msgid "Host"
+msgstr "Maschine"
+
+#: ../ifconfig.c:221
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: ../ifconfig.c:236
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr "          IPX/Ethernet II Adresse:%s\n"
+
+#: ../ifconfig.c:239
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr "          IPX/Ethernet SNAP Adresse:%s\n"
+
+#: ../ifconfig.c:242
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr "          IPX/Ethernet 802.2 Adresse:%s\n"
+
+#: ../ifconfig.c:245
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr "          IPX/Ethernet 802.3 Adresse:%s\n"
+
+#: ../ifconfig.c:255
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr "          EtherTalk Phase 2 Adresse:%s\n"
+
+#: ../ifconfig.c:264
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr "          econet Adresse:%s\n"
+
+#: ../ifconfig.c:270
+msgid "[NO FLAGS] "
+msgstr "[KEINE FLAGS] "
+
+#: ../ifconfig.c:272
+msgid "UP "
+msgstr "UP "
+
+#: ../ifconfig.c:274
+msgid "BROADCAST "
+msgstr "BROADCAST "
+
+#: ../ifconfig.c:276
+msgid "DEBUG "
+msgstr "DEBUG "
+
+#: ../ifconfig.c:278
+msgid "LOOPBACK "
+msgstr "LOOPBACK "
+
+#: ../ifconfig.c:280
+msgid "POINTOPOINT "
+msgstr "PUNKTZUPUNKT "
+
+#: ../ifconfig.c:282
+msgid "NOTRAILERS "
+msgstr "NOTRAILERS "
+
+#: ../ifconfig.c:284
+msgid "RUNNING "
+msgstr "RUNNING "
+
+#: ../ifconfig.c:286
+msgid "NOARP "
+msgstr "NOARP "
+
+#: ../ifconfig.c:288
+msgid "PROMISC "
+msgstr "PROMISC "
+
+#: ../ifconfig.c:290
+msgid "ALLMULTI "
+msgstr "ALLMULTI "
+
+#: ../ifconfig.c:292
+msgid "SLAVE "
+msgstr "SLAVE "
+
+#: ../ifconfig.c:294
+msgid "MASTER "
+msgstr "MASTER "
+
+#: ../ifconfig.c:296
+msgid "MULTICAST "
+msgstr "MULTICAST "
+
+#: ../ifconfig.c:299
+msgid "DYNAMIC "
+msgstr "DYNAMIC "
+
+#: ../ifconfig.c:302
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr " MTU:%d  Metric:%d"
+
+#: ../ifconfig.c:306
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr "  Outfill:%d  Keepalive:%d"
+
+#: ../ifconfig.c:320
+#, c-format
+msgid "RX packets:%lu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr ""
+"Empfangene Pakete:%lu Fehler:%lu Weggeworfen:%lu Überlauf:%lu Rahmen:%lu\n"
+
+#: ../ifconfig.c:325
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr "             komprimiert:%lu\n"
+
+#: ../ifconfig.c:329
+#, c-format
+msgid "TX packets:%lu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr ""
+"Verschickte Pakete:%lu Fehler:%lu Weggeworfen:%lu Überlauf:%lu Träger:%lu\n"
+
+#: ../ifconfig.c:333
+#, c-format
+msgid "          collisions:%lu "
+msgstr "          Kollisionen:%lu "
+
+#: ../ifconfig.c:335
+#, c-format
+msgid "compressed:%lu "
+msgstr "Komprimiert:%lu "
+
+#: ../ifconfig.c:337
+#, c-format
+msgid "txqueuelen:%d "
+msgstr "Sendewarteschlangenlänge:%d "
+
+#: ../ifconfig.c:345
+#, c-format
+msgid "Interrupt:%d "
+msgstr "Interrupt:%d "
+
+#. Only print devices using it for
+#. I/O maps
+#: ../ifconfig.c:348
+#, c-format
+msgid "Base address:0x%x "
+msgstr "Basisadresse:0x%x "
+
+#: ../ifconfig.c:350
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr "Speicher:%lx-%lx "
+
+#: ../ifconfig.c:353
+#, c-format
+msgid "DMA chan:%x "
+msgstr "DMA Kanal:%x "
+
+#: ../ifconfig.c:384 ../ifconfig.c:405
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr "%s: unbekannte Schnittstelle: %s\n"
+
+#: ../ifconfig.c:421
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <address>]\n"
+msgstr ""
+"Syntax:\n"
+"  ifconfig [-a] [-i] [-v] <Schnittstelle> [[<AF>] <Adresse>]\n"
+
+#: ../ifconfig.c:425
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr "  [add <Adresse>[/<Prefixlänge>]]\n"
+
+#: ../ifconfig.c:427
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr "  [del <Adresse>[/<Prefixlänge>]]\n"
+
+#: ../ifconfig.c:432
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr "  [[-]broadcast [<Adresse>]]  [[-]pointopoint [<Adresse>]]\n"
+
+#: ../ifconfig.c:433
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr "  [netmask <Addresse>]  [dstaddr <Adresse>]  [tunnel <Adresse>]\n"
+
+#: ../ifconfig.c:436
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr "  [outfill <NN>] [keepalive <NN>]\n"
+
+#: ../ifconfig.c:438
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr "  [hw <HW> <Adresse>]  [metric <NN>]  [mtu <NN>]\n"
+
+#: ../ifconfig.c:439
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+
+#: ../ifconfig.c:440
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr "  [multicast]  [[-]promisc]\n"
+
+#: ../ifconfig.c:441
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <Typ>]\n"
+
+#: ../ifconfig.c:443
+msgid "  [txqueuelen <NN>]\n"
+msgstr "  [txqueuelen <Länge>]\n"
+
+#: ../ifconfig.c:446
+msgid "  [[-]dynamic]\n"
+msgstr "  [[-]dynamic]\n"
+
+#: ../ifconfig.c:448
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+"  [up|down] ...\n"
+"\n"
+
+#: ../ifconfig.c:450
+msgid "  <HW>=Hardware Type.\n"
+msgstr "  <HW>=Hardwaretyp.\n"
+
+#: ../ifconfig.c:451
+msgid "  List of possible hardware types:\n"
+msgstr "  Liste möglicher Hardwaretypen:\n"
+
+#. 1 = ARPable
+#: ../ifconfig.c:453
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr "  <AF>=Adressfamilie.  Standardwert: %s\n"
+
+#: ../ifconfig.c:454
+msgid "  List of possible address families:\n"
+msgstr "  List der möglichen Adressfamilien:\n"
+
+#: ../ifconfig.c:593
+msgid "Unknown media type.\n"
+msgstr "Typ des Mediums unbekannt.\n"
+
+#: ../ifconfig.c:881
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr "%s: ungültige %s Adresse.\n"
+
+#: ../ifconfig.c:920 ../ifconfig.c:963 ../ifconfig.c:1011
+msgid "No support for INET6 on this system.\n"
+msgstr "INET6 ist auf diesem System nicht verfügbar.\n"
+
+#: ../ifconfig.c:983
+msgid "Address deletion not supported on this system.\n"
+msgstr "Das Löschen von Adressen ist auf diesem System nicht unterstützt.\n"
+
+#: ../ifconfig.c:1066
+msgid "No support for INET on this system.\n"
+msgstr "INET ist auf diesem System nicht verfügbar.\n"
+
+#: ../ifconfig.c:1076
+msgid "No support for ECONET on this system.\n"
+msgstr "ECONET wird auf diesem System nicht unterstützt.\n"
+
+#: ../ifconfig.c:1084
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr "Kann die Adressen der Familie %d nicht setzen.\n"
+
+#: ../netstat.c:383
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+"(Für \"-p\": geteuid()=%d konnte keine Information gelesen werden; sie "
+"sollten Root sein.)\n"
+
+#: ../netstat.c:387
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+"(Es konnten nicht alle Prozesse identifiziert werden; Informationen über\n"
+"nicht-eigene Processe werden nicht angezeigt; Root kann sie anzeigen.)\n"
+
+#: ../netstat.c:394 ../netstat.c:1089 ../netstat.c:1166
+msgid "LISTENING"
+msgstr "HÖRT"
+
+#: ../netstat.c:395
+msgid "CONN SENT"
+msgstr "VERBINGSAUFBAU GESCHICKT"
+
+#: ../netstat.c:396 ../netstat.c:1168
+msgid "DISC SENT"
+msgstr "VERBINDUNGSABBAU GESCHICKT"
+
+#: ../netstat.c:397 ../netstat.c:464 ../netstat.c:809 ../netstat.c:1169
+msgid "ESTABLISHED"
+msgstr "VERBUNDEN"
+
+#: ../netstat.c:419
+msgid "Active NET/ROM sockets\n"
+msgstr "Aktive NET/ROM Sockets\n"
+
+#: ../netstat.c:420
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"Benutzer   Ziel       Quelle     Gerät   Zustand      Vr/Vs    Send-Q  "
+"Recv-Q\n"
+
+#: ../netstat.c:430 ../netstat.c:1208
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr "Probleme beim Lesen von %s\n"
+
+#: ../netstat.c:465
+msgid "SYN_SENT"
+msgstr "SYN_SENT"
+
+#: ../netstat.c:466
+msgid "SYN_RECV"
+msgstr "SYN_RECV"
+
+#: ../netstat.c:467
+msgid "FIN_WAIT1"
+msgstr "FIN_WAIT1"
+
+#: ../netstat.c:468
+msgid "FIN_WAIT2"
+msgstr "FIN_WAIT2"
+
+#: ../netstat.c:469
+msgid "TIME_WAIT"
+msgstr "TIME_WAIT"
+
+#: ../netstat.c:470
+msgid "CLOSE"
+msgstr "CLOSE"
+
+#: ../netstat.c:471
+msgid "CLOSE_WAIT"
+msgstr "CLOSE_WAIT"
+
+#: ../netstat.c:472
+msgid "LAST_ACK"
+msgstr "LAST_ACK"
+
+#: ../netstat.c:473
+msgid "LISTEN"
+msgstr "LISTEN"
+
+#: ../netstat.c:474
+msgid "CLOSING"
+msgstr "CLOSING"
+
+#: ../netstat.c:544
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr "Warnung, fehlerhafte igmp6 line %d.\n"
+
+#: ../netstat.c:549 ../netstat.c:587 ../netstat.c:670 ../netstat.c:803
+#: ../netstat.c:935 ../netstat.c:940
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr "netstat: Nicht unterstützte Adressfamilie %d!\n"
+
+#: ../netstat.c:562 ../netstat.c:567 ../netstat.c:575 ../netstat.c:582
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr "Warnung, fehlerhafte igmp-Zeile %d.\n"
+
+#: ../netstat.c:666
+msgid "warning, got bogus tcp line.\n"
+msgstr "Warnung, fehlerhafte TCP Zeile.\n"
+
+#: ../netstat.c:704 ../netstat.c:855 ../netstat.c:975
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr "aus (0.00/%ld/%d)"
+
+#: ../netstat.c:708
+#, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr "ein (%2.2f/%ld/%d)"
+
+#: ../netstat.c:713
+#, fuzzy, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr "ein%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:718
+#, fuzzy, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr "ein%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:723 ../netstat.c:864 ../netstat.c:985
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr "unkn-%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:799
+msgid "warning, got bogus udp line.\n"
+msgstr "Warnung, fehlerhafe UDP-Zeile.\n"
+
+#: ../netstat.c:817 ../netstat.c:1075 ../netstat.c:1108
+msgid "UNKNOWN"
+msgstr "UNBEKANNT"
+
+#: ../netstat.c:860 ../netstat.c:980
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr "ein%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:949
+msgid "warning, got bogus raw line.\n"
+msgstr "Warnung, fehlerhafte raw-Zeile.\n"
+
+#: ../netstat.c:1028
+msgid "warning, got bogus unix line.\n"
+msgstr "Warnung, fehlerhafte UNIX-Zeile.\n"
+
+#: ../netstat.c:1055
+msgid "STREAM"
+msgstr "STREAM"
+
+#: ../netstat.c:1059
+msgid "DGRAM"
+msgstr "DGRAM"
+
+#: ../netstat.c:1063
+msgid "RAW"
+msgstr "RAW"
+
+#: ../netstat.c:1067
+msgid "RDM"
+msgstr "RDM"
+
+#: ../netstat.c:1071
+msgid "SEQPACKET"
+msgstr "SEQPACKET"
+
+#: ../netstat.c:1080
+msgid "FREE"
+msgstr "FREI"
+
+#: ../netstat.c:1096
+msgid "CONNECTING"
+msgstr "VERBINDUNGSAUFBAU"
+
+#: ../netstat.c:1100
+msgid "CONNECTED"
+msgstr "VERBUNDEN"
+
+#: ../netstat.c:1104
+msgid "DISCONNECTING"
+msgstr "VERBINDUNGSABBAU"
+
+#: ../netstat.c:1135
+msgid "Active UNIX domain sockets "
+msgstr "Aktive Sockets in der UNIX Domäne "
+
+#: ../netstat.c:1137 ../netstat.c:1666
+msgid "(servers and established)"
+msgstr "(Server und stehende Verbindungen)"
+
+#: ../netstat.c:1140 ../netstat.c:1669
+msgid "(only servers)"
+msgstr "(Nur Server)"
+
+#: ../netstat.c:1142 ../netstat.c:1671
+msgid "(w/o servers)"
+msgstr "(ohne Server)"
+
+#: ../netstat.c:1145
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+"\n"
+"Proto RefZäh Flaggen     Typ        Zustand       I-Node"
+
+#: ../netstat.c:1147
+msgid " Path\n"
+msgstr " Pfad\n"
+
+#: ../netstat.c:1167
+msgid "SABM SENT"
+msgstr "SABM GESCHICKT"
+
+#: ../netstat.c:1170
+msgid "RECOVERY"
+msgstr "WIEDERHERSTELLUNG"
+
+#: ../netstat.c:1184
+msgid "Active AX.25 sockets\n"
+msgstr "Aktive AX.25 Sockets\n"
+
+#: ../netstat.c:1185
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr "Ziel       Quelle     Gerät   Zustand      Vr/Vs    Send-Q  Empf-Q\n"
+
+#: ../netstat.c:1228
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr "Problem beim Lesen von Daten von %s\n"
+
+#: ../netstat.c:1279
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+"Aktive IPX Sockets\n"
+"Proto Recv-Q Send-Q Lokale Adresse             Gegenaddress               "
+"Zustand"
+
+#: ../netstat.c:1281
+msgid " User"
+msgstr " Benutzer"
+
+#: ../netstat.c:1315
+msgid "ESTAB"
+msgstr "VERBUNDEN"
+
+#: ../netstat.c:1323
+msgid "UNK."
+msgstr "UNB."
+
+#: ../netstat.c:1367
+msgid "     - no statistics available -"
+msgstr "     - keine Statistiken verfügbar -"
+
+#: ../netstat.c:1370
+msgid "[NO FLAGS]"
+msgstr "[KEINE FLAGS]"
+
+#: ../netstat.c:1400
+msgid "Kernel Interface table\n"
+msgstr "Kernel Schnittstellentabelle\n"
+
+#: ../netstat.c:1401
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"SStelle MTU Met    RX-OK RX-Feh RX-DRP RX-Ülf    TX-OK TX-Feh TX-DRP TX-Üb "
+"Flg\n"
+
+#: ../netstat.c:1404
+msgid "missing interface information"
+msgstr "Fehlende Interfaceinformation"
+
+#: ../netstat.c:1425
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+"Benutzung: netstat [-veenNcCF] [<Af>] -r\n"
+"           netstat {-V|--version|-h|--help}\n"
+
+#: ../netstat.c:1426
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr "       netstat [-vnNcaeol] [<Socket> ...]\n"
+
+#: ../netstat.c:1427
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+
+#: ../netstat.c:1429
+msgid "        -r, --route              display routing table\n"
+msgstr "        -r, --route              Routentabelle anzeigen\n"
+
+#: ../netstat.c:1430
+msgid "        -i, --interfaces         display interface table\n"
+msgstr "        -i, --interfaces         Schnittstellentabelle auflisten\n"
+
+#: ../netstat.c:1431
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr ""
+"        -g, --groups             Mitgliedschaft in Multicastgruppen "
+"anzeigen\n"
+
+#: ../netstat.c:1432
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr ""
+"        -s, --statistics         Netzwerksstatistiken anzeigen (wie SNMP)\n"
+
+#: ../netstat.c:1434
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+"        -M, --masquerade         Maskierte Verbindungen auflisten\n"
+"\n"
+
+#: ../netstat.c:1438 ../route.c:87
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr "        -N, --symbolic           Hardwarenamen auflösen\n"
+
+#: ../netstat.c:1439 ../route.c:88
+#, fuzzy
+msgid "        -e, --extend             display other/more information\n"
+msgstr ""
+"        -e, --extend             Weitere / zusätzliche Informationen "
+"anzeigen\n"
+
+#: ../netstat.c:1440
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr ""
+"        -p, --programs           PID/Programmnamen für Sockets anzeigen\n"
+
+#: ../netstat.c:1441
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+"        -c, --continuous         Anzeige laufend aktualisieren\n"
+"\n"
+
+#: ../netstat.c:1442
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr ""
+"        -l, --listening          Empfangsbereite Serversockets auflisten\n"
+
+#: ../netstat.c:1443
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr ""
+"        -a, --all, --listening   Alle Sockets anzeigen (normal: nur "
+"verbundene)\n"
+
+#: ../netstat.c:1444
+msgid "        -o, --timers             display timers\n"
+msgstr "        -o, --timers             Timer auflisten\n"
+
+#: ../netstat.c:1445 ../route.c:89
+#, fuzzy
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+"        -F, --fib                Forwarding Infomation Base anzeigen "
+"(Standard)\n"
+
+#: ../netstat.c:1446 ../route.c:90
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr ""
+"        -C, --cache              Routencache statt FIB anzeigen\n"
+"\n"
+
+#: ../netstat.c:1448
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+
+#: ../netstat.c:1449 ../route.c:92
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>' Default: %s\n"
+msgstr "  <AF>=,,-A <af>'' or ,,--<af>'' benutzen. Standard: %s\n"
+
+#: ../netstat.c:1450 ../route.c:93
+msgid "  List of possible address families (which support routing):\n"
+msgstr "  Liste möglicher Adressfamilien, die Routen unterstützen:\n"
+
+#: ../netstat.c:1663
+msgid "Active Internet connections "
+msgstr "Aktive Internetverbindungen "
+
+#: ../netstat.c:1673
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+
+#: ../netstat.c:1675
+msgid " User       Inode     "
+msgstr " Benutzer   Inode     "
+
+#: ../netstat.c:1678
+msgid " Timer"
+msgstr " Timer"
+
+#: ../netstat.c:1708
+msgid "IPv4 Group Memberships\n"
+msgstr "IPv4 Gruppenmitgliedschaften\n"
+
+#: ../netstat.c:1709
+msgid "Interface       RefCnt Group\n"
+msgstr "Schnittstelle   RefZäh Grupp\n"
+
+#: ../rarp.c:43
+msgid "This kernel does not support RARP.\n"
+msgstr "Dieser Kernel unterstützt kein RARP.\n"
+
+#: ../rarp.c:82
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr "Kein RARP Eintrag für %s.\n"
+
+#: ../rarp.c:95
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr "%s: fehlerhafte Hardwareadresse\n"
+
+#: ../rarp.c:127
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr "rarp: kann Datei %s:%s nicht öffnen.\n"
+
+#: ../rarp.c:139
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr "rarp: Formatfehler bei %s:%u\n"
+
+#: ../rarp.c:143 ../rarp.c:287
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr "rarp: %s: Unbekannter Host\n"
+
+#: ../rarp.c:146
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr "rarp: Kann Eintrag aus %s:%u nicht setzen.\n"
+
+#: ../rarp.c:175
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr ""
+"Benutzung: rarp -a                               Einträge im Cache listen.\n"
+
+#: ../rarp.c:176
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr ""
+"       rarp -d <hostname>                    Eintrag aus dem Cache löschen.\n"
+
+#: ../rarp.c:177
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr ""
+"       rarp [<HW>] -s <hostname> <hwaddr>    Eintrag zum Cache zufügen.\n"
+
+#: ../rarp.c:178
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+"       rarp -f                               Einträge aus /etc/ethers "
+"zufügen.\n"
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+"       rarp -V                               Programmversion anzeigen.\n"
+"\n"
+
+#: ../rarp.c:236
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr "%s: Unerlaubte Mischung von Optionen.\n"
+
+#: ../rarp.c:267
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr "rarp: %s: unknown hardware type.\n"
+
+#: ../route.c:79
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+"Benutzung: route [-nNvee] [-FC] [<AF>]           Kernelroutentabelle "
+"anzeigen\n"
+
+#: ../route.c:80
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+"       route [-v] [-FC] {add|del|flush} ...  Routentabelle für AF ändern.\n"
+"\n"
+
+#: ../route.c:82
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+"       route {-h|--help} [<AF>]              Genaue Syntax für AF anzeigen.\n"
+
+#: ../route.c:83
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+"       route {-V|--version}                  Version/Autor anzeigen und "
+"Ende.\n"
+"\n"
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr "Benutzung: plipconfig [-a] [-i] [-v] Interface\n"
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr "                  [nibble NN] [trigger NN]\n"
+
+#: ../plipconfig.c:68
+#, fuzzy
+msgid "       plipconfig -V | --version\n"
+msgstr "       plipconfig -V\n"
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr "%s\tnibble %lu  trigger %lu\n"
+
+#: ../iptunnel.c:79
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr "Benutzung: iptunnel { add | change | del | show } [ NAME ]\n"
+
+#: ../iptunnel.c:80
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr "          [ mode { ipip | gre | sit } ] [ remote ADR ] [ local ADR ]\n"
+
+#: ../iptunnel.c:81
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr "          [ [i|o]seq ] [ [i|o]key SCHLÜSSEL ] [ [i|o]csum ]\n"
+
+#: ../iptunnel.c:82
+#, fuzzy
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr ""
+"          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_GERÄt ]\n"
+"\n"
+
+#: ../iptunnel.c:83
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+
+#: ../iptunnel.c:84
+msgid "Where: NAME := STRING\n"
+msgstr "Wobei: NAME := ZEICHENKETTE\n"
+
+#: ../iptunnel.c:85
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr "       ADR := { IP_ADRESSE | any }\n"
+
+#: ../iptunnel.c:86
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr "       TOS  := { NUMBER | inherit }\n"
+
+#: ../iptunnel.c:87
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr "       TTL  := { 1..255 | inherit }\n"
+
+#: ../iptunnel.c:88
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr "       KEY  := { DOTTED_QUAD | ZAHL }\n"
+
+#: ../iptunnel.c:326
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr "Schlüssel sind mit ipip und sit nicht erlaubt.\n"
+
+#: ../iptunnel.c:346
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr "Ein Broadcasttunnel ist nur mit einer Quelladresse möglich\n"
+
+#: ../iptunnel.c:361
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr "ttl != 0 und noptmudisc sind inkompatibel\n"
+
+#: ../iptunnel.c:373
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr ""
+"Die Tunnelbetriebsart (ipip, fre oder sit) kann nicht festgestellt werden\n"
+
+#: ../iptunnel.c:411
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr "%s: %s/ip  Gegenseite %s  lokal %s "
+
+#: ../iptunnel.c:415
+msgid "unknown"
+msgstr "Unbekannt"
+
+#: ../iptunnel.c:447
+msgid "  Drop packets out of sequence.\n"
+msgstr "  Pakete außer der Reihenfolge fallenlassen.\n"
+
+#: ../iptunnel.c:449
+msgid "  Checksum in received packet is required.\n"
+msgstr "  Prüfsumme im empfangenen Paket wird benötigt.\n"
+
+#: ../iptunnel.c:451
+msgid "  Sequence packets on output.\n"
+msgstr "  Pakete in Reihenfolge ausgeben.\n"
+
+#: ../iptunnel.c:453
+msgid "  Checksum output packets.\n"
+msgstr "  Prüfsumme für ausgegebene Pakete berechnen.\n"
+
+#: ../iptunnel.c:481
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr "Falsches Format von /proc/net/dev. Tut mir leid\n"
+
+#: ../iptunnel.c:494
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr "Kann den Typ von [%s] nicht holen\n"
+
+#: ../iptunnel.c:510
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr "RX: Pakete     Bytes        Fehler CsumErrs OutOfSeq Mcasts\n"
+
+#: ../iptunnel.c:513
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr "TX: Pakete     Bytes        Fehler DeadLoop NoRoute  NoBufs\n"
+
+#: ../statistics.c:45
+msgid "ICMP input histogram:"
+msgstr "ICMP Eingabehistogramm:"
+
+#: ../statistics.c:46
+msgid "ICMP output histogram:"
+msgstr "ICMP Ausgabehistogramm:"
+
+#: ../statistics.c:63
+#, c-format
+msgid "Forwarding is %s"
+msgstr "Weiterleitung ist %s"
+
+#: ../statistics.c:64
+#, c-format
+msgid "Default TTL is %d"
+msgstr "Standard-TTL ist %d"
+
+#: ../statistics.c:65
+#, c-format
+msgid "%d total packets received"
+msgstr "%d Pakete insgesamt empfangen"
+
+#: ../statistics.c:66
+#, c-format
+msgid "%d with invalid headers"
+msgstr "%d with ungültigen Headern"
+
+#: ../statistics.c:67
+#, c-format
+msgid "%d with invalid addresses"
+msgstr "%d mit ungültigen Adressen"
+
+#: ../statistics.c:68
+#, c-format
+msgid "%d forwarded"
+msgstr "%d weitergeleitet"
+
+#: ../statistics.c:69
+#, c-format
+msgid "%d with unknown protocol"
+msgstr "%d mit unbekanntem Protokoll"
+
+#: ../statistics.c:70
+#, c-format
+msgid "%d incoming packets discarded"
+msgstr "%d eingehende Pakete weggeworfen"
+
+#: ../statistics.c:71
+#, c-format
+msgid "%d incoming packets delivered"
+msgstr "%d eingehende Pakete zugestellt"
+
+#: ../statistics.c:72
+#, c-format
+msgid "%d requests sent out"
+msgstr "%d Anfragen ausgesandt"
+
+#. ?
+#: ../statistics.c:73
+#, c-format
+msgid "%d outgoing packets dropped"
+msgstr "%d ausgehende Pakete weggeworfen"
+
+#: ../statistics.c:74
+#, c-format
+msgid "%d dropped because of missing route"
+msgstr "%d weggeworfen wegen fehlender Route"
+
+#: ../statistics.c:75
+#, c-format
+msgid "%d fragments dropped after timeout"
+msgstr "%d Fragmente nach Timeout weggeworfen"
+
+#: ../statistics.c:76
+#, c-format
+msgid "%d reassemblies required"
+msgstr "%d Wiederzusammenstellungen nötig"
+
+#. ?
+#: ../statistics.c:77
+#, c-format
+msgid "%d packets reassembled ok"
+msgstr "%d Fragmente korrekt empfangen"
+
+#: ../statistics.c:78
+#, c-format
+msgid "%d packet reassembles failed"
+msgstr "%d fehlgeschlagene Paketdefragmentierungen"
+
+#: ../statistics.c:79
+#, c-format
+msgid "%d fragments received ok"
+msgstr "%d Fragmente korrekt empfangen"
+
+#: ../statistics.c:80
+#, c-format
+msgid "%d fragments failed"
+msgstr "%d Fragmente Fehlgeschlagen"
+
+#: ../statistics.c:81
+#, c-format
+msgid "%d fragments created"
+msgstr "%d Fragmente erzeugt"
+
+#: ../statistics.c:86
+#, c-format
+msgid "%d ICMP messages received"
+msgstr "%d ICMP Nachrichten empfangen"
+
+#: ../statistics.c:87
+#, c-format
+msgid "%d input ICMP message failed."
+msgstr "%d eingegangene ICMP Nachrichten fehlgeschlagen"
+
+#: ../statistics.c:88 ../statistics.c:101
+#, c-format
+msgid "destination unreachable: %d"
+msgstr "Ziel unerreichbar: %d"
+
+#: ../statistics.c:89
+#, c-format
+msgid "timeout in transit: %d"
+msgstr "Timeout beim Transit: %d"
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "wrong parameters: %d"
+msgstr "Fehlerhafte Parameter: %d"
+
+#. ?
+#: ../statistics.c:91
+#, c-format
+msgid "source quenchs: %d"
+msgstr "Source Quenchs: %d"
+
+#: ../statistics.c:92
+#, c-format
+msgid "redirects: %d"
+msgstr "Umleitungen: %d"
+
+#: ../statistics.c:93
+#, c-format
+msgid "echo requests: %d"
+msgstr "Echo Requests: %d"
+
+#: ../statistics.c:94 ../statistics.c:107
+#, c-format
+msgid "echo replies: %d"
+msgstr "Echo Antworten: %d"
+
+#: ../statistics.c:95
+#, c-format
+msgid "timestamp request: %d"
+msgstr "Zeitstempelanfragen: %d"
+
+#: ../statistics.c:96
+#, c-format
+msgid "timestamp reply: %d"
+msgstr "Zeitstempelantworten: %d"
+
+#: ../statistics.c:97
+#, c-format
+msgid "address mask request: %d"
+msgstr "Adressmaskenanfragen: %d"
+
+#. ?
+#: ../statistics.c:98
+msgid "address mask replies"
+msgstr "Adressmaskenantworten"
+
+#. ?
+#: ../statistics.c:99
+#, c-format
+msgid "%d ICMP messages sent"
+msgstr "%d ICMP-Nachrichten geschickt"
+
+#: ../statistics.c:100
+#, c-format
+msgid "%d ICMP messages failed"
+msgstr "%d ICMP Nachrichten fehlgeschlagen"
+
+#: ../statistics.c:102
+#, c-format
+msgid "time exceeded: %d"
+msgstr "Zeitüberschreitung: %d"
+
+#. ?
+#: ../statistics.c:104
+#, c-format
+msgid "source quench: %d"
+msgstr "Source Quench: %d"
+
+#: ../statistics.c:105
+#, c-format
+msgid "redirect: %d"
+msgstr "Umleitungen: %d"
+
+#: ../statistics.c:106
+#, c-format
+msgid "echo request: %d"
+msgstr "Echo Anfragen: %d"
+
+#: ../statistics.c:108
+#, c-format
+msgid "timestamp requests: %d"
+msgstr "Zeitstempel Anfragen: %d"
+
+#: ../statistics.c:109
+#, c-format
+msgid "timestamp replies: %d"
+msgstr "Zeitstempel Antworten: %d"
+
+#: ../statistics.c:110
+#, c-format
+msgid "address mask requests: %d"
+msgstr "Adressmaskenanfragen: %d"
+
+#: ../statistics.c:111
+#, c-format
+msgid "address mask replies: %d"
+msgstr "Adressmaskenantworten: %d"
+
+#: ../statistics.c:116
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr "RTO Algorithmus is %s"
+
+#: ../statistics.c:120
+#, c-format
+msgid "%d active connections openings"
+msgstr "%d Verbindungen aktiv geöffnet"
+
+#: ../statistics.c:121
+#, c-format
+msgid "%d passive connection openings"
+msgstr "%d Verbindungen passiv geöffnet"
+
+#: ../statistics.c:122
+#, c-format
+msgid "%d failed connection attempts"
+msgstr "%d fehlerhafte Verbindungsversuche"
+
+#: ../statistics.c:123
+#, c-format
+msgid "%d connection resets received"
+msgstr "%d Verbindungsrücksetzungen empfangen"
+
+#: ../statistics.c:124
+#, c-format
+msgid "%d connections established"
+msgstr "%d Verbindungen aufgebaut"
+
+#: ../statistics.c:125
+#, c-format
+msgid "%d segments received"
+msgstr "%d Segmente empfangen"
+
+#: ../statistics.c:126
+#, c-format
+msgid "%d segments send out"
+msgstr "%d Segmente abgeschickt"
+
+#: ../statistics.c:127
+#, c-format
+msgid "%d segments retransmited"
+msgstr "%d Segmente erneut geschickt"
+
+#: ../statistics.c:128
+#, c-format
+msgid "%d bad segments received."
+msgstr "%d fehlerhafte Segmente empfangen."
+
+#: ../statistics.c:129
+#, c-format
+msgid "%d resets sent"
+msgstr "%d Rücksetzungen geschickt"
+
+#: ../statistics.c:134
+#, c-format
+msgid "%d packets received"
+msgstr "%d Pakete empfangen"
+
+#: ../statistics.c:135
+#, c-format
+msgid "%d packets to unknown port received."
+msgstr "%d Pakete für unbekannte Ports empfangen."
+
+#: ../statistics.c:136
+#, c-format
+msgid "%d packet receive errors"
+msgstr "%d Paketempfangsfehler"
+
+#: ../statistics.c:137
+#, c-format
+msgid "%d packets sent"
+msgstr "%d Pakete geschickt"
+
+#: ../statistics.c:142
+#, c-format
+msgid "%d SYN cookies sent"
+msgstr "%d SYN-Cookies verschickt"
+
+#: ../statistics.c:143
+#, c-format
+msgid "%d SYN cookies received"
+msgstr "%d SYN-Cookies empfangen"
+
+#: ../statistics.c:144
+#, c-format
+msgid "%d invalid SYN cookies received"
+msgstr "%d ungültige SYN-Cookies empfangen"
+
+#: ../statistics.c:146
+#, c-format
+msgid "%d resets received for embryonic SYN_RECV sockets"
+msgstr "%d Rücksetzungen fuer embrionische SYN_RECV Sockets"
+
+#: ../statistics.c:148
+#, c-format
+msgid "%d packets pruned from receive queue because of socket buffer overrun"
+msgstr ""
+"%d Pakete wegen Socketpufferüberlauf aus der Empfangswarteschlange "
+"weggeworfen"
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:151
+#, c-format
+msgid "%d packets pruned from out-of-order queue"
+msgstr "%d Pakete aus der ungeordneten Warteschlange weggeworfen"
+
+#: ../statistics.c:152
+#, c-format
+msgid ""
+"%d packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr ""
+"%d Pakete aus der ungeordneten Warteschlange wegen Pufferüberlauf weggeworfen"
+
+#: ../statistics.c:154
+#, c-format
+msgid "%d ICMP packets dropped because they were out-of-window"
+msgstr "%d ICMP Pakete weggeworfen die auserhalb des Fensters waren"
+
+#: ../statistics.c:156
+#, c-format
+msgid "%d ICMP packets dropped because socket was locked"
+msgstr "%d ICMP Pakete verworfen weil Socket gesperrt war"
+
+#: ../statistics.c:222
+msgid "enabled"
+msgstr "aktiviert"
+
+#: ../statistics.c:222
+msgid "disabled"
+msgstr "deaktiviert"
+
+#: ../statistics.c:272
+#, c-format
+msgid "unknown title %s\n"
+msgstr "Unbekannter Titel %s\n"
+
+#: ../statistics.c:298
+msgid "error parsing /proc/net/snmp"
+msgstr "Fehler beim Parsen von /proc/net/snmp"
+
+#: ../statistics.c:311
+msgid "cannot open /proc/net/snmp"
+msgstr "Kann /proc/net/snmp nicht öffnen"
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr "Hardwaretyp ,,%s'' nicht unterstützt.\n"
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr "Kann line discipline nicht auf ``%s'' setzen.\n"
+
+#: ../lib/af.c:145 ../lib/hw.c:148
+msgid "UNSPEC"
+msgstr "UNSPEC"
+
+#: ../lib/af.c:147
+msgid "UNIX Domain"
+msgstr "UNIX Domain"
+
+#: ../lib/af.c:150
+msgid "DARPA Internet"
+msgstr "DARPA Internet"
+
+#: ../lib/af.c:153
+msgid "IPv6"
+msgstr "IPv6"
+
+#: ../lib/af.c:156 ../lib/hw.c:169
+msgid "AMPR AX.25"
+msgstr "AMPR AX.25"
+
+#: ../lib/af.c:159 ../lib/hw.c:175
+msgid "AMPR NET/ROM"
+msgstr "AMPR NET/ROM"
+
+#: ../lib/af.c:162
+msgid "Novell IPX"
+msgstr ""
+
+#: ../lib/af.c:165
+msgid "Appletalk DDP"
+msgstr "Appletalk DDP"
+
+#: ../lib/af.c:168 ../lib/hw.c:207
+msgid "Econet"
+msgstr "Econet"
+
+#: ../lib/af.c:171 ../lib/hw.c:172
+msgid "AMPR ROSE"
+msgstr "AMPR ROSE"
+
+#: ../lib/af.c:174 ../lib/hw.c:160
+msgid "Ash"
+msgstr "Ash"
+
+#: ../lib/af.c:232
+msgid "Please don't supply more than one address family.\n"
+msgstr "Bitte nur eine Adressfamilie angeben.\n"
+
+#: ../lib/af.c:293
+msgid "Too much address family arguments.\n"
+msgstr "Zu viele Adressfamilien angegeben.\n"
+
+#: ../lib/af.c:304
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr "Unbekannte Adressfamilie `%s'.\n"
+
+#: ../lib/arcnet.c:53 ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52
+#: ../lib/fddi.c:67 ../lib/hippi.c:68 ../lib/inet.c:244 ../lib/inet.c:259
+#: ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78 ../lib/rose.c:71
+#: ../lib/rose.c:126 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr "[NICHT GESETZT]"
+
+#: ../lib/arcnet.c:81 ../lib/arcnet.c:96
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr "in_arcnet(%s): Ungültige ARCnet-Adresse!\n"
+
+#: ../lib/arcnet.c:108
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr "in_arcnet(%s): angehängt : ignoriert!\n"
+
+#: ../lib/arcnet.c:120
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr "in_arcnet(%s): Nachfolgender Müll!\n"
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr "Fehlerhafte Ash Adresse"
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr "Ungültiges Rufzeichen"
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr "Rufzeichen zu lang"
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr "AX.25 ist auf diesem System nicht konfiguriert.\n"
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr "Kernel AX.25 Routentabelle\n"
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr "Ziel         SStelle  Benutzer\n"
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr "DDP-Routentabelle wird noch nicht unterstützt.\n"
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr "in_ether(%s): ungültige Ethernetadresse!\n"
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr "in_ether(%s): angehängt : ignoriert!\n"
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr "in_ether(%s): Nachfolgender Müll!\n"
+
+#: ../lib/fddi.c:95 ../lib/fddi.c:110
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr "in_fddi(%s): Ungültige FDDI-Adresse!\n"
+
+#: ../lib/fddi.c:122
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): nachfolgend : ignoriert!\n"
+
+#: ../lib/fddi.c:134
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): Nachfolgender Müll!\n"
+
+#: ../lib/getroute.c:97 ../lib/setroute.c:76
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr "Adressfamilie `%s' wird nicht unterstützt.\n"
+
+#: ../lib/getroute.c:103 ../lib/setroute.c:80
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr "Kein Routen für Adressfamilie `%s'.\n"
+
+#: ../lib/hippi.c:96 ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr "in_hippi(%s): Ungültige HIPPI-Adresse!\n"
+
+#: ../lib/hippi.c:123
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr "in_hippi(%s): nachfolgend : ignoriert!\n"
+
+#: ../lib/hippi.c:134
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr "in_hippi(%s): Nachfolgender Müll!\n"
+
+#: ../lib/hw.c:147
+msgid "Local Loopback"
+msgstr "Lokale Schleife"
+
+#: ../lib/hw.c:150
+msgid "Serial Line IP"
+msgstr "Serielle IP"
+
+#: ../lib/hw.c:151
+msgid "VJ Serial Line IP"
+msgstr "Serielle VJ-IP"
+
+#: ../lib/hw.c:152
+msgid "6-bit Serial Line IP"
+msgstr "6-bit Serielle IP"
+
+#: ../lib/hw.c:153
+msgid "VJ 6-bit Serial Line IP"
+msgstr "VJ 6-bit Serielle IP"
+
+#: ../lib/hw.c:154
+msgid "Adaptive Serial Line IP"
+msgstr "Adaptive Serielle IP"
+
+#: ../lib/hw.c:157
+msgid "Ethernet"
+msgstr "Ethernet"
+
+#: ../lib/hw.c:163
+msgid "Fiber Distributed Data Interface"
+msgstr "Fiber Distributed Data Interface"
+
+#: ../lib/hw.c:166
+msgid "HIPPI"
+msgstr "HIPPI"
+
+#: ../lib/hw.c:178
+msgid "IPIP Tunnel"
+msgstr "IPIP Tunnel"
+
+#: ../lib/hw.c:181
+msgid "Point-to-Point Protocol"
+msgstr "Punkt-zu-Punkt Verbindung"
+
+#: ../lib/hw.c:184
+msgid "(Cisco)-HDLC"
+msgstr "(Cisco)-HDLC"
+
+#: ../lib/hw.c:185
+msgid "LAPB"
+msgstr "LAPB"
+
+#: ../lib/hw.c:188
+msgid "ARCnet"
+msgstr "ARCnet"
+
+#: ../lib/hw.c:191
+msgid "Frame Relay DLCI"
+msgstr "Frame Relay DLCI"
+
+#: ../lib/hw.c:192
+msgid "Frame Relay Access Device"
+msgstr "Frame Relay Access Device"
+
+#: ../lib/hw.c:195
+msgid "IPv6-in-IPv4"
+msgstr "IPv6-nach-IPv4"
+
+#: ../lib/hw.c:198
+#, fuzzy
+msgid "IrLAP"
+msgstr "LAPB"
+
+#: ../lib/hw.c:201
+msgid "16/4 Mbps Token Ring"
+msgstr ""
+
+#: ../lib/hw.c:203
+msgid "16/4 Mbps Token Ring (New)"
+msgstr ""
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr "rresolve: nicht unterstützte Adressfamilie %d !\n"
+
+#: ../lib/inet6_gr.c:79
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr "INET6 (IPv6) ist auf diesem System nicht konfiguriert.\n"
+
+#: ../lib/inet6_gr.c:82
+msgid "Kernel IPv6 routing table\n"
+msgstr "Kernel IPv6 Routentabelle\n"
+
+#: ../lib/inet6_gr.c:84
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+"Ziel                                        Nächster Hop                     "
+"            Flags Metric Ref    Benutzer Iface\n"
+
+#: ../lib/inet6_gr.c:158
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr "Kernel IPv6 Nachbarcache\n"
+
+#: ../lib/inet6_gr.c:161
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+"Nachbar                                     HW-Adresse        Iface    Flags "
+"Ref Zustand\n"
+
+#: ../lib/inet6_gr.c:165
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+"Nachbar                                     HW-Adresse        Iface    Flags "
+"Ref Zustand          Stale(sec) Löschen(sec)\n"
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr "Benutzung: inet6_route [-vF] del Ziel\n"
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr "       inet6_route [-vF] add Ziel [gw Gateway] [metric M] [[dev] If]\n"
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr "       inet6_route [-FC] flush      NICHT unterstützt\n"
+
+#: ../lib/inet6_sr.c:182
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr ",,Flush'' für IPv6 Routentabelle nicht unterstützt\n"
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr "INET (IPv4) ist auf diesem System nicht konfiguriert.\n"
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr "Kernel IP Routentabelle\n"
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Ziel            Router          Genmask         Flags Metric Ref    Use "
+"Iface\n"
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Ziel            Router          Genmask         Flags   MSS Fenster irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+"Ziel            Gateway         Maske           Flags Metric Ref    Benutzer "
+"Iface    MSS   Fenster irtt\n"
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr "Kernel IP Routencache\n"
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Ziel            Ziel            Genmask         Flags Metric Ref    Ben "
+"Iface\n"
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Quelle          Ziel            Maske           Flags   MSS Fenster irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+"Quelle           Ziel           Quelle          Flags Metrik Ref    Benutzer "
+"Iface    MSS   Fenster irtt   HH  Arp\n"
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+"Quelle          Ziel            Gateway         Flags Metrik Ref    Ben "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+"Benutzung: inet_route [-vF] del {-host|-net} Ziel[/prefix] [gw Gw] [metric "
+"M] [[dev] If]\n"
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Ziel[/Prefix] [gw Gw] [metric M]\n"
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Ziel[/Präfix] [metric M] reject\n"
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr "       inet_route [-FC] flush      NICHT unterstützt\n"
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr "route: %s: Netzadresse als Gateway ungültig!\n"
+
+#: ../lib/inet_sr.c:174
+#, fuzzy
+msgid "route: Invalid MSS/MTU.\n"
+msgstr "route: Ungültige MSS.\n"
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr "route: Ungültige Fenstergröße.\n"
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr "route: Ungültige Start-RTT.\n"
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr "route: Netzmaske %.8x macht keinen Sinn mit Hostroute\n"
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr "Route: Fehlerhafte Netzmaske %s\n"
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr "route: Netzmaske passt nicht zur Routenadresse\n"
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr ",,Flush'' der Inet-Routentabelle nicht unterstützt\n"
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr "Änderung des ,,Inet'' Routencaches nicht unterstützt\n"
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr "IPX ist auf diesem System nicht konfiguriert.\n"
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr "Kernel IPX Routentabelle\n"
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr "Ziel                      Router Netz               Router Knoten\n"
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr "IPX: dies muß noch geschrieben werden\n"
+
+#: ../lib/masq_info.c:197
+msgid "IP masquerading entries\n"
+msgstr "IP-Maskierungseinträge\n"
+
+#: ../lib/masq_info.c:200
+msgid "prot   expire source               destination          ports\n"
+msgstr "Prot   expire Quelle               Ziel                 Ports\n"
+
+#: ../lib/masq_info.c:203
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+"Prot   Ablauf    Anf-Seq Delta Prevd Quelle               Ziel               "
+"  Ports\n"
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr "NET/ROM ist auf diesem System nicht verfügbar.\n"
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr "Kernel NET/ROM Routentabelle\n"
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr "Ziel         Mnemonic  Qualität  Nachbar  Iface\n"
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr "NET/ROM Benutzung\n"
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr "NET/ROM: Dies muß noch geschrieben werden\n"
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr "Mit diesem Programm kann PPP nicht gestartet werden.\n"
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr "Bitte benutzen sie pppd.\n"
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr "Knotenadresse muß zehn Ziffern haben"
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr "ROSE ist auf diesem System nicht verfügbar.\n"
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr "ROSE Kernel Routentabelle\n"
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr "in_tr(%s): ungültige Tokenringadresse!\n"
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr "in_tr(%s): nachfolgend : ignoriert!\n"
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr "in_tr(%s): nachfolgender Müll!\n"
+
+#: ../lib/interface.c:124
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr "Warnung: Keine INET Sockets verfügbar: %s\n"
+
+#: ../lib/interface.c:270
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr ""
+
+#. Give better error message for this case.
+#: ../lib/interface.c:504
+msgid "Device not found"
+msgstr "Gerät nicht gefunden"
+
+#: ../lib/interface.c:508
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr "%s: Fehler beim Auslesen der Schnittstelleninformation: %s\n"
+
+#: ../lib/sockets.c:59
+msgid "No usable address families found.\n"
+msgstr "Keine benutzbaren Adressfamilien gefunden.\n"
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr "ip: %s ist eine ungültige INET-Adresse\n"
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr "ip: %s ist ein ungültiges INET-Prefix\n"
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr "ip: %s ist eine ungültige IPv4 Adresse\n"
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr "ip: Fehlerhaftes Argument: %s\n"
+
+#: ../ipmaddr.c:56
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr "Benutzung: ipmaddr [ add | del ] MULTIADR dev NAME\n"
+
+#: ../ipmaddr.c:57
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr "       ipmaddr show [ dev NAME ] [ ipv4 | ipv6 | link | all ]\n"
+
+#: ../ipmaddr.c:58
+msgid "       ipmaddr -V | -version\n"
+msgstr ""
+
+#: ../ipmaddr.c:258
+#, c-format
+msgid "family %d "
+msgstr "familie %d "
+
+#: ../ipmaddr.c:267
+#, c-format
+msgid " users %d"
+msgstr " Benutzer %d"
+
+#: ../ipmaddr.c:353
+msgid "Cannot create socket"
+msgstr "Kann Socket nicht öffnen"
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr "slattach: /dev/%s bereits gesperrt!\n"
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr "slattach: tty_lock: (%s): %s\n"
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr "slattach: Kann PID-Datei nicht schreiben\n"
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr "slattach: tty_lock: UUCP Benutzer %s unbekannt!\n"
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr "slattach: tty_hangup(DROP): %s\n"
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr "slattach: tty_hangup(RAISE): %s\n"
+
+#: ../slattach.c:486
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr "slattach: tty_open: kann aktuellen Zustand nicht auslesen!\n"
+
+#: ../slattach.c:493
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr ""
+"slattach: tty_open: Kann augenblicklichen Leitungszustand nicht auslesen!\n"
+
+#: ../slattach.c:501
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr "slattach: tty_open: Kann RAW-Modus nicht setzen!\n"
+
+#: ../slattach.c:508
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr "slattach: tty_open: Kann %s bps nicht setzen!\n"
+
+#: ../slattach.c:518
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr "slattach: tty_open: Kann 8N1-Modus nicht setzen!\n"
+
+#: ../slattach.c:686
+#, c-format
+msgid "%s started"
+msgstr "%s gestartet"
+
+#: ../slattach.c:687
+#, c-format
+msgid " on %s"
+msgstr " auf %s"
+
+#: ../slattach.c:688
+#, c-format
+msgid " interface %s\n"
+msgstr " Schnittstelle: %s\n"
diff --git a/po/et_EE.po b/po/et_EE.po
new file mode 100644 (file)
index 0000000..d748410
--- /dev/null
@@ -0,0 +1,2639 @@
+# Estonian translations for net-tools
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Meelis Roos <Meelis.Roos@mail.ee>, 1999.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: net-tools 1.58\n"
+"POT-Creation-Date: 2001-02-15 21:28+0200\n"
+"PO-Revision-Date: 2001-02-15 18:00+0300\n"
+"Last-Translator: Meelis Roos <mroos@linux.ee>\n"
+"Language-Team: Estonian <linux-ee@eenet.ee>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../arp.c:110 ../arp.c:269
+msgid "arp: need host name\n"
+msgstr "arp: puudub hosti nimi\n"
+
+#: ../arp.c:207 ../arp.c:221
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr "%s jaoks pole ARP kirjet\n"
+
+#: ../arp.c:239
+#, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr "arp: ei saa riistvaralist aadressi `%s' jaoks: %s\n"
+
+#: ../arp.c:243
+msgid "arp: protocol type mismatch.\n"
+msgstr "arp: vale protokolli tüüp\n"
+
+#: ../arp.c:252
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr "arp: seadmel `%s' on riistvaraline aadress %s `%s'\n"
+
+#: ../arp.c:282
+msgid "arp: need hardware address\n"
+msgstr "arp: puudub riistvaraline aadress\n"
+
+#: ../arp.c:290
+msgid "arp: invalid hardware address\n"
+msgstr "arp: vigane riistvaraline aadress\n"
+
+#: ../arp.c:387
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr "arp: ei saa avada faili %s\n"
+
+#: ../arp.c:403
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr "arp: formaadiviga real %u failis %s\n"
+
+#: ../arp.c:416
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr "arp: ei saa kehtestada ARP kirjet real %u failis %s\n"
+
+#: ../arp.c:437
+msgid ""
+"Address                  HWtype  HWaddress           Flags Mask            "
+"Iface\n"
+msgstr ""
+"Aadress                  HWtüüp  HWaadress           Lipud Mask            "
+"Liides\n"
+
+#: ../arp.c:467
+msgid "(incomplete)"
+msgstr "(mittetäielik)"
+
+#: ../arp.c:484
+#, c-format
+msgid "%s (%s) at "
+msgstr "%s (%s) aadressil "
+
+#: ../arp.c:490
+msgid "<incomplete> "
+msgstr "<mittetäielik>"
+
+#: ../arp.c:496
+#, c-format
+msgid "netmask %s "
+msgstr "võrgumask %s "
+
+#: ../arp.c:513
+#, c-format
+msgid "on %s\n"
+msgstr "liides %s\n"
+
+#: ../arp.c:592
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr "ARP kirjeid kokku: %s\tignoreerisin: %d\tleidsin: %d\n"
+
+#: ../arp.c:596
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr "%s (%s) -- pole kirjet\n"
+
+#: ../arp.c:598
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr "arp: ei leidnud %d kirje hulgast sobivat\n"
+
+#: ../arp.c:613
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+"Kasutamine:\n"
+"ARP cache vaatamine:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hosti nimi>]\n"
+
+#: ../arp.c:614
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr ""
+"ARP kirje kustutamine:\n"
+"  arp [-v]          [-i <if>] -d  <hosti nimi> [pub] [nopub]\n"
+
+#: ../arp.c:615
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr ""
+"ARP kirjete lisamine failist:\n"
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<failinimi>]\n"
+
+#: ../arp.c:616
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+"ARP kirje lisamine:\n"
+"  arp [-v]   [<HW>] [-i <if>] -s  <hosti nimi> <hwaddr> [temp] [nopub]\n"
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hosti nimi> <hwaddr> [netmask <nm>] pub\n"
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hosti nimi> <if> [netmask <nm>] pub\n"
+"\n"
+
+#: ../arp.c:620
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr ""
+"        -a                       näita kõiki hoste alternatiivsel (BSD) "
+"kujul\n"
+
+#: ../arp.c:621
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr "        -s, --set                uue ARP kirje seadmine\n"
+
+#: ../arp.c:622
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr "        -d, --delete             määratud kirje kustutamine\n"
+
+#: ../arp.c:623 ../netstat.c:1485 ../route.c:85
+msgid "        -v, --verbose            be verbose\n"
+msgstr "        -v, --verbose            jutukas väljund\n"
+
+#: ../arp.c:624
+msgid "        -n, --numeric            don't resolve names\n"
+msgstr "        -n, --numeric            mitte lahendada nimesid\n"
+
+#: ../arp.c:625
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr ""
+"        -i, --device             võrguliidese täpsustamine (näiteks eth0)\n"
+
+#: ../arp.c:626
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr "        -D, --use-device         lugeda <hwaddr> vastavalt liideselt\n"
+
+#: ../arp.c:627
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr "        -A, -p, --protocol       protokollipere määramine\n"
+
+#: ../arp.c:628
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+"        -f, --file               lugeda kirjed antud failist või "
+"/etc/ethers'st\n"
+"\n"
+
+#: ../arp.c:630 ../rarp.c:181
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr ""
+"  <HW>=kasutage '-H <hw>' riistvaralise aadressi määramiseks.\n"
+"       Vaikimisi: %s\n"
+
+#: ../arp.c:631 ../rarp.c:182
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr "  Võimalike ARP-i toetavate riistvara tüüpide nimekiri:\n"
+
+#: ../arp.c:664 ../arp.c:749
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr "arp: riistvara tüüpi %s ei toetata\n"
+
+#: ../arp.c:668
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr "arp: aadressiperekonda %s ei toetata\n"
+
+#: ../arp.c:703
+msgid "arp: -N not yet supported.\n"
+msgstr "arp: -N toetust pole veel\n"
+
+#: ../arp.c:713
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr "arp: tundmatu aadressiperekond %s\n"
+
+#: ../arp.c:722
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr "arp: tundmatu riistvara tüüp %s\n"
+
+#: ../arp.c:741
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr "arp: tuumas on ainult 'inet' aadressiperekonna toetus\n"
+
+#: ../arp.c:754
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr "arp: riistvara tüübil %s pole ARP toetust\n"
+
+#: ../hostname.c:69
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr "Sean sõlme nimeks `%s'\n"
+
+#: ../hostname.c:74
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr "%s: ainult root saab sõlme nime muuta\n"
+
+#: ../hostname.c:77 ../hostname.c:97 ../hostname.c:116
+#, c-format
+msgid "%s: name too long\n"
+msgstr "%s: nimi on liiga pikk\n"
+
+#: ../hostname.c:89
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr "Sean hosti nimeks `%s'\n"
+
+#: ../hostname.c:94
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr "%s: ainult root saab hosti nime muuta\n"
+
+#: ../hostname.c:108
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr "Sean domeeni nimeks `%s'\n"
+
+#: ../hostname.c:113
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr "%s: ainult root saab domeeni nime muuta\n"
+
+#: ../hostname.c:131
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr "Lahendan `%s' ...\n"
+
+#: ../hostname.c:137
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr "Tulemus: h_name=`%s'\n"
+
+#: ../hostname.c:142
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr "Tulemus: h_aliases=`%s'\n"
+
+#: ../hostname.c:147
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr "Tulemus: h_addr_list=`%s'\n"
+
+#: ../hostname.c:209
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr "%s: ei saa avada faili `%s'\n"
+
+#: ../hostname.c:223
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+"Kasutamine:\n"
+"  hostname [-v] {hosti nimi|-F fail}         hosti nime seadmine (ka "
+"failist)\n"
+
+#: ../hostname.c:224
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+"  domainname [-v] {nisdomeen|-F fail}        NIS domeeni nime seadmine\n"
+
+#: ../hostname.c:226
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr ""
+"  nodename [-v] {nodename|-F fail}           DECneti võrgusõlme nime "
+"seadmine\n"
+
+#: ../hostname.c:228
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr ""
+"  hostname [-v] [-d|-f|-s|-a|-i|-y|-n]       nime näitamine antud formaadis\n"
+
+#: ../hostname.c:229
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr "  hostname [-v]                              hosti nime näitamine\n"
+
+#: ../hostname.c:230
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+"  hostname -V|--version                      versiooniinfo väljastamine\n"
+"  hostname -h|--help                         seesama abiinfo\n"
+"\n"
+
+#: ../hostname.c:231
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+"  dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+
+#: ../hostname.c:232
+msgid "    -s, --short           short host name\n"
+msgstr "    -s, --short           lühike hosti nimi\n"
+
+#: ../hostname.c:233
+msgid "    -a, --alias           alias names\n"
+msgstr "     -a, --alias          alias-nimed\n"
+
+#: ../hostname.c:234
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr "    -i, --ip-address      hosti IP aadressid\n"
+
+#: ../hostname.c:235
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr ""
+"    -f, --fqdn, --long    pikk hosti nimi (FQDN - täielik süsteeminimi)\n"
+
+#: ../hostname.c:236
+msgid "    -d, --domain          DNS domain name\n"
+msgstr "    -d, --domain          DNS domeeni nimi\n"
+
+#: ../hostname.c:237
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr "    -y, --yp, --nis       NIS/YP domeeni nimi\n"
+
+#: ../hostname.c:239
+msgid "    -n, --node            DECnet node name\n"
+msgstr "    -n, --node            DECneti võrgusõlme nimi\n"
+
+#: ../hostname.c:241
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+"    -F, --file            lugeda hosti või NIS domeeni nimi failist\n"
+"\n"
+
+#: ../hostname.c:243
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"   Selle käsuga saab vaadata või seada hosti nime või NIS domeeni nime.\n"
+"   Samuti saab lugeda DNS domeeni nime ja täielikku süsteeminime (FQDN).\n"
+"   Kui Te EI kasuta nimeserverit ega NIS'i hostinimede lahendamiseks, saate\n"
+"   täielikku süsteeminime (FQDN) ja DNS domeeni nime (mis on täieliku nime\n"
+"   osa) muuta failist /etc/hosts.\n"
+
+#: ../hostname.c:338
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr "%s: selle käsuga ei saa muuta DNS domeeni nime\n"
+
+#: ../hostname.c:339
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+"\n"
+"Kui Te EI kasuta bind'i ega NIS'i nimede lahendamiseks, saate DNS domeeni\n"
+
+#: ../hostname.c:340
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr "(mis on täieliku nime osa) nime muuta failist /etc/hosts.\n"
+
+#: ../hostname.c:357
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr "gethostname()=`%s'\n"
+
+#: ../hostname.c:374
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr "getdomainname()=`%s'\n"
+
+#: ../hostname.c:389
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr "getnodename()=`%s'\n"
+
+#: ../ifconfig.c:110
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"Liides  MTU Meetr. RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Lip\n"
+
+#: ../ifconfig.c:132 ../ifconfig.c:164
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr "ifconfig: tundmatu liides %s: %s\n"
+
+#: ../ifconfig.c:156 ../ifconfig.c:740 ../ifconfig.c:831 ../ifconfig.c:937
+msgid "No support for INET on this system.\n"
+msgstr "Antud süsteem ei toeta INET aadressiperekonda\n"
+
+#: ../ifconfig.c:179
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]\n"
+msgstr ""
+"Kasutamine:\n"
+"  ifconfig [-a] [-i] [-v] [-s] <liides> [[<AF>] <aadress>]\n"
+
+#: ../ifconfig.c:181
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr "  [add <aadress>[/<prefiksi pikkus>]]\n"
+
+#: ../ifconfig.c:182
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr "  [del <aadress>[/<prefiksi pikkus>]]\n"
+
+#: ../ifconfig.c:183
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr "  [[-]broadcast [<aadress>]]  [[-]pointopoint [<aadress>]]\n"
+
+#: ../ifconfig.c:184
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr "  [netmask <aadress>]  [dstaddr <aadress>]  [tunnel <aadress>]\n"
+
+#: ../ifconfig.c:187
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr "  [outfill <NN>] [keepalive <NN>]\n"
+
+#: ../ifconfig.c:189
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr "  [hw <HW> <aadress>]  [metric <NN>]  [mtu <NN>]\n"
+
+#: ../ifconfig.c:190
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+
+#: ../ifconfig.c:191
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr "  [multicast]  [[-]promisc]\n"
+
+#: ../ifconfig.c:192
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <tüüp>]\n"
+
+#: ../ifconfig.c:194
+msgid "  [txqueuelen <NN>]\n"
+msgstr "  [txqueuelen <NN>]\n"
+
+#: ../ifconfig.c:197
+msgid "  [[-]dynamic]\n"
+msgstr "  [[-]dynamic]\n"
+
+#: ../ifconfig.c:199
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+"  [up|down] ...\n"
+"\n"
+
+#: ../ifconfig.c:201
+msgid "  <HW>=Hardware Type.\n"
+msgstr "  <HW>=riistvara tüüp\n"
+
+#: ../ifconfig.c:202
+msgid "  List of possible hardware types:\n"
+msgstr "  Võimalike riistvara tüüpide nimekiri:\n"
+
+#. 1 = ARPable
+#: ../ifconfig.c:204
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr "  <AF>=aadressiperekond, vaikimisi %s\n"
+
+#: ../ifconfig.c:205
+msgid "  List of possible address families:\n"
+msgstr "  Võimalike aadressiperekondade nimekiri:\n"
+
+#: ../ifconfig.c:361
+msgid "Unknown media type.\n"
+msgstr "Tundmatu meedia tüüp\n"
+
+#: ../ifconfig.c:653
+#, c-format
+msgid "hw address type `%s' has no handler to set address. failed.\n"
+msgstr ""
+"riistvara aadressi tüübil `%s' pole käsitlejat aadressi seadmiseks - ebaõnn\n"
+
+#: ../ifconfig.c:662
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr "%s: vigane %s aadress\n"
+
+#: ../ifconfig.c:706 ../ifconfig.c:796 ../ifconfig.c:882
+msgid "No support for INET6 on this system.\n"
+msgstr "Antud süsteem ei toeta INET6 aadressiperekonda\n"
+
+#: ../ifconfig.c:749 ../ifconfig.c:840
+#, c-format
+msgid "Interface %s not initialized\n"
+msgstr "Liides %s pole initsialiseeritud\n"
+
+#: ../ifconfig.c:761 ../ifconfig.c:851
+msgid "Bad address.\n"
+msgstr "Vigane aadress\n"
+
+#: ../ifconfig.c:854
+msgid "Address deletion not supported on this system.\n"
+msgstr "Antud süsteem ei toeta aadresside kustutamist\n"
+
+#: ../ifconfig.c:947
+msgid "No support for ECONET on this system.\n"
+msgstr "Antud süsteem ei toeta ECONET aadressiperekonda\n"
+
+#: ../ifconfig.c:955
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr "Ei oska seada aadresse aadressiperekonna %d jaoks\n"
+
+#: ../netstat.c:429
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+"(\"-p\" jaoks ei saanud infot lugeda: geteuid()=%d, aga vaja oleks root'u)\n"
+
+#: ../netstat.c:433
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+"(Mõnesid protsesse ei saanud identifitseerida, teiste kasutajate\n"
+"info lugemiseks peab olema root)\n"
+
+#: ../netstat.c:440 ../netstat.c:1171 ../netstat.c:1248
+msgid "LISTENING"
+msgstr "LISTENING"
+
+#: ../netstat.c:441
+msgid "CONN SENT"
+msgstr "CONN SENT"
+
+#: ../netstat.c:442 ../netstat.c:1250
+msgid "DISC SENT"
+msgstr "DISC SENT"
+
+#: ../netstat.c:443 ../netstat.c:510 ../netstat.c:889 ../netstat.c:1251
+msgid "ESTABLISHED"
+msgstr "ESTABLISHED"
+
+#: ../netstat.c:465
+msgid "Active NET/ROM sockets\n"
+msgstr "Aktiivsed NET/ROM soklid\n"
+
+#: ../netstat.c:466
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"Kasutaja   Sihtpunkt  Lähtepunkt Liides  Olek         Vr/Vs    SaatJrk "
+"VvJrk\n"
+
+#: ../netstat.c:476 ../netstat.c:1290
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr "Probleem andmete lugemisel failist %s\n"
+
+#: ../netstat.c:511
+msgid "SYN_SENT"
+msgstr "SYN_SENT"
+
+#: ../netstat.c:512
+msgid "SYN_RECV"
+msgstr "SYN_RECV"
+
+#: ../netstat.c:513
+msgid "FIN_WAIT1"
+msgstr "FIN_WAIT1"
+
+#: ../netstat.c:514
+msgid "FIN_WAIT2"
+msgstr "FIN_WAIT2"
+
+#: ../netstat.c:515
+msgid "TIME_WAIT"
+msgstr "TIME_WAIT"
+
+#: ../netstat.c:516
+msgid "CLOSE"
+msgstr "CLOSE"
+
+#: ../netstat.c:517
+msgid "CLOSE_WAIT"
+msgstr "CLOSE_WAIT"
+
+#: ../netstat.c:518
+msgid "LAST_ACK"
+msgstr "LAST_ACK"
+
+#: ../netstat.c:519
+msgid "LISTEN"
+msgstr "LISTEN"
+
+#: ../netstat.c:520
+msgid "CLOSING"
+msgstr "CLOSING"
+
+#: ../netstat.c:587
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr "Hoiatus - sain imeliku igmp6 rea (nr. %d)\n"
+
+#: ../netstat.c:592 ../netstat.c:630 ../netstat.c:751 ../netstat.c:883
+#: ../netstat.c:1014 ../netstat.c:1019
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr "netstat: aadressiperekonda %d ei toetata\n"
+
+#: ../netstat.c:605 ../netstat.c:610 ../netstat.c:618 ../netstat.c:625
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr "Hoiatus - sain imeliku igmp rea (nr. %d)\n"
+
+#: ../netstat.c:668
+msgid "Active X.25 sockets\n"
+msgstr "Aktiivsed X.25 soklid\n"
+
+#. IMHO, Vr/Vs is not very usefull --SF
+#: ../netstat.c:670
+msgid ""
+"Dest         Source          Device  LCI  State        Vr/Vs  Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"Sihtpunkt    Lähtepunkt      Liides  LCI  Olek         Vr/Vs  SaatJrk VvJrk\n"
+
+#: ../netstat.c:747
+msgid "warning, got bogus tcp line.\n"
+msgstr "Hoiatus - sain imeliku tcp rea\n"
+
+#: ../netstat.c:788 ../netstat.c:938 ../netstat.c:1057
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr "eikäi ((0.00/%ld/%d)"
+
+#: ../netstat.c:792
+#, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr "käib (%2.2f/%ld/%d)"
+
+#: ../netstat.c:797
+#, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr "keepalive (%2.2f/%ld/%d)"
+
+#: ../netstat.c:802
+#, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr "timewait (%2.2f/%ld/%d)"
+
+#: ../netstat.c:807 ../netstat.c:947 ../netstat.c:1067
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr "eitea-%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:879
+msgid "warning, got bogus udp line.\n"
+msgstr "Hoiatus - sain imeliku udp rea\n"
+
+#: ../netstat.c:897 ../netstat.c:1157 ../netstat.c:1190
+msgid "UNKNOWN"
+msgstr "TUNDMATU"
+
+#: ../netstat.c:943 ../netstat.c:1062
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr "käib-%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:1028
+msgid "warning, got bogus raw line.\n"
+msgstr "Hoiatus - sain imeliku raw rea\n"
+
+#: ../netstat.c:1110
+msgid "warning, got bogus unix line.\n"
+msgstr "Hoiatus - sain imeliku unix rea\n"
+
+#: ../netstat.c:1137
+msgid "STREAM"
+msgstr "STREAM"
+
+#: ../netstat.c:1141
+msgid "DGRAM"
+msgstr "DGRAM"
+
+#: ../netstat.c:1145
+msgid "RAW"
+msgstr "RAW"
+
+#: ../netstat.c:1149
+msgid "RDM"
+msgstr "RDM"
+
+#: ../netstat.c:1153
+msgid "SEQPACKET"
+msgstr "SEQPACKET"
+
+#: ../netstat.c:1162
+msgid "FREE"
+msgstr "VABA"
+
+#: ../netstat.c:1178
+msgid "CONNECTING"
+msgstr "ÜHENDUMAS"
+
+#: ../netstat.c:1182
+msgid "CONNECTED"
+msgstr "ÜHENDATUD"
+
+#: ../netstat.c:1186
+msgid "DISCONNECTING"
+msgstr "LAHTIÜHENDUMAS"
+
+#: ../netstat.c:1217
+msgid "Active UNIX domain sockets "
+msgstr "Aktiivsed UNIX domeeni soklid "
+
+#: ../netstat.c:1219 ../netstat.c:1729
+msgid "(servers and established)"
+msgstr "(serverid ja ühendatud)"
+
+#: ../netstat.c:1222 ../netstat.c:1732
+msgid "(only servers)"
+msgstr "(ainult serverid)"
+
+#: ../netstat.c:1224 ../netstat.c:1734
+msgid "(w/o servers)"
+msgstr "(ilma serveriteta)"
+
+#: ../netstat.c:1227
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+"\n"
+"Proto Mitu   Lipud       Tüüp       Olek         I-kirje "
+
+#: ../netstat.c:1229
+msgid " Path\n"
+msgstr "Tee\n"
+
+#: ../netstat.c:1249
+msgid "SABM SENT"
+msgstr "SABM SENT"
+
+#: ../netstat.c:1252
+msgid "RECOVERY"
+msgstr "RECOVERY"
+
+#: ../netstat.c:1266
+msgid "Active AX.25 sockets\n"
+msgstr "Aktiivsed AX.25 soklid\n"
+
+#: ../netstat.c:1267
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr "Sihtpunkt  Lähtepunkt Liides  Olek         Vr/Vs    SaatJrk VvJrk\n"
+
+#: ../netstat.c:1310
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr "Probleem andmete lugemisel failist %s\n"
+
+#: ../netstat.c:1361
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+"Aktiivsed IPX soklid\n"
+"Proto VvJrk  SaatJrk Kohalik aadress           Väline aadress             "
+"Olek "
+
+#: ../netstat.c:1363
+msgid " User"
+msgstr " Kasutaja"
+
+#: ../netstat.c:1397
+msgid "ESTAB"
+msgstr "ESTAB"
+
+#: ../netstat.c:1405
+msgid "UNK."
+msgstr "UNK."
+
+#: ../netstat.c:1443
+msgid "Kernel Interface table\n"
+msgstr "Tuuma liideste tabel\n"
+
+#: ../netstat.c:1447
+msgid ""
+"Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"Liides  MTU Meetr RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR "
+"Lip\n"
+
+#: ../netstat.c:1451
+msgid "missing interface information"
+msgstr "Puudulik informatsioon liideste kohta"
+
+#: ../netstat.c:1474
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+"Kasutamine: netstat [-veenNcCF] [<Af>] -r\n"
+"            netstat {-V|--version|-h|--help}\n"
+
+#: ../netstat.c:1475
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr "            netstat [-vnNcaeol] [<Sokkel> ...]\n"
+
+#: ../netstat.c:1476
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr ""
+"            netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+
+#: ../netstat.c:1478
+msgid "        -r, --route              display routing table\n"
+msgstr "        -r, --route              ruutingutabeli näitamine\n"
+
+#: ../netstat.c:1479
+msgid "        -i, --interfaces         display interface table\n"
+msgstr "        -i, --interfaces         liideste tabeli näitamine\n"
+
+#: ../netstat.c:1480
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr "        -g, --groups             multiedastuse gruppide näitamine\n"
+
+#: ../netstat.c:1481
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr ""
+"        -s, --statistics         võrgu statistika näitamine (SNMP stiilis)\n"
+
+#: ../netstat.c:1483
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+"        -M, --masquerade         maskeeritavate ühenduste näitamine\n"
+"\n"
+
+#: ../netstat.c:1486 ../route.c:86
+msgid "        -n, --numeric            dont resolve names\n"
+msgstr "        -n, --numeric            mitte lahendada numbreid nimedeks\n"
+
+#: ../netstat.c:1487
+msgid "        --numeric-hosts          dont resolve host names\n"
+msgstr "        --numeric-hosts          mitte lahendada hostinimesid\n"
+
+#: ../netstat.c:1488
+msgid "        --numeric-ports          dont resolve port names\n"
+msgstr "        --numeric-ports          mitte lahendada pordinimesid\n"
+
+#: ../netstat.c:1489
+msgid "        --numeric-users          dont resolve user names\n"
+msgstr "        --numeric-users          mitte lahendada kasutajanimesid\n"
+
+#: ../netstat.c:1490
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr "        -N, --symbolic           lahendada riistvara aadressid\n"
+
+#: ../netstat.c:1491 ../route.c:87
+msgid "        -e, --extend             display other/more information\n"
+msgstr "        -e, --extend             muu info/lisainfo näitamine\n"
+
+#: ../netstat.c:1492
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr ""
+"        -p, --programs           soklite kohta PID/protsessi nime näitamine\n"
+
+#: ../netstat.c:1493
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+"        -c, --continuous         pidevalt uuenev nimekiri\n"
+"\n"
+
+#: ../netstat.c:1494
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr "        -l, --listening          kuulavate serversoklite näitamine\n"
+
+#: ../netstat.c:1495
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr ""
+"        -a, --all, --listening   kõigi soklite näitamine (vaikimisi "
+"ühendatud)\n"
+
+#: ../netstat.c:1496
+msgid "        -o, --timers             display timers\n"
+msgstr "        -o, --timers             taimerite näitamine\n"
+
+#: ../netstat.c:1497 ../route.c:88
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+"        -F, --fib                üldiste ruutingutabelite näitamine "
+"(vaikimisi)\n"
+
+#: ../netstat.c:1498 ../route.c:89
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr ""
+"        -C, --cache              üldise tabeli asemel puhvertabeli "
+"näitamine\n"
+"\n"
+
+#: ../netstat.c:1500
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+"  <Sokkel>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+
+#: ../netstat.c:1501 ../route.c:91
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>' Default: %s\n"
+msgstr "  <AF>=kasutage '-A <af>' või '--<af>' vaikimisi: %s\n"
+
+#: ../netstat.c:1502 ../route.c:92
+msgid "  List of possible address families (which support routing):\n"
+msgstr "  Võimalike ruutingu toetavate aadressiperekondade nimekiri:\n"
+
+#: ../netstat.c:1726
+msgid "Active Internet connections "
+msgstr "Aktiivsed internetiühendused "
+
+#: ../netstat.c:1736
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+"\n"
+"Proto  VvJrk SaatJrk Kohalik aadress        Väline aadress          Olek     "
+"  "
+
+#: ../netstat.c:1738
+msgid " User       Inode     "
+msgstr " Kasutaja   I-kirje   "
+
+#: ../netstat.c:1741
+msgid " Timer"
+msgstr " Taimer"
+
+#: ../netstat.c:1771
+msgid "IPv4 Group Memberships\n"
+msgstr "IPv4 grupikuuluvused\n"
+
+#: ../netstat.c:1772
+msgid "Interface       RefCnt Group\n"
+msgstr "Liides          Mitu   Grupp\n"
+
+#: ../rarp.c:43
+msgid "This kernel does not support RARP.\n"
+msgstr "rarp: tuum ei toeta RARP'i\n"
+
+#: ../rarp.c:82
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr "rarp: %s jaoks pole RARP kirjet\n"
+
+#: ../rarp.c:95
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr "rarp: vigane riistvaraline aadress %s\n"
+
+#: ../rarp.c:127
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr "rarp: ei saa avada faili %s:%s\n"
+
+#: ../rarp.c:139
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr "rarp: vorminguviga failis %s real %u\n"
+
+#: ../rarp.c:143 ../rarp.c:287
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr "rarp: tundmatu host %s\n"
+
+#: ../rarp.c:146
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr "rarp: ei saa kehtestada kirjet failist %s realt %u\n"
+
+#: ../rarp.c:175
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr ""
+"Kasutamine:\n"
+"  rarp -a                              puhvris olevate kirjete vaatamine\n"
+
+#: ../rarp.c:176
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr "  rarp -d <hosti nimi>                 kirje kustutamine puhvrist\n"
+
+#: ../rarp.c:177
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr "  rarp [<HW>] -s <hosti nimi> <hwaddr> kirje lisamine puhvrisse\n"
+
+#: ../rarp.c:178
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+"  rarp -f                              kirjete lisamine failist /etc/ethers\n"
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+"  rarp -V                              programmi versiooni näitamine\n"
+"\n"
+
+#: ../rarp.c:236
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr "%s: lubamatu võtmete kombinatsioon\n"
+
+#: ../rarp.c:267
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr "rarp: tundmatu riistvara tüüp %s\n"
+
+#: ../route.c:79
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+"Kasutamine:\n"
+"    route [-nNvee] [-FC] [<AF>]           Tuuma ruutingutabeli näitamine\n"
+
+#: ../route.c:80
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+"    route [-v] [-FC] {add|del|flush} ...  Tuuma ruutingutabeli muutmine\n"
+"\n"
+
+#: ../route.c:82
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+"    route {-h|--help} [<AF>]              Detailne süntaks perekonna AF "
+"jaoks\n"
+
+#: ../route.c:83
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+"    route {-V|--version}                  Versiooni ja oskuste näitamine\n"
+"\n"
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr "Kasutamine:  plipconfig [-a] [-i] [-v] liides\n"
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr "                        [nibble NN] [trigger NN]\n"
+
+#: ../plipconfig.c:68
+msgid "       plipconfig -V | --version\n"
+msgstr "             plipconfig -V | --version\n"
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr "%s\tnibble %lu  trigger %lu\n"
+
+#: ../iptunnel.c:84
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr "Kasutamine: iptunnel { add | change | del | show } [ NIMI ]\n"
+
+#: ../iptunnel.c:85
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr ""
+"             [ mode { ipip | gre | sit } ] [ remote AADR ] [ local AADR ]\n"
+
+#: ../iptunnel.c:86
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr "             [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+
+#: ../iptunnel.c:87
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr "             [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev LIIDES ]\n"
+
+#: ../iptunnel.c:88
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+"             iptunnel -V | --version\n"
+"\n"
+
+#: ../iptunnel.c:89
+msgid "Where: NAME := STRING\n"
+msgstr "Kus:   NIMI := STRING\n"
+
+#: ../iptunnel.c:90
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr "       AADR := { IP_AADRESS | any }\n"
+
+#: ../iptunnel.c:91
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr "       TOS  := { ARV | inherit }\n"
+
+#: ../iptunnel.c:92
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr "       TTL  := { 1..255 | inherit }\n"
+
+#: ../iptunnel.c:93
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr ""
+"       KEY  := { PUNKTIDEGA_ARVUNELIK | ARV }\n"
+"       LIIDES := FÜÜSILISE_LIIDESE_NIMI\n"
+
+#: ../iptunnel.c:331
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr "ipip ja sit juures ei ole võtmed lubatud\n"
+
+#: ../iptunnel.c:351
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr "Leviedastusega tunnel vajab lähteaadressi\n"
+
+#: ../iptunnel.c:366
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr "ttl != 0 ning noptmudisc ei sobi kokku\n"
+
+#: ../iptunnel.c:378
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr "Ei suuda määrata tunneli moodi (ipip, gre või sit)\n"
+
+#: ../iptunnel.c:416
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr "%s: %s/ip teises otsas %s  siin %s "
+
+#: ../iptunnel.c:420
+msgid "unknown"
+msgstr "tundmatu"
+
+#: ../iptunnel.c:452
+msgid "  Drop packets out of sequence.\n"
+msgstr "  Järjekorravälised paketid visatakse minema\n"
+
+#: ../iptunnel.c:454
+msgid "  Checksum in received packet is required.\n"
+msgstr "  Vastuvõetavates pakettides on kontrollsumma kohustuslik\n"
+
+#: ../iptunnel.c:456
+msgid "  Sequence packets on output.\n"
+msgstr "  Väljuvad paketid varustatakse järjekorranumbritega\n"
+
+#: ../iptunnel.c:458
+msgid "  Checksum output packets.\n"
+msgstr "  Väljuvad paketid varustatakse kontrollsummaga\n"
+
+#: ../iptunnel.c:486
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr "/proc/net/dev on vales formaadis. Vale tuuma versioon?\n"
+
+#: ../iptunnel.c:499
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr "Ei suutnud kindlaks teha liidese %s tüüpi\n"
+
+#: ../iptunnel.c:515
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr "RX: Pakette    Baite        Vigu   KSumVigu JrkVigu  Levipakette\n"
+
+#: ../iptunnel.c:518
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr "TX: Pakette    Baite        Vigu   DeadLoop EiRuudi  MäluOtsas\n"
+
+#: ../statistics.c:47
+msgid "ICMP input histogram:"
+msgstr "Siseneva ICMP jaotus:"
+
+#: ../statistics.c:48
+msgid "ICMP output histogram:"
+msgstr "Väljuva ICMP jaotus:"
+
+#: ../statistics.c:65
+#, c-format
+msgid "Forwarding is %s"
+msgstr "Pakettide edastamine on %s"
+
+#: ../statistics.c:66
+#, c-format
+msgid "Default TTL is %u"
+msgstr "TTL on vaikimisi %u"
+
+#: ../statistics.c:67
+#, c-format
+msgid "%u total packets received"
+msgstr "kokku võeti vastu %u paketti"
+
+#: ../statistics.c:68
+#, c-format
+msgid "%u with invalid headers"
+msgstr "%u vigaste päistega"
+
+#: ../statistics.c:69
+#, c-format
+msgid "%u with invalid addresses"
+msgstr "%u vigaste aadressidega"
+
+#: ../statistics.c:70
+#, c-format
+msgid "%u forwarded"
+msgstr "%u edastati"
+
+#: ../statistics.c:71
+#, c-format
+msgid "%u with unknown protocol"
+msgstr "%u tundmatu protokolliga"
+
+#: ../statistics.c:72
+#, c-format
+msgid "%u incoming packets discarded"
+msgstr "%u saabuvat paketti visati minema"
+
+#: ../statistics.c:73
+#, c-format
+msgid "%u incoming packets delivered"
+msgstr "%u saabuvat paketti lasti läbi"
+
+#: ../statistics.c:74
+#, c-format
+msgid "%u requests sent out"
+msgstr "%u päringut saadeti"
+
+#. ?
+#: ../statistics.c:75
+#, c-format
+msgid "%u outgoing packets dropped"
+msgstr "%u väljuvat paketti visati minema"
+
+#: ../statistics.c:76
+#, c-format
+msgid "%u dropped because of missing route"
+msgstr "%u visati minema ruutingu puudumise tõttu"
+
+#: ../statistics.c:77
+#, c-format
+msgid "%u fragments dropped after timeout"
+msgstr "%u fragmenti visati minema aegumise tõttu"
+
+#: ../statistics.c:78
+#, c-format
+msgid "%u reassemblies required"
+msgstr "%u fragmentide kokkupanekut toimus"
+
+#. ?
+#: ../statistics.c:79
+#, c-format
+msgid "%u packets reassembled ok"
+msgstr "%u paketti pandi edukalt kokku"
+
+#: ../statistics.c:80
+#, c-format
+msgid "%u packet reassembles failed"
+msgstr "%u pakettide kokkupanekut ebaõnnestus"
+
+#: ../statistics.c:81
+#, c-format
+msgid "%u fragments received ok"
+msgstr "%u fragmenti võeti edukalt vastu"
+
+#: ../statistics.c:82
+#, c-format
+msgid "%u fragments failed"
+msgstr "%u fragmendi vastuvõtt ebaõnnestus"
+
+#: ../statistics.c:83
+#, c-format
+msgid "%u fragments created"
+msgstr "%u fragmenti tekitati"
+
+#: ../statistics.c:88
+#, c-format
+msgid "%u ICMP messages received"
+msgstr "%u ICMP teadet võeti vastu"
+
+#: ../statistics.c:89
+#, c-format
+msgid "%u input ICMP message failed."
+msgstr "%u sisenevat ICMP teadet olid vigased"
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "destination unreachable: %u"
+msgstr "sihtpunkt kättesaamatu: %u"
+
+#: ../statistics.c:91
+#, c-format
+msgid "timeout in transit: %u"
+msgstr "aeg sai tee peal otsa: %u"
+
+#: ../statistics.c:92 ../statistics.c:105
+#, c-format
+msgid "wrong parameters: %u"
+msgstr "valed parameetrid: %u"
+
+#. ?
+#: ../statistics.c:93
+#, c-format
+msgid "source quenches: %u"
+msgstr "pidurduspakette (source quench): %u"
+
+#: ../statistics.c:94
+#, c-format
+msgid "redirects: %u"
+msgstr "ümbersuunamisi: %u"
+
+#: ../statistics.c:95
+#, c-format
+msgid "echo requests: %u"
+msgstr "echo päringuid: %u"
+
+#: ../statistics.c:96 ../statistics.c:109
+#, c-format
+msgid "echo replies: %u"
+msgstr "echo vastuseid: %u"
+
+#: ../statistics.c:97
+#, c-format
+msgid "timestamp request: %u"
+msgstr "ajatempli palveid: %u"
+
+#: ../statistics.c:98
+#, c-format
+msgid "timestamp reply: %u"
+msgstr "ajatempli vastuseid: %u"
+
+#: ../statistics.c:99
+#, c-format
+msgid "address mask request: %u"
+msgstr "aadressi maski palveid: %u"
+
+#. ?
+#: ../statistics.c:100 ../statistics.c:113
+#, c-format
+msgid "address mask replies: %u"
+msgstr "aadressi maski vastuseid: %u"
+
+#. ?
+#: ../statistics.c:101
+#, c-format
+msgid "%u ICMP messages sent"
+msgstr "%u ICMP teadet saadeti"
+
+#: ../statistics.c:102
+#, c-format
+msgid "%u ICMP messages failed"
+msgstr "%u ICMP teate saatmine ebaõnnestus"
+
+#: ../statistics.c:104
+#, c-format
+msgid "time exceeded: %u"
+msgstr "aeg otsas: %u"
+
+#. ?
+#: ../statistics.c:106
+#, c-format
+msgid "source quench: %u"
+msgstr "pidurduspakette (source quench): %u"
+
+#: ../statistics.c:107
+#, c-format
+msgid "redirect: %u"
+msgstr "ümbersuunamisi: %u"
+
+#: ../statistics.c:108
+#, c-format
+msgid "echo request: %u"
+msgstr " echo päringuid: %u"
+
+#: ../statistics.c:110
+#, c-format
+msgid "timestamp requests: %u"
+msgstr "ajatempli palveid: %u"
+
+#: ../statistics.c:111
+#, c-format
+msgid "timestamp replies: %u"
+msgstr "ajatempli vastuseid: %u"
+
+#: ../statistics.c:112
+#, c-format
+msgid "address mask requests: %u"
+msgstr "aadressi maski palveid: %u"
+
+#: ../statistics.c:118
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr "RTO algoritm on %s"
+
+#: ../statistics.c:122
+#, c-format
+msgid "%u active connections openings"
+msgstr "%u aktiivset ühenduse avamist"
+
+#: ../statistics.c:123
+#, c-format
+msgid "%u passive connection openings"
+msgstr "%u passiivset ühenduse avamist"
+
+#: ../statistics.c:124
+#, c-format
+msgid "%u failed connection attempts"
+msgstr "%u ebaõnnestunud ühenduse loomise katset"
+
+#: ../statistics.c:125
+#, c-format
+msgid "%u connection resets received"
+msgstr "%u ühenduse katkestust saabus"
+
+#: ../statistics.c:126
+#, c-format
+msgid "%u connections established"
+msgstr "%u ühendust loodi"
+
+#: ../statistics.c:127
+#, c-format
+msgid "%u segments received"
+msgstr "%u segmenti võeti vastu"
+
+#: ../statistics.c:128
+#, c-format
+msgid "%u segments send out"
+msgstr "%u segmenti saadeti"
+
+#: ../statistics.c:129
+#, c-format
+msgid "%u segments retransmited"
+msgstr "%u segmenti saadeti uuesti"
+
+#: ../statistics.c:130
+#, c-format
+msgid "%u bad segments received."
+msgstr "%u vigast segmenti võeti vastu"
+
+#: ../statistics.c:131
+#, c-format
+msgid "%u resets sent"
+msgstr "%u katkestust saadeti"
+
+#: ../statistics.c:136
+#, c-format
+msgid "%u packets received"
+msgstr "%u paketti võeti vastu"
+
+#: ../statistics.c:137
+#, c-format
+msgid "%u packets to unknown port received."
+msgstr "%u sisenevat paketti tundmatule pordile"
+
+#: ../statistics.c:138
+#, c-format
+msgid "%u packet receive errors"
+msgstr "%u paketi vastuvõtu viga"
+
+#: ../statistics.c:139
+#, c-format
+msgid "%u packets sent"
+msgstr "%u paketti saadeti"
+
+#: ../statistics.c:144
+#, c-format
+msgid "%u SYN cookies sent"
+msgstr "%u SYN küpsist saadeti"
+
+#: ../statistics.c:145
+#, c-format
+msgid "%u SYN cookies received"
+msgstr "%u SYN küpsist võeti vastu"
+
+#: ../statistics.c:146
+#, c-format
+msgid "%u invalid SYN cookies received"
+msgstr "%u vigast SYN küpsist võeti vastu"
+
+#: ../statistics.c:148
+#, c-format
+msgid "%u resets received for embryonic SYN_RECV sockets"
+msgstr "%u RST paketti SYN_RECV olekus soklitele"
+
+#: ../statistics.c:150
+#, c-format
+msgid "%u packets pruned from receive queue because of socket buffer overrun"
+msgstr ""
+"%u paketti kustutati vastuvõtu järjekorrast sokli puhvri ületäitumise tõttu"
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:153
+#, c-format
+msgid "%u packets pruned from receive queue"
+msgstr "%u paketti kustutati eelisjärjekorrast"
+
+#: ../statistics.c:154
+#, c-format
+msgid ""
+"%u packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr "%u paketti kustutati eelisjärjekorrast sokli puhvri ületäitumise tõttu"
+
+#: ../statistics.c:156
+#, c-format
+msgid "%u ICMP packets dropped because they were out-of-window"
+msgstr "%u ICMP paketti visati minema, kuna nad olid \"aknast väljas\""
+
+#: ../statistics.c:158
+#, c-format
+msgid "%u ICMP packets dropped because socket was locked"
+msgstr "%u ICMP paketti visati minema, kuna sokkel oli lukus"
+
+#: ../statistics.c:160
+#, c-format
+msgid "%u TCP sockets finished time wait in fast timer"
+msgstr "%u TCP soklit lõpetasid TIME_WAIT oleku kiires taimeris"
+
+#: ../statistics.c:161
+#, c-format
+msgid "%u time wait sockets recycled by time stamp"
+msgstr "%u TIME_WAIT soklit läksid uuesti käiku ajatempli järgi"
+
+#: ../statistics.c:162
+#, c-format
+msgid "%u TCP sockets finished time wait in slow timer"
+msgstr "%u TCP soklit lõpetasid TIME_WAIT oleku aeglases taimeris"
+
+#: ../statistics.c:163
+#, c-format
+msgid "%u passive connections rejected because of time stamp"
+msgstr "%u passiivsest ühendusest keelduti ajatempli tõttu"
+
+#: ../statistics.c:165
+#, c-format
+msgid "%u active connections rejected because of time stamp"
+msgstr "%u aktiivsest ühendusest keelduti ajatempli tõttu"
+
+#: ../statistics.c:167
+#, c-format
+msgid "%u packets rejects in established connections because of timestamp"
+msgstr "%u paketist keelduti loodud ühendustes ajatempli tõttu"
+
+#: ../statistics.c:169
+#, c-format
+msgid "%u delayed acks sent"
+msgstr "%u viivisega ACK-d saadeti"
+
+#: ../statistics.c:170
+#, c-format
+msgid "%u delayed acks further delayed because of locked socket"
+msgstr "%u viivisega ACK-d viibisid edasi lukus sokli tõttu"
+
+#: ../statistics.c:172
+#, c-format
+msgid "Quick ack mode was activated %u times"
+msgstr "Kiire ACK mood aktiveeriti %u korral"
+
+#: ../statistics.c:173
+#, c-format
+msgid "%u times the listen queue of a socket overflowed"
+msgstr "%u korral ületäitus sokli kuulamise järjekord"
+
+#: ../statistics.c:175
+#, c-format
+msgid "%u SYNs to LISTEN sockets ignored"
+msgstr "%u SYN'i kuulavatele soklitele ignoreeriti"
+
+#: ../statistics.c:176
+#, c-format
+msgid "%u packets directly queued to recvmsg prequeue."
+msgstr "%u paketti pandi otse recvmsg eeljärjekorda"
+
+#: ../statistics.c:178
+#, c-format
+msgid "%u packets directly received from backlog"
+msgstr "%u paketti võeti vastu otse backlog-ist"
+
+#: ../statistics.c:180
+#, c-format
+msgid "%u packets directly received from prequeue"
+msgstr "%u paketti võeti vastu otse eeljärjekorrast"
+
+#: ../statistics.c:182
+#, c-format
+msgid "%u packets dropped from prequeue"
+msgstr "%u paketti kustutati eeljärjekorrast"
+
+#: ../statistics.c:183
+#, c-format
+msgid "%u packets header predicted"
+msgstr "%u paketti päise õige ennustusega"
+
+#: ../statistics.c:184
+#, c-format
+msgid "%u packets header predicted and directly queued to user"
+msgstr "%u paketti päise õige ennustusega pandi otse kasutaja järjekorda"
+
+#: ../statistics.c:186
+#, c-format
+msgid "Ran %u times out of system memory during packet sending"
+msgstr "Pakettide saatmisel sai %u korda süsteemne mälu otsa"
+
+#: ../statistics.c:253
+msgid "enabled"
+msgstr "lubatud"
+
+#: ../statistics.c:253
+msgid "disabled"
+msgstr "keelatud"
+
+#: ../statistics.c:336
+msgid "error parsing /proc/net/snmp"
+msgstr "Viga /proc/net/snmp analüüsimisel"
+
+#: ../statistics.c:349
+msgid "cannot open /proc/net/snmp"
+msgstr "Ei saa avada faili /proc/net/snmp"
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr "Riistvara tüüpi `%s' ei toetata\n"
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr "Ei suuda seada `%s' liiniprotokolliks\n"
+
+#: ../lib/af.c:153 ../lib/hw.c:156
+msgid "UNSPEC"
+msgstr "UNSPEC"
+
+#: ../lib/af.c:155
+msgid "UNIX Domain"
+msgstr "UNIX domeen"
+
+#: ../lib/af.c:158
+msgid "DARPA Internet"
+msgstr "DARPA Internet"
+
+#: ../lib/af.c:161
+msgid "IPv6"
+msgstr "IPv6"
+
+#: ../lib/af.c:164 ../lib/hw.c:177
+msgid "AMPR AX.25"
+msgstr "AMPR AX.25"
+
+#: ../lib/af.c:167 ../lib/hw.c:183
+msgid "AMPR NET/ROM"
+msgstr "AMPR NET/ROM"
+
+#: ../lib/af.c:170
+msgid "Novell IPX"
+msgstr "Novell IPX"
+
+#: ../lib/af.c:173
+msgid "Appletalk DDP"
+msgstr "Appletalk DDP"
+
+#: ../lib/af.c:176 ../lib/hw.c:218
+msgid "Econet"
+msgstr "Econet"
+
+#: ../lib/af.c:179
+msgid "CCITT X.25"
+msgstr "CCITT X.25"
+
+#: ../lib/af.c:182 ../lib/hw.c:180
+msgid "AMPR ROSE"
+msgstr "AMPR ROSE"
+
+#: ../lib/af.c:185 ../lib/hw.c:168
+msgid "Ash"
+msgstr "Ash"
+
+#: ../lib/af.c:243
+msgid "Please don't supply more than one address family.\n"
+msgstr "Meil on kombeks üks aadressiperekond korraga\n"
+
+#: ../lib/af.c:304
+msgid "Too much address family arguments.\n"
+msgstr "Liiga palju aadressiperekonna argumente\n"
+
+#: ../lib/af.c:315
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr "Tundmatu aadressiperekond `%s'\n"
+
+#: ../lib/arcnet.c:70 ../lib/arcnet.c:85
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr "in_arcnet(%s): vigane Arcneti aadress\n"
+
+#: ../lib/arcnet.c:97
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr "in_arcnet(%s): ignoreerin lõpetavat koolonit\n"
+
+#: ../lib/arcnet.c:109
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr "in_arcnet(%s): sodi lõpus\n"
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr "Vigane Ash aadress"
+
+#: ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52 ../lib/inet.c:244
+#: ../lib/inet.c:259 ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78
+#: ../lib/rose.c:71 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr "[POLE SEATUD]"
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr "Vigane kutsung"
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr "Liiga pikk kutsung"
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr "AX.25 pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr "Tuuma AX.25 ruutingutabel\n"
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr "Sihtpunkt    Liides   Kasutus\n"
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr "`ddp' jaoks ruutingutabelit veel ei oska\n"
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr "in_ether(%s): vigane Etherneti aadress\n"
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr "in_ether(%s): ignoreerin lõpetavat koolonit\n"
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr "in_ether(%s): sodi lõpus\n"
+
+#: ../lib/fddi.c:84 ../lib/fddi.c:99
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr "in_fddi(%s): vigane fddi aadress\n"
+
+#: ../lib/fddi.c:111
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): ignoreerin lõpetavat koolonit\n"
+
+#: ../lib/fddi.c:123
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): sodi lõpus\n"
+
+#: ../lib/getroute.c:101 ../lib/setroute.c:80
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr "Aadressiperekonda `%s' ei toetata\n"
+
+#: ../lib/getroute.c:107 ../lib/setroute.c:84
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr "Aadressiperekonnal `%s' ei ole ruutingut\n"
+
+#: ../lib/hippi.c:84 ../lib/hippi.c:99
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr "in_hippi(%s): vigane hippi aadress\n"
+
+#: ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr "in_hippi(%s): ignoreerin lõpetavat koolonit\n"
+
+#: ../lib/hippi.c:122
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr "in_hippi(%s): sodi lõpus\n"
+
+#: ../lib/hw.c:155
+msgid "Local Loopback"
+msgstr "Kohalik loopback"
+
+#: ../lib/hw.c:158
+msgid "Serial Line IP"
+msgstr "Serial Line IP"
+
+#: ../lib/hw.c:159
+msgid "VJ Serial Line IP"
+msgstr "VJ Serial Line IP"
+
+#: ../lib/hw.c:160
+msgid "6-bit Serial Line IP"
+msgstr "6-bitine Serial Line IP"
+
+#: ../lib/hw.c:161
+msgid "VJ 6-bit Serial Line IP"
+msgstr "VJ 6-bitine Serial Line IP"
+
+#: ../lib/hw.c:162
+msgid "Adaptive Serial Line IP"
+msgstr "Adaptiivne Serial Line IP"
+
+#: ../lib/hw.c:165
+msgid "Ethernet"
+msgstr "Ethernet"
+
+#: ../lib/hw.c:171
+msgid "Fiber Distributed Data Interface"
+msgstr "Fiber Distributed Data Interface"
+
+#: ../lib/hw.c:174
+msgid "HIPPI"
+msgstr "HIPPI"
+
+#: ../lib/hw.c:186
+msgid "generic X.25"
+msgstr "üldine X.25"
+
+#: ../lib/hw.c:189
+msgid "IPIP Tunnel"
+msgstr "IPIP tunnel"
+
+#: ../lib/hw.c:192
+msgid "Point-to-Point Protocol"
+msgstr "Kakspunktprotokoll"
+
+#: ../lib/hw.c:195
+msgid "(Cisco)-HDLC"
+msgstr "(Cisco-)HDLC"
+
+#: ../lib/hw.c:196
+msgid "LAPB"
+msgstr "LAPB"
+
+#: ../lib/hw.c:199
+msgid "ARCnet"
+msgstr "ARCnet"
+
+#: ../lib/hw.c:202
+msgid "Frame Relay DLCI"
+msgstr "Frame Relay DLCI"
+
+#: ../lib/hw.c:203
+msgid "Frame Relay Access Device"
+msgstr "Frame Relay Access Device"
+
+#: ../lib/hw.c:206
+msgid "IPv6-in-IPv4"
+msgstr "IPv6-in-IPv4"
+
+#: ../lib/hw.c:209
+msgid "IrLAP"
+msgstr "IrLAP"
+
+#: ../lib/hw.c:212
+msgid "16/4 Mbps Token Ring"
+msgstr "16/4 Mbps Token Ring"
+
+#: ../lib/hw.c:214
+msgid "16/4 Mbps Token Ring (New)"
+msgstr "16/4 Mbps Token Ring (New)"
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr "rresolve: toetuseta aadressiperekond %d\n"
+
+#: ../lib/inet6.c:131
+msgid "[UNKNOWN]"
+msgstr "[TUNDMATU]"
+
+#: ../lib/inet6_gr.c:79
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr "INET6 (IPv6) pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/inet6_gr.c:82
+msgid "Kernel IPv6 routing table\n"
+msgstr "Tuuma IPv6 ruutingutabel\n"
+
+#: ../lib/inet6_gr.c:84
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+"Sihtpunkt                                   Järgmine samm                    "
+"       Lipud Meetr  Mitu Kasut Liides\n"
+
+#: ../lib/inet6_gr.c:158
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr "Tuuma IPv6 naabrite puhver\n"
+
+#: ../lib/inet6_gr.c:161
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+"Naaber                                      HW Aadress        Liides   Lipud "
+"Mitu Olek\n"
+
+#: ../lib/inet6_gr.c:165
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+"Naaber                                      HW Aadress        Liides   Lipud "
+"Mitu Olek            Stale(sec) Delete(sec)\n"
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr "Kasutamine: route [-vF] del AADRESS\n"
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr ""
+"            route [-vF] add AADRESS [gw GW] [metric M] [[dev] LIIDES]\n"
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr "            route [-FC] flush      Seda EI toetata\n"
+
+#: ../lib/inet6_sr.c:188
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr "`inet6' ruutingutabeli tühjendamist ei toetata\n"
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr "INET (IPv4) pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr "Tuuma IP ruutingutabel\n"
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Sihtpunkt       Ruuter          Võrgumask       Lipud Meetr  Mitu Kasut "
+"Liides\n"
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Sihtpunkt       Ruuter          Võrgumask       Lipud   MSS Aken    irtt "
+"Liides\n"
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+"Sihtpunkt       Ruuter          Võrgumask       Lipud Meetr  Mitu Kasut "
+"Liides   MSS   Aken   irtt\n"
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr "Tuuma IP ruutingu puhver\n"
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Lähtepunkt      Sihtpunkt       Ruuter          Lipud Meetr  Mitu Kasut "
+"Liides\n"
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Lähtepunkt      Sihtpunkt       Ruuter          Lipud   MSS Aken    irtt "
+"Liides\n"
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+"Lähtepunkt      Sihtpunkt       Ruuter          Lipud Meetr  Mitu Kasut "
+"Liides   MSS    Aken  irtt  HH  Arp\n"
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+"Lähtepunkt      Sihtpunkt       Ruuter          Lipud Meetr  Mitu Kasut "
+"Liides   MSS   Aken   irtt  TOS HHRef HHUptod     SpecDst\n"
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+"Kasutamine: route [-vF] del {-host|-net} AADRESS[/PREFIKS] [gw GW] [metric "
+"M] [[dev] LIIDES]\n"
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+"            route [-vF] add {-host|-net} AADRESS[/PREFIKS] [gw GW] [metric "
+"M]\n"
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+"                              [netmask N] [mss MSS] [window W] [irtt I]\n"
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr "                              [mod] [dyn] [reinstate] [[dev] LIIDES]\n"
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+"            route [-vF] add {-host|-net} AADRESS[/PREFIKS] [metric M] "
+"reject\n"
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr "            route [-FC] flush      Seda EI toetata\n"
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr "route: %s: võrku ei saa kasutada ruuterina\n"
+
+#: ../lib/inet_sr.c:174
+msgid "route: Invalid MSS/MTU.\n"
+msgstr "route: vigane MSS/MTU\n"
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr "route: Vigane akna suurus\n"
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr "route: vigane algne rtt\n"
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr "route: võrgumask %.8x ei oma mõtet hosti ruutingus\n"
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr "route: vale võrgumask %s\n"
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr "route: võrgumask ei sobi ruutingu aadressiga\n"
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr "`inet' ruutingutabeli tühjendamist ei toetata\n"
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr "`inet' ruutingu puhvri muutmist ei toetata\n"
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr "IPX pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr "Tuuma IPX ruutingutabel\n"
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr "Sihtpunkt                 Ruuteri võrk              Ruuter ise\n"
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr "IPX osa vajab ümbertegemist\n"
+
+#: ../lib/masq_info.c:198
+msgid "IP masquerading entries\n"
+msgstr "IP maskeerimise kirjed\n"
+
+#: ../lib/masq_info.c:201
+msgid "prot   expire source               destination          ports\n"
+msgstr "Proto  Aegub  Lähtepunkt           Sihtpunkt            Pordid\n"
+
+#: ../lib/masq_info.c:204
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+"Proto  Aegub     Initseq Delta Prevd Lähtepunkt           Sihtpunkt          "
+"  Pordid\n"
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr "NET/ROM pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr "Tuuma NET/ROM ruutingutabel\n"
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr "Sihtpunkt   Mnemoonika Kvaliteet Naaber    Liides\n"
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr "netrom kasutus\n"
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr "NET/ROM osa vajab ümbertegemist\n"
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr "Sellest programmist ei saa PPP-d käivitada\n"
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr "Palun kasutage pppd'd\n"
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr "Sõlme aadress peab olema kümnekohaline"
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr "ROSE pole antud süsteemis konfigureeritud\n"
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr "Tuuma ROSE ruutingutabel\n"
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr "in_tr(%s): vigane token ring-aadress\n"
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr "in_tr(%s): ignoreerin lõpetavat koolonit\n"
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr "in_tr(%s): sodi lõpus\n"
+
+#: ../lib/interface.c:164
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr "Hoiatus: `inet' sokleid ei ole: %s\n"
+
+#: ../lib/interface.c:316
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr "Hoiatus: ei saa avada faili %s (%s). Väljund on piiratud.\n"
+
+#. Give better error message for this case.
+#: ../lib/interface.c:556
+msgid "Device not found"
+msgstr "Liidest ei leitud"
+
+#: ../lib/interface.c:560
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr "%s: viga liidese info küsimisel: %s\n"
+
+#: ../lib/interface.c:593
+msgid "     - no statistics available -"
+msgstr "     - statistikat ei ole      -"
+
+#: ../lib/interface.c:597
+msgid "[NO FLAGS]"
+msgstr "[LIPPE POLE]"
+
+#: ../lib/interface.c:673
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr "%-9.9s kapseldus:%s  "
+
+#: ../lib/interface.c:678
+#, c-format
+msgid "HWaddr %s  "
+msgstr "HWaddr %s  "
+
+#: ../lib/interface.c:681
+#, c-format
+msgid "Media:%s"
+msgstr "meedia:%s"
+
+#: ../lib/interface.c:683
+msgid "(auto)"
+msgstr "(auto)"
+
+#: ../lib/interface.c:690
+#, c-format
+msgid "          %s addr:%s "
+msgstr "          %s aadress:%s "
+
+#: ../lib/interface.c:693
+#, c-format
+msgid " P-t-P:%s "
+msgstr " P-t-P:%s "
+
+#: ../lib/interface.c:696
+#, c-format
+msgid " Bcast:%s "
+msgstr " bcast:%s "
+
+#: ../lib/interface.c:698
+#, c-format
+msgid " Mask:%s\n"
+msgstr " mask:%s\n"
+
+#: ../lib/interface.c:715
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr "          inet6 aadr: %s/%d"
+
+#: ../lib/interface.c:717
+msgid " Scope:"
+msgstr " skoop:"
+
+#: ../lib/interface.c:720
+msgid "Global"
+msgstr "globaalne"
+
+#: ../lib/interface.c:723
+msgid "Link"
+msgstr "ühendus"
+
+#: ../lib/interface.c:726
+msgid "Site"
+msgstr "site"
+
+#: ../lib/interface.c:729
+msgid "Compat"
+msgstr "ühilduvus"
+
+#: ../lib/interface.c:732
+msgid "Host"
+msgstr "host"
+
+#: ../lib/interface.c:735
+msgid "Unknown"
+msgstr "tundmatu"
+
+#: ../lib/interface.c:750
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr "          IPX/Ethernet II aadr:%s\n"
+
+#: ../lib/interface.c:753
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr "          IPX/Ethernet SNAP aadr:%s\n"
+
+#: ../lib/interface.c:756
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr "          IPX/Ethernet 802.2 aadr:%s\n"
+
+#: ../lib/interface.c:759
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr "          IPX/Ethernet 802.3 aadr:%s\n"
+
+#: ../lib/interface.c:769
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr "          EtherTalk Phase 2 aadr:%s\n"
+
+#: ../lib/interface.c:778
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr "          econeti aadr:%s\n"
+
+#: ../lib/interface.c:785
+msgid "[NO FLAGS] "
+msgstr "[LIPPE POLE]"
+
+#: ../lib/interface.c:787
+msgid "UP "
+msgstr "UP "
+
+#: ../lib/interface.c:789
+msgid "BROADCAST "
+msgstr "BROADCAST "
+
+#: ../lib/interface.c:791
+msgid "DEBUG "
+msgstr "DEBUG "
+
+#: ../lib/interface.c:793
+msgid "LOOPBACK "
+msgstr "LOOPBACK "
+
+#: ../lib/interface.c:795
+msgid "POINTOPOINT "
+msgstr "POINTOPOINT "
+
+#: ../lib/interface.c:797
+msgid "NOTRAILERS "
+msgstr "NOTRAILERS "
+
+#: ../lib/interface.c:799
+msgid "RUNNING "
+msgstr "RUNNING "
+
+#: ../lib/interface.c:801
+msgid "NOARP "
+msgstr "NOARP "
+
+#: ../lib/interface.c:803
+msgid "PROMISC "
+msgstr "PROMISC "
+
+#: ../lib/interface.c:805
+msgid "ALLMULTI "
+msgstr "ALLMULTI "
+
+#: ../lib/interface.c:807
+msgid "SLAVE "
+msgstr "SLAVE "
+
+#: ../lib/interface.c:809
+msgid "MASTER "
+msgstr "MASTER "
+
+#: ../lib/interface.c:811
+msgid "MULTICAST "
+msgstr "MULTICAST "
+
+#: ../lib/interface.c:814
+msgid "DYNAMIC "
+msgstr "DYNAMIC "
+
+#. DONT FORGET TO ADD THE FLAGS IN ife_print_short
+#: ../lib/interface.c:817
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr " MTU:%d meetrika:%d"
+
+#: ../lib/interface.c:821
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr "  ülalhoidepakettide intervall:%d  ülalhoidetaimaut:%d"
+
+#: ../lib/interface.c:835
+#, c-format
+msgid "RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr "RX pakette:%llu vigu:%lu ära visatud:%lu ületäit:%lu kaadri vigu:%lu\n"
+
+#: ../lib/interface.c:840
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr "             pakitud:%lu\n"
+
+#: ../lib/interface.c:852
+#, c-format
+msgid "TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr "TX pakette:%llu vigu:%lu ära visatud:%lu ületäit:%lu carrier:%lu\n"
+
+#: ../lib/interface.c:856
+#, c-format
+msgid "          collisions:%lu "
+msgstr "          kollisioone:%lu "
+
+#: ../lib/interface.c:858
+#, c-format
+msgid "compressed:%lu "
+msgstr "pakitud:%lu "
+
+#: ../lib/interface.c:860
+#, c-format
+msgid "txqueuelen:%d "
+msgstr "txqueuelen:%d "
+
+#: ../lib/interface.c:862
+#, c-format
+msgid "RX bytes:%llu (%lu.%lu %s)  TX bytes:%llu (%lu.%lu %s)\n"
+msgstr "RX baite:%llu (%lu.%lu %s)  TX baite:%llu (%lu.%lu %s)\n"
+
+#: ../lib/interface.c:873
+#, c-format
+msgid "Interrupt:%d "
+msgstr "katkestus:%d "
+
+#. Only print devices using it for
+#. I/O maps
+#: ../lib/interface.c:876
+#, c-format
+msgid "Base address:0x%x "
+msgstr "baasaadress:0x%x "
+
+#: ../lib/interface.c:878
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr "mälu:%lx-%lx "
+
+#: ../lib/interface.c:881
+#, c-format
+msgid "DMA chan:%x "
+msgstr "DMA kanal:%x "
+
+#: ../lib/sockets.c:63
+msgid "No usable address families found.\n"
+msgstr "Ei leidnud ühtegi kasutatavat aadressiperekonda\n"
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr "iptunnel: %s on vigane `inet' aadress\n"
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr "iptunnel: %s on vigane `inet' prefiks\n"
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr "iptunnel: %s on vigane IPv4 aadress\n"
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr "iptunnel: vale argument %s\n"
+
+#: ../ipmaddr.c:58
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr "Kasutamine: ipmaddr [ add | del ] MULTIAADR dev STRING\n"
+
+#: ../ipmaddr.c:59
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr "            ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+
+#: ../ipmaddr.c:60
+msgid "       ipmaddr -V | -version\n"
+msgstr "            ipmaddr -V | -version\n"
+
+#: ../ipmaddr.c:260
+#, c-format
+msgid "family %d "
+msgstr "perekond %d "
+
+#: ../ipmaddr.c:269
+#, c-format
+msgid " users %d"
+msgstr " kasutajaid %d"
+
+#: ../ipmaddr.c:355
+msgid "Cannot create socket"
+msgstr "Ei saa avada soklit"
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr "slattach: /dev/%s on juba lukus\n"
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr "slattach: tty_lock: (%s): %s\n"
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr "slattach: ei saa PID faili kirjutada\n"
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr "slattach: tty_lock: tundmatu UUCP kasutaja %s\n"
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr "slattach: tty_hangup(DROP): %s\n"
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr "slattach: tty_hangup(RAISE): %s\n"
+
+#: ../slattach.c:468
+msgid "slattach: tty name too long\n"
+msgstr "slattach: terminali nimi on liiga pikk\n"
+
+#: ../slattach.c:498
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr "slattach: tty_open: ei saa lugeda jooksvat olekut\n"
+
+#: ../slattach.c:505
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr "slattach: tty_open: liiniprotokolli küsimine ebaõnnestus\n"
+
+#: ../slattach.c:513
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr "slattach: tty_open: ei saa seada RAW moodi\n"
+
+#: ../slattach.c:520
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr "slattach: tty_open: ei saa seada kiiruseks %s bps\n"
+
+#: ../slattach.c:530
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr "slattach: tty_open: ei saa seada 8N1 moodi\n"
+
+#: ../slattach.c:672
+#, c-format
+msgid "slattach: setvbuf(stdout,0,_IOLBF,0) : %s\n"
+msgstr "slattach: setvbuf(stdout,0,_IOLBF,0) : %s\n"
+
+#: ../slattach.c:704
+#, c-format
+msgid "%s started"
+msgstr "%s käivitatud"
+
+#: ../slattach.c:705
+#, c-format
+msgid " on %s"
+msgstr " pordil %s"
+
+#: ../slattach.c:706
+#, c-format
+msgid " interface %s\n"
+msgstr " liides %s\n"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644 (file)
index 0000000..e8e7542
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,2523 @@
+# $Id: fr.po,v 1.2 2000/02/13 22:28:08 ralf Exp $
+# French translation for net-tools 1.51
+# Copyright (C) 1999 J.M.Vansteene <vanstee@worldnet.fr>
+msgid ""
+msgstr ""
+"Project-Id-Version: net-tools 1.51\n"
+"POT-Creation-Date: 2000-02-14 02:31+0100\n"
+"PO-Revision-Date: 1998-03-01 00:02+0100\n"
+"Last-Translator: J.M.Vansteene <vanstee@worldnet.fr>\n"
+"Language-Team:\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../arp.c:110 ../arp.c:269
+msgid "arp: need host name\n"
+msgstr "arp: nécessite un nom d'hôte\n"
+
+#: ../arp.c:207 ../arp.c:221
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr "Pas d'entrée ARP pour %s\n"
+
+#: ../arp.c:239
+#, fuzzy, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr "rarp: ne peut définir l'entrée depuis %s:%u\n"
+
+#: ../arp.c:243
+msgid "arp: protocol type mismatch.\n"
+msgstr ""
+
+#: ../arp.c:252
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr ""
+
+#: ../arp.c:282
+msgid "arp: need hardware address\n"
+msgstr "arp: nécessite une adresse matériel\n"
+
+#: ../arp.c:290
+msgid "arp: invalid hardware address\n"
+msgstr "arp: adresse matériel invalide\n"
+
+#: ../arp.c:387
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr "arp: ne peut ouvrir le fichier ether %s !\n"
+
+#: ../arp.c:403
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr "arp: erreur de format ligne %u du fichier ether %s !\n"
+
+#: ../arp.c:416
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr "arp: ne peut définir l'entrée en ligne %u du fichier ether %s !\n"
+
+#: ../arp.c:437
+msgid "Address\t\t\tHWtype\tHWaddress\t    Flags Mask\t\t  Iface\n"
+msgstr "Adresse\t\t\tTypeMap\tAdresseMat\t   Indicateurs\t\t  Iface\n"
+
+#: ../arp.c:467
+msgid "(incomplete)"
+msgstr ""
+
+#: ../arp.c:484
+#, c-format
+msgid "%s (%s) at "
+msgstr ""
+
+#: ../arp.c:490
+msgid "<incomplete> "
+msgstr ""
+
+#: ../arp.c:496
+#, c-format
+msgid "netmask %s "
+msgstr ""
+
+#: ../arp.c:513
+#, c-format
+msgid "on %s\n"
+msgstr ""
+
+#: ../arp.c:592
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr "Entrées: %d\tIgnorées: %d\tTrouvées: %d\n"
+
+#: ../arp.c:596
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr ""
+
+#: ../arp.c:598
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr "arp: aucune correspondance trouvée dans %d entrées\n"
+
+#: ../arp.c:613
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+"Syntaxe:\n"
+"  arp [-vn]  [<MAT>] [-i <if>] [-a] [<hôte>]              <-Affiche cache "
+"ARP\n"
+
+#: ../arp.c:614
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr ""
+"  arp [-v]          [-i <if>] -d  <hôte> [pub][nopub]     <-Supprime entrée "
+"ARP\n"
+
+#: ../arp.c:615
+#, fuzzy
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr ""
+"  arp [-vnD] [<MAT>] [-i <if>] -f  <fichier>              <-Ajout entrée "
+"depuis fichier\n"
+
+#: ../arp.c:616
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+"  arp [-v]   [<MAT>] [-i <if>] -s  <hôte> <adrmat> [temp][nopub] <-Ajout "
+"entrée\n"
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+"  arp [-v]   [<MAT>] [-i <if>] -s  <hôte> <adrmat> [netmask <nm>] pub  "
+"<-''-\n"
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr ""
+"  arp [-v]   [<MAT>] [-i <if>] -Ds <hôte> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+
+#: ../arp.c:620
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr ""
+"        -a                       affiche (tous) les hôtes en style BSD\n"
+
+#: ../arp.c:621
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr "        -s, --set                définit une nouvelle entrée ARP\n"
+
+#: ../arp.c:622
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr "        -d, --delete             supprime une entrée\n"
+
+#: ../arp.c:623 ../netstat.c:1436 ../route.c:85
+msgid "        -v, --verbose            be verbose\n"
+msgstr "        -v, --verbose            mode verbeux\n"
+
+#: ../arp.c:624 ../netstat.c:1437 ../route.c:86
+msgid "        -n, --numeric            dont resolve names\n"
+msgstr "        -n, --numeric            ne résout pas les noms\n"
+
+#: ../arp.c:625
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr ""
+"        -i, --device             spécifie l'interface réseau (p.ex. eth0)\n"
+
+#: ../arp.c:626
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr ""
+"        -D, --use-device         lit l'<adrmat> depuis le périphérique\n"
+
+#: ../arp.c:627
+#, fuzzy
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr "        -r, --route              affiche la table de routage\n"
+
+#: ../arp.c:628
+#, fuzzy
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+"        -f, --file               lit les nouvelles entrées dans le fichier\n"
+"\n"
+
+#: ../arp.c:630 ../rarp.c:181
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr ""
+"  <HW>=Utilisez '-H <hw>' pour spécifier le type d'adresse matériel. Défaut: "
+"%s\n"
+
+#: ../arp.c:631 ../rarp.c:182
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr "  Liste les types de matériels supportant ARP:\n"
+
+#: ../arp.c:664
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr "%s: type de matétiel non supporté !\n"
+
+#: ../arp.c:668
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr "%s: famille d'adresses non supportée !\n"
+
+#: ../arp.c:703
+#, fuzzy
+msgid "arp: -N not yet supported.\n"
+msgstr "Table de routage pour `ddp' pas encore supporté.\n"
+
+#: ../arp.c:713
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr "arp: %s: famille d'adresses inconnue.\n"
+
+#: ../arp.c:722
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr "arp: %s: type de matériel inconnu.\n"
+
+#: ../arp.c:741
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr "arp: %s: le noyau ne supporte que 'inet'.\n"
+
+#: ../arp.c:746
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr "arp: %s: type de matériel sans support ARP.\n"
+
+#: ../hostname.c:69
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr "Définit le nom de noeud à `%s'\n"
+
+#: ../hostname.c:74
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr "%s: vous devez être root pour changer le nom de noeud\n"
+
+#: ../hostname.c:77 ../hostname.c:97 ../hostname.c:116
+#, c-format
+msgid "%s: name too long\n"
+msgstr "%s: nom trop long\n"
+
+#: ../hostname.c:89
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr "Définit le nom d'hôte à `%s'\n"
+
+#: ../hostname.c:94
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr "%s: vous devez être root pour changer le nom d'hôte\n"
+
+#: ../hostname.c:108
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr "Définit le nom de domaine à `%s'\n"
+
+#: ../hostname.c:113
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr "%s: vous devez être root pour changer le nom de domaine\n"
+
+#: ../hostname.c:131
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr "Résolution de `%s' ...\n"
+
+#: ../hostname.c:137
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr "Résultat : h_name=`%s'\n"
+
+#: ../hostname.c:142
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr "Résultat : h_aliases=`%s'\n"
+
+#: ../hostname.c:147
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr "Résultat : h_addr_list=`%s'\n"
+
+#: ../hostname.c:209
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr "%s: ne peut ouvrir `%s'\n"
+
+#: ../hostname.c:223
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+"Syntaxe : hostname [-v] {hôte|-F fichier}      définit le nom d'hôte (depuis "
+"le fichier)\n"
+
+#: ../hostname.c:224
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+"       domainname [-v] {domaine_nis|-F fichier}   définit le domaine NIS "
+"(depuis le fichier)\n"
+
+#: ../hostname.c:226
+#, fuzzy
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr ""
+"       nodename [-v] {nom_noeud|-F fichier}      Définit le nom de noeud "
+"DECnet (depuis le fichier)\n"
+
+#: ../hostname.c:228
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  affiche le nom formatté\n"
+
+#: ../hostname.c:229
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr ""
+"       hostname [-v]                         affiche le nom d'hôte\n"
+"\n"
+
+#: ../hostname.c:230
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+"       hostname -V|--version|-h|--help       affiche des infos et termine\n"
+"\n"
+
+#: ../hostname.c:231
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+
+#: ../hostname.c:232
+msgid "    -s, --short           short host name\n"
+msgstr "    -s, --short           nom d'hôte court\n"
+
+#: ../hostname.c:233
+msgid "    -a, --alias           alias names\n"
+msgstr "    -a, --alias           noms d'alias\n"
+
+#: ../hostname.c:234
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr "    -i, --ip-address      adresses de l'hôte\n"
+
+#: ../hostname.c:235
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr "    -f, --fqdn, --long    nom d'hôte long (FQDN)\n"
+
+#: ../hostname.c:236
+msgid "    -d, --domain          DNS domain name\n"
+msgstr "    -d, --domain          nom de domaine DNS\n"
+
+#: ../hostname.c:237
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr "    -y, --yp, --nis       nom de domaine NIS/YP\n"
+
+#: ../hostname.c:239
+msgid "    -n, --node            DECnet node name\n"
+msgstr "    -n, --node            nom de noeud DECnet\n"
+
+#: ../hostname.c:241
+#, fuzzy
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+"    -F, --file            lit le nom d'hôte ou le nom de domaine NIS depuis "
+"le fichier\n"
+"\n"
+
+#: ../hostname.c:243
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+
+#: ../hostname.c:338
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr "%s: Vous ne pouvez changer le nom de domaine DNS avec cette commande\n"
+
+#: ../hostname.c:339
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+"\n"
+"Sauf si vous utilisez bind ou NIS pour les recherches d'hôtes, vous pouvez "
+"changer le\n"
+
+#: ../hostname.c:340
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"nom de domaine DNS (qui fait partie du FQDN) dans le fichier /etc/hosts.\n"
+
+#: ../hostname.c:357
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr "gethostname()=`%s'\n"
+
+#: ../hostname.c:374
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr "getdomainname()=`%s'\n"
+
+#: ../hostname.c:389
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr "getnodename()=`%s'\n"
+
+#: ../ifconfig.c:159
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr "%-9.9s Lien encap:%s  "
+
+#: ../ifconfig.c:164
+#, c-format
+msgid "HWaddr %s  "
+msgstr "HWaddr %s  "
+
+#: ../ifconfig.c:167
+#, c-format
+msgid "Media:%s"
+msgstr "Media:%s"
+
+#: ../ifconfig.c:169
+msgid "(auto)"
+msgstr "(auto)"
+
+#: ../ifconfig.c:176
+#, c-format
+msgid "          %s addr:%s "
+msgstr "          %s adr:%s "
+
+#: ../ifconfig.c:179
+#, c-format
+msgid " P-t-P:%s "
+msgstr " P-t-P:%s "
+
+#: ../ifconfig.c:182
+#, c-format
+msgid " Bcast:%s "
+msgstr " Bcast:%s "
+
+#: ../ifconfig.c:184
+#, c-format
+msgid " Mask:%s\n"
+msgstr " Masque:%s\n"
+
+#: ../ifconfig.c:201
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr "          adr inet6: %s/%d"
+
+#: ../ifconfig.c:203
+msgid " Scope:"
+msgstr " Scope:"
+
+#: ../ifconfig.c:206
+msgid "Global"
+msgstr "Global"
+
+#: ../ifconfig.c:209
+msgid "Link"
+msgstr "Lien"
+
+#: ../ifconfig.c:212
+msgid "Site"
+msgstr "Site"
+
+#: ../ifconfig.c:215
+msgid "Compat"
+msgstr "Compat"
+
+#: ../ifconfig.c:218
+msgid "Host"
+msgstr "Hôte"
+
+#: ../ifconfig.c:221
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: ../ifconfig.c:236
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr "          adr IPX/Ethernet II:%s\n"
+
+#: ../ifconfig.c:239
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr "          adr IPX/Ethernet SNAP:%s\n"
+
+#: ../ifconfig.c:242
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr "          adr IPX/Ethernet 802.2:%s\n"
+
+#: ../ifconfig.c:245
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr "          adr IPX/Ethernet 802.3:%s\n"
+
+#: ../ifconfig.c:255
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr "          adr EtherTalk Phase 2:%s\n"
+
+#: ../ifconfig.c:264
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr "          adr econet:%s\n"
+
+#: ../ifconfig.c:270
+msgid "[NO FLAGS] "
+msgstr "[PAS INDICATEURS] "
+
+#: ../ifconfig.c:272
+msgid "UP "
+msgstr "UP "
+
+#: ../ifconfig.c:274
+msgid "BROADCAST "
+msgstr "BROADCAST "
+
+#: ../ifconfig.c:276
+msgid "DEBUG "
+msgstr "DEBUG "
+
+#: ../ifconfig.c:278
+msgid "LOOPBACK "
+msgstr "LOOPBACK "
+
+#: ../ifconfig.c:280
+msgid "POINTOPOINT "
+msgstr "POINTOPOINT "
+
+#: ../ifconfig.c:282
+msgid "NOTRAILERS "
+msgstr "NOTRAILERS "
+
+#: ../ifconfig.c:284
+msgid "RUNNING "
+msgstr "RUNNING "
+
+#: ../ifconfig.c:286
+msgid "NOARP "
+msgstr "NOARP "
+
+#: ../ifconfig.c:288
+msgid "PROMISC "
+msgstr "PROMISC "
+
+#: ../ifconfig.c:290
+msgid "ALLMULTI "
+msgstr "ALLMULTI "
+
+#: ../ifconfig.c:292
+msgid "SLAVE "
+msgstr "SLAVE "
+
+#: ../ifconfig.c:294
+msgid "MASTER "
+msgstr "MASTER "
+
+#: ../ifconfig.c:296
+msgid "MULTICAST "
+msgstr "MULTICAST "
+
+#: ../ifconfig.c:299
+msgid "DYNAMIC "
+msgstr "DYNAMIC "
+
+#: ../ifconfig.c:302
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr " MTU:%d  Metric:%d"
+
+#: ../ifconfig.c:306
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr "  Outfill:%d  Keepalive:%d"
+
+#: ../ifconfig.c:320
+#, c-format
+msgid "RX packets:%lu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr "Paquets Reçus:%lu erreurs:%lu jetés:%lu débordements:%lu trames:%lu\n"
+
+#: ../ifconfig.c:325
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr "             compressés:%lu\n"
+
+#: ../ifconfig.c:329
+#, c-format
+msgid "TX packets:%lu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr ""
+"Paquets transmis:%lu erreurs:%lu jetés:%lu débordements:%lu carrier:%lu\n"
+
+#: ../ifconfig.c:333
+#, c-format
+msgid "          collisions:%lu "
+msgstr "          collisions:%lu "
+
+#: ../ifconfig.c:335
+#, c-format
+msgid "compressed:%lu "
+msgstr "compressés:%lu "
+
+#: ../ifconfig.c:337
+#, c-format
+msgid "txqueuelen:%d "
+msgstr "lg file transmission:%d "
+
+#: ../ifconfig.c:345
+#, c-format
+msgid "Interrupt:%d "
+msgstr "Interruption:%d "
+
+#. Only print devices using it for
+#. I/O maps
+#: ../ifconfig.c:348
+#, c-format
+msgid "Base address:0x%x "
+msgstr "Adresse de base:0x%x "
+
+#: ../ifconfig.c:350
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr "Mémoire:%lx-%lx "
+
+#: ../ifconfig.c:353
+#, c-format
+msgid "DMA chan:%x "
+msgstr "Canal DMA:%x "
+
+#: ../ifconfig.c:384 ../ifconfig.c:405
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr "%s: interface inconnue: %s\n"
+
+#: ../ifconfig.c:421
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <address>]\n"
+msgstr ""
+"Syntaxe:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <adresse>]\n"
+
+#: ../ifconfig.c:425
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr "  [add <adresse>[/<lg_prefixe>]]\n"
+
+#: ../ifconfig.c:427
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr "  [del <adresse>[/<lg_prefixe>]]\n"
+
+#: ../ifconfig.c:432
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr "  [[-]broadcast [<adresse>]]  [[-]pointopoint [<adresse>]]\n"
+
+#: ../ifconfig.c:433
+#, fuzzy
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr "  [netmask <adresse>]  [dstaddr <adresse>]  [tunnel <adresse>]\n"
+
+#: ../ifconfig.c:436
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr "  [outfill <NN>] [keepalive <NN>]\n"
+
+#: ../ifconfig.c:438
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr "  [hw <HW> <adresse>]  [metric <NN>]  [mtu <NN>]\n"
+
+#: ../ifconfig.c:439
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+
+#: ../ifconfig.c:440
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr "  [multicast]  [[-]promisc]\n"
+
+#: ../ifconfig.c:441
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+
+#: ../ifconfig.c:443
+#, fuzzy
+msgid "  [txqueuelen <NN>]\n"
+msgstr "  [txqueuelen longueur]\n"
+
+#: ../ifconfig.c:446
+msgid "  [[-]dynamic]\n"
+msgstr "  [[-]dynamic]\n"
+
+#: ../ifconfig.c:448
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+"  [up|down] ...\n"
+"\n"
+
+#: ../ifconfig.c:450
+msgid "  <HW>=Hardware Type.\n"
+msgstr "  <HW>=Type de matériel.\n"
+
+#: ../ifconfig.c:451
+msgid "  List of possible hardware types:\n"
+msgstr "  Liste des types de matériels possibles:\n"
+
+#. 1 = ARPable
+#: ../ifconfig.c:453
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr "  <AF>=famille d'Adresses. Défaut: %s\n"
+
+#: ../ifconfig.c:454
+msgid "  List of possible address families:\n"
+msgstr "  Liste des familles d'adresses possibles:\n"
+
+#: ../ifconfig.c:593
+msgid "Unknown media type.\n"
+msgstr "Type de média inconnu.\n"
+
+#: ../ifconfig.c:881
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr "%s: adresse %s invalide.\n"
+
+#: ../ifconfig.c:920 ../ifconfig.c:963 ../ifconfig.c:1011
+msgid "No support for INET6 on this system.\n"
+msgstr "Pas de support de INET6 sur ce système.\n"
+
+#: ../ifconfig.c:983
+msgid "Address deletion not supported on this system.\n"
+msgstr "Suppression d'adresses pas supporté par ce système.\n"
+
+#: ../ifconfig.c:1066
+msgid "No support for INET on this system.\n"
+msgstr "Pas de support de INET sur ce système.\n"
+
+#: ../ifconfig.c:1076
+msgid "No support for ECONET on this system.\n"
+msgstr "Pas de support de ECONET sur ce système.\n"
+
+#: ../ifconfig.c:1084
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr "Ne sait pas comment définir les adresses pour la famille %d.\n"
+
+#: ../netstat.c:383
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+"(Pas d'infos lues pour \"-p\": geteuid()=%d mais vous devez être root.)\n"
+
+#: ../netstat.c:387
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+"(Tous les processus ne peuvent être identifiés, les infos sur les processus\n"
+"non possédés ne seront pas affichées, vous devez être root pour les voir "
+"toutes.)\n"
+
+#: ../netstat.c:394 ../netstat.c:1089 ../netstat.c:1166
+msgid "LISTENING"
+msgstr "LISTENING"
+
+#: ../netstat.c:395
+msgid "CONN SENT"
+msgstr "CONN SENT"
+
+#: ../netstat.c:396 ../netstat.c:1168
+msgid "DISC SENT"
+msgstr "DISC SENT"
+
+#: ../netstat.c:397 ../netstat.c:464 ../netstat.c:809 ../netstat.c:1169
+msgid "ESTABLISHED"
+msgstr "ESTABLISHED"
+
+#: ../netstat.c:419
+msgid "Active NET/ROM sockets\n"
+msgstr "sockets NET/ROM actives\n"
+
+#: ../netstat.c:420
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"Utilisatr  Dest       Source     Periph  Etat         Vr/Vs    Send-Q  "
+"Recv-Q\n"
+
+#: ../netstat.c:430 ../netstat.c:1208
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr ""
+
+#: ../netstat.c:465
+msgid "SYN_SENT"
+msgstr "SYN_SENT"
+
+#: ../netstat.c:466
+msgid "SYN_RECV"
+msgstr "SYN_RECV"
+
+#: ../netstat.c:467
+msgid "FIN_WAIT1"
+msgstr "FIN_WAIT1"
+
+#: ../netstat.c:468
+msgid "FIN_WAIT2"
+msgstr "FIN_WAIT2"
+
+#: ../netstat.c:469
+msgid "TIME_WAIT"
+msgstr "TIME_WAIT"
+
+#: ../netstat.c:470
+msgid "CLOSE"
+msgstr "CLOSE"
+
+#: ../netstat.c:471
+msgid "CLOSE_WAIT"
+msgstr "CLOSE_WAIT"
+
+#: ../netstat.c:472
+msgid "LAST_ACK"
+msgstr "LAST_ACK"
+
+#: ../netstat.c:473
+msgid "LISTEN"
+msgstr "LISTEN"
+
+#: ../netstat.c:474
+msgid "CLOSING"
+msgstr "CLOSING"
+
+#: ../netstat.c:544
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr "attention, ligne igmp6 en erreur %d.\n"
+
+#: ../netstat.c:549 ../netstat.c:587 ../netstat.c:670 ../netstat.c:803
+#: ../netstat.c:935 ../netstat.c:940
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr "netstat: famille d'adresses pas supportée %d !\n"
+
+#: ../netstat.c:562 ../netstat.c:567 ../netstat.c:575 ../netstat.c:582
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr "attention, ligne igmp6 en erreur %d.\n"
+
+#: ../netstat.c:666
+msgid "warning, got bogus tcp line.\n"
+msgstr "attention, ligne tcp en erreur.\n"
+
+#: ../netstat.c:704 ../netstat.c:855 ../netstat.c:975
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr "off (0.00/%ld/%d)"
+
+#: ../netstat.c:708
+#, fuzzy, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr "on%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:713
+#, fuzzy, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr "on%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:718
+#, fuzzy, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr "on%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:723 ../netstat.c:864 ../netstat.c:985
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr "unkn-%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:799
+msgid "warning, got bogus udp line.\n"
+msgstr "attention, ligne udp en erreur.\n"
+
+#: ../netstat.c:817 ../netstat.c:1075 ../netstat.c:1108
+msgid "UNKNOWN"
+msgstr "INCONNU"
+
+#: ../netstat.c:860 ../netstat.c:980
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr "on%d (%2.2f/%ld/%d)"
+
+#: ../netstat.c:949
+msgid "warning, got bogus raw line.\n"
+msgstr "attention, ligne raw en erreur.\n"
+
+#: ../netstat.c:1028
+msgid "warning, got bogus unix line.\n"
+msgstr "attention, ligne unix en erreur.\n"
+
+#: ../netstat.c:1055
+msgid "STREAM"
+msgstr "STREAM"
+
+#: ../netstat.c:1059
+msgid "DGRAM"
+msgstr "DGRAM"
+
+#: ../netstat.c:1063
+msgid "RAW"
+msgstr "RAW"
+
+#: ../netstat.c:1067
+msgid "RDM"
+msgstr "RDM"
+
+#: ../netstat.c:1071
+msgid "SEQPACKET"
+msgstr "SEQPACKET"
+
+#: ../netstat.c:1080
+msgid "FREE"
+msgstr "LIBRE"
+
+#: ../netstat.c:1096
+msgid "CONNECTING"
+msgstr "ENCONNEXION"
+
+#: ../netstat.c:1100
+msgid "CONNECTED"
+msgstr "CONNECTE"
+
+#: ../netstat.c:1104
+msgid "DISCONNECTING"
+msgstr "ENDECONNEXION"
+
+#: ../netstat.c:1135
+msgid "Active UNIX domain sockets "
+msgstr "Sockets du domaine UNIX actives"
+
+#: ../netstat.c:1137 ../netstat.c:1666
+msgid "(servers and established)"
+msgstr "(serveurs et établies)"
+
+#: ../netstat.c:1140 ../netstat.c:1669
+msgid "(only servers)"
+msgstr "(seulement serveurs)"
+
+#: ../netstat.c:1142 ../netstat.c:1671
+msgid "(w/o servers)"
+msgstr "(sans serveurs)"
+
+#: ../netstat.c:1145
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+"\n"
+"Proto RefCpt Indicatrs   Type       Etat          I-Node"
+
+#: ../netstat.c:1147
+msgid " Path\n"
+msgstr " Chemin\n"
+
+#: ../netstat.c:1167
+msgid "SABM SENT"
+msgstr "SABM SENT"
+
+#: ../netstat.c:1170
+msgid "RECOVERY"
+msgstr "RECOVERY"
+
+#: ../netstat.c:1184
+msgid "Active AX.25 sockets\n"
+msgstr "Sockets AX.25 actives\n"
+
+#: ../netstat.c:1185
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr "Dest       Source     Periph  Etat         Vr/Vs    Send-Q  Recv-Q\n"
+
+#: ../netstat.c:1228
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr ""
+
+#: ../netstat.c:1279
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+"Sockets IPX actives\n"
+"Proto Recv-Q Send-Q Adresse locale             Adresse distante           "
+"Etat"
+
+#: ../netstat.c:1281
+msgid " User"
+msgstr "Utilisatr"
+
+#: ../netstat.c:1315
+msgid "ESTAB"
+msgstr "ESTAB"
+
+#: ../netstat.c:1323
+msgid "UNK."
+msgstr "UNK."
+
+#: ../netstat.c:1367
+msgid "     - no statistics available -"
+msgstr ""
+
+#: ../netstat.c:1370
+msgid "[NO FLAGS]"
+msgstr "[PAS INDICATEURS]"
+
+#: ../netstat.c:1400
+msgid "Kernel Interface table\n"
+msgstr "Table d'interfaces noyau\n"
+
+#: ../netstat.c:1401
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Indic\n"
+
+#: ../netstat.c:1404
+msgid "missing interface information"
+msgstr "informations d'interface manquantes"
+
+#: ../netstat.c:1425
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+"syntaxe: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+
+#: ../netstat.c:1426
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr "       netstat [-vnNcaeol] [<Socket> ...]\n"
+
+#: ../netstat.c:1427
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+
+#: ../netstat.c:1429
+msgid "        -r, --route              display routing table\n"
+msgstr "        -r, --route              affiche la table de routage\n"
+
+#: ../netstat.c:1430
+msgid "        -i, --interfaces         display interface table\n"
+msgstr "        -i, --interfaces         affiche la table d'interfaces\n"
+
+#: ../netstat.c:1431
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr ""
+"        -g, --groups             affiche les membres d'un groupe multicast\n"
+
+#: ../netstat.c:1432
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr ""
+"        -s, --statistics         affiche les statistiques réseau (comme "
+"SNMP)\n"
+
+#: ../netstat.c:1434
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+"        -M, --masquerade         affiche les connexions masquées\n"
+"\n"
+
+#: ../netstat.c:1438 ../route.c:87
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr "        -N, --symbolic           résoud les noms matériels\n"
+
+#: ../netstat.c:1439 ../route.c:88
+#, fuzzy
+msgid "        -e, --extend             display other/more information\n"
+msgstr ""
+"        -e, --extend             affiche d'autres/plus d'informations\n"
+
+#: ../netstat.c:1440
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr ""
+"        -p, --programs           affiche le nom du programme/PID des "
+"sockets\n"
+
+#: ../netstat.c:1441
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+"        -c, --continuous         listing continu\n"
+"\n"
+
+#: ../netstat.c:1442
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr ""
+"        -l, --listening          affiche les sockets du serveur à l'écoute\n"
+
+#: ../netstat.c:1443
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr ""
+"        -a, --all, --listening   affiche toutes les prises (défaut: "
+"connectés)\n"
+
+#: ../netstat.c:1444
+msgid "        -o, --timers             display timers\n"
+msgstr "        -o, --timers             affiche les timers\n"
+
+#: ../netstat.c:1445 ../route.c:89
+#, fuzzy
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+"        -F, --fib                affiche la Forwarding Infomation Base "
+"(défaut)\n"
+
+#: ../netstat.c:1446 ../route.c:90
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr ""
+"        -C, --cache              affiche le cache de routage au lieu de FIB\n"
+"\n"
+
+#: ../netstat.c:1448
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+
+#: ../netstat.c:1449 ../route.c:92
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>' Default: %s\n"
+msgstr "  <AF>=Utiliser '-A <af>' ou '--<af>' Défaut: %s\n"
+
+#: ../netstat.c:1450 ../route.c:93
+msgid "  List of possible address families (which support routing):\n"
+msgstr "  Liste les familles d'adresses possibles (supportant le routage):\n"
+
+#: ../netstat.c:1663
+msgid "Active Internet connections "
+msgstr "Connexions Internet actives "
+
+#: ../netstat.c:1673
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+"\n"
+"Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat     "
+"  "
+
+#: ../netstat.c:1675
+msgid " User       Inode     "
+msgstr " Utilisatr  Inode     "
+
+#: ../netstat.c:1678
+msgid " Timer"
+msgstr " Timer"
+
+#: ../netstat.c:1708
+msgid "IPv4 Group Memberships\n"
+msgstr ""
+
+#: ../netstat.c:1709
+msgid "Interface       RefCnt Group\n"
+msgstr ""
+
+#: ../rarp.c:43
+msgid "This kernel does not support RARP.\n"
+msgstr "Ce noyau ne supporte pas RARP.\n"
+
+#: ../rarp.c:82
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr "pas d'entrée RARP pour %s.\n"
+
+#: ../rarp.c:95
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr "%s: mauvaise adresse matériel\n"
+
+#: ../rarp.c:127
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr "rarp: ne peut ouvrir le fichier %s:%s.\n"
+
+#: ../rarp.c:139
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr "rarp: erreur de format à %s:%u\n"
+
+#: ../rarp.c:143 ../rarp.c:287
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr "rarp: %s: hôte inconnu\n"
+
+#: ../rarp.c:146
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr "rarp: ne peut définir l'entrée depuis %s:%u\n"
+
+#: ../rarp.c:175
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr ""
+"Usage: rarp -a                               liste les entrées en cache.\n"
+
+#: ../rarp.c:176
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr ""
+"       rarp -d <hostname>                    supprime l'entrée du cache.\n"
+
+#: ../rarp.c:177
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr ""
+"       rarp [<HW>] -s <hostname> <adrmat>    ajoute l'entrée au cache.\n"
+
+#: ../rarp.c:178
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+"       rarp -f                               ajoute les entrées depuis "
+"/etc/ethers.\n"
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+"       rarp -V                               affiche la version.\n"
+"\n"
+
+#: ../rarp.c:236
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr "%s: combinaison d'options illégales.\n"
+
+#: ../rarp.c:267
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr "rarp: %s: type de matériel inconnu.\n"
+
+#: ../route.c:79
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+"Syntaxe: route [-nNvee] [-FC] [<AF>]           Liste les tables de routage "
+"noyau\n"
+
+#: ../route.c:80
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+"       route [-v] [-FC] {add|del|flush} ...  Modifie la table de routage "
+"pour AF.\n"
+"\n"
+
+#: ../route.c:82
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+"       route {-h|--help} [<AF>]              Utilisation détaillée pour l'AF "
+"spécifié.\n"
+
+#: ../route.c:83
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+"       route {-V|--version}                  Affiche la version/auteur et "
+"termine.\n"
+"\n"
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr "Syntaxe: plipconfig [-a] [-i] [-v] interface\n"
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr "                  [nibble NN] [trigger NN]\n"
+
+#: ../plipconfig.c:68
+#, fuzzy
+msgid "       plipconfig -V | --version\n"
+msgstr "       plipconfig -V\n"
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr "%s\tnibble %lu  trigger %lu\n"
+
+#: ../iptunnel.c:79
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr ""
+
+#: ../iptunnel.c:80
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr ""
+
+#: ../iptunnel.c:81
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr ""
+
+#: ../iptunnel.c:82
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr ""
+
+#: ../iptunnel.c:83
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+
+#: ../iptunnel.c:84
+msgid "Where: NAME := STRING\n"
+msgstr ""
+
+#: ../iptunnel.c:85
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr ""
+
+#: ../iptunnel.c:86
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr ""
+
+#: ../iptunnel.c:87
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr ""
+
+#: ../iptunnel.c:88
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr ""
+
+#: ../iptunnel.c:326
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr ""
+
+#: ../iptunnel.c:346
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr ""
+
+#: ../iptunnel.c:361
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr ""
+
+#: ../iptunnel.c:373
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr ""
+
+#: ../iptunnel.c:411
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr ""
+
+#: ../iptunnel.c:415
+#, fuzzy
+msgid "unknown"
+msgstr "Inconnu"
+
+#: ../iptunnel.c:447
+msgid "  Drop packets out of sequence.\n"
+msgstr ""
+
+#: ../iptunnel.c:449
+msgid "  Checksum in received packet is required.\n"
+msgstr ""
+
+#: ../iptunnel.c:451
+msgid "  Sequence packets on output.\n"
+msgstr ""
+
+#: ../iptunnel.c:453
+msgid "  Checksum output packets.\n"
+msgstr ""
+
+#: ../iptunnel.c:481
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr ""
+
+#: ../iptunnel.c:494
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr ""
+
+#: ../iptunnel.c:510
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr ""
+
+#: ../iptunnel.c:513
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr ""
+
+#: ../statistics.c:45
+msgid "ICMP input histogram:"
+msgstr "Histogramme d'entrée ICMP"
+
+#: ../statistics.c:46
+msgid "ICMP output histogram:"
+msgstr "Histogramme de sortie ICMP"
+
+#: ../statistics.c:63
+#, c-format
+msgid "Forwarding is %s"
+msgstr "Réacheminement est %s"
+
+#: ../statistics.c:64
+#, c-format
+msgid "Default TTL is %d"
+msgstr "TTL par défaut est %d"
+
+#: ../statistics.c:65
+#, c-format
+msgid "%d total packets received"
+msgstr "%d paquets totaux reçus"
+
+#: ../statistics.c:66
+#, c-format
+msgid "%d with invalid headers"
+msgstr "%d avec en-tête invalides"
+
+#: ../statistics.c:67
+#, c-format
+msgid "%d with invalid addresses"
+msgstr "%d avec adresses invalides"
+
+#: ../statistics.c:68
+#, c-format
+msgid "%d forwarded"
+msgstr "%d réacheminées"
+
+#: ../statistics.c:69
+#, c-format
+msgid "%d with unknown protocol"
+msgstr "%d avec protocole inconnu"
+
+#: ../statistics.c:70
+#, c-format
+msgid "%d incoming packets discarded"
+msgstr "%d paquets entrant jetés"
+
+#: ../statistics.c:71
+#, c-format
+msgid "%d incoming packets delivered"
+msgstr "%d paquets entrant délivrés"
+
+#: ../statistics.c:72
+#, c-format
+msgid "%d requests sent out"
+msgstr "%d requêtes envoyées"
+
+#. ?
+#: ../statistics.c:73
+#, c-format
+msgid "%d outgoing packets dropped"
+msgstr "%d paquets sortant jetés"
+
+#: ../statistics.c:74
+#, c-format
+msgid "%d dropped because of missing route"
+msgstr "%d jetés pour cause de route manquante"
+
+#: ../statistics.c:75
+#, c-format
+msgid "%d fragments dropped after timeout"
+msgstr "%d fragments jetés après timeout"
+
+#: ../statistics.c:76
+#, c-format
+msgid "%d reassemblies required"
+msgstr "%d nécessitant un réassemblage"
+
+#. ?
+#: ../statistics.c:77
+#, c-format
+msgid "%d packets reassembled ok"
+msgstr "%d paquets réassemblés correctement"
+
+#: ../statistics.c:78
+#, c-format
+msgid "%d packet reassembles failed"
+msgstr "%d paquets mal réassemblés"
+
+#: ../statistics.c:79
+#, c-format
+msgid "%d fragments received ok"
+msgstr "%d fragments reçus correctement"
+
+#: ../statistics.c:80
+#, c-format
+msgid "%d fragments failed"
+msgstr "%d fragments en échec"
+
+#: ../statistics.c:81
+#, c-format
+msgid "%d fragments created"
+msgstr "%d fragments créés"
+
+#: ../statistics.c:86
+#, c-format
+msgid "%d ICMP messages received"
+msgstr "%d messages ICMP reçus"
+
+#: ../statistics.c:87
+#, c-format
+msgid "%d input ICMP message failed."
+msgstr "%d messages d'entrée ICMP en échec"
+
+#: ../statistics.c:88 ../statistics.c:101
+#, c-format
+msgid "destination unreachable: %d"
+msgstr "destination injoignable: %d"
+
+#: ../statistics.c:89
+#, c-format
+msgid "timeout in transit: %d"
+msgstr "timeout en transmission: %d"
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "wrong parameters: %d"
+msgstr "mauvais paramètre: %d"
+
+#. ?
+#: ../statistics.c:91
+#, c-format
+msgid "source quenchs: %d"
+msgstr "Source Quenchs: %d"
+
+#: ../statistics.c:92
+#, c-format
+msgid "redirects: %d"
+msgstr "Redirections: %d"
+
+#: ../statistics.c:93
+#, c-format
+msgid "echo requests: %d"
+msgstr "requêtes echo: %d"
+
+#: ../statistics.c:94 ../statistics.c:107
+#, c-format
+msgid "echo replies: %d"
+msgstr "réponses echo: %d"
+
+#: ../statistics.c:95
+#, c-format
+msgid "timestamp request: %d"
+msgstr "requêtes datées: %d"
+
+#: ../statistics.c:96
+#, c-format
+msgid "timestamp reply: %d"
+msgstr "réponses datées: %d"
+
+#: ../statistics.c:97
+#, c-format
+msgid "address mask request: %d"
+msgstr "requêtes de masque d'adresse: %d"
+
+#. ?
+#: ../statistics.c:98
+msgid "address mask replies"
+msgstr "réponses de masque d'adresses"
+
+#. ?
+#: ../statistics.c:99
+#, c-format
+msgid "%d ICMP messages sent"
+msgstr "%d messages ICMP envoyés"
+
+#: ../statistics.c:100
+#, c-format
+msgid "%d ICMP messages failed"
+msgstr "%d messages ICMP en échec"
+
+#: ../statistics.c:102
+#, c-format
+msgid "time exceeded: %d"
+msgstr "temps dépassé: %d"
+
+#. ?
+#: ../statistics.c:104
+#, c-format
+msgid "source quench: %d"
+msgstr "Source Quench: %d"
+
+#: ../statistics.c:105
+#, c-format
+msgid "redirect: %d"
+msgstr "redirection: %d"
+
+#: ../statistics.c:106
+#, c-format
+msgid "echo request: %d"
+msgstr "requête echo: %d"
+
+#: ../statistics.c:108
+#, c-format
+msgid "timestamp requests: %d"
+msgstr "requêtes datées: %d"
+
+#: ../statistics.c:109
+#, c-format
+msgid "timestamp replies: %d"
+msgstr "réponses datées: %d"
+
+#: ../statistics.c:110
+#, c-format
+msgid "address mask requests: %d"
+msgstr "requêtes de masque d'adresse: %d"
+
+#: ../statistics.c:111
+#, c-format
+msgid "address mask replies: %d"
+msgstr "réponses de masque d'adresse: %d"
+
+#: ../statistics.c:116
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr "algorithme RTO est %s"
+
+#: ../statistics.c:120
+#, c-format
+msgid "%d active connections openings"
+msgstr "%d ouvertures de connexions actives"
+
+#: ../statistics.c:121
+#, c-format
+msgid "%d passive connection openings"
+msgstr "%d ouvertures de connexions passives"
+
+#: ../statistics.c:122
+#, c-format
+msgid "%d failed connection attempts"
+msgstr "%d tentatives de connexion échouées"
+
+#: ../statistics.c:123
+#, c-format
+msgid "%d connection resets received"
+msgstr "%d réinitialisations de connexions reçues"
+
+#: ../statistics.c:124
+#, c-format
+msgid "%d connections established"
+msgstr "%d connexions établies"
+
+#: ../statistics.c:125
+#, c-format
+msgid "%d segments received"
+msgstr "%d segments reçus"
+
+#: ../statistics.c:126
+#, c-format
+msgid "%d segments send out"
+msgstr "%d segments envoyés"
+
+#: ../statistics.c:127
+#, c-format
+msgid "%d segments retransmited"
+msgstr "%d segments retransmis"
+
+#: ../statistics.c:128
+#, c-format
+msgid "%d bad segments received."
+msgstr "%d mauvais segments reçus."
+
+#: ../statistics.c:129
+#, c-format
+msgid "%d resets sent"
+msgstr "%d réinitialisations envoyées"
+
+#: ../statistics.c:134
+#, c-format
+msgid "%d packets received"
+msgstr "%d paquets reçus"
+
+#: ../statistics.c:135
+#, c-format
+msgid "%d packets to unknown port received."
+msgstr "%d paquets reçus pour un port inconnu"
+
+#: ../statistics.c:136
+#, c-format
+msgid "%d packet receive errors"
+msgstr "%d erreurs en réception de paquets"
+
+#: ../statistics.c:137
+#, c-format
+msgid "%d packets sent"
+msgstr "%d paquets envoyés"
+
+#: ../statistics.c:142
+#, c-format
+msgid "%d SYN cookies sent"
+msgstr ""
+
+#: ../statistics.c:143
+#, c-format
+msgid "%d SYN cookies received"
+msgstr "%d SYN-Cookies reçus"
+
+#: ../statistics.c:144
+#, c-format
+msgid "%d invalid SYN cookies received"
+msgstr "%d SYN-Cookies reçus incorrects"
+
+#: ../statistics.c:146
+#, c-format
+msgid "%d resets received for embryonic SYN_RECV sockets"
+msgstr "%d réinitialisations reçues pour sockets SYN_RECV embryonnaires"
+
+#: ../statistics.c:148
+#, c-format
+msgid "%d packets pruned from receive queue because of socket buffer overrun"
+msgstr ""
+"%d paquets supprimés de la file de réception en raison de tampon de sockets "
+"plein"
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:151
+#, c-format
+msgid "%d packets pruned from out-of-order queue"
+msgstr "%d paquets supprimés de la file hors service"
+
+#: ../statistics.c:152
+#, c-format
+msgid ""
+"%d packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr ""
+"%d paquets jetés de la file hors service en raison de tampon de sockets plein"
+
+#: ../statistics.c:154
+#, c-format
+msgid "%d ICMP packets dropped because they were out-of-window"
+msgstr "%d ICMP paquets jetés car hors de la fenêtre"
+
+#: ../statistics.c:156
+#, c-format
+msgid "%d ICMP packets dropped because socket was locked"
+msgstr "%d paquets ICMP jetés car la socket a été vérouillée"
+
+#: ../statistics.c:222
+msgid "enabled"
+msgstr "activée"
+
+#: ../statistics.c:222
+msgid "disabled"
+msgstr "désactivée"
+
+#: ../statistics.c:272
+#, c-format
+msgid "unknown title %s\n"
+msgstr "titre inconnu %s\n"
+
+#: ../statistics.c:298
+msgid "error parsing /proc/net/snmp"
+msgstr "erreur d'analyse de /proc/net/snmp"
+
+#: ../statistics.c:311
+msgid "cannot open /proc/net/snmp"
+msgstr "ne peut ouvrir /proc/net/snmp"
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr "Type de matériel `%s' pas supporté.\n"
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr "Ne peut changer la discipline de ligne à `%s'.\n"
+
+#: ../lib/af.c:145 ../lib/hw.c:148
+msgid "UNSPEC"
+msgstr "UNSPEC"
+
+#: ../lib/af.c:147
+msgid "UNIX Domain"
+msgstr "Domaine UNIX"
+
+#: ../lib/af.c:150
+msgid "DARPA Internet"
+msgstr "DARPA Internet"
+
+#: ../lib/af.c:153
+msgid "IPv6"
+msgstr "IPv6"
+
+#: ../lib/af.c:156 ../lib/hw.c:169
+msgid "AMPR AX.25"
+msgstr "AMPR AX.25"
+
+#: ../lib/af.c:159 ../lib/hw.c:175
+msgid "AMPR NET/ROM"
+msgstr "AMPR NET/ROM"
+
+#: ../lib/af.c:162
+msgid "Novell IPX"
+msgstr ""
+
+#: ../lib/af.c:165
+msgid "Appletalk DDP"
+msgstr "Appletalk DDP"
+
+#: ../lib/af.c:168 ../lib/hw.c:207
+msgid "Econet"
+msgstr "Econet"
+
+#: ../lib/af.c:171 ../lib/hw.c:172
+msgid "AMPR ROSE"
+msgstr "AMPR ROSE"
+
+#: ../lib/af.c:174 ../lib/hw.c:160
+msgid "Ash"
+msgstr "Ash"
+
+#: ../lib/af.c:232
+msgid "Please don't supply more than one address family.\n"
+msgstr "Ne fournissez pas plus d'une famille d'adresses SVP.\n"
+
+#: ../lib/af.c:293
+msgid "Too much address family arguments.\n"
+msgstr "Trop d'arguments de familles d'adresses.\n"
+
+#: ../lib/af.c:304
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr "Famille d'adresses inconnue `%s'.\n"
+
+#: ../lib/arcnet.c:53 ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52
+#: ../lib/fddi.c:67 ../lib/hippi.c:68 ../lib/inet.c:244 ../lib/inet.c:259
+#: ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78 ../lib/rose.c:71
+#: ../lib/rose.c:126 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr "[INDEFINI]"
+
+#: ../lib/arcnet.c:81 ../lib/arcnet.c:96
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr "in_arcnet(%s): adresse arcnet invalide !\n"
+
+#: ../lib/arcnet.c:108
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr "in_arcnet(%s): restant : ignoré !\n"
+
+#: ../lib/arcnet.c:120
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr "in_arcnet(%s): le restant à la poubelle !\n"
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr "Adresse Ash malformée"
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr "Signal d'appel invalide"
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr "Signal d'appel trop long"
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr "AX.25 pas configuré sur ce système.\n"
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr "Table de routage AX.25 du noyau\n"
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr "Destination  Iface    Utilisation\n"
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr "Table de routage pour `ddp' pas encore supporté.\n"
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr "in_ether(%s): adresse ethernet invalide!\n"
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr "in_ether(%s): restant ignoré !\n"
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr "in_ether(%s): le restant à la poubelle !\n"
+
+#: ../lib/fddi.c:95 ../lib/fddi.c:110
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr "in_fddi(%s): adresse fddi invalide!\n"
+
+#: ../lib/fddi.c:122
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): restant ignoré !\n"
+
+#: ../lib/fddi.c:134
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): le restant à la poubelle !\n"
+
+#: ../lib/getroute.c:97 ../lib/setroute.c:76
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr "Famille d'adresses `%s' non supportée.\n"
+
+#: ../lib/getroute.c:103 ../lib/setroute.c:80
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr "Pas de routage pour la famille d'adresses `%s'.\n"
+
+#: ../lib/hippi.c:96 ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr "in_hippi(%s): adresse hippi invalide!\n"
+
+#: ../lib/hippi.c:123
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr "in_hippi(%s): restant ignoré !\n"
+
+#: ../lib/hippi.c:134
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr "in_hippi(%s): le restant à la poubelle !\n"
+
+#: ../lib/hw.c:147
+msgid "Local Loopback"
+msgstr "Boucle locale"
+
+#: ../lib/hw.c:150
+msgid "Serial Line IP"
+msgstr "IP ligne série"
+
+#: ../lib/hw.c:151
+msgid "VJ Serial Line IP"
+msgstr "IP ligne série - VJ "
+
+#: ../lib/hw.c:152
+msgid "6-bit Serial Line IP"
+msgstr "IP ligne série - 6 bits"
+
+#: ../lib/hw.c:153
+msgid "VJ 6-bit Serial Line IP"
+msgstr "IP ligne série - 6 bits VJ"
+
+#: ../lib/hw.c:154
+msgid "Adaptive Serial Line IP"
+msgstr "IP ligne série adaptative"
+
+#: ../lib/hw.c:157
+msgid "Ethernet"
+msgstr "Ethernet"
+
+#: ../lib/hw.c:163
+msgid "Fiber Distributed Data Interface"
+msgstr "Fiber Distributed Data Interface"
+
+#: ../lib/hw.c:166
+msgid "HIPPI"
+msgstr "HIPPI"
+
+#: ../lib/hw.c:178
+msgid "IPIP Tunnel"
+msgstr "IPIP Tunnel"
+
+#: ../lib/hw.c:181
+msgid "Point-to-Point Protocol"
+msgstr "Protocole Point-à-Point"
+
+#: ../lib/hw.c:184
+msgid "(Cisco)-HDLC"
+msgstr "(Cisco)-HDLC"
+
+#: ../lib/hw.c:185
+msgid "LAPB"
+msgstr "LAPB"
+
+#: ../lib/hw.c:188
+msgid "ARCnet"
+msgstr "ARCnet"
+
+#: ../lib/hw.c:191
+msgid "Frame Relay DLCI"
+msgstr "Frame Relay DLCI"
+
+#: ../lib/hw.c:192
+msgid "Frame Relay Access Device"
+msgstr "Périphériue d'accès Frame Relay"
+
+#: ../lib/hw.c:195
+msgid "IPv6-in-IPv4"
+msgstr "IPv6-dans-IPv4"
+
+#: ../lib/hw.c:198
+#, fuzzy
+msgid "IrLAP"
+msgstr "LAPB"
+
+#: ../lib/hw.c:201
+msgid "16/4 Mbps Token Ring"
+msgstr ""
+
+#: ../lib/hw.c:203
+msgid "16/4 Mbps Token Ring (New)"
+msgstr ""
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr "rresolve: famille d'adresses non suportée %d !\n"
+
+#: ../lib/inet6_gr.c:79
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr "INET6 (IPv6) pas configuré sur ce système.\n"
+
+#: ../lib/inet6_gr.c:82
+msgid "Kernel IPv6 routing table\n"
+msgstr "Table de routage IPv6 du noyau\n"
+
+#: ../lib/inet6_gr.c:84
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+"Destination                                 Prochain Hop                     "
+"       Indic Metric Ref    Utilis. Iface\n"
+
+#: ../lib/inet6_gr.c:158
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr "Cache voisin IPv6 du noyau\n"
+
+#: ../lib/inet6_gr.c:161
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+"Voisin                                      Adresse MAT       Iface    Indic "
+"Ref Etat\n"
+
+#: ../lib/inet6_gr.c:165
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+"Voisin                                      Adresse MAT       Iface    Indic "
+"Ref Etat             Bloqué(sec) Détuit(sec)\n"
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr "Syntaxe: inet6_route [-vF] del Cible\n"
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr "       inet6_route [-vF] add Cible [gw Gw] [metric M] [[dev] If]\n"
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr "       inet6_route [-FC] flush      PAS supporté\n"
+
+#: ../lib/inet6_sr.c:182
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr "Flush de table de routage `inet6' pas supporté\n"
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr "INET (IPv4) pas configuré sur ce système.\n"
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr "Table de routage IP du noyau\n"
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Destination     Passerelle      Genmask         Indic Metric Ref    Use "
+"Iface\n"
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Destination     Passerelle      Genmask         Indic   MSS Fenêtre irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+"Destination     Passerelle      Genmask         Indic Metric Ref    Use "
+"Iface    MSS  Fenêtre irtt\n"
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr "cache de routage IP du noyau\n"
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Source          Destination     Passerelle      Indic Metric Ref    Use "
+"Iface\n"
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Source          Destination     Passerelle      Indic   MSS Fenêtre irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+"Source          Destination     Passerelle      Indic Metric Ref    Use "
+"Iface    MSS  Fenêtre irtt  HH  Arp\n"
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+"Source          Destination     Passerelle      Flags Metric Ref    Use "
+"Iface    MSS  Fenêtre irtt  TOS HHRef HHUptod     SpecDst\n"
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+"Syntaxe: inet_route [-vF] del {-host|-net} Cible[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Cible[/prefix] [gw Gw] [metric M]\n"
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Cible[/prefix] [metric M] reject\n"
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr "       inet_route [-FC] flush      PAS supporté\n"
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr "route: %s: ne peut utiliser un RESEAU comme passerelle!\n"
+
+#: ../lib/inet_sr.c:174
+#, fuzzy
+msgid "route: Invalid MSS/MTU.\n"
+msgstr "route: MSS invalide.\n"
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr "route: fenêtre invalide.\n"
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr "route: rtt initial invalide.\n"
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr "route: netmask %.8x n'a pas de sens pour une route vers un hôte\n"
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr "route: netmask bogué %s\n"
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr "route: netmask ne correspond pas à l'adresse de route\n"
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr "Flush de table de routage `inet' pas supporté\n"
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr "Modification de cache de routage `inet' pas supporté\n"
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr "IPX pas configuré sur ce système.\n"
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr "Table de routage IPX du noyau\n"
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr "Destination               Réseau Routeur            Noeud Routeur\n"
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr "IPX: ceci doit être écrit\n"
+
+#: ../lib/masq_info.c:197
+msgid "IP masquerading entries\n"
+msgstr "Entrées IP Masquerade\n"
+
+#: ../lib/masq_info.c:200
+msgid "prot   expire source               destination          ports\n"
+msgstr "prot   expire source               destination          ports\n"
+
+#: ../lib/masq_info.c:203
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+"prot   expire    initseq delta precd source               destination        "
+"  ports\n"
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr "NET/ROM pas configuré sur ce système.\n"
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr "Table de routage NET/ROM du noyau\n"
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr "Destination  Mnemoniq  Qualité  Voisin     Iface\n"
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr "utilisation netrom\n"
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr "NET/ROM: ceci doit être écrit\n"
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr "Vous ne pouvez démarrer PPP avec ce programme.\n"
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr "Désolé, utilisez pppd !\n"
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr "L'adresse de noeud doit avoir 10 chiffres"
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr "ROSE pas configuré sur ce système.\n"
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr "Table de routage ROSE du noyau\n"
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr "in_tr(%s): adresse token-ring invalide !\n"
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr "in_tr(%s): restant : ignoré !\n"
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr "in_tr(%s): restant à la poubelle !\n"
+
+#: ../lib/interface.c:124
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr "attention: pas de socket inet disponible: %s\n"
+
+#: ../lib/interface.c:270
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr ""
+
+#. Give better error message for this case.
+#: ../lib/interface.c:504
+msgid "Device not found"
+msgstr "Périphérique non trouvé"
+
+#: ../lib/interface.c:508
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr "%s: erreur lors de la recherche d'infos sur l'interface: %s\n"
+
+#: ../lib/sockets.c:59
+msgid "No usable address families found.\n"
+msgstr "Pas de famille d'adresses utilisable trouvée.\n"
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr "ip: %s est une adresse inet invalide\n"
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr "ip: %s est un préfixe inet invalide\n"
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr "ip: %s est une adresse IPv4 invalide\n"
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr "ip: argument incorrect: %s\n"
+
+#: ../ipmaddr.c:56
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr "Syntaxe: ipmaddr [ add | del ] MULTIADR dev CHAINE\n"
+
+#: ../ipmaddr.c:57
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr "       ipmaddr show [ dev CHAINE ] [ ipv4 | ipv6 | link | all ]\n"
+
+#: ../ipmaddr.c:58
+msgid "       ipmaddr -V | -version\n"
+msgstr ""
+
+#: ../ipmaddr.c:258
+#, c-format
+msgid "family %d "
+msgstr ""
+
+#: ../ipmaddr.c:267
+#, c-format
+msgid " users %d"
+msgstr ""
+
+#: ../ipmaddr.c:353
+msgid "Cannot create socket"
+msgstr "Ne peut créer une socket"
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr "slattach: /dev/%s déjà vérouillé !\n"
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr ""
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr "slattach: tty_lock: (%s): %s\n"
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr "slattach: tty_lock: utilisateur UUCP %s inconnu !\n"
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr "slattach: tty_hangup(DROP): %s\n"
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr "slattach: tty_hangup(RAISE): %s\n"
+
+#: ../slattach.c:486
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr "slattach: tty_open: ne peut obtenir l'état courant !\n"
+
+#: ../slattach.c:493
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr ""
+"slattach: tty_open: ne peut obtenir la discipline de ligne actuelle !\n"
+
+#: ../slattach.c:501
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr "slattach: tty_open: ne peut activer le mode RAW !\n"
+
+#: ../slattach.c:508
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr "slattach: tty_open: ne peut passer à %s bps!\n"
+
+#: ../slattach.c:518
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr "slattach: tty_open: ne peut activer le mode 8N1 !\n"
+
+#: ../slattach.c:686
+#, c-format
+msgid "%s started"
+msgstr ""
+
+#: ../slattach.c:687
+#, c-format
+msgid " on %s"
+msgstr ""
+
+#: ../slattach.c:688
+#, fuzzy, c-format
+msgid " interface %s\n"
+msgstr "%s: interface inconnue: %s\n"
+
+#~ msgid ""
+#~ "   This comand can get or set the hostname or the NIS domainname. You can\n"
+#~ msgstr ""
+#~ "   Cette commande ne peut obtenir ou définir le nom d'hôte ou le domaine "
+#~ "NIS. Vous pouvez\n"
+
+#~ msgid ""
+#~ "   also get the DNS domain or the FQDN (fully qualified domain name).\n"
+#~ msgstr ""
+#~ "   aussi obtenir le domaine DNS ou le FQDN (fully qualified domain name).\n"
+
+#~ msgid ""
+#~ "   Unless you are using bind or NIS for host lookups you can change the\n"
+#~ msgstr ""
+#~ "   Sauf si vous utilisez bind ou NIS pour les recherches d'hôtes, vous "
+#~ "pouvez changer le\n"
+
+#~ msgid ""
+#~ "   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+#~ msgstr ""
+#~ "   FQDN (Fully Qualified Domain Name) et le nom de domaine DNS (qui fait\n"
+
+#~ msgid "   part of the FQDN) in the /etc/hosts file.\n"
+#~ msgstr "   partie du FQDN) dans le fichier /etc/hosts.\n"
+
+#~ msgid "IPX"
+#~ msgstr "IPX"
+
+#~ msgid "slattach: unsupported protocol %s\n"
+#~ msgstr "slattach: protocole non supporté %s\n"
diff --git a/po/net-tools.pot b/po/net-tools.pot
new file mode 100644 (file)
index 0000000..0231aac
--- /dev/null
@@ -0,0 +1,2513 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2001-04-15 15:40+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: ../arp.c:111 ../arp.c:270
+msgid "arp: need host name\n"
+msgstr ""
+
+#: ../arp.c:208 ../arp.c:222
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr ""
+
+#: ../arp.c:240
+#, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr ""
+
+#: ../arp.c:244
+msgid "arp: protocol type mismatch.\n"
+msgstr ""
+
+#: ../arp.c:253
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr ""
+
+#: ../arp.c:283
+msgid "arp: need hardware address\n"
+msgstr ""
+
+#: ../arp.c:291
+msgid "arp: invalid hardware address\n"
+msgstr ""
+
+#: ../arp.c:388
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr ""
+
+#: ../arp.c:404
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr ""
+
+#: ../arp.c:417
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr ""
+
+#: ../arp.c:438
+msgid ""
+"Address                  HWtype  HWaddress           Flags Mask            "
+"Iface\n"
+msgstr ""
+
+#: ../arp.c:468
+msgid "(incomplete)"
+msgstr ""
+
+#: ../arp.c:485
+#, c-format
+msgid "%s (%s) at "
+msgstr ""
+
+#: ../arp.c:491
+msgid "<incomplete> "
+msgstr ""
+
+#: ../arp.c:497
+#, c-format
+msgid "netmask %s "
+msgstr ""
+
+#: ../arp.c:514
+#, c-format
+msgid "on %s\n"
+msgstr ""
+
+#: ../arp.c:593
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr ""
+
+#: ../arp.c:597
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr ""
+
+#: ../arp.c:599
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr ""
+
+#: ../arp.c:614
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+
+#: ../arp.c:615
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr ""
+
+#: ../arp.c:616
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr ""
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+
+#: ../arp.c:619
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr ""
+
+#: ../arp.c:621
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr ""
+
+#: ../arp.c:622
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr ""
+
+#: ../arp.c:623
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr ""
+
+#: ../arp.c:624 ../netstat.c:1490 ../route.c:86
+msgid "        -v, --verbose            be verbose\n"
+msgstr ""
+
+#: ../arp.c:625 ../netstat.c:1491 ../route.c:87
+msgid "        -n, --numeric            don't resolve names\n"
+msgstr ""
+
+#: ../arp.c:626
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr ""
+
+#: ../arp.c:627
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr ""
+
+#: ../arp.c:628
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr ""
+
+#: ../arp.c:629
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+
+#: ../arp.c:631 ../rarp.c:182
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr ""
+
+#: ../arp.c:632 ../rarp.c:183
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr ""
+
+#: ../arp.c:666 ../arp.c:751
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr ""
+
+#: ../arp.c:670
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr ""
+
+#: ../arp.c:705
+msgid "arp: -N not yet supported.\n"
+msgstr ""
+
+#: ../arp.c:715
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr ""
+
+#: ../arp.c:724
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr ""
+
+#: ../arp.c:743
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr ""
+
+#: ../arp.c:756
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr ""
+
+#: ../hostname.c:70
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr ""
+
+#: ../hostname.c:75
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr ""
+
+#: ../hostname.c:78 ../hostname.c:98 ../hostname.c:117
+#, c-format
+msgid "%s: name too long\n"
+msgstr ""
+
+#: ../hostname.c:90
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr ""
+
+#: ../hostname.c:95
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr ""
+
+#: ../hostname.c:109
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr ""
+
+#: ../hostname.c:114
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr ""
+
+#: ../hostname.c:132
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr ""
+
+#: ../hostname.c:138
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr ""
+
+#: ../hostname.c:143
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr ""
+
+#: ../hostname.c:148
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr ""
+
+#: ../hostname.c:210
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr ""
+
+#: ../hostname.c:224
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+
+#: ../hostname.c:225
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+
+#: ../hostname.c:227
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr ""
+
+#: ../hostname.c:229
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr ""
+
+#: ../hostname.c:230
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr ""
+
+#: ../hostname.c:231
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+
+#: ../hostname.c:232
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+
+#: ../hostname.c:233
+msgid "    -s, --short           short host name\n"
+msgstr ""
+
+#: ../hostname.c:234
+msgid "    -a, --alias           alias names\n"
+msgstr ""
+
+#: ../hostname.c:235
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr ""
+
+#: ../hostname.c:236
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr ""
+
+#: ../hostname.c:237
+msgid "    -d, --domain          DNS domain name\n"
+msgstr ""
+
+#: ../hostname.c:238
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr ""
+
+#: ../hostname.c:240
+msgid "    -n, --node            DECnet node name\n"
+msgstr ""
+
+#: ../hostname.c:242
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+
+#: ../hostname.c:244
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+
+#: ../hostname.c:340
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr ""
+
+#: ../hostname.c:341
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+
+#: ../hostname.c:342
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+
+#: ../hostname.c:359
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr ""
+
+#: ../hostname.c:376
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr ""
+
+#: ../hostname.c:391
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr ""
+
+#: ../ifconfig.c:108
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+
+#: ../ifconfig.c:130 ../ifconfig.c:162
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr ""
+
+#: ../ifconfig.c:154 ../ifconfig.c:734 ../ifconfig.c:825 ../ifconfig.c:936
+msgid "No support for INET on this system.\n"
+msgstr ""
+
+#: ../ifconfig.c:177
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>]\n"
+msgstr ""
+
+#: ../ifconfig.c:179
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr ""
+
+#: ../ifconfig.c:180
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr ""
+
+#: ../ifconfig.c:181
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr ""
+
+#: ../ifconfig.c:182
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr ""
+
+#: ../ifconfig.c:185
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr ""
+
+#: ../ifconfig.c:187
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr ""
+
+#: ../ifconfig.c:188
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr ""
+
+#: ../ifconfig.c:189
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr ""
+
+#: ../ifconfig.c:190
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr ""
+
+#: ../ifconfig.c:192
+msgid "  [txqueuelen <NN>]\n"
+msgstr ""
+
+#: ../ifconfig.c:195
+msgid "  [[-]dynamic]\n"
+msgstr ""
+
+#: ../ifconfig.c:197
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+
+#: ../ifconfig.c:199
+msgid "  <HW>=Hardware Type.\n"
+msgstr ""
+
+#: ../ifconfig.c:200
+msgid "  List of possible hardware types:\n"
+msgstr ""
+
+#. 1 = ARPable
+#: ../ifconfig.c:202
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr ""
+
+#: ../ifconfig.c:203
+msgid "  List of possible address families:\n"
+msgstr ""
+
+#: ../ifconfig.c:278
+#, c-format
+msgid "ifconfig: option `%s' not recognised.\n"
+msgstr ""
+
+#: ../ifconfig.c:280 ../ifconfig.c:925
+msgid "ifconfig: `--help' gives usage information.\n"
+msgstr ""
+
+#: ../ifconfig.c:355
+msgid "Unknown media type.\n"
+msgstr ""
+
+#: ../ifconfig.c:647
+#, c-format
+msgid "hw address type `%s' has no handler to set address. failed.\n"
+msgstr ""
+
+#: ../ifconfig.c:656
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr ""
+
+#: ../ifconfig.c:700 ../ifconfig.c:790 ../ifconfig.c:876
+msgid "No support for INET6 on this system.\n"
+msgstr ""
+
+#: ../ifconfig.c:743 ../ifconfig.c:834
+#, c-format
+msgid "Interface %s not initialized\n"
+msgstr ""
+
+#: ../ifconfig.c:755 ../ifconfig.c:845
+msgid "Bad address.\n"
+msgstr ""
+
+#: ../ifconfig.c:848
+msgid "Address deletion not supported on this system.\n"
+msgstr ""
+
+#: ../ifconfig.c:920
+msgid "ifconfig: Cannot set address for this protocol family.\n"
+msgstr ""
+
+#: ../ifconfig.c:946
+msgid "No support for ECONET on this system.\n"
+msgstr ""
+
+#: ../ifconfig.c:954
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr ""
+
+#: ../netstat.c:430
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+
+#: ../netstat.c:434
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+
+#: ../netstat.c:441 ../netstat.c:1176 ../netstat.c:1253
+msgid "LISTENING"
+msgstr ""
+
+#: ../netstat.c:442
+msgid "CONN SENT"
+msgstr ""
+
+#: ../netstat.c:443 ../netstat.c:1255
+msgid "DISC SENT"
+msgstr ""
+
+#: ../netstat.c:444 ../netstat.c:511 ../netstat.c:894 ../netstat.c:1256
+msgid "ESTABLISHED"
+msgstr ""
+
+#: ../netstat.c:466
+msgid "Active NET/ROM sockets\n"
+msgstr ""
+
+#: ../netstat.c:467
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+
+#: ../netstat.c:477 ../netstat.c:1295
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr ""
+
+#: ../netstat.c:512
+msgid "SYN_SENT"
+msgstr ""
+
+#: ../netstat.c:513
+msgid "SYN_RECV"
+msgstr ""
+
+#: ../netstat.c:514
+msgid "FIN_WAIT1"
+msgstr ""
+
+#: ../netstat.c:515
+msgid "FIN_WAIT2"
+msgstr ""
+
+#: ../netstat.c:516
+msgid "TIME_WAIT"
+msgstr ""
+
+#: ../netstat.c:517
+msgid "CLOSE"
+msgstr ""
+
+#: ../netstat.c:518
+msgid "CLOSE_WAIT"
+msgstr ""
+
+#: ../netstat.c:519
+msgid "LAST_ACK"
+msgstr ""
+
+#: ../netstat.c:520
+msgid "LISTEN"
+msgstr ""
+
+#: ../netstat.c:521
+msgid "CLOSING"
+msgstr ""
+
+#: ../netstat.c:592
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr ""
+
+#: ../netstat.c:597 ../netstat.c:635 ../netstat.c:756 ../netstat.c:888
+#: ../netstat.c:1019 ../netstat.c:1024
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr ""
+
+#: ../netstat.c:610 ../netstat.c:615 ../netstat.c:623 ../netstat.c:630
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr ""
+
+#: ../netstat.c:673
+msgid "Active X.25 sockets\n"
+msgstr ""
+
+#. IMHO, Vr/Vs is not very usefull --SF
+#: ../netstat.c:675
+msgid ""
+"Dest         Source          Device  LCI  State        Vr/Vs  Send-Q  "
+"Recv-Q\n"
+msgstr ""
+
+#: ../netstat.c:752
+msgid "warning, got bogus tcp line.\n"
+msgstr ""
+
+#: ../netstat.c:793 ../netstat.c:943 ../netstat.c:1062
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:797
+#, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:802
+#, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:807
+#, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:812 ../netstat.c:952 ../netstat.c:1072
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:884
+msgid "warning, got bogus udp line.\n"
+msgstr ""
+
+#: ../netstat.c:902 ../netstat.c:1162 ../netstat.c:1195
+msgid "UNKNOWN"
+msgstr ""
+
+#: ../netstat.c:948 ../netstat.c:1067
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr ""
+
+#: ../netstat.c:1033
+msgid "warning, got bogus raw line.\n"
+msgstr ""
+
+#: ../netstat.c:1115
+msgid "warning, got bogus unix line.\n"
+msgstr ""
+
+#: ../netstat.c:1142
+msgid "STREAM"
+msgstr ""
+
+#: ../netstat.c:1146
+msgid "DGRAM"
+msgstr ""
+
+#: ../netstat.c:1150
+msgid "RAW"
+msgstr ""
+
+#: ../netstat.c:1154
+msgid "RDM"
+msgstr ""
+
+#: ../netstat.c:1158
+msgid "SEQPACKET"
+msgstr ""
+
+#: ../netstat.c:1167
+msgid "FREE"
+msgstr ""
+
+#: ../netstat.c:1183
+msgid "CONNECTING"
+msgstr ""
+
+#: ../netstat.c:1187
+msgid "CONNECTED"
+msgstr ""
+
+#: ../netstat.c:1191
+msgid "DISCONNECTING"
+msgstr ""
+
+#: ../netstat.c:1222
+msgid "Active UNIX domain sockets "
+msgstr ""
+
+#: ../netstat.c:1224 ../netstat.c:1735
+msgid "(servers and established)"
+msgstr ""
+
+#: ../netstat.c:1227 ../netstat.c:1738
+msgid "(only servers)"
+msgstr ""
+
+#: ../netstat.c:1229 ../netstat.c:1740
+msgid "(w/o servers)"
+msgstr ""
+
+#: ../netstat.c:1232
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+
+#: ../netstat.c:1234
+msgid " Path\n"
+msgstr ""
+
+#: ../netstat.c:1254
+msgid "SABM SENT"
+msgstr ""
+
+#: ../netstat.c:1257
+msgid "RECOVERY"
+msgstr ""
+
+#: ../netstat.c:1271
+msgid "Active AX.25 sockets\n"
+msgstr ""
+
+#: ../netstat.c:1272
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr ""
+
+#: ../netstat.c:1315
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr ""
+
+#: ../netstat.c:1366
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+
+#: ../netstat.c:1368
+msgid " User"
+msgstr ""
+
+#: ../netstat.c:1402
+msgid "ESTAB"
+msgstr ""
+
+#: ../netstat.c:1410
+msgid "UNK."
+msgstr ""
+
+#: ../netstat.c:1448
+msgid "Kernel Interface table\n"
+msgstr ""
+
+#: ../netstat.c:1452
+msgid ""
+"Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+
+#: ../netstat.c:1456
+msgid "missing interface information"
+msgstr ""
+
+#: ../netstat.c:1479
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+
+#: ../netstat.c:1480
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr ""
+
+#: ../netstat.c:1481
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr ""
+
+#: ../netstat.c:1483
+msgid "        -r, --route              display routing table\n"
+msgstr ""
+
+#: ../netstat.c:1484
+msgid "        -i, --interfaces         display interface table\n"
+msgstr ""
+
+#: ../netstat.c:1485
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr ""
+
+#: ../netstat.c:1486
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr ""
+
+#: ../netstat.c:1488
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+
+#: ../netstat.c:1492
+msgid "        --numeric-hosts          don't resolve host names\n"
+msgstr ""
+
+#: ../netstat.c:1493
+msgid "        --numeric-ports          don't resolve port names\n"
+msgstr ""
+
+#: ../netstat.c:1494
+msgid "        --numeric-users          don't resolve user names\n"
+msgstr ""
+
+#: ../netstat.c:1495
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr ""
+
+#: ../netstat.c:1496 ../route.c:88
+msgid "        -e, --extend             display other/more information\n"
+msgstr ""
+
+#: ../netstat.c:1497
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr ""
+
+#: ../netstat.c:1498
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+
+#: ../netstat.c:1499
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr ""
+
+#: ../netstat.c:1500
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr ""
+
+#: ../netstat.c:1501
+msgid "        -o, --timers             display timers\n"
+msgstr ""
+
+#: ../netstat.c:1502 ../route.c:89
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+
+#: ../netstat.c:1503 ../route.c:90
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr ""
+
+#: ../netstat.c:1505
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+
+#: ../netstat.c:1506 ../route.c:92
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>'; default: %s\n"
+msgstr ""
+
+#: ../netstat.c:1507 ../route.c:93
+msgid "  List of possible address families (which support routing):\n"
+msgstr ""
+
+#: ../netstat.c:1732
+msgid "Active Internet connections "
+msgstr ""
+
+#: ../netstat.c:1742
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+
+#: ../netstat.c:1744
+msgid " User       Inode     "
+msgstr ""
+
+#: ../netstat.c:1747
+msgid " Timer"
+msgstr ""
+
+#: ../netstat.c:1777
+msgid "IPv4 Group Memberships\n"
+msgstr ""
+
+#: ../netstat.c:1778
+msgid "Interface       RefCnt Group\n"
+msgstr ""
+
+#: ../rarp.c:44
+msgid "This kernel does not support RARP.\n"
+msgstr ""
+
+#: ../rarp.c:83
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr ""
+
+#: ../rarp.c:96
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr ""
+
+#: ../rarp.c:128
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr ""
+
+#: ../rarp.c:140
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr ""
+
+#: ../rarp.c:144 ../rarp.c:289
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr ""
+
+#: ../rarp.c:147
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr ""
+
+#: ../rarp.c:176
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr ""
+
+#: ../rarp.c:177
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr ""
+
+#: ../rarp.c:178
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr ""
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+
+#: ../rarp.c:180
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+
+#: ../rarp.c:238
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr ""
+
+#: ../rarp.c:269
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr ""
+
+#: ../route.c:80
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+
+#: ../route.c:81
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+
+#: ../route.c:83
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+
+#: ../route.c:84
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr ""
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr ""
+
+#: ../plipconfig.c:68
+msgid "       plipconfig -V | --version\n"
+msgstr ""
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr ""
+
+#: ../iptunnel.c:85
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr ""
+
+#: ../iptunnel.c:86
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr ""
+
+#: ../iptunnel.c:87
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr ""
+
+#: ../iptunnel.c:88
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr ""
+
+#: ../iptunnel.c:89
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+
+#: ../iptunnel.c:90
+msgid "Where: NAME := STRING\n"
+msgstr ""
+
+#: ../iptunnel.c:91
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr ""
+
+#: ../iptunnel.c:92
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr ""
+
+#: ../iptunnel.c:93
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr ""
+
+#: ../iptunnel.c:94
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr ""
+
+#: ../iptunnel.c:332
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr ""
+
+#: ../iptunnel.c:352
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr ""
+
+#: ../iptunnel.c:367
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr ""
+
+#: ../iptunnel.c:379
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr ""
+
+#: ../iptunnel.c:417
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr ""
+
+#: ../iptunnel.c:421
+msgid "unknown"
+msgstr ""
+
+#: ../iptunnel.c:453
+msgid "  Drop packets out of sequence.\n"
+msgstr ""
+
+#: ../iptunnel.c:455
+msgid "  Checksum in received packet is required.\n"
+msgstr ""
+
+#: ../iptunnel.c:457
+msgid "  Sequence packets on output.\n"
+msgstr ""
+
+#: ../iptunnel.c:459
+msgid "  Checksum output packets.\n"
+msgstr ""
+
+#: ../iptunnel.c:487
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr ""
+
+#: ../iptunnel.c:500
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr ""
+
+#: ../iptunnel.c:516
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr ""
+
+#: ../iptunnel.c:519
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr ""
+
+#: ../statistics.c:47
+msgid "ICMP input histogram:"
+msgstr ""
+
+#: ../statistics.c:48
+msgid "ICMP output histogram:"
+msgstr ""
+
+#: ../statistics.c:65
+#, c-format
+msgid "Forwarding is %s"
+msgstr ""
+
+#: ../statistics.c:66
+#, c-format
+msgid "Default TTL is %u"
+msgstr ""
+
+#: ../statistics.c:67
+#, c-format
+msgid "%u total packets received"
+msgstr ""
+
+#: ../statistics.c:68
+#, c-format
+msgid "%u with invalid headers"
+msgstr ""
+
+#: ../statistics.c:69
+#, c-format
+msgid "%u with invalid addresses"
+msgstr ""
+
+#: ../statistics.c:70
+#, c-format
+msgid "%u forwarded"
+msgstr ""
+
+#: ../statistics.c:71
+#, c-format
+msgid "%u with unknown protocol"
+msgstr ""
+
+#: ../statistics.c:72
+#, c-format
+msgid "%u incoming packets discarded"
+msgstr ""
+
+#: ../statistics.c:73
+#, c-format
+msgid "%u incoming packets delivered"
+msgstr ""
+
+#: ../statistics.c:74
+#, c-format
+msgid "%u requests sent out"
+msgstr ""
+
+#. ?
+#: ../statistics.c:75
+#, c-format
+msgid "%u outgoing packets dropped"
+msgstr ""
+
+#: ../statistics.c:76
+#, c-format
+msgid "%u dropped because of missing route"
+msgstr ""
+
+#: ../statistics.c:77
+#, c-format
+msgid "%u fragments dropped after timeout"
+msgstr ""
+
+#: ../statistics.c:78
+#, c-format
+msgid "%u reassemblies required"
+msgstr ""
+
+#. ?
+#: ../statistics.c:79
+#, c-format
+msgid "%u packets reassembled ok"
+msgstr ""
+
+#: ../statistics.c:80
+#, c-format
+msgid "%u packet reassembles failed"
+msgstr ""
+
+#: ../statistics.c:81
+#, c-format
+msgid "%u fragments received ok"
+msgstr ""
+
+#: ../statistics.c:82
+#, c-format
+msgid "%u fragments failed"
+msgstr ""
+
+#: ../statistics.c:83
+#, c-format
+msgid "%u fragments created"
+msgstr ""
+
+#: ../statistics.c:88
+#, c-format
+msgid "%u ICMP messages received"
+msgstr ""
+
+#: ../statistics.c:89
+#, c-format
+msgid "%u input ICMP message failed."
+msgstr ""
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "destination unreachable: %u"
+msgstr ""
+
+#: ../statistics.c:91
+#, c-format
+msgid "timeout in transit: %u"
+msgstr ""
+
+#: ../statistics.c:92 ../statistics.c:105
+#, c-format
+msgid "wrong parameters: %u"
+msgstr ""
+
+#. ?
+#: ../statistics.c:93
+#, c-format
+msgid "source quenches: %u"
+msgstr ""
+
+#: ../statistics.c:94
+#, c-format
+msgid "redirects: %u"
+msgstr ""
+
+#: ../statistics.c:95
+#, c-format
+msgid "echo requests: %u"
+msgstr ""
+
+#: ../statistics.c:96 ../statistics.c:109
+#, c-format
+msgid "echo replies: %u"
+msgstr ""
+
+#: ../statistics.c:97
+#, c-format
+msgid "timestamp request: %u"
+msgstr ""
+
+#: ../statistics.c:98
+#, c-format
+msgid "timestamp reply: %u"
+msgstr ""
+
+#: ../statistics.c:99
+#, c-format
+msgid "address mask request: %u"
+msgstr ""
+
+#. ?
+#: ../statistics.c:100 ../statistics.c:113
+#, c-format
+msgid "address mask replies: %u"
+msgstr ""
+
+#. ?
+#: ../statistics.c:101
+#, c-format
+msgid "%u ICMP messages sent"
+msgstr ""
+
+#: ../statistics.c:102
+#, c-format
+msgid "%u ICMP messages failed"
+msgstr ""
+
+#: ../statistics.c:104
+#, c-format
+msgid "time exceeded: %u"
+msgstr ""
+
+#. ?
+#: ../statistics.c:106
+#, c-format
+msgid "source quench: %u"
+msgstr ""
+
+#: ../statistics.c:107
+#, c-format
+msgid "redirect: %u"
+msgstr ""
+
+#: ../statistics.c:108
+#, c-format
+msgid "echo request: %u"
+msgstr ""
+
+#: ../statistics.c:110
+#, c-format
+msgid "timestamp requests: %u"
+msgstr ""
+
+#: ../statistics.c:111
+#, c-format
+msgid "timestamp replies: %u"
+msgstr ""
+
+#: ../statistics.c:112
+#, c-format
+msgid "address mask requests: %u"
+msgstr ""
+
+#: ../statistics.c:118
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr ""
+
+#: ../statistics.c:122
+#, c-format
+msgid "%u active connections openings"
+msgstr ""
+
+#: ../statistics.c:123
+#, c-format
+msgid "%u passive connection openings"
+msgstr ""
+
+#: ../statistics.c:124
+#, c-format
+msgid "%u failed connection attempts"
+msgstr ""
+
+#: ../statistics.c:125
+#, c-format
+msgid "%u connection resets received"
+msgstr ""
+
+#: ../statistics.c:126
+#, c-format
+msgid "%u connections established"
+msgstr ""
+
+#: ../statistics.c:127
+#, c-format
+msgid "%u segments received"
+msgstr ""
+
+#: ../statistics.c:128
+#, c-format
+msgid "%u segments send out"
+msgstr ""
+
+#: ../statistics.c:129
+#, c-format
+msgid "%u segments retransmited"
+msgstr ""
+
+#: ../statistics.c:130
+#, c-format
+msgid "%u bad segments received."
+msgstr ""
+
+#: ../statistics.c:131
+#, c-format
+msgid "%u resets sent"
+msgstr ""
+
+#: ../statistics.c:136
+#, c-format
+msgid "%u packets received"
+msgstr ""
+
+#: ../statistics.c:137
+#, c-format
+msgid "%u packets to unknown port received."
+msgstr ""
+
+#: ../statistics.c:138
+#, c-format
+msgid "%u packet receive errors"
+msgstr ""
+
+#: ../statistics.c:139
+#, c-format
+msgid "%u packets sent"
+msgstr ""
+
+#: ../statistics.c:144
+#, c-format
+msgid "%u SYN cookies sent"
+msgstr ""
+
+#: ../statistics.c:145
+#, c-format
+msgid "%u SYN cookies received"
+msgstr ""
+
+#: ../statistics.c:146
+#, c-format
+msgid "%u invalid SYN cookies received"
+msgstr ""
+
+#: ../statistics.c:148
+#, c-format
+msgid "%u resets received for embryonic SYN_RECV sockets"
+msgstr ""
+
+#: ../statistics.c:150
+#, c-format
+msgid "%u packets pruned from receive queue because of socket buffer overrun"
+msgstr ""
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:153
+#, c-format
+msgid "%u packets pruned from receive queue"
+msgstr ""
+
+#: ../statistics.c:154
+#, c-format
+msgid ""
+"%u packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr ""
+
+#: ../statistics.c:156
+#, c-format
+msgid "%u ICMP packets dropped because they were out-of-window"
+msgstr ""
+
+#: ../statistics.c:158
+#, c-format
+msgid "%u ICMP packets dropped because socket was locked"
+msgstr ""
+
+#: ../statistics.c:160
+#, c-format
+msgid "%u TCP sockets finished time wait in fast timer"
+msgstr ""
+
+#: ../statistics.c:161
+#, c-format
+msgid "%u time wait sockets recycled by time stamp"
+msgstr ""
+
+#: ../statistics.c:162
+#, c-format
+msgid "%u TCP sockets finished time wait in slow timer"
+msgstr ""
+
+#: ../statistics.c:163
+#, c-format
+msgid "%u passive connections rejected because of time stamp"
+msgstr ""
+
+#: ../statistics.c:165
+#, c-format
+msgid "%u active connections rejected because of time stamp"
+msgstr ""
+
+#: ../statistics.c:167
+#, c-format
+msgid "%u packets rejects in established connections because of timestamp"
+msgstr ""
+
+#: ../statistics.c:169
+#, c-format
+msgid "%u delayed acks sent"
+msgstr ""
+
+#: ../statistics.c:170
+#, c-format
+msgid "%u delayed acks further delayed because of locked socket"
+msgstr ""
+
+#: ../statistics.c:172
+#, c-format
+msgid "Quick ack mode was activated %u times"
+msgstr ""
+
+#: ../statistics.c:173
+#, c-format
+msgid "%u times the listen queue of a socket overflowed"
+msgstr ""
+
+#: ../statistics.c:175
+#, c-format
+msgid "%u SYNs to LISTEN sockets ignored"
+msgstr ""
+
+#: ../statistics.c:176
+#, c-format
+msgid "%u packets directly queued to recvmsg prequeue."
+msgstr ""
+
+#: ../statistics.c:178
+#, c-format
+msgid "%u packets directly received from backlog"
+msgstr ""
+
+#: ../statistics.c:180
+#, c-format
+msgid "%u packets directly received from prequeue"
+msgstr ""
+
+#: ../statistics.c:182
+#, c-format
+msgid "%u packets dropped from prequeue"
+msgstr ""
+
+#: ../statistics.c:183
+#, c-format
+msgid "%u packets header predicted"
+msgstr ""
+
+#: ../statistics.c:184
+#, c-format
+msgid "%u packets header predicted and directly queued to user"
+msgstr ""
+
+#: ../statistics.c:186
+#, c-format
+msgid "Ran %u times out of system memory during packet sending"
+msgstr ""
+
+#: ../statistics.c:253
+msgid "enabled"
+msgstr ""
+
+#: ../statistics.c:253
+msgid "disabled"
+msgstr ""
+
+#: ../statistics.c:336
+msgid "error parsing /proc/net/snmp"
+msgstr ""
+
+#: ../statistics.c:349
+msgid "cannot open /proc/net/snmp"
+msgstr ""
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr ""
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr ""
+
+#: ../lib/af.c:153 ../lib/hw.c:156
+msgid "UNSPEC"
+msgstr ""
+
+#: ../lib/af.c:155
+msgid "UNIX Domain"
+msgstr ""
+
+#: ../lib/af.c:158
+msgid "DARPA Internet"
+msgstr ""
+
+#: ../lib/af.c:161
+msgid "IPv6"
+msgstr ""
+
+#: ../lib/af.c:164 ../lib/hw.c:177
+msgid "AMPR AX.25"
+msgstr ""
+
+#: ../lib/af.c:167 ../lib/hw.c:183
+msgid "AMPR NET/ROM"
+msgstr ""
+
+#: ../lib/af.c:170
+msgid "Novell IPX"
+msgstr ""
+
+#: ../lib/af.c:173
+msgid "Appletalk DDP"
+msgstr ""
+
+#: ../lib/af.c:176 ../lib/hw.c:218
+msgid "Econet"
+msgstr ""
+
+#: ../lib/af.c:179
+msgid "CCITT X.25"
+msgstr ""
+
+#: ../lib/af.c:182 ../lib/hw.c:180
+msgid "AMPR ROSE"
+msgstr ""
+
+#: ../lib/af.c:185 ../lib/hw.c:168
+msgid "Ash"
+msgstr ""
+
+#: ../lib/af.c:243
+msgid "Please don't supply more than one address family.\n"
+msgstr ""
+
+#: ../lib/af.c:304
+msgid "Too much address family arguments.\n"
+msgstr ""
+
+#: ../lib/af.c:315
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr ""
+
+#: ../lib/arcnet.c:70 ../lib/arcnet.c:85
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr ""
+
+#: ../lib/arcnet.c:97
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr ""
+
+#: ../lib/arcnet.c:109
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr ""
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr ""
+
+#: ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52 ../lib/inet.c:244
+#: ../lib/inet.c:259 ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78
+#: ../lib/rose.c:71 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr ""
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr ""
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr ""
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr ""
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr ""
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr ""
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr ""
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr ""
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr ""
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr ""
+
+#: ../lib/fddi.c:84 ../lib/fddi.c:99
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr ""
+
+#: ../lib/fddi.c:111
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr ""
+
+#: ../lib/fddi.c:123
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr ""
+
+#: ../lib/getroute.c:101 ../lib/setroute.c:80
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr ""
+
+#: ../lib/getroute.c:107 ../lib/setroute.c:84
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr ""
+
+#: ../lib/hippi.c:84 ../lib/hippi.c:99
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr ""
+
+#: ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr ""
+
+#: ../lib/hippi.c:122
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr ""
+
+#: ../lib/hw.c:155
+msgid "Local Loopback"
+msgstr ""
+
+#: ../lib/hw.c:158
+msgid "Serial Line IP"
+msgstr ""
+
+#: ../lib/hw.c:159
+msgid "VJ Serial Line IP"
+msgstr ""
+
+#: ../lib/hw.c:160
+msgid "6-bit Serial Line IP"
+msgstr ""
+
+#: ../lib/hw.c:161
+msgid "VJ 6-bit Serial Line IP"
+msgstr ""
+
+#: ../lib/hw.c:162
+msgid "Adaptive Serial Line IP"
+msgstr ""
+
+#: ../lib/hw.c:165
+msgid "Ethernet"
+msgstr ""
+
+#: ../lib/hw.c:171
+msgid "Fiber Distributed Data Interface"
+msgstr ""
+
+#: ../lib/hw.c:174
+msgid "HIPPI"
+msgstr ""
+
+#: ../lib/hw.c:186
+msgid "generic X.25"
+msgstr ""
+
+#: ../lib/hw.c:189
+msgid "IPIP Tunnel"
+msgstr ""
+
+#: ../lib/hw.c:192
+msgid "Point-to-Point Protocol"
+msgstr ""
+
+#: ../lib/hw.c:195
+msgid "(Cisco)-HDLC"
+msgstr ""
+
+#: ../lib/hw.c:196
+msgid "LAPB"
+msgstr ""
+
+#: ../lib/hw.c:199
+msgid "ARCnet"
+msgstr ""
+
+#: ../lib/hw.c:202
+msgid "Frame Relay DLCI"
+msgstr ""
+
+#: ../lib/hw.c:203
+msgid "Frame Relay Access Device"
+msgstr ""
+
+#: ../lib/hw.c:206
+msgid "IPv6-in-IPv4"
+msgstr ""
+
+#: ../lib/hw.c:209
+msgid "IrLAP"
+msgstr ""
+
+#: ../lib/hw.c:212
+msgid "16/4 Mbps Token Ring"
+msgstr ""
+
+#: ../lib/hw.c:214
+msgid "16/4 Mbps Token Ring (New)"
+msgstr ""
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr ""
+
+#: ../lib/inet6.c:131
+msgid "[UNKNOWN]"
+msgstr ""
+
+#: ../lib/inet6_gr.c:71
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr ""
+
+#: ../lib/inet6_gr.c:74
+msgid "Kernel IPv6 routing table\n"
+msgstr ""
+
+#: ../lib/inet6_gr.c:76
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+
+#: ../lib/inet6_gr.c:150
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr ""
+
+#: ../lib/inet6_gr.c:153
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+
+#: ../lib/inet6_gr.c:157
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr ""
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr ""
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr ""
+
+#: ../lib/inet6_sr.c:188
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:174
+msgid "route: Invalid MSS/MTU.\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr ""
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr ""
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr ""
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr ""
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr ""
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr ""
+
+#: ../lib/masq_info.c:198
+msgid "IP masquerading entries\n"
+msgstr ""
+
+#: ../lib/masq_info.c:201
+msgid "prot   expire source               destination          ports\n"
+msgstr ""
+
+#: ../lib/masq_info.c:204
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr ""
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr ""
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr ""
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr ""
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr ""
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr ""
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr ""
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr ""
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr ""
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr ""
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr ""
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr ""
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr ""
+
+#: ../lib/interface.c:164
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr ""
+
+#: ../lib/interface.c:316
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr ""
+
+#. Give better error message for this case.
+#: ../lib/interface.c:556
+msgid "Device not found"
+msgstr ""
+
+#: ../lib/interface.c:560
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr ""
+
+#: ../lib/interface.c:593
+msgid "     - no statistics available -"
+msgstr ""
+
+#: ../lib/interface.c:597
+msgid "[NO FLAGS]"
+msgstr ""
+
+#: ../lib/interface.c:673
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr ""
+
+#: ../lib/interface.c:678
+#, c-format
+msgid "HWaddr %s  "
+msgstr ""
+
+#: ../lib/interface.c:681
+#, c-format
+msgid "Media:%s"
+msgstr ""
+
+#: ../lib/interface.c:683
+msgid "(auto)"
+msgstr ""
+
+#: ../lib/interface.c:690
+#, c-format
+msgid "          %s addr:%s "
+msgstr ""
+
+#: ../lib/interface.c:693
+#, c-format
+msgid " P-t-P:%s "
+msgstr ""
+
+#: ../lib/interface.c:696
+#, c-format
+msgid " Bcast:%s "
+msgstr ""
+
+#: ../lib/interface.c:698
+#, c-format
+msgid " Mask:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:715
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr ""
+
+#: ../lib/interface.c:717
+msgid " Scope:"
+msgstr ""
+
+#: ../lib/interface.c:720
+msgid "Global"
+msgstr ""
+
+#: ../lib/interface.c:723
+msgid "Link"
+msgstr ""
+
+#: ../lib/interface.c:726
+msgid "Site"
+msgstr ""
+
+#: ../lib/interface.c:729
+msgid "Compat"
+msgstr ""
+
+#: ../lib/interface.c:732
+msgid "Host"
+msgstr ""
+
+#: ../lib/interface.c:735
+msgid "Unknown"
+msgstr ""
+
+#: ../lib/interface.c:750
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:753
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:756
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:759
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:769
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:778
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr ""
+
+#: ../lib/interface.c:785
+msgid "[NO FLAGS] "
+msgstr ""
+
+#: ../lib/interface.c:787
+msgid "UP "
+msgstr ""
+
+#: ../lib/interface.c:789
+msgid "BROADCAST "
+msgstr ""
+
+#: ../lib/interface.c:791
+msgid "DEBUG "
+msgstr ""
+
+#: ../lib/interface.c:793
+msgid "LOOPBACK "
+msgstr ""
+
+#: ../lib/interface.c:795
+msgid "POINTOPOINT "
+msgstr ""
+
+#: ../lib/interface.c:797
+msgid "NOTRAILERS "
+msgstr ""
+
+#: ../lib/interface.c:799
+msgid "RUNNING "
+msgstr ""
+
+#: ../lib/interface.c:801
+msgid "NOARP "
+msgstr ""
+
+#: ../lib/interface.c:803
+msgid "PROMISC "
+msgstr ""
+
+#: ../lib/interface.c:805
+msgid "ALLMULTI "
+msgstr ""
+
+#: ../lib/interface.c:807
+msgid "SLAVE "
+msgstr ""
+
+#: ../lib/interface.c:809
+msgid "MASTER "
+msgstr ""
+
+#: ../lib/interface.c:811
+msgid "MULTICAST "
+msgstr ""
+
+#: ../lib/interface.c:814
+msgid "DYNAMIC "
+msgstr ""
+
+#. DONT FORGET TO ADD THE FLAGS IN ife_print_short
+#: ../lib/interface.c:817
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr ""
+
+#: ../lib/interface.c:821
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr ""
+
+#: ../lib/interface.c:835
+#, c-format
+msgid "RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr ""
+
+#: ../lib/interface.c:840
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr ""
+
+#: ../lib/interface.c:852
+#, c-format
+msgid "TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr ""
+
+#: ../lib/interface.c:856
+#, c-format
+msgid "          collisions:%lu "
+msgstr ""
+
+#: ../lib/interface.c:858
+#, c-format
+msgid "compressed:%lu "
+msgstr ""
+
+#: ../lib/interface.c:860
+#, c-format
+msgid "txqueuelen:%d "
+msgstr ""
+
+#: ../lib/interface.c:862
+#, c-format
+msgid "RX bytes:%llu (%lu.%lu %s)  TX bytes:%llu (%lu.%lu %s)\n"
+msgstr ""
+
+#: ../lib/interface.c:873
+#, c-format
+msgid "Interrupt:%d "
+msgstr ""
+
+#. Only print devices using it for
+#. I/O maps
+#: ../lib/interface.c:876
+#, c-format
+msgid "Base address:0x%x "
+msgstr ""
+
+#: ../lib/interface.c:878
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr ""
+
+#: ../lib/interface.c:881
+#, c-format
+msgid "DMA chan:%x "
+msgstr ""
+
+#: ../lib/sockets.c:63
+msgid "No usable address families found.\n"
+msgstr ""
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr ""
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr ""
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr ""
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr ""
+
+#: ../ipmaddr.c:61
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr ""
+
+#: ../ipmaddr.c:62
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr ""
+
+#: ../ipmaddr.c:63
+msgid "       ipmaddr -V | -version\n"
+msgstr ""
+
+#: ../ipmaddr.c:263
+#, c-format
+msgid "family %d "
+msgstr ""
+
+#: ../ipmaddr.c:272
+#, c-format
+msgid " users %d"
+msgstr ""
+
+#: ../ipmaddr.c:358
+msgid "Cannot create socket"
+msgstr ""
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr ""
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr ""
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr ""
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr ""
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr ""
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr ""
+
+#: ../slattach.c:468
+msgid "slattach: tty name too long\n"
+msgstr ""
+
+#: ../slattach.c:498
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr ""
+
+#: ../slattach.c:505
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr ""
+
+#: ../slattach.c:513
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr ""
+
+#: ../slattach.c:520
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr ""
+
+#: ../slattach.c:530
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr ""
+
+#: ../slattach.c:672
+#, c-format
+msgid "slattach: setvbuf(stdout,0,_IOLBF,0) : %s\n"
+msgstr ""
+
+#: ../slattach.c:704
+#, c-format
+msgid "%s started"
+msgstr ""
+
+#: ../slattach.c:705
+#, c-format
+msgid " on %s"
+msgstr ""
+
+#: ../slattach.c:706
+#, c-format
+msgid " interface %s\n"
+msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644 (file)
index 0000000..7c5dd37
--- /dev/null
@@ -0,0 +1,2490 @@
+# Brazilian Portuguese translation for net-tools 1.54
+# Copyright (C) 2000 Free Software Foundation, Inc.
+# Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2000.
+#
+# $Id: pt_BR.po,v 1.7 2000/02/13 22:28:11 ralf Exp $
+# Brazilian portuguese translation for net-tools 1.54
+# Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+# Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 1998-2000
+# Ralf Baechle <ralf@gnu.org>, 1999
+msgid ""
+msgstr ""
+"Project-Id-Version: net-tools 1.54\n"
+"POT-Creation-Date: 2000-02-14 02:31+0100\n"
+"PO-Revision-Date: 1999-03-01 02:38+0100\n"
+"Last-Translator: Arnaldo Carvalho de Melo <acme@conectiva.com.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO8859-9\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../arp.c:110 ../arp.c:269
+msgid "arp: need host name\n"
+msgstr "arp: preciso do nome da máquina\n"
+
+#: ../arp.c:207 ../arp.c:221
+#, c-format
+msgid "No ARP entry for %s\n"
+msgstr "Nenhuma entrada ARP para %s\n"
+
+#: ../arp.c:239
+#, c-format
+msgid "arp: cant get HW-Address for `%s': %s.\n"
+msgstr "arp: não foi possível obter o endereço de hardware para `%s': %s.\n"
+
+#: ../arp.c:243
+msgid "arp: protocol type mismatch.\n"
+msgstr "arp: erro no tipo do protocolo.\n"
+
+#: ../arp.c:252
+#, c-format
+msgid "arp: device `%s' has HW address %s `%s'.\n"
+msgstr "arp: o dispositivo `%s' tem endereço de hardware %s `%s'.\n"
+
+#: ../arp.c:282
+msgid "arp: need hardware address\n"
+msgstr "arp: preciso do endereço de hardware\n"
+
+#: ../arp.c:290
+msgid "arp: invalid hardware address\n"
+msgstr "arp: endereço inválido de hardware\n"
+
+#: ../arp.c:387
+#, c-format
+msgid "arp: cannot open etherfile %s !\n"
+msgstr "arp: não foi possível abrir o arquivo etherfile %s!\n"
+
+#: ../arp.c:403
+#, c-format
+msgid "arp: format error on line %u of etherfile %s !\n"
+msgstr "arp: erro de formato na linha %u do arquivo etherfile %s!\n"
+
+#: ../arp.c:416
+#, c-format
+msgid "arp: cannot set entry on line %u of etherfile %s !\n"
+msgstr "arp: não foi possível configurar a linha %u do arquivo etherfile %s!\n"
+
+#: ../arp.c:437
+msgid "Address\t\t\tHWtype\tHWaddress\t    Flags Mask\t\t  Iface\n"
+msgstr "Endereço\t\tTipoHW\tEndereçoHW\t Flags Mascara\t\t Iface\n"
+
+#: ../arp.c:467
+msgid "(incomplete)"
+msgstr "(incompleto)"
+
+#: ../arp.c:484
+#, c-format
+msgid "%s (%s) at "
+msgstr "%s (%s) em "
+
+#: ../arp.c:490
+msgid "<incomplete> "
+msgstr "<incompleto> "
+
+#: ../arp.c:496
+#, c-format
+msgid "netmask %s "
+msgstr "mascara %s "
+
+#: ../arp.c:513
+#, c-format
+msgid "on %s\n"
+msgstr "em %s\n"
+
+#: ../arp.c:592
+#, c-format
+msgid "Entries: %d\tSkipped: %d\tFound: %d\n"
+msgstr "Entradas: %d\tIgnorada: %d\tEncontrada: %d\n"
+
+#: ../arp.c:596
+#, c-format
+msgid "%s (%s) -- no entry\n"
+msgstr "%s (%s) -- nenhuma entrada\n"
+
+#: ../arp.c:598
+#, c-format
+msgid "arp: in %d entries no match found.\n"
+msgstr "arp: em %d entradas não foi encontrado.\n"
+
+#: ../arp.c:613
+msgid ""
+"Usage:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<hostname>]             <-Display ARP "
+"cache\n"
+msgstr ""
+"Uso:\n"
+"  arp [-vn]  [<HW>] [-i <if>] [-a] [<máquina>]             <-Mostra cache "
+"ARP\n"
+
+#: ../arp.c:614
+msgid ""
+"  arp [-v]          [-i <if>] -d  <hostname> [pub][nopub]    <-Delete ARP "
+"entry\n"
+msgstr ""
+"  arp [-v]          [-i <if>] -d  <máquina>  [pub][nopub]  <-Remove entrada "
+"ARP\n"
+
+#: ../arp.c:615
+msgid ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<filename>]              <-Add entry from "
+"file\n"
+msgstr ""
+"  arp [-vnD] [<HW>] [-i <if>] -f  [<arquivo>]         <-Inclui entrada de "
+"arquivo\n"
+
+#: ../arp.c:616
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [temp][nopub] <-Add "
+"entry\n"
+msgstr ""
+"  arp [-v] [<HW>] [-i <if>] -s <máquina> <end_hw> [temp][nopub] <-Inc. "
+"Entrada\n"
+
+#: ../arp.c:617
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <hostname> <hwaddr> [netmask <nm>] pub  "
+"<-''-\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -s  <máquina> <end_hw>  [netmask <nm>] pub  "
+"<-''-\n"
+
+#: ../arp.c:618
+msgid ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <hostname> <if> [netmask <nm>] pub      "
+"<-''-\n"
+"\n"
+msgstr ""
+"  arp [-v]   [<HW>] [-i <if>] -Ds <máquina>  <if> [netmask <nm>] pub      "
+"<-''-\n"
+
+#: ../arp.c:620
+msgid ""
+"        -a                       display (all) hosts in alternative (BSD) "
+"style\n"
+msgstr ""
+"        -a               mostra (todas as) máquinas no estilo alternativo "
+"(BSD)\n"
+
+#: ../arp.c:621
+msgid "        -s, --set                set a new ARP entry\n"
+msgstr "        -s, --set                define uma nova entrada ARP\n"
+
+#: ../arp.c:622
+msgid "        -d, --delete             delete a specified entry\n"
+msgstr "        -d, --delete             remove a entrada especificada\n"
+
+#: ../arp.c:623 ../netstat.c:1436 ../route.c:85
+msgid "        -v, --verbose            be verbose\n"
+msgstr "        -v, --verbose           listagem detalhada\n"
+
+#: ../arp.c:624 ../netstat.c:1437 ../route.c:86
+msgid "        -n, --numeric            dont resolve names\n"
+msgstr "        -n, --numeric           não resolve nomes\n"
+
+#: ../arp.c:625
+msgid ""
+"        -i, --device             specify network interface (e.g. eth0)\n"
+msgstr ""
+"        -i, --device             especifica a interface de rede (ex: eth0)\n"
+
+#: ../arp.c:626
+msgid "        -D, --use-device         read <hwaddr> from given device\n"
+msgstr "        -D, --use-device         leia <hwaddr> de um dispositivo\n"
+
+#: ../arp.c:627
+msgid "        -A, -p, --protocol       specify protocol family\n"
+msgstr "        -A, -p, --protocol       especifica a família de protocolos\n"
+
+#: ../arp.c:628
+msgid ""
+"        -f, --file               read new entries from file or from "
+"/etc/ethers\n"
+"\n"
+msgstr ""
+"        -f, --file             leia novas entradas de arquivo ou de "
+"/etc/ethers\n"
+"\n"
+
+#: ../arp.c:630 ../rarp.c:181
+#, c-format
+msgid "  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"
+msgstr ""
+" <HW>=Use '-H <hw>' para especificar o tipo de endereço de hw. Default: %s\n"
+
+#: ../arp.c:631 ../rarp.c:182
+msgid "  List of possible hardware types (which support ARP):\n"
+msgstr "  Lista dos tipos de hardware possíveis (que suportam ARP):\n"
+
+#: ../arp.c:664
+#, c-format
+msgid "%s: hardware type not supported!\n"
+msgstr "%s: tipo de hardware não suportado!\n"
+
+#: ../arp.c:668
+#, c-format
+msgid "%s: address family not supported!\n"
+msgstr "%s: família de endereços não suportada!\n"
+
+#: ../arp.c:703
+msgid "arp: -N not yet supported.\n"
+msgstr "arp: -N ainda não suportada.\n"
+
+#: ../arp.c:713
+#, c-format
+msgid "arp: %s: unknown address family.\n"
+msgstr "arp: %s: família de endereços desconhecida.\n"
+
+#: ../arp.c:722
+#, c-format
+msgid "arp: %s: unknown hardware type.\n"
+msgstr "arp: %s: tipo de hardware desconhecido.\n"
+
+#: ../arp.c:741
+#, c-format
+msgid "arp: %s: kernel only supports 'inet'.\n"
+msgstr "arp: %s: kernel somente suporta ínet'.\n"
+
+#: ../arp.c:746
+#, c-format
+msgid "arp: %s: hardware type without ARP support.\n"
+msgstr "arp: %s: tipo de hardware sem suporte a ARP.\n"
+
+#: ../hostname.c:69
+#, c-format
+msgid "Setting nodename to `%s'\n"
+msgstr "Configurando nome do nó como `%s'\n"
+
+#: ../hostname.c:74
+#, c-format
+msgid "%s: you must be root to change the node name\n"
+msgstr "%s: você deve ser root para mudar o nome do nó\n"
+
+#: ../hostname.c:77 ../hostname.c:97 ../hostname.c:116
+#, c-format
+msgid "%s: name too long\n"
+msgstr "%s: nome muito longo\n"
+
+#: ../hostname.c:89
+#, c-format
+msgid "Setting hostname to `%s'\n"
+msgstr "Configurando nome da máquina para `%s'\n"
+
+#: ../hostname.c:94
+#, c-format
+msgid "%s: you must be root to change the host name\n"
+msgstr "%s: você deve ser root para mudar o nome da máquina\n"
+
+#: ../hostname.c:108
+#, c-format
+msgid "Setting domainname to `%s'\n"
+msgstr "Configurando nome do domínio para `%s'\n"
+
+#: ../hostname.c:113
+#, c-format
+msgid "%s: you must be root to change the domain name\n"
+msgstr "%s: você deve ser root para mudar o nome do domínio\n"
+
+#: ../hostname.c:131
+#, c-format
+msgid "Resolving `%s' ...\n"
+msgstr "Resolvendo `%s'...\n"
+
+#: ../hostname.c:137
+#, c-format
+msgid "Result: h_name=`%s'\n"
+msgstr "Resultado: h_name=`%s'\n"
+
+#: ../hostname.c:142
+#, c-format
+msgid "Result: h_aliases=`%s'\n"
+msgstr "Resultado: h_aliases=`%s'\n"
+
+#: ../hostname.c:147
+#, c-format
+msgid "Result: h_addr_list=`%s'\n"
+msgstr "Resultado: h_addr_list=`%s'\n"
+
+#: ../hostname.c:209
+#, c-format
+msgid "%s: can't open `%s'\n"
+msgstr "%s: não foi possível abrir `%s'\n"
+
+#: ../hostname.c:223
+msgid "Usage: hostname [-v] {hostname|-F file}      set hostname (from file)\n"
+msgstr ""
+"Uso: hostname [-v] {máquina|-F arquivo}       configura nome da máquina (de "
+"arquivo)\n"
+
+#: ../hostname.c:224
+msgid ""
+"       domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)\n"
+msgstr ""
+"       domainname [-v] {domínio_nis|-F file} configura nome do domínio NIS\n"
+"                                             (a partir de arquivo)\n"
+
+#: ../hostname.c:226
+msgid ""
+"       nodename [-v] {nodename|-F file}      set DECnet node name (from "
+"file)\n"
+msgstr ""
+"Uso: hostname [-v] {máquina|-F arquivo}   configura o nome do nó DECnet (de "
+"arquivo)\n"
+
+#: ../hostname.c:228
+msgid "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name\n"
+msgstr "       hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  mostra nome formatado\n"
+
+#: ../hostname.c:229
+msgid ""
+"       hostname [-v]                         display hostname\n"
+"\n"
+msgstr ""
+"     hostname [-v]                            mostra nome da máquina\n"
+"\n"
+
+#: ../hostname.c:230
+msgid ""
+"       hostname -V|--version|-h|--help       print info and exit\n"
+"\n"
+msgstr ""
+"     hostname -V|--version|-h|--help          mostra informações e termina\n"
+"\n"
+
+#: ../hostname.c:231
+msgid ""
+"    dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+msgstr ""
+"    dnsdomainname=máquina -d, {yp,nis,}domainname=hostname -y\n"
+"\n"
+
+#: ../hostname.c:232
+msgid "    -s, --short           short host name\n"
+msgstr "    -s, --short           nome curto da máquina\n"
+
+#: ../hostname.c:233
+msgid "    -a, --alias           alias names\n"
+msgstr "    -a, --alias           aliases para a máquina\n"
+
+#: ../hostname.c:234
+msgid "    -i, --ip-address      addresses for the hostname\n"
+msgstr "    -i, --ip-address      endereços da máquina\n"
+
+#: ../hostname.c:235
+msgid "    -f, --fqdn, --long    long host name (FQDN)\n"
+msgstr "    -f, --fqdn, --long    nome longo da máquina (FQDN)\n"
+
+#: ../hostname.c:236
+msgid "    -d, --domain          DNS domain name\n"
+msgstr "    -d, --domain          nome do domínio DNS\n"
+
+#: ../hostname.c:237
+msgid "    -y, --yp, --nis       NIS/YP domainname\n"
+msgstr "    -y, --yp, --nis       nome do domínio NIS/YP\n"
+
+#: ../hostname.c:239
+msgid "    -n, --node            DECnet node name\n"
+msgstr "    -n, --node            nome do nó DECnet\n"
+
+#: ../hostname.c:241
+msgid ""
+"    -F, --file            read hostname or NIS domainname from given file\n"
+"\n"
+msgstr ""
+"    -F, --file            leia o nome da máquina ou domínio NIS do arquivo\n"
+"\n"
+
+#: ../hostname.c:243
+msgid ""
+"   This command can read or set the hostname or the NIS domainname. You can\n"
+"   also read the DNS domain or the FQDN (fully qualified domain name).\n"
+"   Unless you are using bind or NIS for host lookups you can change the\n"
+"   FQDN (Fully Qualified Domain Name) and the DNS domain name (which is\n"
+"   part of the FQDN) in the /etc/hosts file.\n"
+msgstr ""
+"   Este comando pode ler ou configurar o nome da máquina ou o domínio NIS.\n"
+"   Você também pode ler o domínio DNS ou o FQDN (nome de domínio completa-\n"
+"   mente qualificado). A menos que você esteja usando bind ou NIS para as\n"
+"   resoluções de nome é possível mudar o FQDN e o nome do domínio DNS (que \n"
+"   é parte do FQDN) no arquivo /etc/hosts.\n"
+
+#: ../hostname.c:338
+#, c-format
+msgid "%s: You can't change the DNS domain name with this command\n"
+msgstr "%s: Você não pode mudar o nome do domínio DNS com este comando\n"
+
+#: ../hostname.c:339
+msgid ""
+"\n"
+"Unless you are using bind or NIS for host lookups you can change the DNS\n"
+msgstr ""
+"\n"
+"A menos que esteja usando bind ou NIS para resolução de nomes você pode "
+"mudar\n"
+
+#: ../hostname.c:340
+msgid "domain name (which is part of the FQDN) in the /etc/hosts file.\n"
+msgstr "o nome do domínio DNS (que é parte do FQDN) no arquivo /etc/hosts.\n"
+
+#: ../hostname.c:357
+#, c-format
+msgid "gethostname()=`%s'\n"
+msgstr "gethostname()=`%s'\n"
+
+#: ../hostname.c:374
+#, c-format
+msgid "getdomainname()=`%s'\n"
+msgstr "getdomainname()=`%s'\n"
+
+#: ../hostname.c:389
+#, c-format
+msgid "getnodename()=`%s'\n"
+msgstr "getnodename()=`%s'\n"
+
+#: ../ifconfig.c:159
+#, c-format
+msgid "%-9.9s Link encap:%s  "
+msgstr "%-9.9s  Encapsulamento do Link: %s  "
+
+#: ../ifconfig.c:164
+#, c-format
+msgid "HWaddr %s  "
+msgstr "Endereço de HW %s  "
+
+#: ../ifconfig.c:167
+#, c-format
+msgid "Media:%s"
+msgstr "Mídia:%s"
+
+#: ../ifconfig.c:169
+msgid "(auto)"
+msgstr "(auto)"
+
+#: ../ifconfig.c:176
+#, c-format
+msgid "          %s addr:%s "
+msgstr "          %s end.: %s "
+
+#: ../ifconfig.c:179
+#, c-format
+msgid " P-t-P:%s "
+msgstr " P-a-P:%s "
+
+#: ../ifconfig.c:182
+#, c-format
+msgid " Bcast:%s "
+msgstr " Bcast:%s "
+
+#: ../ifconfig.c:184
+#, c-format
+msgid " Mask:%s\n"
+msgstr " Masc:%s\n"
+
+#: ../ifconfig.c:201
+#, c-format
+msgid "          inet6 addr: %s/%d"
+msgstr "          endereço inet6: %s/%d"
+
+#: ../ifconfig.c:203
+msgid " Scope:"
+msgstr " Escopo:"
+
+#: ../ifconfig.c:206
+msgid "Global"
+msgstr "Global"
+
+#: ../ifconfig.c:209
+msgid "Link"
+msgstr "Link"
+
+#: ../ifconfig.c:212
+msgid "Site"
+msgstr "Site"
+
+#: ../ifconfig.c:215
+msgid "Compat"
+msgstr "Compat"
+
+#: ../ifconfig.c:218
+msgid "Host"
+msgstr "Máquina"
+
+#: ../ifconfig.c:221
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../ifconfig.c:236
+#, c-format
+msgid "          IPX/Ethernet II addr:%s\n"
+msgstr "      Endereço IPX/Ethernet II:%s\n"
+
+#: ../ifconfig.c:239
+#, c-format
+msgid "          IPX/Ethernet SNAP addr:%s\n"
+msgstr "      Endereço IPX/Ethernet SNAP:%s\n"
+
+#: ../ifconfig.c:242
+#, c-format
+msgid "          IPX/Ethernet 802.2 addr:%s\n"
+msgstr "      Endereço IPX/Ethernet 802.2:%s\n"
+
+#: ../ifconfig.c:245
+#, c-format
+msgid "          IPX/Ethernet 802.3 addr:%s\n"
+msgstr "      Endereço IPX/Ethernet 802.3:%s\n"
+
+#: ../ifconfig.c:255
+#, c-format
+msgid "          EtherTalk Phase 2 addr:%s\n"
+msgstr "          Endereço EtherTalk fase 2:%s\n"
+
+#: ../ifconfig.c:264
+#, c-format
+msgid "          econet addr:%s\n"
+msgstr "          Endereço econet:%s\n"
+
+#: ../ifconfig.c:270
+msgid "[NO FLAGS] "
+msgstr "[NENHUMA FLAG] "
+
+#: ../ifconfig.c:272
+msgid "UP "
+msgstr "UP "
+
+#: ../ifconfig.c:274
+msgid "BROADCAST "
+msgstr "BROADCAST"
+
+#: ../ifconfig.c:276
+msgid "DEBUG "
+msgstr "DEBUG "
+
+#: ../ifconfig.c:278
+msgid "LOOPBACK "
+msgstr "LOOPBACK"
+
+#: ../ifconfig.c:280
+msgid "POINTOPOINT "
+msgstr "POINTOPOINT "
+
+#: ../ifconfig.c:282
+msgid "NOTRAILERS "
+msgstr "NOTRAILERS "
+
+#: ../ifconfig.c:284
+msgid "RUNNING "
+msgstr "RUNNING "
+
+#: ../ifconfig.c:286
+msgid "NOARP "
+msgstr "NOARP "
+
+#: ../ifconfig.c:288
+msgid "PROMISC "
+msgstr "PROMISC "
+
+#: ../ifconfig.c:290
+msgid "ALLMULTI "
+msgstr "ALLMULTI "
+
+#: ../ifconfig.c:292
+msgid "SLAVE "
+msgstr "SLAVE "
+
+#: ../ifconfig.c:294
+msgid "MASTER "
+msgstr "MASTER "
+
+#: ../ifconfig.c:296
+msgid "MULTICAST "
+msgstr "MULTICAST "
+
+#: ../ifconfig.c:299
+msgid "DYNAMIC "
+msgstr "DYNAMIC "
+
+#: ../ifconfig.c:302
+#, c-format
+msgid " MTU:%d  Metric:%d"
+msgstr " MTU:%d  Métrica:%d"
+
+#: ../ifconfig.c:306
+#, c-format
+msgid "  Outfill:%d  Keepalive:%d"
+msgstr "  Outfill:%d  Keepalive:%d"
+
+#: ../ifconfig.c:320
+#, c-format
+msgid "RX packets:%lu errors:%lu dropped:%lu overruns:%lu frame:%lu\n"
+msgstr "Pacotes RX:%lu erros:%lu descartados:%lu sobreposições:%lu frame:%lu\n"
+
+#: ../ifconfig.c:325
+#, c-format
+msgid "             compressed:%lu\n"
+msgstr "             compactados:%lu\n"
+
+#: ../ifconfig.c:329
+#, c-format
+msgid "TX packets:%lu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n"
+msgstr ""
+"Pacotes TX:%lu erros:%lu descartados:%lu sobreposições:%lu portadora:%lu\n"
+
+#: ../ifconfig.c:333
+#, c-format
+msgid "          collisions:%lu "
+msgstr "          colisões:%lu "
+
+#: ../ifconfig.c:335
+#, c-format
+msgid "compressed:%lu "
+msgstr "compactados:%lu "
+
+#: ../ifconfig.c:337
+#, c-format
+msgid "txqueuelen:%d "
+msgstr "txqueuelen:%d "
+
+#: ../ifconfig.c:345
+#, c-format
+msgid "Interrupt:%d "
+msgstr "IRQ:%d "
+
+#. Only print devices using it for
+#. I/O maps
+#: ../ifconfig.c:348
+#, c-format
+msgid "Base address:0x%x "
+msgstr "Endereço de E/S:0x%x "
+
+#: ../ifconfig.c:350
+#, c-format
+msgid "Memory:%lx-%lx "
+msgstr "Memória:%lx-%lx "
+
+#: ../ifconfig.c:353
+#, c-format
+msgid "DMA chan:%x "
+msgstr "Canal DMA:%x "
+
+#: ../ifconfig.c:384 ../ifconfig.c:405
+#, c-format
+msgid "%s: unknown interface: %s\n"
+msgstr "%s: interface desconhecida: %s\n"
+
+#: ../ifconfig.c:421
+msgid ""
+"Usage:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <address>]\n"
+msgstr ""
+"Uso:\n"
+"  ifconfig [-a] [-i] [-v] <interface> [[<AF>] <endereço>]\n"
+
+#: ../ifconfig.c:425
+msgid "  [add <address>[/<prefixlen>]]\n"
+msgstr "  [add <endereço>[/<tam_prefixo>]]\n"
+
+#: ../ifconfig.c:427
+msgid "  [del <address>[/<prefixlen>]]\n"
+msgstr "  [del <endereço>[/<tam_prefixo>]]\n"
+
+#: ../ifconfig.c:432
+msgid "  [[-]broadcast [<address>]]  [[-]pointopoint [<address>]]\n"
+msgstr "  [[-]broadcast [<endereço>]]  [[-]pointopoint [<endereço>]]\n"
+
+#: ../ifconfig.c:433
+msgid "  [netmask <address>]  [dstaddr <address>]  [tunnel <address>]\n"
+msgstr "  [netmask <endereço>]  [dstaddr <endereço>]  [tunnel <endereço>]\n"
+
+#: ../ifconfig.c:436
+msgid "  [outfill <NN>] [keepalive <NN>]\n"
+msgstr "  [outfill <NN>] [keepalive <NN>]\n"
+
+#: ../ifconfig.c:438
+msgid "  [hw <HW> <address>]  [metric <NN>]  [mtu <NN>]\n"
+msgstr "  [hw <HW> <endereço>]  [metric <NN>]  [mtu <NN>]\n"
+
+#: ../ifconfig.c:439
+msgid "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+msgstr "  [[-]trailers]  [[-]arp]  [[-]allmulti]\n"
+
+#: ../ifconfig.c:440
+msgid "  [multicast]  [[-]promisc]\n"
+msgstr "  [multicast]  [[-]promisc]\n"
+
+#: ../ifconfig.c:441
+msgid "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <type>]\n"
+msgstr "  [mem_start <NN>]  [io_addr <NN>]  [irq <NN>]  [media <tipo>]\n"
+
+#: ../ifconfig.c:443
+msgid "  [txqueuelen <NN>]\n"
+msgstr "  [txqueuelen <NN>]\n"
+
+#: ../ifconfig.c:446
+msgid "  [[-]dynamic]\n"
+msgstr "  [[-]dynamic]\n"
+
+#: ../ifconfig.c:448
+msgid ""
+"  [up|down] ...\n"
+"\n"
+msgstr ""
+"  [up|down] ...\n"
+"\n"
+
+#: ../ifconfig.c:450
+msgid "  <HW>=Hardware Type.\n"
+msgstr "  <HW>=Tipo de Hardware.\n"
+
+#: ../ifconfig.c:451
+msgid "  List of possible hardware types:\n"
+msgstr "  Lista dos tipos possíveis de hardware:\n"
+
+#. 1 = ARPable
+#: ../ifconfig.c:453
+#, c-format
+msgid "  <AF>=Address family. Default: %s\n"
+msgstr "  <AF>=Família de endereços. Default: %s\n"
+
+#: ../ifconfig.c:454
+msgid "  List of possible address families:\n"
+msgstr "  Lista de famílias de endereços possíveis:\n"
+
+#: ../ifconfig.c:593
+msgid "Unknown media type.\n"
+msgstr "Tipo desconhecido de mídia.\n"
+
+#: ../ifconfig.c:881
+#, c-format
+msgid "%s: invalid %s address.\n"
+msgstr "%s: endereço %s inválido.\n"
+
+#: ../ifconfig.c:920 ../ifconfig.c:963 ../ifconfig.c:1011
+msgid "No support for INET6 on this system.\n"
+msgstr "Este sistema não tem suporte a INET6.\n"
+
+#: ../ifconfig.c:983
+msgid "Address deletion not supported on this system.\n"
+msgstr "Remoção de endereço não suportada neste sistema.\n"
+
+#: ../ifconfig.c:1066
+msgid "No support for INET on this system.\n"
+msgstr "Este sistema não tem suporte a INET.\n"
+
+#: ../ifconfig.c:1076
+msgid "No support for ECONET on this system.\n"
+msgstr "Este sistema não tem suporte a ECONET.\n"
+
+#: ../ifconfig.c:1084
+#, c-format
+msgid "Don't know how to set addresses for family %d.\n"
+msgstr "Não sei como configurar endereços para a família %d.\n"
+
+#: ../netstat.c:383
+#, c-format
+msgid ""
+"(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n"
+msgstr ""
+"(Não foi possível ler informações para \"-p\": geteuid()=%d mas você deve "
+"ser root.)\n"
+
+#: ../netstat.c:387
+msgid ""
+"(Not all processes could be identified, non-owned process info\n"
+" will not be shown, you would have to be root to see it all.)\n"
+msgstr ""
+"(Nem todos os processos puderam ser identificados, informações sobre "
+"processos\n"
+" de outrem não serão mostrados, você deve ser root para vê-los todos.)\n"
+
+#: ../netstat.c:394 ../netstat.c:1089 ../netstat.c:1166
+msgid "LISTENING"
+msgstr "OUVINDO"
+
+#: ../netstat.c:395
+msgid "CONN SENT"
+msgstr "CONN ENVIADO"
+
+#: ../netstat.c:396 ../netstat.c:1168
+msgid "DISC SENT"
+msgstr "DISC ENVIADO"
+
+#: ../netstat.c:397 ../netstat.c:464 ../netstat.c:809 ../netstat.c:1169
+msgid "ESTABLISHED"
+msgstr "ESTABELECIDA"
+
+#: ../netstat.c:419
+msgid "Active NET/ROM sockets\n"
+msgstr "Ative sockets NET/ROM\n"
+
+#: ../netstat.c:420
+msgid ""
+"User       Dest       Source     Device  State        Vr/Vs    Send-Q  "
+"Recv-Q\n"
+msgstr ""
+"Usuário    Destino    Origem  Dispositivo Estado      Vr/Vs  Send-Q  Recv-Q\n"
+
+#: ../netstat.c:430 ../netstat.c:1208
+#, c-format
+msgid "Problem reading data from %s\n"
+msgstr "Problemas lendo dados de %s\n"
+
+#: ../netstat.c:465
+msgid "SYN_SENT"
+msgstr "SYN_ENVIADO"
+
+#: ../netstat.c:466
+msgid "SYN_RECV"
+msgstr "SYN_RECEBIDO"
+
+#: ../netstat.c:467
+msgid "FIN_WAIT1"
+msgstr "ESPERA_FIN1"
+
+#: ../netstat.c:468
+msgid "FIN_WAIT2"
+msgstr "ESPERA_FIN2"
+
+#: ../netstat.c:469
+msgid "TIME_WAIT"
+msgstr "TIME_WAIT"
+
+#: ../netstat.c:470
+msgid "CLOSE"
+msgstr "FECHAR"
+
+#: ../netstat.c:471
+msgid "CLOSE_WAIT"
+msgstr "ESPERANDO_FECHAR"
+
+#: ../netstat.c:472
+msgid "LAST_ACK"
+msgstr "ÚLTIMO_ACK"
+
+#: ../netstat.c:473
+msgid "LISTEN"
+msgstr "OUÇA"
+
+#: ../netstat.c:474
+msgid "CLOSING"
+msgstr "FECHANDO"
+
+#: ../netstat.c:544
+#, c-format
+msgid "warning, got bogus igmp6 line %d.\n"
+msgstr "atenção, recebi linha igmp6 inválida %d.\n"
+
+#: ../netstat.c:549 ../netstat.c:587 ../netstat.c:670 ../netstat.c:803
+#: ../netstat.c:935 ../netstat.c:940
+#, c-format
+msgid "netstat: unsupported address family %d !\n"
+msgstr "netstat: família de protocolos %d não suportada!\n"
+
+#: ../netstat.c:562 ../netstat.c:567 ../netstat.c:575 ../netstat.c:582
+#, c-format
+msgid "warning, got bogus igmp line %d.\n"
+msgstr "atenção, recebi linha igmp inválida %d.\n"
+
+#: ../netstat.c:666
+msgid "warning, got bogus tcp line.\n"
+msgstr "atenção, recebi linha tcp inválida.\n"
+
+#: ../netstat.c:704 ../netstat.c:855 ../netstat.c:975
+#, c-format
+msgid "off (0.00/%ld/%d)"
+msgstr "desligado (0.00/%ld/%ld)"
+
+#: ../netstat.c:708
+#, c-format
+msgid "on (%2.2f/%ld/%d)"
+msgstr "em (%2.2f/%ld/%d)"
+
+#: ../netstat.c:713
+#, c-format
+msgid "keepalive (%2.2f/%ld/%d)"
+msgstr "keepalive (%2.2f/%ld/%d)"
+
+#: ../netstat.c:718
+#, c-format
+msgid "timewait (%2.2f/%ld/%d)"
+msgstr "timewait (%2.2f/%ld/%d)"
+
+#: ../netstat.c:723 ../netstat.c:864 ../netstat.c:985
+#, c-format
+msgid "unkn-%d (%2.2f/%ld/%d)"
+msgstr "desconh.-%d (%2.2f/%ld)"
+
+#: ../netstat.c:799
+msgid "warning, got bogus udp line.\n"
+msgstr "atenção, recebi linha udp inválida.\n"
+
+#: ../netstat.c:817 ../netstat.c:1075 ../netstat.c:1108
+msgid "UNKNOWN"
+msgstr "DESCONHECIDA"
+
+#: ../netstat.c:860 ../netstat.c:980
+#, c-format
+msgid "on%d (%2.2f/%ld/%d)"
+msgstr "ligado %d (%2.2f/%ld)"
+
+#: ../netstat.c:949
+msgid "warning, got bogus raw line.\n"
+msgstr "atenção, recebi linha raw inválida.\n"
+
+#: ../netstat.c:1028
+msgid "warning, got bogus unix line.\n"
+msgstr "atenção, recebi linha unix inválida.\n"
+
+#: ../netstat.c:1055
+msgid "STREAM"
+msgstr "STREAM"
+
+#: ../netstat.c:1059
+msgid "DGRAM"
+msgstr "DGRAM"
+
+#: ../netstat.c:1063
+msgid "RAW"
+msgstr "RAW"
+
+#: ../netstat.c:1067
+msgid "RDM"
+msgstr "RDM"
+
+#: ../netstat.c:1071
+msgid "SEQPACKET"
+msgstr "SEQPACKET"
+
+#: ../netstat.c:1080
+msgid "FREE"
+msgstr "LIVRE"
+
+#: ../netstat.c:1096
+msgid "CONNECTING"
+msgstr "CONECTANDO"
+
+#: ../netstat.c:1100
+msgid "CONNECTED"
+msgstr "CONECTADO"
+
+#: ../netstat.c:1104
+msgid "DISCONNECTING"
+msgstr "DESCONECTANDO"
+
+#: ../netstat.c:1135
+msgid "Active UNIX domain sockets "
+msgstr "Domain sockets UNIX ativos "
+
+#: ../netstat.c:1137 ../netstat.c:1666
+msgid "(servers and established)"
+msgstr "(servidores e estabelecidas)"
+
+#: ../netstat.c:1140 ../netstat.c:1669
+msgid "(only servers)"
+msgstr "(sem os servidores)"
+
+#: ../netstat.c:1142 ../netstat.c:1671
+msgid "(w/o servers)"
+msgstr "(sem os servidores)"
+
+#: ../netstat.c:1145
+msgid ""
+"\n"
+"Proto RefCnt Flags       Type       State         I-Node"
+msgstr ""
+"\n"
+"Proto CntRef Flags       Tipo       Estado        I-Node Rota"
+
+#: ../netstat.c:1147
+msgid " Path\n"
+msgstr " Caminho\n"
+
+#: ../netstat.c:1167
+msgid "SABM SENT"
+msgstr "SABM ENVIADO"
+
+#: ../netstat.c:1170
+msgid "RECOVERY"
+msgstr "RECUPERAÇÃO"
+
+#: ../netstat.c:1184
+msgid "Active AX.25 sockets\n"
+msgstr "Ativar sockets AX.25\n"
+
+#: ../netstat.c:1185
+msgid "Dest       Source     Device  State        Vr/Vs    Send-Q  Recv-Q\n"
+msgstr "Destino    Origem Dispositivo Estado       Vr/Vs  Send-Q  Recv-Q\n"
+
+#: ../netstat.c:1228
+#, c-format
+msgid "problem reading data from %s\n"
+msgstr "problemas lendo dados de %s\n"
+
+#: ../netstat.c:1279
+msgid ""
+"Active IPX sockets\n"
+"Proto Recv-Q Send-Q Local Address              Foreign Address            "
+"State"
+msgstr ""
+"Sockets IPX ativos\n"
+"Proto Recv-Q Send-Q Endereço Local             Endereço Remoto           "
+"Estado"
+
+#: ../netstat.c:1281
+msgid " User"
+msgstr " Usuário"
+
+#: ../netstat.c:1315
+msgid "ESTAB"
+msgstr "ESTAB"
+
+#: ../netstat.c:1323
+msgid "UNK."
+msgstr "DESC."
+
+#: ../netstat.c:1367
+msgid "     - no statistics available -"
+msgstr "     - estatísticas não disponíveis -"
+
+#: ../netstat.c:1370
+msgid "[NO FLAGS]"
+msgstr "[SEM FLAGS]"
+
+#: ../netstat.c:1400
+msgid "Kernel Interface table\n"
+msgstr "Tabela de Interfaces do Kernel\n"
+
+#: ../netstat.c:1401
+msgid ""
+"Iface   MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR "
+"Flg\n"
+msgstr ""
+"Iface     MTU Met  RX-OK RX-ERR RX-DRP RX-OVR  TX-OK TX-ERR TX-DRP TX-OV "
+"Opções\n"
+
+#: ../netstat.c:1404
+msgid "missing interface information"
+msgstr "falta informação da interface"
+
+#: ../netstat.c:1425
+msgid ""
+"usage: netstat [-veenNcCF] [<Af>] -r         netstat "
+"{-V|--version|-h|--help}\n"
+msgstr ""
+"uso: netstat [-veenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}\n"
+
+#: ../netstat.c:1426
+msgid "       netstat [-vnNcaeol] [<Socket> ...]\n"
+msgstr "     netstat [-vnNcaeo] [<Socket>]\n"
+
+#: ../netstat.c:1427
+msgid ""
+"       netstat { [-veenNac] -i | [-cnNe] -M | -s }\n"
+"\n"
+msgstr "     netstat [-vnNcaeo] [<Socket>]\n"
+
+#: ../netstat.c:1429
+msgid "        -r, --route              display routing table\n"
+msgstr "        -r, --route             mostra tabela de roteamento\n"
+
+#: ../netstat.c:1430
+msgid "        -i, --interfaces         display interface table\n"
+msgstr "        -i, --interfaces        mostra tabela de interfaces\n"
+
+#: ../netstat.c:1431
+msgid "        -g, --groups             display multicast group memberships\n"
+msgstr ""
+"        -o, --timers            mostra temporizadores\n"
+"\n"
+
+#: ../netstat.c:1432
+msgid ""
+"        -s, --statistics         display networking statistics (like SNMP)\n"
+msgstr "        -i, --interfaces        mostra tabela de interfaces\n"
+
+#: ../netstat.c:1434
+msgid ""
+"        -M, --masquerade         display masqueraded connections\n"
+"\n"
+msgstr ""
+"        -M, --masquerade        mostra conexões mascaradas\n"
+"\n"
+
+#: ../netstat.c:1438 ../route.c:87
+msgid "        -N, --symbolic           resolve hardware names\n"
+msgstr "        -n, --numeric           não resolve nomes\n"
+
+#: ../netstat.c:1439 ../route.c:88
+msgid "        -e, --extend             display other/more information\n"
+msgstr "        -e, --extend             mostra outras/mais informações\n"
+
+#: ../netstat.c:1440
+msgid "        -p, --programs           display PID/Program name for sockets\n"
+msgstr "        -r, --route             mostra tabela de roteamento\n"
+
+#: ../netstat.c:1441
+msgid ""
+"        -c, --continuous         continuous listing\n"
+"\n"
+msgstr ""
+"        -c, --continuous        listagem contínua\n"
+"\n"
+
+#: ../netstat.c:1442
+msgid "        -l, --listening          display listening server sockets\n"
+msgstr "        -L, --netlink           mostra mensagens netlink do kernel\n"
+
+#: ../netstat.c:1443
+msgid ""
+"        -a, --all, --listening   display all sockets (default: connected)\n"
+msgstr "        -a, --all, --listening  mostra tudo\n"
+
+#: ../netstat.c:1444
+msgid "        -o, --timers             display timers\n"
+msgstr ""
+"        -o, --timers            mostra temporizadores\n"
+"\n"
+
+#: ../netstat.c:1445 ../route.c:89
+msgid ""
+"        -F, --fib                display Forwarding Information Base "
+"(default)\n"
+msgstr ""
+"        -F, --fib             mostra a Base de Informações de Repasse "
+"(default)\n"
+
+#: ../netstat.c:1446 ../route.c:90
+msgid ""
+"        -C, --cache              display routing cache instead of FIB\n"
+"\n"
+msgstr ""
+"        -C, --cache              mostra cache de roteamento no lugar da FIB\n"
+"\n"
+
+#: ../netstat.c:1448
+msgid ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+msgstr ""
+"  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx "
+"--netrom\n"
+
+#: ../netstat.c:1449 ../route.c:92
+#, c-format
+msgid "  <AF>=Use '-A <af>' or '--<af>' Default: %s\n"
+msgstr "  <AF>=Use '-A <af>' ou [--<af>' Default: %s\n"
+
+#: ../netstat.c:1450 ../route.c:93
+msgid "  List of possible address families (which support routing):\n"
+msgstr ""
+"  Lista das famílias de endereços possíveis (que suportam roteamento):\n"
+
+#: ../netstat.c:1663
+msgid "Active Internet connections "
+msgstr "Conexões Internet Ativas "
+
+#: ../netstat.c:1673
+msgid ""
+"\n"
+"Proto Recv-Q Send-Q Local Address           Foreign Address         State    "
+"  "
+msgstr ""
+"\n"
+"Proto Recv-Q Send-Q Endereço Local          Endereço Remoto         Estado   "
+"  "
+
+#: ../netstat.c:1675
+msgid " User       Inode     "
+msgstr " Usuário   "
+
+#: ../netstat.c:1678
+msgid " Timer"
+msgstr " Temporizador"
+
+#: ../netstat.c:1708
+msgid "IPv4 Group Memberships\n"
+msgstr "IPv4 Group Memberships\n"
+
+#: ../netstat.c:1709
+msgid "Interface       RefCnt Group\n"
+msgstr "Interface       CntRef Grupo\n"
+
+#: ../rarp.c:43
+msgid "This kernel does not support RARP.\n"
+msgstr "Este kernel não tem suporte a RARP.\n"
+
+#: ../rarp.c:82
+#, c-format
+msgid "no RARP entry for %s.\n"
+msgstr "Sem entrada RARP para %s.\n"
+
+#: ../rarp.c:95
+#, c-format
+msgid "%s: bad hardware address\n"
+msgstr "%s: endereço de hardware inválido\n"
+
+#: ../rarp.c:127
+#, c-format
+msgid "rarp: cannot open file %s:%s.\n"
+msgstr "rarp: não foi possível abrir o arquivo %s:%s.\n"
+
+#: ../rarp.c:139
+#, c-format
+msgid "rarp: format error at %s:%u\n"
+msgstr "rarp: erro de formato em %s:%u\n"
+
+#: ../rarp.c:143 ../rarp.c:287
+#, c-format
+msgid "rarp: %s: unknown host\n"
+msgstr "rarp: %s: máquina desconhecida\n"
+
+#: ../rarp.c:146
+#, c-format
+msgid "rarp: cannot set entry from %s:%u\n"
+msgstr "rarp: não é possível incluir uma entrada para %s:%u\n"
+
+#: ../rarp.c:175
+msgid "Usage: rarp -a                               list entries in cache.\n"
+msgstr ""
+"Uso: rarp -a                                   lista entradas no cache\n"
+
+#: ../rarp.c:176
+msgid "       rarp -d <hostname>                    delete entry from cache.\n"
+msgstr ""
+"     rarp -d máquina                           remove entrada do cache\n"
+
+#: ../rarp.c:177
+msgid "       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"
+msgstr ""
+"     rarp [-t tipo-hw] -s máquina endereço-hw  adiciona entrada ao cache\n"
+
+#: ../rarp.c:178
+msgid ""
+"       rarp -f                               add entries from /etc/ethers.\n"
+msgstr ""
+"       rarp -f                               adiciona entradas a partir do\n"
+"                                             arquivo ethers.\n"
+
+#: ../rarp.c:179
+msgid ""
+"       rarp -V                               display program version.\n"
+"\n"
+msgstr ""
+"     rarp -V                                   mostra versão do programa\n"
+
+#: ../rarp.c:236
+#, c-format
+msgid "%s: illegal option mix.\n"
+msgstr "%s: mistura ilegal de opções.\n"
+
+#: ../rarp.c:267
+#, c-format
+msgid "rarp: %s: unknown hardware type.\n"
+msgstr "rarp: %s: tipo desconhecido de hardware.\n"
+
+#: ../route.c:79
+msgid ""
+"Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"
+msgstr ""
+"Uso: route [-nNvee] [-FC] [famílias_de_endereços]  Lista as tabelas de "
+"rotea-\n"
+"                                                   mento do kernel\n"
+
+#: ../route.c:80
+msgid ""
+"       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n"
+"\n"
+msgstr ""
+"       route [-v] [-FC] {add|del|flush} ...        Modifica tabela de "
+"rotea-\n"
+"                                                   mento da família.\n"
+"\n"
+
+#: ../route.c:82
+msgid ""
+"       route {-h|--help} [<AF>]              Detailed usage syntax for "
+"specified AF.\n"
+msgstr ""
+"       route {-h|--help} [família_de_endereços]    Sintaxe para a AF "
+"(Família\n"
+"                                                   de endereços) "
+"espeficicada.\n"
+
+#: ../route.c:83
+msgid ""
+"       route {-V|--version}                  Display version/author and "
+"exit.\n"
+"\n"
+msgstr ""
+"       route {-V|--version}                        Mostra a versão do "
+"comando\n"
+"                                                   e sai.\n"
+
+#: ../plipconfig.c:66
+msgid "Usage: plipconfig [-a] [-i] [-v] interface\n"
+msgstr "Uso: ifconfig [-a] [-i] [-v] interface\n"
+
+#: ../plipconfig.c:67
+msgid "                  [nibble NN] [trigger NN]\n"
+msgstr "                [[família] endereço]\n"
+
+#: ../plipconfig.c:68
+msgid "       plipconfig -V | --version\n"
+msgstr "       plipconfig -V | --version\n"
+
+#: ../plipconfig.c:74
+#, c-format
+msgid "%s\tnibble %lu  trigger %lu\n"
+msgstr "%s\tnibble %lu  trigger %lu\n"
+
+#: ../iptunnel.c:79
+msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n"
+msgstr "Uso: iptunnel { add | change | del | show } [ NOME ]\n"
+
+#: ../iptunnel.c:80
+msgid ""
+"          [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n"
+msgstr ""
+"          [ mode { ipip | gre | sit } ] [ remote END ] [ local END ]\n"
+
+#: ../iptunnel.c:81
+msgid "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+msgstr "          [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n"
+
+#: ../iptunnel.c:82
+msgid "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n"
+msgstr "          [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev DISP_FÍSICO ]\n"
+
+#: ../iptunnel.c:83
+msgid ""
+"       iptunnel -V | --version\n"
+"\n"
+msgstr ""
+"       iptunnel -V | --version\n"
+"\n"
+
+#: ../iptunnel.c:84
+msgid "Where: NAME := STRING\n"
+msgstr "Onde: NAME := STRING\n"
+
+#: ../iptunnel.c:85
+msgid "       ADDR := { IP_ADDRESS | any }\n"
+msgstr "       END := { ENDEREÇO_IP | any }\n"
+
+#: ../iptunnel.c:86
+msgid "       TOS  := { NUMBER | inherit }\n"
+msgstr "       TOS  := { NÚMERO | inherit }\n"
+
+#: ../iptunnel.c:87
+msgid "       TTL  := { 1..255 | inherit }\n"
+msgstr "       TTL  := { 1..255 | inherit }\n"
+
+#: ../iptunnel.c:88
+msgid "       KEY  := { DOTTED_QUAD | NUMBER }\n"
+msgstr "       KEY  := { QUATRO_NÚMEROS_SEPARADOS_POR_PONTOS | NÚMERO }\n"
+
+#: ../iptunnel.c:326
+msgid "Keys are not allowed with ipip and sit.\n"
+msgstr "Chaves não são permitidas com ipip e sit.\n"
+
+#: ../iptunnel.c:346
+msgid "Broadcast tunnel requires a source address.\n"
+msgstr "Um túnel de broadcast precisa de um endereço de origem.\n"
+
+#: ../iptunnel.c:361
+msgid "ttl != 0 and noptmudisc are incompatible\n"
+msgstr "ttl != 0 e noptmudisc são incompatíveis\n"
+
+#: ../iptunnel.c:373
+msgid "cannot determine tunnel mode (ipip, gre or sit)\n"
+msgstr "não foi possível determinar o modo do túnel (ip, gre ou sit)\n"
+
+#: ../iptunnel.c:411
+#, c-format
+msgid "%s: %s/ip  remote %s  local %s "
+msgstr "%s: %s/ip  remoto %s  local %s "
+
+#: ../iptunnel.c:415
+msgid "unknown"
+msgstr "Desconhecido"
+
+#: ../iptunnel.c:447
+msgid "  Drop packets out of sequence.\n"
+msgstr "  Descarte pacotes fora de seqüência.\n"
+
+#: ../iptunnel.c:449
+msgid "  Checksum in received packet is required.\n"
+msgstr "  É necessário checksum nos pacotes recebidos.\n"
+
+#: ../iptunnel.c:451
+msgid "  Sequence packets on output.\n"
+msgstr "  Seqüencie pacotes na saída.\n"
+
+#: ../iptunnel.c:453
+msgid "  Checksum output packets.\n"
+msgstr "  Calcule o checksum para pacotes de saída.\n"
+
+#: ../iptunnel.c:481
+msgid "Wrong format of /proc/net/dev. Sorry.\n"
+msgstr "Formato errado de /proc/net/dev. Desculpe.\n"
+
+#: ../iptunnel.c:494
+#, c-format
+msgid "Failed to get type of [%s]\n"
+msgstr "Não foi possível obter o tipo de [%s]\n"
+
+#: ../iptunnel.c:510
+msgid "RX: Packets    Bytes        Errors CsumErrs OutOfSeq Mcasts\n"
+msgstr "RX: Pacotes    Bytes        Erros  CsunErrs ForaSeq  Mcasts\n"
+
+#: ../iptunnel.c:513
+msgid "TX: Packets    Bytes        Errors DeadLoop NoRoute  NoBufs\n"
+msgstr "TX: Pacotes    Bytes        Erros  DeadLoop SemRota  SemBufs\n"
+
+#: ../statistics.c:45
+msgid "ICMP input histogram:"
+msgstr "Histograma de entrada ICMP:"
+
+#: ../statistics.c:46
+msgid "ICMP output histogram:"
+msgstr "Histograma de saída ICMP"
+
+#: ../statistics.c:63
+#, c-format
+msgid "Forwarding is %s"
+msgstr "Repassagem está %s"
+
+#: ../statistics.c:64
+#, c-format
+msgid "Default TTL is %d"
+msgstr "Default TTL é %d"
+
+#: ../statistics.c:65
+#, c-format
+msgid "%d total packets received"
+msgstr "%d total de pacotes recebidos"
+
+#: ../statistics.c:66
+#, c-format
+msgid "%d with invalid headers"
+msgstr "%d com cabeçalhos inválidos"
+
+#: ../statistics.c:67
+#, c-format
+msgid "%d with invalid addresses"
+msgstr "%d com endereços inválidos"
+
+#: ../statistics.c:68
+#, c-format
+msgid "%d forwarded"
+msgstr "%d repassados"
+
+#: ../statistics.c:69
+#, c-format
+msgid "%d with unknown protocol"
+msgstr "%d com protocolo desconhecido"
+
+#: ../statistics.c:70
+#, c-format
+msgid "%d incoming packets discarded"
+msgstr "%d pacotes entrantes descartados"
+
+#: ../statistics.c:71
+#, c-format
+msgid "%d incoming packets delivered"
+msgstr "%d pacotes entrantes despachados"
+
+#: ../statistics.c:72
+#, c-format
+msgid "%d requests sent out"
+msgstr "%d requisições enviadas"
+
+#. ?
+#: ../statistics.c:73
+#, c-format
+msgid "%d outgoing packets dropped"
+msgstr "%d pacotes saintes descartados"
+
+#: ../statistics.c:74
+#, c-format
+msgid "%d dropped because of missing route"
+msgstr "%d descartados devido a falta de rota"
+
+#: ../statistics.c:75
+#, c-format
+msgid "%d fragments dropped after timeout"
+msgstr "%d fragmentos descartados após estouro de tempo"
+
+#: ../statistics.c:76
+#, c-format
+msgid "%d reassemblies required"
+msgstr "%d remontagens requeridas"
+
+#. ?
+#: ../statistics.c:77
+#, c-format
+msgid "%d packets reassembled ok"
+msgstr "%d pacotes remontados sem problemas"
+
+#: ../statistics.c:78
+#, c-format
+msgid "%d packet reassembles failed"
+msgstr "%d remontagens de pacotes falharam"
+
+#: ../statistics.c:79
+#, c-format
+msgid "%d fragments received ok"
+msgstr "%d fragmentos recebidos sem problemas"
+
+#: ../statistics.c:80
+#, c-format
+msgid "%d fragments failed"
+msgstr "%d fragmentos falharam"
+
+#: ../statistics.c:81
+#, c-format
+msgid "%d fragments created"
+msgstr "%d fragmentos criados"
+
+#: ../statistics.c:86
+#, c-format
+msgid "%d ICMP messages received"
+msgstr "%d mensagens ICMP recebidas"
+
+#: ../statistics.c:87
+#, c-format
+msgid "%d input ICMP message failed."
+msgstr "%d mensagens ICMP entrantes falharam."
+
+#: ../statistics.c:88 ../statistics.c:101
+#, c-format
+msgid "destination unreachable: %d"
+msgstr "destino não alcançável: %d"
+
+#: ../statistics.c:89
+#, c-format
+msgid "timeout in transit: %d"
+msgstr "estouro de tempo em trânsito: %d"
+
+#: ../statistics.c:90 ../statistics.c:103
+#, c-format
+msgid "wrong parameters: %d"
+msgstr "parâmetros errados: %d"
+
+#. ?
+#: ../statistics.c:91
+#, c-format
+msgid "source quenchs: %d"
+msgstr "source quenchs: %d"
+
+#: ../statistics.c:92
+#, c-format
+msgid "redirects: %d"
+msgstr "redireções: %d"
+
+#: ../statistics.c:93
+#, c-format
+msgid "echo requests: %d"
+msgstr "requisições de eco: %d"
+
+#: ../statistics.c:94 ../statistics.c:107
+#, c-format
+msgid "echo replies: %d"
+msgstr "respostas de eco: %d"
+
+#: ../statistics.c:95
+#, c-format
+msgid "timestamp request: %d"
+msgstr "requisições de timestamp: %d"
+
+#: ../statistics.c:96
+#, c-format
+msgid "timestamp reply: %d"
+msgstr "respostas a timestamps: %d"
+
+#: ../statistics.c:97
+#, c-format
+msgid "address mask request: %d"
+msgstr "requisições de mascara de endereço: %d"
+
+#. ?
+#: ../statistics.c:98
+msgid "address mask replies"
+msgstr "resposta a mascara de endereço"
+
+#. ?
+#: ../statistics.c:99
+#, c-format
+msgid "%d ICMP messages sent"
+msgstr "%d mensagens ICMP enviadas"
+
+#: ../statistics.c:100
+#, c-format
+msgid "%d ICMP messages failed"
+msgstr "%d mensagens ICMP falharam"
+
+#: ../statistics.c:102
+#, c-format
+msgid "time exceeded: %d"
+msgstr "tempo excedido: %d"
+
+#. ?
+#: ../statistics.c:104
+#, c-format
+msgid "source quench: %d"
+msgstr "source quench: %d"
+
+#: ../statistics.c:105
+#, c-format
+msgid "redirect: %d"
+msgstr "redireções: %d"
+
+#: ../statistics.c:106
+#, c-format
+msgid "echo request: %d"
+msgstr "requisições de eco: %d"
+
+#: ../statistics.c:108
+#, c-format
+msgid "timestamp requests: %d"
+msgstr "requisições de timestamp: %d"
+
+#: ../statistics.c:109
+#, c-format
+msgid "timestamp replies: %d"
+msgstr "respostas a timestamp: %d"
+
+#: ../statistics.c:110
+#, c-format
+msgid "address mask requests: %d"
+msgstr "requisições de máscara de endereço: %d"
+
+#: ../statistics.c:111
+#, c-format
+msgid "address mask replies: %d"
+msgstr "respostas a máscara de endereço: %d"
+
+#: ../statistics.c:116
+#, c-format
+msgid "RTO algorithm is %s"
+msgstr "Algorítmo RTO é %s"
+
+#: ../statistics.c:120
+#, c-format
+msgid "%d active connections openings"
+msgstr "%d tentativas de conexão falharam"
+
+#: ../statistics.c:121
+#, c-format
+msgid "%d passive connection openings"
+msgstr "%d opens passivos"
+
+#: ../statistics.c:122
+#, c-format
+msgid "%d failed connection attempts"
+msgstr "%d tentativas de conexão falharam"
+
+#: ../statistics.c:123
+#, c-format
+msgid "%d connection resets received"
+msgstr "%d resets de conexão recebidas"
+
+#: ../statistics.c:124
+#, c-format
+msgid "%d connections established"
+msgstr "%d conexões estabelecidas"
+
+#: ../statistics.c:125
+#, c-format
+msgid "%d segments received"
+msgstr "%d segmentos recebidos"
+
+#: ../statistics.c:126
+#, c-format
+msgid "%d segments send out"
+msgstr "%d segmentos enviados"
+
+#: ../statistics.c:127
+#, c-format
+msgid "%d segments retransmited"
+msgstr "%d segmentos retransmitidos"
+
+#: ../statistics.c:128
+#, c-format
+msgid "%d bad segments received."
+msgstr "%d segmentos ruins recebidos."
+
+#: ../statistics.c:129
+#, c-format
+msgid "%d resets sent"
+msgstr "%d resets enviados"
+
+#: ../statistics.c:134
+#, c-format
+msgid "%d packets received"
+msgstr "%d pacotes recebidos"
+
+#: ../statistics.c:135
+#, c-format
+msgid "%d packets to unknown port received."
+msgstr "%d pacotes para portas desconhecidas recebidos."
+
+#: ../statistics.c:136
+#, c-format
+msgid "%d packet receive errors"
+msgstr "%d erros de recepção de pacotes"
+
+#: ../statistics.c:137
+#, c-format
+msgid "%d packets sent"
+msgstr "%d pacotes enviados"
+
+#: ../statistics.c:142
+#, c-format
+msgid "%d SYN cookies sent"
+msgstr "%d pacotes enviados"
+
+#: ../statistics.c:143
+#, c-format
+msgid "%d SYN cookies received"
+msgstr "%d pacotes recebidos"
+
+#: ../statistics.c:144
+#, c-format
+msgid "%d invalid SYN cookies received"
+msgstr "%d pacotes recebidos"
+
+#: ../statistics.c:146
+#, c-format
+msgid "%d resets received for embryonic SYN_RECV sockets"
+msgstr "%d resets recebidos para sockets embriônicos SYN_RECV"
+
+#: ../statistics.c:148
+#, c-format
+msgid "%d packets pruned from receive queue because of socket buffer overrun"
+msgstr ""
+"%d pacotes retirados da fila de recepção devido a sobreposição de buffers de "
+"sockets"
+
+#. obsolete: 2.2.0 doesn't do that anymore
+#: ../statistics.c:151
+#, c-format
+msgid "%d packets pruned from out-of-order queue"
+msgstr "%d pacotes retirados da fila de fora de ordem (out-of-order)"
+
+#: ../statistics.c:152
+#, c-format
+msgid ""
+"%d packets dropped from out-of-order queue because of socket buffer overrun"
+msgstr ""
+"%d pacotes descartados da fila de fora de ordem devido a sobreposição de "
+"buffers de sockets"
+
+#: ../statistics.c:154
+#, c-format
+msgid "%d ICMP packets dropped because they were out-of-window"
+msgstr "%d pacotes ICMP descartados porque estavam fora da janela"
+
+#: ../statistics.c:156
+#, c-format
+msgid "%d ICMP packets dropped because socket was locked"
+msgstr "%d pacotes ICMP descartadas porque o socket estava bloqueado"
+
+#: ../statistics.c:222
+msgid "enabled"
+msgstr "habilitado"
+
+#: ../statistics.c:222
+msgid "disabled"
+msgstr "desabilitado"
+
+#: ../statistics.c:272
+#, c-format
+msgid "unknown title %s\n"
+msgstr "título %s desconhecido\n"
+
+#: ../statistics.c:298
+msgid "error parsing /proc/net/snmp"
+msgstr "erro lendo /proc/net/snmp"
+
+#: ../statistics.c:311
+msgid "cannot open /proc/net/snmp"
+msgstr "não foi possível abrir /proc/net/snmp"
+
+#: ../lib/activate.c:69
+#, c-format
+msgid "Hardware type `%s' not supported.\n"
+msgstr "O tipo de hardware `%s' não é suportado.\n"
+
+#: ../lib/activate.c:73
+#, c-format
+msgid "Cannot change line discipline to `%s'.\n"
+msgstr "Não foi possível mudar a disciplina da linha para `%s'.\n"
+
+#: ../lib/af.c:145 ../lib/hw.c:148
+msgid "UNSPEC"
+msgstr "Não Especificado"
+
+#: ../lib/af.c:147
+msgid "UNIX Domain"
+msgstr "UNIX Domain"
+
+#: ../lib/af.c:150
+msgid "DARPA Internet"
+msgstr "DARPA Internet"
+
+#: ../lib/af.c:153
+msgid "IPv6"
+msgstr "IPv6"
+
+#: ../lib/af.c:156 ../lib/hw.c:169
+msgid "AMPR AX.25"
+msgstr "AX.25 AMPR"
+
+#: ../lib/af.c:159 ../lib/hw.c:175
+msgid "AMPR NET/ROM"
+msgstr "NET/ROM AMPR"
+
+#: ../lib/af.c:162
+msgid "Novell IPX"
+msgstr "Novell IPX"
+
+#: ../lib/af.c:165
+msgid "Appletalk DDP"
+msgstr "Appletalk DDP"
+
+#: ../lib/af.c:168 ../lib/hw.c:207
+msgid "Econet"
+msgstr "Econet"
+
+#: ../lib/af.c:171 ../lib/hw.c:172
+msgid "AMPR ROSE"
+msgstr "AMPR ROSE"
+
+#: ../lib/af.c:174 ../lib/hw.c:160
+msgid "Ash"
+msgstr "Ash"
+
+#: ../lib/af.c:232
+msgid "Please don't supply more than one address family.\n"
+msgstr "Por favor não especifique mais que uma família de endereços.\n"
+
+#: ../lib/af.c:293
+msgid "Too much address family arguments.\n"
+msgstr "Excesso no número de famílias de endereços.\n"
+
+#: ../lib/af.c:304
+#, c-format
+msgid "Unknown address family `%s'.\n"
+msgstr "Família de endereços `%s' desconhecida.\n"
+
+#: ../lib/arcnet.c:53 ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52
+#: ../lib/fddi.c:67 ../lib/hippi.c:68 ../lib/inet.c:244 ../lib/inet.c:259
+#: ../lib/inet6.c:129 ../lib/ipx.c:81 ../lib/netrom.c:78 ../lib/rose.c:71
+#: ../lib/rose.c:126 ../lib/unix.c:56 ../lib/unix.c:76
+msgid "[NONE SET]"
+msgstr "[Nenhum configurado]"
+
+#: ../lib/arcnet.c:81 ../lib/arcnet.c:96
+#, c-format
+msgid "in_arcnet(%s): invalid arcnet address!\n"
+msgstr "in_arcnet(%s): endereço arcnet inválido!\n"
+
+#: ../lib/arcnet.c:108
+#, c-format
+msgid "in_arcnet(%s): trailing : ignored!\n"
+msgstr "in_arcnet(%s): trailing : ignorado!\n"
+
+#: ../lib/arcnet.c:120
+#, c-format
+msgid "in_arcnet(%s): trailing junk!\n"
+msgstr "in_arcnet(%s): lixo no trailing!\n"
+
+#: ../lib/ash.c:81
+msgid "Malformed Ash address"
+msgstr "Endereço Ash mal formado"
+
+#: ../lib/ax25.c:97 ../lib/netrom.c:100
+msgid "Invalid callsign"
+msgstr "Callsign inválido"
+
+#: ../lib/ax25.c:110 ../lib/netrom.c:113
+msgid "Callsign too long"
+msgstr "Callsign muito longo"
+
+#: ../lib/ax25_gr.c:47
+msgid "AX.25 not configured in this system.\n"
+msgstr "O AX.25 não foi configurado neste sistema.\n"
+
+#: ../lib/ax25_gr.c:50
+msgid "Kernel AX.25 routing table\n"
+msgstr "Tabela de roteamento AX.25 do kernel\n"
+
+#. xxx
+#: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55
+msgid "Destination  Iface    Use\n"
+msgstr "Destino      Iface    Uso\n"
+
+#: ../lib/ddp_gr.c:21
+msgid "Routing table for `ddp' not yet supported.\n"
+msgstr "Tabela de roteamento para `ddp' ainda não suportada.\n"
+
+#: ../lib/ether.c:74 ../lib/ether.c:91
+#, c-format
+msgid "in_ether(%s): invalid ether address!\n"
+msgstr "in_ether(%s): endereco ether inválido!\n"
+
+#: ../lib/ether.c:105
+#, c-format
+msgid "in_ether(%s): trailing : ignored!\n"
+msgstr "in_ether(%s): trailing : ignorado!\n"
+
+#: ../lib/ether.c:117
+#, c-format
+msgid "in_ether(%s): trailing junk!\n"
+msgstr "in_ether(%s): lixo no trailing!\n"
+
+#: ../lib/fddi.c:95 ../lib/fddi.c:110
+#, c-format
+msgid "in_fddi(%s): invalid fddi address!\n"
+msgstr "in_fddi(%S): endereço fddi inválido!\n"
+
+#: ../lib/fddi.c:122
+#, c-format
+msgid "in_fddi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): trailing : ignorado!\n"
+
+#: ../lib/fddi.c:134
+#, c-format
+msgid "in_fddi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): lixo no trailing!\n"
+
+#: ../lib/getroute.c:97 ../lib/setroute.c:76
+#, c-format
+msgid "Address family `%s' not supported.\n"
+msgstr "Família de endereços `%s' não suportada.\n"
+
+#: ../lib/getroute.c:103 ../lib/setroute.c:80
+#, c-format
+msgid "No routing for address family `%s'.\n"
+msgstr "Nenhum roteamento para a família `%s'\n"
+
+#: ../lib/hippi.c:96 ../lib/hippi.c:111
+#, c-format
+msgid "in_hippi(%s): invalid hippi address!\n"
+msgstr "in_fddi(%S): endereço fddi inválido!\n"
+
+#: ../lib/hippi.c:123
+#, c-format
+msgid "in_hippi(%s): trailing : ignored!\n"
+msgstr "in_fddi(%s): trailing : ignorado!\n"
+
+#: ../lib/hippi.c:134
+#, c-format
+msgid "in_hippi(%s): trailing junk!\n"
+msgstr "in_fddi(%s): lixo no trailing!\n"
+
+#: ../lib/hw.c:147
+msgid "Local Loopback"
+msgstr "Loopback Local"
+
+#: ../lib/hw.c:150
+msgid "Serial Line IP"
+msgstr "SLIP"
+
+#: ../lib/hw.c:151
+msgid "VJ Serial Line IP"
+msgstr "SLIP VJ"
+
+#: ../lib/hw.c:152
+msgid "6-bit Serial Line IP"
+msgstr "SLIP 6 bits"
+
+#: ../lib/hw.c:153
+msgid "VJ 6-bit Serial Line IP"
+msgstr "SLIP VJ 6 bits"
+
+#: ../lib/hw.c:154
+msgid "Adaptive Serial Line IP"
+msgstr "SLIP Adaptativo"
+
+#: ../lib/hw.c:157
+msgid "Ethernet"
+msgstr "Ethernet"
+
+#: ../lib/hw.c:163
+msgid "Fiber Distributed Data Interface"
+msgstr "FDDI - Fibra Ótica"
+
+#: ../lib/hw.c:166
+msgid "HIPPI"
+msgstr "HIPPI"
+
+#: ../lib/hw.c:178
+msgid "IPIP Tunnel"
+msgstr "Túnel IPIP"
+
+#: ../lib/hw.c:181
+msgid "Point-to-Point Protocol"
+msgstr "Protocolo Ponto-a-Ponto"
+
+#: ../lib/hw.c:184
+msgid "(Cisco)-HDLC"
+msgstr "(Cisco)-HDLC"
+
+#: ../lib/hw.c:185
+msgid "LAPB"
+msgstr "LAPB"
+
+#: ../lib/hw.c:188
+msgid "ARCnet"
+msgstr "ARCnet"
+
+#: ../lib/hw.c:191
+msgid "Frame Relay DLCI"
+msgstr "Frame Relay DLCI"
+
+#: ../lib/hw.c:192
+msgid "Frame Relay Access Device"
+msgstr "FRAD - Dispositivo de Acesso a Frame Relay"
+
+#: ../lib/hw.c:195
+msgid "IPv6-in-IPv4"
+msgstr "IPv6 sobre IPv4"
+
+#: ../lib/hw.c:198
+msgid "IrLAP"
+msgstr "IrLAP"
+
+#: ../lib/hw.c:201
+msgid "16/4 Mbps Token Ring"
+msgstr "16/4 Mbps Token Ring"
+
+#: ../lib/hw.c:203
+msgid "16/4 Mbps Token Ring (New)"
+msgstr "16/4 Mbps Token Ring (Novo)"
+
+#: ../lib/inet.c:153 ../lib/inet6.c:79
+#, c-format
+msgid "rresolve: unsupport address family %d !\n"
+msgstr "rresolve: família de endereços %d não suportada!\n"
+
+#: ../lib/inet6_gr.c:79
+msgid "INET6 (IPv6) not configured in this system.\n"
+msgstr "NET/ROM não configurado neste sistema.\n"
+
+#: ../lib/inet6_gr.c:82
+msgid "Kernel IPv6 routing table\n"
+msgstr "Tabela de Roteamento IPv6 do Kernel\n"
+
+#: ../lib/inet6_gr.c:84
+msgid ""
+"Destination                                 Next Hop                         "
+"       Flags Metric Ref    Use Iface\n"
+msgstr ""
+"Destino                                     Próximo \"Hop\"                  "
+"        Opções Métrica Ref   Uso Iface\n"
+
+#: ../lib/inet6_gr.c:158
+msgid "Kernel IPv6 Neighbour Cache\n"
+msgstr "Cache de Vizinhos IPv6 do Kernel\n"
+
+#: ../lib/inet6_gr.c:161
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State\n"
+msgstr ""
+"Vizinho                                     Endereço HW       Iface   Opções "
+"Estado Ref\n"
+
+#: ../lib/inet6_gr.c:165
+msgid ""
+"Neighbour                                   HW Address        Iface    Flags "
+"Ref State            Stale(sec) Delete(sec)\n"
+msgstr ""
+"Vizinho                                     Endereço HW       Iface   Opções "
+"Estado Ref\n"
+"       Parado(seg) Remover(seg)\n"
+
+#: ../lib/inet6_sr.c:46
+msgid "Usage: inet6_route [-vF] del Target\n"
+msgstr "Uso: inet6_route [-vF] del Destino\n"
+
+#: ../lib/inet6_sr.c:47
+msgid "       inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n"
+msgstr "       inet6_route [-vF] add Destino [gw Gw] [metric M] [[dev] If]\n"
+
+#: ../lib/inet6_sr.c:48
+msgid "       inet6_route [-FC] flush      NOT supported\n"
+msgstr "       inet6_route [-FC] flush      NÃO suportado\n"
+
+#: ../lib/inet6_sr.c:182
+msgid "Flushing `inet6' routing table not supported\n"
+msgstr "Limpeza da tabela de roteamento `inet6' não é suportada\n"
+
+#: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220
+msgid "INET (IPv4) not configured in this system.\n"
+msgstr "NET/ROM não configurado neste sistema.\n"
+
+#: ../lib/inet_gr.c:53
+msgid "Kernel IP routing table\n"
+msgstr "Tabela de Roteamento IP do Kernel\n"
+
+#: ../lib/inet_gr.c:56
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Destino         Roteador        MáscaraGen.    Opções Métrica Ref   Uso "
+"Iface\n"
+
+#: ../lib/inet_gr.c:59
+msgid ""
+"Destination     Gateway         Genmask         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Destino         Roteador        MáscaraGen.    Opções   MSS Janela  irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:62
+msgid ""
+"Destination     Gateway         Genmask         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt\n"
+msgstr ""
+"Destino         Roteador        MáscaraGen     Opções Métrica Ref   Uso "
+"Iface    MSS   Janela irtt\n"
+
+#: ../lib/inet_gr.c:237
+msgid "Kernel IP routing cache\n"
+msgstr "Tabela de Roteamento IP do Kernel\n"
+
+#: ../lib/inet_gr.c:258
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface\n"
+msgstr ""
+"Destino         Roteador        MáscaraGen.    Opções Métrica Ref   Uso "
+"Iface\n"
+
+#: ../lib/inet_gr.c:261
+msgid ""
+"Source          Destination     Gateway         Flags   MSS Window  irtt "
+"Iface\n"
+msgstr ""
+"Destino         Roteador        MáscaraGen.    Opções   MSS Janela  irtt "
+"Iface\n"
+
+#: ../lib/inet_gr.c:266
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  HH  Arp\n"
+msgstr ""
+"Destino         Roteador        Origem         Opções Métrica Ref   Uso "
+"Iface    MSS   Janela irtt   HH  Arp\n"
+
+#: ../lib/inet_gr.c:290
+msgid ""
+"Source          Destination     Gateway         Flags Metric Ref    Use "
+"Iface    MSS   Window irtt  TOS HHRef HHUptod     SpecDst\n"
+msgstr ""
+"Destino         Roteador        Origem         Opções Métrica Ref   Uso "
+"Iface    MSS   Janela irtt   HH  Arp\n"
+
+#: ../lib/inet_sr.c:50
+msgid ""
+"Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] "
+"[[dev] If]\n"
+msgstr ""
+"Uso: inet_route [-vF] del {-host|-net} Destino[/prefixo] [gw Gw] [metric M] "
+"[[dev] If]\n"
+
+#: ../lib/inet_sr.c:51
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Destino[/prefixo] [gw Gw] [metric "
+"M]\n"
+
+#: ../lib/inet_sr.c:52
+msgid ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+msgstr ""
+"                              [netmask N] [mss Mss] [window W] [irtt I]\n"
+
+#: ../lib/inet_sr.c:53
+msgid "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+msgstr "                              [mod] [dyn] [reinstate] [[dev] If]\n"
+
+#: ../lib/inet_sr.c:54
+msgid ""
+"       inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n"
+msgstr ""
+"       inet_route [-vF] add {-host|-net} Destino[/prefixo] [metric M] "
+"reject\n"
+
+#: ../lib/inet_sr.c:55
+msgid "       inet_route [-FC] flush      NOT supported\n"
+msgstr "       inet_route [-FC] flush      NÃO suportado\n"
+
+#: ../lib/inet_sr.c:158
+#, c-format
+msgid "route: %s: cannot use a NETWORK as gateway!\n"
+msgstr "route: %s: não é possível usar uma REDE como roteador!\n"
+
+#: ../lib/inet_sr.c:174
+msgid "route: Invalid MSS/MTU.\n"
+msgstr "route: MSS inválido.\n"
+
+#: ../lib/inet_sr.c:187
+msgid "route: Invalid window.\n"
+msgstr "route: janela inválida.\n"
+
+#: ../lib/inet_sr.c:203
+msgid "route: Invalid initial rtt.\n"
+msgstr "route: rtt inicial inválido.\n"
+
+#: ../lib/inet_sr.c:261
+#, c-format
+msgid "route: netmask %.8x doesn't make sense with host route\n"
+msgstr "route: a máscara %.8x não faz sentido em rotas para máquinas\n"
+
+#: ../lib/inet_sr.c:265
+#, c-format
+msgid "route: bogus netmask %s\n"
+msgstr "route: netmask %s inválida\n"
+
+#: ../lib/inet_sr.c:270
+msgid "route: netmask doesn't match route address\n"
+msgstr "route: a netmask não casa com o endereço de rede\n"
+
+#: ../lib/inet_sr.c:306
+msgid "Flushing `inet' routing table not supported\n"
+msgstr "Não é suportado limpar a tabela de roteamento `inet'\n"
+
+#: ../lib/inet_sr.c:310
+msgid "Modifying `inet' routing cache not supported\n"
+msgstr "Não é suportado modificar o cache de roteamento `inet'\n"
+
+#: ../lib/ipx_gr.c:52
+msgid "IPX not configured in this system.\n"
+msgstr "O AX.25 não foi configurado neste sistema.\n"
+
+#: ../lib/ipx_gr.c:56
+msgid "Kernel IPX routing table\n"
+msgstr "Tabela de roteamento IPX do kernel\n"
+
+#. xxx
+#: ../lib/ipx_gr.c:57
+msgid "Destination               Router Net                Router Node\n"
+msgstr "Destino                   Rede Roteadora            Nó Roteador\n"
+
+#: ../lib/ipx_sr.c:33
+msgid "IPX: this needs to be written\n"
+msgstr "NET/ROM: isto precisa ser escrito\n"
+
+#: ../lib/masq_info.c:197
+msgid "IP masquerading entries\n"
+msgstr "Entradas de IP mascarado\n"
+
+#: ../lib/masq_info.c:200
+msgid "prot   expire source               destination          ports\n"
+msgstr "prot   expira origem               destino             portas\n"
+
+#: ../lib/masq_info.c:203
+msgid ""
+"prot   expire    initseq delta prevd source               destination        "
+"  ports\n"
+msgstr ""
+"prot   expira    initseq delta prevd origem               destino            "
+" portas\n"
+
+#: ../lib/netrom_gr.c:48
+msgid "NET/ROM not configured in this system.\n"
+msgstr "NET/ROM não configurado neste sistema.\n"
+
+#: ../lib/netrom_gr.c:51
+msgid "Kernel NET/ROM routing table\n"
+msgstr "Tabela de roteamento NET/ROM do kernel\n"
+
+#: ../lib/netrom_gr.c:52
+msgid "Destination  Mnemonic  Quality  Neighbour  Iface\n"
+msgstr "Destino      Mnemônico Qualidade Vizinho   Iface\n"
+
+#: ../lib/netrom_sr.c:34
+msgid "netrom usage\n"
+msgstr "uso de netrom\n"
+
+#: ../lib/netrom_sr.c:44
+msgid "NET/ROM: this needs to be written\n"
+msgstr "NET/ROM: isto precisa ser escrito\n"
+
+#: ../lib/ppp.c:44
+msgid "You cannot start PPP with this program.\n"
+msgstr "Você não pode iniciar o PPP com este programa.\n"
+
+#: ../lib/ppp_ac.c:38
+msgid "Sorry, use pppd!\n"
+msgstr "Desculpe, use o pppd!\n"
+
+#: ../lib/rose.c:87
+msgid "Node address must be ten digits"
+msgstr "Endereço do nó deve ter dez dígitos"
+
+#: ../lib/rose_gr.c:51
+msgid "ROSE not configured in this system.\n"
+msgstr "ROSE não configurada neste sistema.\n"
+
+#: ../lib/rose_gr.c:54
+msgid "Kernel ROSE routing table\n"
+msgstr "Tabela de roteamento ROSE do kernel\n"
+
+#: ../lib/tr.c:70 ../lib/tr.c:85
+#, c-format
+msgid "in_tr(%s): invalid token ring address!\n"
+msgstr "in_tr(%s): endereço token ring inválido!\n"
+
+#: ../lib/tr.c:97
+#, c-format
+msgid "in_tr(%s): trailing : ignored!\n"
+msgstr "in_tr(%s): trailing : ignorado!\n"
+
+#: ../lib/tr.c:109
+#, c-format
+msgid "in_tr(%s): trailing junk!\n"
+msgstr "in_tr(%s): lixo no trailing!\n"
+
+#: ../lib/interface.c:124
+#, c-format
+msgid "warning: no inet socket available: %s\n"
+msgstr "atenção: nenhum socket inet disponível: %s\n"
+
+#: ../lib/interface.c:270
+#, c-format
+msgid "Warning: cannot open %s (%s). Limited output.\n"
+msgstr "Atenção: não foi possível abrir %s (%s). Saída limitada.\n"
+
+#. Give better error message for this case.
+#: ../lib/interface.c:504
+msgid "Device not found"
+msgstr "%s: dispositivo não encontrado"
+
+#: ../lib/interface.c:508
+#, c-format
+msgid "%s: error fetching interface information: %s\n"
+msgstr ""
+"%s: erro obtendo informações da interface: %s\n"
+"\n"
+
+#: ../lib/sockets.c:59
+msgid "No usable address families found.\n"
+msgstr "Nenhuma família de endereços que possa ser usada foi encontrada.\n"
+
+#: ../lib/util-ank.c:229
+#, c-format
+msgid "ip: %s is invalid inet address\n"
+msgstr "%s: endereço %s inválido.\n"
+
+#: ../lib/util-ank.c:238
+#, c-format
+msgid "ip: %s is invalid inet prefix\n"
+msgstr "ip: %s é um prefixo inválido inet\n"
+
+#: ../lib/util-ank.c:248
+#, c-format
+msgid "ip: %s is invalid IPv4 address\n"
+msgstr "%s: endereço %s inválido.\n"
+
+#: ../lib/util-ank.c:256
+#, c-format
+msgid "ip: argument is wrong: %s\n"
+msgstr "ip: argumento errado: %s\n"
+
+#: ../ipmaddr.c:56
+msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n"
+msgstr "Uso: ipmaddr [ add | del ] ENDMULTI dev STRING\n"
+
+#: ../ipmaddr.c:57
+msgid "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+msgstr "       ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n"
+
+#: ../ipmaddr.c:58
+msgid "       ipmaddr -V | -version\n"
+msgstr "       ipmaddr -V | -version\n"
+
+#: ../ipmaddr.c:258
+#, c-format
+msgid "family %d "
+msgstr "família %d "
+
+#: ../ipmaddr.c:267
+#, c-format
+msgid " users %d"
+msgstr " usuários %d"
+
+#: ../ipmaddr.c:353
+msgid "Cannot create socket"
+msgstr "Não foi possível criar o socket"
+
+#: ../slattach.c:180
+#, c-format
+msgid "slattach: /dev/%s already locked!\n"
+msgstr "slattach: /dev/%s já bloqueado!\n"
+
+#: ../slattach.c:186
+#, c-format
+msgid "slattach: tty_lock: (%s): %s\n"
+msgstr "slattach: tty_lock: (%s): %s\n"
+
+#: ../slattach.c:192
+msgid "slattach: cannot write PID file\n"
+msgstr "slattach: não foi possível escrever o arquivo PID\n"
+
+#: ../slattach.c:202
+#, c-format
+msgid "slattach: tty_lock: UUCP user %s unknown!\n"
+msgstr "slattach: tty_lock: o usuário UUCP %s é desconhecido!\n"
+
+#: ../slattach.c:430
+#, c-format
+msgid "slattach: tty_hangup(DROP): %s\n"
+msgstr "slattach: tty_hangup(DROP): %s\n"
+
+#: ../slattach.c:437
+#, c-format
+msgid "slattach: tty_hangup(RAISE): %s\n"
+msgstr "slattach: tty_hangup(RAISE): %s\n"
+
+#: ../slattach.c:486
+msgid "slattach: tty_open: cannot get current state!\n"
+msgstr "slattach: tty_open: não foi possível obter o estado corrente!\n"
+
+#: ../slattach.c:493
+msgid "slattach: tty_open: cannot get current line disc!\n"
+msgstr ""
+"slattach: tty_open: não foi possível obter a disciplina de linha corrente!\n"
+
+#: ../slattach.c:501
+msgid "slattach: tty_open: cannot set RAW mode!\n"
+msgstr "slattach: tty_open: não foi possível configurar o modo RAW!\n"
+
+#: ../slattach.c:508
+#, c-format
+msgid "slattach: tty_open: cannot set %s bps!\n"
+msgstr "slattach: tty_open: não foi possível configurar %s bps!\n"
+
+#: ../slattach.c:518
+msgid "slattach: tty_open: cannot set 8N1 mode!\n"
+msgstr "slattach: tty_open: não foi possível configurar modo 8N1!\n"
+
+#: ../slattach.c:686
+#, c-format
+msgid "%s started"
+msgstr "%s inicializado"
+
+#: ../slattach.c:687
+#, c-format
+msgid " on %s"
+msgstr " em %s"
+
+#: ../slattach.c:688
+#, c-format
+msgid " interface %s\n"
+msgstr "%s: interface desconhecida.\n"
diff --git a/rarp.c b/rarp.c
new file mode 100644 (file)
index 0000000..aab05b3
--- /dev/null
+++ b/rarp.c
@@ -0,0 +1,312 @@
+/*
+ * rarp               This file contains an implementation of the command
+ *              that maintains the kernel's RARP cache.  It is derived
+ *              from Fred N. van Kempen's arp command.
+ *
+ * Version:    $Id: rarp.c,v 1.6 2001/04/08 17:05:05 pb Exp $
+ *
+ * Usage:       rarp -d hostname                      Delete entry
+ *              rarp -s hostname ethernet_address     Add entry
+ *              rarp -a                               Print entries
+ *              rarp -f                               Add frop /etc/ethers
+ *
+ * Rewritten: Phil Blundell <Philip.Blundell@pobox.com>  1997-08-03
+ * gettext instead of catgets: Arnaldo Carvalho de Melo <acme@conectiva.com.br> 1998-06-29
+ * 1998-01-01 Bernd Eckenfels  reorganised usage()
+ * 2001-04-04 Arnaldo Carvalho de Melo - use setlocale
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <string.h>
+#include <unistd.h>
+#include <getopt.h>
+
+#define DFLT_HW "ether"
+
+#include "config.h"
+#include "intl.h"
+#include "net-support.h"
+#include "version.h"
+#include "pathnames.h"
+
+static char no_rarp_message[] = N_("This kernel does not support RARP.\n");
+
+static char version_string[] = RELEASE "\nrarp 1.03 (2001-04-04)\n";
+
+static struct hwtype *hardware = NULL;
+
+/* Delete an entry from the RARP cache. */
+static int rarp_delete(int fd, struct hostent *hp)
+{
+    struct arpreq req;
+    struct sockaddr_in *si;
+    unsigned int found = 0;
+    char **addr;
+
+    /* The host can have more than one address, so we loop on them. */
+    for (addr = hp->h_addr_list; *addr != NULL; addr++) {
+       memset((char *) &req, 0, sizeof(req));
+       si = (struct sockaddr_in *) &req.arp_pa;
+       si->sin_family = hp->h_addrtype;
+       memcpy((char *) &si->sin_addr, *addr, hp->h_length);
+
+       /* Call the kernel. */
+       if (ioctl(fd, SIOCDRARP, &req) == 0) {
+           found++;
+       } else {
+           switch (errno) {
+           case ENXIO:
+               break;
+           case ENODEV:
+               fputs(_(no_rarp_message), stderr);
+               return 1;
+           default:
+               perror("SIOCDRARP");
+               return 1;
+           }
+       }
+    }
+
+    if (found == 0)
+       printf(_("no RARP entry for %s.\n"), hp->h_name);
+    return 0;
+}
+
+
+/* Set an entry in the RARP cache. */
+static int rarp_set(int fd, struct hostent *hp, char *hw_addr)
+{
+    struct arpreq req;
+    struct sockaddr_in *si;
+    struct sockaddr sap;
+
+    if (hardware->input(hw_addr, &sap)) {
+       fprintf(stderr, _("%s: bad hardware address\n"), hw_addr);
+       return 1;
+    }
+    /* Clear and fill in the request block. */
+    memset((char *) &req, 0, sizeof(req));
+    si = (struct sockaddr_in *) &req.arp_pa;
+    si->sin_family = hp->h_addrtype;
+    memcpy((char *) &si->sin_addr, hp->h_addr_list[0], hp->h_length);
+    req.arp_ha.sa_family = hardware->type;
+    memcpy(req.arp_ha.sa_data, sap.sa_data, hardware->alen);
+
+    /* Call the kernel. */
+    if (ioctl(fd, SIOCSRARP, &req) < 0) {
+       if (errno == ENODEV)
+           fputs(_(no_rarp_message), stderr);
+       else
+           perror("SIOCSRARP");
+       return 1;
+    }
+    return 0;
+}
+
+/* Process an EtherFile */
+static int rarp_file(int fd, const char *name)
+{
+    char buff[1024];
+    char *host, *addr;
+    int linenr;
+    FILE *fp;
+    struct hostent *hp;
+
+    if ((fp = fopen(name, "r")) == NULL) {
+       fprintf(stderr, _("rarp: cannot open file %s:%s.\n"), name, strerror(errno));
+       return -1;
+    }
+    /* Read the lines in the file. */
+    linenr = 0;
+    while (fgets(buff, sizeof(buff), fp)) {
+       ++linenr;
+       if (buff[0] == '#' || buff[0] == '\0')
+           continue;
+       if ((addr = strtok(buff, "\n \t")) == NULL)
+           continue;
+       if ((host = strtok(NULL, "\n \t")) == NULL) {
+           fprintf(stderr, _("rarp: format error at %s:%u\n"), name, linenr);
+           continue;
+       }
+       if ((hp = gethostbyname(host)) == NULL) {
+           fprintf(stderr, _("rarp: %s: unknown host\n"), host);
+       }
+       if (rarp_set(fd, hp, addr) != 0) {
+           fprintf(stderr, _("rarp: cannot set entry from %s:%u\n"), name, linenr);
+       }
+    }
+
+    (void) fclose(fp);
+    return 0;
+}
+
+static int display_cache(void)
+{
+    FILE *fd = fopen(_PATH_PROCNET_RARP, "r");
+    char buffer[256];
+    if (fd == NULL) {
+       if (errno == ENOENT)
+           fputs(_(no_rarp_message), stderr);
+       else
+           perror(_PATH_PROCNET_RARP);
+       return 1;
+    }
+    while (feof(fd) == 0) {
+       if (fgets(buffer, 255, fd))
+           fputs(buffer, stdout);
+    }
+    fclose(fd);
+    return 0;
+}
+
+static void usage(void)
+{
+    fprintf(stderr, _("Usage: rarp -a                               list entries in cache.\n"));
+    fprintf(stderr, _("       rarp -d <hostname>                    delete entry from cache.\n"));
+    fprintf(stderr, _("       rarp [<HW>] -s <hostname> <hwaddr>    add entry to cache.\n"));
+    fprintf(stderr, _("       rarp -f                               add entries from /etc/ethers.\n"));
+    fprintf(stderr, _("       rarp -V                               display program version.\n\n"));
+
+    fprintf(stderr, _("  <HW>=Use '-H <hw>' to specify hardware address type. Default: %s\n"), DFLT_HW);
+    fprintf(stderr, _("  List of possible hardware types (which support ARP):\n"));
+    print_hwlist(1); /* 1 = ARPable */
+    exit(E_USAGE);
+}
+
+#define MODE_DISPLAY   1
+#define MODE_DELETE    2
+#define MODE_SET       3
+#define MODE_ETHERS    4
+
+static struct option longopts[] =
+{
+    {"version", 0, NULL, 'V'},
+    {"verbose", 0, NULL, 'v'},
+    {"list", 0, NULL, 'a'},
+    {"set", 0, NULL, 's'},
+    {"delete", 0, NULL, 'd'},
+    {"help", 0, NULL, 'h'},
+    {NULL, 0, NULL, 0}
+};
+
+int main(int argc, char **argv)
+{
+    int result = 0, mode = 0, c, nargs = 0, verbose = 0;
+    char *args[3];
+    struct hostent *hp;
+    int fd;
+
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+
+    /* Get a default hardware type.  */
+    hardware = get_hwtype(DFLT_HW);
+
+    do {
+       c = getopt_long(argc, argv, "-ht:aHdsVvf", longopts, NULL);
+       switch (c) {
+       case EOF:
+           break;
+       case 'h':
+           usage();
+       case 'V':
+           fprintf(stderr, version_string);
+           exit(E_VERSION);
+           break;
+       case 'v':
+           verbose++;
+           break;
+       case 'a':
+       case 's':
+       case 'd':
+           if (mode) {
+               fprintf(stderr, _("%s: illegal option mix.\n"), argv[0]);
+               usage();
+           } else {
+               mode = (c == 'a' ? MODE_DISPLAY : (c == 'd' ? MODE_DELETE : MODE_SET));
+           }
+           break;
+       case 'f':
+           mode = MODE_ETHERS;
+           break;
+        case 'H':
+       case 't':
+           if (optarg) {
+               hardware = get_hwtype(optarg);
+           } else {
+               usage();
+           }
+           break;
+       case 1:
+           if (nargs == 2) {
+               usage();
+               exit(1);
+           } else {
+               args[nargs++] = optarg;
+           }
+           break;
+       default:
+           usage();
+       }
+    } while (c != EOF);
+
+    if (hardware == NULL) {
+       fprintf(stderr, _("rarp: %s: unknown hardware type.\n"), optarg);
+       exit(1);
+    }
+    switch (mode) {
+    case 0:
+       usage();
+
+    case MODE_DISPLAY:
+       if (nargs != (mode - 1)) {
+           usage();
+       }
+       result = display_cache();
+       break;
+
+    case MODE_DELETE:
+    case MODE_SET:
+       if (nargs != (mode - 1)) {
+           usage();
+       }
+       if ((hp = gethostbyname(args[0])) == NULL) {
+           fprintf(stderr, _("rarp: %s: unknown host\n"), args[0]);
+           exit(1);
+       }
+       if (fd = socket(PF_INET, SOCK_DGRAM, 0), fd < 0) {
+           perror("socket");
+           exit(1);
+       }
+       result = (mode == MODE_DELETE) ? rarp_delete(fd, hp) : rarp_set(fd, hp, args[1]);
+       close(fd);
+       break;
+
+    case MODE_ETHERS:
+       if (nargs != 0 && nargs != 1)
+           usage();
+       if (fd = socket(PF_INET, SOCK_DGRAM, 0), fd < 0) {
+           perror("socket");
+           exit(1);
+       }
+       result = rarp_file(fd, nargs ? args[0] : _PATH_ETHERS);
+       close(fd);
+
+    }
+    exit(result);
+}
diff --git a/route.c b/route.c
new file mode 100644 (file)
index 0000000..f8c2bc3
--- /dev/null
+++ b/route.c
@@ -0,0 +1,230 @@
+/*
+ * route        This file contains an implementation of the command
+ *              that manages the IP routing table in the kernel.
+ *
+ * Version:     $Id: route.c,v 1.9 2001/04/15 14:41:17 pb Exp $
+ *
+ * Maintainer:  Bernd 'eckes' Eckenfels, <net-tools@lina.inka.de>
+ *
+ * Author:      Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+ *              (derived from FvK's 'route.c     1.70    01/04/94')
+ *
+ * Modifications:
+ *              Johannes Stille:        for Net-2Debugged by 
+ *                                      <johannes@titan.os.open.de>
+ *              Linus Torvalds:         Misc Changes
+ *              Alan Cox:               add the new mtu/window stuff
+ *              Miquel van Smoorenburg: rt_add and rt_del
+ *       {1.79} Bernd Eckenfels:        route_info
+ *       {1.80} Bernd Eckenfels:        reject, metric, irtt, 1.2.x support.
+ *       {1.81} Bernd Eckenfels:        reject routes need a dummy device
+ *960127 {1.82} Bernd Eckenfels:        'mod' and 'dyn' 'reinstate' added
+ *960129 {1.83} Bernd Eckenfels:        resolve and getsock now in lib/, 
+ *                                      REJECT displays '-' as gatway.
+ *960202 {1.84} Bernd Eckenfels:        net-features support added
+ *960203 {1.85} Bernd Eckenfels:        "#ifdef' in '#if' for net-features
+ *                                      -A  (aftrans) support, get_longopts
+ *960206 {1.86} Bernd Eckenfels:        route_init();
+ *960218 {1.87} Bernd Eckenfels:        netinet/in.h added
+ *960221 {1.88} Bernd Eckenfels:        aftrans_dfl support
+ *960222 {1.90} Bernd Eckenfels:        moved all AF specific code to lib/.
+ *960413 {1.91} Bernd Eckenfels:        new RTACTION support+FLAG_CACHE/FIB
+ *960426 {1.92} Bernd Eckenfels:        FLAG_SYM/-N support
+ *960823 {x.xx} Frank Strauss:          INET6 stuff
+ *980629 {1.95} Arnaldo Carvalho de Melo: gettext instead of catgets
+ *990101 {1.96} Bernd Eckenfels:       fixed usage and FLAG_CACHE Output
+ *20010404 {1.97} Arnaldo Carvalho de Melo: use setlocale
+ *
+ */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if.h>
+/* #include <net/route.h> realy broken */
+#include <netinet/in.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <linux/param.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <getopt.h>
+#include <unistd.h>
+#include <ctype.h>
+#include "net-support.h"
+#include "config.h"
+#include "intl.h"
+#include "pathnames.h"
+#include "version.h"
+
+#define DFLT_AF "inet"
+
+#define FEATURE_ROUTE
+#include "lib/net-features.h"  /* needs some of the system includes above! */
+
+char *Release = RELEASE, *Version = "route 1.98 (2001-04-15)";
+
+int opt_n = 0;                 /* numerical output flag        */
+int opt_v = 0;                 /* debugging output flag        */
+int opt_e = 1;                 /* 1,2,3=type of routetable     */
+int opt_fc = 0;                        /* routing cache/FIB */
+int opt_h = 0;                 /* help selected                */
+struct aftype *ap;             /* current address family       */
+
+static void usage(void)
+{
+    fprintf(stderr, _("Usage: route [-nNvee] [-FC] [<AF>]           List kernel routing tables\n"));
+    fprintf(stderr, _("       route [-v] [-FC] {add|del|flush} ...  Modify routing table for AF.\n\n"));
+
+    fprintf(stderr, _("       route {-h|--help} [<AF>]              Detailed usage syntax for specified AF.\n"));
+    fprintf(stderr, _("       route {-V|--version}                  Display version/author and exit.\n\n"));
+
+    fprintf(stderr, _("        -v, --verbose            be verbose\n"));
+    fprintf(stderr, _("        -n, --numeric            don't resolve names\n"));
+    fprintf(stderr, _("        -e, --extend             display other/more information\n"));
+    fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
+    fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
+
+    fprintf(stderr, _("  <AF>=Use '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+    fprintf(stderr, _("  List of possible address families (which support routing):\n"));
+    print_aflist(1); /* 1 = routeable */
+    exit(E_USAGE);
+}
+
+
+static void version(void)
+{
+    fprintf(stderr, "%s\n%s\n%s\n", Release, Version, Features);
+    exit(E_VERSION);
+}
+
+
+int main(int argc, char **argv)
+{
+    int i, lop, what = 0;
+    struct option longopts[] =
+    {
+       AFTRANS_OPTS,
+       {"extend", 0, 0, 'e'},
+       {"verbose", 0, 0, 'v'},
+       {"version", 0, 0, 'V'},
+       {"numeric", 0, 0, 'n'},
+       {"symbolic", 0, 0, 'N'},
+       {"protocol", 1, 0, 'A'},
+       {"cache", 0, 0, 'C'},
+       {"fib", 0, 0, 'F'},
+       {"help", 0, 0, 'h'},
+       {NULL, 0, 0, 0}
+    };
+    char **tmp;
+    char *progname;
+    int options;
+#if I18N
+    setlocale (LC_ALL, "");
+    bindtextdomain("net-tools", "/usr/share/locale");
+    textdomain("net-tools");
+#endif
+    getroute_init();           /* Set up AF routing support */
+    setroute_init();
+    afname[0] = '\0';
+    progname = argv[0];
+
+    /* getopts and -net wont work :-/ */
+    for (tmp = argv; *tmp; tmp++) {
+       if (!strcmp(*tmp, "-net"))
+           strcpy(*tmp, "#net");
+       else if (!strcmp(*tmp, "-host"))
+           strcpy(*tmp, "#host");
+    }
+
+    /* Fetch the command-line arguments. */
+    while ((i = getopt_long(argc, argv, "A:eCFhnNVv?", longopts, &lop)) != EOF)
+       switch (i) {
+       case -1:
+           break;
+       case 'n':
+           opt_n |= FLAG_NUM;
+           break;
+       case 'N':
+           opt_n |= FLAG_SYM;
+           break;
+       case 'v':
+           opt_v |= FLAG_VERBOSE;
+           break;
+       case 'e':
+           opt_e++;
+           break;
+       case 1:
+           if (lop < 0 || lop >= AFTRANS_CNT) {
+               EINTERN("route.c", "longopts 1 range");
+               break;
+           }
+           if ((i = aftrans_opt(longopts[lop].name)))
+               exit(i);
+           break;
+       case 'C':
+           opt_fc |= FLAG_CACHE;
+           break;
+       case 'F':
+           opt_fc |= FLAG_FIB;
+           break;
+       case 'A':
+           if ((i = aftrans_opt(optarg)))
+               exit(i);
+           break;
+       case 'V':
+           version();
+       case 'h':
+       case '?':
+           opt_h++;
+           break;
+       default:
+           usage();
+       }
+
+    argv += optind;
+    argc -= optind;
+
+    if (opt_h) {
+       if (!afname[0])
+           usage();
+       else
+           what = RTACTION_HELP;
+    } else {
+       if (!afname[0])
+           /* this will initialise afname[] */
+           aftrans_def("route", progname, DFLT_AF);
+
+       /* Do we have to show the contents of the routing table? */
+       if (*argv == NULL) {
+           what = RTACTION_SHOW;
+       } else {
+           if (!strcmp(*argv, "add"))
+               what = RTACTION_ADD;
+           else if (!strcmp(*argv, "del") || !strcmp(*argv, "delete"))
+               what = RTACTION_DEL;
+           else if (!strcmp(*argv, "flush"))
+               what = RTACTION_FLUSH;
+           else
+               usage();
+       }
+    }
+
+    options = (opt_e & FLAG_EXT) | opt_n | opt_fc | opt_v;
+    if (!opt_fc)
+       options |= FLAG_FIB;
+
+    if (what == RTACTION_SHOW)
+       i = route_info(afname, options);
+    else
+       i = route_edit(what, afname, options, ++argv);
+
+    if (i == E_OPTERR)
+       usage();
+
+    return (i);
+}
diff --git a/slattach.c b/slattach.c
new file mode 100644 (file)
index 0000000..cedae1b
--- /dev/null
@@ -0,0 +1,744 @@
+/*
+ * slattach    A program for handling dialup IP connecions.
+ *             This program forces a TTY line to go into a special
+ *             terminal line discipline, so that it can be used for
+ *             network traffic instead of the regular terminal I/O.
+ *
+ * Usage:      slattach [-ehlmnqv] [ -k keepalive ] [ -o outfill ]
+ *                     [-c cmd] [-s speed] [-p protocol] tty | -
+ *
+ * Version:    @(#)slattach.c  1.20  1999-05-29
+ *
+ * Author:      Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
+ *             Copyright 1988-1993 MicroWalt Corporation
+ *
+ * Modified:
+ *             Alan Cox, <A.Cox@swansea.ac.uk> , July 16 1994
+ *             Miquel van Smoorenburg, <miquels@drinkel.ow.org>, October 1994
+ *             George Shearer, <gshearer@one.net>, January 3, 1995
+ *             Yossi Gottlieb, <yogo@math.tau.ac.il>, February 11, 1995
+ *             Peter Tobias, <tobias@et-inf.fho-emden.de>, July 30 1995
+ *             Bernd Eckenfels <net-tools@lina.inka.de>, May 29, 1999
+ *                     added some more printf's for debug and NOBLOCK to open
+ *                     this should be enough to support 2.2 ttyS-style locks
+ *
+ *             This program is free software; you can redistribute it
+ *             and/or  modify it under  the terms of  the GNU General
+ *             Public  License as  published  by  the  Free  Software
+ *             Foundation;  either  version 2 of the License, or  (at
+ *             your option) any later version.
+ */
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <pwd.h>
+#include <signal.h>
+#include <stdlib.h>          
+#include <string.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <linux/if_slip.h>
+
+#if defined(__GLIBC__)
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+# include <termbits.h>
+#else
+# include <termios.h>
+#endif
+#endif
+
+#include "pathnames.h"
+#include "net-support.h"
+#include "version.h"
+#include "config.h"
+#include "intl.h"
+#include "util.h"
+
+#ifndef _PATH_LOCKD
+#define _PATH_LOCKD            "/var/lock"             /* lock files   */
+#endif
+#ifndef _UID_UUCP
+#define _UID_UUCP              "uucp"                  /* owns locks   */
+#endif
+
+
+#define DEF_PROTO      "cslip"
+
+
+const char *Release = RELEASE,
+          *Version = "@(#) slattach 1.21 (1999-11-21)",
+          *Signature = "net-tools, Fred N. van Kempen et al.";
+
+
+struct {
+  const char   *speed;
+  int  code;
+} tty_speeds[] = {                     /* table of usable baud rates   */
+  { "50",      B50     }, { "75",      B75     },      
+  { "110",     B110    }, { "300",     B300    },
+  { "600",     B600    }, { "1200",    B1200   },
+  { "2400",    B2400   }, { "4800",    B4800   },
+  { "9600",    B9600   },
+#ifdef B14400
+  { "14400",   B14400  },
+#endif
+#ifdef B19200
+  { "19200",   B19200  },
+#endif
+#ifdef B38400
+  { "38400",   B38400  },
+#endif
+#ifdef B57600
+  { "57600",   B57600  },
+#endif
+#ifdef B115200
+  { "115200",  B115200 },
+#endif
+  { NULL,      0       }
+};
+struct termios tty_saved,              /* saved TTY device state       */
+               tty_current;            /* current TTY device state     */
+int            tty_sdisc,              /* saved TTY line discipline    */
+               tty_ldisc,              /* current TTY line discipline  */
+               tty_fd = -1;            /* TTY file descriptor          */
+int            opt_c = 0;              /* "command" to run at exit     */
+int            opt_e = 0;              /* "activate only" flag         */
+int            opt_h = 0;              /* "hangup" on carrier loss     */
+#ifdef SIOCSKEEPALIVE
+int            opt_k = 0;              /* "keepalive" value            */
+#endif
+int            opt_l = 0;              /* "lock it" flag               */
+int            opt_L = 0;              /* clocal flag                  */
+int            opt_m = 0;              /* "set RAW mode" flag          */
+int            opt_n = 0;              /* "set No Mesg" flag           */
+#ifdef SIOCSOUTFILL
+int            opt_o = 0;              /* "outfill" value              */
+#endif
+int            opt_q = 0;              /* "quiet" flag                 */
+int            opt_d = 0;              /* debug flag                   */
+int            opt_v = 0;              /* Verbose flag                 */
+
+/* Disable any messages to the input channel of this process. */
+static int
+tty_nomesg(int fd)
+{
+  if (opt_n == 0) return(0);
+  return(fchmod(fd, 0600));
+}
+
+/* Check for an existing lock file on our device */
+static int
+tty_already_locked(char *nam)
+{
+  int  i = 0, pid = 0;
+  FILE *fd = (FILE *)0;
+
+  /* Does the lock file on our device exist? */
+  if ((fd = fopen(nam, "r")) == (FILE *)0)
+    return(0); /* No, return perm to continue */
+
+  /* Yes, the lock is there.  Now let's make sure */
+  /* at least there's no active process that owns */
+  /* that lock.                                   */
+  i = fscanf(fd, "%d", &pid);
+  (void) fclose(fd);
+  if (i != 1) /* Lock file format's wrong! Kill't */
+    return(0);
+
+  /* We got the pid, check if the process's alive */
+  if (kill(pid, 0) == 0)      /* it found process */
+      return(1);          /* Yup, it's running... */
+
+  /* Dead, we can proceed locking this device...  */
+  return(0);
+}
+
+/* Lock or unlock a terminal line. */
+static int
+tty_lock(char *path, int mode)
+{
+  static char saved_path[PATH_MAX];
+  static int saved_lock = 0;
+  struct passwd *pw;
+  int fd;
+  char apid[16];
+
+  /* We do not lock standard input. */
+  if ((opt_l == 0) || ((path == NULL) && (saved_lock == 0))) return(0);
+
+  if (mode == 1) {     /* lock */
+       sprintf(saved_path, "%s/LCK..%s", _PATH_LOCKD, path);
+       if (tty_already_locked(saved_path)) {
+               fprintf(stderr, _("slattach: /dev/%s already locked!\n"), path);
+               return(-1);
+       }
+       if ((fd = creat(saved_path, 0644)) < 0) {
+               if (errno != EEXIST)
+                       if (opt_q == 0) fprintf(stderr,
+                               _("slattach: tty_lock: (%s): %s\n"),
+                                       saved_path, strerror(errno));
+               return(-1);
+       }
+       sprintf(apid, "%10d\n", getpid());
+       if (write(fd, apid, strlen(apid)) != strlen(apid)) {
+               fprintf(stderr, _("slattach: cannot write PID file\n"));
+               close(fd);
+               unlink(saved_path);
+               return(-1);
+       }
+
+       (void) close(fd);
+
+       /* Make sure UUCP owns the lockfile.  Required by some packages. */
+       if ((pw = getpwnam(_UID_UUCP)) == NULL) {
+               if (opt_q == 0) fprintf(stderr, _("slattach: tty_lock: UUCP user %s unknown!\n"),
+                                       _UID_UUCP);
+               return(0);      /* keep the lock anyway */
+       }
+       (void) chown(saved_path, pw->pw_uid, pw->pw_gid);
+       saved_lock = 1;
+  } else {     /* unlock */
+       if (saved_lock != 1) return(0);
+       if (unlink(saved_path) < 0) {
+               if (opt_q == 0) fprintf(stderr,
+                       "slattach: tty_unlock: (%s): %s\n", saved_path,
+                                                       strerror(errno));
+               return(-1);
+       }
+       saved_lock = 0;
+  }
+
+  return(0);
+}
+
+
+/* Find a serial speed code in the table. */
+static int
+tty_find_speed(const char *speed)
+{
+  int i;
+
+  i = 0;
+  while (tty_speeds[i].speed != NULL) {
+       if (!strcmp(tty_speeds[i].speed, speed)) return(tty_speeds[i].code);
+       i++;
+  }
+  return(-EINVAL);
+}
+
+
+/* Set the number of stop bits. */
+static int
+tty_set_stopbits(struct termios *tty, char *stopbits)
+{
+  if (opt_d) printf("slattach: tty_set_stopbits: %c\n", *stopbits);
+  switch(*stopbits) {
+       case '1':
+               tty->c_cflag &= ~CSTOPB;
+               break;
+
+       case '2':
+               tty->c_cflag |= CSTOPB;
+               break;
+
+       default:
+               return(-EINVAL);
+  }
+  return(0);
+}
+
+
+/* Set the number of data bits. */
+static int
+tty_set_databits(struct termios *tty, char *databits)
+{
+  if (opt_d) printf("slattach: tty_set_databits: %c\n", *databits);
+  tty->c_cflag &= ~CSIZE;
+  switch(*databits) {
+       case '5':
+               tty->c_cflag |= CS5;
+               break;
+
+       case '6':
+               tty->c_cflag |= CS6;
+               break;
+
+       case '7':
+               tty->c_cflag |= CS7;
+               break;
+
+       case '8':
+               tty->c_cflag |= CS8;
+               break;
+
+       default:
+               return(-EINVAL);
+  }
+  return(0);
+}
+
+
+/* Set the type of parity encoding. */
+static int
+tty_set_parity(struct termios *tty, char *parity)
+{
+  if (opt_d) printf("slattach: tty_set_parity: %c\n", *parity);
+  switch(toupper(*parity)) {
+       case 'N':
+               tty->c_cflag &= ~(PARENB | PARODD);
+               break;  
+
+       case 'O':
+               tty->c_cflag &= ~(PARENB | PARODD);
+               tty->c_cflag |= (PARENB | PARODD);
+               break;
+
+       case 'E':
+               tty->c_cflag &= ~(PARENB | PARODD);
+               tty->c_cflag |= (PARENB);
+               break;
+
+       default:
+               return(-EINVAL);
+  }
+  return(0);
+}
+
+
+/* Set the line speed of a terminal line. */
+static int
+tty_set_speed(struct termios *tty, const char *speed)
+{
+  int code;
+
+  if (opt_d) printf("slattach: tty_set_speed: %s\n", speed);
+  if ((code = tty_find_speed(speed)) < 0) return(code);
+  tty->c_cflag &= ~CBAUD;
+  tty->c_cflag |= code;
+  return(0);
+}
+
+
+/* Put a terminal line in a transparent state. */
+static int
+tty_set_raw(struct termios *tty)
+{
+  int i;
+  int speed;
+
+  for(i = 0; i < NCCS; i++)
+               tty->c_cc[i] = '\0';            /* no spec chr          */
+  tty->c_cc[VMIN] = 1;
+  tty->c_cc[VTIME] = 0;
+  tty->c_iflag = (IGNBRK | IGNPAR);            /* input flags          */
+  tty->c_oflag = (0);                          /* output flags         */
+  tty->c_lflag = (0);                          /* local flags          */
+  speed = (tty->c_cflag & CBAUD);              /* save current speed   */
+  tty->c_cflag = (CRTSCTS | HUPCL | CREAD);    /* UART flags           */
+  if (opt_L) 
+       tty->c_cflag |= CLOCAL;
+  tty->c_cflag |= speed;                       /* restore speed        */
+  return(0);
+}
+
+
+/* Fetch the state of a terminal. */
+static int
+tty_get_state(struct termios *tty)
+{
+  if (ioctl(tty_fd, TCGETS, tty) < 0) {
+       if (opt_q == 0) fprintf(stderr,
+               "slattach: tty_get_state: %s\n", strerror(errno));
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Set the state of a terminal. */
+static int
+tty_set_state(struct termios *tty)
+{
+  if (ioctl(tty_fd, TCSETS, tty) < 0) {
+       if (opt_q == 0) fprintf(stderr,
+               "slattach: tty_set_state: %s\n", strerror(errno));
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Get the line discipline of a terminal line. */
+static int
+tty_get_disc(int *disc)
+{
+  if (ioctl(tty_fd, TIOCGETD, disc) < 0) {
+       if (opt_q == 0) fprintf(stderr,
+               "slattach: tty_get_disc: %s\n", strerror(errno));
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Set the line discipline of a terminal line. */
+static int
+tty_set_disc(int disc)
+{
+  if (disc == -1) disc = tty_sdisc;
+
+  if (ioctl(tty_fd, TIOCSETD, &disc) < 0) {
+       if (opt_q == 0) fprintf(stderr,
+               "slattach: tty_set_disc(%d, %d): %s\n", tty_fd,
+                       disc, strerror(errno));
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Fetch the name of the network interface attached to this terminal. */
+static int
+tty_get_name(char *name)
+{
+  if (ioctl(tty_fd, SIOCGIFNAME, name) < 0) {
+       if (opt_q == 0) 
+           perror("tty_get_name");
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Hangup the line. */
+static int
+tty_hangup(void)
+{
+  struct termios tty;
+
+  tty = tty_current;
+  (void) tty_set_speed(&tty, "0");
+  if (tty_set_state(&tty) < 0) {
+       if (opt_q == 0) fprintf(stderr, _("slattach: tty_hangup(DROP): %s\n"), strerror(errno));
+       return(-errno);
+  }
+
+  (void) sleep(1);
+
+  if (tty_set_state(&tty_current) < 0) {
+       if (opt_q == 0) fprintf(stderr, _("slattach: tty_hangup(RAISE): %s\n"), strerror(errno));
+       return(-errno);
+  }
+  return(0);
+}
+
+
+/* Close down a terminal line. */
+static int
+tty_close(void)
+{
+  (void) tty_set_disc(tty_sdisc);
+  (void) tty_hangup();
+  (void) tty_lock(NULL, 0);
+  return(0);
+}
+
+
+/* Open and initialize a terminal line. */
+static int
+tty_open(char *name, const char *speed)
+{
+  char pathbuf[PATH_MAX];
+  register char *path_open, *path_lock;
+  int fd;
+
+  /* Try opening the TTY device. */
+  if (name != NULL) {
+       if (name[0] != '/') {
+               if (strlen(name + 6) > sizeof(pathbuf)) {
+                       if (opt_q == 0) fprintf(stderr, 
+                               _("slattach: tty name too long\n"));
+                       return (-1);
+               }
+               sprintf(pathbuf, "/dev/%s", name);
+               path_open = pathbuf;
+               path_lock = name;
+       } else if (!strncmp(name, "/dev/", 5)) {
+               path_open = name;
+               path_lock = name + 5;
+       } else {
+               path_open = name;
+               path_lock = name;
+       }
+       if (opt_d) printf("slattach: tty_open: looking for lock\n");
+       if (tty_lock(path_lock, 1)) return(-1); /* can we lock the device? */
+       if (opt_d) printf("slattach: tty_open: trying to open %s\n", path_open);
+       if ((fd = open(path_open, O_RDWR|O_NDELAY)) < 0) {
+               if (opt_q == 0) fprintf(stderr,
+                       "slattach: tty_open(%s, RW): %s\n",
+                                       path_open, strerror(errno));
+               return(-errno);
+       }
+       tty_fd = fd;
+       if (opt_d) printf("slattach: tty_open: %s (fd=%d) ", path_open, fd);
+  } else {
+       tty_fd = 0;
+  }
+
+  /* Fetch the current state of the terminal. */
+  if (tty_get_state(&tty_saved) < 0) {
+       if (opt_q == 0) fprintf(stderr, _("slattach: tty_open: cannot get current state!\n"));
+       return(-errno);
+  }
+  tty_current = tty_saved;
+
+  /* Fetch the current line discipline of this terminal. */
+  if (tty_get_disc(&tty_sdisc) < 0) {
+       if (opt_q == 0) fprintf(stderr, _("slattach: tty_open: cannot get current line disc!\n"));
+       return(-errno);
+  } 
+  tty_ldisc = tty_sdisc;
+
+  /* Put this terminal line in a 8-bit transparent mode. */
+  if (opt_m == 0) {
+       if (tty_set_raw(&tty_current) < 0) {
+               if (opt_q == 0) fprintf(stderr, _("slattach: tty_open: cannot set RAW mode!\n"));
+               return(-errno);
+       }
+
+       /* Set the default speed if we need to. */
+       if (speed != NULL) {
+               if (tty_set_speed(&tty_current, speed) != 0) {
+                       if (opt_q == 0) fprintf(stderr, _("slattach: tty_open: cannot set %s bps!\n"),
+                                               speed);
+                       return(-errno);
+               }
+       }
+
+       /* Set up a completely 8-bit clean line. */
+       if (tty_set_databits(&tty_current, "8") ||
+           tty_set_stopbits(&tty_current, "1") ||
+           tty_set_parity(&tty_current, "N")) {
+               if (opt_q == 0) fprintf(stderr, _("slattach: tty_open: cannot set 8N1 mode!\n"));
+               return(-errno);
+       }
+
+       /* Set the new line mode. */
+       if ((fd = tty_set_state(&tty_current)) < 0) return(fd);
+  }
+
+  /* OK, line is open.  Do we need to "silence" it? */
+  (void) tty_nomesg(tty_fd);
+
+  return(0);
+}
+
+
+/* Catch any signals. */
+static void
+sig_catch(int sig)
+{
+/*  (void) signal(sig, sig_catch); */
+  tty_close();
+  exit(0);
+}
+
+
+static void
+usage(void)
+{
+  char *usage_msg = "Usage: slattach [-ehlLmnqv] "
+#ifdef SIOCSKEEPALIVE
+         "[-k keepalive] "
+#endif
+#ifdef SIOCSOUTFILL
+         "[-o outfill] "
+#endif
+         "[-c cmd] [-s speed] [-p protocol] tty | -\n"
+         "       slattach -V | --version\n";
+
+  fprintf(stderr, usage_msg);
+  exit(1);
+}
+
+
+static void 
+version(void)
+{
+    printf("%s\n%s\n%s\n", Release, Version, Signature);
+    exit(E_VERSION);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+  char path_buf[128];
+  char *path_dev;
+  char buff[128];
+  const char *speed = NULL;
+  const char *proto = DEF_PROTO;
+  const char *extcmd = NULL;
+  int s;
+  static struct option longopts[] = {
+    { "version", 0, NULL, 'V' },
+    { NULL, 0, NULL, 0 }
+  };
+
+  strcpy(path_buf, "");
+  path_dev = path_buf;
+
+  /* Scan command line for any arguments. */
+  opterr = 0;
+  while ((s = getopt_long(argc, argv, "c:ehlLmnp:qs:vdVk:o:", longopts, NULL)) != EOF) switch(s) {
+       case 'c':
+               extcmd = optarg;
+               break;
+
+       case 'e':
+               opt_e = 1 - opt_e;
+               break;
+
+       case 'h':
+               opt_h = 1 - opt_h;
+               break;
+
+#ifdef SIOCSKEEPALIVE
+       case 'k':
+               opt_k = atoi(optarg);
+               break;
+#endif
+
+       case 'L':
+               opt_L = 1 - opt_L;
+               break;
+
+       case 'l':
+               opt_l = 1 - opt_l;
+               break;
+
+       case 'm':
+               opt_m = 1 - opt_m;
+               break;
+
+       case 'n':
+               opt_n = 1 - opt_n;
+               break;
+
+#ifdef SIOCSOUTFILL
+       case 'o':
+               opt_o = atoi(optarg);
+               break;
+#endif
+
+       case 'p':
+               proto = optarg;
+               break;
+
+       case 'q':
+               opt_q = 1 - opt_q;
+               break;
+
+       case 's':
+               speed = optarg;
+               break;
+
+       case 'd':
+               opt_d = 1 - opt_d;
+               break;
+
+       case 'v':
+               opt_v = 1 - opt_v;
+               break;
+
+        case 'V':
+               version();
+               /*NOTREACHED*/
+
+       default:
+               usage();
+               /*NOTREACHED*/
+  }
+  
+  if (setvbuf(stdout,0,_IOLBF,0)) {
+       if (opt_q == 0) fprintf(stderr, _("slattach: setvbuf(stdout,0,_IOLBF,0) : %s\n"),
+                               strerror(errno));
+       exit(1);
+  }
+
+  activate_init();
+
+  if (!strcmp(proto, "tty"))
+       opt_m++;
+
+  /* Is a terminal given? */
+  if (optind != (argc - 1)) usage();
+  safe_strncpy(path_buf, argv[optind], sizeof(path_buf));
+  if (!strcmp(path_buf, "-")) {
+       opt_e = 1;
+       path_dev = NULL;
+       if (tty_open(NULL, speed) < 0) { return(3); }
+  } else {
+       path_dev = path_buf;
+       if (tty_open(path_dev, speed) < 0) { return(3); }
+  }
+
+  /* Start the correct protocol. */
+  if (!strcmp(proto, "tty")) {
+       tty_sdisc = N_TTY;
+       tty_close();
+       return(0);
+  }
+  if (activate_ld(proto, tty_fd))
+        return(1);
+  if ((opt_v == 1) || (opt_d == 1)) {
+        if (tty_get_name(buff)) { return(3); }
+       printf(_("%s started"), proto);
+       if (path_dev != NULL) printf(_(" on %s"), path_dev);
+       printf(_(" interface %s\n"), buff);
+  }
+
+  /* Configure keepalive and outfill. */
+#ifdef SIOCSKEEPALIVE
+  if (opt_k && (ioctl(tty_fd, SIOCSKEEPALIVE, &opt_k) < 0))
+         fprintf(stderr, "slattach: ioctl(SIOCSKEEPALIVE): %s\n", strerror(errno));
+#endif
+#ifdef SIOCSOUTFILL
+  if (opt_o && (ioctl(tty_fd, SIOCSOUTFILL, &opt_o) < 0))
+         fprintf(stderr, "slattach: ioctl(SIOCSOUTFILL): %s\n", strerror(errno));
+#endif
+
+  (void) signal(SIGHUP, sig_catch);
+  (void) signal(SIGINT, sig_catch);
+  (void) signal(SIGQUIT, sig_catch);
+  (void) signal(SIGTERM, sig_catch);
+
+  /* Wait until we get killed if hanging on a terminal. */
+  if (opt_e == 0) {
+       while(1) {
+               if(opt_h == 1) { /* hangup on carrier loss */
+                       int n = 0;
+
+                       ioctl(tty_fd, TIOCMGET, &n);
+                       if(!(n & TIOCM_CAR))
+                               break;
+                       sleep(15);
+               }
+               else
+                       sleep(60);
+       };
+
+       tty_close();
+       if(extcmd)      /* external command on exit */
+               system(extcmd);
+  }
+  exit(0);
+}
diff --git a/statistics.c b/statistics.c
new file mode 100644 (file)
index 0000000..a878df8
--- /dev/null
@@ -0,0 +1,381 @@
+/*
+ * Copyright 1997,1999,2000 Andi Kleen. Subject to the GPL. 
+ * $Id: statistics.c,v 1.14 2001/02/02 18:01:23 pb Exp $
+ * 19980630 - i18n - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 
+ * 19981113 - i18n fixes - Arnaldo Carvalho de Melo <acme@conectiva.com.br> 
+ * 19990101 - added net/netstat, -t, -u, -w supprt - Bernd Eckenfels 
+ */
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "config.h"
+#include "intl.h"
+
+/* #define WARN 1 */
+
+#ifdef WARN
+#define UFWARN(x) x
+#else
+#define UFWARN(x)
+#endif
+
+int print_static,f_raw,f_tcp,f_udp,f_unknown = 1;
+
+enum State {
+    number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
+    MaxState
+};
+
+#define normal number
+
+struct entry {
+    char *title;
+    char *out;
+    enum State type;
+};
+
+struct statedesc { 
+    int indent;
+    char *title; 
+}; 
+
+struct statedesc states[] = { 
+    [number] = { 4, NULL },
+    [opt_number] = { 4, NULL }, 
+    [i_forward] = { 4, NULL },
+    [i_inp_icmp] = { 8, N_("ICMP input histogram:") },
+    [i_outp_icmp] = { 8, N_("ICMP output histogram:") },
+    [MaxState] = {0},
+}; 
+
+static enum State state;
+
+#define I_STATIC (1<<16)       /* static configuration option. */
+#define I_TITLE  (1<<17)
+
+/* 
+ * XXX check against the snmp mib rfc.
+ *
+ * Don't mark the first field as translatable! It's a snmp MIB standard.
+ * - acme
+ */
+struct entry Iptab[] =
+{
+    {"Forwarding", N_("Forwarding is %s"), i_forward | I_STATIC},
+    {"DefaultTTL", N_("Default TTL is %u"), number | I_STATIC},
+    {"InReceives", N_("%u total packets received"), number},
+    {"InHdrErrors", N_("%u with invalid headers"), opt_number},
+    {"InAddrErrors", N_("%u with invalid addresses"), opt_number},
+    {"ForwDatagrams", N_("%u forwarded"), number},
+    {"InUnknownProtos", N_("%u with unknown protocol"), opt_number},
+    {"InDiscards", N_("%u incoming packets discarded"), number},
+    {"InDelivers", N_("%u incoming packets delivered"), number},
+    {"OutRequests", N_("%u requests sent out"), number},       /*? */
+    {"OutDiscards", N_("%u outgoing packets dropped"), opt_number},
+    {"OutNoRoutes", N_("%u dropped because of missing route"), opt_number},
+    {"ReasmTimeout", N_("%u fragments dropped after timeout"), opt_number},
+    {"ReasmReqds", N_("%u reassemblies required"), opt_number},        /* ? */
+    {"ReasmOKs", N_("%u packets reassembled ok"), opt_number},
+    {"ReasmFails", N_("%u packet reassembles failed"), opt_number},
+    {"FragOKs", N_("%u fragments received ok"), opt_number},
+    {"FragFails", N_("%u fragments failed"), opt_number},
+    {"FragCreates", N_("%u fragments created"), opt_number}
+};
+
+struct entry Icmptab[] =
+{
+    {"InMsgs", N_("%u ICMP messages received"), number},
+    {"InErrors", N_("%u input ICMP message failed."), number},
+    {"InDestUnreachs", N_("destination unreachable: %u"), i_inp_icmp | I_TITLE},
+    {"InTimeExcds", N_("timeout in transit: %u"), i_inp_icmp | I_TITLE},
+    {"InParmProbs", N_("wrong parameters: %u"), i_inp_icmp | I_TITLE}, /*? */
+    {"InSrcQuenchs", N_("source quenches: %u"), i_inp_icmp | I_TITLE},
+    {"InRedirects", N_("redirects: %u"), i_inp_icmp | I_TITLE},
+    {"InEchos", N_("echo requests: %u"), i_inp_icmp | I_TITLE},
+    {"InEchoReps", N_("echo replies: %u"), i_inp_icmp | I_TITLE},
+    {"InTimestamps", N_("timestamp request: %u"), i_inp_icmp | I_TITLE},
+    {"InTimestampReps", N_("timestamp reply: %u"), i_inp_icmp | I_TITLE},
+    {"InAddrMasks", N_("address mask request: %u"), i_inp_icmp | I_TITLE},     /*? */
+    {"InAddrMaskReps", N_("address mask replies: %u"), i_inp_icmp | I_TITLE},  /*? */
+    {"OutMsgs", N_("%u ICMP messages sent"), number},
+    {"OutErrors", N_("%u ICMP messages failed"), number},
+    {"OutDestUnreachs", N_("destination unreachable: %u"), i_outp_icmp | I_TITLE},
+    {"OutTimeExcds", N_("time exceeded: %u"), i_outp_icmp | I_TITLE},
+    {"OutParmProbs", N_("wrong parameters: %u"), i_outp_icmp | I_TITLE},       /*? */
+    {"OutSrcQuenchs", N_("source quench: %u"), i_outp_icmp | I_TITLE},
+    {"OutRedirects", N_("redirect: %u"), i_outp_icmp | I_TITLE},
+    {"OutEchos", N_("echo request: %u"), i_outp_icmp | I_TITLE},
+    {"OutEchoReps", N_("echo replies: %u"), i_outp_icmp | I_TITLE},
+    {"OutTimestamps", N_("timestamp requests: %u"), i_outp_icmp | I_TITLE},
+    {"OutTimestampReps", N_("timestamp replies: %u"), i_outp_icmp | I_TITLE},
+    {"OutAddrMasks", N_("address mask requests: %u"), i_outp_icmp | I_TITLE},
+    {"OutAddrMaskReps", N_("address mask replies: %u"), i_outp_icmp | I_TITLE},
+};
+
+struct entry Tcptab[] =
+{
+    {"RtoAlgorithm", N_("RTO algorithm is %s"), i_rto_alg | I_STATIC},
+    {"RtoMin", "", number},
+    {"RtoMax", "", number},
+    {"MaxConn", "", number},
+    {"ActiveOpens", N_("%u active connections openings"), number},
+    {"PassiveOpens", N_("%u passive connection openings"), number},
+    {"AttemptFails", N_("%u failed connection attempts"), number},
+    {"EstabResets", N_("%u connection resets received"), number},
+    {"CurrEstab", N_("%u connections established"), number},
+    {"InSegs", N_("%u segments received"), number},
+    {"OutSegs", N_("%u segments send out"), number},
+    {"RetransSegs", N_("%u segments retransmited"), number},
+    {"InErrs", N_("%u bad segments received."), number},
+    {"OutRsts", N_("%u resets sent"), number},
+};
+
+struct entry Udptab[] =
+{
+    {"InDatagrams", N_("%u packets received"), number},
+    {"NoPorts", N_("%u packets to unknown port received."), number},
+    {"InErrors", N_("%u packet receive errors"), number},
+    {"OutDatagrams", N_("%u packets sent"), number},
+};
+
+struct entry Tcpexttab[] =
+{
+    {"SyncookiesSent", N_("%u SYN cookies sent"), opt_number},
+    {"SyncookiesRecv", N_("%u SYN cookies received"), opt_number},
+    {"SyncookiesFailed", N_("%u invalid SYN cookies received"), opt_number},
+
+    { "EmbryonicRsts", N_("%u resets received for embryonic SYN_RECV sockets"),
+      opt_number },  
+    { "PruneCalled", N_("%u packets pruned from receive queue because of socket"
+                       " buffer overrun"), opt_number },  
+    /* obsolete: 2.2.0 doesn't do that anymore */
+    { "RcvPruned", N_("%u packets pruned from receive queue"), opt_number },
+    { "OfoPruned", N_("%u packets dropped from out-of-order queue because of"
+                     " socket buffer overrun"), opt_number }, 
+    { "OutOfWindowIcmps", N_("%u ICMP packets dropped because they were "
+                            "out-of-window"), opt_number }, 
+    { "LockDroppedIcmps", N_("%u ICMP packets dropped because"
+                            " socket was locked"), opt_number },
+    { "TW", N_("%u TCP sockets finished time wait in fast timer"), opt_number },
+    { "TWRecycled", N_("%u time wait sockets recycled by time stamp"), opt_number }, 
+    { "TWKilled", N_("%u TCP sockets finished time wait in slow timer"), opt_number },
+    { "PAWSPassive", N_("%u passive connections rejected because of"
+                       " time stamp"), opt_number },
+    { "PAWSActive", N_("%u active connections rejected because of "
+                      "time stamp"), opt_number },
+    { "PAWSEstab", N_("%u packets rejects in established connections because of"
+                     " timestamp"), opt_number },
+    { "DelayedACKs", N_("%u delayed acks sent"), opt_number },
+    { "DelayedACKLocked", N_("%u delayed acks further delayed because of"
+                            " locked socket"), opt_number },
+    { "DelayedACKLost", N_("Quick ack mode was activated %u times"), opt_number },
+    { "ListenOverflows", N_("%u times the listen queue of a socket overflowed"),
+      opt_number },
+    { "ListenDrops", N_("%u SYNs to LISTEN sockets ignored"), opt_number },
+    { "TCPPrequeued", N_("%u packets directly queued to recvmsg prequeue."), 
+      opt_number },
+    { "TCPDirectCopyFromBacklog", N_("%u packets directly received"
+                                    " from backlog"), opt_number },
+    { "TCPDirectCopyFromPrequeue", N_("%u packets directly received"
+                                     " from prequeue"), opt_number },
+    { "TCPPrequeueDropped", N_("%u packets dropped from prequeue"), opt_number },
+    { "TCPHPHits", N_("%u packets header predicted"), number },
+    { "TCPHPHitsToUser", N_("%u packets header predicted and "
+                           "directly queued to user"), opt_number },
+    { "SockMallocOOM", N_("Ran %u times out of system memory during " 
+                         "packet sending"), opt_number }, 
+};
+
+struct tabtab {
+    char *title;
+    struct entry *tab;
+    size_t size;
+    int *flag; 
+};
+
+struct tabtab snmptabs[] =
+{
+    {"Ip", Iptab, sizeof(Iptab), &f_raw},
+    {"Icmp", Icmptab, sizeof(Icmptab), &f_raw},
+    {"Tcp", Tcptab, sizeof(Tcptab), &f_tcp},
+    {"Udp", Udptab, sizeof(Udptab), &f_udp},
+    {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp},
+    {NULL}
+};
+
+/* XXX IGMP */
+
+int cmpentries(const void *a, const void *b)
+{
+    return strcmp(((struct entry *) a)->title, ((struct entry *) b)->title);
+}
+
+void printval(struct tabtab *tab, char *title, int val)
+{
+    struct entry *ent = NULL, key;
+    int type;
+    char buf[512];
+
+    key.title = title;
+       if (tab->tab) 
+           ent = bsearch(&key, tab->tab, tab->size / sizeof(struct entry),
+                         sizeof(struct entry), cmpentries);
+    if (!ent) {                        /* try our best */
+       printf("%*s%s: %d\n", states[state].indent, "", title, val);
+       return;
+    }
+    type = ent->type;
+    if (type & I_STATIC) {
+       type &= ~I_STATIC;
+       if (!print_static)
+           return;
+    }
+    if (*ent->out == '\0')
+       return;
+
+    if (type & I_TITLE) {
+       type &= ~I_TITLE;
+       if (state != type)
+           printf("%*s%s\n", states[state].indent, "", _(states[type].title));
+    }
+    buf[0] = '\0';
+    switch (type) {
+    case opt_number:
+       if (val == 0) 
+           break;
+       /*FALL THOUGH*/
+    case number:
+       snprintf(buf, sizeof(buf), _(ent->out), val);
+       break;
+    case i_forward:
+       type = normal;
+       snprintf(buf, sizeof(buf), _(ent->out), val == 2 ? _("enabled") : _("disabled"));
+       break;
+    case i_outp_icmp:
+    case i_inp_icmp:
+       if (val > 0)
+           snprintf(buf, sizeof(buf), _(ent->out), val);
+       break;
+    case i_rto_alg:            /* XXXX */
+       break;
+    default:
+       abort();
+    }
+    if (buf[0])
+       printf("%*s%s\n", states[type].indent, "", buf);
+
+    state = type;
+}
+
+struct tabtab *newtable(struct tabtab *tabs, char *title)
+{
+    struct tabtab *t;
+       static struct tabtab dummytab;
+       
+    for (t = tabs; t->title; t++) {
+               if (!strcmp(title, t->title)) {
+               if (*(t->flag))
+                               printf("%s:\n", _(title));
+                   state = normal;
+                       return t;
+               }
+       }
+       if (!f_unknown) 
+               return NULL; 
+       printf("%s:\n", _(title));
+       dummytab.title = title;
+       dummytab.flag = &f_unknown; 
+       return &dummytab;
+}
+
+void process_fd(FILE *f)
+{
+    char buf1[1024], buf2[1024];
+    char *sp, *np, *p;
+    while (fgets(buf1, sizeof buf1, f)) {
+       int endflag;
+       struct tabtab *tab;
+
+       if (!fgets(buf2, sizeof buf2, f))
+           break;
+       sp = strchr(buf1, ':');
+       np = strchr(buf2, ':');
+       if (!np || !sp)
+           goto formaterr;
+       *sp = '\0';
+
+       tab = newtable(snmptabs, buf1);
+       if (tab == NULL) {
+               printf("unknown %s\n", buf1);
+               continue;
+       }
+       np++;
+       sp++;
+
+       endflag = 0;
+       while (!endflag) {
+           sp += strspn(sp, " \t\n"); 
+           np += strspn(np, " \t\n"); 
+           /*if (*np == '\0') goto formaterr; */
+
+           p = sp+strcspn(sp, " \t\n");
+           if (*p == '\0')
+               endflag = 1;
+           *p = '\0';
+
+           if (*sp != '\0' && *(tab->flag))    
+               printval(tab, sp, strtoul(np, &np, 10));
+
+           sp = p + 1;
+       }
+    }
+  return;
+  
+formaterr:
+  perror(_("error parsing /proc/net/snmp"));
+  return;
+}
+
+
+void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+{
+    FILE *f;
+
+    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
+    
+    f = fopen("/proc/net/snmp", "r");
+    if (!f) {
+       perror(_("cannot open /proc/net/snmp"));
+       return;
+    }
+    process_fd(f);
+
+    if (ferror(f))
+       perror("/proc/net/snmp");
+
+    fclose(f);
+
+    f = fopen("/proc/net/netstat", "r");
+
+    if (f) {
+       process_fd(f);
+
+        if (ferror(f))
+           perror("/proc/net/netstat");
+    
+        fclose(f);
+    }
+    return;
+}
+    
+
+void inittab(void)
+{
+    struct tabtab *t;
+
+    /* we sort at runtime because I'm lazy ;) */
+    for (t = snmptabs; t->title; t++)
+       qsort(t->tab, t->size / sizeof(struct entry),
+             sizeof(struct entry), cmpentries);
+}