pax_global_header00006660000000000000000000000064133143656050014520gustar00rootroot0000000000000052 comment=aebd88ef8d6e15f673b62a649a50d07ed727c888 net-tools-1.60+git20180626.aebd88e/000077500000000000000000000000001331436560500162215ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/.cvsignore000066400000000000000000000002201331436560500202130ustar00rootroot00000000000000arp hostname ifconfig ipmaddr iptunnel netstat plipconfig rarp route slattach version.h config.make config.status config.h nameif mii-tool .git net-tools-1.60+git20180626.aebd88e/.gitignore000066400000000000000000000004231331436560500202100ustar00rootroot00000000000000*.o *.diff *.patch *.rej *.orig .gdb_history .gdbinit core *.gdb /config.h /config.make /config.status /net-tools-*.tar* /lib/libnet-tools.a /po/*.mo /version.h /arp /hostname /ifconfig /ipmaddr /iptunnel /mii-tool /nameif /netstat /plipconfig /rarp /route /slattach net-tools-1.60+git20180626.aebd88e/ABOUT-NLS000066400000000000000000000213471331436560500174570ustar00rootroot00000000000000Notes 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. net-tools-1.60+git20180626.aebd88e/COPYING000066400000000000000000000432541331436560500172640ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. 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.) 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. 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. 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 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. Copyright (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. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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) year 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. , 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 Lesser General Public License instead of this License. net-tools-1.60+git20180626.aebd88e/INSTALLING000066400000000000000000000023411331436560500176100ustar00rootroot00000000000000net-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-1.60+git20180626.aebd88e/Makefile000066400000000000000000000161331331436560500176650ustar00rootroot00000000000000# # 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. # # Author: Bernd Eckenfels # Copyright 1995-1996 Bernd Eckenfels, Germany # # URLs: http://net-tools.sourceforge.net/ # # Based on: Fred N. van Kempen, # Copyright 1988-1993 MicroWalt Corporation # # Modifications: # Extensively modified from 01/21/94 onwards by # Alan Cox # Copyright 1993-1994 Swansea University Computer Society # # Be careful! # This Makefile doesn't describe complete dependencies for all include files. # If you change include files you might need to do make clean. # # set the base of the Installation # BASEDIR = /mnt BASEDIR ?= $(DESTDIR) BINDIR ?= /bin SBINDIR ?= /sbin # path to the net-lib support library. Default: lib NET_LIB_PATH = lib NET_LIB_NAME = net-tools PROGS := ifconfig netstat route nameif -include config.make ifeq ($(HAVE_ARP_TOOLS),1) PROGS += arp rarp endif ifeq ($(HAVE_HOSTNAME_TOOLS),1) PROGS += hostname endif ifeq ($(HAVE_IP_TOOLS),1) PROGS += iptunnel ipmaddr endif ifeq ($(HAVE_MII),1) PROGS += mii-tool endif ifeq ($(HAVE_PLIP_TOOLS),1) PROGS += plipconfig endif ifeq ($(HAVE_SERIAL_TOOLS),1) PROGS += slattach endif # Compiler and Linker Options CFLAGS ?= -O2 -g CFLAGS += -Wall CFLAGS += -fno-strict-aliasing # code needs a lot of work before strict aliasing is safe CPPFLAGS += -D_GNU_SOURCE # Turn on transparent support for LFS CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE ifeq ($(HAVE_AFDECnet),1) DNLIB = -ldnet endif ifeq ($(origin CC), undefined) CC = gcc endif LD = $(CC) PKG_CONFIG ?= pkg-config # -------- end of user definitions -------- MAINTAINER = net-tools-devel@lists.sourceforge.net RELEASE = 2.10-alpha .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 ifeq ($(HAVE_SELINUX),1) SE_PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags libselinux) SE_PC_LIBS := $(shell $(PKG_CONFIG) --libs libselinux || echo -lselinux) SELIB = $(SE_PC_LIBS) CPPFLAGS += $(SE_PC_CFLAGS) endif CPPFLAGS += -I. -I$(TOPDIR)/include -I$(NET_LIB_PATH) LDFLAGS += -L$(NET_LIB_PATH) SUBDIRS = man/ $(NET_LIB_PATH)/ NLIB = -l$(NET_LIB_NAME) %.o: %.c config.h version.h intl.h lib/net-features.h $< $(CC) $(CFLAGS) $(CPPFLAGS) -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: rm -rf -- net-tools-$(RELEASE) git archive --prefix=net-tools-$(RELEASE)/ HEAD | tar xf - $(MAKE) -C net-tools-$(RELEASE)/po $@ tar cf - net-tools-$(RELEASE)/ | xz > net-tools-$(RELEASE).tar.xz rm -rf -- net-tools-$(RELEASE) distcheck: dist tar xf net-tools-$(RELEASE).tar.xz yes "" | $(MAKE) -C net-tools-$(RELEASE) config $(MAKE) -C net-tools-$(RELEASE) rm -rf -- net-tools-$(RELEASE) @printf "\nThe tarball is ready to go:\n%s\n" "`du -b net-tools-$(RELEASE).tar.xz`" 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: version.h @$(MAKE) -C $(NET_LIB_PATH) i18ndir: @$(MAKE) -C po # use libdir target for lib/ to avoid parallel build issues subdirs: libdir @for i in $(SUBDIRS:$(NET_LIB_PATH)/=); do $(MAKE) -C $$i || exit $$? ; done ifconfig: $(NET_LIB) ifconfig.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(NLIB) $(LDLIBS) nameif: $(NET_LIB) nameif.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) $(LDLIBS) hostname: hostname.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) $(LDLIBS) route: $(NET_LIB) route.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) $(LDLIBS) arp: $(NET_LIB) arp.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(NLIB) $(LDLIBS) rarp: $(NET_LIB) rarp.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(NLIB) $(LDLIBS) slattach: $(NET_LIB) slattach.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(NLIB) $(LDLIBS) plipconfig: $(NET_LIB) plipconfig.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(NLIB) $(LDLIBS) netstat: $(NET_LIB) netstat.o statistics.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(NLIB) $(SELIB) $(LDLIBS) iptunnel: $(NET_LIB) iptunnel.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(NLIB) $(LDLIBS) ipmaddr: $(NET_LIB) ipmaddr.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(NLIB) $(LDLIBS) mii-tool: $(NET_LIB) mii-tool.o $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB) $(LDLIBS) installbin: @echo @echo "######################################################" @echo "Notice: ifconfig and route are now installed into /bin" @echo "######################################################" @echo install -m 0755 -d ${BASEDIR}${SBINDIR} install -m 0755 -d ${BASEDIR}${BINDIR} install -m 0755 ifconfig ${BASEDIR}${BINDIR} install -m 0755 nameif ${BASEDIR}${SBINDIR} install -m 0755 netstat ${BASEDIR}${BINDIR} install -m 0755 route ${BASEDIR}${BINDIR} ifeq ($(HAVE_ARP_TOOLS),1) install -m 0755 arp ${BASEDIR}${SBINDIR} install -m 0755 rarp ${BASEDIR}${SBINDIR} endif ifeq ($(HAVE_HOSTNAME_TOOLS),1) install -m 0755 hostname ${BASEDIR}${BINDIR} ln -fs hostname $(BASEDIR)${BINDIR}/dnsdomainname ifeq ($(HAVE_HOSTNAME_SYMLINKS),1) ln -fs hostname $(BASEDIR)${BINDIR}/ypdomainname ln -fs hostname $(BASEDIR)${BINDIR}/nisdomainname ln -fs hostname $(BASEDIR)${BINDIR}/domainname endif ifeq ($(HAVE_AFDECnet),1) ln -fs hostname $(BASEDIR)${BINDIR}/nodename endif endif ifeq ($(HAVE_IP_TOOLS),1) install -m 0755 ipmaddr $(BASEDIR)${SBINDIR} install -m 0755 iptunnel $(BASEDIR)${SBINDIR} endif ifeq ($(HAVE_MII),1) install -m 0755 mii-tool $(BASEDIR)${SBINDIR} endif ifeq ($(HAVE_PLIP_TOOLS),1) install -m 0755 plipconfig $(BASEDIR)${SBINDIR} endif ifeq ($(HAVE_SERIAL_TOOLS),1) install -m 0755 slattach $(BASEDIR)${SBINDIR} endif savebin: @for i in ${BASEDIR}${SBINDIR}/arp ${BASEDIR}${SBINDIR}/ifconfig \ ${BASEDIR}${BINDIR}/netstat \ ${BASEDIR}${SBINDIR}/rarp ${BASEDIR}${SBINDIR}/route \ ${BASEDIR}${BINDIR}/hostname ${BASEDIR}${BINDIR}/ypdomainname \ ${BASEDIR}${BINDIR}/dnsdomainname ${BASEDIR}${BINDIR}/nisdomainname \ ${BASEDIR}${BINDIR}/domainname ; do \ [ -f $$i ] && cp -f $$i $$i.old ; done ; echo Saved. installdata: $(MAKE) -C man install $(MAKE) -C po install # End of Makefile. net-tools-1.60+git20180626.aebd88e/README000066400000000000000000000046011331436560500171020ustar00rootroot00000000000000 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, mii-tool) and advanced aspects of IP configuration (iptunnel, ipmaddr). Please include the output of "program --version" when reporting bugs. Contents: README This file. INSTALLING Installation instructions. COPYING Your free copy of the GNU General Public License. TODO Some things that need to be done. The Homepage (including Git repository, release downloads, bug tracker and mailing list) is hosted by SourceForge.net. Please consider to join the project if you want to contribute: https://sourceforge.net/projects/net-tools/ Notes ----- This is net-tools 1.6x. You need kernel 2.0 or later to use these programs. These programs should compile cleanly with both glibc (version 2.0 or 2.1) and libc5, though support for libc5 is not well tested. The NLS support was changed from catgets to GNU gettext by Arnaldo Carvalho de Melo in June, 1998, to make the source more readable. Translations to brazilian portuguese (pt_BR), German (de), Estonian (ee), Czech (cz) and French (fr) are available. Others are welcome! route/netstat -r do not yet support different address families cleanly. IPX/DDP/AX25 people, please feel free to add the code. ifconfig now supports changing media types for interfaces. This requires a version 2.2 kernel, and many devices do not support it yet. The tools now support the layout of the 2.2 kernel /proc files (Bernd 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. For this release, the localized man pages are installed with UTF-8 encoding. Phil Blundell philb@gnu.org Bernd Eckenfels net-tools@lina.inka.de net-tools-1.60+git20180626.aebd88e/RPM/000077500000000000000000000000001331436560500166575ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/RPM/README000066400000000000000000000001441331436560500175360ustar00rootroot00000000000000This directory contains some files that may be of use to people who want to build a net-tools RPM. net-tools-1.60+git20180626.aebd88e/RPM/net-tools-1.45-config.patch000066400000000000000000000017761331436560500234670ustar00rootroot00000000000000diff -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 net-tools-1.60+git20180626.aebd88e/RPM/net-tools.spec000066400000000000000000000047011331436560500214610ustar00rootroot00000000000000Summary: 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 - update to 1.50 - add new stuff to %files and strip it in %install * Thu Nov 26 1998 Phil Blundell - update to 1.48. * Thu Nov 12 1998 Jeff Johnson - update to 1.47. * Wed Sep 2 1998 Jeff Johnson - update to 1.46 * Thu Jul 9 1998 Jeff Johnson - build root - include ethers.5 * Thu Jun 11 1998 Aron Griffis - upgraded to 1.45 - patched hostname.c to initialize buffer - patched ax25.c to use kernel headers * Fri May 01 1998 Prospector System - translations modified for de, fr, tr * Fri Feb 27 1998 Jason Spangler - added config patch * Fri Feb 27 1998 Jason Spangler - changed to net-tools 1.432 - removed old glibc 2.1 patch * Wed Oct 22 1997 Erik Troan - added extra patches for glibc 2.1 * Tue Oct 21 1997 Erik Troan - included complete set of network protocols (some were removed for initial glibc work) * Wed Sep 03 1997 Erik Troan - updated glibc patch for glibc 2.0.5 * Thu Jun 19 1997 Erik Troan - built against glibc - updated to 1.33 net-tools-1.60+git20180626.aebd88e/THANKS000066400000000000000000000004341331436560500171350ustar00rootroot00000000000000The following people have contributed over time to the net-tools project or to related files. Maik Broemme Kurt Garloff Arnaldo Carvalho de Melo, Lubomir Rintel (Fedora; bluetooth support updated) (please notify net-tools@lina.inka.de if you notice some omission). This is a TODO.net-tools-1.60+git20180626.aebd88e/TODO000066400000000000000000000026461331436560500167210ustar00rootroot00000000000000TODO 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, kissattach] 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 net-tools-1.60+git20180626.aebd88e/arp.c000066400000000000000000000525171331436560500171610ustar00rootroot00000000000000/* * 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.27 2009/09/06 22:50:11 vapier Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * * Author: Fred N. van Kempen, * * Changes: * (based on work from Fred N. van Kempen, ) * 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 ", * 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 #include #include #include /* #include */ /* #include */ #include #include #include #include #include #include #include #include #include #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" static char *Release = RELEASE; 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 */ const struct aftype *ap;/* current address family */ const 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(int); /* Delete an entry from the ARP cache. */ static int arp_del(char **args) { char host[128]; struct arpreq req; struct sockaddr_storage ss; struct sockaddr *sa = (struct sockaddr *)&ss; int flags = 0; int deleted = 0; 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, &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)); 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 ATF_DONTPUB req.arp_flags |= ATF_DONTPUB; #else ENOSUPP("arp", "ATF_DONTPUB"); #endif args++; continue; } if (!strcmp(*args, "auto")) { #ifdef ATF_MAGIC req.arp_flags |= ATF_MAGIC; #else ENOSUPP("arp", "ATF_MAGIC"); #endif args++; continue; } if (!strcmp(*args, "dev")) { if (*++args == NULL) usage(E_OPTERR); safe_strncpy(device, *args, sizeof(device)); args++; continue; } if (!strcmp(*args, "netmask")) { if (*++args == NULL) usage(E_OPTERR); if (strcmp(*args, "255.255.255.255") != 0) { safe_strncpy(host, *args, (sizeof host)); if (ap->input(0, host, &ss) < 0) { ap->herror(host); return (-1); } memcpy((char *) &req.arp_netmask, (char *) sa, sizeof(struct sockaddr)); req.arp_flags |= ATF_NETMASK; } args++; continue; } usage(E_OPTERR); } // if neighter priv nor pub is given, work on both if (flags == 0) flags = 3; safe_strncpy(req.arp_dev, device, sizeof(req.arp_dev)); /* unfortuatelly the kernel interface does not allow us to delete private entries anlone, so we need this hack to avoid "not found" errors if we try both. */ deleted = 0; /* Call the kernel. */ if (flags & 2) { if (opt_v) fprintf(stderr, "arp: SIOCDARP(dontpub)\n"); if (ioctl(sockfd, SIOCDARP, &req) < 0) { if ((errno == ENXIO) || (errno == ENOENT)) { if (flags & 1) goto dontpub; printf(_("No ARP entry for %s\n"), host); return (-1); } perror("SIOCDARP(dontpub)"); return (-1); } else deleted = 1; } if (!deleted && (flags & 1)) { dontpub: req.arp_flags |= ATF_PUBL; if (opt_v) fprintf(stderr, "arp: SIOCDARP(pub)\n"); if (ioctl(sockfd, SIOCDARP, &req) < 0) { if ((errno == ENXIO) || (errno == ENOENT)) { 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, const struct hwtype *hw) { struct ifreq ifr; const struct hwtype *xhw; safe_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); } 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_storage ss; struct sockaddr *sa = (struct sockaddr *)&ss; 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, &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)); /* 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++, &ss) < 0) { fprintf(stderr, _("arp: invalid hardware address\n")); return (-1); } memcpy(&req.arp_ha, sa, sizeof(*sa)); } /* 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 ATF_DONTPUB flags |= ATF_DONTPUB; #else ENOSUPP("arp", "ATF_DONTPUB"); #endif args++; continue; } if (!strcmp(*args, "auto")) { #ifdef ATF_MAGIC flags |= ATF_MAGIC; #else ENOSUPP("arp", "ATF_MAGIC"); #endif args++; continue; } if (!strcmp(*args, "dev")) { if (*++args == NULL) usage(E_OPTERR); safe_strncpy(device, *args, sizeof(device)); args++; continue; } if (!strcmp(*args, "netmask")) { if (*++args == NULL) usage(E_OPTERR); if (strcmp(*args, "255.255.255.255") != 0) { safe_strncpy(host, *args, (sizeof host)); if (ap->input(0, host, &ss) < 0) { ap->herror(host); return (-1); } memcpy((char *) &req.arp_netmask, (char *) sa, sizeof(struct sockaddr)); flags |= ATF_NETMASK; } args++; continue; } usage(E_OPTERR); } /* Fill in the remainder of the request. */ req.arp_flags = flags; safe_strncpy(req.arp_dev, device, sizeof(req.arp_dev)); /* 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(const char *name, int type, int arp_flags, const char *hwa, const char *mask, const char *dev) { static int title = 0; const 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 ATF_MAGIC if (arp_flags & ATF_MAGIC) strcat(flags, "A"); #endif #ifdef 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(const char *name, const char *ip, int type, int arp_flags, const char *hwa, const char *mask, const char *dev) { const 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(_(" ")); } 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("PUB "); #ifdef ATF_MAGIC if (arp_flags & ATF_MAGIC) printf("AUTO "); #endif #ifdef 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_storage ss; char ip[100]; char hwa[100]; char mask[100]; char line[200]; char dev[100]; int type, flags; FILE *fp; const 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, &ss) < 0) { ap->herror(host); return (-1); } safe_strncpy(host, ap->sprint(&ss, 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) { safe_strncpy(mask, "-", sizeof(mask)); safe_strncpy(dev, "-", sizeof(dev)); /* Read the ARP cache entries. */ for (; fgets(line, sizeof(line), fp);) { num = sscanf(line, "%s 0x%x 0x%x %99s %99s %99s\n", ip, &type, &flags, hwa, mask, dev); if (num < 4) break; if (num == 5) { /* * This happens for incomplete ARP entries for which there is * no hardware address in the line. */ num = sscanf(line, "%s 0x%x 0x%x %99s %99s\n", ip, &type, &flags, mask, dev); hwa[0] = 0; } 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, &ss) < 0) hostname = ip; else hostname = ap->sprint(&ss, 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) { printf("%s\n%s\n", Release, Features); exit(E_VERSION); } static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage:\n arp [-vn] [] [-i ] [-a] [] <-Display ARP cache\n")); fprintf(fp, _(" arp [-v] [-i ] -d [pub] <-Delete ARP entry\n")); fprintf(fp, _(" arp [-vnD] [] [-i ] -f [] <-Add entry from file\n")); fprintf(fp, _(" arp [-v] [] [-i ] -s [temp] <-Add entry\n")); fprintf(fp, _(" arp [-v] [] [-i ] -Ds [netmask ] pub <-''-\n\n")); fprintf(fp, _(" -a display (all) hosts in alternative (BSD) style\n")); fprintf(fp, _(" -e display (all) hosts in default (Linux) style\n")); fprintf(fp, _(" -s, --set set a new ARP entry\n")); fprintf(fp, _(" -d, --delete delete a specified entry\n")); fprintf(fp, _(" -v, --verbose be verbose\n")); fprintf(fp, _(" -n, --numeric don't resolve names\n")); fprintf(fp, _(" -i, --device specify network interface (e.g. eth0)\n")); fprintf(fp, _(" -D, --use-device read from given device\n")); fprintf(fp, _(" -A, -p, --protocol specify protocol family\n")); fprintf(fp, _(" -f, --file read new entries from file or from /etc/ethers\n\n")); fprintf(fp, _(" =Use '-H ' to specify hardware address type. Default: %s\n"), DFLT_HW); fprintf(fp, _(" List of possible hardware types (which support ARP):\n")); print_hwlist(1); /* 1 = ARPable */ exit(rc); } 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 'h': usage(E_USAGE); case '?': default: usage(E_OPTERR); } 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(E_OPTERR); } exit(what); } net-tools-1.60+git20180626.aebd88e/config.in000066400000000000000000000070731331436560500200250ustar00rootroot00000000000000# # 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, # Copyright 1988-1993 MicroWalt Corporation # # Bernd 'eckes' Eckenfels # Arnaldo Carvalho de Melo # 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 y 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 y 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 y bool 'Bluetooth protocol family' HAVE_AFBLUETOOTH 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 n bool 'Token ring (generic) support' HAVE_HWTR n bool 'AX25 (packet radio) support' HAVE_HWAX25 y bool 'Rose (packet radio) support' HAVE_HWROSE y 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 y bool 'FDDI (generic) support' HAVE_HWFDDI y bool 'HIPPI (generic) support' HAVE_HWHIPPI y bool 'Ash hardware support' HAVE_HWASH y bool '(Cisco)-HDLC/LAPB support' HAVE_HWHDLCLAPB y bool 'IrDA support' HAVE_HWIRDA y bool 'Econet hardware support' HAVE_HWEC n bool 'Generic EUI-64 hardware support' HAVE_HWEUI64 y bool 'InfiniBand hardware support' HAVE_HWIB y * * * Other Features. * bool 'IP Masquerading support' HAVE_FW_MASQUERADE y bool 'Build arp and rarp' HAVE_ARP_TOOLS y bool 'Build hostname' HAVE_HOSTNAME_TOOLS y bool 'Install hostname NIS/YP symlinks' HAVE_HOSTNAME_SYMLINKS y bool 'Build iptunnel and ipmaddr' HAVE_IP_TOOLS y bool 'Build mii-tool' HAVE_MII y bool 'Build plipconfig' HAVE_PLIP_TOOLS y bool 'Build slattach' HAVE_SERIAL_TOOLS y bool 'SELinux support' HAVE_SELINUX n net-tools-1.60+git20180626.aebd88e/configure.sh000077500000000000000000000100241331436560500205360ustar00rootroot00000000000000#!/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, # Johannes Grosen, # Copyright 1988-1993 MicroWalt Corporation # # Modified: # {1.65} Bernd eckes Eckenfels # 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.sh requires bash" 1>&2; exit 1; } cat <&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 state. # > 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 net-tools-1.60+git20180626.aebd88e/hostname.c000066400000000000000000000271161331436560500202120ustar00rootroot00000000000000/* * 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.101 (2003-10-11) * * Author: Peter Tobias * * Changes: * {1.90} Peter Tobias : Added -a and -i options. * {1.91} Bernd Eckenfels : -v,-V rewritten, long_opts (major rewrite), usage. *19960120 {1.95} Bernd Eckenfels : -y/nisdomainname - support for get/setdomainname added *19960218 {1.96} Bernd Eckenfels : netinet/in.h added *19980629 {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 *20031011 {1.101} Maik Broemme: gcc 3.x fixes (default: break) * * 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 #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "version.h" #include "net-support.h" #include "../intl.h" #if HAVE_AFINET6 #include /* for PF_INET6 */ #include /* for inet_ntop */ #endif #if HAVE_AFDECnet #include #endif static char *Release = RELEASE; static char *program_name; static int opt_v; static void sethname(char *); static void setdname(char *); static void showhname(char *, int); 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 don't have permission to set the node name\n"), program_name); break; case EINVAL: fprintf(stderr, _("%s: name too long\n"), program_name); break; default: break; } 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 don't have permission to set the host name\n"), program_name); break; case EINVAL: fprintf(stderr, _("%s: name too long\n"), program_name); break; } 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 don't have permission to set the domain name\n"), program_name); break; case EINVAL: fprintf(stderr, _("%s: name too long\n"), program_name); break; } exit(1); }; } static void showhname(char *hname, int c) { struct hostent *hp; register char *p, **alias; #if HAVE_AFINET6 char addr[INET6_ADDRSTRLEN + 1]; #else char addr[INET_ADDRSTRLEN + 1]; #endif socklen_t len; char **addrp; bool isfirst = true; /* We use -1 so we can guarantee the buffer is NUL terminated. */ len = sizeof(addr) - 1; addr[len] = '\0'; if (opt_v) fprintf(stderr, _("Resolving `%s' ...\n"), hname); if ( #if HAVE_AFINET6 !(hp = gethostbyname2(hname, PF_INET6)) && #endif !(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++); for (addrp = hp->h_addr_list; *addrp; ++addrp) { if (inet_ntop(hp->h_addrtype, *addrp, addr, len)) fprintf(stderr, _("Result: h_addr_list=`%s'\n"), addr); else if (errno == EAFNOSUPPORT) fprintf(stderr, _("%s: protocol family not supported\n"), program_name); else if (errno == ENOSPC) fprintf(stderr, _("%s: name too long\n"), program_name); } } if (!(p = strchr(hp->h_name, '.')) && (c == 'd')) return; switch (c) { case 'a': while (hp->h_aliases[0]) { if (isfirst) { printf("%s", *hp->h_aliases++); isfirst = false; } else printf(" %s", *hp->h_aliases++); } printf("\n"); break; case 'i': for (addrp = hp->h_addr_list; *addrp; ++addrp) { if (inet_ntop(hp->h_addrtype, *addrp, addr, len)) { if (isfirst) { printf("%s", addr); isfirst = false; } else printf(" %s", addr); } else if (errno == EAFNOSUPPORT) fprintf(stderr, _("%s: protocol family not supported\n"), program_name); else if (errno == ENOSPC) fprintf(stderr, _("%s: name too long\n"), program_name); } printf("\n"); break; case 'd': printf("%s\n", ++p); break; case 'f': printf("%s\n", hp->h_name); break; } } 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) { printf("%s\n", Release); exit(E_VERSION); } static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n")); fprintf(fp, _(" domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n")); #if HAVE_AFDECnet fprintf(fp, _(" nodename [-v] {nodename|-F file} set DECnet node name (from file)\n")); #endif fprintf(fp, _(" hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name\n")); fprintf(fp, _(" hostname [-v] display hostname\n\n")); fprintf(fp, _(" hostname -V|--version|-h|--help print info and exit\n\n")); fprintf(fp, _(" dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n\n")); fprintf(fp, _(" -s, --short short host name\n")); fprintf(fp, _(" -a, --alias alias names\n")); fprintf(fp, _(" -i, --ip-address addresses for the hostname\n")); fprintf(fp, _(" -f, --fqdn, --long long host name (FQDN)\n")); fprintf(fp, _(" -d, --domain DNS domain name\n")); fprintf(fp, _(" -y, --yp, --nis NIS/YP domainname\n")); #if HAVE_AFDECnet fprintf(fp, _(" -n, --node DECnet node name\n")); #endif /* HAVE_AFDECnet */ fprintf(fp, _(" -F, --file read hostname or NIS domainname from given file\n\n")); fprintf(fp, _( " 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(rc); } 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(); break; // not reached case 'h': usage(E_USAGE); break; // not reached case '?': default: usage(E_OPTERR); break; // not reached }; 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 if (type == 's') { char *p = strchr(myname, '.'); if (p) *p = '\0'; printf("%s\n", myname); } else showhname(myname, type); break; case 3: if (file) { setfilename(file, SETDOMAIN); break; } if (optind < argc) { setdname(argv[optind]); break; } if (getdomainname(myname, sizeof(myname)) < 0) { perror("getdomainname()"); exit(1); } 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); } net-tools-1.60+git20180626.aebd88e/ifconfig.c000066400000000000000000000713421331436560500201600ustar00rootroot00000000000000/* * 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.59 2011-01-01 03:22:31 ecki Exp $ * * Author: Fred N. van Kempen, * 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 * * {1.34} - 19980630 - Arnaldo Carvalho de Melo * - 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* Ugh. But libc5 doesn't provide POSIX types. */ #include #if HAVE_HWSLIP #include #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 #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" static char *Release = RELEASE; int opt_a = 0; /* show all interfaces */ 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, in_addr_t *nm, in_addr_t *bc); static int set_ifstate(char *parent, in_addr_t ip, in_addr_t nm, in_addr_t bc, int flag); static int if_print(char *ifname) { int res; if (ife_short) printf(_("Iface MTU 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); if (!ife) { return -1; } 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: ERROR while getting interface flags: %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: ERROR while getting interface flags: %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); } /** 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(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage:\n ifconfig [-a] [-v] [-s] [[]
]\n")); #if HAVE_AFINET fprintf(fp, _(" [add
[/]]\n")); fprintf(fp, _(" [del
[/]]\n")); fprintf(fp, _(" [[-]broadcast [
]] [[-]pointopoint [
]]\n")); fprintf(fp, _(" [netmask
] [dstaddr
] [tunnel
]\n")); #endif #ifdef SIOCSKEEPALIVE fprintf(fp, _(" [outfill ] [keepalive ]\n")); #endif fprintf(fp, _(" [hw
] [mtu ]\n")); fprintf(fp, _(" [[-]trailers] [[-]arp] [[-]allmulti]\n")); fprintf(fp, _(" [multicast] [[-]promisc]\n")); fprintf(fp, _(" [mem_start ] [io_addr ] [irq ] [media ]\n")); #ifdef HAVE_TXQUEUELEN fprintf(fp, _(" [txqueuelen ]\n")); #endif #ifdef HAVE_DYNAMIC fprintf(fp, _(" [[-]dynamic]\n")); #endif fprintf(fp, _(" [up|down] ...\n\n")); fprintf(fp, _(" =Hardware Type.\n")); fprintf(fp, _(" List of possible hardware types:\n")); print_hwlist(0); /* 1 = ARPable */ fprintf(fp, _(" =Address family. Default: %s\n"), DFLT_AF); fprintf(fp, _(" List of possible address families:\n")); print_aflist(0); /* 1 = routeable */ exit(rc); } static void version(void) { printf("%s\n", Release); exit(E_VERSION); } static int set_netmask(int skfd, struct ifreq *ifr, struct sockaddr *sa) { int err = 0; memcpy(&ifr->ifr_netmask, sa, sizeof(struct sockaddr)); if (ioctl(skfd, SIOCSIFNETMASK, ifr) < 0) { fprintf(stderr, "SIOCSIFNETMASK: %s\n", strerror(errno)); err = 1; } return err; } int main(int argc, char **argv) { struct sockaddr_storage _sa, _samask; struct sockaddr *sa = (struct sockaddr *)&_sa; struct sockaddr *samask = (struct sockaddr *)&_samask; struct sockaddr_in *sin = (struct sockaddr_in *)&_sa; char host[128]; const struct aftype *ap; const struct hwtype *hw; struct ifreq ifr; int goterr = 0, didnetmask = 0, neednetmask=0; char **spp; int fd; #if HAVE_AFINET6 extern struct aftype inet6_aftype; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&_sa; 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(E_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(E_OPTERR); 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); 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; } 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); if (test_flag(ifr.ifr_name, IFF_MULTICAST) > 0) fprintf(stderr, _("Warning: Interface %s still in MULTICAST mode.\n"), ifr.ifr_name); 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); if (test_flag(ifr.ifr_name, IFF_ALLMULTI) > 0) fprintf(stderr, _("Warning: Interface %s still in ALLMULTI mode.\n"), ifr.ifr_name); 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++; if (test_flag(ifr.ifr_name, IFF_DYNAMIC) > 0) fprintf(stderr, _("Warning: Interface %s still in DYNAMIC mode.\n"), ifr.ifr_name); continue; } #endif if (!strcmp(*spp, "mtu")) { if (*++spp == NULL) usage(E_OPTERR); 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(E_OPTERR); ifr.ifr_data = (caddr_t) (uintptr_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(E_OPTERR); ifr.ifr_data = (caddr_t) (uintptr_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); if (test_flag(ifr.ifr_name, IFF_BROADCAST) > 0) fprintf(stderr, _("Warning: Interface %s still in BROADCAST mode.\n"), ifr.ifr_name); spp++; continue; } if (!strcmp(*spp, "broadcast")) { if (*++spp != NULL) { safe_strncpy(host, *spp, (sizeof host)); if (ap->input(0, host, &_sa) < 0) { if (ap->herror) ap->herror(host); else fprintf(stderr, _("ifconfig: Error resolving '%s' for broadcast\n"), host); goterr = 1; spp++; continue; } memcpy(&ifr.ifr_broadaddr, 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(E_OPTERR); safe_strncpy(host, *spp, (sizeof host)); if (ap->input(0, host, &_sa) < 0) { if (ap->herror) ap->herror(host); else fprintf(stderr, _("ifconfig: Error resolving '%s' for dstaddr\n"), host); goterr = 1; spp++; continue; } memcpy(&ifr.ifr_dstaddr, 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(E_OPTERR); safe_strncpy(host, *spp, (sizeof host)); if (ap->input(0, host, &_sa) < 0) { if (ap->herror) ap->herror(host); else fprintf(stderr, _("ifconfig: Error resolving '%s' for netmask\n"), 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(E_OPTERR); 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(E_OPTERR); 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(E_OPTERR); 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(E_OPTERR); 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++; if (test_flag(ifr.ifr_name, IFF_POINTOPOINT) > 0) fprintf(stderr, _("Warning: Interface %s still in POINTOPOINT mode.\n"), ifr.ifr_name); continue; } if (!strcmp(*spp, "pointopoint")) { if (*(spp + 1) != NULL) { spp++; safe_strncpy(host, *spp, (sizeof host)); if (ap->input(0, host, &_sa)) { if (ap->herror) ap->herror(host); else fprintf(stderr, _("ifconfig: Error resolving '%s' for pointopoint\n"), host); goterr = 1; spp++; continue; } memcpy(&ifr.ifr_dstaddr, 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(E_OPTERR); if ((hw = get_hwtype(*spp)) == NULL) usage(E_OPTERR); 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(E_OPTERR); 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(&ifr.ifr_hwaddr, sa, sizeof(struct sockaddr)); if (ioctl(skfd, SIOCSIFHWADDR, &ifr) < 0) { if (errno == EBUSY) fprintf(stderr, "SIOCSIFHWADDR: %s - you may need to down the interface\n", strerror(errno)); else fprintf(stderr, "SIOCSIFHWADDR: %s\n", strerror(errno)); goterr = 1; } spp++; continue; } #if HAVE_AFINET || HAVE_AFINET6 if (!strcmp(*spp, "add")) { if (*++spp == NULL) usage(E_OPTERR); #if HAVE_AFINET6 if (strchr(*spp, ':')) { /* INET6 */ if ((cp = strchr(*spp, '/'))) { prefix_len = atol(cp + 1); if ((prefix_len < 0) || (prefix_len > 128)) usage(E_OPTERR); *cp = 0; } else { prefix_len = 128; } safe_strncpy(host, *spp, (sizeof host)); if (inet6_aftype.input(1, host, &_sa) < 0) { if (inet6_aftype.herror) inet6_aftype.herror(host); else fprintf(stderr, _("ifconfig: Error resolving '%s' for add\n"), host); goterr = 1; spp++; continue; } memcpy(&ifr6.ifr6_addr, &sin6->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 #if HAVE_AFINET { /* ipv4 address a.b.c.d */ in_addr_t ip, nm, bc; safe_strncpy(host, *spp, (sizeof host)); if (inet_aftype.input(0, host, &_sa) < 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(ip)); 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(E_OPTERR); #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(E_OPTERR); *cp = 0; } else { prefix_len = 128; } safe_strncpy(host, *spp, (sizeof host)); if (inet6_aftype.input(1, host, &_sa) < 0) { inet6_aftype.herror(host); goterr = 1; spp++; continue; } memcpy(&ifr6.ifr6_addr, &sin6->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 (opt_v) fprintf(stderr, "now deleting: ioctl(SIOCDIFADDR,{ifindex=%d,prefixlen=%ld})\n",ifr.ifr_ifindex,prefix_len); if (ioctl(fd, SIOCDIFADDR, &ifr6) < 0) { fprintf(stderr, "SIOCDIFADDR: %s\n", strerror(errno)); goterr = 1; } spp++; continue; } #endif #if HAVE_AFINET { /* ipv4 address a.b.c.d */ in_addr_t ip, nm, bc; safe_strncpy(host, *spp, (sizeof host)); if (inet_aftype.input(0, host, &_sa) < 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; } /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */ ip = 0; memcpy(&ip, &sin->sin_addr.s_addr, sizeof(ip)); 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(E_OPTERR); if ((cp = strchr(*spp, '/'))) { prefix_len = atol(cp + 1); if ((prefix_len < 0) || (prefix_len > 128)) usage(E_OPTERR); *cp = 0; } else { prefix_len = 128; } safe_strncpy(host, *spp, (sizeof host)); if (inet6_aftype.input(1, host, &_sa) < 0) { inet6_aftype.herror(host); goterr = 1; spp++; continue; } memcpy(&ifr6.ifr6_addr, &sin6->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, &_samask, NULL)) { case -1: usage(E_OPTERR); break; case 1: if (didnetmask) usage(E_OPTERR); // remeber to set the netmask from samask later neednetmask = 1; 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) { if (ap->herror) ap->herror(host); else fprintf(stderr,_("ifconfig: error resolving '%s' to set address for af=%s\n"), host, ap->name); fprintf(stderr, _("ifconfig: `--help' gives usage information.\n")); exit(1); } memcpy(&ifr.ifr_addr, 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 * Same goes if they used address 0.0.0.0 as the kernel uses this to * destroy aliases. * * 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; short int bring_up = 1; for (ptr = ifr.ifr_name; *ptr; ptr++ ) if (*ptr == ':') found_colon++; if (found_colon) { if (ptr[-1] == '-') bring_up = 0; else if (ap->af == AF_INET && sin->sin_addr.s_addr == 0) bring_up = 0; } if (bring_up) goterr |= set_flag(ifr.ifr_name, (IFF_UP | IFF_RUNNING)); } spp++; } if (neednetmask) { goterr |= set_netmask(skfd, &ifr, samask); didnetmask++; } if (opt_v && goterr) fprintf(stderr, _("WARNING: at least one error occured. (%d)\n"), goterr); 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_sas; 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, in_addr_t *nm, in_addr_t *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_sas; memcpy(nm, &sin->sin_addr.s_addr, sizeof(*nm)); sin = (struct sockaddr_in *)&i->broadaddr_sas; memcpy(bc, &sin->sin_addr.s_addr, sizeof(*bc)); return 0; } static int set_ifstate(char *parent, in_addr_t ip, in_addr_t nm, in_addr_t 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; } net-tools-1.60+git20180626.aebd88e/include/000077500000000000000000000000001331436560500176445ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/include/interface.h000066400000000000000000000101101331436560500217460ustar00rootroot00000000000000struct 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 mtu; /* MTU value */ int tx_queue_len; /* transmit queue length */ struct ifmap map; /* hardware setup */ union { struct sockaddr_storage addr_sas; struct sockaddr addr; /* IP address */ }; union { struct sockaddr_storage dstaddr_sas; struct sockaddr dstaddr; /* P-P IP address */ }; union { struct sockaddr_storage broadaddr_sas; struct sockaddr broadaddr; /* IP broadcast address */ }; union { struct sockaddr_storage netmask_sas; struct sockaddr netmask; /* IP network mask */ }; union { struct sockaddr_storage ipxaddr_bb_sas; struct sockaddr ipxaddr_bb; /* IPX network address */ }; union { struct sockaddr_storage ipxaddr_sn_sas; struct sockaddr ipxaddr_sn; /* IPX network address */ }; union { struct sockaddr_storage ipxaddr_e3_sas; struct sockaddr ipxaddr_e3; /* IPX network address */ }; union { struct sockaddr_storage ipxaddr_e2_sas; struct sockaddr ipxaddr_e2; /* IPX network address */ }; union { struct sockaddr_storage ddpaddr_sas; struct sockaddr ddpaddr; /* Appletalk DDP address */ }; union { struct sockaddr_storage ecaddr_sas; 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 if_cache_free(void); extern struct interface *lookup_interface(const 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 net-tools-1.60+git20180626.aebd88e/include/ipx.h000066400000000000000000000011421331436560500206130ustar00rootroot00000000000000 /* 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 net-tools-1.60+git20180626.aebd88e/include/sockets.h000066400000000000000000000002141331436560500214650ustar00rootroot00000000000000extern int skfd, ipx_sock, ax25_sock, rose_sock, x25_sock, inet_sock, inet6_sock, ddp_sock, ec_sock; extern int sockets_open(int family); net-tools-1.60+git20180626.aebd88e/include/util-ank.h000066400000000000000000000045361331436560500215510ustar00rootroot00000000000000#ifndef __UTILS_H__ #define __UTILS_H__ 1 #include 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(E_OPTERR); 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, char *abuf, int alen); #endif /* __UTILS_H__ */ net-tools-1.60+git20180626.aebd88e/intl.h000066400000000000000000000003541331436560500173420ustar00rootroot00000000000000/* Dummy header for libintl.h */ #if I18N #include #undef __OPTIMIZE__ #include #define _(String) gettext((String)) #define N_(String) (String) #else #define _(String) (String) #define N_(String) (String) #endif net-tools-1.60+git20180626.aebd88e/ipmaddr.c000066400000000000000000000212611331436560500200070ustar00rootroot00000000000000/* * 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, * * Changes: Arnaldo Carvalho de Melo * 20010404 - use setlocale * */ #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "intl.h" #include "util.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 static char *Release = RELEASE, *Signature = "Alexey Kuznetsov"; static void version(void) { printf("%s\n%s\n", Release, Signature); exit(E_VERSION); } __attribute__((noreturn)) static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n")); fprintf(fp, _(" ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n")); fprintf(fp, _(" ipmaddr -V | -version\n")); exit(rc); } static void print_lla(FILE *fp, int len, unsigned char *addr) { int i; for (i=0; inext) { 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 = xmalloc(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, *ma = NULL; char buf[256]; FILE *fp = fopen(_PATH_PROCNET_IGMP, "r"); if (!fp) return; memset(&m, 0, sizeof(m)); if (fgets(buf, sizeof(buf), fp)) /* eat line */; m.addr.family = AF_INET; m.addr.bitlen = 32; m.addr.bytelen = 4; while (fgets(buf, sizeof(buf), fp)) { 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 = xmalloc(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 = xmalloc(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; size_t l; while (argc > 0) { if (strcmp(*argv, "dev") == 0) { NEXT_ARG(); l = strlen(*argv); if (l <= 0 || l >= sizeof(filter_dev)) usage(E_OPTERR); strncpy(filter_dev, *argv, sizeof (filter_dev)); } 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 { l = strlen(*argv); if (l <= 0 || l >= sizeof(filter_dev)) usage(E_OPTERR); strncpy(filter_dev, *argv, sizeof (filter_dev)); } 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(E_OPTERR); strncpy(ifr.ifr_name, *argv, IFNAMSIZ); } else { if (ifr.ifr_hwaddr.sa_data[0]) usage(E_OPTERR); if (parse_lla(*argv, ifr.ifr_hwaddr.sa_data) < 0) usage(E_OPTERR); } argc--; argv++; } if (ifr.ifr_name[0] == 0) usage(E_OPTERR); 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(E_OPTERR); } 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(E_OPTERR); if (strcmp(argv[1], "inet") == 0) preferred_family = AF_INET; else if (strcmp(argv[1], "inet6") == 0) preferred_family = AF_INET6; else usage(E_OPTERR); } 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 if ((matches(argv[1], "-h") == 0) || matches(argv[1], "--help") == 0) { usage(E_USAGE); } else usage(E_OPTERR); argc--; argv++; } return do_multiaddr(argc-1, argv+1); } net-tools-1.60+git20180626.aebd88e/iptunnel.c000066400000000000000000000364441331436560500202360ustar00rootroot00000000000000/* * 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, * * * Changes: * * Rani Assaf 980929: resolve addresses * Rani Assaf 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 #include #include #include #include #include #include #include #include #include #include #include /* We only care about linux/if_tunnel.h. Unfortunately, older Linux headers * (pre linux-4.8) did not include all the proper headers leading to missing * structs and types. */ #include #include #include #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" static char *Release = RELEASE, *Signature = "Alexey Kuznetsov"; static void version(void) { printf("%s\n%s\n", Release, Signature); exit(E_VERSION); } __attribute__((noreturn)) static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: iptunnel { add | change | del | show } [ NAME ]\n")); fprintf(fp, _(" [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n")); fprintf(fp, _(" [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n")); fprintf(fp, _(" [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n")); fprintf(fp, _(" iptunnel -V | --version\n\n")); fprintf(fp, _("Where: NAME := STRING\n")); fprintf(fp, _(" ADDR := { IP_ADDRESS | any }\n")); fprintf(fp, _(" TOS := { NUMBER | inherit }\n")); fprintf(fp, _(" TTL := { 1..255 | inherit }\n")); fprintf(fp, _(" KEY := { DOTTED_QUAD | NUMBER }\n")); exit(rc); } static int do_ioctl_get_ifindex(char *dev) { struct ifreq ifr; int fd; int err; safe_strncpy(ifr.ifr_name, dev, IFNAMSIZ); fd = socket(AF_INET, SOCK_DGRAM, 0); err = ioctl(fd, SIOCGIFINDEX, &ifr); if (err) { perror("ioctl"); close(fd); return 0; } close(fd); return ifr.ifr_ifindex; } static int do_ioctl_get_iftype(char *dev) { struct ifreq ifr; int fd; int err; safe_strncpy(ifr.ifr_name, dev, IFNAMSIZ); fd = socket(AF_INET, SOCK_DGRAM, 0); err = ioctl(fd, SIOCGIFHWADDR, &ifr); if (err) { perror("ioctl"); close(fd); 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"); close(fd); 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; safe_strncpy(ifr.ifr_name, basedev, IFNAMSIZ); 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; safe_strncpy(ifr.ifr_name, basedev, IFNAMSIZ); 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; safe_strncpy(ifr.ifr_name, basedev, IFNAMSIZ); 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(E_OPTERR); p->iph.protocol = IPPROTO_IPIP; } else if (strcmp(*argv, "gre") == 0) { if (p->iph.protocol) usage(E_OPTERR); p->iph.protocol = IPPROTO_GRE; } else if (strcmp(*argv, "sit") == 0) { if (p->iph.protocol) usage(E_OPTERR); p->iph.protocol = IPPROTO_IPV6; } else usage(E_OPTERR); } 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(E_OPTERR); 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(E_OPTERR); 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(E_OPTERR); 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(E_OPTERR); if (uval > 255) usage(E_OPTERR); 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(E_OPTERR); if (uval > 255) usage(E_OPTERR); p->iph.tos = uval; } else p->iph.tos = 1; } else { if (p->name[0]) usage(E_OPTERR); 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; } if (fgets(buf, sizeof(buf), fp)) /* eat line */; if (fgets(buf, sizeof(buf), fp)) /* eat line */; 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")); fclose(fp); return -1; } if (sscanf(ptr, "%lu%lu%lu%lu%lu%lu%lu%*u%lu%lu%lu%lu%lu%lu%lu", &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); } } fclose(fp); 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(E_OPTERR); } 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(E_OPTERR); if (strcmp(argv[1], "inet") == 0) preferred_family = AF_INET; else if (strcmp(argv[1], "inet6") == 0) preferred_family = AF_INET6; else usage(E_OPTERR); } 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 if ((matches(argv[1], "-h") == 0) || (matches(argv[1], "--help") == 0)) { usage(E_USAGE); } else usage(E_OPTERR); argc--; argv++; } return do_iptunnel(argc-1, argv+1); } net-tools-1.60+git20180626.aebd88e/lib/000077500000000000000000000000001331436560500167675ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/lib/Makefile000066400000000000000000000035331331436560500204330ustar00rootroot00000000000000# # 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, # 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 eui64.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 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) -I$(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. net-tools-1.60+git20180626.aebd88e/lib/activate.c000066400000000000000000000044371331436560500207430ustar00rootroot00000000000000/* * 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 * 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 #include #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) { const 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)); } net-tools-1.60+git20180626.aebd88e/lib/af.c000066400000000000000000000146331331436560500175300ustar00rootroot00000000000000/* * 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.14 2007/12/01 17:49:35 ecki Exp $ * * Author: Fred N. van Kempen, * 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 #include #include #include #include #include #include #include #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_rose; int flag_x25 = 0; int flag_ash; int flag_bluetooth; static const 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 }, { "rose", "rose", &flag_rose }, { "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 }, { "bluetooth", "bluetooth", &flag_bluetooth }, { 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 * const 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 }; static void afinit(void) { 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; safe_strncpy(afname, dflt, sizeof(afname)); if (!(tmp = strrchr(argv0, '/'))) tmp = argv0; /* no slash?! */ else tmp++; buf = xstrdup(tmp); 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)) safe_strncpy(afname, buf, sizeof(afname)); free(buf); } /* Check our protocol family table for this family. */ const struct aftype *get_aftype(const char *name) { struct aftype * const *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. */ const struct aftype *get_afntype(int af) { struct aftype * const *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) { const struct aftype *afp = get_afntype(af); return afp ? afp->fd : -1; } int aftrans_opt(const char *arg) { const 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'; 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; const char * txt; struct aftype * const *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"); } net-tools-1.60+git20180626.aebd88e/lib/arcnet.c000066400000000000000000000057151331436560500204170ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #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 const char *pr_arcnet(const char *ptr) { static char buff[64]; snprintf(buff, sizeof(buff), "%02X", (ptr[0] & 0377)); return (buff); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Input an ARCnet address and convert to binary. */ static int in_arcnet(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 { if (_DEBUG) fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig); 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 (_DEBUG) fprintf(stderr, _("in_arcnet(%s): invalid arcnet address!\n"), orig); errno = EINVAL; return (-1); } *ptr++ = (unsigned char) (val & 0377); i++; /* We might get a semicolon here - not required. */ if (*bufp == ':') { if (_DEBUG && i == ETH_ALEN) fprintf(stderr, _("in_arcnet(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == ETH_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_arcnet(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_arcnet(%s): %s\n", orig, pr_arcnet(sap->sa_data)); return (0); } struct hwtype arcnet_hwtype = { "arcnet", NULL, /*"2.5Mbps ARCnet", */ ARPHRD_ARCNET, 1, pr_arcnet, in_arcnet, NULL }; #endif /* HAVE_HWARC */ net-tools-1.60+git20180626.aebd88e/lib/ash.c000066400000000000000000000046631331436560500177170ustar00rootroot00000000000000/* * 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 #include #include #include #include #include #include #include #include #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 const char * pr_ash(const 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 , using private value 517" #define ARPHRD_ASH 517 #endif struct hwtype ash_hwtype; static int in_ash(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 const char * pr_sash(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; 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 */ net-tools-1.60+git20180626.aebd88e/lib/ax25.c000066400000000000000000000120241331436560500177110ustar00rootroot00000000000000/* * 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, * 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 #include #include #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include #endif #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" static char AX25_errmsg[128]; extern struct aftype ax25_aftype; static const char *AX25_print(const 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 const char * AX25_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; static char buf[64]; if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf)); return (AX25_print(((const struct sockaddr_ax25 *) sasp)->sax25_call.ax25_call)); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif static int AX25_input(int type, char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; char *ptr; char *orig, c; int i; sap->sa_family = ax25_aftype.af; ptr = ((struct sockaddr_ax25 *) sasp)->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)); if (_DEBUG) fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig); errno = EINVAL; return (-1); } *ptr++ = (unsigned char) ((c << 1) & 0xFE); i++; } /* Callsign too long? */ if ((i == 6) && (*bufp != '-') && (*bufp != '\0')) { safe_strncpy(AX25_errmsg, _("Callsign too long"), sizeof(AX25_errmsg)); if (_DEBUG) fprintf(stderr, "ax25_input(%s): %s !\n", AX25_errmsg, orig); 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. */ if (_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"); } return (0); } /* Display an error message. */ static void AX25_herror(const 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_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; if (AX25_input(0, bufp, sasp) < 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 */ net-tools-1.60+git20180626.aebd88e/lib/ax25_gr.c000066400000000000000000000033751331436560500204120ustar00rootroot00000000000000/* * 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, * Copyright 1999 Bernd Eckenfels, Germany * base on Code from Jonathan Naylor * * 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 #include #include #include #include /* ARPHRD_AX25 */ #include #include #include #include #include #endif #include #include #include #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 */ if (fgets(buffer, 256, f)) /* eat line */; 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 */ net-tools-1.60+git20180626.aebd88e/lib/ddp.c000066400000000000000000000033111331436560500177000ustar00rootroot00000000000000/* * DDP protocol output functions. * [Not yet input] * * Alan Cox * * $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 #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* Display a ddp domain address. */ static const char *ddp_print(const 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 const char *ddp_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; 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 net-tools-1.60+git20180626.aebd88e/lib/ddp_gr.c000066400000000000000000000052741331436560500204020ustar00rootroot00000000000000/* * lib/ddp_gr.c Prinbting of DDP (AppleTalk) routing table * used by the NET-LIB. * * NET-LIB * * Version: $Id: ddp_gr.c,v 1.4 2002/06/02 05:25:15 ecki Exp $ * * Author: Ajax * * Modification: * 2002-06-02 integrated into main source by Bernd Eckenfels * */ /* TODO: name lookups (/etc/atalk.names? NBP?) */ #include "config.h" #if HAVE_AFATALK #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" /* stolen from inet_gr.c */ #define flags_decode(i,o) do { \ o[0] = '\0'; \ if (i & RTF_UP) strcat(o, "U"); \ if (i & RTF_GATEWAY) strcat(o, "G"); \ if (i & RTF_REJECT) strcat(o, "!"); \ if (i & RTF_HOST) strcat(o, "H"); \ if (i & RTF_REINSTATE) strcat(o, "R"); \ if (i & RTF_DYNAMIC) strcat(o, "D"); \ if (i & RTF_MODIFIED) strcat(o, "M"); \ if (i & RTF_DEFAULT) strcat(o, "d"); \ if (i & RTF_ALLONLINK) strcat(o, "a"); \ if (i & RTF_ADDRCONF) strcat(o, "c"); \ if (i & RTF_NONEXTHOP) strcat(o, "o"); \ if (i & RTF_EXPIRES) strcat(o, "e"); \ if (i & RTF_CACHE) strcat(o, "c"); \ if (i & RTF_FLOW) strcat(o, "f"); \ if (i & RTF_POLICY) strcat(o, "p"); \ if (i & RTF_LOCAL) strcat(o, "l"); \ if (i & RTF_MTU) strcat(o, "u"); \ if (i & RTF_WINDOW) strcat(o, "w"); \ if (i & RTF_IRTT) strcat(o, "i"); \ if (i & RTF_NOTCACHED) strcat(o, "n"); \ } while (0) int DDP_rprint(int options) { FILE *fp; char *dest, *gw, *dev, *flags; char oflags[32]; char *hdr = "Destination Gateway Device Flags"; fp = fopen(_PATH_PROCNET_ATALK_ROUTE, "r"); if (!fp) { perror("Error opening " _PATH_PROCNET_ATALK_ROUTE); fprintf(stderr, "DDP (AppleTalk) not configured on this system.\n"); return 1; } if (fscanf(fp, "%ms %ms %ms %ms\n", &dest, &gw, &flags, &dev)) /* eat line */; free(dest); free(gw); free(flags); free(dev); printf("%s\n", hdr); while (fscanf(fp, "%ms %ms %ms %ms\n", &dest, &gw, &flags, &dev) == 4) { int iflags = atoi(flags); flags_decode(iflags, oflags); printf("%-16s%-16s%-16s%-s\n", dest, gw, dev, oflags); free(dest); free(gw); free(flags); free(dev); } fclose(fp); return 0; } #endif net-tools-1.60+git20180626.aebd88e/lib/ec_hw.c000066400000000000000000000014241331436560500202210ustar00rootroot00000000000000/* * lib/ec_hw.c This file contains an implementation of the Econet * hardware support functions. * * Version: $Id: ec_hw.c,v 1.3 2009/09/06 22:39:20 ecki Exp $ * * Author: Philip Blundell * * 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 #include #include "net-support.h" struct hwtype ec_hwtype = { "ec", NULL /* "Econet" */, ARPHRD_ECONET, 0, NULL, NULL, NULL }; #endif net-tools-1.60+git20180626.aebd88e/lib/econet.c000066400000000000000000000037251331436560500204170ustar00rootroot00000000000000/* * 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 * * 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 #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #include "intl.h" /* Display an Econet address */ static const char * ec_print(const 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 const char * ec_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr_ec *sec = (const struct sockaddr_ec *)sasp; if (sasp->ss_family != AF_ECONET) return _("[NONE SET]"); return ec_print((const char *) &sec->addr); } static int ec_input(int type, char *bufp, struct sockaddr_storage *sasp) { struct sockaddr_ec *sec = (struct sockaddr_ec *) sasp; 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 */ net-tools-1.60+git20180626.aebd88e/lib/ether.c000066400000000000000000000062011331436560500202410ustar00rootroot00000000000000/* * lib/ether.c This file contains an implementation of the "Ethernet" * support functions. * * Version: $Id: ether.c,v 1.8 2002/07/30 05:17:29 ecki Exp $ * * Author: Fred N. van Kempen, * 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 #include #include #include #include #include #include #include #include #include #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 const char *pr_ether(const 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); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Input an Ethernet address and convert to binary. */ static int in_ether(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 { if (_DEBUG) fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig); 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 { if (_DEBUG) fprintf(stderr, _("in_ether(%s): invalid ether address!\n"), orig); 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 (_DEBUG && i == ETH_ALEN) fprintf(stderr, _("in_ether(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == ETH_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_ether(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_ether(%s): %s\n", orig, pr_ether(sap->sa_data)); return (0); } struct hwtype ether_hwtype = { "ether", NULL, /*"10Mbps Ethernet", */ ARPHRD_ETHER, ETH_ALEN, pr_ether, in_ether, NULL }; #endif /* HAVE_HWETHER */ net-tools-1.60+git20180626.aebd88e/lib/eui64.c000066400000000000000000000065661331436560500201040ustar00rootroot00000000000000/* * lib/eui64.c This file contains support for generic EUI-64 hw addressing * * Version: $Id: eui64.c,v 1.1 2001/11/12 02:12:05 ecki Exp $ * * Author: Daniel Stodden * Copyright 2001 Daniel Stodden * * blueprinted from ether.c * 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_HWEUI64 #include #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" /* * EUI-64 constants */ #define EUI64_ALEN 8 #ifndef ARPHRD_EUI64 #define ARPHRD_EUI64 27 #warning "ARPHRD_EUI64 not defined in . Using private value 27" #endif struct hwtype eui64_hwtype; /* Display an EUI-64 address in readable format. */ static const char *pr_eui64(const char *ptr) { static char buff[64]; snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377), (ptr[6] & 0377), (ptr[7] & 0377) ); return (buff); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Start the PPP encapsulation on the file descriptor. */ static int in_eui64(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; char *ptr; char c, *orig; int i; unsigned val; sap->sa_family = eui64_hwtype.type; ptr = sap->sa_data; i = 0; orig = bufp; while ((*bufp != '\0') && (i < EUI64_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 { if (_DEBUG) fprintf( stderr, _("in_eui64(%s): invalid eui64 address!\n"), orig ); 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 { if (_DEBUG) fprintf( stderr, _("in_eui64(%s): invalid eui64 address!\n"), orig ); 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 (_DEBUG && i == EUI64_ALEN) fprintf(stderr, _("in_eui64(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == EUI64_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_eui64(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_eui64(%s): %s\n", orig, pr_eui64(sap->sa_data)); return (0); } struct hwtype eui64_hwtype = { "eui64", NULL, /*"EUI-64 addressing", */ ARPHRD_EUI64, EUI64_ALEN, pr_eui64, in_eui64, NULL, 0 }; #endif /* HAVE_EUI64 */ net-tools-1.60+git20180626.aebd88e/lib/fddi.c000066400000000000000000000064111331436560500200430ustar00rootroot00000000000000/* * 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, * * 1998-07-01 - Arnaldo Carvalho de Melo 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 #if HAVE_HWFDDI #include #include #include #ifndef ARPHRD_FDDI #error "No FDDI Support in your current Kernelsource Tree." #error "Disable HW Type FDDI" #endif #if __GLIBC__ >= 2 #include #else #include #endif #include #include #include #include #include #include #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 const char *pr_fddi(const 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); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Input an FDDI address and convert to binary. */ static int in_fddi(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 { if (_DEBUG) fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig); 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 (_DEBUG) fprintf(stderr, _("in_fddi(%s): invalid fddi address!\n"), orig); errno = EINVAL; return (-1); } *ptr++ = (unsigned char) (val & 0377); i++; /* We might get a semicolon here - not required. */ if (*bufp == ':') { if (_DEBUG && i == FDDI_K_ALEN) fprintf(stderr, _("in_fddi(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == FDDI_K_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_fddi(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_fddi(%s): %s\n", orig, pr_fddi(sap->sa_data)); 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 */ net-tools-1.60+git20180626.aebd88e/lib/frame.c000066400000000000000000000027551331436560500202360ustar00rootroot00000000000000/* * 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, * * Author: Mike McLagan * * 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 #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" static const char *pr_dlci(const char *ptr) { static char buf[12]; short i; memcpy(&i, ptr, sizeof(i)); snprintf(buf, sizeof(buf), "%i", i); 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 */ net-tools-1.60+git20180626.aebd88e/lib/getargs.c000066400000000000000000000044351331436560500205750ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "util.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; safe_strncpy(temp, string, sizeof(temp)); 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); } net-tools-1.60+git20180626.aebd88e/lib/getroute.c000066400000000000000000000060531331436560500207750ustar00rootroot00000000000000/* * 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 * 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 #include #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) { const 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); } net-tools-1.60+git20180626.aebd88e/lib/hdlclapb.c000066400000000000000000000031041331436560500207020ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #ifndef ARPHRD_HDLC #warning "No definition of ARPHRD_HDLC in , using private value 513" #define ARPHRD_HDLC 513 #endif #ifndef ARPHRD_LAPB #warning "No definition of ARPHRD_HDLC in , 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 */ net-tools-1.60+git20180626.aebd88e/lib/hippi.c000066400000000000000000000064441331436560500202540ustar00rootroot00000000000000/* * 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, * Copyright 1993 MicroWalt Corporation * * Modified for HIPPI by Jes Sorensen, * * 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 #include #include #include #include #include #include #include #include #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 . Using private value 708" #endif extern struct hwtype hippi_hwtype; /* Display an HIPPI address in readable format. */ static const char *pr_hippi(const 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); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Input an HIPPI address and convert to binary. */ static int in_hippi(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 { if (_DEBUG) fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig); 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 (_DEBUG) fprintf(stderr, _("in_hippi(%s): invalid hippi address!\n"), orig); errno = EINVAL; return (-1); } *ptr++ = (unsigned char) (val & 0377); i++; /* We might get a semicolon here - not required. */ if (*bufp == ':') { if (_DEBUG && i == HIPPI_ALEN) fprintf(stderr, _("in_hippi(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == HIPPI_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_hippi(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_hippi(%s): %s\n", orig, pr_hippi(sap->sa_data)); return (0); } struct hwtype hippi_hwtype = { "hippi", NULL, /*"HIPPI", */ ARPHRD_HIPPI, HIPPI_ALEN, pr_hippi, in_hippi, NULL, 0 }; #endif /* HAVE_HWHIPPI */ net-tools-1.60+git20180626.aebd88e/lib/hw.c000066400000000000000000000145501331436560500175560ustar00rootroot00000000000000/* * lib/hw.c This file contains the top-level part of the hardware * support functions module. * * Version: $Id: hw.c,v 1.19 2008/10/03 01:52:04 ecki Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * * Author: Fred N. van Kempen, * 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 #include #include #include #include #include #include #include #include #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; extern struct hwtype ib_hwtype; extern struct hwtype eui64_hwtype; static const struct hwtype * const 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 ðer_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 #if HAVE_HWIB &ib_hwtype, #endif #if HAVE_HWEUI64 &eui64_hwtype, #endif &unspec_hwtype, NULL }; static short sVhwinit = 0; static void hwinit(void) { 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 #if HAVE_HWIB ib_hwtype.title = _("InfiniBand"); #endif #if HAVE_HWEUI64 eui64_hwtype.title = _("Generic EUI-64"); #endif sVhwinit = 1; } /* Check our hardware type table for this type. */ const struct hwtype *get_hwtype(const char *name) { const struct hwtype * const *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. */ const struct hwtype *get_hwntype(int type) { const struct hwtype * const *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; const char * txt; const struct hwtype * const *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(const 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; } net-tools-1.60+git20180626.aebd88e/lib/ib.c000066400000000000000000000070071331436560500175310ustar00rootroot00000000000000/* * lib/ib.c This file contains an implementation of the "Infiniband" * support functions. * * Version: $Id: ib.c,v 1.1 2008/10/03 01:52:03 ecki Exp $ * * Author: Fred N. van Kempen, * Copyright 1993 MicroWalt Corporation * Tom Duffy * * 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 #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" extern struct hwtype ib_hwtype; /* Display an InfiniBand address in readable format. */ static const char *pr_ib(const 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'; fprintf(stderr, _("Infiniband hardware address can be incorrect! Please read BUGS section in ifconfig(8).\n")); /* 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); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif /* Input an Infiniband address and convert to binary. */ static int in_ib(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 { if (_DEBUG) fprintf(stderr, _("in_ib(%s): invalid infiniband address!\n"), orig); 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+git20180626.aebd88e/lib/inet.c000066400000000000000000000265001331436560500200750ustar00rootroot00000000000000/* * 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.14 2003/10/19 11:57:37 pb Exp $ * * Author: Fred N. van Kempen, * 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 * 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 #include #include #include #include #include #include #include #include #include #include #include #include #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_storage *sasp, int hostfirst) { struct sockaddr_in *sin = (struct sockaddr_in *)sasp; 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, const struct sockaddr_storage *sasp, int numeric, unsigned int netmask) { const struct sockaddr_in *sin = (const struct sockaddr_in *)sasp; struct hostent *ent; struct netent *np; struct addr *pn; u_int32_t 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 = sin->sin_addr.s_addr; #ifdef DEBUG fprintf (stderr, "rresolve: %08lx, mask %08x, num %08x, len %d\n", ad, netmask, numeric, len); #endif // if no symbolic names are requested we shortcut with ntoa if (numeric & 0x0FFF) { safe_strncpy(name, inet_ntoa(sin->sin_addr), len); return (0); } // we skip getnetbyaddr for 0.0.0.0/0 and 0.0.0.0/~0 if (ad == INADDR_ANY) { if (netmask == INADDR_ANY) { // for 0.0.0.0/0 we hardcode symbolic name if (numeric & 0x8000) safe_strncpy(name, "default", len); else safe_strncpy(name, "*", len); return (0); } else { // for 0.0.0.0/1 we skip getnetbyname() safe_strncpy(name, "0.0.0.0", len); return (0); } } // it is a host address if flagged or any host bits set 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 (name=%s, len=%d)\n", (host? "host": "net"), ad, name, len); #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 *) xmalloc(sizeof(struct addr)); pn->addr = *sin; pn->next = INET_nn; pn->host = host; pn->name = xstrdup(name); INET_nn = pn; return (0); } static void INET_reserror(const char *text) { herror(text); } /* Display an Internet socket address. */ static const char *INET_print(const char *ptr) { static char name[INET_ADDRSTRLEN + 1]; socklen_t len = sizeof(name) - 1; name[len] = '\0'; inet_ntop(AF_INET, ptr, name, len); return name; } /* Display an Internet socket address. */ static const char *INET_sprint(const struct sockaddr_storage *sasp, int numeric) { static char buff[128]; if (sasp->ss_family == 0xFFFF || sasp->ss_family == 0) return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff)); if (INET_rresolve(buff, sizeof(buff), sasp, numeric, 0xffffff00) != 0) return (NULL); return (buff); } char *INET_sprintmask(const struct sockaddr_storage *sasp, int numeric, unsigned int netmask) { static char buff[128]; if (sasp->ss_family == 0xFFFF || sasp->ss_family == 0) return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff)); if (INET_rresolve(buff, sizeof(buff), sasp, numeric, netmask) != 0) return (NULL); return (buff); } static int INET_getsock(char *bufp, struct sockaddr_storage *sasp) { char *sp = bufp, *bp; unsigned int i; unsigned val; struct sockaddr_in *sin = (struct sockaddr_in *)sasp; 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_storage *sasp) { switch (type) { case 1: return INET_getsock(bufp, sasp); case 256: return INET_resolve(bufp, sasp, 1); default: return INET_resolve(bufp, sasp, 0); } } static int INET_getnetmask(char *adr, struct sockaddr_storage *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 *) xmalloc(sizeof(struct service)); item->name = xstrdup(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); } else { /* sctp, ddp, dccp */ free(item->name); free(item); } } endservent(); setprotoent(1); while ((pe = getprotoent())) { /* Allocate a service entry. */ item = (struct service *) xmalloc(sizeof(struct service)); item->name = xstrdup(pe->p_name); item->number = htons(pe->p_proto); add2list(&raw_name, item); } endprotoent(); return (0); } const char *get_sname(int socknumber, const char *proto, int numeric) { static char buffer[64], init = 0; struct service *item; if (socknumber == 0) return ("*"); if (numeric) goto do_ntohs; if (!init) { (void) read_services(); init = 1; } buffer[0] = '\0'; if (!strcmp(proto, "tcp")) item = searchlist(tcp_name, socknumber); else if (!strcmp(proto, "udp")) item = searchlist(udp_name, socknumber); else if (!strcmp(proto, "raw")) item = searchlist(raw_name, socknumber); else item = NULL; if (item) { strncpy(buffer, item->name, sizeof(buffer)); buffer[sizeof(buffer) - 1] = '\0'; } if (!buffer[0]) { do_ntohs: sprintf(buffer, "%d", ntohs(socknumber)); } return (buffer); } #endif /* HAVE_AFINET || HAVE_AFINET6 */ net-tools-1.60+git20180626.aebd88e/lib/inet6.c000066400000000000000000000117721331436560500201700ustar00rootroot00000000000000/* * 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.13 2010-07-05 22:52:00 ecki Exp $ * * Author: Fred N. van Kempen, * 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #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 char *fix_v4_address(char *buf, const struct in6_addr *in6) { if (IN6_IS_ADDR_V4MAPPED(in6->s6_addr)) { char *s =strchr(buf, '.'); if (s) { while (s > buf && *s != ':') --s; if (*s == ':') ++s; else s = NULL; } if (s) return s; } return buf; } static int INET6_resolve(char *name, struct sockaddr_storage *sasp) { 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(sasp, 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, size_t namelen, const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sasp; /* 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, namelen); return (0); } if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { if (numeric & 0x8000) safe_strncpy(name, "default", namelen); else safe_strncpy(name, "[::]", namelen); return (0); } if (getnameinfo((const struct sockaddr *)sasp, sizeof(struct sockaddr_in6), name, namelen , NULL, 0, 0)) { inet_ntop( AF_INET6, &sin6->sin6_addr, name, namelen); } return (0); } static void INET6_reserror(const char *text) { herror(text); } /* Display an Internet socket address. */ static const char *INET6_print(const char *ptr) { static char name[INET6_ADDRSTRLEN + 1]; socklen_t len = sizeof(name) - 1; name[len] = '\0'; inet_ntop(AF_INET6, ptr, name, len); return fix_v4_address(name, (struct in6_addr *)ptr); } /* Display an Internet socket address. */ /* dirty! struct sockaddr usually doesn't suffer for inet6 addresses, fst. */ static const char *INET6_sprint(const struct sockaddr_storage *sasp, int numeric) { static char buff[128]; if (sasp->ss_family == 0xFFFF || sasp->ss_family == 0) return safe_strncpy(buff, _("[NONE SET]"), sizeof(buff)); if (INET6_rresolve(buff, sizeof(buff), sasp, numeric) != 0) return safe_strncpy(buff, _("[UNKNOWN]"), sizeof(buff)); return (fix_v4_address(buff, &((struct sockaddr_in6 *)sasp)->sin6_addr)); } static int INET6_getsock(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr_in6 *sin6; char *p; sin6 = (struct sockaddr_in6 *) sasp; sin6->sin6_family = AF_INET6; sin6->sin6_port = 0; sin6->sin6_scope_id = 0; sin6->sin6_flowinfo = 0; if (inet_pton(AF_INET6, bufp, sin6->sin6_addr.s6_addr) <= 0) return (-1); p = fix_v4_address(bufp, &sin6->sin6_addr); if (p != bufp) memcpy(bufp, p, strlen(p)+1); return 16; /* ?;) */ } static int INET6_input(int type, char *bufp, struct sockaddr_storage *sasp) { switch (type) { case 1: return INET6_getsock(bufp, sasp); default: return INET6_resolve(bufp, sasp); } } 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 */ net-tools-1.60+git20180626.aebd88e/lib/inet6_gr.c000066400000000000000000000174261331436560500206620ustar00rootroot00000000000000 /* Modifications: 1998-07-01 - Arnaldo Carvalho de Melo - GNU gettext instead of catgets, snprintf instead of sprintf */ #include "config.h" #if HAVE_AFINET6 #include #include #include #include #include #include #include /* #include realy broken */ #include #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "net-features.h" #include "util.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_storage sas, sasn; 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; } if (numeric & RTF_CACHE) printf(_("Kernel IPv6 routing cache\n")); else printf(_("Kernel IPv6 routing table\n")); printf(_("Destination " "Next Hop " "Flag Met Ref Use If\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 %15s\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, &refcnt, &use, &iflags, iface); if (0 && num < 23) continue; if (iflags & RTF_CACHE) { if (!(numeric & RTF_CACHE)) continue; } else { if (numeric & RTF_CACHE) 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, &sas); snprintf(addr6, sizeof(addr6), "%s/%d", inet6_aftype.sprint(&sas, numeric), 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, &sasn); snprintf(naddr6, sizeof(naddr6), "%s", inet6_aftype.sprint(&sasn, numeric)); /* Decode the flags. */ flags[0]=0; if (iflags & RTF_UP) strcat(flags, "U"); if (iflags & RTF_REJECT) strcat(flags, "!"); 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"); if (iflags & RTF_ALLONLINK) strcat(flags, "a"); if (iflags & RTF_EXPIRES) strcat(flags, "e"); if (iflags & RTF_MODIFIED) strcat(flags, "m"); if (iflags & RTF_NONEXTHOP) strcat(flags, "n"); if (iflags & RTF_FLOW) strcat(flags, "f"); /* Print the info. */ printf("%-30s %-26s %-4s %-3d %-1d%6d %s\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_storage sas; int type, refcnt, prefix_len, location, state, gc; long tstamp, expire, ndflags, reachable, stale, delete; FILE *fp = fopen(_PATH_PROCNET_NDISC, "r"); long clk_tck = ticks_per_second(); char addr6p[8][5], haddrp[6][3]; if (!fp) { return rprint_fib6(ext, numeric | RTF_CACHE); } 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)) { 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, &sas); snprintf(addr6, sizeof(addr6), "%s/%d", inet6_aftype.sprint(&sas, 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: safe_strncpy(statestr, "NONE", sizeof(statestr)); break; case NUD_INCOMPLETE: safe_strncpy(statestr, "INCOMPLETE", sizeof(statestr)); break; case NUD_REACHABLE: safe_strncpy(statestr, "REACHABLE", sizeof(statestr)); break; case NUD_STALE: safe_strncpy(statestr, "STALE", sizeof(statestr)); break; case NUD_DELAY: safe_strncpy(statestr, "DELAY", sizeof(statestr)); break; case NUD_PROBE: safe_strncpy(statestr, "PROBE", sizeof(statestr)); break; case NUD_FAILED: safe_strncpy(statestr, "FAILED", sizeof(statestr)); break; case NUD_NOARP: safe_strncpy(statestr, "NOARP", sizeof(statestr)); break; case NUD_PERMANENT: safe_strncpy(statestr, "PERM", sizeof(statestr)); 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 / clk_tck); if (refcnt) printf(" * "); else printf(" %-7ld ", delete / clk_tck); } 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 */ net-tools-1.60+git20180626.aebd88e/lib/inet6_sr.c000066400000000000000000000113001331436560500206570ustar00rootroot00000000000000/* * inet6_sr.c This files contains INET6 related route manipulation methods. * * Part of net-tools, the Linux base networking tools * * 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. */ #include "config.h" #if HAVE_AFINET6 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "net-features.h" #include "util.h" extern struct aftype inet6_aftype; static int skfd = -1; static int usage(const int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: inet6_route [-vF] del Target\n")); fprintf(fp, _(" inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n")); fprintf(fp, _(" inet6_route [-FC] flush NOT supported\n")); return (rc); } static int INET6_setroute(int action, int options, char **args) { struct in6_rtmsg rt; struct ifreq ifr; struct sockaddr_storage sas; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sas; char target[128], gateway[128] = "NONE"; int metric, prefix_len; char *devname = NULL; char *cp; if (*args == NULL) return usage(E_OPTERR); safe_strncpy(target, *args++, sizeof(target)); if (!strcmp(target, "default")) { prefix_len = 0; memset(&sas, 0, sizeof(sas)); } else { if ((cp = strchr(target, '/'))) { prefix_len = atol(cp + 1); if ((prefix_len < 0) || (prefix_len > 128)) return usage(E_OPTERR); *cp = 0; } else { prefix_len = 128; } if (inet6_aftype.input(1, target, &sas) < 0 && inet6_aftype.input(0, target, &sas) < 0) { inet6_aftype.herror(target); return (1); } } /* Clean out the RTREQ structure. */ memset((char *) &rt, 0, sizeof(struct in6_rtmsg)); memcpy(&rt.rtmsg_dst, sin6->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(E_OPTERR); metric = atoi(*args); rt.rtmsg_metric = metric; args++; continue; } if (!strcmp(*args, "gw") || !strcmp(*args, "gateway")) { args++; if (!*args) return usage(E_OPTERR); if (rt.rtmsg_flags & RTF_GATEWAY) return usage(E_OPTERR); safe_strncpy(gateway, *args, sizeof(gateway)); if (inet6_aftype.input(1, gateway, &sas) < 0) { inet6_aftype.herror(gateway); return (E_LOOKUP); } memcpy(&rt.rtmsg_gateway, sin6->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(E_OPTERR); } else if (args[1]) return usage(E_OPTERR); 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)); safe_strncpy(ifr.ifr_name, devname, sizeof(ifr.ifr_name)); 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(E_OPTERR); } if (action == RTACTION_HELP) return usage(E_USAGE); return (INET6_setroute(action, options, args)); } #endif /* HAVE_AFINET6 */ net-tools-1.60+git20180626.aebd88e/lib/inet_gr.c000066400000000000000000000311001331436560500205550ustar00rootroot00000000000000/* $Id: inet_gr.c,v 1.14 2009/07/08 00:24:03 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 - do host (instead of network) name lookup for gws and hosts */ #include "config.h" #if HAVE_AFINET #include #include #include #include #include /* #include realy broken */ #include #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "net-features.h" #include "proc.h" #include "util.h" extern struct aftype inet_aftype; extern char *INET_sprintmask(const struct sockaddr_storage *sap, int numeric, unsigned int netmask); int rprint_fib(int ext, int numeric) { char buff[1024], iface[17], 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", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", "RefCnt", "%d", "Use", "%d", "Metric", "%d", "Mask", "%127s", "MTU", "%d", "Window", "%d", "IRTT", "%d", NULL); /* "%15s %127s %127s %X %d %d %d %127s %d %d %d\n" */ if (!fmt) return 1; while (fgets(buff, 1023, fp)) { struct sockaddr_storage 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; safe_strncpy(net_addr, INET_sprintmask(&snet_target, (numeric | 0x8000 | (iflags & RTF_HOST? 0x4000: 0)), sin_netmask->sin_addr.s_addr), sizeof(net_addr)); net_addr[15] = '\0'; safe_strncpy(gate_addr, inet_aftype.sprint(&snet_gateway, numeric | 0x4000), sizeof(gate_addr)); gate_addr[15] = '\0'; safe_strncpy(mask_addr, inet_aftype.sprint(&snet_mask, 1), sizeof(mask_addr)); 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) safe_strncpy(flags, "!", sizeof(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[17], flags[64]; char gate_addr[128], dest_addr[128], specdst[128]; char src_addr[128]; struct sockaddr_storage 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", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", "RefCnt", "%d", "Use", "%d", "Metric", "%d", "Source", "%127s", "MTU", "%d", "Window", "%d", "IRTT", "%d", "HH", "%d", "ARP", "%d", NULL); /* "%15s %127s %127s %X %d %d %d %127s %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", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", "RefCnt", "%d", "Use", "%d", "Metric", "%d", "Source", "%127s", "MTU", "%d", "Window", "%d", "IRTT", "%d", "TOS", "%d", "HHRef", "%d", "HHUptod", "%d", "SpecDst", "%127s", NULL); /* "%15s %127s %127s %X %d %d %d %127s %d %d %d %d %d %127s\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); safe_strncpy(dest_addr, inet_aftype.sprint(&snet, numeric), sizeof(dest_addr)); /* Fetch and resolve the gateway address. */ (void) inet_aftype.input(1, gate_addr, &snet); safe_strncpy(gate_addr, inet_aftype.sprint(&snet, numeric), sizeof(gate_addr)); /* Fetch and resolve the source. */ (void) inet_aftype.input(1, src_addr, &snet); safe_strncpy(src_addr, inet_aftype.sprint(&snet, numeric), sizeof(src_addr)); /* Fetch and resolve the SpecDst addrerss. */ (void) inet_aftype.input(1, specdst, &snet); safe_strncpy(specdst, inet_aftype.sprint(&snet, numeric), sizeof(specdst)); /* 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) safe_strncpy(flags, "!", sizeof(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 */ net-tools-1.60+git20180626.aebd88e/lib/inet_sr.c000066400000000000000000000204621331436560500206020ustar00rootroot00000000000000/* * inet_sr.c This files contains INET4 related route manipulation methods. * * Part of net-tools, the Linux base networking tools * * 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. */ #include "config.h" #if HAVE_AFINET #include #include #include #include #include #include #include #include /* realy broken */ #include #include #include #include #include #include #include #include #include #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(const int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If]\n")); fprintf(fp, _(" inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n")); fprintf(fp, _(" [netmask N] [mss Mss] [window W] [irtt I]\n")); fprintf(fp, _(" [mod] [dyn] [reinstate] [[dev] If]\n")); fprintf(fp, _(" inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n")); fprintf(fp, _(" inet_route [-FC] flush NOT supported\n")); return (rc); } 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; long clk_tck = ticks_per_second(); struct sockaddr_storage sas; xflag = 0; if (!strcmp(*args, "#net")) { xflag = 1; args++; } else if (!strcmp(*args, "#host")) { xflag = 2; args++; } if (*args == NULL) return usage(E_OPTERR); 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_storage sas; struct sockaddr_in m; struct sockaddr d; } mask; int n; n = inet_aftype.getmask(target, &mask.sas, netmask); if (n < 0) return usage(E_OPTERR); 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, &sas)) < 0) { inet_aftype.herror(target); return (E_LOOKUP); } memcpy(&rt.rt_dst, &sas, sizeof(rt.rt_dst)); switch (xflag) { case 1: isnet = 1; break; case 2: isnet = 0; break; } /* 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(E_OPTERR); 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_storage sas; struct sockaddr *mask = (struct sockaddr *)&sas; args++; if (!*args || mask_in_addr(rt)) return usage(E_OPTERR); safe_strncpy(netmask, *args, (sizeof netmask)); if ((isnet = inet_aftype.input(0, netmask, &sas)) < 0) { inet_aftype.herror(netmask); return (E_LOOKUP); } rt.rt_genmask = full_mask(*mask); args++; continue; } if (!strcmp(*args, "gw") || !strcmp(*args, "gateway")) { struct sockaddr_storage sas; args++; if (!*args) return usage(E_OPTERR); if (rt.rt_flags & RTF_GATEWAY) return usage(E_OPTERR); safe_strncpy(gateway, *args, (sizeof gateway)); if ((isnet = inet_aftype.input(256, gateway, &sas)) < 0) { inet_aftype.herror(gateway); return (E_LOOKUP); } memcpy(&rt.rt_gateway, &sas, sizeof(rt.rt_gateway)); if (isnet) { fprintf(stderr, _("route: %s: cannot use a NETWORK as gateway!\n"), gateway); return usage(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(E_OPTERR); rt.rt_mss = atoi(*args); args++; if (rt.rt_mss < 64 || rt.rt_mss > 65536) { fprintf(stderr, _("route: Invalid MSS/MTU.\n")); return usage(E_OPTERR); } continue; } if (!strcmp(*args, "window")) { args++; if (!*args) return usage(E_OPTERR); rt.rt_flags |= RTF_WINDOW; rt.rt_window = atoi(*args); args++; if (rt.rt_window < 128) { fprintf(stderr, _("route: Invalid window.\n")); return usage(E_OPTERR); } continue; } if (!strcmp(*args, "irtt")) { args++; if (!*args) return usage(E_OPTERR); args++; #if HAVE_RTF_IRTT rt.rt_flags |= RTF_IRTT; rt.rt_irtt = atoi(*(args - 1)); rt.rt_irtt *= (clk_tck / 100); /* FIXME */ #if 0 /* FIXME: do we need to check anything of this? */ if (rt.rt_irtt < 1 || rt.rt_irtt > (120 * clk_tck)) { fprintf(stderr, _("route: Invalid initial rtt.\n")); return usage(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(E_OPTERR); rt.rt_dev = *args++; continue; } /* nothing matches */ if (!rt.rt_dev) { rt.rt_dev = *args++; if (*args) return usage(E_OPTERR); /* must be last to catch typos */ } else return usage(E_OPTERR); } #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 usage(E_OPTERR); } if (mask & (mask + 1)) { fprintf(stderr, _("route: bogus netmask %s\n"), netmask); return usage(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 usage(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(E_OPTERR); } if (options & FLAG_CACHE) { fprintf(stderr, _("Modifying `inet' routing cache not supported\n")); return usage(E_OPTERR); } if ((*args == NULL) || (action == RTACTION_HELP)) return usage(E_USAGE); return (INET_setroute(action, options, args)); } #endif /* HAVE_AFINET */ net-tools-1.60+git20180626.aebd88e/lib/interface.c000066400000000000000000000602151331436560500210770ustar00rootroot00000000000000/* 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.35 2011-01-01 03:22:31 ecki Exp $ */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_AFIPX #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include "ipx.h" #endif #endif #if HAVE_AFECONET #include #endif #if HAVE_HWSLIP #include #include #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 */ {"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; int if_list_all = 0; /* do we have requested the complete proc list, yet? */ static struct interface *int_list, *int_last; static int if_readlist_proc(const char *); static struct interface *if_cache_add(const char *name) { struct interface *ife, **nextp, *new; if (!int_list) int_last = NULL; /* the cache is sorted, so if we hit a smaller if, exit */ 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; // keep sorting 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(const char *name) { /* if we have read all, use it */ if (if_list_all) return if_cache_add(name); /* otherwise we read a limited list */ if (if_readlist_proc(name) < 0) return NULL; return if_cache_add(name); } int for_all_interfaces(int (*doit) (struct interface *, void *), void *cookie) { struct interface *ife; if (!if_list_all && (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 if_cache_free(void) { struct interface *ife; while ((ife = int_list) != NULL) { int_list = ife->next; free(ife); } int_last = NULL; if_list_all = 0; 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 *= 2; continue; } break; } ifr = ifc.ifc_req; for (n = 0; n < ifc.ifc_len; n += sizeof(struct ifreq)) { if_cache_add(ifr->ifr_name); ifr++; } err = 0; out: free(ifc.ifc_buf); return err; } static const char *get_name(char *name, const char *p) { while (isspace(*p)) p++; while (*p) { if (isspace(*p)) break; if (*p == ':') { /* could be an alias */ const char *dot = p++; while (*p && isdigit(*p)) p++; if (*p == ':') { /* Yes it is, backup and copy it. */ p = dot; *name++ = *p++; while (*p && isdigit(*p)) { *name++ = *p++; } } else { /* No, it isn't */ p = dot; } p++; break; } *name++ = *p++; } *name++ = '\0'; return p; } static int procnetdev_version(const char *buf) { if (strstr(buf, "compressed")) return 3; if (strstr(buf, "bytes")) return 2; return 1; } static int get_dev_fields(const char *bp, struct interface *ife) { switch (procnetdev_vsn) { case 3: sscanf(bp, "%Lu %Lu %lu %lu %lu %lu %lu %lu %Lu %Lu %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, "%Lu %Lu %lu %lu %lu %lu %Lu %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.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, "%Lu %lu %lu %lu %lu %Lu %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(const char *target) { FILE *fh; char buf[512]; struct interface *ife; 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 -2; } if (fgets(buf, sizeof buf, fh)) /* eat line */; if (fgets(buf, sizeof buf, fh)) /* eat line */; #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)) { const char *s; char name[IFNAMSIZ]; s = get_name(name, buf); ife = if_cache_add(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; } #if 0 free(fmt); #endif fclose(fh); return err; } int if_readlist(void) { /* caller will/should check not to call this too often * (i.e. only if if_list_all == 0 */ int proc_err, conf_err; proc_err = if_readlist_proc(NULL); conf_err = if_readconf(); if_list_all = 1; if (proc_err < 0 && conf_err < 0) return -1; else return 0; } /* 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; const char *ifname = ife->name; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) return (-1); ife->flags = ifr.ifr_flags; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGIFMTU, &ifr) < 0) ife->mtu = 0; else ife->mtu = ifr.ifr_mtu; #if 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 safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGOUTFILL, &ifr) < 0) ife->outfill = 0; else ife->outfill = (unsigned long) ifr.ifr_data; #endif #ifdef SIOCGKEEPALIVE safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGKEEPALIVE, &ifr) < 0) ife->keepalive = 0; else ife->keepalive = (unsigned long) ifr.ifr_data; #endif } #endif safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) memset(&ife->map, 0, sizeof(struct ifmap)); else memcpy(&ife->map, &ifr.ifr_map, sizeof(struct ifmap)); safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(skfd, SIOCGIFMAP, &ifr) < 0) memset(&ife->map, 0, sizeof(struct ifmap)); else ife->map = ifr.ifr_map; #ifdef HAVE_TXQUEUELEN safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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) { safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); ifr.ifr_addr.sa_family = AF_INET; if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) { ife->has_ip = 1; ife->addr = ifr.ifr_addr; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(fd, SIOCGIFDSTADDR, &ifr) < 0) memset(&ife->dstaddr, 0, sizeof(struct sockaddr)); else ife->dstaddr = ifr.ifr_dstaddr; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(fd, SIOCGIFBRDADDR, &ifr) < 0) memset(&ife->broadaddr, 0, sizeof(struct sockaddr)); else ife->broadaddr = ifr.ifr_broadaddr; safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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) { safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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) { safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (!ipx_getaddr(fd, IPX_FRAME_ETHERII, &ifr)) { ife->has_ipx_bb = 1; ife->ipxaddr_bb = ifr.ifr_addr; } safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (!ipx_getaddr(fd, IPX_FRAME_SNAP, &ifr)) { ife->has_ipx_sn = 1; ife->ipxaddr_sn = ifr.ifr_addr; } safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (!ipx_getaddr(fd, IPX_FRAME_8023, &ifr)) { ife->has_ipx_e3 = 1; ife->ipxaddr_e3 = ifr.ifr_addr; } safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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) { safe_strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); 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) { const 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("%-8.8s ", ptr->name); printf("%5d ", ptr->mtu); /* 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) { const struct aftype *ap; const struct hwtype *hw; int hf; int can_compress = 0; unsigned long long rx, tx, short_rx, short_tx; const char *Rext = "B"; const char *Text = "B"; static char flags[200]; #if HAVE_AFIPX static const struct aftype *ipxtype = NULL; #endif #if HAVE_AFECONET static const struct aftype *ectype = NULL; #endif #if HAVE_AFATALK static const struct aftype *ddptype = NULL; #endif #if HAVE_AFINET6 FILE *f; char addr6[40], devname[21]; struct sockaddr_storage sas; 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 HAVE_HWSLIP if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6) can_compress = 1; #endif hw = get_hwntype(hf); if (hw == NULL) hw = get_hwntype(-1); sprintf(flags, "flags=%d<", ptr->flags); /* DONT FORGET TO ADD THE FLAGS IN ife_print_short, too */ if (ptr->flags == 0) strcat(flags,">"); if (ptr->flags & IFF_UP) strcat(flags,_("UP,")); if (ptr->flags & IFF_BROADCAST) strcat(flags,_("BROADCAST,")); if (ptr->flags & IFF_DEBUG) strcat(flags,_("DEBUG,")); if (ptr->flags & IFF_LOOPBACK) strcat(flags,_("LOOPBACK,")); if (ptr->flags & IFF_POINTOPOINT) strcat(flags,_("POINTOPOINT,")); if (ptr->flags & IFF_NOTRAILERS) strcat(flags,_("NOTRAILERS,")); if (ptr->flags & IFF_RUNNING) strcat(flags,_("RUNNING,")); if (ptr->flags & IFF_NOARP) strcat(flags,_("NOARP,")); if (ptr->flags & IFF_PROMISC) strcat(flags,_("PROMISC,")); if (ptr->flags & IFF_ALLMULTI) strcat(flags,_("ALLMULTI,")); if (ptr->flags & IFF_SLAVE) strcat(flags,_("SLAVE,")); if (ptr->flags & IFF_MASTER) strcat(flags,_("MASTER,")); if (ptr->flags & IFF_MULTICAST) strcat(flags,_("MULTICAST,")); #ifdef HAVE_DYNAMIC if (ptr->flags & IFF_DYNAMIC) strcat(flags,_("DYNAMIC,")); #endif /* DONT FORGET TO ADD THE FLAGS IN ife_print_short */ if (flags[strlen(flags)-1] == ',') flags[strlen(flags)-1] = '>'; else flags[strlen(flags)-1] = 0; printf(_("%s: %s mtu %d"), ptr->name, flags, ptr->mtu); #ifdef SIOCSKEEPALIVE if (ptr->outfill || ptr->keepalive) printf(_(" outfill %d keepalive %d"), ptr->outfill, ptr->keepalive); #endif printf("\n"); #if HAVE_AFINET if (ptr->has_ip) { printf(_(" %s %s"), ap->name, ap->sprint(&ptr->addr_sas, 1)); printf(_(" netmask %s"), ap->sprint(&ptr->netmask_sas, 1)); if (ptr->flags & IFF_BROADCAST) { printf(_(" broadcast %s"), ap->sprint(&ptr->broadaddr_sas, 1)); } if (ptr->flags & IFF_POINTOPOINT) { printf(_(" destination %s"), ap->sprint(&ptr->dstaddr_sas, 1)); } printf("\n"); } #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 %08x %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, &sas); printf(_(" %s %s prefixlen %d"), inet6_aftype.name, inet6_aftype.sprint(&sas, 1), plen); printf(_(" scopeid 0x%x"), scope); flags[0] = '<'; flags[1] = 0; if (scope & IPV6_ADDR_COMPATv4) { strcat(flags, _("compat,")); scope -= IPV6_ADDR_COMPATv4; } if (scope == 0) strcat(flags, _("global,")); if (scope & IPV6_ADDR_LINKLOCAL) strcat(flags, _("link,")); if (scope & IPV6_ADDR_SITELOCAL) strcat(flags, _("site,")); if (scope & IPV6_ADDR_LOOPBACK) strcat(flags, _("host,")); if (flags[strlen(flags)-1] == ',') flags[strlen(flags)-1] = '>'; else flags[strlen(flags)-1] = 0; printf("%s\n", flags); } } fclose(f); } #endif #if HAVE_AFIPX if (ipxtype == NULL) ipxtype = get_afntype(AF_IPX); if (ipxtype != NULL) { if (ptr->has_ipx_bb) printf(_(" %s Ethernet-II %s\n"), ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_bb_sas, 1)); if (ptr->has_ipx_sn) printf(_(" %s Ethernet-SNAP %s\n"), ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_sn_sas, 1)); if (ptr->has_ipx_e2) printf(_(" %s Ethernet802.2 %s\n"), ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_e2_sas, 1)); if (ptr->has_ipx_e3) printf(_(" %s Ethernet802.3 %s\n"), ipxtype->name, ipxtype->sprint(&ptr->ipxaddr_e3_sas, 1)); } #endif #if HAVE_AFATALK if (ddptype == NULL) ddptype = get_afntype(AF_APPLETALK); if (ddptype != NULL) { if (ptr->has_ddp) printf(_(" %s %s\n"), ddptype->name, ddptype->sprint(&ptr->ddpaddr_sas, 1)); } #endif #if HAVE_AFECONET if (ectype == NULL) ectype = get_afntype(AF_ECONET); if (ectype != NULL) { if (ptr->has_econet) printf(_(" %s %s\n"), ectype->name, ectype->sprint(&ptr->ecaddr_sas, 1)); } #endif /* 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(_(" %s %s"), hw->name, hw->print(ptr->hwaddr)); else printf(_(" %s"), hw->name); if (ptr->tx_queue_len != -1) printf(_(" txqueuelen %d"), ptr->tx_queue_len); printf(" (%s)\n", hw->title); #ifdef IFF_PORTSEL if (ptr->flags & IFF_PORTSEL) { printf(_(" media %s"), if_port_text[ptr->map.port][0]); if (ptr->flags & IFF_AUTOMEDIA) printf(_("autoselect")); printf("\n"); } #endif /* 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. */ rx = ptr->stats.rx_bytes; short_rx = rx * 10; if (rx > 1125899906842624ull) { if (rx > (9223372036854775807ull / 10)) short_rx = rx / 112589990684262ull; else 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"; } tx = ptr->stats.tx_bytes; short_tx = tx * 10; if (tx > 1125899906842624ull) { if (tx > (9223372036854775807ull / 10)) short_tx = tx / 112589990684262ull; else 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(_("RX packets %llu bytes %llu (%lu.%lu %s)\n"), ptr->stats.rx_packets, rx, (unsigned long)(short_rx / 10), (unsigned long)(short_rx % 10), Rext); if (can_compress) { printf(" "); printf(_("RX compressed:%lu\n"), ptr->stats.rx_compressed); } printf(" "); printf(_("RX errors %lu dropped %lu overruns %lu frame %lu\n"), ptr->stats.rx_errors, ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors, ptr->stats.rx_frame_errors); printf(" "); printf(_("TX packets %llu bytes %llu (%lu.%lu %s)\n"), ptr->stats.tx_packets, tx, (unsigned long)(short_tx / 10), (unsigned long)(short_tx % 10), Text); if (can_compress) { printf(" "); printf(_("TX compressed %lu\n"), ptr->stats.tx_compressed); } printf(" "); printf(_("TX errors %lu dropped %lu overruns %lu carrier %lu collisions %lu\n"), ptr->stats.tx_errors, ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors, ptr->stats.tx_carrier_errors, ptr->stats.collisions); } if ((ptr->map.irq || ptr->map.mem_start || ptr->map.dma || ptr->map.base_addr >= 0x100)) { printf(" device "); 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 0x%x "), ptr->map.base_addr); if (ptr->map.mem_start) { printf(_("memory 0x%lx-%lx "), ptr->map.mem_start, ptr->map.mem_end); } if (ptr->map.dma) printf(_(" dma 0x%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); } net-tools-1.60+git20180626.aebd88e/lib/ipx.c000066400000000000000000000106111331436560500177320ustar00rootroot00000000000000/* * IPX protocol output functions. * [Not yet input] * * Alan Cox * * 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 #include #include #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include "ipx.h" #endif #include #include #include #include #include #include #include #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 const char *IPX_print(const 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 const char *IPX_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; 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_storage *sasp) { char *sp = bufp, *bp; unsigned int i; struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) sasp; sipx->sipx_port = 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_storage *sasp) { struct sockaddr_ipx *sai = (struct sockaddr_ipx *) sasp; unsigned long netnum; char *ep; if (!sai) return (-1); 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; type &= 3; if (type <= 1) { netnum = strtoul(bufp, &ep, 16); if ((netnum == 0xffffffffL) || (netnum == 0L)) return (-1); 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, sasp); } 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 net-tools-1.60+git20180626.aebd88e/lib/ipx_gr.c000066400000000000000000000043101331436560500204210ustar00rootroot00000000000000/* 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 #include #include #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include "ipx.h" #endif #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.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; const struct aftype *ap; struct sockaddr_storage sas; fp = fopen(_PATH_PROCNET_IPX_ROUTE1, "r"); if (!fp) { fp = fopen(_PATH_PROCNET_IPX_ROUTE2, "r"); } if (!fp) { perror(NULL); printf(_("IPX routing not in file %s or %s found.\n"), _PATH_PROCNET_IPX_ROUTE1, _PATH_PROCNET_IPX_ROUTE2); return 1; } if ((ap = get_afntype(AF_IPX)) == NULL) { EINTERN("lib/ipx_rt.c", "AF_IPX missing"); return (-1); } printf(_("Kernel IPX routing table\n")); /* xxx */ printf(_("Destination Router Net Router Node\n")); if (fgets(buff, 1023, fp)) /* eat line */; 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(1, net, &sas); safe_strncpy(net, ap->sprint(&sas, numeric), sizeof(net)); /* Fetch and resolve the Router Net */ (void) ap->input(1, router_net, &sas); safe_strncpy(router_net, ap->sprint(&sas, numeric), sizeof(router_net)); /* Fetch and resolve the Router Node */ (void) ap->input(2, router_node, &sas); safe_strncpy(router_node, ap->sprint(&sas, numeric), sizeof(router_node)); printf("%-25s %-25s %-25s\n", net, router_net, router_node); } (void) fclose(fp); return (0); } #endif /* HAVE_AFIPX */ net-tools-1.60+git20180626.aebd88e/lib/ipx_sr.c000066400000000000000000000020371331436560500204410ustar00rootroot00000000000000/* * ipx_sr.c This files contains IPX related route manipulation methods. * * Part of net-tools, the Linux base networking tools * * 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. */ #include "config.h" #if HAVE_AFIPX #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #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 (E_NOSUPP); } #endif /* HAVE_AFIPX */ net-tools-1.60+git20180626.aebd88e/lib/irda.c000066400000000000000000000043051331436560500200540ustar00rootroot00000000000000/********************************************************************* * * Filename: irda.c * Version: 0.2 * Description: A second attempt to make ifconfig understand IrDA * Status: Experimental. * Author: Dag Brattli * Created at: Wed Apr 21 09:03:09 1999 * Modified at: Wed Apr 21 09:17:05 1999 * Modified by: Dag Brattli * Modified at: Wed May 1 11:51:44 CEST 2002 * Modified by: Christoph Bartelmus * * 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 #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* Probably not a good idea to include */ #ifndef ARPHRD_IRDA #define ARPHRD_IRDA 783 #endif /* * Function irda_print (ptr) * * Print hardware address of interface * */ static const char *irda_print(const char *ptr) { static char buff[12]; snprintf(buff, 12, "%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 */ net-tools-1.60+git20180626.aebd88e/lib/loopback.c000066400000000000000000000030001331436560500207160ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* Display an UNSPEC address. */ static const char *pr_unspec(const 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 }; net-tools-1.60+git20180626.aebd88e/lib/masq_info.c000066400000000000000000000150001331436560500211030ustar00rootroot00000000000000/* * 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.8 2009/09/06 22:52:01 vapier Exp $ * * Author: Bernd 'eckes' Eckenfels * 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: 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 #include #include #include #include #include #include #include #include #include #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? */ union { struct sockaddr_storage src_sas; struct sockaddr_in src; /* Source IP address */ }; union { struct sockaddr_storage dst_sas; struct sockaddr_in dst; /* Destination IP address */ }; 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 const 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(&ms->src_sas, numeric_host)); printf("%-20s ", ap->sprint(&ms->dst_sas, 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]; uint32_t src_addr, dst_addr; for (nread = 0; nread < nmslist; nread++) { ms = &mslist[nread]; if (has_pdelta) { if ((n = fscanf(f, " %s %"PRIx32":%hX %"PRIx32":%hX %hX %lX %hd %hd %lu", buf, &src_addr, &ms->sport, &dst_addr, &ms->dport, &ms->mport, &ms->initseq, &ms->delta, &ms->pdelta, &ms->expires)) == -1) return nread; memcpy(&ms->src.sin_addr.s_addr, &src_addr, 4); memcpy(&ms->dst.sin_addr.s_addr, &dst_addr, 4); } else { if ((n = fscanf(f, " %s %"PRIx32":%hX %"PRIx32":%hX %hX %lX %hd %lu", buf, &src_addr, &ms->sport, &dst_addr, &ms->dport, &ms->mport, &ms->initseq, &ms->delta, &ms->expires)) == -1) return nread; memcpy(&ms->src.sin_addr.s_addr, &src_addr, 4); memcpy(&ms->dst.sin_addr.s_addr, &dst_addr, 4); } 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("IP", buf) == 0) ms->proto = "ip"; else 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); } if (fgets(buf, sizeof(buf), f) == NULL) { EINTERN("masq_info", "fgets() failed"); fclose(f); return (-1); } 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); } free(mslist); return 0; } #endif net-tools-1.60+git20180626.aebd88e/lib/net-features.h000066400000000000000000000073411331436560500215470ustar00rootroot00000000000000/* * 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 * 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 */ #if HAVE_SELINUX " +SELINUX" #endif "\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 " #if HAVE_AFBLUETOOTH "+" #else "-" #endif "BLUETOOTH" "\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 " #if HAVE_HWEUI64 "+" #else "-" #endif "EUI64 " ; #endif /* FEATURE_* */ #endif /* _NET_FEATURES_H */ /* End of features.h */ net-tools-1.60+git20180626.aebd88e/lib/net-support.h000066400000000000000000000216241331436560500214450ustar00rootroot00000000000000/* * 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, * * Author: Fred N. van Kempen, * 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 /* This structure defines protocol families and their handlers. */ struct aftype { const char *name; const char *title; int af; int alen; const char *(*print) (const char *); const char *(*sprint) (const struct sockaddr_storage *, int numeric); int (*input) (int type, char *bufp, struct sockaddr_storage *); void (*herror) (const char *text); int (*rprint) (int options); int (*rinput) (int typ, int ext, char **argv); /* may modify src */ int (*getmask) (char *src, struct sockaddr_storage *mask, char *name); int fd; const char *flag_file; }; extern struct aftype * const aftypes[]; /* This structure defines hardware protocols and their handlers. */ struct hwtype { const char *name; const char *title; int type; int alen; const char *(*print) (const char *); int (*input) (char *, struct sockaddr_storage *); int (*activate) (int fd); int suppress_null_addr; }; extern const struct hwtype *get_hwtype(const char *name); extern const struct hwtype *get_hwntype(int type); extern void print_hwlist(int type); extern const struct aftype *get_aftype(const char *name); extern const struct aftype *get_afntype(int type); extern void print_aflist(int type); extern int hw_null_address(const 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 ROSE_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 const char *get_sname(int socknumber, const 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_rose; extern int flag_inet; extern int flag_inet6; extern int flag_bluetooth; extern char afname[256]; #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}, \ {"rose", 0, 0, 1}, \ {"unix", 0, 0, 1}, \ {"bluetooth", 0, 0, 1}, \ {"tcpip", 0, 0, 1} #define AFTRANS_CNT 12 #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 EXIT_SUCCESS #define E_USAGE EXIT_SUCCESS #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 */ #if HAVE_AFECONET #ifndef AF_ECONET #define AF_ECONET 19 /* Acorn Econet */ #endif #endif /* End of lib/support.h */ net-tools-1.60+git20180626.aebd88e/lib/netrom.c000066400000000000000000000127121331436560500204420ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) #include #else #include #endif #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" static char netrom_errmsg[128]; extern struct aftype netrom_aftype; static const char *NETROM_print(const 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 const char *NETROM_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr_ax25 *ax25_sap = (const struct sockaddr_ax25 *)sasp; const struct sockaddr *sap = (const struct sockaddr *)sasp; char buf[64]; if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return safe_strncpy(buf, _("[NONE SET]"), sizeof(buf)); return NETROM_print(ax25_sap->sax25_call.ax25_call); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif static int NETROM_input(int type, char *bufp, struct sockaddr_storage *sasp) { struct sockaddr_ax25 *ax25_sap = (struct sockaddr_ax25 *)sasp; struct sockaddr *sap = (struct sockaddr *)sasp; char *ptr; char *orig, c; unsigned int i; sap->sa_family = netrom_aftype.af; ptr = 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)); if (_DEBUG) fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig); 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)); if (_DEBUG) fprintf(stderr, "netrom_input(%s): %s !\n", netrom_errmsg, orig); 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. */ if (_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"); } return (0); } /* Display an error message. */ static void NETROM_herror(const 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_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; if (NETROM_input(0, bufp, sasp) < 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 */ net-tools-1.60+git20180626.aebd88e/lib/netrom_gr.c000066400000000000000000000042101331436560500211240ustar00rootroot00000000000000/* * 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, * Copyright 1999 Bernd Eckenfels, Germany * base on Code from Jonathan Naylor * * 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 #include #include #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; */ if (!f1) perror(_PATH_PROCNET_NR_NODES); 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")); if (fgets(buffer, 256, f1)) /* eat line */; 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); if (fgets(buffer, 256, f2)) /* eat line */; 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 */ net-tools-1.60+git20180626.aebd88e/lib/netrom_sr.c000066400000000000000000000023141331436560500211430ustar00rootroot00000000000000/* * netrom_sr.c This files contains NETROM related route manipulation methods. * * Part of net-tools, the Linux base networking tools * * 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. */ #include "config.h" #if HAVE_AFNETROM #include #include #include #include #include #include /* #include realy broken */ #include #include #include #include #include #include #include #include #include #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; */ #if 0 static int usage(const int rc) { fprintf(stderr, _("netrom usage\n")); return (rc); } #endif int NETROM_rinput(int action, int ext, char **args) { fprintf(stderr, _("NET/ROM: this needs to be written\n")); return (E_NOSUPP); } #endif /* HAVE_AFNETROM */ net-tools-1.60+git20180626.aebd88e/lib/nstrcmp.c000066400000000000000000000067441331436560500206340ustar00rootroot00000000000000/* Copyright 1998 by Andi Kleen. Subject to the GPL. */ /* rewritten by bernd eckenfels because of complicated alias semantic */ /* $Id: nstrcmp.c,v 1.4 2004/06/03 22:49:17 ecki Exp $ */ #include #include #include #include "util.h" /* return numerical :999 suffix or null. sideeffect: replace ':' with \0 */ char* cutalias(char* name) { int digit = 0; int pos; for(pos=strlen(name); pos>0; pos--) { if (name[pos-1]==':' && digit) { name[pos-1]='\0'; return name+pos; } if (!isdigit(name[pos-1])) break; digit = 1; } return NULL; } /* return index of last non digit or -1 if it does not end with digits */ int rindex_nondigit(char *name) { int pos = strlen(name); for(pos=strlen(name); pos>0; pos--) { if (!isdigit(name[pos-1])) return pos; } return 0; } /* like strcmp(), but knows about numbers and ':' alias suffix */ int nstrcmp(const char *ap, const char *bp) { char *a = xstrdup(ap); char *b = xstrdup(bp); char *an, *bn; int av = 0, bv = 0; char *aalias=cutalias(a); char *balias=cutalias(b); int aindex=rindex_nondigit(a); int bindex=rindex_nondigit(b); int complen=(aindex bindex) { res = 1; goto out; } if (aindex < bindex) { res = -1; goto out; } an = a+aindex; bn = b+bindex; av = atoi(an); bv = atoi(bn); if (av < bv) { res = -1; goto out; } if (av > bv) { res = 1; goto out; } res = strcmp(a, b); if (res != 0) { goto out; } av = -1; if (aalias != NULL) av = atoi(aalias); bv = -1; if (balias != NULL) bv = atoi(balias); if (av < bv) { res = -1; goto out; } if (av > bv) { res = 1; goto out; } if (aalias && balias) { res = strcmp(aalias, balias); } out: free(a); free(b); return res; } #ifdef NSTRCMP_TEST int cs(int s) { if (s < 0) return -1; if (s > 0) return 1; return 0; } int dotest(char* a, char* b, int exp) { int res = nstrcmp(a, b); int err = (cs(res) != cs(exp)); printf("nstrcmp(\"%s\", \"%s\")=%d %d %s\n", a, b, res, exp, err?"WRONG":"OK"); return err; } int main() { int err = 0; err |= dotest("eth1", "eth1", 0); err |= dotest("eth0:1", "eth0:1", 0); err |= dotest("lan", "lan", 0); err |= dotest("100", "100", 0); err |= dotest("", "", 0); err |= dotest(":", ":", 0); err |= dotest("a:b:c", "a:b:c", 0); err |= dotest("a:", "a:", 0); err |= dotest(":a", ":a", 0); err |= dotest("a", "aa", -1); err |= dotest("eth0", "eth1", -1); err |= dotest("eth1", "eth20", -1); err |= dotest("eth20", "eth100", -1); err |= dotest("eth1", "eth13", -1); err |= dotest("eth", "eth2", -1); err |= dotest("eth0:1", "eth0:2", -1); err |= dotest("eth1:10", "eth13:10", -1); err |= dotest("eth1:1", "eth1:13", -1); err |= dotest("a", "a:", -1); err |= dotest("aa", "a", 1); err |= dotest("eth2", "eth1", 1); err |= dotest("eth13", "eth1", 1); err |= dotest("eth2", "eth", 1); err |= dotest("eth2:10", "eth2:1", 1); err |= dotest("eth2:5", "eth2:4", 1); err |= dotest("eth3:2", "eth2:3", 1); err |= dotest("eth13:1", "eth1:0", 1); err |= dotest("a:", "a", 1); err |= dotest("a1b12", "a1b2", 1); err |= dotest("eth1", "eth01", 1); err |= dotest("eth01", "eth1", -1); err |= dotest("eth1:1", "eth01:1", 1); err |= dotest("eth01:1", "eth1:1", -1); err |= dotest("eth1:1", "eth01:01", 1); err |= dotest("eth1:01", "eth01:1", 1); err |= dotest("eth01:1", "eth1:01", -1); err |= dotest("eth01:01", "eth1:1", -1); return err; } #endif net-tools-1.60+git20180626.aebd88e/lib/pathnames.h000066400000000000000000000054711331436560500211270ustar00rootroot00000000000000/* * 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, */ /* 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_UDPLITE "/proc/net/udplite" #define _PATH_PROCNET_UDPLITE6 "/proc/net/udplite6" #define _PATH_PROCNET_SCTPEPTS "/proc/net/sctp/eps" #define _PATH_PROCNET_SCTP6EPTS "/proc/net/sctp6/eps" #define _PATH_PROCNET_SCTPASSOCS "/proc/net/sctp/assocs" #define _PATH_PROCNET_SCTP6ASSOCS "/proc/net/sctp6/assocs" #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_SOCKET1 "/proc/net/ipx/socket" #define _PATH_PROCNET_IPX_SOCKET2 "/proc/net/ipx" #define _PATH_PROCNET_IPX_ROUTE1 "/proc/net/ipx/route" #define _PATH_PROCNET_IPX_ROUTE2 "/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 "/proc/net/rose" #define _PATH_PROCNET_ROSE_NEIGH "/proc/net/rose_neigh" #define _PATH_PROCNET_ROSE_NODES "/proc/net/rose_nodes" #define _PATH_PROCNET_ROSE_ROUTE "/proc/net/rose_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" #define _PATH_PROCNET_ATALK_ROUTE "/proc/net/atalk_route" #define _PATH_SYS_BLUETOOTH_L2CAP "/sys/kernel/debug/bluetooth/l2cap" #define _PATH_SYS_BLUETOOTH_RFCOMM "/sys/kernel/debug/bluetooth/rfcomm" /* pathname for the netlink device */ #define _PATH_DEV_ROUTE "/dev/route" /* End of pathnames.h */ net-tools-1.60+git20180626.aebd88e/lib/ppp.c000066400000000000000000000026631331436560500177410ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #include #include #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 */ net-tools-1.60+git20180626.aebd88e/lib/ppp_ac.c000066400000000000000000000021601331436560500203740ustar00rootroot00000000000000/* * 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 #include #include #include #include #include #include #include #include #include #include #include #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 */ net-tools-1.60+git20180626.aebd88e/lib/proc.c000066400000000000000000000036451331436560500201060ustar00rootroot00000000000000/* Tolerant /proc file parser. Copyright 1998 Andi Kleen */ /* $Id: proc.c,v 1.5 2007/12/01 18:44:57 ecki Exp $ */ /* Fixme: cannot currently cope with removed fields */ #include #include #include #include #include #include #include "util.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 xstrdup(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; } FILE *proc_fopen(const char *name) { static char *buffer; static size_t pagesz; FILE *fd = fopen(name, "r"); if (fd == NULL) return NULL; if (!buffer) { pagesz = getpagesize(); buffer = malloc(pagesz); } setvbuf(fd, buffer, _IOFBF, pagesz); return fd; } net-tools-1.60+git20180626.aebd88e/lib/proc.h000066400000000000000000000002561331436560500201060ustar00rootroot00000000000000/* * prototypes for proc.c */ char *proc_gen_fmt(char *name, int more, FILE * fh,...); int proc_guess_fmt(char *name, FILE* fh,...); FILE *proc_fopen(const char *name); net-tools-1.60+git20180626.aebd88e/lib/rose.c000066400000000000000000000075221331436560500201110ustar00rootroot00000000000000/* * 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, * based on ax25.c by: * Fred N. van Kempen, * 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 #include #include #include #include /* ARPHRD_ROSE */ #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" #ifndef _NETROSE_ROSE_H #include #include /* 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 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 const char * ROSE_print(const char *ptr) { static char buff[12]; snprintf(buff, sizeof(buff), "%02hhx%02hhx%02hhx%02hhx%02hhx", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4]); buff[10] = '\0'; return (buff); } /* Display a ROSE socket address. */ static const char * ROSE_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr_rose *rose_sap = (const struct sockaddr_rose *)sasp; const struct sockaddr *sap = (const struct sockaddr *)sasp; if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return _("[NONE SET]"); return ROSE_print(rose_sap->srose_addr.rose_addr); } static int ROSE_input(int type, char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; char *ptr; int i, o; sap->sa_family = rose_aftype.af; ptr = ((struct sockaddr_rose *) sasp)->srose_addr.rose_addr; /* Node address the correct length ? */ if (strlen(bufp) != 10) { safe_strncpy(ROSE_errmsg, _("Node address must be ten digits"), sizeof(ROSE_errmsg)); 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. */ return (0); } /* Display an error message. */ static void ROSE_herror(const 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_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; if (ROSE_input(0, bufp, sasp) < 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 */ net-tools-1.60+git20180626.aebd88e/lib/rose_gr.c000066400000000000000000000051611331436560500205760ustar00rootroot00000000000000 /* * 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, * based on ax25_gr.c by: * Bernd Eckenfels, * Copyright 1999 Bernd Eckenfels, Germany * base on Code from Jonathan Naylor * * Bernard Pidoux f6bvp@amsat.org added ROSE_NEIGH proc * completing ROSE routing table - November 2009. * * 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 #include #include #include #include /* ARPHRD_ROSE */ #include #include #include #include #include #endif #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" int ROSE_rprint(int options) { FILE *f1, *f2; char buffer1[256], buffer2[256]; int i, neigh, use; f2 = fopen(_PATH_PROCNET_ROSE_NEIGH, "r"); f1 = fopen(_PATH_PROCNET_ROSE_NODES, "r"); if (f1 == NULL) { perror(_PATH_PROCNET_ROSE_NODES); fprintf(stderr, _("ROSE not configured in this system.\n")); /* xxx */ return 1; } printf(_("Kernel ROSE routing table\n")); printf(_("Destination neigh1 callsign device neigh2 callsign device neigh3 callsign device\n")); if (fgets(buffer1, 256, f1)) /* eat line */; while (fgets(buffer1, 256, f1)) { buffer1[10] = 0; /* address */ buffer1[15] = 0; /* mask */ buffer1[17] = 0; /* use */ buffer1[23] = 0; /* neigh 1 */ buffer1[29] = 0; /* neigh 2 */ buffer1[35] = 0; /* neigh 3 */ use = atoi(buffer1 + 16); neigh = atoi(buffer1 + 18); printf("%-10s ", buffer1); for (i = 0; i < use; i++) { neigh = atoi(buffer1 + 6 * (i + 3)); printf("%05d ", neigh); rewind(f2); if (fgets(buffer2, 256, f2)) /* eat line */; while (fgets(buffer2, 256, f2)) { buffer2[15] = 0; buffer2[21] = 0; if (atoi(buffer2) == neigh) printf("%-10s %-4s", buffer2 + 6, buffer2 + 16); } } printf("\n"); } fclose(f1); fclose(f2); return 0; } #endif /* HAVE_AFROSE */ net-tools-1.60+git20180626.aebd88e/lib/setroute.c000066400000000000000000000046201331436560500210070ustar00rootroot00000000000000/* * 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 * 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 #include #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) { const 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)); } net-tools-1.60+git20180626.aebd88e/lib/sit.c000066400000000000000000000023611331436560500177340ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #ifndef ARPHRD_SIT #warning "No definition of ARPHRD_SIT in , 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 */ net-tools-1.60+git20180626.aebd88e/lib/slip.c000066400000000000000000000031311331436560500201000ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #include #include #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 */ net-tools-1.60+git20180626.aebd88e/lib/slip_ac.c000066400000000000000000000052341331436560500205510ustar00rootroot00000000000000/* * 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, * 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 #include #include #include #include #include #include #include #include #include #include #include #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 */ net-tools-1.60+git20180626.aebd88e/lib/sockets.c000066400000000000000000000030641331436560500206110ustar00rootroot00000000000000/* 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 #include #include #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 * const *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; } net-tools-1.60+git20180626.aebd88e/lib/strip.c000066400000000000000000000047711331436560500203050ustar00rootroot00000000000000/* * 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 * * 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "util.h" #include "intl.h" extern struct hwtype strip_hwtype; static const char * pr_strip(const 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_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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 */ net-tools-1.60+git20180626.aebd88e/lib/tr.c000066400000000000000000000067231331436560500175700ustar00rootroot00000000000000/* * lib/tr.c This file contains an implementation of the "Tokenring" * support functions. * * Version: $Id: tr.c,v 1.9 2005/05/16 03:15:12 ecki Exp $ * * Author: Fred N. van Kempen, * 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 #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* actual definition at the end of file */ extern struct hwtype tr_hwtype; #ifdef ARPHRD_IEEE802_TR extern struct hwtype tr_hwtype1; #endif static const char *pr_tr(const 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); } #ifdef DEBUG #define _DEBUG 1 #else #define _DEBUG 0 #endif static int in_tr(char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; char *ptr; char c, *orig; int i, val; #ifdef ARPHRD_IEEE802_TR if (kernel_version() < KRELEASE(2,3,30)) { sap->sa_family = tr_hwtype.type; } else { sap->sa_family = tr_hwtype1.type; } #else sap->sa_family = tr_hwtype.type; #warning "Limited functionality, no support for ARPHRD_IEEE802_TR (old kernel headers?)" #endif 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 { if (_DEBUG) fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig); 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 (_DEBUG) fprintf(stderr, _("in_tr(%s): invalid token ring address!\n"), orig); errno = EINVAL; return (-1); } *ptr++ = (unsigned char) (val & 0377); i++; /* We might get a semicolon here - not required. */ if (*bufp == ':') { if (_DEBUG && i == TR_ALEN) fprintf(stderr, _("in_tr(%s): trailing : ignored!\n"), orig); bufp++; } } /* That's it. Any trailing junk? */ if (_DEBUG && (i == TR_ALEN) && (*bufp != '\0')) { fprintf(stderr, _("in_tr(%s): trailing junk!\n"), orig); errno = EINVAL; return (-1); } if (_DEBUG) fprintf(stderr, "in_tr(%s): %s\n", orig, pr_tr(sap->sa_data)); 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 */ net-tools-1.60+git20180626.aebd88e/lib/tunnel.c000066400000000000000000000012711331436560500204410ustar00rootroot00000000000000/* * Tunnel.c, Alan Cox 1995. * */ #include "config.h" #if HAVE_HWTUNNEL #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" extern struct hwtype ether_hwtype; static const char *pr_tunnel(const char *ptr) { return (""); } static int in_tunnel(char *bufp, struct sockaddr_storage *sasp) { return (-1); } struct hwtype tunnel_hwtype = { "tunnel", NULL, /*"IPIP Tunnel", */ ARPHRD_TUNNEL, 0, pr_tunnel, in_tunnel, NULL, 0 }; #endif /* HAVE_HWTUNNEL */ net-tools-1.60+git20180626.aebd88e/lib/unix.c000066400000000000000000000046141331436560500201230ustar00rootroot00000000000000/* * 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, * 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 #include #if HAVE_AFUNIX #include #endif #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "intl.h" #include "util.h" /* Display an UNSPEC address. */ static const char *UNSPEC_print(const 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 const char *UNSPEC_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; 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 const char *UNIX_print(const char *ptr) { return (ptr); } /* Display a UNIX domain address. */ static const char *UNIX_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; 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, }; net-tools-1.60+git20180626.aebd88e/lib/util-ank.c000066400000000000000000000133231331436560500206610ustar00rootroot00000000000000/* * 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, * * * Changes: * * Rani Assaf 980929: resolve addresses */ #include #include #include #include #include #include #include #include #include #include #include #include #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, char *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); } net-tools-1.60+git20180626.aebd88e/lib/util.c000066400000000000000000000022451331436560500201130ustar00rootroot00000000000000/* Copyright 1998 by Andi Kleen. Subject to the GPL. */ /* $Id: util.c,v 1.4 1998/11/17 15:17:02 freitag Exp $ */ #include #include #include #include #include #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; } /* Like strdup, but oom() instead of NULL */ char *xstrdup(const char *s) { char *d = strdup(s); if (!d) oom(); return d; } 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=0; if (uname(&uts) < 0) return -1; if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) < 2) return -1; return KRELEASE(major, minor, patch); } long ticks_per_second(void) { return sysconf(_SC_CLK_TCK); } /* 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); } net-tools-1.60+git20180626.aebd88e/lib/util.h000066400000000000000000000010241331436560500201120ustar00rootroot00000000000000#include void *xmalloc(size_t sz); void *xrealloc(void *p, size_t sz); char *xstrdup(const char *src); #define new(p) ((p) = xmalloc(sizeof(*(p)))) int kernel_version(void); #define KRELEASE(maj,min,patch) ((maj) * 10000 + (min)*1000 + (patch)) long ticks_per_second(void); int nstrcmp(const char *, const char *); char *safe_strncpy(char *dst, const char *src, size_t size); #define netmin(a,b) ((a)<(b) ? (a) : (b)) #define netmax(a,b) ((a)>(b) ? (a) : (b)) #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) net-tools-1.60+git20180626.aebd88e/lib/x25.c000066400000000000000000000074431331436560500175610ustar00rootroot00000000000000/* * 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, * based on ax25.c by: * Fred N. van Kempen, * 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 #include #include #include #include /* ARPHRD_X25 */ #include #include #include #include #include #include #include #include #include "net-support.h" #include "pathnames.h" #define EXTERN #if 0 #include "net-locale.h" #endif #include "intl.h" #include "util.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 const char * X25_print(const 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 const char * X25_sprint(const struct sockaddr_storage *sasp, int numeric) { const struct sockaddr *sap = (const struct sockaddr *)sasp; if (sap->sa_family == 0xFFFF || sap->sa_family == 0) return( _("[NONE SET]")); return(X25_print(((struct sockaddr_x25 *)sasp)->sx25_addr.x25_addr)); } /* * return the sigdigits of the address */ static int X25_input(int type, char *bufp, struct sockaddr_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; 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) { safe_strncpy(X25_errmsg, _("Address can't exceed eighteen digits with sigdigits"), sizeof(X25_errmsg)); #ifdef DEBUG fprintf(stderr, "x25_input(%s): %s !\n", bufp, X25_errmsg); #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)) { if (p != NULL) *p = '/'; safe_strncpy(X25_errmsg, _("Invalid address"), sizeof(X25_errmsg)); #ifdef DEBUG fprintf(stderr, "x25_input(%s): %s !\n", bufp, X25_errmsg); #endif errno = EINVAL; return(-1); } strncpy(ptr, bufp, sigdigits+1); /* All done. */ #ifdef DEBUG fprintf(stderr, "x25_input(%s)\n", bufp); #endif return sigdigits; } /* Display an error message. */ static void X25_herror(const 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_storage *sasp) { struct sockaddr *sap = (struct sockaddr *)sasp; if (X25_input(0, bufp, sasp) < 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 */ net-tools-1.60+git20180626.aebd88e/lib/x25_gr.c000066400000000000000000000042771331436560500202530ustar00rootroot00000000000000/* * 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, * based on ax25_gr.c by: * Bernd Eckenfels, * Copyright 1999 Bernd Eckenfels, Germany * base on Code from Jonathan Naylor * * 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 #include #include #include #include /* ARPHRD_X25 */ #include #include #include #include #include #endif #include #include #include #include #include "net-support.h" #include "pathnames.h" #include "proc.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 static FILE *proc_fopen_x25_route(void) { FILE *ret = proc_fopen(_PATH_PROCNET_X25_ROUTE); if (ret) return ret; /* try old linux-2.4 name */ return proc_fopen("/proc/net/x25_routes"); } int X25_rprint(int options) { FILE *f=proc_fopen_x25_route(); 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 */ if (fgets(buffer,256,f)) /* eat line */; 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 */ net-tools-1.60+git20180626.aebd88e/lib/x25_sr.c000066400000000000000000000067371331436560500202720ustar00rootroot00000000000000/* * lib/x25_sr.c This file contains an implementation of the "X.25" * route change support functions. * * Author: Stephane Fillod, * 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "pathnames.h" #define EXTERN #if 0 #include "net-locale.h" #endif #include "intl.h" #include "util.h" #include "net-features.h" extern struct aftype x25_aftype; static int skfd = -1; static int usage(const int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, "Usage: x25_route [-v] del Target[/mask] [dev] If\n"); fprintf(fp, " x25_route [-v] add Target[/mask] [dev] If\n"); return(rc); } static int X25_setroute(int action, int options, char **args) { struct x25_route_struct rt; struct sockaddr_storage sas; struct sockaddr_x25 *sx25 = (struct sockaddr_x25 *)&sas; char target[128]; signed int sigdigits; if (*args == NULL) return usage(E_OPTERR); safe_strncpy(target, *args++, sizeof(target)); /* Clean out the x25_route_struct structure. */ memset((char *) &rt, 0, sizeof(rt)); if ((sigdigits = x25_aftype.input(0, target, &sas)) < 0) { x25_aftype.herror(target); return (E_LOOKUP); } rt.sigdigits=sigdigits; /* this works with 2.4 and 2.6 headers struct x25_address vs. typedef */ memcpy(&rt.address, &sx25->sx25_addr, sizeof(sx25->sx25_addr)); while (*args) { if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { args++; if (!*args) return usage(E_OPTERR); } else if (args[1]) return usage(E_OPTERR); if (rt.device[0]) return usage(E_OPTERR); safe_strncpy(rt.device, *args, sizeof(rt.device)); args++; } if (rt.device[0]=='\0') return usage(E_OPTERR); /* sanity checks.. */ if (rt.sigdigits > 15) { fprintf(stderr, _("route: bogus netmask %d\n"), rt.sigdigits); return usage(E_OPTERR); } if (rt.sigdigits > strlen(rt.address.x25_addr)) { fprintf(stderr, _("route: netmask doesn't match route address\n")); return usage(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(E_OPTERR); } if (options & FLAG_CACHE) { fprintf(stderr,"Modifying `x25' routing cache not supported\n"); return usage(E_OPTERR); } if (action == RTACTION_HELP) return usage(E_USAGE); return(X25_setroute(action, options, args)); } #endif /* HAVE_AFX25 */ net-tools-1.60+git20180626.aebd88e/man/000077500000000000000000000000001331436560500167745ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/man/Makefile000066400000000000000000000046161331436560500204430ustar00rootroot00000000000000# # 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 # Arnaldo Carvalhoa de Melo # 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) ALL_LANGS = $(filter-out Makefile,$(wildcard *)) ifeq ($(LINGUAS),) LANGS = $(ALL_LANGS) else LANGS = $(sort $(filter $(LINGUAS),$(ALL_LANGS)) en_US) endif else LANGS = en_US endif IGNORE_CMDS = "" ifneq ($(HAVE_ARP_TOOLS),1) IGNORE_CMDS += |arp.?|rarp.? endif ifneq ($(HAVE_HOSTNAME_TOOLS),1) IGNORE_CMDS += |dnsdomainname.?|hostname.? endif ifneq ($(HAVE_HOSTNAME_SYMLINKS),1) IGNORE_CMDS += |domainname.?|nisdomainname.?|ypdomainname.? endif ifneq ($(HAVE_AFDECnet),1) IGNORE_CMDS += |nodename.? endif ifneq ($(HAVE_IP_TOOLS),1) IGNORE_CMDS += |ipmaddr.?|iptunnel.? endif ifneq ($(HAVE_MII),1) IGNORE_CMDS += |mii-tool.? endif ifneq ($(HAVE_PLIP_TOOLS),1) IGNORE_CMDS += |plipconfig.? endif ifneq ($(HAVE_SERIAL_TOOLS),1) IGNORE_CMDS += |slattach.? 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 ; \ $(INSTALL) -d -m 755 $$MAN_DIR; \ for CMD in *.$$SECTION; do \ [ -e $$CMD ] || continue; \ case $$CMD in $(IGNORE_CMDS)) continue;; esac; \ $(INSTALL) -m 644 $$CMD $$MAN_DIR || exit 1; \ done; \ done; \ cd ..; \ done # End of man/Makefile. net-tools-1.60+git20180626.aebd88e/man/de_DE/000077500000000000000000000000001331436560500177345ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/man/de_DE/arp.8000066400000000000000000000137051331436560500206150ustar00rootroot00000000000000.TH ARP 8 "17. Oktober 2012" "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 Schnittstelle" ] .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 Maske" ] .B pub .PP .B arp .RB [ \-v ] .RB [ "\-H Typ" ] .RB [ "\-i Schnittstelle" ] .B -Ds Rechnername Schnittstelle2 .RB [ "netmask Maske" ] .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 es m\(:oglich, mit dem .BR arp -Programm den Inhalt des ARP-Caches vollst\(:andig auszugeben. .B ARP steht f\(:ur Address Resolution Protocol, welches dazu verwendet wird, \(:uber die IPv4-Adresse die MAC-Adresse von Nachbarn im Netzwerk zu finden. .SH OPTIONEN .TP .B "\-v, \-\-verbose" Ausf\(:uhrlichere Ausgaben. .TP .B "\-n, \-\-numeric" Numerische Adressausgaben anstatt zu versuchen, den symbolischen Rechner-, Port- oder Benutzernamen zu ermitteln. .TP .B "\-H Typ, \-\-hw-type Typ" 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 "), PROnet (" pronet "), AX.25 (" ax25 ") und NET/ROM (" netrom ")." .TP .B "\-a [Rechnername], \-\-display [Rechnername]" Zeigt die Eintr\(:age der angegebenen Rechner an. Wird kein .BR 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 Schnittstelle2 verwenden. .TP .B "\-i Schnittstelle, \-\-device Schnittstelle" Eine Netzwerksschnittstelle ausw\(:ahlen. Es werden nur Eintr\(:age f\(:ur die angegebene Schnittstelle ausgegeben. Beim Setzen 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 .BR 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 welche die IP-Datagramme weitergeleitet werden. .TP .B "\-s Rechnername hw_addr, \-\-set Rechnername hw_addr" Erzeugt manuell einen ARP-Adresseintrag f\(:ur den Rechner .BR 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, durch Doppelpunkte getrennte Bytes. Beim Zuf\(:ugen von Proxy-ARP-Entr\(:agen (das sind die mit dem gesetzten .BR pub lished-Flag) kann die .B Maske 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. Der Eintrag wird permanent im ARP-Cache gespeichert, wenn das \fBtemp\fR-Flag nicht angegeben wird. .br .B ANMERKUNG: Ab der Kernelversion 2.2.0 ist es nicht mehr m\(:oglich, ARP-Eintr\(:age f\(:ur ganze Teilnetze zu erzeugen. Stattdessen 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 dem .BR C -Flag markiert. Permanente Eintr\(:age werden mit .B M und zu publizierende Eintr\(:age mit .B P markiert. .SH BEISPIELE .B /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub Beantwortet ARP-Anfragen f\(:ur 10.0.0.2 die auf der Schnittstelle eth0 empfangen werden mit der MAC-Adresse f\(:ur eth1. .B /usr/sbin/arp -i eth1 -d 10.0.0.1 Entfernt den ARP-Eintrag f\(:ur 10.0.0.1 auf der Schnittstelle .BR eth1 . Dies betrifft sowohl publizierte Proxy-ARP-Einträge als auch auf permanente ARP-Eintr\(:age. .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, , Bernd Eckenfels . .SH \(:Ubersetzung Ralf B\(:achle , Simon A. Eugster net-tools-1.60+git20180626.aebd88e/man/de_DE/dnsdomainname.1000066400000000000000000000000241331436560500226270ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/de_DE/domainname.1000066400000000000000000000000241331436560500221220ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/de_DE/ethers.5000066400000000000000000000022431331436560500213150ustar00rootroot00000000000000.\" .\" Original by ?? .\" .\" German translation by Ralf Baechle (ralf@linux-mips.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 net-tools-1.60+git20180626.aebd88e/man/de_DE/hostname.1000066400000000000000000000131071331436560500216360ustar00rootroot00000000000000.\" .\" Original by ?? .\" .\" German translation by Ralf Baechle (ralf@linux-mips.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, .br Bernd Eckenfels, (NIS and manpage). .br Steve Whitehouse, (DECnet support and manpage). .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/ifconfig.8000066400000000000000000000151661331436560500216220ustar00rootroot00000000000000.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 "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 iptables(8) Kommando gemacht werden. .SH DATEIEN .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), iptables(8) .SH AUTOREN Fred N. van Kempen, .br Alan Cox, .br Phil Blundell, .br Andi Kleen, .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/netstat.8000066400000000000000000000267031331436560500215170ustar00rootroot00000000000000.\" .\" netstat.8 .\" .\" Original: (mdw@tc.cornell.edu & dc6iq@insu1.etec.uni-karlsruhe.de) .\" German translation: Ralf Baechle (ralf@linux-mips.org) .\" .\" Modified: Bernd.Eckenfels@inka.de .\" Modified: Andi Kleen ak@muc.de .\" Modified: Tuan Hoang tuan@optimus.mitre.org .\" .\" .TH NETSTAT 8 "2007-12-02" "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 [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .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 } .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. .PP .B Bitte beachten Sie, dass der Inhalt der deutschen man-page nicht vollst\(:andig ist, im Moment. .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, \-\-interfaces" Wird die .BR -i ", " --interfaces Option verwendet, so wird eine Tabelle aller Schnittstellen ausgedruckt. Die Ausgabe ist im Format von .B "ifconfig -e" und wird in .BR ifconfig (8) beschrieben. .B "netstat -ei" druckt eine Tabelle f\(:ur Interfaces 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, \-\-continuous" 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 iptables(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 iptables (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 geschrieben, die Manpage zum gr\(:o\(ssten Teil von Matt Welsh . Sie wurde von Alan Cox aktualisiert, ben\(:otigt aber weitere Arbeit. .br Die Manpage und der eigentliche .B netstat Befehl wuren von Bernd Eckenfels vollst\(:andig neu geschrieben. .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/nisdomainname.1000066400000000000000000000000241331436560500226340ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/de_DE/plipconfig.8000066400000000000000000000036311331436560500221620ustar00rootroot00000000000000.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, , .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/rarp.8000066400000000000000000000043451331436560500207770ustar00rootroot00000000000000.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, .br Fred N. van Kempen, .br Phil Blundell, .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/route.8000066400000000000000000000226341331436560500211720ustar00rootroot00000000000000.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 net-tools-1.60+git20180626.aebd88e/man/de_DE/slattach.8000066400000000000000000000061561331436560500216400ustar00rootroot00000000000000.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 kissattach 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 kissattach(8), dip(8) pppd(8), sliplogin(8). .SH AUTOREN Fred N. van Kempen, .br Alan Cox, .br Miquel van Smoorenburg, .br George Shearer, .br Yossi Gottlieb, .SH \(:Ubersetzung Ralf B\(:achle net-tools-1.60+git20180626.aebd88e/man/de_DE/ypdomainname.1000066400000000000000000000000241331436560500224730ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/en_US/000077500000000000000000000000001331436560500200055ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/man/en_US/arp.8000066400000000000000000000131641331436560500206650ustar00rootroot00000000000000.TH ARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual" .SH NAME arp \- manipulate the system ARP cache .SH SYNOPSIS .B arp .RB [ \-vn ] .RB [ \-H .IR type ] .RB [ \-i .IR if ] .RB [ \-ae ] .RI [ hostname ] .PP .B arp .RB [ \-v ] .RB [ \-i .IR if ] .B \-d .I hostname .RB [ pub ] .PP .B arp .RB [ \-v ] .RB [ \-H .IR type ] .RB [ \-i .IR if ] .B \-s .I hostname hw_addr .RB [ temp ] .PP .B arp .RB [ \-v ] .RB [ \-H .IR type ] .RB [ \-i .IR if ] .B \-s .I hostname hw_addr .RB [ netmask .IR nm ] .B pub .PP .B arp .RB [ \-v ] .RB [ \-H .IR type ] .RB [ \-i .IR if ] .B \-Ds .I hostname .I ifname .RB [ netmask .IR nm ] .B pub .PP .B arp .RB [ \-vnD ] .RB [ \-H .IR type ] .RB [ \-i .IR if ] .B \-f .RI [ filename ] .SH DESCRIPTION .B Arp manipulates or displays the kernel's IPv4 network neighbour cache. It can add entries to the table, delete one or display the current content. .B ARP stands for Address Resolution Protocol, which is used to find the media access control address of a network neighbour for a given IPv4 Address. .SH MODES .B arp with no mode specifier will print the current content of the table. It is possible to limit the number of entries printed, by specifying an hardware address type, interface name or host address. .B arp -d .I address will delete a ARP table entry. Root or netadmin privilege is required to do this. The entry is found by IP address. If a hostname is given, it will be resolved before looking up the entry in the ARP table. .B arp -s .I address hw_addr is used to set up a new table entry. The format of the .I hw_addr parameter 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. To simplify setting up entries for one of your own network interfaces, you can use the .B "arp \-Ds" .I address ifname form. In that case the hardware address is taken from the interface with the specified name. .br .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 \fB\-H\fI type\fR, \fB\-\-hw\-type\fI type\fR, \fB\-t\fI type\fR 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 Use alternate BSD style output format (with no fixed columns). .TP .B \-e Use default Linux style output format (with fixed columns). .TP .B "\-D, \-\-use-device" Instead of a hw_addr, the given argument is the name of an interface. .B arp will use the MAC address of that interface for the table entry. This is usually the best option to set up a proxy ARP entry to yourself. .TP \fB\-i\fI If\fR, \fB\-\-device\fI If\fR 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. .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. Also the .B dontpub option which is available for delete and set operations cannot be used with 2.4 and newer kernels. .TP \fB\-f\fI filename\fR, \fB\-\-file\fI filename\fR Similar to the .B \-s option, only this time the address info is taken from file .IR 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 .I /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 EXAMPLES .B /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address for eth1. .B /usr/sbin/arp -i eth1 -d 10.0.0.1 Delete the ARP table entry for 10.0.0.1 on interface eth1. This will match published proxy ARP entries and permanent entries. .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 , Bernd Eckenfels . net-tools-1.60+git20180626.aebd88e/man/en_US/dnsdomainname.1000066400000000000000000000000241331436560500227000ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/en_US/domainname.1000066400000000000000000000000241331436560500221730ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/en_US/ethers.5000066400000000000000000000017161331436560500213720ustar00rootroot00000000000000.TH ETHERS 5 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual" .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 characters. 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) .\"}}} net-tools-1.60+git20180626.aebd88e/man/en_US/hostname.1000066400000000000000000000111051331436560500217030ustar00rootroot00000000000000.TH HOSTNAME 1 "2013\-08\-29" "net\-tools" "Linux System Administrator's Manual" .SH NAME hostname \- show or set the system's host name .br dnsdomainname \- show the system's DNS domain name .br domainname \- show or set the system's NIS/YP domain name .br nisdomainname \- show or set system's NIS/YP domain name .br nodename \- show or set the system's DECnet node name .br ypdomainname \- show or set the system's NIS/YP domain name .SH SYNOPSIS .B hostname .RB [ \-v ] .RB [ \-s | \-\-short ] .PP .B hostname .RB [ \-v ] .RB [ \-a | \-\-alias ] .RB [ \-d | \-\-domain ] .RB [ \-f | \-\-fqdn | \-\-long ] .RB [ \-i | \-\-ip\-address ] .PP .B hostname .RB [ \-v ] .RB [ \-y | \-\-yp | \-\-nis ] .RB [ \-n | \-\-node ] .PP .B hostname .RB [ \-v ] .RB [ \-F\ filename | \-\-file\ filename ] .RI [ newname ] .PP .B domainname .RB [ \-v ] .RB [ \-F\ filename | \-\-file\ filename ] .RI [ newname ] .PP .B nodename .RB [ \-v ] .RB [ \-F\ filename | \-\-file\ filename ] .RI [ newname ] .PP .B hostname .RB [ \-v | \-\-verbose ] .RB [ \-h | \-\-help ] .RB [ \-V | \-\-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 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 canonical name returned by .BR gethostbyname2 (2) when resolving the result of the .BR gethostname (2) name. 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. If .B hosts is the first lookup method, you can change the FQDN 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 (this is the FQDN without the segment up to the first dot). This is equivalent to using the .B dnsdomainname command. .TP .I "\-F, \-\-file filename" Read the new 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 name including the DNS domain. .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/hostname .B /etc/hosts .B /etc/host.conf .SH AUTHOR Peter Tobias, .br Bernd Eckenfels, (NIS and manpage). .br Steve Whitehouse, (DECnet support and manpage). net-tools-1.60+git20180626.aebd88e/man/en_US/ifconfig.8000066400000000000000000000171431331436560500216700ustar00rootroot00000000000000.TH IFCONFIG 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual" .SH NAME ifconfig \- configure a network interface .SH SYNOPSIS .B "ifconfig [-v] [-a] [-s] [interface]" .br .B "ifconfig [-v] 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). 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 hexadecimal and octal numbers is not RFC-compliant and therefore its use is discouraged. .SH OPTIONS .TP .B -a display all interfaces which are currently available, even if down .TP .B -s display a short list (like netstat -i) .TP .B -v be more verbose for some error conditions .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. If your kernel supports alias interfaces, you can specify them with syntax like .B eth0:0 for the first alias of eth0. You can use them to assign more addresses. To delete an alias interface use .BR "ifconfig eth0:0 down" . Note: for every scope (i.e. same net with address/netmask combination) all aliases are deleted, if you delete the first (primary). .TP .B up This flag causes the interface to be activated. It is implicitly specified if an address is assigned to the interface; you can suppress this behavior when using an alias interface by appending an .BR "-" to the alias (e.g. .BR "eth0:0-" ). It is also suppressed when using the IPv4 0.0.0.0 address as the kernel will use this to implicitly delete alias interfaces. .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 "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 iptables (8) command. .LP Since net\-tools 1.60\-4 ifconfig is printing byte counters and human readable counters with IEC 60027-2 units. So 1 KiB are 2^10 byte. Note, the numbers are truncated to one decimal (which can by quite a large error if you consider 0.1 PiB is 112.589.990.684.262 bytes :) .LP Interrupt problems with Ethernet device drivers fail with EAGAIN .I (SIOCSIIFLAGS: Resource temporarily unavailable) it is most likely a interrupt conflict. See .I http://www.scyld.com/expert/irq\-conflict.html for more information. .SH FILES .I /proc/net/dev .br .I /proc/net/if_inet6 .SH BUGS Ifconfig uses the ioctl access method to get the full address information, which limits hardware addresses to 8 bytes. Because Infiniband hardware address has 20 bytes, only the first 8 bytes are displayed correctly. Please use .B ip link command from .B iproute2 package to display link layer informations including the hardware address. .LP 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), iptables(8), ifup(8), interfaces(5). .br http://physics.nist.gov/cuu/Units/binary.html - Prefixes for binary multiples .SH AUTHORS Fred N. van Kempen, .br Alan Cox, .br Phil Blundell, .br Andi Kleen .br Bernd Eckenfels, net-tools-1.60+git20180626.aebd88e/man/en_US/mii-tool.8000066400000000000000000000074221331436560500216340ustar00rootroot00000000000000.\" Copyright (C) 2000 David A. Hinds -- dhinds@pcmcia.sourceforge.org .\" .TH MII\-TOOL 8 "2013\-02\-15" "net\-tools" "Linux System Administrator's Manual" .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] [\fB\-p\fR, \fB\-\-phy=\fIaddr\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. .SH OPTIONS .TP \fB\-v\fR, \fB\-\-verbose\fR Display more detailed MII status information. If used twice, also display raw MII register contents. .br \fBAlert:\fR If used three times, will force reading all MII registers, including non standard ones. It's not guaranteed any valid answer from PHY while PHY communication can even hang. With driver e1000e will fail while reading register 0x07. .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. .TP \fB\-p\fI addr\fR, \fB\-\-phy=\fIaddr\fR Override the MII address provided by kernel with value \fBaddr\fR. .SH DIAGNOSTICS .TP SIOCGMIIPHY on 'eth?' failed: Invalid argument If the interface is not running (up), kernel will refuse to report its link state. .TP SIOCGMIIPHY on 'eth?' failed: Operation not permitted Most kernels restrict access to root. .TP SIOCGMIIPHY on 'eth?' failed: No such device This error is shown, if the kernel does not know about the named device. .TP SIOCGMIIPHY on 'eth?' failed: Operation not supported The interface in question does not support MII queries. Most likely, it does not have MII transceivers, at all. .SH AUTHORS David Hinds \- dhinds@pcmcia.sourceforge.org .br Donald Becker \- becker@scyld.com .br Bernd Eckenfels \- net-tools@lina.inka.de .SH SEE ALSO http://net-tools.sourceforge.net \- Homepage of the net-tools project net-tools-1.60+git20180626.aebd88e/man/en_US/nameif.8000066400000000000000000000017301331436560500213360ustar00rootroot00000000000000.TH NAMEIF 8 "2008\-10\-03" "net\-tools" "Linux System 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. net-tools-1.60+git20180626.aebd88e/man/en_US/netstat.8000066400000000000000000000301041331436560500215560ustar00rootroot00000000000000.\" .\" 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 .\" Modified: Brian Micek bmicek@gmail.com .\" .\" .TH NETSTAT 8 "2014\-10\-07" "net\-tools" "Linux System Administrator'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 [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .RB [ \-\-raw | \-w ] .RB [ \-\-l2cap | \-2 ] .RB [ \-\-rfcomm | \-f ] .RB [ \-\-listening | \-l ] .RB [ \-\-all | \-a ] .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ] .RB [ \-\-symbolic | \-N ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-timers | \-o ] .RB [ \-\-program | \-p ] .RB [ \-\-verbose | \-v ] .RB [ \-\-continuous | \-c] .RB [ \-\-wide | \-W ] .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\-users ] .RB [ \-\-continuous | \-c ] .P .B netstat .RB { \-\-interfaces | \-i } .RB [ \-\-all | \-a ] .RB [ \-\-extend | \-e [ \-\-extend | \-e] ] .RB [ \-\-verbose | \-v ] .RB [ \-\-program | \-p ] .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric-hosts "] [" \-\-numeric-ports "] [" \-\-numeric-users ] .RB [ \-\-continuous | \-c ] .P .B netstat .RB { \-\-groups | \-g } .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ] .RB [ \-\-continuous | \-c ] .P .B netstat .RB { \-\-masquerade | \-M } .RB [ \-\-extend | \-e ] .RB [ \-\-numeric | \-n ] .RB [ \-\-numeric\-hosts "] [" \-\-numeric\-ports "] [" \-\-numeric\-users ] .RB [ \-\-continuous | \-c ] .P .B netstat .RB { \-\-statistics | -s } .RB [ \-\-tcp | \-t ] .RB [ \-\-udp | \-u ] .RB [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .RB [ \-\-raw | \-w ] .P .B netstat .RB { \-\-version | \-V } .P .B netstat .RB { \-\-help | \-h } .P .IR address_family_options : .PP .RB [ -4 | \-\-inet ] .RB [ -6 | \-\-inet6 ] .RB [ \-\-protocol= { inet , inet6 , unix , ipx , ax25 , netrom , ddp , bluetooth ", ... } ]" .RB [ \-\-unix | \-x ] .RB [ \-\-inet | \-\-ip | \-\-tcpip ] .RB [ \-\-ax25 ] .RB [ \-\-x25 ] .RB [ \-\-rose ] .RB [ \-\-ash ] .RB [ \-\-bluetooth ] .RB [ \-\-ipx ] .RB [ \-\-netrom ] .RB [ \-\-ddp | \-\-appletalk ] .RB [ \-\-econet | \-\-ec ] .SH NOTES This program is mostly obsolete. Replacement for \fBnetstat\fR is \fBss\fR. Replacement for \fBnetstat -r\fR is \fBip route\fR. Replacement for \fBnetstat -i\fR is \fBip -s link\fR. Replacement for \fBnetstat -g\fR is \fBip maddr\fR. .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. See the description in .BR route (8) for details. .B netstat -r and .B route -e produce the same output. .SS "\-\-groups, \-g" Display multicast group membership information for IPv4 and IPv6. .SS "\-\-interfaces, \-i" Display a table of all network interfaces. .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 "\-\-wide, \-W" Do not truncate IP addresses by using output as wide as needed. This is optional for now to not break existing scripts. .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 inet6 , .BR unix , .BR ipx , .BR ax25 , .BR netrom , .BR econet , .BR ddp , and .BR bluetooth . This has the same effect as using the .BR \-\-inet | -4 , .BR \-\-inet6 | -6 , .BR \-\-unix | -x , .BR \-\-ipx , .BR \-\-ax25 , .BR \-\-netrom , .BR \-\-ddp , and .B \-\-bluetooth options. .P The address family .B inet (Iv4) includes raw, udp, udplite and tcp protocol sockets. .P The address family .B bluetooth (Iv4) includes l2cap and rfcomm 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 up .SS "\-F" Print routing information from the FIB. (This is the default.) .SS "\-C" Print routing information from the route cache. .P .SH OUTPUT .P .SS Active Internet connections \fR(TCP, UDP, UDPLite, raw)\fR .SS "Proto" The protocol (tcp, udp, udpl, raw) used by the socket. .SS "Recv\-Q" Established: The count of bytes not copied by the user program connected to this socket. Listening: Since Kernel 2.6.18 this column contains the current syn backlog. .SS "Send\-Q" Established: The count of bytes not acknowledged by the remote host. Listening: Since Kernel 2.6.18 this column contains the maximum size of the syn backlog. .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 and UDPLite, 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 CLOSE 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 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/udplite -- UDPLite 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 /sys/kernel/debug/bluetooth/l2cap -- Bluetooth L2CAP information .I /sys/kernel/debug/bluetooth/rfcomm -- Bluetooth serial connections .I /proc/net/snmp -- statistics .fi .P .SH SEE ALSO .BR route (8), .BR ifconfig (8), .BR iptables (8), .BR proc (5) .BR ss (8) .BR ip (8) .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 , the man page basically by Matt Welsh . It was updated by Alan Cox , updated again by Tuan Hoang . The man page and the command included in the net\-tools package is totally rewritten by Bernd Eckenfels . UDPLite options were added by Brian Micek net-tools-1.60+git20180626.aebd88e/man/en_US/nisdomainname.1000066400000000000000000000000241331436560500227050ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/en_US/plipconfig.8000066400000000000000000000031361331436560500222330ustar00rootroot00000000000000.TH PLIPCONFIG 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual" .SH NAME plipconfig \- fine tune PLIP device parameters .SH SYNOPSIS .B plipconfig interface .RB [ nibble .IR NN ] .RB [ trigger .IR NN ] .br .B plipconfig .RB [ \-V ] .RB [ \-\-version ] .RB [ \-h ] .RB [ \-\-help ] .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, , net-tools-1.60+git20180626.aebd88e/man/en_US/rarp.8000066400000000000000000000043141331436560500210440ustar00rootroot00000000000000.TH RARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator'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 .BR 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, .br Fred N. van Kempen, .br Phil Blundell, net-tools-1.60+git20180626.aebd88e/man/en_US/route.8000066400000000000000000000207551331436560500212450ustar00rootroot00000000000000.TH ROUTE 8 "2014\-02\-17" "net\-tools" "Linux System Administrator's Manual" .SH NAME route \- show / manipulate the IP routing table .SH SYNOPSIS .B route .RB [ \-CFvnNee ] .RB [ \-A family .RB | \-4 | \-6 ] .TP .B route .RB [ \-v ] .RB [ \-A family .RB | \-4 | \-6 ] .B add .RB [ \-net | \-host ] .I target .RB [ netmask .IR Nm ] .RB [ gw .IR Gw ] .RB [ metric .IR N ] .RB [ mss .IR M ] .RB [ window .IR W ] .RB [ irtt .IR I ] .RB [ reject ] .RB [ mod ] .RB [ dyn ] .RB [ reinstate ] .RB [[ dev ] .IR If ] .TP .B route .RB [ \-v ] .RB [ \-A .I family .RB | \-4 | \-6 ] .B del .RB [ \-net | \-host ] .I target .RB [ gw .IR Gw ] .RB [ netmask .IR Nm ] .RB [ metric .IR M ] .RB [[ dev ] .IR 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 \fB\-A \fIfamily\fR use the specified address family (eg `inet'). Use .B route \-\-help for a full list. You can use .B \-6 as an alias for .B \-\-inet6 and .B \-4 as an alias for .B \-A inet . .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 .I target the destination network or host. You can provide an addresses or symbolic network or host name. Optionally you can use \fB/\fIprefixlen\fR notation instead of using the \fBnetmask\fR option. .TP .B \-net the .I target is a network. .TP .B \-host the .I target is a host. .TP \fBnetmask \fINM\fR when adding a network route, the netmask to be used. .TP \fBgw \fIGW\fR route packets via a gateway. .br .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 \fBmetric \fIM\fR set the metric field in the routing table (used by routing daemons) to \fIM\fR. If this option is not specified the metric for inet6 (IPv6) address family defaults to '1', for inet (IPv4) it defaults to '0'. You should always specify an explicit metric value to not rely on those defaults - they also differ from iproute2. .TP \fBmss \fIM\fR sets MTU (Maximum Transmission Unit) of the route to \fIM\fR bytes. Note that the current implementation of the route command does not allow the option to set the Maximum Segment Size (MSS). .TP \fBwindow \fIW\fR set the TCP window size for connections over this route to \fIW\fR bytes. This is typically only used on AX.25 networks and with drivers unable to handle back to back frames. .TP \fBirtt \fII\fR set the initial round trip time (irtt) for TCP connections over this route to \fII\fR 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 \fBdev \fIIf\fR 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 \fBdev \fIIf\fR 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 (\fBmetric netmask gw dev\fR) doesn't matter. .SH EXAMPLES .TP .B route add \-net 127.0.0.0 netmask 255.0.0.0 metric 1024 dev lo adds the normal loopback entry, using netmask 255.0.0.0 and associated with the "lo" device (assuming this device was previously set up correctly with .BR ifconfig (8)). .TP .B route add \-net 192.56.76.0 netmask 255.255.255.0 metric 1024 dev eth0 adds a route to the local network 192.56.76.x via "eth0". The word "dev" can be omitted here. .TP .B route del default deletes the current default route, which is labeled "default" or 0.0.0.0 in the destination field of the current routing table. .TP .B route add default gw mango adds a default route (which will be used if no other route matches). All packets using this route will be gatewayed through the address of a node named "mango". The device which will actually be used for that route depends on how we can reach "mango" - "mango" must be on directly reachable route. .TP .B route add mango sl0 Adds the route to the host named "mango" via the SLIP interface (assuming that "mango" is the SLIP host). .TP .B route add \-net 192.57.66.0 netmask 255.255.255.0 gw mango 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 metric 1024 reject This installs a rejecting route for the private network "10.x.x.x." .TP .B route -6 add 2001:0002::/48 metric 1 dev eth0 This adds a IPv6 route with the specified metric to be directly reachable via eth0. .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). .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 segment 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" .IR ifconfig (8), .IR netstat (8), .IR arp (8), .IR rarp (8), .IR ip (8) .LP .SH HISTORY .B Route for Linux was originally written by Fred N. van Kempen, 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 and Bernd Eckenfels . net-tools-1.60+git20180626.aebd88e/man/en_US/slattach.8000066400000000000000000000053251331436560500217060ustar00rootroot00000000000000.TH SLATTACH 8 "2011\-12\-31" "net\-tools" "Linux System Administrator's Manual" .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 tty Path to a serial device like .IR /dev/ttyS* ", " /dev/cua* " or " /dev/ptmx to spawn a new pseudo tty. .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. .TP .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 hang up. .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 .BR "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 kissattach 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.* /dev/ttyS* /dev/ptmx .SH BUGS None known. .SH SEE ALSO kissattach(8), dip(8) pppd(8), sliplogin(8). .SH AUTHORS Fred N. van Kempen, .br Alan Cox, .br Miquel van Smoorenburg, .br George Shearer, .br Yossi Gottlieb, .br net-tools-1.60+git20180626.aebd88e/man/en_US/ypdomainname.1000066400000000000000000000000241331436560500225440ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/fr_FR/000077500000000000000000000000001331436560500177725ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/man/fr_FR/arp.8000066400000000000000000000116671331436560500206600ustar00rootroot00000000000000.TH ARP 8 "5 Jan 1999" "net-tools" "Linux Administrator'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 .BR 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 .BR 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, avec les améliorations apportées par le mainteneur des net-tools Bernd Eckenfels . .SH TRADUCTION Jean Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/dnsdomainname.1000066400000000000000000000000241331436560500226650ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/fr_FR/domainname.1000066400000000000000000000000241331436560500221600ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/fr_FR/ethers.5000066400000000000000000000021551331436560500213550ustar00rootroot00000000000000.\" .\" 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) net-tools-1.60+git20180626.aebd88e/man/fr_FR/hostname.1000066400000000000000000000123751331436560500217020ustar00rootroot00000000000000.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, .br Bernd Eckenfels, (NIS et pages de manuel). .br Steve Whitehouse, (Support DECnet et pages de manuel). .SH TRADUCTION Jean Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/ifconfig.8000066400000000000000000000210501331436560500216450ustar00rootroot00000000000000.\" .\" Traduction : Jean Michel VANSTEENE .\" zz/08/1997 .\" Màj zz/08/2004 net-tools-1.60 Guillaume Audirac .\" Màj 17/08/2006 net-tools-1.65 Alain Portal .\" .TH IFCONFIG 8 "30 juin 2005" "net-tools" "Manuel de l'administrateur Linux" .SH NOM ifconfig \- Configurer une interface réseau. .SH SYNOPSIS .B "ifconfig [\-v] [\-a] [\-s] [interface]" .br .B "ifconfig [\-v] interface [aftype] options | adresse ..." .SH DESCRIPTION .B ifconfig permet de configurer les interfaces réseau présentes dans le noyau. On peut les configurer lors du démarrage quand c'est nécessaire. Ensuite, on l'utilise généralement pour le débogage ou pour d'éventuels réglages. .LP Si aucun argument n'est donné, .B ifconfig affiche l'état des interfaces actives. 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 sont inactives. Autrement, il permet de configurer une interface. .SH Familles d'Adresses Si le premier argument après le nom d'interface est reconnu comme le nom d'une famille d'adresses prise en charge, alors cette famille d'adresses est utilisée pour décoder et afficher toutes les adresses du protocole. Les familles d'adresses actuellement prises en charge comprennent .B inet (TCP/IP, par défaut), .B inet6 (IPv6), .B ax25 (AMPR Packet Radio), .B ddp (Appletalk Phase 2), .B ipx (Novell IPX) et .B netrom (AMPR Packet Radio). .SH OPTIONS .TP .B \-a Afficher toutes les interfaces actuellement disponibles, même celles qui sont inactives. .TP .B \-s Afficher un résumé (comme netstat \-i). .TP .B \-v Mode volubile pour certains types d'erreurs. .TP .B interface Correspond au nom de l'interface de réseau. C'est généralement un nom de pilote suivi d'un chiffre, comme .B eth0 pour la première interface Ethernet. Si votre noyau accepte les alias d'interfaces, vous pouvez les spécifier avec .B eth0:0 pour le premier alias de eth0. On peut les utiliser pour les affecter à une seconde adresse. Pour supprimer un alias d'interface, utilisez .BR "ifconfig eth0:0 down" . Note\ : pour chaque groupe (un même noeud donné par une combinaison adresse/masque de réseau), si vous supprimez le premier alias (le principal), tous les alias sont supprimés. .TP .B up Activer l'interface donnée. Cette option est implicite si une adresse est affectée à l'interface. .TP .B down Désactiver le pilote pour l'interface donnée. .TP .B "[\-]arp" Activer ou désactiver l'utilisation du protocole ARP sur une interface. .TP .B "[\-]promisc" Activer ou désactiver le mode .BR promiscuous . S'il est activé, tous les paquets circulant sur le réseau seront reçus par l'interface. .TP .B "[\-]allmulti" Activer ou désactiver le mode .BR all-multicast . S'il est activé, l'interface recevra tous les paquets de multidiffusion circulant sur le réseau. .TP .B "metric N" Définir la métrique de l'interface. .TP .B "mtu N" Définir l'unité de transfert maximum ou MTU («\ Maximum Transfer Unit\ ») d'une interface. .TP .B "dstaddr adresse" Définir l'adresse IP distante dans le cas d'un lien point-à-point (comme PPP). Cette option est obsolète\ ; utilisez à la place l'option .BR pointopoint . .TP .B "netmask adresse" Définir le masque de réseau IP pour cette interface. La valeur par défaut correspond au masque de réseau usuel pour les classes A, B ou C (déduite de l'adresse IP), mais une autre valeur peut être définie. .TP .B "add adresse/long_préfixe" Ajouter une adresse IPv6 à une interface. .TP .B "del adresse/long_préfixe" Supprimer une adresse IPv6 d'une interface. .TP .B "tunnel aa.bb.cc.dd" Créer un nouveau périphérique SIT (IPv6-dans-IPv4), fonctionnant en mode tunnel jusqu'à la destination donnée. .TP .B "irq adresse" Définir la ligne d'interruption utilisée par un périphérique. Certains périphériques ne sont pas capables de changer dynamiquement d'IRQ. .TP .B "io_addr adresse" Définir l'adresse de début dans l'espace d'entrée-sortie pour un périphérique. .TP .B "mem_start adresse" Définir l'adresse de début de la mémoire partagée utilisée par un périphérique. Peu de périphériques ont besoin de ce paramètre. .TP .B "media type" Définir le port physique ou le type de médium utilisé par le périphérique. Tous les périphériques ne peuvent pas changer cette configuration et les types acceptés varient de l'un à l'autre. Les valeurs habituelles du .B type sont .B 10base2 (Ethernet fin), .B 10baseT (Ethernet 10Mbps en paire torsadée), .B AUI (émetteur-récepteur externe), etc. Le médium spécial de type .B auto permet d'indiquer au pilote de détecter automatiquement le médium utilisé. Une fois de plus, tous les pilotes n'acceptent pas cette option. .TP .B "[\-]broadcast [adresse]" Si l'adresse est donnée, elle définit l'adresse de diffusion du protocole pour cette interface. Autrement, on arme (ou désarme) l'indicateur .B IFF_BROADCAST de l'interface. .TP .B "[\-]pointopoint [adresse]" Valider 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'adresse est également donnée, cela définit l'adresse de protocole de l'autre machine, de la même manière que l'option obsolète .BR dstaddr . Autrement, il arme (ou désarme) l'indicateur .B IFF_POINTOPOINT de l'interface. .TP .B hw classe adresse Définir l'adresse matérielle de l'interface, si le pilote du périphérique accepte cette opération. L'option doit être suivie du nom de la classe matérielle et de l'adresse matérielle en caractères ASCII affichables. Les classes matérielles actuellement prises en charge comprennent .B ether (Ethernet), .B ax25 (AMPR AX.25), .B ARCnet et .B netrom (AMPR NET/ROM). .TP .B multicast Positionner l'indicateur de multidiffusion sur l'interface. Ce n'est généralement pas nécessaire puisque les pilotes positionnent correctement l'option eux-mêmes. .TP .B adresse Correspond à l'adresse IP affectée à cette interface. .TP .B txqueuelen longueur Définir la longueur de la file d'attente de transmission du périphérique. Il est utile de la fixer à des valeurs faibles pour les périphériques lents avec un temps d'attente important (modems, ISDN), pour empêcher d'être perturbé par de rapides transferts de masse issus des trafics interactifs, comme .BR telnet . .SH NOTES Depuis la version 2.2 du noyau, il n'y a plus de statistiques d'interface explicites pour les alias d'interfaces. Les statistiques affichées pour la véritable adresse sont partagées avec toutes les adresses d'alias du même périphérique. Pour avoir des statistiques par adresse, il faut ajouter des règles de comptabilité particulières pour l'adresse en utilisant la commande .BR ipchains (8) ou .BR iptables (8). .LP Depuis net-tools 1.61, .B ifconfig affiche les compteurs d'octets et ceux lisibles par un utilisateur en unités IEC\ 60027-2. Ainsi, 1\ KiB vaut 2^10 octets. Notez que les nombres sont tronqués à la première décimale (ce qui peut être une erreur importante si vous considérez que 0,1\ PiB vaut 112.589.990.684.262\ octets\ :) .LP Des problèmes d'interruption avec les pilotes de périphériques Ethernet apparaissent avec EAGAIN (\fISIOCSIIFLAGS\ : Ressource temporairement indisponible\fR) il s'agit sûrement d'un conflit d'interruptions. Voir .I http://www.scyld.com/expert/irq-conflict.html pour plus d'informations. .SH FICHIERS .I /proc/net/socket .br .I /proc/net/dev .br .I /proc/net/if_inet6 .SH BOGUES 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 .BR route (8), .BR netstat (8), .BR arp (8), .BR rarp (8), .BR ipchains (8), .BR iptables (8) .br http://physics.nist.gov/cuu/Units/binary.html \- Préfixes pour les multiples binaires. .SH AUTEURS Fred N. van Kempen, .br Alan Cox, .br Phil Blundell, .br Andi Kleen, .br Bernd Eckenfels, .SH TRADUCTION .PP Ce document est une traduction réalisée par Jean Michel Vansteene en août\ 1997, mise à jour par Guillaume Audirac en août 2004 et révisée le 17\ août\ 2006. .PP L'équipe de traduction a fait le maximum pour réaliser une adaptation française de qualité. La version anglaise la plus à jour de ce document est toujours consultable via la commande\ : «\ \fBLANG=C\ man\ 8\ ifconfig\fR\ ». N'hésitez pas à signaler à l'auteur ou au traducteur, selon le cas, toute erreur dans cette page de manuel. net-tools-1.60+git20180626.aebd88e/man/fr_FR/netstat.8000066400000000000000000000264161331436560500215560ustar00rootroot00000000000000.\" .\" 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 "2007-12-02" "net-tools" "Linux Administrator'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 [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .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, \-\-interfaces \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 .BR 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 iptables (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 CLOSE 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 iptables(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 iptables (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 . Les pages du manuel essentiellement écrites par Matt Welsh . Mis à jour par Alan Cox . .br La page de manuel et la commande incluse dans le paquetage net-tools a été totallement réécrite par Bernd Eckenfels . .SH TRADUCTION Jean Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/nisdomainname.1000066400000000000000000000000241331436560500226720ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/fr_FR/plipconfig.8000066400000000000000000000034711331436560500222220ustar00rootroot00000000000000.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, , .SH TRADUCTION Jean-Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/rarp.8000066400000000000000000000045071331436560500210350ustar00rootroot00000000000000.TH RARP 8 "4 Août 1997" "net-tools" "Linux Administrator'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 .BR 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, .br Fred N. van Kempen, .br Phil Blundell, .SH TRADUCTION Jean-Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/route.8000066400000000000000000000204771331436560500212330ustar00rootroot00000000000000.TH ROUTE 8 "8 Août 1997" "net-tools" "Linux Administrator'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 empruntant 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, 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 . .SH TRADUCTION Jean-Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/slattach.8000066400000000000000000000057221331436560500216740ustar00rootroot00000000000000.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 kissattach 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 kissattach(8), dip(8) pppd(8), sliplogin(8). .SH AUTEURS Fred N. van Kempen, .br Alan Cox, .br Miquel van Smoorenburg, .br George Shearer, .br Yossi Gottlieb, .br .SH TRADUCTION Jean-Michel VANSTEENE (vanstee@worldnet.fr) net-tools-1.60+git20180626.aebd88e/man/fr_FR/ypdomainname.1000066400000000000000000000000241331436560500225310ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/pt_BR/000077500000000000000000000000001331436560500200025ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/man/pt_BR/arp.8000066400000000000000000000117721331436560500206650ustar00rootroot00000000000000.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, com muitas melhorias feitas pelo mantenedor do net-tools, Bernd Eckenfels . Tradução para a língua portuguesa feita por Arnaldo Carvalho de Melo em 11/abril/1998. Revisado por Jorge Luiz Godoy Filho em 15/abril/1998. net-tools-1.60+git20180626.aebd88e/man/pt_BR/dnsdomainname.1000066400000000000000000000000241331436560500226750ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/pt_BR/domainname.1000066400000000000000000000000241331436560500221700ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/pt_BR/hostname.1000066400000000000000000000112641331436560500217060ustar00rootroot00000000000000.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, .BR Bernd Eckenfels, (NIS e página man). .BR Arnaldo Carvalho de Melo, Tradução para a língua portuguesa. .BR Jorge Luiz Godoy Filho, Revisão. .BR net-tools-1.60+git20180626.aebd88e/man/pt_BR/ifconfig.8000066400000000000000000000130371331436560500216630ustar00rootroot00000000000000.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 "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 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 iptables(8) . .SH ARQUIVOS .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), iptables(8) .SH AUTORES Fred N. van Kempen, Alan Cox, .SH TRADUÇÃO E REVISÃO PARA A LÃNGUA PORTUGUESA Arnaldo Carvalho de Melo (tradução) .BR Jorge Luiz Godoy Filho (revisão) net-tools-1.60+git20180626.aebd88e/man/pt_BR/netstat.8000066400000000000000000000244101331436560500215560ustar00rootroot00000000000000.\" .\" 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 .\" Revisado por Jorge Luiz Godoy Filho .\" .TH NETSTAT 8 "2007-12-02" "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 [ \-\-udplite | \-U ] .RB [ \-\-sctp | \-S ] .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, \-\-interfaces \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 iptables (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 iptables(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 iptables (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 a página do manual basicamente por Matt Welsh . Foi atualizada por Alan Cox 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 . .BR .SH TRADUÇÃO E REVISÃO PARA PORTUGUÊS Traduzido para o português por Arnaldo Carvalho de Melo e Jorge Luiz Godoy Filho . net-tools-1.60+git20180626.aebd88e/man/pt_BR/nisdomainname.1000066400000000000000000000000241331436560500227020ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/man/pt_BR/rarp.8000066400000000000000000000043501331436560500210410ustar00rootroot00000000000000.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, .br Fred N. van Kempen, .SH TRADUÇÃO Arnaldo Carvalho de Melo - 13/04/1998 net-tools-1.60+git20180626.aebd88e/man/pt_BR/route.8000066400000000000000000000203101331436560500212250ustar00rootroot00000000000000.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, 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 - 13/04/1998 .SH BUGS nenhum :) net-tools-1.60+git20180626.aebd88e/man/pt_BR/ypdomainname.1000066400000000000000000000000241331436560500225410ustar00rootroot00000000000000.so man1/hostname.1 net-tools-1.60+git20180626.aebd88e/mii-tool.c000066400000000000000000000364251331436560500201300ustar00rootroot00000000000000/* 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 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 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "version.h" #include "net-support.h" #include "util.h" static char *Release = RELEASE, *Signature = "David Hinds based on Donald Becker's mii-diag"; #define MAX_ETH 8 /* Maximum # of interfaces */ #define LPA_ABILITY_MASK 0x07e0 /* Table of known MII's */ static const 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, 0x7410, "Enable EL40-331" }, { 0x0243, 0x0c50, "ICPlus IP101A" }, { 0x0015, 0xf410, "ICS 1889" }, { 0x0015, 0xf420, "ICS 1890" }, { 0x0015, 0xf430, "ICS 1892" }, { 0x02a8, 0x0150, "Intel 82555" }, { 0x7810, 0x0000, "Level One LXT970/971" }, { 0x0022, 0x1510, "Micrel KSZ8041" }, { 0x0022, 0x1610, "Micrel KSZ9021" }, { 0x2000, 0x5c00, "National DP83840A" }, { 0x2000, 0x5c70, "National DP83865" }, { 0x0181, 0x4410, "Quality QS6612" }, { 0x0282, 0x1c50, "SMSC 83C180" }, { 0x0203, 0x8460, "STMicroelectronics ST802RT" }, { 0x1c04, 0x0010, "STMicroelectronics STE100P" }, { 0x0300, 0xe540, "TDK 78Q2120" }, { 0x0141, 0x0c20, "Yukon 88E1011" }, { 0x0141, 0x0cc0, "Yukon-EC 88E1111" }, { 0x0141, 0x0c90, "Yukon-2 88E1112" }, }; #define NMII (sizeof(mii_id)/sizeof(mii_id[0])) /*--------------------------------------------------------------------*/ struct option longopts[] = { /* { name has_arg *flag val } */ {"advertise", 1, 0, 'A'}, /* Advertise only specified media. */ {"force", 1, 0, 'F'}, /* Force specified media technology. */ {"phy", 1, 0, 'p'}, /* Set PHY (MII address) to report. */ {"log", 0, 0, 'l'}, /* With --watch, write events to syslog. */ {"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_ioctl_data *mii = (struct mii_ioctl_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_ioctl_data *mii = (struct mii_ioctl_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[2]; } media[] = { /* The order through 100baseT4 matches bits in the BMSR */ { "10baseT-HD", {LPA_10HALF} }, { "10baseT-FD", {LPA_10FULL} }, { "100baseTx-HD", {LPA_100HALF} }, { "100baseTx-FD", {LPA_100FULL} }, { "100baseT4", {LPA_100BASE4} }, { "100baseTx", {LPA_100FULL | LPA_100HALF} }, { "10baseT", {LPA_10FULL | LPA_10HALF} }, { "1000baseT-HD", {0, ADVERTISE_1000HALF} }, { "1000baseT-FD", {0, ADVERTISE_1000FULL} }, { "1000baseT", {0, ADVERTISE_1000HALF|ADVERTISE_1000FULL} }, }; #define NMEDIA (sizeof(media)/sizeof(media[0])) /* Parse an argument list of media types */ static int parse_media(char *arg, unsigned *bmcr2) { int mask, i; char *s; mask = strtoul(arg, &s, 16); if ((*arg != '\0') && (*s == '\0')) { if ((mask & LPA_ABILITY_MASK) && !(mask & ~LPA_ABILITY_MASK)) { *bmcr2 = 0; return mask; } goto failed; } mask = 0; *bmcr2 = 0; s = strtok(arg, ", "); do { for (i = 0; i < NMEDIA; i++) if (s && strcasecmp(media[i].name, s) == 0) break; if (i == NMEDIA) goto failed; mask |= media[i].value[0]; *bmcr2 |= media[i].value[1]; } while ((s = strtok(NULL, ", ")) != NULL); return mask; failed: fprintf(stderr, "Invalid media specification '%s'.\n", arg); return -1; } /*--------------------------------------------------------------------*/ static const char *media_list(unsigned mask, unsigned mask2, int best) { static char buf[100]; int i; *buf = '\0'; if (mask & BMCR_SPEED1000) { if (mask2 & ADVERTISE_1000HALF) { strcat(buf, " "); strcat(buf, "1000baseT-HD"); if (best) goto out; } if (mask2 & ADVERTISE_1000FULL) { strcat(buf, " "); strcat(buf, "1000baseT-FD"); if (best) goto out; } } mask >>= 5; for (i = 4; i >= 0; i--) { if (mask & (1< 1) ? 32 : (MII_STAT1000+1)); i++) switch (i & 0x1F) { case MII_BMCR: case MII_BMSR: case MII_PHYSID1: case MII_PHYSID2: case MII_ADVERTISE: case MII_LPA: case MII_EXPANSION: case MII_CTRL1000: case MII_STAT1000: case MII_ESTATUS: case MII_DCOUNTER: case MII_FCSCOUNTER: case MII_NWAYTEST: case MII_RERRCOUNTER: case MII_SREVISION: case MII_RESV1: case MII_LBRERROR: case MII_PHYADDR: case MII_RESV2: case MII_TPISTATUS: case MII_NCONFIG: mii_val[i] = mdio_read(sock, i); break; default: if (verbose > 2) mii_val[i] = mdio_read(sock, i); else mii_val[i] = 0; break; } if (mii_val[MII_BMCR] == 0xffff || mii_val[MII_BMSR] == 0x0000) { 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_ADVERTISE]; lkpar = mii_val[MII_LPA]; bmcr2 = mii_val[MII_CTRL1000]; lpa2 = mii_val[MII_STAT1000]; sprintf(buf, "%s: ", ifr.ifr_name); if (bmcr & BMCR_ANENABLE) { if (bmsr & BMSR_ANEGCOMPLETE) { if (advert & lkpar) { strcat(buf, (lkpar & LPA_LPACK) ? "negotiated" : "no autonegotiation,"); strcat(buf, media_list(advert & lkpar, bmcr2 & lpa2>>2, 1)); strcat(buf, ", "); } else { strcat(buf, "autonegotiation failed, "); } } else if (bmcr & BMCR_ANRESTART) { strcat(buf, "autonegotiation restarted, "); } } else { sprintf(buf+strlen(buf), "%s Mbit, %s duplex, ", ((bmcr2 & (ADVERTISE_1000HALF | ADVERTISE_1000FULL)) & lpa2 >> 2) ? "1000" : (bmcr & BMCR_SPEED100) ? "100" : "10", (bmcr & BMCR_FULLDPLX) ? "full" : "half"); } strcat(buf, (bmsr & BMSR_LSTATUS) ? "link ok" : "no link"); if (opt_watch) { if (opt_log) { syslog(LOG_INFO, "%s", 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 & BMCR_RESET) printf("software reset, "); if (bmcr & BMCR_LOOPBACK) printf("loopback, "); if (bmcr & BMCR_ISOLATE) printf("isolate, "); if (bmcr & BMCR_CTST) printf("collision test, "); if (bmcr & BMCR_ANENABLE) { printf("autonegotiation enabled\n"); } else { printf("%s Mbit, %s duplex\n", (bmcr & BMCR_SPEED100) ? "100" : "10", (bmcr & BMCR_FULLDPLX) ? "full" : "half"); } printf(" basic status: "); if (bmsr & BMSR_ANEGCOMPLETE) printf("autonegotiation complete, "); else if (bmcr & BMCR_ANRESTART) printf("autonegotiation restarted, "); if (bmsr & BMSR_RFAULT) printf("remote fault, "); printf((bmsr & BMSR_LSTATUS) ? "link ok" : "no link"); printf("\n capabilities:%s", media_list(bmsr >> 6, bmcr2, 0)); printf("\n advertising: %s", media_list(advert, bmcr2, 0)); if (lkpar & LPA_ABILITY_MASK) printf("\n link partner:%s", media_list(lkpar, lpa2 >> 2, 0)); printf("\n"); } fflush(stdout); return 0; } /*--------------------------------------------------------------------*/ static int do_one_xcvr(int skfd, char *ifname, int maybe) { struct mii_ioctl_data *mii = (struct mii_ioctl_data *)&ifr.ifr_data; /* Get the vitals from the interface. */ safe_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, BMCR_RESET); } if (nway_advertise > 0) { mdio_write(skfd, MII_ADVERTISE, nway_advertise | 1); opt_restart = 1; } if (opt_restart) { printf("restarting autonegotiation...\n"); mdio_write(skfd, MII_BMCR, 0x0000); mdio_write(skfd, MII_BMCR, BMCR_ANENABLE|BMCR_ANRESTART); } if (fixed_speed) { int bmcr = 0; if (fixed_speed & (LPA_100FULL|LPA_100HALF)) bmcr |= BMCR_SPEED100; if (fixed_speed & (LPA_100FULL|LPA_10FULL)) bmcr |= BMCR_FULLDPLX; 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_ioctl_data *mii = (struct mii_ioctl_data *)&ifr.ifr_data; static int status[MAX_ETH] = { 0, /* ... */ }; int now; /* Get the vitals from the interface. */ safe_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; } if (override_phy >= 0) { mii->phy_id = override_phy; } 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] [-p addr] \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" " -p, --phy=addr set PHY (MII address) to report\n" "media: 1000baseTx-HD, 1000baseTx-FD,\n" " 100baseT4, 100baseTx-FD, 100baseTx-HD,\n" " 10baseT-FD, 10baseT-HD,\n" " (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT\n"; static void version(void) { printf("%s\n%s\n", Release, Signature); exit(E_VERSION); } int main(int argc, char **argv) { int i, c, ret, errflag = 0; unsigned ctrl1000 = 0; while ((c = getopt_long(argc, argv, "A:F:p:lrRvVw?", longopts, 0)) != EOF) switch (c) { case 'A': nway_advertise = parse_media(optarg, &ctrl1000); break; case 'F': fixed_speed = parse_media(optarg, &ctrl1000); 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 ((nway_advertise < 0) || (fixed_speed < 0)) return 2; if (errflag || (fixed_speed & (fixed_speed-1)) || (fixed_speed && (opt_restart || nway_advertise))) { fprintf(stderr, usage, argv[0]); return 2; } if (opt_version) version(); /* Open a basic socket. */ if ((skfd = socket(AF_INET, SOCK_DGRAM,0)) < 0) { perror("socket"); exit(-1); } if (verbose > 1) printf("Using SIOCGMIIPHY=0x%x\n", SIOCGMIIPHY); /* No remaining args means show all interfaces. */ if (optind == argc) { fprintf(stderr, "No interface specified\n"); fprintf(stderr, usage, argv[0]); close(skfd); return 2; } 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); for (i = optind; i < argc; i++) watch_one_xcvr(skfd, argv[i], i-optind); } } close(skfd); return ret; } net-tools-1.60+git20180626.aebd88e/nameif.c000066400000000000000000000127611331436560500176330ustar00rootroot00000000000000/* * 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.4 2003/09/11 03:46:49 ak Exp $ */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "intl.h" #include "net-support.h" #include "util.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 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)); safe_strncpy(ifr.ifr_name, oldname, IFNAMSIZ); safe_strncpy(ifr.ifr_newname, newname, IFNAMSIZ); 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)); safe_strncpy(ifr.ifr_name, name, IFNAMSIZ); r = ioctl(ctl_sk, SIOCGIFHWADDR, &ifr); memcpy(mac, ifr.ifr_hwaddr.sa_data, 6); return r; } struct change { struct change *next; int found; 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); ch->next = clist; clist = ch; return 0; } void readconf(void) { char *line; size_t linel; int linenum; FILE *ifh; char *p; int n; struct change *ch = NULL; 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) { 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-1) complain(_("interface name too long at line %d"), line); ch = xmalloc(sizeof(struct change)); 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, 'h' }, {NULL}, }; static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("usage: nameif [-c configurationfile] [-s] {ifname macaddress}\n")); exit(E_USAGE); } int main(int ac, char **av) { FILE *ifh; char *p; int n; int linenum; char *line = NULL; size_t linel = 0; int ret = 0; for (;;) { int c = getopt_long(ac,av,"c:sh",lopt,NULL); if (c == -1) break; switch (c) { default: usage(E_OPTERR); case 'h': usage(E_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(E_OPTERR); if (strlen(av[optind])+1>IFNAMSIZ) complain(_("interface name `%s' too long"), av[optind]); safe_strncpy(ch->ifname, av[optind], sizeof(ch->ifname)); 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->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)); } } fclose(ifh); while (clist) { struct change *ch = clist; clist = clist->next; if (!ch->found){ warning(_("interface '%s' not found"), ch->ifname); ret = 1; } free(ch); } if (use_syslog) closelog(); return ret; } net-tools-1.60+git20180626.aebd88e/netstat.c000066400000000000000000001774211331436560500200630ustar00rootroot00000000000000/* * 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.73 2011-04-20 01:35:22 ecki Exp $ * * Authors: Fred Baumgarten, * Fred N. van Kempen, * Phil Packer, * Johannes Stille, * Bernd Eckenfels, * Phil Blundell * Tuan Hoang * * Tuned for NET3 by: * Alan Cox, * 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 . * 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 *20081201 {1.42} Brian Micek added -L|--udplite options for RFC 3828 *20020722 {1.51} Thomas Preusser added SCTP over IPv4 support * * 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #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" #include "proc.h" #if HAVE_SELINUX #include #endif #if HAVE_AFBLUETOOTH #include #endif #define PROGNAME_WIDTH 20 #define SELINUX_WIDTH 50 #if !defined(s6_addr32) && defined(in6a_words) #define s6_addr32 in6a_words /* libinet6 */ #endif /* prototypes for statistics.c */ void parsesnmp(int, int, int, int); void parsesnmp6(int, int, int); 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" static char *Release = RELEASE, *Signature = "Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek 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_sctp= 0; int flag_udp = 0; int flag_udplite = 0; int flag_igmp= 0; int flag_rom = 0; int flag_exp = 1; int flag_wide= 0; int flag_prg = 0; int flag_arg = 0; int flag_noprot = 0; int flag_ver = 0; int flag_l2cap = 0; int flag_rfcomm = 0; int flag_selinux = 0; FILE *procinfo; #define INFO_GUTS1(file,name,proc,prot) \ procinfo = proc_fopen((file)); \ if (procinfo == NULL) { \ if (errno != ENOENT && errno != EACCES) { \ perror((file)); \ return -1; \ } \ if (!flag_noprot && (flag_arg || flag_ver)) \ ESYSNOT("netstat", (name)); \ if (!flag_noprot && flag_arg) \ rc = 1; \ } else { \ do { \ if (fgets(buffer, sizeof(buffer), procinfo)) \ (proc)(lnr++, buffer,prot); \ } while (!feof(procinfo)); \ fclose(procinfo); \ } #if HAVE_AFINET6 #define INFO_GUTS2(file,proc,prot) \ lnr = 0; \ procinfo = proc_fopen((file)); \ if (procinfo != NULL) { \ do { \ if (fgets(buffer, sizeof(buffer), procinfo)) \ (proc)(lnr++, buffer,prot); \ } while (!feof(procinfo)); \ fclose(procinfo); \ } #else #define INFO_GUTS2(file,proc,prot) #endif #define INFO_GUTS3 \ return rc; #define INFO_GUTS6(file,file6,name,proc,prot4,prot6) \ char buffer[8192]; \ int rc = 0; \ int lnr = 0; \ if (!flag_arg || flag_inet) { \ INFO_GUTS1(file,name,proc,prot4) \ } \ if (!flag_arg || flag_inet6) { \ INFO_GUTS2(file6,proc,prot6) \ } \ INFO_GUTS3 #define INFO_GUTS(file,name,proc,prot) \ char buffer[8192]; \ int rc = 0; \ int lnr = 0; \ INFO_GUTS1(file,name,proc,prot) \ INFO_GUTS3 #define PROGNAME_WIDTHs PROGNAME_WIDTH1(PROGNAME_WIDTH) #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; unsigned long inode; char name[PROGNAME_WIDTH]; char scon[SELINUX_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 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:[" #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) static void prg_cache_add(unsigned long inode, char *name, const char *scon) { 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; safe_strncpy(pn->name, name, sizeof(pn->name)); { int len = (strlen(scon) - sizeof(pn->scon)) + 1; if (len > 0) safe_strncpy(pn->scon, &scon[len + 1], sizeof(pn->scon)); else safe_strncpy(pn->scon, scon, sizeof(pn->scon)); } } static const char *prg_cache_get(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->name); 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; 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 wait_continous(void) { fflush(stdout); sleep(1); } static int extract_type_1_socket_inode(const char lname[], unsigned 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) return(-1); if (memcmp(lname, PRG_SOCKET_PFX, PRG_SOCKET_PFXl)) return(-1); if (lname[strlen(lname)-1] != ']') return(-1); { 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 = strtoul(inode_str, &serr, 0); if (!serr || *serr || *inode_p == ~0) return(-1); } return(0); } static int extract_type_2_socket_inode(const char lname[], unsigned 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) return(-1); if (memcmp(lname, PRG_SOCKET_PFX2, PRG_SOCKET_PFX2l)) return(-1); { char *serr; *inode_p = strtoul(lname + PRG_SOCKET_PFX2l, &serr, 0); if (!serr || *serr || *inode_p == ~0) return(-1); } return(0); } 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]; unsigned long inode; const char *cs, *cmdlp; DIR *dirproc = NULL, *dirfd = NULL; struct dirent *direproc, *direfd; #if HAVE_SELINUX security_context_t scon = NULL; #endif 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)) { 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))) { /* Skip . and .. */ if (!isdigit(direfd->d_name[0])) continue; if (procfdlen + 1 + strlen(direfd->d_name) + 1 > sizeof(line)) continue; memcpy(line + procfdlen - PATH_FD_SUFFl, PATH_FD_SUFF "/", PATH_FD_SUFFl + 1); safe_strncpy(line + procfdlen + 1, direfd->d_name, sizeof(line) - procfdlen - 1); lnamelen = readlink(line, lname, sizeof(lname) - 1); if (lnamelen == -1) continue; lname[lnamelen] = '\0'; /*make it a null-terminated string*/ if (extract_type_1_socket_inode(lname, &inode) < 0) if (extract_type_2_socket_inode(lname, &inode) < 0) continue; if (!cmdlp) { if (procfdlen - PATH_FD_SUFFl + PATH_CMDLINEl >= sizeof(line) - 5) continue; safe_strncpy(line + procfdlen - PATH_FD_SUFFl, PATH_CMDLINE, sizeof(line) - procfdlen + PATH_FD_SUFFl); 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 (cmdlbuf[0] == '/' && (cmdlp = strrchr(cmdlbuf, '/'))) cmdlp++; else cmdlp = cmdlbuf; } snprintf(finbuf, sizeof(finbuf), "%s/%s", direproc->d_name, cmdlp); #if HAVE_SELINUX if (getpidcon(atoi(direproc->d_name), &scon) == -1) { scon=xstrdup("-"); } prg_cache_add(inode, finbuf, scon); freecon(scon); #else prg_cache_add(inode, finbuf, "-"); #endif } 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 = proc_fopen(_PATH_PROCNET_NR); 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")); if (fgets(buffer, 256, f)) /* eat line */; 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 #if HAVE_AFROSE static const char * const rose_state[] = { N_("LISTENING"), N_("CONN SENT"), N_("DISC SENT"), N_("ESTABLISHED"), }; static int rose_info(void) { FILE *f; char buffer[256], dev[6]; int ret, st, lci, neigh; char src_addr[10], src_call[9], dest_addr[10], dest_call[9]; f = fopen(_PATH_PROCNET_ROSE, "r"); if (f == NULL) { if (errno != ENOENT) { perror(_PATH_PROCNET_ROSE); return (-1); } if (flag_arg || flag_ver) ESYSNOT("netstat", "AF ROSE"); if (flag_arg) return (1); else return (0); } printf(_("Active ROSE sockets\n")); printf(_("dest_addr dest_call src_addr src_call dev lci neigh state\n")); if (fgets(buffer, 256, f)) /* eat line */; while (fgets(buffer, 256, f)) { ret = sscanf(buffer, "%s %s %s %s %s %d %d %d", dest_addr, dest_call, src_addr, src_call, dev, &lci, &neigh, &st); if (ret != 8) { printf(_("Problem reading data from %s\n"), _PATH_PROCNET_ROSE); continue; } printf("%-10s %-9s %-10s %-9s %-5s %3d %5d %s\n", dest_addr, dest_call, src_addr, src_call, dev, lci, neigh, _(rose_state[st])); } 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("%-10lu",inode); } 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'); } static void igmp_do_one(int lnr, const char *line,const char *prot) { char mcast_addr[128]; struct sockaddr_storage sas; struct sockaddr_in *sin = (struct sockaddr_in *)&sas; #if HAVE_AFINET6 char addr6[INET6_ADDRSTRLEN]; struct in6_addr in6; extern struct aftype inet6_aftype; #endif const 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, &sas); sas.ss_family = AF_INET6; } else { fprintf(stderr, _("warning, got bogus igmp6 line %d.\n"), lnr); return; } if ((ap = get_afntype(sas.ss_family)) == NULL) { fprintf(stderr, _("netstat: unsupported address family %d !\n"), sas.ss_family); return; } safe_strncpy(mcast_addr, ap->sprint(&sas, flag_not & FLAG_NUM_HOST), 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", &sin->sin_addr.s_addr); sas.ss_family = AF_INET; } else { fprintf(stderr, _("warning, got bogus igmp line %d.\n"), lnr); return; } if ((ap = get_afntype(sas.ss_family)) == NULL) { fprintf(stderr, _("netstat: unsupported address family %d !\n"), sas.ss_family); return; } safe_strncpy(mcast_addr, ap->sprint(&sas, flag_not & FLAG_NUM_HOST), sizeof(mcast_addr)); printf("%-15s %-6d %s\n", device, refcnt, mcast_addr ); #endif } /* IPV4 */ } #if HAVE_AFX25 static int x25_info(void) { FILE *f=proc_fopen(_PATH_PROCNET_X25); 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) { 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")); if (fgets(buffer,256,f)) /* eat line */; 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, "igmp", "igmp6"); } static const char *sctp_socket_state_str(int state) { if (state >= 0 && state < ARRAY_SIZE(tcp_state)) return tcp_state[state]; else { static char state_str_buf[64]; sprintf(state_str_buf, "UNKNOWN(%d)", state); return state_str_buf; } } static const struct aftype *process_sctp_addr_str(const char *addr_str, struct sockaddr_storage *sas) { 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, sas); sas->ss_family = AF_INET6; #endif } else { struct sockaddr_in *sin = (struct sockaddr_in *)sas; sin->sin_addr.s_addr = inet_addr(addr_str); sas->ss_family = AF_INET; } return get_afntype(sas->ss_family); } static void sctp_eps_do_one(int lnr, char *line, const char *proto) { char buffer[1024]; int state, port; int uid; unsigned long inode; const struct aftype *ap; struct sockaddr_storage localsas; const char *sst_str; const char *lport_str; const char *uid_str; const char *inode_str; char *laddrs_str; if (lnr == 0) { /* ENDPT SOCK STY SST HBKT LPORT UID INODE LADDRS */ return; } strtok(line, " \t\n"); /* skip endpt */ strtok(0, " \t\n"); /* skip sock */ strtok(0, " \t\n"); /* skip sty */ 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"); laddrs_str = strtok(0, "\t\n"); if (!sst_str || !lport_str || !uid_str || !inode_str) { fprintf(stderr, _("warning, got bogus sctp eps line.\n")); return; } state = atoi(sst_str); port = atoi(lport_str); uid = atoi(uid_str); inode = strtoul(inode_str,0,0); const char *this_local_addr; int first = 1; char local_port[16]; snprintf(local_port, sizeof(local_port), "%s", get_sname(htons(port), proto, 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, &localsas); if (ap) safe_strncpy(local_addr, ap->sprint(&localsas, flag_not), sizeof(local_addr)); else sprintf(local_addr, _("unsupported address family %d"), localsas.ss_family); if (first) printf("sctp "); else printf("\n "); sprintf(buffer, "%s:%s", local_addr, local_port); printf("%-47s", buffer); printf(" %-11s", first ? sctp_socket_state_str(state) : ""); first = 0; } finish_this_one(uid, inode, ""); } static void sctp_assoc_do_one(int lnr, char *line, const char *proto) { char buffer[1024]; int state, lport,rport; int uid; unsigned rxqueue,txqueue; unsigned long inode; const struct aftype *ap; struct sockaddr_storage localsas, remotesas; const char *sst_str; const char *txqueue_str; const char *rxqueue_str; const char *lport_str, *rport_str; const char *uid_str; const char *inode_str; char *laddrs_str; char *raddrs_str; if (lnr == 0) { /* ASSOC SOCK STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT RPORT LADDRS <-> RADDRS */ return; } strtok(line, " \t\n"); /* skip assoc */ strtok(0, " \t\n"); /* skip sock */ strtok(0, " \t\n"); /* skip sty */ sst_str = strtok(0, " \t\n"); 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"); laddrs_str = strtok(0, "<->\t\n"); raddrs_str = strtok(0, "<->\t\n"); if (!sst_str || !txqueue_str || !rxqueue_str || !uid_str || !inode_str || !lport_str || !rport_str) { fprintf(stderr, _("warning, got bogus sctp assoc line.\n")); return; } state = atoi(sst_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); /*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), proto, flag_not & FLAG_NUM_PORT)); snprintf(remote_port, sizeof(remote_port), "%s", get_sname(htons(rport), proto, 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, &localsas); if (ap) safe_strncpy(local_addr, ap->sprint(&localsas, flag_not), sizeof(local_addr)); else sprintf(local_addr, _("unsupported address family %d"), localsas.ss_family); } if (this_remote_addr) { if (this_remote_addr[0] == '*') { /* skip * */ this_remote_addr++; } ap = process_sctp_addr_str(this_remote_addr, &remotesas); if (ap) safe_strncpy(remote_addr, ap->sprint(&remotesas, flag_not), sizeof(remote_addr)); else sprintf(remote_addr, _("unsupported address family %d"), remotesas.ss_family); } if (first) printf("sctp %6u %6u ", rxqueue, txqueue); else printf("\n "); 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(" %-11s", 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) { INFO_GUTS6(_PATH_PROCNET_SCTPEPTS, _PATH_PROCNET_SCTP6EPTS, "AF INET (sctp)", sctp_eps_do_one, "sctp", "sctp6"); } static int sctp_info_assocs(void) { INFO_GUTS6(_PATH_PROCNET_SCTPASSOCS, _PATH_PROCNET_SCTP6ASSOCS, "AF INET (sctp)", sctp_assoc_do_one, "sctp", "sctp6"); } static int sctp_info(void) { int res = sctp_info_eps(); return res ? res : sctp_info_assocs(); } static void addr_do_one(char *buf, size_t buf_len, size_t short_len, const struct aftype *ap, const struct sockaddr_storage *addr, int port, const char *proto ) { const char *sport, *saddr; size_t port_len, addr_len; saddr = ap->sprint(addr, flag_not & FLAG_NUM_HOST); sport = get_sname(htons(port), proto, flag_not & FLAG_NUM_PORT); addr_len = strlen(saddr); port_len = strlen(sport); if (!flag_wide && (addr_len + port_len > short_len)) { /* Assume port name is short */ port_len = netmin(port_len, short_len - 4); addr_len = short_len - port_len; strncpy(buf, saddr, addr_len); buf[addr_len] = '\0'; strcat(buf, ":"); strncat(buf, sport, port_len); } else snprintf(buf, buf_len, "%s:%s", saddr, sport); } static void tcp_do_one(int lnr, const char *line, const char *prot) { 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]; const struct aftype *ap; struct sockaddr_storage localsas, remsas; struct sockaddr_in *localaddr = (struct sockaddr_in *)&localsas; struct sockaddr_in *remaddr = (struct sockaddr_in *)&remsas; #if HAVE_AFINET6 char addr6[INET6_ADDRSTRLEN]; struct in6_addr in6; extern struct aftype inet6_aftype; #endif long clk_tck = ticks_per_second(); 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 %lu %*s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode); if (num < 11) { fprintf(stderr, _("warning, got bogus tcp line.\n")); return; } if (!flag_all && ((flag_lst && rem_port) || (!flag_lst && !rem_port))) return; 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, &localsas); 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, &remsas); localsas.ss_family = AF_INET6; remsas.ss_family = AF_INET6; #endif } else { sscanf(local_addr, "%X", &localaddr->sin_addr.s_addr); sscanf(rem_addr, "%X", &remaddr->sin_addr.s_addr); localsas.ss_family = AF_INET; remsas.ss_family = AF_INET; } if ((ap = get_afntype(localsas.ss_family)) == NULL) { fprintf(stderr, _("netstat: unsupported address family %d !\n"), localsas.ss_family); return; } addr_do_one(local_addr, sizeof(local_addr), 22, ap, &localsas, local_port, "tcp"); addr_do_one(rem_addr, sizeof(rem_addr), 22, ap, &remsas, rem_port, "tcp"); 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 / clk_tck, retr, timeout); break; case 2: snprintf(timers, sizeof(timers), _("keepalive (%2.2f/%ld/%d)"), (double) time_len / clk_tck, retr, timeout); break; case 3: snprintf(timers, sizeof(timers), _("timewait (%2.2f/%ld/%d)"), (double) time_len / clk_tck, retr, timeout); break; case 4: snprintf(timers, sizeof(timers), _("probe (%2.2f/%ld/%d)"), (double) time_len / clk_tck, retr, timeout); break; default: snprintf(timers, sizeof(timers), _("unkn-%d (%2.2f/%ld/%d)"), timer_run, (double) time_len / clk_tck, retr, timeout); break; } printf("%-4s %6ld %6ld %-*s %-*s %-11s", prot, rxq, txq, (int)netmax(23,strlen(local_addr)), local_addr, (int)netmax(23,strlen(rem_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, "tcp", "tcp6"); } static int notnull(const struct sockaddr_storage *sas) { const struct sockaddr_in *sin = (const struct sockaddr_in *)sas; #if HAVE_AFINET6 const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sas; if (sin6->sin6_family == AF_INET6) { return sin6->sin6_addr.s6_addr32[0] || sin6->sin6_addr.s6_addr32[1] || sin6->sin6_addr.s6_addr32[2] || sin6->sin6_addr.s6_addr32[3]; } #endif return sin->sin_addr.s_addr; } static void udp_do_one(int lnr, const char *line,const char *prot) { char local_addr[128], rem_addr[128]; char *udp_state, timers[64]; int num, local_port, rem_port, d, state, timer_run, uid, timeout; struct sockaddr_storage localsas, remsas; struct sockaddr_in *localaddr = (struct sockaddr_in *)&localsas; struct sockaddr_in *remaddr = (struct sockaddr_in *)&remsas; #if HAVE_AFINET6 char addr6[INET6_ADDRSTRLEN]; struct in6_addr in6; extern struct aftype inet6_aftype; #endif const struct aftype *ap; unsigned long rxq, txq, time_len, retr, inode; 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 %lu %*s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode); if (num < 10) { fprintf(stderr, _("warning, got bogus udp line.\n")); return; } 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, &localsas); 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, &remsas); localsas.ss_family = AF_INET6; remsas.ss_family = AF_INET6; #endif } else { sscanf(local_addr, "%X", &localaddr->sin_addr.s_addr); sscanf(rem_addr, "%X", &remaddr->sin_addr.s_addr); localsas.ss_family = AF_INET; remsas.ss_family = AF_INET; } retr = 0L; if ((ap = get_afntype(localsas.ss_family)) == NULL) { fprintf(stderr, _("netstat: unsupported address family %d !\n"), localsas.ss_family); return; } switch (state) { case TCP_ESTABLISHED: udp_state = _("ESTABLISHED"); break; case TCP_CLOSE: udp_state = ""; break; default: udp_state = _("UNKNOWN"); break; } if (flag_all || (notnull(&remsas) && !flag_lst) || (!notnull(&remsas) && flag_lst)) { addr_do_one(local_addr, sizeof(local_addr), 22, ap, &localsas, local_port, "udp"); addr_do_one(rem_addr, sizeof(rem_addr), 22, ap, &remsas, rem_port, "udp"); 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("%-5s %6ld %6ld %-23s %-23s %-11s", prot, 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, "udp", "udp6"); } static int udplite_info(void) { INFO_GUTS6(_PATH_PROCNET_UDPLITE, _PATH_PROCNET_UDPLITE6, "AF INET (udplite)", udp_do_one, "udpl", "udpl6" ); } static void raw_do_one(int lnr, const char *line,const char *prot) { char local_addr[128], rem_addr[128]; char timers[64]; int num, local_port, rem_port, d, state, timer_run, uid, timeout; struct sockaddr_storage localsas, remsas; struct sockaddr_in *localaddr = (struct sockaddr_in *)&localsas; struct sockaddr_in *remaddr = (struct sockaddr_in *)&remsas; #if HAVE_AFINET6 char addr6[INET6_ADDRSTRLEN]; struct in6_addr in6; extern struct aftype inet6_aftype; #endif const struct aftype *ap; unsigned long rxq, txq, time_len, retr, inode; 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 %lu %*s\n", &d, local_addr, &local_port, rem_addr, &rem_port, &state, &txq, &rxq, &timer_run, &time_len, &retr, &uid, &timeout, &inode); if (num < 10) { fprintf(stderr, _("warning, got bogus raw line.\n")); return; } 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, &localsas); 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, &remsas); localsas.ss_family = AF_INET6; remsas.ss_family = AF_INET6; #endif } else { sscanf(local_addr, "%X", &localaddr->sin_addr.s_addr); sscanf(rem_addr, "%X", &remaddr->sin_addr.s_addr); localsas.ss_family = AF_INET; remsas.ss_family = AF_INET; } if ((ap = get_afntype(localsas.ss_family)) == NULL) { fprintf(stderr, _("netstat: unsupported address family %d !\n"), localsas.ss_family); return; } if (flag_all || (notnull(&remsas) && !flag_lst) || (!notnull(&remsas) && flag_lst)) { addr_do_one(local_addr, sizeof(local_addr), 22, ap, &localsas, local_port, "raw"); addr_do_one(rem_addr, sizeof(rem_addr), 22, ap, &remsas, rem_port, "raw"); 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("%-4s %6ld %6ld %-23s %-23s %-11d", prot, 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, "raw", "raw6"); } #endif #if HAVE_AFUNIX #define HAS_INODE 1 static void unix_do_one(int nr, const char *line, const char *prot) { static int has = 0; char path[MAXPATHLEN], ss_flags[32]; char *ss_proto, *ss_state, *ss_type; int num, state, type; void *d; unsigned long refcnt, proto, flags, inode; if (nr == 0) { if (strstr(line, "Inode")) has |= HAS_INODE; return; } path[0] = '\0'; 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),"%lu",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"); } safe_strncpy(ss_flags, "[ ", sizeof(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("%-8lu",inode); else 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):"-")); printf(" %s\n", 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(); print_selinux_banner(); printf(_(" Path\n")); /* xxx */ { INFO_GUTS(_PATH_PROCNET_UNIX, "AF UNIX", unix_do_one, "unix"); } } #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 = proc_fopen(_PATH_PROCNET_AX25))) { 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; const struct aftype *ap; struct passwd *pw; char sad[50], dad[50]; struct sockaddr_storage sa; unsigned sport = 0, dport = 0; struct stat s; f = proc_fopen(_PATH_PROCNET_IPX_SOCKET1); if (!f) { if (errno != ENOENT) { perror(_PATH_PROCNET_IPX_SOCKET1); return (-1); } f = proc_fopen(_PATH_PROCNET_IPX_SOCKET2); /* We need to check for directory */ if (f) { if (fstat (fileno(f), &s) == -1 || !S_ISREG(s.st_mode)) { fclose(f); f=NULL; } } if (!f) { if (errno != ENOENT) { perror(_PATH_PROCNET_IPX_SOCKET2); 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"); fclose(f); return (-1); } if (fgets(buf, 255, f)) /* eat line */; while (fgets(buf, 255, f) != NULL) { sscanf(buf, "%s %s %lX %lX %u %u", 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", "ipx socket format error in source port"); fclose(f); 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", "ipx socket format error in destination port"); fclose(f); 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(0, sad, &sa); safe_strncpy(buf, ap->sprint(&sa, flag_not & FLAG_NUM_HOST), sizeof(buf)); snprintf(sad, sizeof(sad), "%s:%04X", buf, sport); if (!nc) { /* Fetch and resolve the Destination */ (void) ap->input(0, dad, &sa); safe_strncpy(buf, ap->sprint(&sa, flag_not & FLAG_NUM_HOST), sizeof(buf)); snprintf(dad, sizeof(dad), "%s:%04X", buf, dport); } else safe_strncpy(dad, "-", sizeof(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 #if HAVE_AFBLUETOOTH const char *bluetooth_state(int state) { switch (state) { case BT_CONNECTED: return _("CONNECTED"); case BT_OPEN: return _("OPEN"); case BT_BOUND: return _("BOUND"); case BT_LISTEN: return _("LISTEN"); case BT_CONNECT: return _("CONNECT"); case BT_CONNECT2: return _("CONNECT2"); case BT_CONFIG: return _("CONFIG"); case BT_DISCONN: return _("DISCONN"); case BT_CLOSED: return _("CLOSED"); default: return _("UNKNOWN"); } } static void l2cap_do_one(int nr, const char *line, const char *prot) { char daddr[18], saddr[18]; unsigned dtype, stype, state, psm, dcid, scid, imtu, omtu, sec_level; int num; const char *bt_state, *bt_sec_level; num = sscanf(line, "%17s (%u) %17s (%u) %d %d 0x%04x 0x%04x %d %d %d", daddr, &dtype, saddr, &stype, &state, &psm, &dcid, &scid, &imtu, &omtu, &sec_level); if (num != 11) { num = sscanf(line, "%17s %17s %d %d 0x%04x 0x%04x %d %d %d", daddr, saddr, &state, &psm, &dcid, &scid, &imtu, &omtu, &sec_level); if (num != 9) { fprintf(stderr, _("warning, got bogus l2cap line.\n")); return; } } if (flag_lst && !(state == BT_LISTEN || state == BT_BOUND)) return; if (!(flag_all || flag_lst) && (state == BT_LISTEN || state == BT_BOUND)) return; bt_state = bluetooth_state(state); switch (sec_level) { case BT_SECURITY_SDP: bt_sec_level = _("SDP"); break; case BT_SECURITY_LOW: bt_sec_level = _("LOW"); break; case BT_SECURITY_MEDIUM: bt_sec_level = _("MEDIUM"); break; case BT_SECURITY_HIGH: bt_sec_level = _("HIGH"); break; default: bt_sec_level = _("UNKNOWN"); } printf("l2cap %-17s %-17s %-9s %7d 0x%04x 0x%04x %7d %7d %-7s\n", (strcmp (daddr, "00:00:00:00:00:00") == 0 ? "*" : daddr), (strcmp (saddr, "00:00:00:00:00:00") == 0 ? "*" : saddr), bt_state, psm, dcid, scid, imtu, omtu, bt_sec_level); } static int l2cap_info(void) { printf("%-6s %-17s %-17s %-9s %7s %-6s %-6s %7s %7s %-7s\n", "Proto", "Destination", "Source", "State", "PSM", "DCID", "SCID", "IMTU", "OMTU", "Security"); INFO_GUTS(_PATH_SYS_BLUETOOTH_L2CAP, "BTPROTO L2CAP", l2cap_do_one, "l2cap"); } static void rfcomm_do_one(int nr, const char *line, const char *prot) { char daddr[18], saddr[18]; unsigned state, channel; int num; const char *bt_state; num = sscanf(line, "%17s %17s %d %d", daddr, saddr, &state, &channel); if (num < 4) { fprintf(stderr, _("warning, got bogus rfcomm line.\n")); return; } if (flag_lst && !(state == BT_LISTEN || state == BT_BOUND)) return; if (!(flag_all || flag_lst) && (state == BT_LISTEN || state == BT_BOUND)) return; bt_state = bluetooth_state(state); printf("rfcomm %-17s %-17s %-9s %7d\n", (strcmp (daddr, "00:00:00:00:00:00") == 0 ? "*" : daddr), (strcmp (saddr, "00:00:00:00:00:00") == 0 ? "*" : saddr), bt_state, channel); } static int rfcomm_info(void) { printf("%-6s %-17s %-17s %-9s %7s\n", "Proto", "Destination", "Source", "State", "Channel"); INFO_GUTS(_PATH_SYS_BLUETOOTH_RFCOMM, "BTPROTO RFCOMM", rfcomm_do_one, "rfcomm"); } #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 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_cache_free(); else { close(skfd); skfd = -1; } return 0; } static void version(void) { printf("%s\n%s\n%s\n", Release, Signature, Features); exit(E_VERSION); } static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("usage: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--help}\n")); fprintf(fp, _(" netstat [-vWnNcaeol] [ ...]\n")); fprintf(fp, _(" netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }\n\n")); fprintf(fp, _(" -r, --route display routing table\n")); fprintf(fp, _(" -i, --interfaces display interface table\n")); fprintf(fp, _(" -g, --groups display multicast group memberships\n")); fprintf(fp, _(" -s, --statistics display networking statistics (like SNMP)\n")); #if HAVE_FW_MASQUERADE fprintf(fp, _(" -M, --masquerade display masqueraded connections\n\n")); #endif fprintf(fp, _(" -v, --verbose be verbose\n")); fprintf(fp, _(" -W, --wide don't truncate IP addresses\n")); fprintf(fp, _(" -n, --numeric don't resolve names\n")); fprintf(fp, _(" --numeric-hosts don't resolve host names\n")); fprintf(fp, _(" --numeric-ports don't resolve port names\n")); fprintf(fp, _(" --numeric-users don't resolve user names\n")); fprintf(fp, _(" -N, --symbolic resolve hardware names\n")); fprintf(fp, _(" -e, --extend display other/more information\n")); fprintf(fp, _(" -p, --programs display PID/Program name for sockets\n")); fprintf(fp, _(" -o, --timers display timers\n")); fprintf(fp, _(" -c, --continuous continuous listing\n\n")); fprintf(fp, _(" -l, --listening display listening server sockets\n")); fprintf(fp, _(" -a, --all display all sockets (default: connected)\n")); fprintf(fp, _(" -F, --fib display Forwarding Information Base (default)\n")); fprintf(fp, _(" -C, --cache display routing cache instead of FIB\n")); #if HAVE_SELINUX fprintf(fp, _(" -Z, --context display SELinux security context for sockets\n")); #endif fprintf(fp, _("\n ={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw}\n")); fprintf(fp, _(" {-x|--unix} --ax25 --ipx --netrom\n")); fprintf(fp, _(" =Use '-6|-4' or '-A ' or '--'; default: %s\n"), DFLT_AF); fprintf(fp, _(" List of possible address families (which support routing):\n")); print_aflist(1); /* 1 = routeable */ exit(rc); } int main (int argc, char *argv[]) { int i; int lop; static 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'}, {"sctp", 0, 0, 'S'}, {"udp", 0, 0, 'u'}, {"udplite", 0, 0, 'U'}, {"raw", 0, 0, 'w'}, {"unix", 0, 0, 'x'}, {"l2cap", 0, 0, '2'}, {"rfcomm", 0, 0, 'f'}, {"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'}, {"wide", 0, 0, 'W'}, {"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'}, {"context", 0, 0, 'Z'}, {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, "A:CFMacdeghilnNoprsStuUvVWw2fx64?Z", 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 'W': flag_wide++; 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 '6': if (aftrans_opt("inet6")) exit(1); break; case '4': if (aftrans_opt("inet")) exit(1); break; case 'V': version(); /*NOTREACHED */ case 'v': flag_ver |= FLAG_VERBOSE; break; case 'r': flag_rou++; break; case 't': flag_tcp++; break; case 'S': flag_sctp++; break; case 'u': flag_udp++; break; case 'U': flag_udplite++; break; case 'w': flag_raw++; break; case '2': flag_l2cap++; break; case 'f': flag_rfcomm++; break; case 'x': 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 '?': usage(E_OPTERR); case 'h': usage(E_USAGE); case 's': flag_sta++; } if (flag_int + flag_rou + flag_mas + flag_sta > 1) usage(E_OPTERR); if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_sctp || flag_udp || flag_udplite || flag_raw)) flag_noprot = flag_tcp = flag_sctp = flag_udp = flag_udplite = flag_raw = 1; if ((flag_tcp || flag_sctp || flag_udp || flag_udplite || flag_raw || flag_igmp) && !(flag_inet || flag_inet6)) flag_inet = flag_inet6 = 1; if (flag_bluetooth && !(flag_l2cap || flag_rfcomm)) flag_l2cap = flag_rfcomm = 1; flag_arg = flag_tcp + flag_sctp + flag_udplite + flag_udp + flag_raw + flag_unx + flag_ipx + flag_ax25 + flag_netrom + flag_igmp + flag_x25 + flag_rose + flag_l2cap + flag_rfcomm; if (flag_mas) { #if HAVE_FW_MASQUERADE && HAVE_AFINET #if MORE_THAN_ONE_MASQ_AF if (!afname[0]) safe_strncpy(afname, DFLT_AF, sizeof(afname)); #endif for (;;) { i = ip_masq_info(flag_not & FLAG_NUM_HOST, flag_not & FLAG_NUM_PORT, flag_exp); if (i || !flag_cnt) break; wait_continous(); } #else ENOSUPP("netstat", "FW_MASQUERADE"); i = -1; #endif return (i); } if (flag_sta) { if (!afname[0]) safe_strncpy(afname, DFLT_AF, sizeof(afname)); if (!strcmp(afname, "inet")) { #if HAVE_AFINET parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp); #else ENOSUPP("netstat", "AF INET"); #endif } else if(!strcmp(afname, "inet6")) { #if HAVE_AFINET6 parsesnmp6(flag_raw, flag_tcp, flag_udp); #else ENOSUPP("netstat", "AF INET6"); #endif } else { printf(_("netstat: No statistics support for specified address family: %s\n"), afname); exit(1); } exit(0); } if (flag_rou) { int options = 0; if (!afname[0]) safe_strncpy(afname, DFLT_AF, sizeof(afname)); 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; wait_continous(); } return (i); } if (flag_int) { for (;;) { i = iface_info(); if (!flag_cnt || i) break; wait_continous(); } return (i); } for (;;) { if (!flag_arg || flag_tcp || flag_sctp || flag_udp || flag_udplite || 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(); print_selinux_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_sctp) { i = sctp_info(); if (i) return (i); } if (!flag_arg || flag_udp) { i = udp_info(); if (i) return (i); } if (!flag_arg || flag_udplite) { i = udplite_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_arg || flag_rose) { #if HAVE_AFROSE i = rose_info(); if (i) return (i); #else if (flag_arg) { i = 1; ENOSUPP("netstat", "AF ROSE"); } #endif } if (!flag_arg || flag_l2cap || flag_rfcomm) { #if HAVE_AFBLUETOOTH printf(_("Active Bluetooth connections ")); /* xxx */ if (flag_all) printf(_("(servers and established)")); else { if (flag_lst) printf(_("(only servers)")); else printf(_("(w/o servers)")); } printf("\n"); #else if (flag_arg) { i = 1; ENOSUPP("netstat", "AF BLUETOOTH"); } #endif } #if HAVE_AFBLUETOOTH if (!flag_arg || flag_l2cap) { i = l2cap_info(); if (i) return (i); } if (!flag_arg || flag_rfcomm) { i = rfcomm_info(); if (i) return (i); } #endif if (!flag_cnt || i) break; wait_continous(); prg_cache_clear(); } return (i); } net-tools-1.60+git20180626.aebd88e/plipconfig.c000066400000000000000000000066571331436560500205350ustar00rootroot00000000000000/* 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 #include #include #include #include #include #include #include #include "config.h" #include "intl.h" #include "net-support.h" #include "version.h" #include "util.h" int skfd = -1; struct ifreq ifr; struct plipconf *plip; static char *Release = RELEASE, *Signature = "John Paul Morrison, Alan Cox et al."; static void version(void) { printf("%s\n%s\n", Release, Signature); exit(E_VERSION); } static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: plipconfig interface [nibble NN] [trigger NN]\n")); fprintf(fp, _(" plipconfig -V | --version\n")); fprintf(fp, _(" plipconfig -h | --help\n")); exit(rc); } 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, "-V") || !strcmp(*argv, "--version")) version(); else if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help")) usage(E_USAGE); else usage(E_OPTERR); argv++; argc--; } if (argc == 0) usage(E_OPTERR); spp = argv; safe_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(E_OPTERR); plip->nibble = atoi(*spp); spp++; continue; } if (!strcmp(*spp, "trigger")) { if (*++spp == NULL) usage(E_OPTERR); plip->trigger = atoi(*spp); spp++; continue; } usage(E_OPTERR); } plip->pcmd = PLIP_SET_TIMEOUT; if (ioctl(skfd, SIOCDEVPLIP, &ifr) < 0) perror("ioctl"); print_plip(); /* Close the socket. */ (void) close(skfd); return (ret); } net-tools-1.60+git20180626.aebd88e/po/000077500000000000000000000000001331436560500166375ustar00rootroot00000000000000net-tools-1.60+git20180626.aebd88e/po/.cvsignore000066400000000000000000000000051331436560500206320ustar00rootroot00000000000000*.mo net-tools-1.60+git20180626.aebd88e/po/Makefile000066400000000000000000000046751331436560500203130ustar00rootroot00000000000000INSTALL=install -c INSTALL_PROGRAM= ${INSTALL} INSTALL_DATA= ${INSTALL} -m 644 INSTALLNLSDIR=${BASEDIR}/usr/share/locale TUPDATE = msgmerge NLSPACKAGE = net-tools -include ../config.make ALL_POS = $(wildcard *.po) ALL_LANGS = $(ALL_POS:%.po=%) ALL_CATALOGS = $(ALL_LANGS:%=%.mo) ifeq ($(I18N),1) ifeq ($(LINGUAS),) LANGS = $(ALL_LANGS) else LANGS = $(filter $(LINGUAS),$(ALL_LANGS)) endif else LANGS = endif CATALOGS = $(LANGS:%=%.mo) 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 langs='$(ALL_LANGS)'; \ for lang in $$langs; do \ cat=$$lang.mo; \ mv $$lang.po $$lang.old.po; \ echo "$$lang:"; \ if $(TUPDATE) $$lang.old.po $(NLSPACKAGE).pot > $$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 dist: $(ALL_CATALOGS) distclean: clean rm -f -- .depend Makefile depend: install: $(CATALOGS) langs='$(LANGS)'; \ for l in $$langs; do \ $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \ $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \ $(INSTALL) -m 644 $$l.mo $(INSTALLNLSDIR)/$$l/LC_MESSAGES/net-tools.mo; \ done %.mo: %.po msgfmt -o $@ $< net-tools-1.60+git20180626.aebd88e/po/cs.po000066400000000000000000002512651331436560500176170ustar00rootroot00000000000000# Czech translation of net-tools # Copyright (C) 1999 Free Software Foundation, Inc. # Jiří Pavlovský , 1999. # Petr Pisar , 2009. # msgid "" msgstr "" "Project-Id-Version: net-tools cvs-20090825\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2009-08-25 18:34+0200\n" "PO-Revision-Date: 2009-08-26 22:18+0200\n" "Last-Translator: Petr Pisar \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../arp.c:112 ../arp.c:279 #, c-format msgid "arp: need host name\n" msgstr "arp: je tÅ™eba jméno poÄítaÄe\n" #: ../arp.c:215 ../arp.c:230 #, c-format msgid "No ARP entry for %s\n" msgstr "Pro %s neexistuje ARP položka\n" #: ../arp.c:248 #, c-format msgid "arp: cant get HW-Address for `%s': %s.\n" msgstr "arp: HW adresu `%s' nelze zjistit: %s\n" #: ../arp.c:252 #, c-format msgid "arp: protocol type mismatch.\n" msgstr "arp: chybnÄ› zadaný typ protokolu\n" #: ../arp.c:261 #, 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:293 #, c-format msgid "arp: need hardware address\n" msgstr "arp: je tÅ™eba hardwarová adresa\n" #: ../arp.c:301 #, c-format msgid "arp: invalid hardware address\n" msgstr "arp: nesprávná hardwarová adresa\n" #: ../arp.c:398 #, c-format msgid "arp: cannot open etherfile %s !\n" msgstr "arp: databázi ethernetových adres %s nelze otevřít!\n" #: ../arp.c:414 #, 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:427 #, 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:448 #, c-format msgid "" "Address HWtype HWaddress Flags Mask " "Iface\n" msgstr "" "Adresa HWtyp HWadresa Příz. Maska " "Rozhr\n" #: ../arp.c:476 msgid "" msgstr "" #: ../arp.c:478 msgid "(incomplete)" msgstr "(nekompletní)" #: ../arp.c:495 #, c-format msgid "%s (%s) at " msgstr "%s (%s) na " #: ../arp.c:501 #, c-format msgid " " msgstr "" #: ../arp.c:507 #, c-format msgid "netmask %s " msgstr "síťová maska %s " #: ../arp.c:524 #, c-format msgid "on %s\n" msgstr "na %s\n" #: ../arp.c:605 #, c-format msgid "Entries: %d\tSkipped: %d\tFound: %d\n" msgstr "Položky: %d\tVynecháno: %d\tNalezeno: %d\n" #: ../arp.c:609 #, c-format msgid "%s (%s) -- no entry\n" msgstr "%s (%s) -- žádná položka\n" #: ../arp.c:611 #, c-format msgid "arp: in %d entries no match found.\n" msgstr "arp: žádná z položek (%d) nevyhovuje.\n" #: ../arp.c:626 #, c-format msgid "" "Usage:\n" " arp [-vn] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" "Použití:\n" " arp [-vn] [] [-i ] [-a] [] <-Zobrazí ARP " "cache\n" #: ../arp.c:627 #, c-format msgid "" " arp [-v] [-i ] -d [pub] <-Delete ARP " "entry\n" msgstr "" " arp [-v] [-i ] -d [pub] <-Smaže položku " "ARP\n" #: ../arp.c:628 #, c-format msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" " arp [-vnD] [] [-i ] -f [] <-PÅ™idá položku ze " "souboru\n" #: ../arp.c:629 #, c-format msgid "" " arp [-v] [] [-i ] -s [temp] <-Add " "entry\n" msgstr "" " arp [-v] [] [-i ] -s [temp] <-PÅ™idá " "položku\n" #: ../arp.c:630 #, c-format msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" " arp [-v] [] [-i ] -Ds [síťmask <Äís>] " "pub\n" " <-Totéž\n" #: ../arp.c:632 #, c-format msgid "" " -a display (all) hosts in alternative (BSD) " "style\n" msgstr "" " -a zobrazí jména vÅ¡ech poÄítaÄů alternativním\n" " (BSD) způsobem\n" #: ../arp.c:633 #, c-format msgid " -s, --set set a new ARP entry\n" msgstr " -s, --set nastaví novou ARP položku\n" #: ../arp.c:634 #, c-format msgid " -d, --delete delete a specified entry\n" msgstr " -d, --delete smaže zadanou ARP položku\n" #: ../arp.c:635 ../netstat.c:1520 ../route.c:86 #, c-format msgid " -v, --verbose be verbose\n" msgstr "" " -v, --verbose bude vypisovat podrobné zprávy o Äinnosti\n" #: ../arp.c:636 ../netstat.c:1522 ../route.c:87 #, c-format msgid " -n, --numeric don't resolve names\n" msgstr " -n, --numeric nebude pÅ™evádÄ›t jména\n" #: ../arp.c:637 #, c-format msgid "" " -i, --device specify network interface (e.g. eth0)\n" msgstr " -i, --device zadává síťové rozhraní (napÅ™. eth0)\n" #: ../arp.c:638 #, c-format msgid " -D, --use-device read from given device\n" msgstr " -D, --use-device Äte ze zadaného zařízení\n" #: ../arp.c:639 #, c-format msgid " -A, -p, --protocol specify protocol family\n" msgstr " -A, -p, --protocol urÄuje rodinu protokolů\n" #: ../arp.c:640 #, c-format msgid "" " -f, --file read new entries from file or from /etc/" "ethers\n" "\n" msgstr "" " -f, --file Äte nové položky ze souboru nebo z /etc/" "ethers\n" #: ../arp.c:642 ../rarp.c:183 #, c-format msgid " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" " =Použijte '-H pro zadání hardwarového typu adresy.\n" " ImplicitnÄ›: %s\n" #: ../arp.c:643 ../rarp.c:184 #, c-format 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:677 ../arp.c:762 #, c-format msgid "%s: hardware type not supported!\n" msgstr "hardwarový typ %s není podporován!\n" #: ../arp.c:681 #, c-format msgid "%s: address family not supported!\n" msgstr "třída adres %s není podporována!\n" #: ../arp.c:716 #, c-format msgid "arp: -N not yet supported.\n" msgstr "arp: pÅ™epínaÄ -N není zatím podporován\n" #: ../arp.c:726 #, c-format msgid "arp: %s: unknown address family.\n" msgstr "arp: neznámá třída adres %s.\n" #: ../arp.c:735 #, c-format msgid "arp: %s: unknown hardware type.\n" msgstr "arp: neznámý hardwarový typ %s.\n" #: ../arp.c:754 #, c-format msgid "arp: %s: kernel only supports 'inet'.\n" msgstr "arp: %s: jádro podporuje pouze 'inet'.\n" #: ../arp.c:767 #, c-format msgid "arp: %s: hardware type without ARP support.\n" msgstr "arp: hardwarový typ %s nepodporuje ARP.\n" #: ../hostname.c:71 #, c-format msgid "Setting nodename to `%s'\n" msgstr "Nastavuji jméno uzlu na `%s'\n" #: ../hostname.c:76 #, 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:79 ../hostname.c:100 ../hostname.c:118 #, c-format msgid "%s: name too long\n" msgstr "jméno %s je příliÅ¡ dlouhé\n" #: ../hostname.c:92 #, c-format msgid "Setting hostname to `%s'\n" msgstr "Nastavuji jméno poÄítaÄe na `%s'\n" #: ../hostname.c:97 #, 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:110 #, c-format msgid "Setting domainname to `%s'\n" msgstr "Nastavuji jméno domény na `%s'\n" #: ../hostname.c:115 #, 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:132 #, c-format msgid "Resolving `%s' ...\n" msgstr "Vyhledávám `%s' ...\n" #: ../hostname.c:138 #, c-format msgid "Result: h_name=`%s'\n" msgstr "Výsledek: h_name=`%s'\n" #: ../hostname.c:143 #, c-format msgid "Result: h_aliases=`%s'\n" msgstr "Výsledek: h_aliases=`%s'\n" #: ../hostname.c:148 #, 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 #, c-format 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 #, c-format 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 #, c-format 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 #, c-format 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 #, c-format msgid "" " hostname [-v] display hostname\n" "\n" msgstr "" " hostname [-v] vypíše jméno poÄítaÄe\n" "\n" #: ../hostname.c:230 #, c-format 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 #, c-format 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 #, c-format msgid " -s, --short short host name\n" msgstr " -s, --short krátké jméno poÄítaÄe\n" #: ../hostname.c:233 #, c-format msgid " -a, --alias alias names\n" msgstr " -a, --alias pÅ™ezdívky\n" #: ../hostname.c:234 #, c-format 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 #, c-format msgid " -f, --fqdn, --long long host name (FQDN)\n" msgstr " -f, --fqdn, --long dlouhé jméno poÄítaÄe (kanonické)\n" #: ../hostname.c:236 #, c-format msgid " -d, --domain DNS domain name\n" msgstr " -d, --domain jméno DNS domény\n" #: ../hostname.c:237 #, c-format msgid " -y, --yp, --nis NIS/YP domainname\n" msgstr " -y, --yp, --nis jméno NIS/YP domény\n" #: ../hostname.c:239 #, c-format msgid " -n, --node DECnet node name\n" msgstr " -n, --node jméno DECnet uzlu\n" #: ../hostname.c:241 #, c-format 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 #, c-format 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 "" " Tento příkaz může pÅ™eÄíst nebo nastavit název stroje nebo doménové jméno\n" " NIS. NaÄíst lze rovněž DNS doménu nebo FQDN (plnÄ› kvalifikované doménové\n" " jméno). Pokud pro vyhledávání strojů nepoužíváte bind nebo NIS, můžete\n" " zmÄ›nit FQDN (Fully Qualified Domain Name) a doménové jméno DNS (což je\n" " Äást FQDN) v souboru /etc/hosts.\n" #: ../hostname.c:340 #, 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:341 #, c-format 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:342 #, c-format 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:359 #, c-format msgid "gethostname()=`%s'\n" msgstr "gethostname()=`%s'\n" #: ../hostname.c:376 #, c-format msgid "getdomainname()=`%s'\n" msgstr "getdomainname()=`%s'\n" #: ../hostname.c:391 #, c-format msgid "getnodename()=`%s'\n" msgstr "getnodename()=`%s'\n" #: ../ifconfig.c:107 ../netstat.c:1482 #, c-format 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řízn\n" #: ../ifconfig.c:132 ../ifconfig.c:164 #, c-format msgid "%s: ERROR while getting interface flags: %s\n" msgstr "%s: CHYBA pÅ™i získávání příznaků rozhraní: %s\n" #: ../ifconfig.c:156 ../ifconfig.c:188 ../ifconfig.c:794 ../ifconfig.c:887 #: ../ifconfig.c:1000 #, c-format msgid "No support for INET on this system.\n" msgstr "Tento systém nepodporuje INET.\n" #: ../ifconfig.c:196 #, c-format msgid "%s: ERROR while testing interface flags: %s\n" msgstr "%s: CHYBA pÅ™i zkouÅ¡ení příznaků rozhraní: %s\n" #: ../ifconfig.c:205 #, c-format msgid "" "Usage:\n" " ifconfig [-a] [-v] [-s] [[]
]\n" msgstr "" "Použití:\n" " ifconfig [-a] [-v] [-s] [[] ]\n" #: ../ifconfig.c:207 #, c-format msgid " [add
[/]]\n" msgstr " [add [/]]\n" #: ../ifconfig.c:208 #, c-format msgid " [del
[/]]\n" msgstr " [del [/]]\n" #: ../ifconfig.c:209 #, c-format msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr " [[-]broadcast []] [[-]pointopoint []]\n" #: ../ifconfig.c:210 #, c-format msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr " [netmask ] [dstaddr ] [tunnel ]\n" #: ../ifconfig.c:213 #, c-format msgid " [outfill ] [keepalive ]\n" msgstr " [outfill ] [keepalive ]\n" #: ../ifconfig.c:215 #, c-format msgid " [hw
] [metric ] [mtu ]\n" msgstr " [hw ] [metric ] [mtu ]\n" #: ../ifconfig.c:216 #, c-format msgid " [[-]trailers] [[-]arp] [[-]allmulti]\n" msgstr " [[-]trailers] [[-]arp] [[-]allmulti]\n" #: ../ifconfig.c:217 #, c-format msgid " [multicast] [[-]promisc]\n" msgstr " [multicast] [[-]promisc]\n" #: ../ifconfig.c:218 #, c-format msgid " [mem_start ] [io_addr ] [irq ] [media ]\n" msgstr " [mem_start ] [io_addr ] [irq ] [media ]\n" #: ../ifconfig.c:220 #, c-format msgid " [txqueuelen ]\n" msgstr " [txqueuelen délka]\n" #: ../ifconfig.c:223 #, c-format msgid " [[-]dynamic]\n" msgstr " [[-]dynamic]\n" #: ../ifconfig.c:225 #, c-format msgid "" " [up|down] ...\n" "\n" msgstr "" " [up|down] ...\n" "\n" #: ../ifconfig.c:227 #, c-format msgid " =Hardware Type.\n" msgstr " = Hardwarový Typ.\n" #: ../ifconfig.c:228 #, c-format msgid " List of possible hardware types:\n" msgstr " Seznam možných hardwarových typů:\n" #. 1 = ARPable #: ../ifconfig.c:230 #, c-format msgid " =Address family. Default: %s\n" msgstr " = Třída adres. Implicitní: %s\n" #: ../ifconfig.c:231 #, c-format msgid " List of possible address families:\n" msgstr " Seznam možných tříd adres:\n" #: ../ifconfig.c:307 #, c-format msgid "ifconfig: option `%s' not recognised.\n" msgstr "ifconfig: pÅ™epínaÄ â€ž%s“ nebyl rozpoznán.\n" #: ../ifconfig.c:309 ../ifconfig.c:990 #, c-format msgid "ifconfig: `--help' gives usage information.\n" msgstr "ifconfig: návod na použití lze získat pomocí „--help“\n" #: ../ifconfig.c:384 #, c-format msgid "Unknown media type.\n" msgstr "Neznámý typ média.\n" #: ../ifconfig.c:421 #, c-format msgid "" "Warning: Interface %s still in promisc mode... maybe other application is " "running?\n" msgstr "" "Pozor: Rozhraní %s je stále v promiskuitním režimu. Neběží jiná aplikace?\n" #: ../ifconfig.c:433 #, c-format msgid "Warning: Interface %s still in MULTICAST mode.\n" msgstr "Pozor: Rozhraní %s je stále v režimu MULTICAST.\n" #: ../ifconfig.c:445 #, c-format msgid "Warning: Interface %s still in ALLMULTI mode.\n" msgstr "Pozor: Rozhraní %s je stále v režimu ALLMULTI.\n" #: ../ifconfig.c:469 #, c-format msgid "Warning: Interface %s still in DYNAMIC mode.\n" msgstr "Pozor: Rozhraní %s je stále v režimu DYNAMIC.\n" #: ../ifconfig.c:527 #, c-format msgid "Warning: Interface %s still in BROADCAST mode.\n" msgstr "Pozor: Rozhraní %s je stále v režimu VÅ ESMÄšR.\n" #: ../ifconfig.c:538 #, c-format msgid "ifconfig: Error resolving '%s' for broadcast\n" msgstr "ifconfig: Chyba pÅ™i pÅ™ekládání „%s“ pro vÅ¡esmÄ›r\n" #: ../ifconfig.c:563 #, c-format msgid "ifconfig: Error resolving '%s' for dstaddr\n" msgstr "ifconfig: Chyba pÅ™i pÅ™ekládání „%s“ pro adresu cíle\n" #: ../ifconfig.c:586 #, c-format msgid "ifconfig: Error resolving '%s' for netmask\n" msgstr "ifconfig: Chyba pÅ™i pÅ™ekládání „%s“ pro masku sítÄ›\n" #: ../ifconfig.c:665 #, c-format msgid "Warning: Interface %s still in POINTOPOINT mode.\n" msgstr "Pozor: Rozhraní %s je stále v DVOUBODOVÉM režimu.\n" #: ../ifconfig.c:676 #, c-format msgid "ifconfig: Error resolving '%s' for pointopoint\n" msgstr "ifconfig: Chyba pÅ™i pÅ™ekládání „%s“ pro dvoubodové nastavení\n" #: ../ifconfig.c:700 #, c-format msgid "hw address type `%s' has no handler to set address. failed.\n" msgstr "" "Pro typ hardwarové adresy „%s“ neexistuje obsluha na nastavování adresy.\n" "Operace selhala.\n" #: ../ifconfig.c:709 #, c-format msgid "%s: invalid %s address.\n" msgstr "%s: adresa %s je nesprávná.\n" #: ../ifconfig.c:749 #, c-format msgid "ifconfig: Error resolving '%s' for add\n" msgstr "ifconfig: Chyba pÅ™i pÅ™ekládání „%s“ pro adresu\n" #: ../ifconfig.c:760 ../ifconfig.c:850 ../ifconfig.c:938 #, c-format msgid "No support for INET6 on this system.\n" msgstr "Tento systém nepodporuje INET6.\n" #: ../ifconfig.c:803 ../ifconfig.c:896 #, c-format msgid "Interface %s not initialized\n" msgstr "Rozhraní %s není inicializováno\n" #: ../ifconfig.c:815 ../ifconfig.c:907 #, c-format msgid "Bad address.\n" msgstr "Chybná adresa.\n" #: ../ifconfig.c:910 #, c-format msgid "Address deletion not supported on this system.\n" msgstr "Tento systém nepodporuje mazání adres.\n" #: ../ifconfig.c:982 #, c-format msgid "ifconfig: Cannot set address for this protocol family.\n" msgstr "ifconfig: Pro tuto rodinu protokolů nelze nastavit adresu.\n" #: ../ifconfig.c:989 #, c-format msgid "ifconfig: error resolving '%s' to set address for af=%s\n" msgstr "ifconfig: chyba pÅ™i pÅ™ekládání „%s“ za úÄelem nastavení adresy AF=%s\n" #: ../ifconfig.c:1010 #, c-format msgid "No support for ECONET on this system.\n" msgstr "Tento systém nepodporuje ECONET.\n" #: ../ifconfig.c:1018 #, c-format msgid "Don't know how to set addresses for family %d.\n" msgstr "Nevím, jak nastavit adresu třídy %d.\n" #: ../ifconfig.c:1053 #, c-format msgid "WARNING: at least one error occured. (%d)\n" msgstr "POZOR: Vyskytla se alespoň jedna chyba. (%d)\n" #: ../netstat.c:434 #, 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:438 #, c-format 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 vypsá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:445 ../netstat.c:1186 ../netstat.c:1264 msgid "LISTENING" msgstr "NASLOUCHÃ" #: ../netstat.c:446 msgid "CONN SENT" msgstr "CONN ODESLÃN" #: ../netstat.c:447 ../netstat.c:1266 msgid "DISC SENT" msgstr "DISC ODESLÃN" #: ../netstat.c:448 ../netstat.c:515 ../netstat.c:898 ../netstat.c:1267 msgid "ESTABLISHED" msgstr "SPOJENO" #: ../netstat.c:470 #, c-format msgid "Active NET/ROM sockets\n" msgstr "Aktivní NET/ROM sokety\n" #: ../netstat.c:471 #, c-format 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:481 ../netstat.c:1306 #, 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:516 msgid "SYN_SENT" msgstr "SYN_SENT" #: ../netstat.c:517 msgid "SYN_RECV" msgstr "SYN_RECV" #: ../netstat.c:518 msgid "FIN_WAIT1" msgstr "FIN_WAIT1" #: ../netstat.c:519 msgid "FIN_WAIT2" msgstr "FIN_WAIT2" #: ../netstat.c:520 msgid "TIME_WAIT" msgstr "TIME_WAIT" #: ../netstat.c:521 msgid "CLOSE" msgstr "ZAVŘEN" #: ../netstat.c:522 msgid "CLOSE_WAIT" msgstr "CLOSE_WAIT" #: ../netstat.c:523 msgid "LAST_ACK" msgstr "POSLEDNà ACK" #: ../netstat.c:524 msgid "LISTEN" msgstr "NASLOUCHÃ" #: ../netstat.c:525 msgid "CLOSING" msgstr "ZAVíRÃ" #: ../netstat.c:596 #, c-format msgid "warning, got bogus igmp6 line %d.\n" msgstr "varování, nesmyslný igmp6 řádek %d.\n" #: ../netstat.c:601 ../netstat.c:639 ../netstat.c:763 ../netstat.c:892 #: ../netstat.c:1029 ../netstat.c:1034 #, c-format msgid "netstat: unsupported address family %d !\n" msgstr "netstat: třída adres %d není podporována !\n" #: ../netstat.c:614 ../netstat.c:619 ../netstat.c:627 ../netstat.c:634 #, c-format msgid "warning, got bogus igmp line %d.\n" msgstr "varování, nesmyslný igmp řádek %d.\n" #: ../netstat.c:677 #, c-format msgid "Active X.25 sockets\n" msgstr "Aktivní X.25 sokety\n" #. IMHO, Vr/Vs is not very usefull --SF #: ../netstat.c:679 #, c-format msgid "" "Dest Source Device LCI State Vr/Vs Send-Q Recv-" "Q\n" msgstr "" "Cíl Zdroj Zaříz LCI Stav Vr/Vs Odhod-F Přích-" "F\n" #: ../netstat.c:759 #, c-format msgid "warning, got bogus tcp line.\n" msgstr "varování, nesmyslný tcp řádek.\n" #: ../netstat.c:798 ../netstat.c:947 ../netstat.c:1072 #, c-format msgid "off (0.00/%ld/%d)" msgstr "vyp (0.00/%ld/%d)" #: ../netstat.c:802 #, c-format msgid "on (%2.2f/%ld/%d)" msgstr "zapnut (%2.2f/%ld/%d)" #: ../netstat.c:807 #, c-format msgid "keepalive (%2.2f/%ld/%d)" msgstr "keepalive (%2.2f/%ld/%d)" #: ../netstat.c:812 #, c-format msgid "timewait (%2.2f/%ld/%d)" msgstr "timewait (%2.2f/%ld/%d)" #: ../netstat.c:817 ../netstat.c:956 ../netstat.c:1082 #, c-format msgid "unkn-%d (%2.2f/%ld/%d)" msgstr "nezn-%d (%2.2f/%ld/%d)" #: ../netstat.c:888 #, c-format msgid "warning, got bogus udp line.\n" msgstr "varování, nesmyslný udp řádek.\n" #: ../netstat.c:906 ../netstat.c:1172 ../netstat.c:1205 msgid "UNKNOWN" msgstr "NEZNÃM" #: ../netstat.c:952 ../netstat.c:1077 #, c-format msgid "on%d (%2.2f/%ld/%d)" msgstr "zap%d (%2.2f/%ld/%d)" #: ../netstat.c:1043 #, c-format msgid "warning, got bogus raw line.\n" msgstr "varování, nesmyslný 'raw' řádek.\n" #: ../netstat.c:1125 #, c-format msgid "warning, got bogus unix line.\n" msgstr "varování, netstat 'unix' řádek.\n" #: ../netstat.c:1152 msgid "STREAM" msgstr "STREAM" #: ../netstat.c:1156 msgid "DGRAM" msgstr "DGRAM" #: ../netstat.c:1160 msgid "RAW" msgstr "RAW" #: ../netstat.c:1164 msgid "RDM" msgstr "RDM" #: ../netstat.c:1168 msgid "SEQPACKET" msgstr "SEQPACKET" #: ../netstat.c:1177 msgid "FREE" msgstr "NEALOKOVÃN" #: ../netstat.c:1193 msgid "CONNECTING" msgstr "SPOJUJE" #: ../netstat.c:1197 msgid "CONNECTED" msgstr "SPOJEN" #: ../netstat.c:1201 msgid "DISCONNECTING" msgstr "ODPOJUJE" #: ../netstat.c:1233 #, c-format msgid "Active UNIX domain sockets " msgstr "Aktivní sokety domény UNIX " #: ../netstat.c:1235 ../netstat.c:1801 #, c-format msgid "(servers and established)" msgstr "(servery a navázaná spojení)" #: ../netstat.c:1238 ../netstat.c:1804 #, c-format msgid "(only servers)" msgstr "(pouze servery)" #: ../netstat.c:1240 ../netstat.c:1806 #, c-format msgid "(w/o servers)" msgstr "(w/o servery)" #: ../netstat.c:1243 #, c-format msgid "" "\n" "Proto RefCnt Flags Type State I-Node " msgstr "" "\n" "Proto ČítaÄ Příznaky Typ Stav I-Uzel " #: ../netstat.c:1245 #, c-format msgid " Path\n" msgstr " Cesta\n" #: ../netstat.c:1265 msgid "SABM SENT" msgstr "SABM ODESLÃN" #: ../netstat.c:1268 msgid "RECOVERY" msgstr "OBNOVA" #: ../netstat.c:1282 #, c-format msgid "Active AX.25 sockets\n" msgstr "Aktivní AX.25 sokety\n" #: ../netstat.c:1283 #, c-format 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:1326 #, c-format msgid "problem reading data from %s\n" msgstr "chyba pÅ™i Ätení dat z %s\n" #: ../netstat.c:1396 #, c-format 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:1398 #, c-format msgid " User" msgstr " Uživatel" #: ../netstat.c:1432 msgid "ESTAB" msgstr "SPOJEN" #: ../netstat.c:1440 msgid "UNK." msgstr "NEZ." #: ../netstat.c:1478 #, c-format msgid "Kernel Interface table\n" msgstr "Tabulka rozhraní v jádru\n" #: ../netstat.c:1486 msgid "missing interface information" msgstr "chybí informace o rozhraní" #: ../netstat.c:1509 #, c-format msgid "" "usage: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--" "help}\n" msgstr "" "Použití: netstat [-vWeenNcCF] [] -r netstat {-V|--version|-h|--" "help}\n" #: ../netstat.c:1510 #, c-format msgid " netstat [-vWnNcaeol] [ ...]\n" msgstr " netstat [-vWnNcaeol] […]\n" #: ../netstat.c:1511 #, c-format msgid "" " netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }\n" "\n" msgstr "" " netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }\n" "\n" #: ../netstat.c:1513 #, c-format msgid " -r, --route display routing table\n" msgstr " -r, --route vypíše smÄ›rovací tabulku\n" #: ../netstat.c:1514 #, c-format msgid " -i, --interfaces display interface table\n" msgstr " -i, --interfaces vypíše tabulku rozhraní\n" #: ../netstat.c:1515 #, c-format msgid " -g, --groups display multicast group memberships\n" msgstr "" " -g, --groups vypíše Älenství v multicast skupinách\n" #: ../netstat.c:1516 #, c-format msgid "" " -s, --statistics display networking statistics (like SNMP)\n" msgstr "" " -s, --statistics vypíše statistiku síťové aktivity (jako " "SNMP)\n" #: ../netstat.c:1518 #, c-format msgid "" " -M, --masquerade display masqueraded connections\n" "\n" msgstr "" " -M, --masquerade vypíše maskovaná spojení\n" "\n" #: ../netstat.c:1521 #, c-format msgid " -W, --wide don't truncate IP addresses\n" msgstr " -W, --wide nezkracuje IP adresy\n" #: ../netstat.c:1523 #, c-format msgid " --numeric-hosts don't resolve host names\n" msgstr " --numeric-hosts nepÅ™ekládá názvy strojů\n" #: ../netstat.c:1524 #, c-format msgid " --numeric-ports don't resolve port names\n" msgstr " --numeric-ports nepÅ™ekládá názvy portů\n" #: ../netstat.c:1525 #, c-format msgid " --numeric-users don't resolve user names\n" msgstr " --numeric-users nepÅ™ekládá uživatelské jména\n" #: ../netstat.c:1526 #, c-format msgid " -N, --symbolic resolve hardware names\n" msgstr " -N, --symbolic pÅ™evede hw jména\n" #: ../netstat.c:1527 ../route.c:88 #, c-format msgid " -e, --extend display other/more information\n" msgstr " -e, --extend vypíše podrobnÄ›jší informace\n" #: ../netstat.c:1528 #, c-format msgid " -p, --programs display PID/Program name for sockets\n" msgstr "" " -p, --programs vypíše PID/jméno programu pro sokety\n" #: ../netstat.c:1529 #, c-format msgid "" " -c, --continuous continuous listing\n" "\n" msgstr "" " -c, --continuous nepÅ™eruÅ¡ovaný výpis\n" "\n" #: ../netstat.c:1530 #, c-format msgid " -l, --listening display listening server sockets\n" msgstr "" " -l, --listening vypíše sokety, na nichž je nasloucháno\n" #: ../netstat.c:1531 #, c-format msgid "" " -a, --all, --listening display all sockets (default: connected)\n" msgstr "" " -a, --all, --listening vypíše vÅ¡echny sokety (implicitnÄ›: " "spojené)\n" #: ../netstat.c:1532 #, c-format msgid " -o, --timers display timers\n" msgstr " -o, --timers zobrazí ÄasovaÄe\n" #: ../netstat.c:1533 ../route.c:89 #, c-format msgid "" " -F, --fib display Forwarding Information Base " "(default)\n" msgstr "" " -F, --fib zobrazí Forwarding Information Base\n" " (implicitní)\n" #: ../netstat.c:1534 ../route.c:90 #, c-format msgid "" " -C, --cache display routing cache instead of FIB\n" "\n" msgstr " -C, --cache místo FIB zobrazí smÄ›rovací cache\n" #: ../netstat.c:1536 #, c-format msgid "" " ={-t|--tcp} {-u|--udp} {-U|--udplite} {-w|--raw} {-x|--unix} --" "ax25 --ipx --netrom\n" msgstr "" " ={-t|--tcp} {-u|--udp} {-U|--udplite} {-w|--raw} {-x|--unix} --" "ax25 --ipx --netrom\n" #: ../netstat.c:1537 #, c-format msgid " =Use '-6|-4' or '-A ' or '--'; default: %s\n" msgstr " =Použijte „-6|-4“ nebo „-A “ nebo „--“. Implicitní: %s\n" #: ../netstat.c:1538 ../route.c:93 #, c-format 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:1756 #, c-format msgid "netstat: No statistics support for specified address family: %s\n" msgstr "netstat: Pro zadanou rodinu adres není podporována statistika: %s\n" #: ../netstat.c:1798 #, c-format msgid "Active Internet connections " msgstr "Aktivní Internetová spojení " #: ../netstat.c:1808 #, c-format 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:1810 #, c-format msgid " User Inode " msgstr " Uživatel I-uzel " #: ../netstat.c:1813 #, c-format msgid " Timer" msgstr " ÄŒasovaÄ" #: ../netstat.c:1851 #, c-format msgid "IPv4 Group Memberships\n" msgstr "ÄŒlenství v IPv4 skupinách\n" #: ../netstat.c:1852 #, c-format msgid "Interface RefCnt Group\n" msgstr "Rozhraní ČítaÄ Skupina\n" #: ../rarp.c:45 msgid "This kernel does not support RARP.\n" msgstr "Toto jádro nepodporuje RARP.\n" #: ../rarp.c:84 #, c-format msgid "no RARP entry for %s.\n" msgstr "pro %s neexistuje RARP položka.\n" #: ../rarp.c:97 #, c-format msgid "%s: bad hardware address\n" msgstr "hardwarová adresa %s je nesprávná\n" #: ../rarp.c:129 #, c-format msgid "rarp: cannot open file %s:%s.\n" msgstr "rarp: soubor %s:%s nelze otevřít.\n" #: ../rarp.c:141 #, c-format msgid "rarp: format error at %s:%u\n" msgstr "rarp: syntaktická chyba na řádku %2$u souboru %1$s\n" #: ../rarp.c:145 ../rarp.c:290 #, c-format msgid "rarp: %s: unknown host\n" msgstr "rarp: poÄítaÄ %s není znám\n" #: ../rarp.c:148 #, 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:177 #, c-format msgid "Usage: rarp -a list entries in cache.\n" msgstr "Použití: rarp -a vypíše položky z cache.\n" #: ../rarp.c:178 #, c-format msgid " rarp -d delete entry from cache.\n" msgstr " rarp -d smaže položku z cache.\n" #: ../rarp.c:179 #, c-format msgid " rarp [] -s add entry to cache.\n" msgstr "" " rarp [] -s pÅ™idá položku do cache.\n" #: ../rarp.c:180 #, c-format msgid "" " rarp -f add entries from /etc/ethers.\n" msgstr "" " rarp -f pÅ™idá položky z /etc/ethers.\n" #: ../rarp.c:181 #, c-format msgid "" " rarp -V display program version.\n" "\n" msgstr "" " rarp -V vypíše oznaÄení verze " "programu.\n" "\n" #: ../rarp.c:239 #, c-format msgid "%s: illegal option mix.\n" msgstr "Kombinace pÅ™epínaÄů %s je nesprávná.\n" #: ../rarp.c:270 #, c-format msgid "rarp: %s: unknown hardware type.\n" msgstr "rarp: hardwarový typ %s není znám.\n" #: ../route.c:80 #, c-format msgid "" "Usage: route [-nNvee] [-FC] [] List kernel routing tables\n" msgstr "" "Použití: route [-nNvee] [-FC] [] Zobrazí smÄ›rovací tabulky v " "jádru\n" #: ../route.c:81 #, c-format 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:83 #, c-format msgid "" " route {-h|--help} [] Detailed usage syntax for " "specified AF.\n" msgstr "" " route {-h|--help [] NápovÄ›da pro použití s AF.\n" #: ../route.c:84 #, c-format 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" #: ../route.c:92 #, c-format msgid " =Use '-A ' or '--'; default: %s\n" msgstr " =Použijte „-A “ nebo „--“. Implicitní: %s\n" #: ../plipconfig.c:66 #, c-format msgid "Usage: plipconfig [-a] [-i] [-v] interface\n" msgstr "Použití: plipconfig [-a] [-i] [-v] rozhraní\n" #: ../plipconfig.c:67 #, c-format msgid " [nibble NN] [trigger NN]\n" msgstr " [nibble NN] [trigger NN]\n" #: ../plipconfig.c:68 #, c-format 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:85 #, c-format msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n" msgstr "Použití: iptunnel { add | change | del | show } [ JMÉNO ]\n" #: ../iptunnel.c:86 #, c-format msgid "" " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" msgstr "" " [ mode { ipip | gre | sit } ] [ vzdálená ADR ] [ místní ADR ]\n" #: ../iptunnel.c:87 #, c-format 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:88 #, c-format msgid " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n" msgstr " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev ZAŘÃZENà ]\n" #: ../iptunnel.c:89 #, c-format msgid "" " iptunnel -V | --version\n" "\n" msgstr "" " iptunnel -V | --version\n" "\n" #: ../iptunnel.c:90 #, c-format msgid "Where: NAME := STRING\n" msgstr "Kde: JMÉNO := ŘETÄšZEC\n" #: ../iptunnel.c:91 #, c-format msgid " ADDR := { IP_ADDRESS | any }\n" msgstr " ADR := { IP-ADRESA | any }\n" #: ../iptunnel.c:92 #, c-format msgid " TOS := { NUMBER | inherit }\n" msgstr " TOS := { ÄŒÃSLO | inherit }\n" #: ../iptunnel.c:93 #, c-format msgid " TTL := { 1..255 | inherit }\n" msgstr " TTL := { 1..255 | inherit }\n" #: ../iptunnel.c:94 #, c-format msgid " KEY := { DOTTED_QUAD | NUMBER }\n" msgstr " KLÃÄŒ := { DOTTED_QUAD | ÄŒÃSLO }\n" #: ../iptunnel.c:332 #, c-format msgid "Keys are not allowed with ipip and sit.\n" msgstr "S ipip a sit nejsou klíÄe povoleny.\n" #: ../iptunnel.c:352 #, c-format 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:367 #, c-format msgid "ttl != 0 and noptmudisc are incompatible\n" msgstr "ttl != 0 a noptmudisc se navzájem vyluÄují\n" #: ../iptunnel.c:379 #, c-format msgid "cannot determine tunnel mode (ipip, gre or sit)\n" msgstr "režim tunelu (ipip, gre Äi sit) nelze zjistit\n" #: ../iptunnel.c:417 #, c-format msgid "%s: %s/ip remote %s local %s " msgstr "%s: %s/ip vzdálený %s místní %s " #: ../iptunnel.c:421 msgid "unknown" msgstr "Neznám." #: ../iptunnel.c:453 #, c-format msgid " Drop packets out of sequence.\n" msgstr " Zahazuje pakety mimo poÅ™adí.\n" #: ../iptunnel.c:455 #, c-format msgid " Checksum in received packet is required.\n" msgstr " PÅ™ijímané pakety musí mít kontrolní souÄet.\n" # ??? #: ../iptunnel.c:457 #, c-format msgid " Sequence packets on output.\n" msgstr " Řadí odchozí pakety.\n" #: ../iptunnel.c:459 #, c-format msgid " Checksum output packets.\n" msgstr " Odchozí pakety budou mít kontrolní souÄet.\n" #: ../iptunnel.c:487 #, c-format msgid "Wrong format of /proc/net/dev. Sorry.\n" msgstr "Lituji, formát /proc/net/dev je chybný.\n" #: ../iptunnel.c:500 #, c-format msgid "Failed to get type of [%s]\n" msgstr "Typ [%s] se nepodaÅ™ilo zjistit.\n" #: ../iptunnel.c:516 #, c-format msgid "RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts\n" msgstr "RX: Pakety Bajty Chyby CsumChyb MimoPoÅ™ Mcasts\n" #: ../iptunnel.c:519 #, c-format msgid "TX: Packets Bytes Errors DeadLoop NoRoute NoBufs\n" msgstr "TX: Pakety Bajty Chyby DeadLoop NoRoute NoBufs\n" #: ../statistics.c:48 msgid "ICMP input histogram:" msgstr "Histogram ICMP vstupu:" #: ../statistics.c:49 msgid "ICMP output histogram:" msgstr "Histogram ICMP výstupu:" #: ../statistics.c:66 #, c-format msgid "Forwarding is %s" msgstr "PÅ™edávání je %s" #: ../statistics.c:67 #, c-format msgid "Default TTL is %u" msgstr "Implicitní TTL je %u" #: ../statistics.c:68 ../statistics.c:89 #, c-format msgid "%u total packets received" msgstr "Celkem pÅ™ijatých paketů: %u" #: ../statistics.c:69 ../statistics.c:90 #, c-format msgid "%u with invalid headers" msgstr "S nesprávnými hlaviÄkami: %u" #: ../statistics.c:70 ../statistics.c:93 #, c-format msgid "%u with invalid addresses" msgstr "S nesprávnými adresami: %u" #: ../statistics.c:71 ../statistics.c:98 #, c-format msgid "%u forwarded" msgstr "PÅ™eposláno: %u" #: ../statistics.c:72 ../statistics.c:94 #, c-format msgid "%u with unknown protocol" msgstr "S neznámým protokolem: %u" #: ../statistics.c:73 ../statistics.c:96 #, c-format msgid "%u incoming packets discarded" msgstr "PoÄet zahozených příchozích paketů: %u" #: ../statistics.c:74 ../statistics.c:97 #, c-format msgid "%u incoming packets delivered" msgstr "PoÄet doruÄených příchozích paketů: %u" #: ../statistics.c:75 ../statistics.c:99 #, c-format msgid "%u requests sent out" msgstr "PoÄet požadavků na odeslání: %u" #. ? #: ../statistics.c:76 ../statistics.c:100 #, c-format msgid "%u outgoing packets dropped" msgstr "PoÄet zahozených odchozích paketů: %u" #: ../statistics.c:77 ../statistics.c:101 #, c-format msgid "%u dropped because of missing route" msgstr "Zahozeno kvůli chybÄ›jící cestÄ›: %u" #: ../statistics.c:78 ../statistics.c:102 #, c-format msgid "%u fragments dropped after timeout" msgstr "PoÄet fragmentů zahozených po vyprÅ¡ení Äasu: %u" #: ../statistics.c:79 ../statistics.c:103 #, c-format msgid "%u reassemblies required" msgstr "PoÄet nutných znovusestavení: %u" #. ? #: ../statistics.c:80 ../statistics.c:104 #, c-format msgid "%u packets reassembled ok" msgstr "PoÄet v pořádku znovu sestavených paketů: %u" #: ../statistics.c:81 ../statistics.c:105 #, c-format msgid "%u packet reassemblies failed" msgstr "PoÄet paketů, jež se nepodaÅ™ilo znovu sestavit: %u" #: ../statistics.c:82 ../statistics.c:106 #, c-format msgid "%u fragments received ok" msgstr "PoÄet v pořádku pÅ™ijatých fragmentů: %u" #: ../statistics.c:83 ../statistics.c:107 #, c-format msgid "%u fragments failed" msgstr "PoÄet chybných fragmentů: %u" #: ../statistics.c:84 ../statistics.c:108 #, c-format msgid "%u fragments created" msgstr "PoÄet vytvoÅ™ených fragmentů: %u" #: ../statistics.c:91 #, c-format msgid "%u with packets too big" msgstr "PoÄet příliÅ¡ velkých packetů: %u" #: ../statistics.c:92 #, c-format msgid "%u incoming packets with no route" msgstr "PoÄet příchozích paketů bez odpovídající cesty: %u" #: ../statistics.c:95 #, c-format msgid "%u with truncated packets" msgstr "PoÄet zkrácených packetů: %u" #: ../statistics.c:109 #, c-format msgid "%u incoming multicast packets" msgstr "PoÄet příchozích multicastových paketů: %u" #: ../statistics.c:110 #, c-format msgid "%u outgoing multicast packets" msgstr "PoÄet odchozích multicastových paketů: %u" #: ../statistics.c:115 ../statistics.c:145 #, c-format msgid "%u ICMP messages received" msgstr "PoÄet pÅ™ijatých ICMP zpráv: %u" #: ../statistics.c:116 ../statistics.c:146 #, c-format msgid "%u input ICMP message failed" msgstr "PoÄet chybných příchozích ICMP zpráv: %u" #: ../statistics.c:117 ../statistics.c:130 ../statistics.c:147 #: ../statistics.c:162 #, c-format msgid "destination unreachable: %u" msgstr "Adresát nedostupný: %u" #: ../statistics.c:118 #, c-format msgid "timeout in transit: %u" msgstr "VyprÅ¡el Äas pÅ™i pÅ™enosu: %u" #: ../statistics.c:119 ../statistics.c:132 #, c-format msgid "wrong parameters: %u" msgstr "Chybné parametry: %u" #. ? #: ../statistics.c:120 #, c-format msgid "source quenches: %u" msgstr "Zahlcení zdroje: %u" #: ../statistics.c:121 ../statistics.c:160 ../statistics.c:175 #, c-format msgid "redirects: %u" msgstr "PoÄet pÅ™esmÄ›rování: %u" #: ../statistics.c:122 ../statistics.c:151 ../statistics.c:166 #, c-format msgid "echo requests: %u" msgstr "Žádost o echo: %u" #: ../statistics.c:123 ../statistics.c:136 ../statistics.c:152 #: ../statistics.c:167 #, c-format msgid "echo replies: %u" msgstr "OdpovÄ›Ä na žádost o echo: %u" #: ../statistics.c:124 #, c-format msgid "timestamp request: %u" msgstr "Žádost o Äas: %u" #: ../statistics.c:125 #, c-format msgid "timestamp reply: %u" msgstr "OdpovÄ›Ä na žádost o Äas: %u" #: ../statistics.c:126 #, c-format msgid "address mask request: %u" msgstr "Žádost o masku podsítÄ›: %u" #. ? #: ../statistics.c:127 ../statistics.c:140 #, c-format msgid "address mask replies: %u" msgstr "OdpovÄ›Ä na žádost o masku podsítÄ›: %u" #. ? #: ../statistics.c:128 ../statistics.c:161 #, c-format msgid "%u ICMP messages sent" msgstr "PoÄet odeslaných ICMP zpráv: %u" #: ../statistics.c:129 #, c-format msgid "%u ICMP messages failed" msgstr "PoÄet chybných ICMP zpráv: %u" #: ../statistics.c:131 #, c-format msgid "time exceeded: %u" msgstr "VyprÅ¡ení životnosti: %u" #. ? #: ../statistics.c:133 #, c-format msgid "source quench: %u" msgstr "Zahlcení zdroje: %u" #: ../statistics.c:134 #, c-format msgid "redirect: %u" msgstr "PoÄet pÅ™esmÄ›rování: %u" #: ../statistics.c:137 #, c-format msgid "timestamp requests: %u" msgstr "žádost o Äas: %u" #: ../statistics.c:138 #, c-format msgid "timestamp replies: %u" msgstr "OdpovÄ›Ä na žádost o Äas: %u" #: ../statistics.c:139 #, c-format msgid "address mask requests: %u" msgstr "Žádost o masku podsítÄ›: %u" #: ../statistics.c:148 ../statistics.c:163 #, c-format msgid "packets too big: %u" msgstr "PříliÅ¡ velkých packetů: %u" #: ../statistics.c:149 #, c-format msgid "received ICMPv6 time exceeded: %u" msgstr "PÅ™ijato ICMPv6 vyprÅ¡ení životnosti: %u" #: ../statistics.c:150 ../statistics.c:165 #, c-format msgid "parameter problem: %u" msgstr "Problém s parametrem: %u" #: ../statistics.c:153 ../statistics.c:168 #, c-format msgid "group member queries: %u" msgstr "Dotazů na Älenství ve skupinÄ›: %u" #: ../statistics.c:154 ../statistics.c:169 #, c-format msgid "group member responses: %u" msgstr "OdpovÄ›dí na Älenství ve skupinÄ›: %u" #: ../statistics.c:155 ../statistics.c:170 #, c-format msgid "group member reductions: %u" msgstr "PoÄet snížení Älenů skupiny: %u" #: ../statistics.c:156 ../statistics.c:171 #, c-format msgid "router solicits: %u" msgstr "PoÄet výzev smÄ›rovaÄi: %u" #: ../statistics.c:157 ../statistics.c:172 #, c-format msgid "router advertisement: %u" msgstr "PoÄet oznámení smÄ›rovaÄe: %u" #: ../statistics.c:158 #, c-format msgid "neighbour solicits: %u" msgstr "PoÄet výzev sousedovi: %u" #: ../statistics.c:159 #, c-format msgid "neighbour advertisement: %u" msgstr "PoÄet oznámení souseda: %u" #: ../statistics.c:164 #, c-format msgid "sent ICMPv6 time exceeded: %u" msgstr "PoÄet odeslaných ICMPv6 vyprÅ¡ení životnosti: %u" #: ../statistics.c:173 #, c-format msgid "neighbor solicits: %u" msgstr "PoÄet výzev sousedovi: %u" #: ../statistics.c:174 #, c-format msgid "neighbor advertisements: %u" msgstr "PoÄet oznámení souseda: %u" #: ../statistics.c:180 #, c-format msgid "RTO algorithm is %s" msgstr "RTO algoritmus je %s" #: ../statistics.c:184 #, c-format msgid "%u active connection openings" msgstr "PoÄet aktivnÄ› navázaných spojení: %u" #: ../statistics.c:185 #, c-format msgid "%u passive connection openings" msgstr "PoÄet pasivnÄ› navázaných spojení: %u" #: ../statistics.c:186 #, c-format msgid "%u failed connection attempts" msgstr "PoÄet neúspěšných pokusů o spojení: %u" #: ../statistics.c:187 #, c-format msgid "%u connection resets received" msgstr "PoÄet pÅ™ijatých resetů spojení: %u" #: ../statistics.c:188 #, c-format msgid "%u connections established" msgstr "PoÄet navázaných spojení: %u" #: ../statistics.c:189 #, c-format msgid "%u segments received" msgstr "PoÄet pÅ™ijatých segmentů: %u" #: ../statistics.c:190 #, c-format msgid "%u segments sent out" msgstr "PoÄet odeslaných segmentů: %u" #: ../statistics.c:191 #, c-format msgid "%u segments retransmitted" msgstr "PoÄet pÅ™enesených segmentů: %u" #: ../statistics.c:192 #, c-format msgid "%u bad segments received" msgstr "PoÄet chybných příchozích segmentů: %u" #: ../statistics.c:193 #, c-format msgid "%u resets sent" msgstr "PoÄet odeslaných resetů: %u" #: ../statistics.c:198 ../statistics.c:206 #, c-format msgid "%u packets received" msgstr "PoÄet pÅ™ijatých paketů: %u" #: ../statistics.c:199 ../statistics.c:207 #, c-format msgid "%u packets to unknown port received" msgstr "PoÄet paketů pÅ™ijatých pro neznámý port: %u" #: ../statistics.c:200 ../statistics.c:208 #, c-format msgid "%u packet receive errors" msgstr "PoÄet chyb pÅ™i příjmu paketů: %u" #: ../statistics.c:201 ../statistics.c:209 #, c-format msgid "%u packets sent" msgstr "PoÄet odeslaných paketů: %u" #: ../statistics.c:214 #, c-format msgid "%u SYN cookies sent" msgstr "PoÄet odeslaných SYN cookies: %u" #: ../statistics.c:215 #, c-format msgid "%u SYN cookies received" msgstr "PoÄet pÅ™ijatých SYN cookies: %u" #: ../statistics.c:216 #, c-format msgid "%u invalid SYN cookies received" msgstr "PoÄet chybných příchozích SYN cookies: %u" #: ../statistics.c:218 #, c-format msgid "%u resets received for embryonic SYN_RECV sockets" msgstr "PoÄet resetů pÅ™ijatých pro sokety v zárodeÄném stavu SYN_PŘÃCH: %u" #: ../statistics.c:220 #, c-format msgid "%u packets pruned from receive queue because of socket buffer overrun" msgstr "" "PoÄet packetů odstranÄ›ných z pÅ™ijímací fronty kvůli pÅ™eteÄení bufferu " "socketu: %u" #. obsolete: 2.2.0 doesn't do that anymore #: ../statistics.c:223 #, c-format msgid "%u packets pruned from receive queue" msgstr "PoÄet packetů odstranÄ›ných z pÅ™ijímací fronty: %u" #: ../statistics.c:224 #, c-format msgid "" "%u packets dropped from out-of-order queue because of socket buffer overrun" msgstr "" "PoÄet packetů zahozených z fronty mimo-poÅ™adí kvůli pÅ™eteÄení bufferu " "socketu: %u" #: ../statistics.c:226 #, c-format msgid "%u ICMP packets dropped because they were out-of-window" msgstr "PoÄet ICMP packetů zahozených, protože byly mimo okno: %u" #: ../statistics.c:228 #, c-format msgid "%u ICMP packets dropped because socket was locked" msgstr "PoÄet ICMP packetů zahozených kvůli zamÄenému socketu: %u" #: ../statistics.c:230 #, c-format msgid "%u TCP sockets finished time wait in fast timer" msgstr "" "PoÄet TCP socketů, které ukonÄily fázi time-wait uvnitÅ™ rychlého ÄasovaÄe: %u" #: ../statistics.c:231 #, c-format msgid "%u time wait sockets recycled by time stamp" msgstr "" "PoÄet socketů ve fázi time-wait, které byly znovu použity díky Äasovému " "razítku: %u" #: ../statistics.c:232 #, c-format msgid "%u TCP sockets finished time wait in slow timer" msgstr "" "PoÄet TCP socketů, které ukonÄily fázi time-wait uvnitÅ™ pomalého ÄasovaÄe: %u" #: ../statistics.c:233 #, c-format msgid "%u passive connections rejected because of time stamp" msgstr "PoÄet odmítnutých pasivních spojení kvůli Äasovému razítku: %u" #: ../statistics.c:235 #, c-format msgid "%u active connections rejected because of time stamp" msgstr "PoÄet odmítnutých aktivních spojení kvůli Äasovému razítku: %u" #: ../statistics.c:237 #, c-format msgid "%u packetes rejected in established connections because of timestamp" msgstr "" "PoÄet odmítnutých packetů uvnitÅ™ navázaného spojení kvůli Äasovému razítku: %" "u" #: ../statistics.c:239 #, c-format msgid "%u delayed acks sent" msgstr "PoÄet odeslaných zpoždÄ›ných potvrzení: %u" #: ../statistics.c:240 #, c-format msgid "%u delayed acks further delayed because of locked socket" msgstr "" "PoÄet zpoždÄ›ných potvrzení dále pozdržených kvůli zamÄenému socketu: %u" #: ../statistics.c:242 #, c-format msgid "Quick ack mode was activated %u times" msgstr "PoÄet aktivovaní rychlého potvrzovacího režimu: %u" #: ../statistics.c:243 #, c-format msgid "%u times the listen queue of a socket overflowed" msgstr "PoÄet pÅ™eteÄení naslouchací fronty socketu: %u" #: ../statistics.c:245 #, c-format msgid "%u SYNs to LISTEN sockets dropped" msgstr "PoÄet zahozených SYN packetů urÄených naslouchajícímu socketu: %u" #: ../statistics.c:246 #, c-format msgid "%u packets directly queued to recvmsg prequeue" msgstr "PoÄet packetů přímo zaÅ™azených do pÅ™edfronty recvmsg: %u" #: ../statistics.c:248 #, c-format msgid "%u bytes directly in process context from backlog" msgstr "PoÄet bajtů pÅ™edaných přímo z backlogu do kontextu procesu: %u" #: ../statistics.c:249 #, c-format msgid "%u bytes directly received in process context from prequeue" msgstr "PoÄet bajtů přímo pÅ™ijatých do kontextu procesu z pÅ™edfronty: %u" #: ../statistics.c:251 #, c-format msgid "%u packets dropped from prequeue" msgstr "PoÄet paketů odstranÄ›ných z pÅ™edfronty: %u" #: ../statistics.c:252 #, c-format msgid "%u packet headers predicted" msgstr "PoÄet pÅ™edpovÄ›zených hlaviÄek packetů: %u" #: ../statistics.c:253 #, c-format msgid "%u packet headers predicted and directly queued to user" msgstr "PoÄet hlaviÄek packetů pÅ™edpovÄ›zených a přímo pÅ™edaných uživateli: %u" #: ../statistics.c:255 #, c-format msgid "Ran %u times out of system memory during packet sending" msgstr "Kolikrát systému doÅ¡la paměť pÅ™i odesílání packetu: %u" #: ../statistics.c:257 #, c-format msgid "%u acknowledgments not containing data payload received" msgstr "PoÄet pÅ™ijatých potvrzení neobsahující data: %u" #: ../statistics.c:258 #, c-format msgid "%u predicted acknowledgments" msgstr "PoÄet pÅ™edpovÄ›zených potvrzení: %u" #: ../statistics.c:259 #, c-format msgid "%u times recovered from packet loss due to fast retransmit" msgstr "PoÄet zotavení ze ztráty packetu kvůli rychle opakovanému odeslání: %u" #: ../statistics.c:260 #, c-format msgid "%u times recovered from packet loss by selective acknowledgements" msgstr "PoÄet zotavení ze ztráty packetu pomocí vybÄ›rových potvrzení: %u" #: ../statistics.c:261 #, c-format msgid "%u bad SACK blocks received" msgstr "PoÄet pÅ™ijatých chybných SACK bloků: %u" #: ../statistics.c:262 #, c-format msgid "Detected reordering %u times using FACK" msgstr "Kolikrát byla nalezena zmÄ›na poÅ™adí pomocí FACK: %u" #: ../statistics.c:263 #, c-format msgid "Detected reordering %u times using SACK" msgstr "Kolikrát byla nalezena zmÄ›na poÅ™adí pomocí SACK: %u" #: ../statistics.c:264 #, c-format msgid "Detected reordering %u times using time stamp" msgstr "Kolikrát byla nalezena zmÄ›na poÅ™adí pomocí Äasového razítka: %u" #: ../statistics.c:265 #, c-format msgid "Detected reordering %u times using reno fast retransmit" msgstr "" "Kolikrát byla nalezena zmÄ›na poÅ™adí kvůli rychlému znovuodeslání Reno: %u" #: ../statistics.c:266 #, c-format msgid "%u congestion windows fully recovered without slow start" msgstr "PoÄet plných zotavení ze zahlcení okna bez pomalého startu: %u" #: ../statistics.c:267 #, c-format msgid "%u congestion windows partially recovered using Hoe heuristic" msgstr "PoÄet ÄásteÄných zotavení ze zahlcení okna pomocí heuristiky Hoe: %u" #: ../statistics.c:268 #, c-format msgid "%u congestion window recovered without slow start using DSACK" msgstr "PoÄet zotavení ze zahlceného okna bez pomalého startu pomocí DSACK: %u" #: ../statistics.c:269 #, c-format msgid "%u congestion windows recovered without slow start after partial ack" msgstr "" "PoÄet zotavení ze zahlcení okna bez pomalého startu po ÄásteÄném potvrzení: %" "u" #: ../statistics.c:270 #, c-format msgid "%u retransmits lost" msgstr "PoÄet ztracených opakovaných odeslání: %u" #: ../statistics.c:271 #, c-format msgid "%u timeouts after reno fast retransmit" msgstr "PoÄet vyprÅ¡ení Äasu po rychlém opakovaném odeslání Reno: %u" #: ../statistics.c:272 #, c-format msgid "%u timeouts after SACK recovery" msgstr "PoÄet vyprÅ¡ení Äasu po zotavení pomocí SACK: %u" #: ../statistics.c:273 #, c-format msgid "%u timeouts in loss state" msgstr "PoÄet vyprÅ¡ení Äasu ve stavu ztráty: %u" #: ../statistics.c:274 #, c-format msgid "%u fast retransmits" msgstr "PoÄet rychlých opakování odeslání: %u" #: ../statistics.c:275 #, c-format msgid "%u forward retransmits" msgstr "PoÄet dopÅ™edných opakovaných odeslání: %u" #: ../statistics.c:276 #, c-format msgid "%u retransmits in slow start" msgstr "PoÄet opakovaných odeslání v pomalém startu: %u" #: ../statistics.c:277 #, c-format msgid "%u other TCP timeouts" msgstr "PoÄet jiných vyprÅ¡ení ÄasovaÄe TCP: %u" #: ../statistics.c:278 #, c-format msgid "%u reno fast retransmits failed" msgstr "PoÄet selhání rychlých opakovaných odeslání Reno: %u" #: ../statistics.c:279 #, c-format msgid "%u SACK retransmits failed" msgstr "PoÄet selhání opakovaných odeslání SACK: %u" #: ../statistics.c:280 #, c-format msgid "%u times receiver scheduled too late for direct processing" msgstr "Kolikrát byl pÅ™ijímaÄ naplánován příliÅ¡ pozdÄ› na přímé zpracovaní: %u" #: ../statistics.c:281 #, c-format msgid "%u packets collapsed in receive queue due to low socket buffer" msgstr "" "PoÄet packetů slouÄených v pÅ™ijímací frontÄ› kvůli malému bufferu socketu: %u" #: ../statistics.c:282 #, c-format msgid "%u DSACKs sent for old packets" msgstr "PoÄet packetů DSACK odeslaných kvůli starým packetům: %u" #: ../statistics.c:283 #, c-format msgid "%u DSACKs sent for out of order packets" msgstr "PoÄet packetů DSCACK odeslaných kvůli packetům mimo poÅ™adí: %u" #: ../statistics.c:284 #, c-format msgid "%u DSACKs received" msgstr "PoÄet pÅ™ijatých paketů DSACK: %u" #: ../statistics.c:285 #, c-format msgid "%u DSACKs for out of order packets received" msgstr "PoÄet packetů DSACK pÅ™ijatých kvůli packetům mimo poÅ™adí: %u" #: ../statistics.c:286 #, c-format msgid "%u connections reset due to unexpected SYN" msgstr "PoÄet resetů spojení kvůli neoÄekávanému SYN: %u" #: ../statistics.c:287 #, c-format msgid "%u connections reset due to unexpected data" msgstr "PoÄet resetů spojení kvůli neoÄekávaným datům: %u" #: ../statistics.c:288 #, c-format msgid "%u connections reset due to early user close" msgstr "PoÄet resetů spojení kvůli Äasnému uzavÅ™ení uživatelem: %u" #: ../statistics.c:289 #, c-format msgid "%u connections aborted due to memory pressure" msgstr "PoÄet zruÅ¡ených spojení kvůli paměťové tísni: %u" #: ../statistics.c:290 #, c-format msgid "%u connections aborted due to timeout" msgstr "PoÄet zruÅ¡ených spojení kvůli vyprÅ¡ení ÄasovaÄe: %u" #: ../statistics.c:291 #, c-format msgid "%u connections aborted after user close in linger timeout" msgstr "" "PoÄet zruÅ¡ených spojení po té, co je uživatel uzavÅ™el ve fázi dožití: %u" #: ../statistics.c:292 #, c-format msgid "%u times unabled to send RST due to no memory" msgstr "Kolikrát nebylo možné odeslat RST kvůli nedostatku pamÄ›ti: %u" #: ../statistics.c:293 #, c-format msgid "TCP ran low on memory %u times" msgstr "Kolikrát TCP zpomalilo kvůli pamÄ›ti: %u" #: ../statistics.c:294 #, c-format msgid "%u TCP data loss events" msgstr "PoÄet ztrát dat TCP: %u" #: ../statistics.c:295 #, c-format msgid "%u congestion windows recovered without slow start by DSACK" msgstr "PoÄet zotavení ze zahlcení okna bez pomalého startu pomocí DSACK: %u" #: ../statistics.c:297 #, c-format msgid "%u classic Reno fast retransmits failed" msgstr "PoÄet selhání klasického rychlého opakovaného odeslání Reno: %u" #: ../statistics.c:373 msgid "enabled" msgstr "zapnuto" #: ../statistics.c:373 msgid "disabled" msgstr "vypnuto" #: ../statistics.c:511 ../statistics.c:555 msgid "cannot open /proc/net/snmp" msgstr "/proc/net/snmp nelze otevřít" #: ../statistics.c:516 #, c-format msgid "Problem while parsing /proc/net/snmp\n" msgstr "Potíže pÅ™i pÅ™i zpracování /proc/net/snmp\n" #: ../statistics.c:527 #, c-format msgid "Problem while parsing /proc/net/netstat\n" msgstr "Potíže pÅ™i pÅ™i zpracování /proc/net/netstat\n" #: ../statistics.c:545 msgid "cannot open /proc/net/snmp6" msgstr "/proc/net/snmp6 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:157 ../lib/hw.c:166 msgid "UNSPEC" msgstr "NEZNÃM" #: ../lib/af.c:159 msgid "UNIX Domain" msgstr "Doména UNIX" #: ../lib/af.c:162 msgid "DARPA Internet" msgstr "DARPA Internet" #: ../lib/af.c:165 msgid "IPv6" msgstr "IPv6" #: ../lib/af.c:168 ../lib/hw.c:187 msgid "AMPR AX.25" msgstr "AMPR AX.25" #: ../lib/af.c:171 ../lib/hw.c:193 msgid "AMPR NET/ROM" msgstr "AMPR NET/ROM" #: ../lib/af.c:174 msgid "Novell IPX" msgstr "Novell IPX" #: ../lib/af.c:177 msgid "Appletalk DDP" msgstr "Appletalk DDP" #: ../lib/af.c:180 ../lib/hw.c:228 msgid "Econet" msgstr "Econet" #: ../lib/af.c:183 msgid "CCITT X.25" msgstr "CCITT X.25" #: ../lib/af.c:186 ../lib/hw.c:190 msgid "AMPR ROSE" msgstr "AMPR ROSE" #: ../lib/af.c:189 ../lib/hw.c:178 msgid "Ash" msgstr "Ash" #: ../lib/af.c:247 #, c-format 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:308 #, c-format msgid "Too much address family arguments.\n" msgstr "Bylo zadáno příliÅ¡ mnoho tříd adres.\n" #: ../lib/af.c:319 #, c-format msgid "Unknown address family `%s'.\n" msgstr "Třída adres `%s' není známa.\n" #: ../lib/arcnet.c:70 ../lib/arcnet.c:85 #, c-format msgid "in_arcnet(%s): invalid arcnet address!\n" msgstr "in_arcnet(%s): chybná arcnet adresa!\n" #: ../lib/arcnet.c:97 #, c-format msgid "in_arcnet(%s): trailing : ignored!\n" msgstr "in_arcnet(%s): nadbyteÄné : ignorováno!\n" #: ../lib/arcnet.c:109 #, c-format msgid "in_arcnet(%s): trailing junk!\n" msgstr "in_arcnet(%s): nadbyteÄné znaky!\n" #: ../lib/ash.c:81 #, c-format msgid "Malformed Ash address" msgstr "Chybná Ash adresa" #: ../lib/ax25.c:75 ../lib/ddp.c:50 ../lib/econet.c:52 ../lib/inet.c:244 #: ../lib/inet.c:259 ../lib/inet6.c:145 ../lib/ipx.c:81 ../lib/netrom.c:78 #: ../lib/rose.c:71 ../lib/unix.c:56 ../lib/unix.c:76 msgid "[NONE SET]" msgstr "[NENASTAVENO]" #: ../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 #, c-format 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 #, c-format 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 #, c-format msgid "Destination Iface Use\n" msgstr "Adresát Rozhraní Užití\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:84 ../lib/fddi.c:99 #, c-format msgid "in_fddi(%s): invalid fddi address!\n" msgstr "in_fddi(%s): chybná fddi adresa!\n" #: ../lib/fddi.c:111 #, c-format msgid "in_fddi(%s): trailing : ignored!\n" msgstr "in_fddi(%s): nadbyteÄné : ignorováno!\n" #: ../lib/fddi.c:123 #, c-format msgid "in_fddi(%s): trailing junk!\n" msgstr "in_fddi(%s): nadbyteÄné znaky!\n" #: ../lib/getroute.c:101 ../lib/setroute.c:80 #, c-format msgid "Address family `%s' not supported.\n" msgstr "Třída adres `%s' není podporována.\n" #: ../lib/getroute.c:107 ../lib/setroute.c:84 #, 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:84 ../lib/hippi.c:99 #, c-format msgid "in_hippi(%s): invalid hippi address!\n" msgstr "in_hippi(%s): chybná hippi adresa!\n" #: ../lib/hippi.c:111 #, c-format msgid "in_hippi(%s): trailing : ignored!\n" msgstr "in_hippi(%s): nadbyteÄné : ignorováno!\n" #: ../lib/hippi.c:122 #, c-format msgid "in_hippi(%s): trailing junk!\n" msgstr "in_hippi(%s): nadbyteÄné znaky!\n" #: ../lib/hw.c:165 msgid "Local Loopback" msgstr "Místní smyÄka" #: ../lib/hw.c:168 msgid "Serial Line IP" msgstr "IP po sériové lince" #: ../lib/hw.c:169 msgid "VJ Serial Line IP" msgstr "VJ IP po sériové lince" #: ../lib/hw.c:170 msgid "6-bit Serial Line IP" msgstr "6bitový IP po sériové lince" #: ../lib/hw.c:171 msgid "VJ 6-bit Serial Line IP" msgstr "6bitový VJ IP po sériové lince" #: ../lib/hw.c:172 msgid "Adaptive Serial Line IP" msgstr "Adaptivní IP po sériové lince" #: ../lib/hw.c:175 msgid "Ethernet" msgstr "Ethernet" #: ../lib/hw.c:181 msgid "Fiber Distributed Data Interface" msgstr "Fiber Distributed Data Interface" #: ../lib/hw.c:184 msgid "HIPPI" msgstr "HIPPI" #: ../lib/hw.c:196 msgid "generic X.25" msgstr "obecné X.25" #: ../lib/hw.c:199 msgid "IPIP Tunnel" msgstr "IPIP Tunnel" #: ../lib/hw.c:202 msgid "Point-to-Point Protocol" msgstr "Dvoubodový protokol" #: ../lib/hw.c:205 msgid "(Cisco)-HDLC" msgstr "(Cisco)-HDLC" #: ../lib/hw.c:206 msgid "LAPB" msgstr "LAPB" #: ../lib/hw.c:209 msgid "ARCnet" msgstr "ARCnet" #: ../lib/hw.c:212 msgid "Frame Relay DLCI" msgstr "Frame Relay DLCI" #: ../lib/hw.c:213 msgid "Frame Relay Access Device" msgstr "Přístupové zařízení Frame Relay" #: ../lib/hw.c:216 msgid "IPv6-in-IPv4" msgstr "IPv6-in-IPv4" #: ../lib/hw.c:219 msgid "IrLAP" msgstr "IrLAP" #: ../lib/hw.c:222 msgid "16/4 Mbps Token Ring" msgstr "Token Ring 16/4 Mb/s" #: ../lib/hw.c:224 msgid "16/4 Mbps Token Ring (New)" msgstr "Token Ring 16/4 Mb/s (Nový)" #: ../lib/hw.c:231 msgid "InfiniBand" msgstr "InfiniBand" #: ../lib/hw.c:234 msgid "Generic EUI-64" msgstr "Obecné EUI-64" #: ../lib/inet.c:153 ../lib/inet6.c:94 #, c-format msgid "rresolve: unsupport address family %d !\n" msgstr "rresolve: třída adres %d není podporována!\n" #: ../lib/inet6.c:147 msgid "[UNKNOWN]" msgstr "[NEZNÃMÃ]" #: ../lib/inet6_gr.c:71 #, c-format msgid "INET6 (IPv6) not configured in this system.\n" msgstr "INET6 (IPv6) není na tomto systému nakonfigurováno.\n" #: ../lib/inet6_gr.c:76 #, c-format msgid "Kernel IPv6 routing cache\n" msgstr "SmÄ›rovací cache v jádru pro IPv6\n" #: ../lib/inet6_gr.c:78 #, c-format msgid "Kernel IPv6 routing table\n" msgstr "SmÄ›rovací tabulka v jádru pro IPv6\n" #: ../lib/inet6_gr.c:80 #, c-format msgid "" "Destination Next Hop Flag Met Ref Use " "If\n" msgstr "" "Adresát Další smÄ›rovaÄ Příz Met Odk Užt " "Rozhr\n" #: ../lib/inet6_gr.c:174 #, c-format msgid "Kernel IPv6 Neighbour Cache\n" msgstr "Cache sousedů v jádru pro IPv6\n" #: ../lib/inet6_gr.c:177 #, c-format msgid "" "Neighbour HW Address Iface Flags " "Ref State\n" msgstr "" "Soused HW Adresa Rozhraní Přízn " "Odkazy Stav\n" #: ../lib/inet6_gr.c:181 #, c-format 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 #, c-format msgid "Usage: inet6_route [-vF] del Target\n" msgstr "Použití: inet6_route [-vF] del Cíl\n" #: ../lib/inet6_sr.c:47 #, c-format 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 #, c-format msgid " inet6_route [-FC] flush NOT supported\n" msgstr " inet6_route [-FC] flush NENà podporováno\n" #: ../lib/inet6_sr.c:188 #, c-format 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 #, c-format 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 #, c-format msgid "Kernel IP routing table\n" msgstr "SmÄ›rovací tabulka v jádru pro IP\n" #: ../lib/inet_gr.c:56 #, c-format 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 #, c-format 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 #, c-format 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 #, c-format msgid "Kernel IP routing cache\n" msgstr "SmÄ›rovací cache v jádru pro IP\n" #: ../lib/inet_gr.c:258 #, c-format 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 #, c-format 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 #, c-format 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 #, c-format 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:51 #, c-format 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:52 #, c-format 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:53 #, c-format msgid "" " [netmask N] [mss Mss] [window W] [irtt I]\n" msgstr "" " [netmask N] [mss Mss] [window W] [irtt I]\n" #: ../lib/inet_sr.c:54 #, c-format msgid " [mod] [dyn] [reinstate] [[dev] If]\n" msgstr " [mod] [dyn] [reinstate] [[dev] If]\n" #: ../lib/inet_sr.c:55 #, c-format 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:56 #, c-format 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 #, c-format msgid "route: Invalid MSS/MTU.\n" msgstr "route: Neplatné MSS/MTU.\n" #: ../lib/inet_sr.c:187 #, c-format msgid "route: Invalid window.\n" msgstr "route: Nesprávné okno.\n" #: ../lib/inet_sr.c:203 #, c-format 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 #, c-format msgid "route: netmask doesn't match route address\n" msgstr "route: síťová maska nevyhovuje adrese cesty\n" #: ../lib/inet_sr.c:306 #, c-format msgid "Flushing `inet' routing table not supported\n" msgstr "SmÄ›rovací cache `inet' nelze vyprazdňovat\n" #: ../lib/inet_sr.c:310 #, c-format msgid "Modifying `inet' routing cache not supported\n" msgstr "SmÄ›rovací cache `inet' nelze mÄ›nit\n" #: ../lib/ipx_gr.c:53 #, c-format msgid "IPX routing not in file %s or %s found.\n" msgstr "SmÄ›rování IPX nenalezeno v souboru %s nebo %s.\n" #: ../lib/ipx_gr.c:62 #, c-format msgid "Kernel IPX routing table\n" msgstr "SmÄ›rovací tabulka v jádru pro IPX\n" #. xxx #: ../lib/ipx_gr.c:63 #, c-format msgid "Destination Router Net Router Node\n" msgstr "Cíl SmÄ›rovaÄ Síť SmÄ›rovaÄ Uzel\n" #: ../lib/ipx_sr.c:33 #, c-format msgid "IPX: this needs to be written\n" msgstr "IPX: toto je tÅ™eba uložit\n" #: ../lib/masq_info.c:198 #, c-format msgid "IP masquerading entries\n" msgstr "IP maskovací položky\n" #: ../lib/masq_info.c:201 #, c-format msgid "prot expire source destination ports\n" msgstr "prot život zdroj cíl porty\n" #: ../lib/masq_info.c:204 #, c-format 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 #, c-format 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 #, c-format msgid "Kernel NET/ROM routing table\n" msgstr "SmÄ›rovací tabulka v jádru pro NET/ROM\n" #: ../lib/netrom_gr.c:52 #, c-format msgid "Destination Mnemonic Quality Neighbour Iface\n" msgstr "Cíl Mnemonika Kvalita Soused Rozhraní\n" #: ../lib/netrom_sr.c:34 #, c-format msgid "netrom usage\n" msgstr "použití netrom\n" #: ../lib/netrom_sr.c:44 #, c-format msgid "NET/ROM: this needs to be written\n" msgstr "NET/ROM: toto je potÅ™eba uložit\n" #: ../lib/ppp.c:44 #, c-format msgid "You cannot start PPP with this program.\n" msgstr "Tímto programem nelze PPP spustit.\n" #: ../lib/ppp_ac.c:38 #, c-format 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 #, c-format msgid "ROSE not configured in this system.\n" msgstr "ROSE není na tomto systému nakonfigurováno.\n" #: ../lib/rose_gr.c:54 #, c-format msgid "Kernel ROSE routing table\n" msgstr "SmÄ›rovací tabulka v jádru pro ROSE\n" #: ../lib/tr.c:86 ../lib/tr.c:101 #, c-format msgid "in_tr(%s): invalid token ring address!\n" msgstr "in_tr(%s): nesprávná token ring adresa!\n" #: ../lib/tr.c:113 #, c-format msgid "in_tr(%s): trailing : ignored!\n" msgstr "in_tr(%s): nadbyteÄné: ignorováno!\n" #: ../lib/tr.c:125 #, c-format msgid "in_tr(%s): trailing junk!\n" msgstr "in_tr(%s): nadbyteÄné znaky!\n" #: ../lib/interface.c:176 #, c-format msgid "warning: no inet socket available: %s\n" msgstr "varování: není dostupný žádný inet soket: %s\n" #: ../lib/interface.c:325 #, c-format msgid "Warning: cannot open %s (%s). Limited output.\n" msgstr "Pozor: %s nelze otevřít (%s). Výstup omezen.\n" #. Give better error message for this case. #: ../lib/interface.c:571 msgid "Device not found" msgstr "Zařízení nebylo nalezeno" #: ../lib/interface.c:575 #, 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/interface.c:608 msgid " - no statistics available -" msgstr " - statistická data nejsou dostupná -" #: ../lib/interface.c:612 #, c-format msgid "[NO FLAGS]" msgstr "[ŽÃDNÉ PŘÃZNAKY]" #: ../lib/interface.c:694 msgid "UP," msgstr "AKTIVOVÃNO," #: ../lib/interface.c:696 msgid "BROADCAST," msgstr "VÅ ESMÄšR," #: ../lib/interface.c:698 msgid "DEBUG," msgstr "LADÄšNÃ," #: ../lib/interface.c:700 msgid "LOOPBACK," msgstr "SMYÄŒKA," #: ../lib/interface.c:702 msgid "POINTOPOINT," msgstr "DVOUBODOVÉ," # ?? #: ../lib/interface.c:704 msgid "NOTRAILERS," msgstr "ŽÃDNÉ_TRAILERS" #: ../lib/interface.c:706 msgid "RUNNING," msgstr "BĚŽÃ," #: ../lib/interface.c:708 msgid "NOARP," msgstr "NEARP," #: ../lib/interface.c:710 msgid "PROMISC," msgstr "PROMISK," #: ../lib/interface.c:712 msgid "ALLMULTI," msgstr "ALLMULTI," #: ../lib/interface.c:714 msgid "SLAVE," msgstr "PODŘÃZENÃ," #: ../lib/interface.c:716 msgid "MASTER," msgstr "NADŘÃZENÃ," #: ../lib/interface.c:718 msgid "MULTICAST," msgstr "MULTICAST," #: ../lib/interface.c:721 msgid "DYNAMIC," msgstr "DYNAMIC," #: ../lib/interface.c:730 #, c-format msgid "%s: %s mtu %d metric %d" msgstr "%s: %s mtu %d metrika %d" #: ../lib/interface.c:734 #, c-format msgid " outfill %d keepalive %d" msgstr " outfill %d keepalive %d" #: ../lib/interface.c:743 ../lib/interface.c:841 #, c-format msgid " %s %s" msgstr " %s %s" #: ../lib/interface.c:745 #, c-format msgid " netmask %s" msgstr " síťová_maska %s" #: ../lib/interface.c:747 #, c-format msgid " broadcast %s" msgstr " vÅ¡esmÄ›r %s" #: ../lib/interface.c:750 #, c-format msgid " destination %s" msgstr " cíl %s" #: ../lib/interface.c:769 #, c-format msgid " %s %s prefixlen %d" msgstr " %s %s délka_prefixu %d" #: ../lib/interface.c:773 #, c-format msgid " scopeid 0x%x" msgstr " scopeid 0x%x" #: ../lib/interface.c:777 msgid "compat," msgstr "kompat," #: ../lib/interface.c:781 msgid "global," msgstr "globální," #: ../lib/interface.c:783 msgid "link," msgstr "linka," #: ../lib/interface.c:785 msgid "site," msgstr "oblast," #: ../lib/interface.c:787 msgid "host," msgstr "stroj," #: ../lib/interface.c:805 #, c-format msgid " %s Ethernet-II %s\n" msgstr " %s Ethernet-II %s\n" #: ../lib/interface.c:808 #, c-format msgid " %s Ethernet-SNAP %s\n" msgstr " %s Ethernet-SNAP %s\n" #: ../lib/interface.c:811 #, c-format msgid " %s Ethernet802.2 %s\n" msgstr " %s Ethernet802.2 %s\n" #: ../lib/interface.c:814 #, c-format msgid " %s Ethernet802.3 %s\n" msgstr " %s Ethernet802.3 %s\n" #: ../lib/interface.c:824 ../lib/interface.c:833 #, c-format msgid " %s %s\n" msgstr " %s %s\n" #: ../lib/interface.c:843 #, c-format msgid " %s" msgstr " %s" #: ../lib/interface.c:845 #, c-format msgid " txqueuelen %d" msgstr " délka_odchozí_fronty %d" #: ../lib/interface.c:850 #, c-format msgid " media %s" msgstr " médium %s" #: ../lib/interface.c:852 #, c-format msgid "autoselect" msgstr "automatika" #: ../lib/interface.c:903 #, c-format msgid "RX packets %llu bytes %llu (%lu.%lu %s)\n" msgstr "RX packetů %llu bajtů %llu (%lu,%lu %s)\n" #: ../lib/interface.c:909 #, c-format msgid "RX compressed:%lu\n" msgstr "RX komprimováno %lu\n" #: ../lib/interface.c:912 #, c-format msgid "RX errors %lu dropped %lu overruns %lu frame %lu\n" msgstr "RX chyb %lu zahozeno %lu pÅ™eteÄení %lu rámců %lu\n" #: ../lib/interface.c:918 #, c-format msgid "TX packets %llu bytes %llu (%lu.%lu %s)\n" msgstr "TX packetů %llu bajtů %llu (%lu,%lu %s)\n" #: ../lib/interface.c:924 #, c-format msgid "TX compressed %lu\n" msgstr "TX komprimováno %lu\n" # carrier? #: ../lib/interface.c:927 #, c-format msgid "TX errors %lu dropped %lu overruns %lu carrier %lu collisions %lu\n" msgstr "TX chyb %lu zahozeno %lu pÅ™eteÄení %lu pÅ™enos %lu kolizí %lu\n" #: ../lib/interface.c:937 #, c-format msgid "interrupt %d " msgstr "pÅ™eruÅ¡ení %d " #. Only print devices using it for #. I/O maps #: ../lib/interface.c:940 #, c-format msgid "base 0x%x " msgstr "základ 0x%x " #: ../lib/interface.c:942 #, c-format msgid "memory 0x%lx-%lx " msgstr "paměť 0x%lx–%lx " #: ../lib/interface.c:945 #, c-format msgid " dma 0x%x" msgstr " DMA 0x%x" #: ../lib/sockets.c:63 #, c-format 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:61 #, c-format msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n" msgstr " Usage: ipmaddr [ add | del ] MULTIADR dev ŘETÄšZEC\n" #: ../ipmaddr.c:62 #, c-format msgid " ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n" msgstr " ipmaddr show [ dev ŘETÄšZEC ] [ ipv4 | ipv6 | link | all ]\n" #: ../ipmaddr.c:63 #, c-format msgid " ipmaddr -V | -version\n" msgstr " ipmaddr -V | -version\n" #: ../ipmaddr.c:263 #, c-format msgid "family %d " msgstr "třída %d " #: ../ipmaddr.c:272 #, c-format msgid " users %d" msgstr " uživatelé %d" #: ../ipmaddr.c:361 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 #, c-format 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:432 #, c-format msgid "slattach: tty_hangup(DROP): %s\n" msgstr "slattach: tty_hangup(DROP): %s\n" #: ../slattach.c:439 #, c-format msgid "slattach: tty_hangup(RAISE): %s\n" msgstr "slattach: tty_hangup(RAISE): %s\n" #: ../slattach.c:470 #, c-format msgid "slattach: tty name too long\n" msgstr "slattach: název TTY je příliÅ¡ dlouhý\n" #: ../slattach.c:500 #, c-format msgid "slattach: tty_open: cannot get current state!\n" msgstr "slattach: tty_open: aktuální stav nelze zjistit!\n" #: ../slattach.c:507 #, c-format msgid "slattach: tty_open: cannot get current line disc!\n" msgstr "slattach: tty_open: aktuální linkovou disciplínu nelze zjistit!\n" #: ../slattach.c:515 #, c-format msgid "slattach: tty_open: cannot set RAW mode!\n" msgstr "slattach: tty_open: režim RAW nelze nastavit!\n" #: ../slattach.c:522 #, c-format msgid "slattach: tty_open: cannot set %s bps!\n" msgstr "slattach: tty_open: %s bps nelze nastavit!\n" #: ../slattach.c:532 #, c-format msgid "slattach: tty_open: cannot set 8N1 mode!\n" msgstr "slattach: tty_open: režim 8N1 nelze nastavit!\n" #: ../slattach.c:674 #, c-format msgid "slattach: setvbuf(stdout,0,_IOLBF,0) : %s\n" msgstr "slattach: setvbuf(stdout, 0, _IOLBF, 0): %s\n" #: ../slattach.c:706 #, c-format msgid "%s started" msgstr "protokol %s spuÅ¡tÄ›n" #: ../slattach.c:707 #, c-format msgid " on %s" msgstr " na %s" #: ../slattach.c:708 #, c-format msgid " interface %s\n" msgstr " rozhraní %s\n" #~ msgid "" #~ " arp [-v] [] [-i ] -s [netmask ] pub " #~ "<-''-\n" #~ msgstr "" #~ " arp [-v] [] [-i ] -s [síťmask <Äís>] <-''-\n" #~ msgid "%-9.9s Link encap:%s " #~ msgstr "%-9.9s ZapouzdÅ™ení:%s " #~ msgid "HWaddr %s " #~ msgstr "HWadr %s " #~ msgid "Media:%s" #~ msgstr "Médium:%s" #~ msgid "(auto)" #~ msgstr "(auto)" #~ 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 :) #~ msgid " Bcast:%s " #~ msgstr " VÅ¡esmÄ›r:%s " #~ msgid " Mask:%s\n" #~ msgstr "Maska:%s\n" #~ msgid " Scope:" #~ msgstr " Rozsah:" #~ msgid "Unknown" #~ msgstr "Neznám." #~ msgid " EtherTalk Phase 2 addr:%s\n" #~ msgstr " EtherTalk Phase 2 adr:%s\n" #~ msgid " econet addr:%s\n" #~ msgstr " econet adr:%s\n" # Hic sunt leones ... #~ msgid "[NO FLAGS] " #~ msgstr "[ŽÃDNÉ PŘÃZNAKY]" #~ msgid " MTU:%d Metric:%d" #~ msgstr " MTU:%d Metrika:%d" #~ msgid " compressed:%lu\n" #~ msgstr " komprimováno:%lu\n" #~ msgid " collisions:%lu " #~ msgstr " kolizí:%lu " #~ msgid "DMA chan:%x " #~ msgstr "Kanál DMA:%x " #~ msgid "%s: unknown interface: %s\n" #~ msgstr "%s: rozhraní %s není známo\n" #~ msgid "address mask replies" #~ msgstr "odpovÄ›di na žádost o masku podsítÄ›" #~ msgid "unknown title %s\n" #~ msgstr "titulek %s je neznámý\n" #~ msgid "Routing table for `ddp' not yet supported.\n" #~ msgstr "SmÄ›rovací tabulka pro `ddp' není zatím podporována.\n" #~ msgid "IPX not configured in this system.\n" #~ msgstr "IPX není na tomto systému nakonfigurováno.\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" net-tools-1.60+git20180626.aebd88e/po/de.po000066400000000000000000001711201331436560500175710ustar00rootroot00000000000000# $Id: de.po,v 1.11 2003/10/25 21:15:09 ecki Exp $ # German translation for net-tools 1.51 # Copyright (C) 1999 Ralf Bächle 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 \n" "Language-Team:\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-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 HWtype HWaddress Flags Mask " "Iface\n" msgstr "" "Adresse HW-Typ HW-Adresse Flags Maske " "Iface\n" #: ../arp.c:467 msgid "(incomplete)" msgstr "(unvollständig)" #: ../arp.c:484 #, c-format msgid "%s (%s) at " msgstr "%s (%s) auf " #: ../arp.c:490 msgid " " msgstr " " #: ../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] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" "Benutzung:\n" " arp [-vn] [] [-i ] [-a] []\n" #: ../arp.c:614 msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr " arp [-v] [-i ] -d [pub][nopub]\n" #: ../arp.c:615 msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr " arp [-vnD] [] [-i ] -f <- Eintrag aus Datei hinzufügen\n" #: ../arp.c:616 msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" " arp [-v] [] [-i ] -s [temp][nopub]\n" #: ../arp.c:617 msgid "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" msgstr "" " arp [-v] [] [-i ] -s [netmask ] pub\n" #: ../arp.c:618 msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr " arp [-v] [] [-i ] -Ds [netmask ] 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 from given device\n" msgstr " -D, --use-device 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 " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr " ='-H ' 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] [[]
]\n" msgstr "" "Syntax:\n" " ifconfig [-a] [-i] [-v] [[] ]\n" #: ../ifconfig.c:425 msgid " [add
[/]]\n" msgstr " [add [/]]\n" #: ../ifconfig.c:427 msgid " [del
[/]]\n" msgstr " [del [/]]\n" #: ../ifconfig.c:432 msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr " [[-]broadcast []] [[-]pointopoint []]\n" #: ../ifconfig.c:433 msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr " [netmask ] [dstaddr ] [tunnel ]\n" #: ../ifconfig.c:436 msgid " [outfill ] [keepalive ]\n" msgstr " [outfill ] [keepalive ]\n" #: ../ifconfig.c:438 msgid " [hw
] [metric ] [mtu ]\n" msgstr " [hw ] [metric ] [mtu ]\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 ] [io_addr ] [irq ] [media ]\n" msgstr " [mem_start ] [io_addr ] [irq ] [media ]\n" #: ../ifconfig.c:443 msgid " [txqueuelen ]\n" msgstr " [txqueuelen ]\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 " =Hardware Type.\n" msgstr " =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 " =Address family. Default: %s\n" msgstr " =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] [] -r netstat " "{-V|--version|-h|--help}\n" msgstr "" "Benutzung: netstat [-veenNcCF] [] -r\n" " netstat {-V|--version|-h|--help}\n" #: ../netstat.c:1426 msgid " netstat [-vnNcaeol] [ ...]\n" msgstr " netstat [-vnNcaeol] [ ...]\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 "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" msgstr "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" #: ../netstat.c:1449 ../route.c:92 #, c-format msgid " =Use '-A ' or '--' Default: %s\n" msgstr " =,,-A '' or ,,--'' 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 delete entry from cache.\n" msgstr "" " rarp -d Eintrag aus dem Cache löschen.\n" #: ../rarp.c:177 msgid " rarp [] -s add entry to cache.\n" msgstr "" " rarp [] -s 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] [] List kernel routing tables\n" msgstr "" "Benutzung: route [-nNvee] [-FC] [] 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} [] Detailed usage syntax for " "specified AF.\n" msgstr "" " route {-h|--help} [] 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 reassemblies 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: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 connection 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 sent out" msgstr "%d Segmente abgeschickt" #: ../statistics.c:127 #, c-format msgid "%d segments retransmitted" 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" net-tools-1.60+git20180626.aebd88e/po/et_EE.po000066400000000000000000002027261331436560500201710ustar00rootroot00000000000000# Estonian translations for net-tools # Copyright (C) 1999-2001 Free Software Foundation, Inc. # Meelis Roos , 1999-2001. # msgid "" msgstr "" "Project-Id-Version: net-tools 1.60\n" "POT-Creation-Date: 2001-04-16 20:24+0200\n" "PO-Revision-Date: 2001-04-16 20:30+0200\n" "Last-Translator: Meelis Roos \n" "Language-Team: Estonian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-15\n" "Content-Transfer-Encoding: 8bit\n" #: ../arp.c:111 ../arp.c:270 msgid "arp: need host name\n" msgstr "arp: puudub hosti nimi\n" #: ../arp.c:208 ../arp.c:222 #, c-format msgid "No ARP entry for %s\n" msgstr "%s jaoks pole ARP kirjet\n" #: ../arp.c:240 #, c-format msgid "arp: cant get HW-Address for `%s': %s.\n" msgstr "arp: ei saa riistvaralist aadressi `%s' jaoks: %s\n" #: ../arp.c:244 msgid "arp: protocol type mismatch.\n" msgstr "arp: vale protokolli tüüp\n" #: ../arp.c:253 #, c-format msgid "arp: device `%s' has HW address %s `%s'.\n" msgstr "arp: seadmel `%s' on riistvaraline aadress %s `%s'\n" #: ../arp.c:283 msgid "arp: need hardware address\n" msgstr "arp: puudub riistvaraline aadress\n" #: ../arp.c:291 msgid "arp: invalid hardware address\n" msgstr "arp: vigane riistvaraline aadress\n" #: ../arp.c:388 #, c-format msgid "arp: cannot open etherfile %s !\n" msgstr "arp: ei saa avada faili %s\n" #: ../arp.c:404 #, c-format msgid "arp: format error on line %u of etherfile %s !\n" msgstr "arp: formaadiviga real %u failis %s\n" #: ../arp.c:417 #, 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:438 msgid "" "Address HWtype HWaddress Flags Mask " "Iface\n" msgstr "" "Aadress HWtüüp HWaadress Lipud Mask " "Liides\n" #: ../arp.c:468 msgid "(incomplete)" msgstr "(mittetäielik)" #: ../arp.c:485 #, c-format msgid "%s (%s) at " msgstr "%s (%s) aadressil " #: ../arp.c:491 msgid " " msgstr "" #: ../arp.c:497 #, c-format msgid "netmask %s " msgstr "võrgumask %s " #: ../arp.c:514 #, c-format msgid "on %s\n" msgstr "liides %s\n" #: ../arp.c:593 #, c-format msgid "Entries: %d\tSkipped: %d\tFound: %d\n" msgstr "ARP kirjeid kokku: %s\tignoreerisin: %d\tleidsin: %d\n" #: ../arp.c:597 #, c-format msgid "%s (%s) -- no entry\n" msgstr "%s (%s) -- pole kirjet\n" #: ../arp.c:599 #, c-format msgid "arp: in %d entries no match found.\n" msgstr "arp: ei leidnud %d kirje hulgast sobivat\n" #: ../arp.c:614 msgid "" "Usage:\n" " arp [-vn] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" "Kasutamine:\n" "ARP cache vaatamine:\n" " arp [-vn] [] [-i ] [-a] []\n" #: ../arp.c:615 msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr "" "ARP kirje kustutamine:\n" " arp [-v] [-i ] -d [pub] [nopub]\n" #: ../arp.c:616 msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" "ARP kirjete lisamine failist:\n" " arp [-vnD] [] [-i ] -f []\n" #: ../arp.c:617 msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" "ARP kirje lisamine:\n" " arp [-v] [] [-i ] -s [temp] [nopub]\n" #: ../arp.c:618 msgid "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" msgstr "" " arp [-v] [] [-i ] -s [netmask ] pub\n" #: ../arp.c:619 msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" " arp [-v] [] [-i ] -Ds [netmask ] pub\n" "\n" #: ../arp.c:621 msgid "" " -a display (all) hosts in alternative (BSD) " "style\n" msgstr "" " -a näita kõiki hoste alternatiivsel (BSD) " "kujul\n" #: ../arp.c:622 msgid " -s, --set set a new ARP entry\n" msgstr " -s, --set uue ARP kirje seadmine\n" #: ../arp.c:623 msgid " -d, --delete delete a specified entry\n" msgstr " -d, --delete määratud kirje kustutamine\n" #: ../arp.c:624 ../netstat.c:1490 ../route.c:86 msgid " -v, --verbose be verbose\n" msgstr " -v, --verbose jutukas väljund\n" #: ../arp.c:625 ../netstat.c:1491 ../route.c:87 msgid " -n, --numeric don't resolve names\n" msgstr " -n, --numeric mitte lahendada nimesid\n" #: ../arp.c:626 msgid "" " -i, --device specify network interface (e.g. eth0)\n" msgstr "" " -i, --device võrguliidese täpsustamine (näiteks eth0)\n" #: ../arp.c:627 msgid " -D, --use-device read from given device\n" msgstr " -D, --use-device lugeda vastavalt liideselt\n" #: ../arp.c:628 msgid " -A, -p, --protocol specify protocol family\n" msgstr " -A, -p, --protocol protokollipere määramine\n" #: ../arp.c:629 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:631 ../rarp.c:182 #, c-format msgid " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" " =kasutage '-H ' riistvaralise aadressi määramiseks.\n" " Vaikimisi: %s\n" #: ../arp.c:632 ../rarp.c:183 msgid " List of possible hardware types (which support ARP):\n" msgstr " Võimalike ARP-i toetavate riistvara tüüpide nimekiri:\n" #: ../arp.c:666 ../arp.c:751 #, c-format msgid "%s: hardware type not supported!\n" msgstr "arp: riistvara tüüpi %s ei toetata\n" #: ../arp.c:670 #, c-format msgid "%s: address family not supported!\n" msgstr "arp: aadressiperekonda %s ei toetata\n" #: ../arp.c:705 msgid "arp: -N not yet supported.\n" msgstr "arp: -N toetust pole veel\n" #: ../arp.c:715 #, c-format msgid "arp: %s: unknown address family.\n" msgstr "arp: tundmatu aadressiperekond %s\n" #: ../arp.c:724 #, c-format msgid "arp: %s: unknown hardware type.\n" msgstr "arp: tundmatu riistvara tüüp %s\n" #: ../arp.c:743 #, c-format msgid "arp: %s: kernel only supports 'inet'.\n" msgstr "arp: tuumas on ainult 'inet' aadressiperekonna toetus\n" #: ../arp.c:756 #, c-format msgid "arp: %s: hardware type without ARP support.\n" msgstr "arp: riistvara tüübil %s pole ARP toetust\n" #: ../hostname.c:70 #, c-format msgid "Setting nodename to `%s'\n" msgstr "Sean sõlme nimeks `%s'\n" #: ../hostname.c:75 #, 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:78 ../hostname.c:98 ../hostname.c:117 #, c-format msgid "%s: name too long\n" msgstr "%s: nimi on liiga pikk\n" #: ../hostname.c:90 #, c-format msgid "Setting hostname to `%s'\n" msgstr "Sean hosti nimeks `%s'\n" #: ../hostname.c:95 #, 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:109 #, c-format msgid "Setting domainname to `%s'\n" msgstr "Sean domeeni nimeks `%s'\n" #: ../hostname.c:114 #, 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:132 #, c-format msgid "Resolving `%s' ...\n" msgstr "Lahendan `%s' ...\n" #: ../hostname.c:138 #, c-format msgid "Result: h_name=`%s'\n" msgstr "Tulemus: h_name=`%s'\n" #: ../hostname.c:143 #, c-format msgid "Result: h_aliases=`%s'\n" msgstr "Tulemus: h_aliases=`%s'\n" #: ../hostname.c:148 #, c-format msgid "Result: h_addr_list=`%s'\n" msgstr "Tulemus: h_addr_list=`%s'\n" #: ../hostname.c:210 #, c-format msgid "%s: can't open `%s'\n" msgstr "%s: ei saa avada faili `%s'\n" #: ../hostname.c:224 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:225 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:227 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:229 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:230 msgid "" " hostname [-v] display hostname\n" "\n" msgstr " hostname [-v] hosti nime näitamine\n" #: ../hostname.c:231 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:232 msgid "" " dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n" "\n" msgstr "" " dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n" "\n" #: ../hostname.c:233 msgid " -s, --short short host name\n" msgstr " -s, --short lühike hosti nimi\n" #: ../hostname.c:234 msgid " -a, --alias alias names\n" msgstr " -a, --alias alias-nimed\n" #: ../hostname.c:235 msgid " -i, --ip-address addresses for the hostname\n" msgstr " -i, --ip-address hosti IP aadressid\n" #: ../hostname.c:236 msgid " -f, --fqdn, --long long host name (FQDN)\n" msgstr "" " -f, --fqdn, --long pikk hosti nimi (FQDN - täielik süsteeminimi)\n" #: ../hostname.c:237 msgid " -d, --domain DNS domain name\n" msgstr " -d, --domain DNS domeeni nimi\n" #: ../hostname.c:238 msgid " -y, --yp, --nis NIS/YP domainname\n" msgstr " -y, --yp, --nis NIS/YP domeeni nimi\n" #: ../hostname.c:240 msgid " -n, --node DECnet node name\n" msgstr " -n, --node DECneti võrgusõlme nimi\n" #: ../hostname.c:242 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: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 "" " 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:340 #, 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:341 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:342 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:359 #, c-format msgid "gethostname()=`%s'\n" msgstr "gethostname()=`%s'\n" #: ../hostname.c:376 #, c-format msgid "getdomainname()=`%s'\n" msgstr "getdomainname()=`%s'\n" #: ../hostname.c:391 #, c-format msgid "getnodename()=`%s'\n" msgstr "getnodename()=`%s'\n" #: ../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 "" "Liides MTU Meetr. RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR " "Lip\n" #: ../ifconfig.c:130 ../ifconfig.c:162 #, c-format msgid "%s: unknown interface: %s\n" msgstr "ifconfig: tundmatu liides %s: %s\n" #: ../ifconfig.c:154 ../ifconfig.c:734 ../ifconfig.c:825 ../ifconfig.c:936 msgid "No support for INET on this system.\n" msgstr "Antud süsteem ei toeta INET aadressiperekonda\n" #: ../ifconfig.c:177 msgid "" "Usage:\n" " ifconfig [-a] [-i] [-v] [-s] [[]
]\n" msgstr "" "Kasutamine:\n" " ifconfig [-a] [-i] [-v] [-s] [[] ]\n" #: ../ifconfig.c:179 msgid " [add
[/]]\n" msgstr " [add [/]]\n" #: ../ifconfig.c:180 msgid " [del
[/]]\n" msgstr " [del [/]]\n" #: ../ifconfig.c:181 msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr " [[-]broadcast []] [[-]pointopoint []]\n" #: ../ifconfig.c:182 msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr " [netmask ] [dstaddr ] [tunnel ]\n" #: ../ifconfig.c:185 msgid " [outfill ] [keepalive ]\n" msgstr " [outfill ] [keepalive ]\n" #: ../ifconfig.c:187 msgid " [hw
] [metric ] [mtu ]\n" msgstr " [hw ] [metric ] [mtu ]\n" #: ../ifconfig.c:188 msgid " [[-]trailers] [[-]arp] [[-]allmulti]\n" msgstr " [[-]trailers] [[-]arp] [[-]allmulti]\n" #: ../ifconfig.c:189 msgid " [multicast] [[-]promisc]\n" msgstr " [multicast] [[-]promisc]\n" #: ../ifconfig.c:190 msgid " [mem_start ] [io_addr ] [irq ] [media ]\n" msgstr " [mem_start ] [io_addr ] [irq ] [media ]\n" #: ../ifconfig.c:192 msgid " [txqueuelen ]\n" msgstr " [txqueuelen ]\n" #: ../ifconfig.c:195 msgid " [[-]dynamic]\n" msgstr " [[-]dynamic]\n" #: ../ifconfig.c:197 msgid "" " [up|down] ...\n" "\n" msgstr "" " [up|down] ...\n" "\n" #: ../ifconfig.c:199 msgid " =Hardware Type.\n" msgstr " =riistvara tüüp\n" #: ../ifconfig.c:200 msgid " List of possible hardware types:\n" msgstr " Võimalike riistvara tüüpide nimekiri:\n" #. 1 = ARPable #: ../ifconfig.c:202 #, c-format msgid " =Address family. Default: %s\n" msgstr " =aadressiperekond, vaikimisi %s\n" #: ../ifconfig.c:203 msgid " List of possible address families:\n" msgstr " Võimalike aadressiperekondade nimekiri:\n" #: ../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 "Tundmatu meedia tüüp\n" #: ../ifconfig.c:647 #, 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:656 #, c-format msgid "%s: invalid %s address.\n" msgstr "%s: vigane %s aadress\n" #: ../ifconfig.c:700 ../ifconfig.c:790 ../ifconfig.c:876 msgid "No support for INET6 on this system.\n" msgstr "Antud süsteem ei toeta INET6 aadressiperekonda\n" #: ../ifconfig.c:743 ../ifconfig.c:834 #, c-format msgid "Interface %s not initialized\n" msgstr "Liides %s pole initsialiseeritud\n" #: ../ifconfig.c:755 ../ifconfig.c:845 msgid "Bad address.\n" msgstr "Vigane aadress\n" #: ../ifconfig.c:848 msgid "Address deletion not supported on this system.\n" msgstr "Antud süsteem ei toeta aadresside kustutamist\n" #: ../ifconfig.c:920 msgid "ifconfig: Cannot set address for this protocol family.\n" msgstr "Ei oska seada aadresse selle aadressiperekonna jaoks\n" #: ../ifconfig.c:946 msgid "No support for ECONET on this system.\n" msgstr "Antud süsteem ei toeta ECONET aadressiperekonda\n" #: ../ifconfig.c:954 #, 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:430 #, 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: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 "" "(Mõnesid protsesse ei saanud identifitseerida, teiste kasutajate\n" "info lugemiseks peab olema root)\n" #: ../netstat.c:441 ../netstat.c:1176 ../netstat.c:1253 msgid "LISTENING" msgstr "LISTENING" #: ../netstat.c:442 msgid "CONN SENT" msgstr "CONN SENT" #: ../netstat.c:443 ../netstat.c:1255 msgid "DISC SENT" msgstr "DISC SENT" #: ../netstat.c:444 ../netstat.c:511 ../netstat.c:894 ../netstat.c:1256 msgid "ESTABLISHED" msgstr "ESTABLISHED" #: ../netstat.c:466 msgid "Active NET/ROM sockets\n" msgstr "Aktiivsed NET/ROM soklid\n" #: ../netstat.c:467 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:477 ../netstat.c:1295 #, c-format msgid "Problem reading data from %s\n" msgstr "Probleem andmete lugemisel failist %s\n" #: ../netstat.c:512 msgid "SYN_SENT" msgstr "SYN_SENT" #: ../netstat.c:513 msgid "SYN_RECV" msgstr "SYN_RECV" #: ../netstat.c:514 msgid "FIN_WAIT1" msgstr "FIN_WAIT1" #: ../netstat.c:515 msgid "FIN_WAIT2" msgstr "FIN_WAIT2" #: ../netstat.c:516 msgid "TIME_WAIT" msgstr "TIME_WAIT" #: ../netstat.c:517 msgid "CLOSE" msgstr "CLOSE" #: ../netstat.c:518 msgid "CLOSE_WAIT" msgstr "CLOSE_WAIT" #: ../netstat.c:519 msgid "LAST_ACK" msgstr "LAST_ACK" #: ../netstat.c:520 msgid "LISTEN" msgstr "LISTEN" #: ../netstat.c:521 msgid "CLOSING" msgstr "CLOSING" #: ../netstat.c:592 #, c-format msgid "warning, got bogus igmp6 line %d.\n" msgstr "Hoiatus - sain imeliku igmp6 rea (nr. %d)\n" #: ../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: aadressiperekonda %d ei toetata\n" #: ../netstat.c:610 ../netstat.c:615 ../netstat.c:623 ../netstat.c:630 #, c-format msgid "warning, got bogus igmp line %d.\n" msgstr "Hoiatus - sain imeliku igmp rea (nr. %d)\n" #: ../netstat.c:673 msgid "Active X.25 sockets\n" msgstr "Aktiivsed X.25 soklid\n" #. 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 "" "Sihtpunkt Lähtepunkt Liides LCI Olek Vr/Vs SaatJrk VvJrk\n" #: ../netstat.c:752 msgid "warning, got bogus tcp line.\n" msgstr "Hoiatus - sain imeliku tcp rea\n" #: ../netstat.c:793 ../netstat.c:943 ../netstat.c:1062 #, c-format msgid "off (0.00/%ld/%d)" msgstr "eikäi ((0.00/%ld/%d)" #: ../netstat.c:797 #, c-format msgid "on (%2.2f/%ld/%d)" msgstr "käib (%2.2f/%ld/%d)" #: ../netstat.c:802 #, c-format msgid "keepalive (%2.2f/%ld/%d)" msgstr "keepalive (%2.2f/%ld/%d)" #: ../netstat.c:807 #, c-format msgid "timewait (%2.2f/%ld/%d)" msgstr "timewait (%2.2f/%ld/%d)" #: ../netstat.c:812 ../netstat.c:952 ../netstat.c:1072 #, c-format msgid "unkn-%d (%2.2f/%ld/%d)" msgstr "eitea-%d (%2.2f/%ld/%d)" #: ../netstat.c:884 msgid "warning, got bogus udp line.\n" msgstr "Hoiatus - sain imeliku udp rea\n" #: ../netstat.c:902 ../netstat.c:1162 ../netstat.c:1195 msgid "UNKNOWN" msgstr "TUNDMATU" #: ../netstat.c:948 ../netstat.c:1067 #, c-format msgid "on%d (%2.2f/%ld/%d)" msgstr "käib-%d (%2.2f/%ld/%d)" #: ../netstat.c:1033 msgid "warning, got bogus raw line.\n" msgstr "Hoiatus - sain imeliku raw rea\n" #: ../netstat.c:1115 msgid "warning, got bogus unix line.\n" msgstr "Hoiatus - sain imeliku unix rea\n" #: ../netstat.c:1142 msgid "STREAM" msgstr "STREAM" #: ../netstat.c:1146 msgid "DGRAM" msgstr "DGRAM" #: ../netstat.c:1150 msgid "RAW" msgstr "RAW" #: ../netstat.c:1154 msgid "RDM" msgstr "RDM" #: ../netstat.c:1158 msgid "SEQPACKET" msgstr "SEQPACKET" #: ../netstat.c:1167 msgid "FREE" msgstr "VABA" #: ../netstat.c:1183 msgid "CONNECTING" msgstr "ÜHENDUMAS" #: ../netstat.c:1187 msgid "CONNECTED" msgstr "ÜHENDATUD" #: ../netstat.c:1191 msgid "DISCONNECTING" msgstr "LAHTIÜHENDUMAS" #: ../netstat.c:1222 msgid "Active UNIX domain sockets " msgstr "Aktiivsed UNIX domeeni soklid " #: ../netstat.c:1224 ../netstat.c:1735 msgid "(servers and established)" msgstr "(serverid ja ühendatud)" #: ../netstat.c:1227 ../netstat.c:1738 msgid "(only servers)" msgstr "(ainult serverid)" #: ../netstat.c:1229 ../netstat.c:1740 msgid "(w/o servers)" msgstr "(ilma serveriteta)" #: ../netstat.c:1232 msgid "" "\n" "Proto RefCnt Flags Type State I-Node" msgstr "" "\n" "Proto Mitu Lipud Tüüp Olek I-kirje " #: ../netstat.c:1234 msgid " Path\n" msgstr "Tee\n" #: ../netstat.c:1254 msgid "SABM SENT" msgstr "SABM SENT" #: ../netstat.c:1257 msgid "RECOVERY" msgstr "RECOVERY" #: ../netstat.c:1271 msgid "Active AX.25 sockets\n" msgstr "Aktiivsed AX.25 soklid\n" #: ../netstat.c:1272 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:1315 #, c-format msgid "problem reading data from %s\n" msgstr "Probleem andmete lugemisel failist %s\n" #: ../netstat.c:1366 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:1368 msgid " User" msgstr " Kasutaja" #: ../netstat.c:1402 msgid "ESTAB" msgstr "ESTAB" #: ../netstat.c:1410 msgid "UNK." msgstr "UNK." #: ../netstat.c:1448 msgid "Kernel Interface table\n" msgstr "Tuuma liideste tabel\n" #: ../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 "" "Liides MTU Meetr RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR " "Lip\n" #: ../netstat.c:1456 msgid "missing interface information" msgstr "Puudulik informatsioon liideste kohta" #: ../netstat.c:1479 msgid "" "usage: netstat [-veenNcCF] [] -r netstat " "{-V|--version|-h|--help}\n" msgstr "" "Kasutamine: netstat [-veenNcCF] [] -r\n" " netstat {-V|--version|-h|--help}\n" #: ../netstat.c:1480 msgid " netstat [-vnNcaeol] [ ...]\n" msgstr " netstat [-vnNcaeol] [ ...]\n" #: ../netstat.c:1481 msgid "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" msgstr "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" #: ../netstat.c:1483 msgid " -r, --route display routing table\n" msgstr " -r, --route ruutingutabeli näitamine\n" #: ../netstat.c:1484 msgid " -i, --interfaces display interface table\n" msgstr " -i, --interfaces liideste tabeli näitamine\n" #: ../netstat.c:1485 msgid " -g, --groups display multicast group memberships\n" msgstr " -g, --groups multiedastuse gruppide näitamine\n" #: ../netstat.c:1486 msgid "" " -s, --statistics display networking statistics (like SNMP)\n" msgstr "" " -s, --statistics võrgu statistika näitamine (SNMP stiilis)\n" #: ../netstat.c:1488 msgid "" " -M, --masquerade display masqueraded connections\n" "\n" msgstr "" " -M, --masquerade maskeeritavate ühenduste näitamine\n" "\n" #: ../netstat.c:1492 msgid " --numeric-hosts don't resolve host names\n" msgstr " --numeric-hosts mitte lahendada hostinimesid\n" #: ../netstat.c:1493 msgid " --numeric-ports don't resolve port names\n" msgstr " --numeric-ports mitte lahendada pordinimesid\n" #: ../netstat.c:1494 msgid " --numeric-users don't resolve user names\n" msgstr " --numeric-users mitte lahendada kasutajanimesid\n" #: ../netstat.c:1495 msgid " -N, --symbolic resolve hardware names\n" msgstr " -N, --symbolic lahendada riistvara aadressid\n" #: ../netstat.c:1496 ../route.c:88 msgid " -e, --extend display other/more information\n" msgstr " -e, --extend muu info/lisainfo näitamine\n" #: ../netstat.c:1497 msgid " -p, --programs display PID/Program name for sockets\n" msgstr "" " -p, --programs soklite kohta PID/protsessi nime näitamine\n" #: ../netstat.c:1498 msgid "" " -c, --continuous continuous listing\n" "\n" msgstr "" " -c, --continuous pidevalt uuenev nimekiri\n" "\n" #: ../netstat.c:1499 msgid " -l, --listening display listening server sockets\n" msgstr " -l, --listening kuulavate serversoklite näitamine\n" #: ../netstat.c:1500 msgid "" " -a, --all, --listening display all sockets (default: connected)\n" msgstr "" " -a, --all, --listening kõigi soklite näitamine (vaikimisi " "ühendatud)\n" #: ../netstat.c:1501 msgid " -o, --timers display timers\n" msgstr " -o, --timers taimerite näitamine\n" #: ../netstat.c:1502 ../route.c:89 msgid "" " -F, --fib display Forwarding Information Base " "(default)\n" msgstr "" " -F, --fib üldiste ruutingutabelite näitamine " "(vaikimisi)\n" #: ../netstat.c:1503 ../route.c:90 msgid "" " -C, --cache display routing cache instead of FIB\n" "\n" msgstr "" " -C, --cache üldise tabeli asemel puhvertabeli " "näitamine\n" "\n" #: ../netstat.c:1505 msgid "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" msgstr "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" #: ../netstat.c:1506 ../route.c:92 msgid " =Use '-A ' or '--'; default: %s\n" msgstr " =kasutage '-A ' või '--'; vaikimisi: %s\n" #: ../netstat.c:1507 ../route.c:93 msgid " List of possible address families (which support routing):\n" msgstr " Võimalike ruutingu toetavate aadressiperekondade nimekiri:\n" #: ../netstat.c:1732 msgid "Active Internet connections " msgstr "Aktiivsed internetiühendused " #: ../netstat.c:1742 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:1744 msgid " User Inode " msgstr " Kasutaja I-kirje " #: ../netstat.c:1747 msgid " Timer" msgstr " Taimer" #: ../netstat.c:1777 msgid "IPv4 Group Memberships\n" msgstr "IPv4 grupikuuluvused\n" #: ../netstat.c:1778 msgid "Interface RefCnt Group\n" msgstr "Liides Mitu Grupp\n" #: ../rarp.c:44 msgid "This kernel does not support RARP.\n" msgstr "rarp: tuum ei toeta RARP'i\n" #: ../rarp.c:83 #, c-format msgid "no RARP entry for %s.\n" msgstr "rarp: %s jaoks pole RARP kirjet\n" #: ../rarp.c:96 #, c-format msgid "%s: bad hardware address\n" msgstr "rarp: vigane riistvaraline aadress %s\n" #: ../rarp.c:128 #, c-format msgid "rarp: cannot open file %s:%s.\n" msgstr "rarp: ei saa avada faili %s:%s\n" #: ../rarp.c:140 #, c-format msgid "rarp: format error at %s:%u\n" msgstr "rarp: vorminguviga failis %s real %u\n" #: ../rarp.c:144 ../rarp.c:289 #, c-format msgid "rarp: %s: unknown host\n" msgstr "rarp: tundmatu host %s\n" #: ../rarp.c:147 #, c-format msgid "rarp: cannot set entry from %s:%u\n" msgstr "rarp: ei saa kehtestada kirjet failist %s realt %u\n" #: ../rarp.c:176 msgid "Usage: rarp -a list entries in cache.\n" msgstr "" "Kasutamine:\n" " rarp -a puhvris olevate kirjete vaatamine\n" #: ../rarp.c:177 msgid " rarp -d delete entry from cache.\n" msgstr " rarp -d kirje kustutamine puhvrist\n" #: ../rarp.c:178 msgid " rarp [] -s add entry to cache.\n" msgstr " rarp [] -s kirje lisamine puhvrisse\n" #: ../rarp.c:179 msgid "" " rarp -f add entries from /etc/ethers.\n" msgstr "" " rarp -f kirjete lisamine failist /etc/ethers\n" #: ../rarp.c:180 msgid "" " rarp -V display program version.\n" "\n" msgstr "" " rarp -V programmi versiooni näitamine\n" "\n" #: ../rarp.c:238 #, c-format msgid "%s: illegal option mix.\n" msgstr "%s: lubamatu võtmete kombinatsioon\n" #: ../rarp.c:269 #, c-format msgid "rarp: %s: unknown hardware type.\n" msgstr "rarp: tundmatu riistvara tüüp %s\n" #: ../route.c:80 msgid "" "Usage: route [-nNvee] [-FC] [] List kernel routing tables\n" msgstr "" "Kasutamine:\n" " route [-nNvee] [-FC] [] Tuuma ruutingutabeli näitamine\n" #: ../route.c:81 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:83 msgid "" " route {-h|--help} [] Detailed usage syntax for " "specified AF.\n" msgstr "" " route {-h|--help} [] Detailne süntaks perekonna AF " "jaoks\n" #: ../route.c:84 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:85 msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n" msgstr "Kasutamine: iptunnel { add | change | del | show } [ NIMI ]\n" #: ../iptunnel.c:86 msgid "" " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" msgstr "" " [ mode { ipip | gre | sit } ] [ remote AADR ] [ local AADR ]\n" #: ../iptunnel.c:87 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:88 msgid " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n" msgstr " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev LIIDES ]\n" #: ../iptunnel.c:89 msgid "" " iptunnel -V | --version\n" "\n" msgstr "" " iptunnel -V | --version\n" "\n" #: ../iptunnel.c:90 msgid "Where: NAME := STRING\n" msgstr "Kus: NIMI := STRING\n" #: ../iptunnel.c:91 msgid " ADDR := { IP_ADDRESS | any }\n" msgstr " AADR := { IP_AADRESS | any }\n" #: ../iptunnel.c:92 msgid " TOS := { NUMBER | inherit }\n" msgstr " TOS := { ARV | inherit }\n" #: ../iptunnel.c:93 msgid " TTL := { 1..255 | inherit }\n" msgstr " TTL := { 1..255 | inherit }\n" #: ../iptunnel.c:94 msgid " KEY := { DOTTED_QUAD | NUMBER }\n" msgstr "" " KEY := { PUNKTIDEGA_ARVUNELIK | ARV }\n" " LIIDES := FÜÜSILISE_LIIDESE_NIMI\n" #: ../iptunnel.c:332 msgid "Keys are not allowed with ipip and sit.\n" msgstr "ipip ja sit juures ei ole võtmed lubatud\n" #: ../iptunnel.c:352 msgid "Broadcast tunnel requires a source address.\n" msgstr "Leviedastusega tunnel vajab lähteaadressi\n" #: ../iptunnel.c:367 msgid "ttl != 0 and noptmudisc are incompatible\n" msgstr "ttl != 0 ning noptmudisc ei sobi kokku\n" #: ../iptunnel.c:379 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:417 #, c-format msgid "%s: %s/ip remote %s local %s " msgstr "%s: %s/ip teises otsas %s siin %s " #: ../iptunnel.c:421 msgid "unknown" msgstr "tundmatu" #: ../iptunnel.c:453 msgid " Drop packets out of sequence.\n" msgstr " Järjekorravälised paketid visatakse minema\n" #: ../iptunnel.c:455 msgid " Checksum in received packet is required.\n" msgstr " Vastuvõetavates pakettides on kontrollsumma kohustuslik\n" #: ../iptunnel.c:457 msgid " Sequence packets on output.\n" msgstr " Väljuvad paketid varustatakse järjekorranumbritega\n" #: ../iptunnel.c:459 msgid " Checksum output packets.\n" msgstr " Väljuvad paketid varustatakse kontrollsummaga\n" #: ../iptunnel.c:487 msgid "Wrong format of /proc/net/dev. Sorry.\n" msgstr "/proc/net/dev on vales formaadis. Vale tuuma versioon?\n" #: ../iptunnel.c:500 #, c-format msgid "Failed to get type of [%s]\n" msgstr "Ei suutnud kindlaks teha liidese %s tüüpi\n" #: ../iptunnel.c:516 msgid "RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts\n" msgstr "RX: Pakette Baite Vigu KSumVigu JrkVigu Levipakette\n" #: ../iptunnel.c:519 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 reassemblies 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: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 connection 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 sent out" msgstr "%u segmenti saadeti" #: ../statistics.c:129 #, c-format msgid "%u segments retransmitted" 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 packetes rejected 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 packet headers predicted" msgstr "%u paketti päise õige ennustusega" #: ../statistics.c:184 #, c-format msgid "%u packet headers 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:71 msgid "INET6 (IPv6) not configured in this system.\n" msgstr "INET6 (IPv6) pole antud süsteemis konfigureeritud\n" #: ../lib/inet6_gr.c:74 msgid "Kernel IPv6 routing table\n" msgstr "Tuuma IPv6 ruutingutabel\n" #: ../lib/inet6_gr.c:76 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:150 msgid "Kernel IPv6 Neighbour Cache\n" msgstr "Tuuma IPv6 naabrite puhver\n" #: ../lib/inet6_gr.c:153 msgid "" "Neighbour HW Address Iface Flags " "Ref State\n" msgstr "" "Naaber HW Aadress Liides Lipud " "Mitu Olek\n" #: ../lib/inet6_gr.c:157 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:61 msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n" msgstr "Kasutamine: ipmaddr [ add | del ] MULTIAADR dev STRING\n" #: ../ipmaddr.c:62 msgid " ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n" msgstr " ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n" #: ../ipmaddr.c:63 msgid " ipmaddr -V | -version\n" msgstr " ipmaddr -V | -version\n" #: ../ipmaddr.c:263 #, c-format msgid "family %d " msgstr "perekond %d " #: ../ipmaddr.c:272 #, c-format msgid " users %d" msgstr " kasutajaid %d" #: ../ipmaddr.c:358 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" net-tools-1.60+git20180626.aebd88e/po/fr.po000066400000000000000000001676101331436560500176210ustar00rootroot00000000000000# $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 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 \n" "Language-Team:\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-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 HWtype HWaddress Flags Mask " "Iface\n" msgstr "" "Adresse TypeMap AdresseMat Indicateurs " "Iface\n" #: ../arp.c:467 msgid "(incomplete)" msgstr "" #: ../arp.c:484 #, c-format msgid "%s (%s) at " msgstr "" #: ../arp.c:490 msgid " " 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] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" "Syntaxe:\n" " arp [-vn] [] [-i ] [-a] [] <-Affiche cache " "ARP\n" #: ../arp.c:614 msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr "" " arp [-v] [-i ] -d [pub][nopub] <-Supprime entrée " "ARP\n" #: ../arp.c:615 #, fuzzy msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" " arp [-vnD] [] [-i ] -f <-Ajout entrée " "depuis fichier\n" #: ../arp.c:616 msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" " arp [-v] [] [-i ] -s [temp][nopub] <-Ajout " "entrée\n" #: ../arp.c:617 msgid "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" msgstr "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" #: ../arp.c:618 msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" " arp [-v] [] [-i ] -Ds [netmask ] 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 from given device\n" msgstr "" " -D, --use-device lit l' 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 " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" " =Utilisez '-H ' 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] [[]
]\n" msgstr "" "Syntaxe:\n" " ifconfig [-a] [-i] [-v] [[] ]\n" #: ../ifconfig.c:425 msgid " [add
[/]]\n" msgstr " [add [/]]\n" #: ../ifconfig.c:427 msgid " [del
[/]]\n" msgstr " [del [/]]\n" #: ../ifconfig.c:432 msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr " [[-]broadcast []] [[-]pointopoint []]\n" #: ../ifconfig.c:433 #, fuzzy msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr " [netmask ] [dstaddr ] [tunnel ]\n" #: ../ifconfig.c:436 msgid " [outfill ] [keepalive ]\n" msgstr " [outfill ] [keepalive ]\n" #: ../ifconfig.c:438 msgid " [hw
] [metric ] [mtu ]\n" msgstr " [hw ] [metric ] [mtu ]\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 ] [io_addr ] [irq ] [media ]\n" msgstr " [mem_start ] [io_addr ] [irq ] [media ]\n" #: ../ifconfig.c:443 #, fuzzy msgid " [txqueuelen ]\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 " =Hardware Type.\n" msgstr " =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 " =Address family. Default: %s\n" msgstr " =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] [] -r netstat " "{-V|--version|-h|--help}\n" msgstr "" "syntaxe: netstat [-veenNcCF] [] -r netstat " "{-V|--version|-h|--help}\n" #: ../netstat.c:1426 msgid " netstat [-vnNcaeol] [ ...]\n" msgstr " netstat [-vnNcaeol] [ ...]\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 "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" msgstr "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" #: ../netstat.c:1449 ../route.c:92 #, c-format msgid " =Use '-A ' or '--' Default: %s\n" msgstr " =Utiliser '-A ' ou '--' 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 delete entry from cache.\n" msgstr "" " rarp -d supprime l'entrée du cache.\n" #: ../rarp.c:177 msgid " rarp [] -s add entry to cache.\n" msgstr "" " rarp [] -s 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] [] List kernel routing tables\n" msgstr "" "Syntaxe: route [-nNvee] [-FC] [] 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} [] Detailed usage syntax for " "specified AF.\n" msgstr "" " route {-h|--help} [] 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 reassemblies 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: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 connection 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 sent out" msgstr "%d segments envoyés" #: ../statistics.c:127 #, c-format msgid "%d segments retransmitted" 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" net-tools-1.60+git20180626.aebd88e/po/net-tools.pot000066400000000000000000001525431331436560500213210ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-05-16 05:18+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../arp.c:111 ../arp.c:276 #, c-format msgid "arp: need host name\n" msgstr "" #: ../arp.c:213 ../arp.c:228 #, c-format msgid "No ARP entry for %s\n" msgstr "" #: ../arp.c:246 #, c-format msgid "arp: cant get HW-Address for `%s': %s.\n" msgstr "" #: ../arp.c:250 #, c-format msgid "arp: protocol type mismatch.\n" msgstr "" #: ../arp.c:259 #, c-format msgid "arp: device `%s' has HW address %s `%s'.\n" msgstr "" #: ../arp.c:289 #, c-format msgid "arp: need hardware address\n" msgstr "" #: ../arp.c:297 #, c-format msgid "arp: invalid hardware address\n" msgstr "" #: ../arp.c:394 #, c-format msgid "arp: cannot open etherfile %s !\n" msgstr "" #: ../arp.c:410 #, c-format msgid "arp: format error on line %u of etherfile %s !\n" msgstr "" #: ../arp.c:423 #, c-format msgid "arp: cannot set entry on line %u of etherfile %s !\n" msgstr "" #: ../arp.c:444 #, c-format msgid "" "Address HWtype HWaddress Flags Mask " "Iface\n" msgstr "" #: ../arp.c:472 msgid "" msgstr "" #: ../arp.c:474 msgid "(incomplete)" msgstr "" #: ../arp.c:491 #, c-format msgid "%s (%s) at " msgstr "" #: ../arp.c:497 #, c-format msgid " " msgstr "" #: ../arp.c:503 #, c-format msgid "netmask %s " msgstr "" #: ../arp.c:520 #, c-format msgid "on %s\n" msgstr "" #: ../arp.c:599 #, c-format msgid "Entries: %d\tSkipped: %d\tFound: %d\n" msgstr "" #: ../arp.c:603 #, c-format msgid "%s (%s) -- no entry\n" msgstr "" #: ../arp.c:605 #, c-format msgid "arp: in %d entries no match found.\n" msgstr "" #: ../arp.c:620 #, c-format msgid "" "Usage:\n" " arp [-vn] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" #: ../arp.c:621 #, c-format msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr "" #: ../arp.c:622 #, c-format msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" #: ../arp.c:623 #, c-format msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" #: ../arp.c:624 #, c-format msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" #: ../arp.c:626 #, c-format msgid "" " -a display (all) hosts in alternative (BSD) " "style\n" msgstr "" #: ../arp.c:627 #, c-format msgid " -s, --set set a new ARP entry\n" msgstr "" #: ../arp.c:628 #, c-format msgid " -d, --delete delete a specified entry\n" msgstr "" #: ../arp.c:629 ../netstat.c:1503 ../route.c:86 #, c-format msgid " -v, --verbose be verbose\n" msgstr "" #: ../arp.c:630 ../netstat.c:1504 ../route.c:87 #, c-format msgid " -n, --numeric don't resolve names\n" msgstr "" #: ../arp.c:631 #, c-format msgid "" " -i, --device specify network interface (e.g. eth0)\n" msgstr "" #: ../arp.c:632 #, c-format msgid " -D, --use-device read from given device\n" msgstr "" #: ../arp.c:633 #, c-format msgid " -A, -p, --protocol specify protocol family\n" msgstr "" #: ../arp.c:634 #, c-format msgid "" " -f, --file read new entries from file or from /etc/" "ethers\n" "\n" msgstr "" #: ../arp.c:636 ../rarp.c:182 #, c-format msgid " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" #: ../arp.c:637 ../rarp.c:183 #, c-format msgid " List of possible hardware types (which support ARP):\n" msgstr "" #: ../arp.c:671 ../arp.c:756 #, c-format msgid "%s: hardware type not supported!\n" msgstr "" #: ../arp.c:675 #, c-format msgid "%s: address family not supported!\n" msgstr "" #: ../arp.c:710 #, c-format msgid "arp: -N not yet supported.\n" msgstr "" #: ../arp.c:720 #, c-format msgid "arp: %s: unknown address family.\n" msgstr "" #: ../arp.c:729 #, c-format msgid "arp: %s: unknown hardware type.\n" msgstr "" #: ../arp.c:748 #, c-format msgid "arp: %s: kernel only supports 'inet'.\n" msgstr "" #: ../arp.c:761 #, c-format msgid "arp: %s: hardware type without ARP support.\n" msgstr "" #: ../hostname.c:71 #, c-format msgid "Setting nodename to `%s'\n" msgstr "" #: ../hostname.c:76 #, c-format msgid "%s: you must be root to change the node name\n" msgstr "" #: ../hostname.c:79 ../hostname.c:100 ../hostname.c:118 #, c-format msgid "%s: name too long\n" msgstr "" #: ../hostname.c:92 #, c-format msgid "Setting hostname to `%s'\n" msgstr "" #: ../hostname.c:97 #, c-format msgid "%s: you must be root to change the host name\n" msgstr "" #: ../hostname.c:110 #, c-format msgid "Setting domainname to `%s'\n" msgstr "" #: ../hostname.c:115 #, 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:209 #, c-format msgid "%s: can't open `%s'\n" msgstr "" #: ../hostname.c:223 #, c-format msgid "Usage: hostname [-v] {hostname|-F file} set hostname (from file)\n" msgstr "" #: ../hostname.c:224 #, c-format msgid "" " domainname [-v] {nisdomain|-F file} set NIS domainname (from file)\n" msgstr "" #: ../hostname.c:226 #, c-format msgid "" " nodename [-v] {nodename|-F file} set DECnet node name (from " "file)\n" msgstr "" #: ../hostname.c:228 #, c-format msgid " hostname [-v] [-d|-f|-s|-a|-i|-y|-n] display formatted name\n" msgstr "" #: ../hostname.c:229 #, c-format msgid "" " hostname [-v] display hostname\n" "\n" msgstr "" #: ../hostname.c:230 #, c-format msgid "" " hostname -V|--version|-h|--help print info and exit\n" "\n" msgstr "" #: ../hostname.c:231 #, c-format msgid "" " dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y\n" "\n" msgstr "" #: ../hostname.c:232 #, c-format msgid " -s, --short short host name\n" msgstr "" #: ../hostname.c:233 #, c-format msgid " -a, --alias alias names\n" msgstr "" #: ../hostname.c:234 #, c-format msgid " -i, --ip-address addresses for the hostname\n" msgstr "" #: ../hostname.c:235 #, c-format msgid " -f, --fqdn, --long long host name (FQDN)\n" msgstr "" #: ../hostname.c:236 #, c-format msgid " -d, --domain DNS domain name\n" msgstr "" #: ../hostname.c:237 #, c-format msgid " -y, --yp, --nis NIS/YP domainname\n" msgstr "" #: ../hostname.c:239 #, c-format msgid " -n, --node DECnet node name\n" msgstr "" #: ../hostname.c:241 #, c-format msgid "" " -F, --file read hostname or NIS domainname from given file\n" "\n" msgstr "" #: ../hostname.c:243 #, c-format 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 #, c-format msgid "" "\n" "Unless you are using bind or NIS for host lookups you can change the DNS\n" msgstr "" #: ../hostname.c:342 #, c-format 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:107 ../netstat.c:1465 #, c-format 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:129 ../ifconfig.c:161 #, c-format msgid "%s: ERROR while getting interface flags: %s\n" msgstr "" #: ../ifconfig.c:153 ../ifconfig.c:185 ../ifconfig.c:791 ../ifconfig.c:884 #: ../ifconfig.c:997 #, c-format msgid "No support for INET on this system.\n" msgstr "" #: ../ifconfig.c:193 #, c-format msgid "%s: ERROR while testing interface flags: %s\n" msgstr "" #: ../ifconfig.c:202 #, c-format msgid "" "Usage:\n" " ifconfig [-a] [-v] [-s] [[]
]\n" msgstr "" #: ../ifconfig.c:204 #, c-format msgid " [add
[/]]\n" msgstr "" #: ../ifconfig.c:205 #, c-format msgid " [del
[/]]\n" msgstr "" #: ../ifconfig.c:206 #, c-format msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr "" #: ../ifconfig.c:207 #, c-format msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr "" #: ../ifconfig.c:210 #, c-format msgid " [outfill ] [keepalive ]\n" msgstr "" #: ../ifconfig.c:212 #, c-format msgid " [hw
] [metric ] [mtu ]\n" msgstr "" #: ../ifconfig.c:213 #, c-format msgid " [[-]trailers] [[-]arp] [[-]allmulti]\n" msgstr "" #: ../ifconfig.c:214 #, c-format msgid " [multicast] [[-]promisc]\n" msgstr "" #: ../ifconfig.c:215 #, c-format msgid " [mem_start ] [io_addr ] [irq ] [media ]\n" msgstr "" #: ../ifconfig.c:217 #, c-format msgid " [txqueuelen ]\n" msgstr "" #: ../ifconfig.c:220 #, c-format msgid " [[-]dynamic]\n" msgstr "" #: ../ifconfig.c:222 #, c-format msgid "" " [up|down] ...\n" "\n" msgstr "" #: ../ifconfig.c:224 #, c-format msgid " =Hardware Type.\n" msgstr "" #: ../ifconfig.c:225 #, c-format msgid " List of possible hardware types:\n" msgstr "" #. 1 = ARPable #: ../ifconfig.c:227 #, c-format msgid " =Address family. Default: %s\n" msgstr "" #: ../ifconfig.c:228 #, c-format msgid " List of possible address families:\n" msgstr "" #: ../ifconfig.c:304 #, c-format msgid "ifconfig: option `%s' not recognised.\n" msgstr "" #: ../ifconfig.c:306 ../ifconfig.c:987 #, c-format msgid "ifconfig: `--help' gives usage information.\n" msgstr "" #: ../ifconfig.c:381 #, c-format msgid "Unknown media type.\n" msgstr "" #: ../ifconfig.c:418 #, c-format msgid "" "Warning: Interface %s still in promisc mode... maybe other application is " "running?\n" msgstr "" #: ../ifconfig.c:430 #, c-format msgid "Warning: Interface %s still in MULTICAST mode.\n" msgstr "" #: ../ifconfig.c:442 #, c-format msgid "Warning: Interface %s still in ALLMULTI mode.\n" msgstr "" #: ../ifconfig.c:466 #, c-format msgid "Warning: Interface %s still in DYNAMIC mode.\n" msgstr "" #: ../ifconfig.c:524 #, c-format msgid "Warning: Interface %s still in BROADCAST mode.\n" msgstr "" #: ../ifconfig.c:535 #, c-format msgid "ifconfig: Error resolving '%s' for broadcast\n" msgstr "" #: ../ifconfig.c:560 #, c-format msgid "ifconfig: Error resolving '%s' for dstaddr\n" msgstr "" #: ../ifconfig.c:583 #, c-format msgid "ifconfig: Error resolving '%s' for netmask\n" msgstr "" #: ../ifconfig.c:662 #, c-format msgid "Warning: Interface %s still in POINTOPOINT mode.\n" msgstr "" #: ../ifconfig.c:673 #, c-format msgid "ifconfig: Error resolving '%s' for pointopoint\n" msgstr "" #: ../ifconfig.c:697 #, c-format msgid "hw address type `%s' has no handler to set address. failed.\n" msgstr "" #: ../ifconfig.c:706 #, c-format msgid "%s: invalid %s address.\n" msgstr "" #: ../ifconfig.c:746 #, c-format msgid "ifconfig: Error resolving '%s' for add\n" msgstr "" #: ../ifconfig.c:757 ../ifconfig.c:847 ../ifconfig.c:935 #, c-format msgid "No support for INET6 on this system.\n" msgstr "" #: ../ifconfig.c:800 ../ifconfig.c:893 #, c-format msgid "Interface %s not initialized\n" msgstr "" #: ../ifconfig.c:812 ../ifconfig.c:904 #, c-format msgid "Bad address.\n" msgstr "" #: ../ifconfig.c:907 #, c-format msgid "Address deletion not supported on this system.\n" msgstr "" #: ../ifconfig.c:979 #, c-format msgid "ifconfig: Cannot set address for this protocol family.\n" msgstr "" #: ../ifconfig.c:986 #, c-format msgid "ifconfig: error resolving '%s' to set address for af=%s\n" msgstr "" #: ../ifconfig.c:1007 #, c-format msgid "No support for ECONET on this system.\n" msgstr "" #: ../ifconfig.c:1015 #, c-format msgid "Don't know how to set addresses for family %d.\n" msgstr "" #: ../ifconfig.c:1050 #, c-format msgid "WARNING: at least one error occured. (%d)\n" msgstr "" #: ../netstat.c:434 #, c-format msgid "" "(No info could be read for \"-p\": geteuid()=%d but you should be root.)\n" msgstr "" #: ../netstat.c:438 #, c-format 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:445 ../netstat.c:1189 ../netstat.c:1266 msgid "LISTENING" msgstr "" #: ../netstat.c:446 msgid "CONN SENT" msgstr "" #: ../netstat.c:447 ../netstat.c:1268 msgid "DISC SENT" msgstr "" #: ../netstat.c:448 ../netstat.c:515 ../netstat.c:904 ../netstat.c:1269 msgid "ESTABLISHED" msgstr "" #: ../netstat.c:470 #, c-format msgid "Active NET/ROM sockets\n" msgstr "" #: ../netstat.c:471 #, c-format msgid "" "User Dest Source Device State Vr/Vs Send-Q Recv-" "Q\n" msgstr "" #: ../netstat.c:481 ../netstat.c:1308 #, c-format msgid "Problem reading data from %s\n" msgstr "" #: ../netstat.c:516 msgid "SYN_SENT" msgstr "" #: ../netstat.c:517 msgid "SYN_RECV" msgstr "" #: ../netstat.c:518 msgid "FIN_WAIT1" msgstr "" #: ../netstat.c:519 msgid "FIN_WAIT2" msgstr "" #: ../netstat.c:520 msgid "TIME_WAIT" msgstr "" #: ../netstat.c:521 msgid "CLOSE" msgstr "" #: ../netstat.c:522 msgid "CLOSE_WAIT" msgstr "" #: ../netstat.c:523 msgid "LAST_ACK" msgstr "" #: ../netstat.c:524 msgid "LISTEN" msgstr "" #: ../netstat.c:525 msgid "CLOSING" msgstr "" #: ../netstat.c:596 #, c-format msgid "warning, got bogus igmp6 line %d.\n" msgstr "" #: ../netstat.c:601 ../netstat.c:639 ../netstat.c:763 ../netstat.c:898 #: ../netstat.c:1032 ../netstat.c:1037 #, c-format msgid "netstat: unsupported address family %d !\n" msgstr "" #: ../netstat.c:614 ../netstat.c:619 ../netstat.c:627 ../netstat.c:634 #, c-format msgid "warning, got bogus igmp line %d.\n" msgstr "" #: ../netstat.c:677 #, c-format msgid "Active X.25 sockets\n" msgstr "" #. IMHO, Vr/Vs is not very usefull --SF #: ../netstat.c:679 #, c-format msgid "" "Dest Source Device LCI State Vr/Vs Send-Q Recv-" "Q\n" msgstr "" #: ../netstat.c:759 #, c-format msgid "warning, got bogus tcp line.\n" msgstr "" #: ../netstat.c:800 ../netstat.c:953 ../netstat.c:1075 #, c-format msgid "off (0.00/%ld/%d)" msgstr "" #: ../netstat.c:804 #, c-format msgid "on (%2.2f/%ld/%d)" msgstr "" #: ../netstat.c:809 #, c-format msgid "keepalive (%2.2f/%ld/%d)" msgstr "" #: ../netstat.c:814 #, c-format msgid "timewait (%2.2f/%ld/%d)" msgstr "" #: ../netstat.c:819 ../netstat.c:962 ../netstat.c:1085 #, c-format msgid "unkn-%d (%2.2f/%ld/%d)" msgstr "" #: ../netstat.c:894 #, c-format msgid "warning, got bogus udp line.\n" msgstr "" #: ../netstat.c:912 ../netstat.c:1175 ../netstat.c:1208 msgid "UNKNOWN" msgstr "" #: ../netstat.c:958 ../netstat.c:1080 #, c-format msgid "on%d (%2.2f/%ld/%d)" msgstr "" #: ../netstat.c:1046 #, c-format msgid "warning, got bogus raw line.\n" msgstr "" #: ../netstat.c:1128 #, c-format msgid "warning, got bogus unix line.\n" msgstr "" #: ../netstat.c:1155 msgid "STREAM" msgstr "" #: ../netstat.c:1159 msgid "DGRAM" msgstr "" #: ../netstat.c:1163 msgid "RAW" msgstr "" #: ../netstat.c:1167 msgid "RDM" msgstr "" #: ../netstat.c:1171 msgid "SEQPACKET" msgstr "" #: ../netstat.c:1180 msgid "FREE" msgstr "" #: ../netstat.c:1196 msgid "CONNECTING" msgstr "" #: ../netstat.c:1200 msgid "CONNECTED" msgstr "" #: ../netstat.c:1204 msgid "DISCONNECTING" msgstr "" #: ../netstat.c:1235 #, c-format msgid "Active UNIX domain sockets " msgstr "" #: ../netstat.c:1237 ../netstat.c:1756 #, c-format msgid "(servers and established)" msgstr "" #: ../netstat.c:1240 ../netstat.c:1759 #, c-format msgid "(only servers)" msgstr "" #: ../netstat.c:1242 ../netstat.c:1761 #, c-format msgid "(w/o servers)" msgstr "" #: ../netstat.c:1245 #, c-format msgid "" "\n" "Proto RefCnt Flags Type State I-Node" msgstr "" #: ../netstat.c:1247 #, c-format msgid " Path\n" msgstr "" #: ../netstat.c:1267 msgid "SABM SENT" msgstr "" #: ../netstat.c:1270 msgid "RECOVERY" msgstr "" #: ../netstat.c:1284 #, c-format msgid "Active AX.25 sockets\n" msgstr "" #: ../netstat.c:1285 #, c-format msgid "Dest Source Device State Vr/Vs Send-Q Recv-Q\n" msgstr "" #: ../netstat.c:1328 #, c-format msgid "problem reading data from %s\n" msgstr "" #: ../netstat.c:1379 #, c-format msgid "" "Active IPX sockets\n" "Proto Recv-Q Send-Q Local Address Foreign Address " "State" msgstr "" #: ../netstat.c:1381 #, c-format msgid " User" msgstr "" #: ../netstat.c:1415 msgid "ESTAB" msgstr "" #: ../netstat.c:1423 msgid "UNK." msgstr "" #: ../netstat.c:1461 #, c-format msgid "Kernel Interface table\n" msgstr "" #: ../netstat.c:1469 msgid "missing interface information" msgstr "" #: ../netstat.c:1492 #, c-format msgid "" "usage: netstat [-veenNcCF] [] -r netstat {-V|--version|-h|--" "help}\n" msgstr "" #: ../netstat.c:1493 #, c-format msgid " netstat [-vnNcaeol] [ ...]\n" msgstr "" #: ../netstat.c:1494 #, c-format msgid "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" msgstr "" #: ../netstat.c:1496 #, c-format msgid " -r, --route display routing table\n" msgstr "" #: ../netstat.c:1497 #, c-format msgid " -i, --interfaces display interface table\n" msgstr "" #: ../netstat.c:1498 #, c-format msgid " -g, --groups display multicast group memberships\n" msgstr "" #: ../netstat.c:1499 #, c-format msgid "" " -s, --statistics display networking statistics (like SNMP)\n" msgstr "" #: ../netstat.c:1501 #, c-format msgid "" " -M, --masquerade display masqueraded connections\n" "\n" msgstr "" #: ../netstat.c:1505 #, c-format msgid " --numeric-hosts don't resolve host names\n" msgstr "" #: ../netstat.c:1506 #, c-format msgid " --numeric-ports don't resolve port names\n" msgstr "" #: ../netstat.c:1507 #, c-format msgid " --numeric-users don't resolve user names\n" msgstr "" #: ../netstat.c:1508 #, c-format msgid " -N, --symbolic resolve hardware names\n" msgstr "" #: ../netstat.c:1509 ../route.c:88 #, c-format msgid " -e, --extend display other/more information\n" msgstr "" #: ../netstat.c:1510 #, c-format msgid " -p, --programs display PID/Program name for sockets\n" msgstr "" #: ../netstat.c:1511 #, c-format msgid "" " -c, --continuous continuous listing\n" "\n" msgstr "" #: ../netstat.c:1512 #, c-format msgid " -l, --listening display listening server sockets\n" msgstr "" #: ../netstat.c:1513 #, c-format msgid "" " -a, --all, --listening display all sockets (default: connected)\n" msgstr "" #: ../netstat.c:1514 #, c-format msgid " -o, --timers display timers\n" msgstr "" #: ../netstat.c:1515 ../route.c:89 #, c-format msgid "" " -F, --fib display Forwarding Information Base " "(default)\n" msgstr "" #: ../netstat.c:1516 ../route.c:90 #, c-format msgid "" " -C, --cache display routing cache instead of FIB\n" "\n" msgstr "" #: ../netstat.c:1518 #, c-format msgid "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --" "netrom\n" msgstr "" #: ../netstat.c:1519 #, c-format msgid " =Use '-6|-4' or '-A ' or '--'; default: %s\n" msgstr "" #: ../netstat.c:1520 ../route.c:93 #, c-format msgid " List of possible address families (which support routing):\n" msgstr "" #: ../netstat.c:1753 #, c-format msgid "Active Internet connections " msgstr "" #: ../netstat.c:1763 #, c-format msgid "" "\n" "Proto Recv-Q Send-Q Local Address Foreign Address " "State " msgstr "" #: ../netstat.c:1765 #, c-format msgid " User Inode " msgstr "" #: ../netstat.c:1768 #, c-format msgid " Timer" msgstr "" #: ../netstat.c:1798 #, c-format msgid "IPv4 Group Memberships\n" msgstr "" #: ../netstat.c:1799 #, c-format 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 #, c-format msgid "Usage: rarp -a list entries in cache.\n" msgstr "" #: ../rarp.c:177 #, c-format msgid " rarp -d delete entry from cache.\n" msgstr "" #: ../rarp.c:178 #, c-format msgid " rarp [] -s add entry to cache.\n" msgstr "" #: ../rarp.c:179 #, c-format msgid "" " rarp -f add entries from /etc/ethers.\n" msgstr "" #: ../rarp.c:180 #, c-format 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 #, c-format msgid "" "Usage: route [-nNvee] [-FC] [] List kernel routing tables\n" msgstr "" #: ../route.c:81 #, c-format msgid "" " route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.\n" "\n" msgstr "" #: ../route.c:83 #, c-format msgid "" " route {-h|--help} [] Detailed usage syntax for " "specified AF.\n" msgstr "" #: ../route.c:84 #, c-format msgid "" " route {-V|--version} Display version/author and " "exit.\n" "\n" msgstr "" #: ../route.c:92 #, c-format msgid " =Use '-A ' or '--'; default: %s\n" msgstr "" #: ../plipconfig.c:66 #, c-format msgid "Usage: plipconfig [-a] [-i] [-v] interface\n" msgstr "" #: ../plipconfig.c:67 #, c-format msgid " [nibble NN] [trigger NN]\n" msgstr "" #: ../plipconfig.c:68 #, c-format msgid " plipconfig -V | --version\n" msgstr "" #: ../plipconfig.c:74 #, c-format msgid "%s\tnibble %lu trigger %lu\n" msgstr "" #: ../iptunnel.c:85 #, c-format msgid "Usage: iptunnel { add | change | del | show } [ NAME ]\n" msgstr "" #: ../iptunnel.c:86 #, c-format msgid "" " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" msgstr "" #: ../iptunnel.c:87 #, c-format msgid " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" msgstr "" #: ../iptunnel.c:88 #, c-format msgid " [ ttl TTL ] [ tos TOS ] [ nopmtudisc ] [ dev PHYS_DEV ]\n" msgstr "" #: ../iptunnel.c:89 #, c-format msgid "" " iptunnel -V | --version\n" "\n" msgstr "" #: ../iptunnel.c:90 #, c-format msgid "Where: NAME := STRING\n" msgstr "" #: ../iptunnel.c:91 #, c-format msgid " ADDR := { IP_ADDRESS | any }\n" msgstr "" #: ../iptunnel.c:92 #, c-format msgid " TOS := { NUMBER | inherit }\n" msgstr "" #: ../iptunnel.c:93 #, c-format msgid " TTL := { 1..255 | inherit }\n" msgstr "" #: ../iptunnel.c:94 #, c-format msgid " KEY := { DOTTED_QUAD | NUMBER }\n" msgstr "" #: ../iptunnel.c:332 #, c-format msgid "Keys are not allowed with ipip and sit.\n" msgstr "" #: ../iptunnel.c:352 #, c-format msgid "Broadcast tunnel requires a source address.\n" msgstr "" #: ../iptunnel.c:367 #, c-format msgid "ttl != 0 and noptmudisc are incompatible\n" msgstr "" #: ../iptunnel.c:379 #, c-format 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 #, c-format msgid " Drop packets out of sequence.\n" msgstr "" #: ../iptunnel.c:455 #, c-format msgid " Checksum in received packet is required.\n" msgstr "" #: ../iptunnel.c:457 #, c-format msgid " Sequence packets on output.\n" msgstr "" #: ../iptunnel.c:459 #, c-format msgid " Checksum output packets.\n" msgstr "" #: ../iptunnel.c:487 #, c-format 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 #, c-format msgid "RX: Packets Bytes Errors CsumErrs OutOfSeq Mcasts\n" msgstr "" #: ../iptunnel.c:519 #, c-format 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 reassemblies 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 requests: %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 connection 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 sent out" msgstr "" #: ../statistics.c:129 #, c-format msgid "%u segments retransmitted" 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 packetes rejected 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 dropped" msgstr "" #: ../statistics.c:176 #, c-format msgid "%u packets directly queued to recvmsg prequeue" msgstr "" #: ../statistics.c:178 #, c-format msgid "%u bytes directly in process context from backlog" msgstr "" #: ../statistics.c:179 #, c-format msgid "%u bytes directly received in process context from prequeue" msgstr "" #: ../statistics.c:181 #, c-format msgid "%u packets dropped from prequeue" msgstr "" #: ../statistics.c:182 #, c-format msgid "%u packet headers predicted" msgstr "" #: ../statistics.c:183 #, c-format msgid "%u packet headers predicted and directly queued to user" msgstr "" #: ../statistics.c:185 #, c-format msgid "Ran %u times out of system memory during packet sending" msgstr "" #: ../statistics.c:187 #, c-format msgid "%u acknowledgments not containing data payload received" msgstr "" #: ../statistics.c:188 #, c-format msgid "%u predicted acknowledgments" msgstr "" #: ../statistics.c:189 #, c-format msgid "%u times recovered from packet loss due to fast retransmit" msgstr "" #: ../statistics.c:190 #, c-format msgid "%u times recovered from packet loss by selective acknowledgements" msgstr "" #: ../statistics.c:191 #, c-format msgid "%u bad SACK blocks received" msgstr "" #: ../statistics.c:192 #, c-format msgid "Detected reordering %u times using FACK" msgstr "" #: ../statistics.c:193 #, c-format msgid "Detected reordering %u times using SACK" msgstr "" #: ../statistics.c:194 #, c-format msgid "Detected reordering %u times using time stamp" msgstr "" #: ../statistics.c:195 #, c-format msgid "Detected reordering %u times using reno fast retransmit" msgstr "" #: ../statistics.c:196 #, c-format msgid "%u congestion windows fully recovered without slow start" msgstr "" #: ../statistics.c:197 #, c-format msgid "%u congestion windows partially recovered using Hoe heuristic" msgstr "" #: ../statistics.c:198 #, c-format msgid "%u congestion window recovered without slow start using DSACK" msgstr "" #: ../statistics.c:199 #, c-format msgid "%u congestion windows recovered without slow start after partial ack" msgstr "" #: ../statistics.c:200 #, c-format msgid "%u retransmits lost" msgstr "" #: ../statistics.c:201 #, c-format msgid "%u timeouts after reno fast retransmit" msgstr "" #: ../statistics.c:202 #, c-format msgid "%u timeouts after SACK recovery" msgstr "" #: ../statistics.c:203 #, c-format msgid "%u timeouts in loss state" msgstr "" #: ../statistics.c:204 #, c-format msgid "%u fast retransmits" msgstr "" #: ../statistics.c:205 #, c-format msgid "%u forward retransmits" msgstr "" #: ../statistics.c:206 #, c-format msgid "%u retransmits in slow start" msgstr "" #: ../statistics.c:207 #, c-format msgid "%u other TCP timeouts" msgstr "" #: ../statistics.c:208 #, c-format msgid "%u reno fast retransmits failed" msgstr "" #: ../statistics.c:209 #, c-format msgid "%u SACK retransmits failed" msgstr "" #: ../statistics.c:210 #, c-format msgid "%u times receiver scheduled too late for direct processing" msgstr "" #: ../statistics.c:211 #, c-format msgid "%u packets collapsed in receive queue due to low socket buffer" msgstr "" #: ../statistics.c:212 #, c-format msgid "%u DSACKs sent for old packets" msgstr "" #: ../statistics.c:213 #, c-format msgid "%u DSACKs sent for out of order packets" msgstr "" #: ../statistics.c:214 #, c-format msgid "%u DSACKs received" msgstr "" #: ../statistics.c:215 #, c-format msgid "%u DSACKs for out of order packets received" msgstr "" #: ../statistics.c:216 #, c-format msgid "%u connections reset due to unexpected SYN" msgstr "" #: ../statistics.c:217 #, c-format msgid "%u connections reset due to unexpected data" msgstr "" #: ../statistics.c:218 #, c-format msgid "%u connections reset due to early user close" msgstr "" #: ../statistics.c:219 #, c-format msgid "%u connections aborted due to memory pressure" msgstr "" #: ../statistics.c:220 #, c-format msgid "%u connections aborted due to timeout" msgstr "" #: ../statistics.c:221 #, c-format msgid "%u connections aborted after user close in linger timeout" msgstr "" #: ../statistics.c:222 #, c-format msgid "%u times unabled to send RST due to no memory" msgstr "" #: ../statistics.c:223 #, c-format msgid "TCP ran low on memory %u times" msgstr "" #: ../statistics.c:224 #, c-format msgid "%u TCP data loss events" msgstr "" #: ../statistics.c:225 #, c-format msgid "%u congestion windows recovered without slow start by DSACK" msgstr "" #: ../statistics.c:227 #, c-format msgid "%u classic Reno fast retransmits failed" msgstr "" #: ../statistics.c:294 msgid "enabled" msgstr "" #: ../statistics.c:294 msgid "disabled" msgstr "" #: ../statistics.c:377 msgid "error parsing /proc/net/snmp" msgstr "" #: ../statistics.c:390 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:161 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:182 msgid "AMPR AX.25" msgstr "" #: ../lib/af.c:167 ../lib/hw.c:188 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:223 msgid "Econet" msgstr "" #: ../lib/af.c:179 msgid "CCITT X.25" msgstr "" #: ../lib/af.c:182 ../lib/hw.c:185 msgid "AMPR ROSE" msgstr "" #: ../lib/af.c:185 ../lib/hw.c:173 msgid "Ash" msgstr "" #: ../lib/af.c:243 #, c-format msgid "Please don't supply more than one address family.\n" msgstr "" #: ../lib/af.c:304 #, c-format 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 #, c-format 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:145 ../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 #, c-format msgid "AX.25 not configured in this system.\n" msgstr "" #: ../lib/ax25_gr.c:50 #, c-format msgid "Kernel AX.25 routing table\n" msgstr "" #. xxx #: ../lib/ax25_gr.c:51 ../lib/rose_gr.c:55 #, c-format msgid "Destination Iface Use\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:160 msgid "Local Loopback" msgstr "" #: ../lib/hw.c:163 msgid "Serial Line IP" msgstr "" #: ../lib/hw.c:164 msgid "VJ Serial Line IP" msgstr "" #: ../lib/hw.c:165 msgid "6-bit Serial Line IP" msgstr "" #: ../lib/hw.c:166 msgid "VJ 6-bit Serial Line IP" msgstr "" #: ../lib/hw.c:167 msgid "Adaptive Serial Line IP" msgstr "" #: ../lib/hw.c:170 msgid "Ethernet" msgstr "" #: ../lib/hw.c:176 msgid "Fiber Distributed Data Interface" msgstr "" #: ../lib/hw.c:179 msgid "HIPPI" msgstr "" #: ../lib/hw.c:191 msgid "generic X.25" msgstr "" #: ../lib/hw.c:194 msgid "IPIP Tunnel" msgstr "" #: ../lib/hw.c:197 msgid "Point-to-Point Protocol" msgstr "" #: ../lib/hw.c:200 msgid "(Cisco)-HDLC" msgstr "" #: ../lib/hw.c:201 msgid "LAPB" msgstr "" #: ../lib/hw.c:204 msgid "ARCnet" msgstr "" #: ../lib/hw.c:207 msgid "Frame Relay DLCI" msgstr "" #: ../lib/hw.c:208 msgid "Frame Relay Access Device" msgstr "" #: ../lib/hw.c:211 msgid "IPv6-in-IPv4" msgstr "" #: ../lib/hw.c:214 msgid "IrLAP" msgstr "" #: ../lib/hw.c:217 msgid "16/4 Mbps Token Ring" msgstr "" #: ../lib/hw.c:219 msgid "16/4 Mbps Token Ring (New)" msgstr "" #: ../lib/hw.c:226 msgid "Generic EUI-64" msgstr "" #: ../lib/inet.c:153 ../lib/inet6.c:94 #, c-format msgid "rresolve: unsupport address family %d !\n" msgstr "" #: ../lib/inet6.c:147 msgid "[UNKNOWN]" msgstr "" #: ../lib/inet6_gr.c:71 #, c-format msgid "INET6 (IPv6) not configured in this system.\n" msgstr "" #: ../lib/inet6_gr.c:76 #, c-format msgid "Kernel IPv6 routing cache\n" msgstr "" #: ../lib/inet6_gr.c:78 #, c-format msgid "Kernel IPv6 routing table\n" msgstr "" #: ../lib/inet6_gr.c:80 #, c-format msgid "" "Destination Next Hop Flag Met Ref Use " "If\n" msgstr "" #: ../lib/inet6_gr.c:174 #, c-format msgid "Kernel IPv6 Neighbour Cache\n" msgstr "" #: ../lib/inet6_gr.c:177 #, c-format msgid "" "Neighbour HW Address Iface Flags " "Ref State\n" msgstr "" #: ../lib/inet6_gr.c:181 #, c-format msgid "" "Neighbour HW Address Iface Flags " "Ref State Stale(sec) Delete(sec)\n" msgstr "" #: ../lib/inet6_sr.c:46 #, c-format msgid "Usage: inet6_route [-vF] del Target\n" msgstr "" #: ../lib/inet6_sr.c:47 #, c-format msgid " inet6_route [-vF] add Target [gw Gw] [metric M] [[dev] If]\n" msgstr "" #: ../lib/inet6_sr.c:48 #, c-format msgid " inet6_route [-FC] flush NOT supported\n" msgstr "" #: ../lib/inet6_sr.c:188 #, c-format msgid "Flushing `inet6' routing table not supported\n" msgstr "" #: ../lib/inet_gr.c:50 ../lib/inet_gr.c:220 #, c-format msgid "INET (IPv4) not configured in this system.\n" msgstr "" #: ../lib/inet_gr.c:53 #, c-format msgid "Kernel IP routing table\n" msgstr "" #: ../lib/inet_gr.c:56 #, c-format msgid "" "Destination Gateway Genmask Flags Metric Ref Use " "Iface\n" msgstr "" #: ../lib/inet_gr.c:59 #, c-format msgid "" "Destination Gateway Genmask Flags MSS Window irtt " "Iface\n" msgstr "" #: ../lib/inet_gr.c:62 #, c-format msgid "" "Destination Gateway Genmask Flags Metric Ref Use " "Iface MSS Window irtt\n" msgstr "" #: ../lib/inet_gr.c:237 #, c-format msgid "Kernel IP routing cache\n" msgstr "" #: ../lib/inet_gr.c:258 #, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface\n" msgstr "" #: ../lib/inet_gr.c:261 #, c-format msgid "" "Source Destination Gateway Flags MSS Window irtt " "Iface\n" msgstr "" #: ../lib/inet_gr.c:266 #, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface MSS Window irtt HH Arp\n" msgstr "" #: ../lib/inet_gr.c:290 #, c-format msgid "" "Source Destination Gateway Flags Metric Ref Use " "Iface MSS Window irtt TOS HHRef HHUptod SpecDst\n" msgstr "" #: ../lib/inet_sr.c:51 #, c-format msgid "" "Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] " "[[dev] If]\n" msgstr "" #: ../lib/inet_sr.c:52 #, c-format msgid "" " inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M]\n" msgstr "" #: ../lib/inet_sr.c:53 #, c-format msgid "" " [netmask N] [mss Mss] [window W] [irtt I]\n" msgstr "" #: ../lib/inet_sr.c:54 #, c-format msgid " [mod] [dyn] [reinstate] [[dev] If]\n" msgstr "" #: ../lib/inet_sr.c:55 #, c-format msgid "" " inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject\n" msgstr "" #: ../lib/inet_sr.c:56 #, c-format 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 #, c-format msgid "route: Invalid MSS/MTU.\n" msgstr "" #: ../lib/inet_sr.c:187 #, c-format msgid "route: Invalid window.\n" msgstr "" #: ../lib/inet_sr.c:203 #, c-format 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 #, c-format msgid "route: netmask doesn't match route address\n" msgstr "" #: ../lib/inet_sr.c:306 #, c-format msgid "Flushing `inet' routing table not supported\n" msgstr "" #: ../lib/inet_sr.c:310 #, c-format msgid "Modifying `inet' routing cache not supported\n" msgstr "" #: ../lib/ipx_gr.c:52 #, c-format msgid "IPX not configured in this system.\n" msgstr "" #: ../lib/ipx_gr.c:56 #, c-format msgid "Kernel IPX routing table\n" msgstr "" #. xxx #: ../lib/ipx_gr.c:57 #, c-format msgid "Destination Router Net Router Node\n" msgstr "" #: ../lib/ipx_sr.c:33 #, c-format msgid "IPX: this needs to be written\n" msgstr "" #: ../lib/masq_info.c:198 #, c-format msgid "IP masquerading entries\n" msgstr "" #: ../lib/masq_info.c:201 #, c-format msgid "prot expire source destination ports\n" msgstr "" #: ../lib/masq_info.c:204 #, c-format msgid "" "prot expire initseq delta prevd source " "destination ports\n" msgstr "" #: ../lib/netrom_gr.c:48 #, c-format msgid "NET/ROM not configured in this system.\n" msgstr "" #: ../lib/netrom_gr.c:51 #, c-format msgid "Kernel NET/ROM routing table\n" msgstr "" #: ../lib/netrom_gr.c:52 #, c-format msgid "Destination Mnemonic Quality Neighbour Iface\n" msgstr "" #: ../lib/netrom_sr.c:34 #, c-format msgid "netrom usage\n" msgstr "" #: ../lib/netrom_sr.c:44 #, c-format msgid "NET/ROM: this needs to be written\n" msgstr "" #: ../lib/ppp.c:44 #, c-format msgid "You cannot start PPP with this program.\n" msgstr "" #: ../lib/ppp_ac.c:38 #, c-format msgid "Sorry, use pppd!\n" msgstr "" #: ../lib/rose.c:87 msgid "Node address must be ten digits" msgstr "" #: ../lib/rose_gr.c:51 #, c-format msgid "ROSE not configured in this system.\n" msgstr "" #: ../lib/rose_gr.c:54 #, c-format msgid "Kernel ROSE routing table\n" msgstr "" #: ../lib/tr.c:86 ../lib/tr.c:101 #, c-format msgid "in_tr(%s): invalid token ring address!\n" msgstr "" #: ../lib/tr.c:113 #, c-format msgid "in_tr(%s): trailing : ignored!\n" msgstr "" #: ../lib/tr.c:125 #, c-format msgid "in_tr(%s): trailing junk!\n" msgstr "" #: ../lib/interface.c:174 #, c-format msgid "warning: no inet socket available: %s\n" msgstr "" #: ../lib/interface.c:323 #, c-format msgid "Warning: cannot open %s (%s). Limited output.\n" msgstr "" #. Give better error message for this case. #: ../lib/interface.c:570 msgid "Device not found" msgstr "" #: ../lib/interface.c:574 #, c-format msgid "%s: error fetching interface information: %s\n" msgstr "" #: ../lib/interface.c:607 msgid " - no statistics available -" msgstr "" #: ../lib/interface.c:611 #, c-format msgid "[NO FLAGS]" msgstr "" #: ../lib/interface.c:687 #, c-format msgid "%-9.9s Link encap:%s " msgstr "" #: ../lib/interface.c:692 #, c-format msgid "HWaddr %s " msgstr "" #: ../lib/interface.c:695 #, c-format msgid "Media:%s" msgstr "" #: ../lib/interface.c:697 #, c-format msgid "(auto)" msgstr "" #: ../lib/interface.c:704 #, c-format msgid " %s addr:%s " msgstr "" #: ../lib/interface.c:707 #, c-format msgid " P-t-P:%s " msgstr "" #: ../lib/interface.c:710 #, c-format msgid " Bcast:%s " msgstr "" #: ../lib/interface.c:712 #, c-format msgid " Mask:%s\n" msgstr "" #: ../lib/interface.c:729 #, c-format msgid " inet6 addr: %s/%d" msgstr "" #: ../lib/interface.c:731 #, c-format msgid " Scope:" msgstr "" #: ../lib/interface.c:734 #, c-format msgid "Global" msgstr "" #: ../lib/interface.c:737 #, c-format msgid "Link" msgstr "" #: ../lib/interface.c:740 #, c-format msgid "Site" msgstr "" #: ../lib/interface.c:743 #, c-format msgid "Compat" msgstr "" #: ../lib/interface.c:746 #, c-format msgid "Host" msgstr "" #: ../lib/interface.c:749 #, c-format msgid "Unknown" msgstr "" #: ../lib/interface.c:764 #, c-format msgid " IPX/Ethernet II addr:%s\n" msgstr "" #: ../lib/interface.c:767 #, c-format msgid " IPX/Ethernet SNAP addr:%s\n" msgstr "" #: ../lib/interface.c:770 #, c-format msgid " IPX/Ethernet 802.2 addr:%s\n" msgstr "" #: ../lib/interface.c:773 #, c-format msgid " IPX/Ethernet 802.3 addr:%s\n" msgstr "" #: ../lib/interface.c:783 #, c-format msgid " EtherTalk Phase 2 addr:%s\n" msgstr "" #: ../lib/interface.c:792 #, c-format msgid " econet addr:%s\n" msgstr "" #: ../lib/interface.c:799 #, c-format msgid "[NO FLAGS] " msgstr "" #: ../lib/interface.c:801 #, c-format msgid "UP " msgstr "" #: ../lib/interface.c:803 #, c-format msgid "BROADCAST " msgstr "" #: ../lib/interface.c:805 #, c-format msgid "DEBUG " msgstr "" #: ../lib/interface.c:807 #, c-format msgid "LOOPBACK " msgstr "" #: ../lib/interface.c:809 #, c-format msgid "POINTOPOINT " msgstr "" #: ../lib/interface.c:811 #, c-format msgid "NOTRAILERS " msgstr "" #: ../lib/interface.c:813 #, c-format msgid "RUNNING " msgstr "" #: ../lib/interface.c:815 #, c-format msgid "NOARP " msgstr "" #: ../lib/interface.c:817 #, c-format msgid "PROMISC " msgstr "" #: ../lib/interface.c:819 #, c-format msgid "ALLMULTI " msgstr "" #: ../lib/interface.c:821 #, c-format msgid "SLAVE " msgstr "" #: ../lib/interface.c:823 #, c-format msgid "MASTER " msgstr "" #: ../lib/interface.c:825 #, c-format msgid "MULTICAST " msgstr "" #: ../lib/interface.c:828 #, c-format msgid "DYNAMIC " msgstr "" #. DONT FORGET TO ADD THE FLAGS IN ife_print_short #: ../lib/interface.c:831 #, c-format msgid " MTU:%d Metric:%d" msgstr "" #: ../lib/interface.c:835 #, c-format msgid " Outfill:%d Keepalive:%d" msgstr "" #: ../lib/interface.c:849 #, c-format msgid "RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n" msgstr "" #: ../lib/interface.c:854 #, c-format msgid " compressed:%lu\n" msgstr "" #: ../lib/interface.c:894 #, c-format msgid "TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n" msgstr "" #: ../lib/interface.c:898 #, c-format msgid " collisions:%lu " msgstr "" #: ../lib/interface.c:900 #, c-format msgid "compressed:%lu " msgstr "" #: ../lib/interface.c:902 #, c-format msgid "txqueuelen:%d " msgstr "" #: ../lib/interface.c:904 #, c-format msgid "RX bytes:%llu (%lu.%lu %s) TX bytes:%llu (%lu.%lu %s)\n" msgstr "" #: ../lib/interface.c:915 #, c-format msgid "Interrupt:%d " msgstr "" #. Only print devices using it for #. I/O maps #: ../lib/interface.c:918 #, c-format msgid "Base address:0x%x " msgstr "" #: ../lib/interface.c:920 #, c-format msgid "Memory:%lx-%lx " msgstr "" #: ../lib/interface.c:923 #, c-format msgid "DMA chan:%x " msgstr "" #: ../lib/sockets.c:63 #, c-format 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 #, c-format msgid "Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n" msgstr "" #: ../ipmaddr.c:62 #, c-format msgid " ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n" msgstr "" #: ../ipmaddr.c:63 #, c-format 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 #, c-format 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 #, c-format msgid "slattach: tty name too long\n" msgstr "" #: ../slattach.c:498 #, c-format msgid "slattach: tty_open: cannot get current state!\n" msgstr "" #: ../slattach.c:505 #, c-format msgid "slattach: tty_open: cannot get current line disc!\n" msgstr "" #: ../slattach.c:513 #, c-format 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 #, c-format 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 "" net-tools-1.60+git20180626.aebd88e/po/pt_BR.po000066400000000000000000001727711331436560500202240ustar00rootroot00000000000000# Brazilian Portuguese translation for net-tools 1.54 # Copyright (C) 2000 Free Software Foundation, Inc. # Arnaldo Carvalho de Melo , 2000. # # $Id: pt_BR.po,v 1.8 2006/12/14 23:36:24 ecki Exp $ # Brazilian portuguese translation for net-tools 1.54 # Copyright (C) 1998, 1999 Free Software Foundation, Inc. # Arnaldo Carvalho de Melo , 1998-2000 # Ralf Baechle , 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 \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-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 HWtype HWaddress Flags Mask " "Iface\n" msgstr "" "Endereço TipoHW EndereçoHW Flags Mascara " "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 " " msgstr " " #: ../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] [] [-i ] [-a] [] <-Display ARP " "cache\n" msgstr "" "Uso:\n" " arp [-vn] [] [-i ] [-a] [] <-Mostra cache " "ARP\n" #: ../arp.c:614 msgid "" " arp [-v] [-i ] -d [pub][nopub] <-Delete ARP " "entry\n" msgstr "" " arp [-v] [-i ] -d [pub][nopub] <-Remove entrada " "ARP\n" #: ../arp.c:615 msgid "" " arp [-vnD] [] [-i ] -f [] <-Add entry from " "file\n" msgstr "" " arp [-vnD] [] [-i ] -f [] <-Inclui entrada de " "arquivo\n" #: ../arp.c:616 msgid "" " arp [-v] [] [-i ] -s [temp][nopub] <-Add " "entry\n" msgstr "" " arp [-v] [] [-i ] -s [temp][nopub] <-Inc. " "Entrada\n" #: ../arp.c:617 msgid "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" msgstr "" " arp [-v] [] [-i ] -s [netmask ] pub " "<-''-\n" #: ../arp.c:618 msgid "" " arp [-v] [] [-i ] -Ds [netmask ] pub " "<-''-\n" "\n" msgstr "" " arp [-v] [] [-i ] -Ds [netmask ] 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 from given device\n" msgstr " -D, --use-device leia 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 " =Use '-H ' to specify hardware address type. Default: %s\n" msgstr "" " =Use '-H ' 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] [[]
]\n" msgstr "" "Uso:\n" " ifconfig [-a] [-i] [-v] [[] ]\n" #: ../ifconfig.c:425 msgid " [add
[/]]\n" msgstr " [add [/]]\n" #: ../ifconfig.c:427 msgid " [del
[/]]\n" msgstr " [del [/]]\n" #: ../ifconfig.c:432 msgid " [[-]broadcast [
]] [[-]pointopoint [
]]\n" msgstr " [[-]broadcast []] [[-]pointopoint []]\n" #: ../ifconfig.c:433 msgid " [netmask
] [dstaddr
] [tunnel
]\n" msgstr " [netmask ] [dstaddr ] [tunnel ]\n" #: ../ifconfig.c:436 msgid " [outfill ] [keepalive ]\n" msgstr " [outfill ] [keepalive ]\n" #: ../ifconfig.c:438 msgid " [hw
] [metric ] [mtu ]\n" msgstr " [hw ] [metric ] [mtu ]\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 ] [io_addr ] [irq ] [media ]\n" msgstr " [mem_start ] [io_addr ] [irq ] [media ]\n" #: ../ifconfig.c:443 msgid " [txqueuelen ]\n" msgstr " [txqueuelen ]\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 " =Hardware Type.\n" msgstr " =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 " =Address family. Default: %s\n" msgstr " =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] [] -r netstat " "{-V|--version|-h|--help}\n" msgstr "" "uso: netstat [-veenNcCF] [] -r netstat {-V|--version|-h|--help}\n" #: ../netstat.c:1426 msgid " netstat [-vnNcaeol] [ ...]\n" msgstr " netstat [-vnNcaeo] []\n" #: ../netstat.c:1427 msgid "" " netstat { [-veenNac] -i | [-cnNe] -M | -s }\n" "\n" msgstr " netstat [-vnNcaeo] []\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 "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" msgstr "" " ={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx " "--netrom\n" #: ../netstat.c:1449 ../route.c:92 #, c-format msgid " =Use '-A ' or '--' Default: %s\n" msgstr " =Use '-A ' ou [--' 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 delete entry from cache.\n" msgstr "" " rarp -d máquina remove entrada do cache\n" #: ../rarp.c:177 msgid " rarp [] -s 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] [] 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} [] 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 reassemblies 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: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 connection 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 sent out" msgstr "%d segmentos enviados" #: ../statistics.c:127 #, c-format msgid "%d segments retransmitted" 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" #. better translation? #: ../lib/interface.c:504 msgid "Device not found" msgstr "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" #: ../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" net-tools-1.60+git20180626.aebd88e/rarp.c000066400000000000000000000171461331436560500173420ustar00rootroot00000000000000/* * 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.9 2007/12/02 02:19:52 ecki 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 1997-08-03 * gettext instead of catgets: Arnaldo Carvalho de Melo 1998-06-29 * 1998-01-01 Bernd Eckenfels reorganised usage() * 2001-04-04 Arnaldo Carvalho de Melo - use setlocale * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define DFLT_HW "ether" #include "config.h" #include "intl.h" #include "net-support.h" #include "version.h" #include "pathnames.h" #include "proc.h" static char no_rarp_message[] = N_("This kernel does not support RARP.\n"); static char *Release = RELEASE; static const 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_storage sas; struct sockaddr *sap = (struct sockaddr *)&sas; if (hardware->input(hw_addr, &sas)) { 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 = proc_fopen(_PATH_PROCNET_RARP); 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(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: rarp -a list entries in cache.\n")); fprintf(fp, _(" rarp -d delete entry from cache.\n")); fprintf(fp, _(" rarp [] -s add entry to cache.\n")); fprintf(fp, _(" rarp -f add entries from /etc/ethers.\n")); fprintf(fp, _(" rarp -V display program version.\n\n")); fprintf(fp, _(" =Use '-H ' to specify hardware address type. Default: %s\n"), DFLT_HW); fprintf(fp, _(" List of possible hardware types (which support ARP):\n")); print_hwlist(1); /* 1 = ARPable */ exit(rc); } #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(E_USAGE); case 'V': printf("%s\n", Release); 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(E_OPTERR); } 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(E_OPTERR); } break; case 1: if (nargs == 2) { usage(E_OPTERR); exit(1); } else { args[nargs++] = optarg; } break; default: usage(E_OPTERR); } } while (c != EOF); if (hardware == NULL) { fprintf(stderr, _("rarp: %s: unknown hardware type.\n"), optarg); exit(1); } switch (mode) { case 0: usage(E_OPTERR); case MODE_DISPLAY: if (nargs != (mode - 1)) { usage(E_OPTERR); } result = display_cache(); break; case MODE_DELETE: case MODE_SET: if (nargs != (mode - 1)) { usage(E_OPTERR); } 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(E_OPTERR); 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); } net-tools-1.60+git20180626.aebd88e/route.c000066400000000000000000000153261331436560500175320ustar00rootroot00000000000000/* * route This file contains an implementation of the command * that manages the IP routing table in the kernel. * * Version: $Id: route.c,v 1.10 2002/07/30 05:24:20 ecki Exp $ * * Maintainer: Bernd 'eckes' Eckenfels, * * Author: Fred N. van Kempen, * (derived from FvK's 'route.c 1.70 01/04/94') * * Modifications: * Johannes Stille: for Net-2Debugged by * * 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 #include #include #include /* #include realy broken */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "net-support.h" #include "config.h" #include "intl.h" #include "pathnames.h" #include "version.h" #include "util.h" #define DFLT_AF "inet" #define FEATURE_ROUTE #include "lib/net-features.h" /* needs some of the system includes above! */ static char *Release = RELEASE; int opt_n = 0; // numerical output FLAG_NUM | FLAG_SYM 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; // selected address family static void usage(int rc) { FILE *fp = rc ? stderr : stdout; fprintf(fp, _("Usage: route [-nNvee] [-FC] [] List kernel routing tables\n")); fprintf(fp, _(" route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.\n\n")); fprintf(fp, _(" route {-h|--help} [] Detailed usage syntax for specified AF.\n")); fprintf(fp, _(" route {-V|--version} Display version/author and exit.\n\n")); fprintf(fp, _(" -v, --verbose be verbose\n")); fprintf(fp, _(" -n, --numeric don't resolve names\n")); fprintf(fp, _(" -e, --extend display other/more information\n")); fprintf(fp, _(" -F, --fib display Forwarding Information Base (default)\n")); fprintf(fp, _(" -C, --cache display routing cache instead of FIB\n\n")); fprintf(fp, _(" =Use -4, -6, '-A ' or '--'; default: %s\n"), DFLT_AF); fprintf(fp, _(" List of possible address families (which support routing):\n")); print_aflist(1); /* 1 = routeable */ exit(rc); } static void version(void) { printf("%s\n%s\n", Release, 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") || !strcmp(*tmp, "-host")) (*tmp)[0]='#'; } /* Fetch the command-line arguments. */ while ((i = getopt_long(argc, argv, "A:eCFhnN64Vv?", 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 '6': if ((i = aftrans_opt("inet6"))) exit(i); break; case '4': if ((i = aftrans_opt("inet"))) exit(i); break; case 'V': version(); case 'h': case '?': opt_h++; break; default: usage(E_OPTERR); } argv += optind; argc -= optind; if (opt_h) { if (!afname[0]) usage(E_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(E_OPTERR); } } 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); return (i); } net-tools-1.60+git20180626.aebd88e/slattach.c000066400000000000000000000416021331436560500201730ustar00rootroot00000000000000/* * 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, * Copyright 1988-1993 MicroWalt Corporation * * Modified: * Alan Cox, , July 16 1994 * Miquel van Smoorenburg, , October 1994 * George Shearer, , January 3, 1995 * Yossi Gottlieb, , February 11, 1995 * Peter Tobias, , July 30 1995 * Bernd Eckenfels , 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #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 #ifndef _PATH_DEVPTMX #define _PATH_DEVPTMX "/dev/ptmx" /* pseudo-terminal master */ #endif #define DEF_PROTO "cslip" static char *Release = RELEASE, *Signature = "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 */ char * path_pts = NULL; /* slave pseudo-terminal device */ 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; /* 3-wire mode 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); } /* 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); (void) close(fd); return(0); /* keep the lock anyway */ } if (fchown(fd, pw->pw_uid, pw->pw_gid)) /* keep the lock anyway */; (void) close(fd); 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 = (HUPCL | CREAD); /* UART flags */ if (opt_L) tty->c_cflag |= CLOCAL; else tty->c_cflag |= CRTSCTS; 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)\n", path_open, fd); if (!strcmp(path_open, _PATH_DEVPTMX)) { if (opt_d) printf("slattach: tty_open: trying to grantpt and unlockpt\n"); if (grantpt(fd) < 0) { if (opt_q == 0) fprintf(stderr, "slattach: tty_open: grantpt: %s\n", strerror(errno)); return(-errno); } if (unlockpt(fd) < 0) { if (opt_q == 0) fprintf(stderr, "slattach: tty_open: unlockpt: %s\n", strerror(errno)); return(-errno); } path_pts = ptsname(fd); if (path_pts == NULL) { if (opt_q == 0) fprintf(stderr, "slattach: tty_open: ptsname: %s\n", strerror(errno)); return(-errno); } if (opt_d) printf("slattach: tty_open: %s: slave pseudo-terminal is %s\n", path_open, path_pts); } } 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(int rc) { FILE *fp = rc ? stderr : stdout; 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"; fputs(usage_msg, fp); exit(rc); } static void version(void) { printf("%s\n%s\n", Release, 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 } }; 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(E_OPTERR); /*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(E_OPTERR); 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); if (path_pts != NULL) printf(_(" ptsname %s"), path_pts); 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 */ exit(system(extcmd)); } exit(0); } net-tools-1.60+git20180626.aebd88e/statistics.c000066400000000000000000000577441331436560500206000ustar00rootroot00000000000000/* * Copyright 1997,1999,2000 Andi Kleen. Subject to the GPL. * $Id: statistics.c,v 1.23 2010-10-29 19:24:36 ecki Exp $ * 19980630 - i18n - Arnaldo Carvalho de Melo * 19981113 - i18n fixes - Arnaldo Carvalho de Melo * 19990101 - added net/netstat, -t, -u, -w supprt - Bernd Eckenfels */ #include #include #include #include #include "config.h" #include "intl.h" #include "proc.h" static 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, MaxState }; #define normal number struct entry { const char *title; char *out; enum State type; }; struct statedesc { int indent; const char *title; }; static const 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 */ static const struct entry Iptab[] = { /* Keep the entries sorted! */ {"DefaultTTL", N_("Default TTL is %llu"), number | I_STATIC}, {"Forwarding", N_("Forwarding is %s"), i_forward | I_STATIC}, {"ForwDatagrams", N_("%llu forwarded"), number}, {"FragCreates", N_("%llu fragments created"), opt_number}, {"FragFails", N_("%llu fragments failed"), opt_number}, {"FragOKs", N_("%llu fragments received ok"), opt_number}, {"InAddrErrors", N_("%llu with invalid addresses"), opt_number}, {"InDelivers", N_("%llu incoming packets delivered"), number}, {"InDiscards", N_("%llu incoming packets discarded"), number}, {"InHdrErrors", N_("%llu with invalid headers"), opt_number}, {"InReceives", N_("%llu total packets received"), number}, {"InUnknownProtos", N_("%llu with unknown protocol"), opt_number}, {"OutDiscards", N_("%llu outgoing packets dropped"), opt_number}, {"OutNoRoutes", N_("%llu dropped because of missing route"), opt_number}, {"OutRequests", N_("%llu requests sent out"), number}, /*? */ {"ReasmFails", N_("%llu packet reassemblies failed"), opt_number}, {"ReasmOKs", N_("%llu packets reassembled ok"), opt_number}, {"ReasmReqds", N_("%llu reassemblies required"), opt_number}, /* ? */ {"ReasmTimeout", N_("%llu fragments dropped after timeout"), opt_number}, }; static const struct entry Ip6tab[] = { /* Keep the entries sorted! */ {"Ip6FragCreates", N_("%llu fragments created"), opt_number}, {"Ip6FragFails", N_("%llu fragments failed"), opt_number}, {"Ip6FragOKs", N_("%llu fragments received ok"), opt_number}, {"Ip6InAddrErrors", N_("%llu with invalid addresses"), opt_number}, {"Ip6InDelivers", N_("%llu incoming packets delivered"), number}, {"Ip6InDiscards", N_("%llu incoming packets discarded"), number}, {"Ip6InHdrErrors", N_("%llu with invalid headers"), opt_number}, {"Ip6InMcastPkts", N_("%llu incoming multicast packets"), opt_number}, {"Ip6InNoRoutes", N_("%llu incoming packets with no route"), opt_number}, {"Ip6InReceives", N_("%llu total packets received"), number}, {"Ip6InTooBigErrors", N_("%llu with packets too big"), opt_number}, {"Ip6InTruncatedPkts", N_("%llu with truncated packets"), opt_number}, {"Ip6InUnknownProtos", N_("%llu with unknown protocol"), opt_number}, {"Ip6OutDiscards", N_("%llu outgoing packets dropped"), opt_number}, {"Ip6OutForwDatagrams", N_("%llu forwarded"), number}, {"Ip6OutMcastPkts", N_("%llu outgoing multicast packets"), opt_number}, {"Ip6OutNoRoutes", N_("%llu dropped because of missing route"), opt_number}, {"Ip6OutRequests", N_("%llu requests sent out"), number}, /*? */ {"Ip6ReasmFails", N_("%llu packet reassemblies failed"), opt_number}, {"Ip6ReasmOKs", N_("%llu packets reassembled ok"), opt_number}, {"Ip6ReasmReqds", N_("%llu reassemblies required"), opt_number}, /* ? */ {"Ip6ReasmTimeout", N_("%llu fragments dropped after timeout"), opt_number}, }; static const struct entry Icmptab[] = { /* Keep the entries sorted! */ {"InAddrMaskReps", N_("address mask replies: %llu"), i_inp_icmp | I_TITLE}, /*? */ {"InAddrMasks", N_("address mask request: %llu"), i_inp_icmp | I_TITLE}, /*? */ {"InDestUnreachs", N_("destination unreachable: %llu"), i_inp_icmp | I_TITLE}, {"InEchoReps", N_("echo replies: %llu"), i_inp_icmp | I_TITLE}, {"InEchos", N_("echo requests: %llu"), i_inp_icmp | I_TITLE}, {"InErrors", N_("%llu input ICMP message failed"), number}, {"InMsgs", N_("%llu ICMP messages received"), number}, {"InParmProbs", N_("wrong parameters: %llu"), i_inp_icmp | I_TITLE}, /*? */ {"InRedirects", N_("redirects: %llu"), i_inp_icmp | I_TITLE}, {"InSrcQuenchs", N_("source quenches: %llu"), i_inp_icmp | I_TITLE}, {"InTimeExcds", N_("timeout in transit: %llu"), i_inp_icmp | I_TITLE}, {"InTimestampReps", N_("timestamp reply: %llu"), i_inp_icmp | I_TITLE}, {"InTimestamps", N_("timestamp request: %llu"), i_inp_icmp | I_TITLE}, {"OutAddrMaskReps", N_("address mask replies: %llu"), i_outp_icmp | I_TITLE}, {"OutAddrMasks", N_("address mask requests: %llu"), i_outp_icmp | I_TITLE}, {"OutDestUnreachs", N_("destination unreachable: %llu"), i_outp_icmp | I_TITLE}, {"OutEchoReps", N_("echo replies: %llu"), i_outp_icmp | I_TITLE}, {"OutEchos", N_("echo requests: %llu"), i_outp_icmp | I_TITLE}, {"OutErrors", N_("%llu ICMP messages failed"), number}, {"OutMsgs", N_("%llu ICMP messages sent"), number}, {"OutParmProbs", N_("wrong parameters: %llu"), i_outp_icmp | I_TITLE}, /*? */ {"OutRedirects", N_("redirect: %llu"), i_outp_icmp | I_TITLE}, {"OutSrcQuenchs", N_("source quench: %llu"), i_outp_icmp | I_TITLE}, {"OutTimeExcds", N_("time exceeded: %llu"), i_outp_icmp | I_TITLE}, {"OutTimestampReps", N_("timestamp replies: %llu"), i_outp_icmp | I_TITLE}, {"OutTimestamps", N_("timestamp requests: %llu"), i_outp_icmp | I_TITLE}, }; static const struct entry Icmp6tab[] = { /* Keep the entries sorted! */ {"Icmp6InDestUnreachs", N_("destination unreachable: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InEchoReplies", N_("echo replies: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InEchos", N_("echo requests: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InErrors", N_("%llu input ICMP message failed"), number}, {"Icmp6InGroupMembQueries", N_("group member queries: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InGroupMembReductions", N_("group member reductions: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InGroupMembResponses", N_("group member responses: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InMsgs", N_("%llu ICMP messages received"), number}, {"Icmp6InNeighborAdvertisements", N_("neighbour advertisement: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InNeighborSolicits", N_("neighbour solicits: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InParmProblems", N_("parameter problem: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InPktTooBigs", N_("packets too big: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InRedirects", N_("redirects: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InRouterAdvertisements", N_("router advertisement: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InRouterSolicits", N_("router solicits: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6InTimeExcds", N_("received ICMPv6 time exceeded: %llu"), i_inp_icmp | I_TITLE}, {"Icmp6OutDestUnreachs", N_("destination unreachable: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutEchoReplies", N_("echo replies: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutEchos", N_("echo requests: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutGroupMembQueries", N_("group member queries: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutGroupMembReductions", N_("group member reductions: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutGroupMembResponses", N_("group member responses: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutMsgs", N_("%llu ICMP messages sent"), number}, {"Icmp6OutNeighborAdvertisements", N_("neighbor advertisements: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutNeighborSolicits", N_("neighbor solicits: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutParmProblems", N_("parameter problem: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutPktTooBigs", N_("packets too big: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutRedirects", N_("redirects: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutRouterAdvertisements ", N_("router advertisement: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutRouterSolicits", N_("router solicits: %llu"), i_outp_icmp | I_TITLE}, {"Icmp6OutTimeExcds", N_("sent ICMPv6 time exceeded: %llu"), i_outp_icmp | I_TITLE}, }; static const struct entry Tcptab[] = { /* Keep the entries sorted! */ {"ActiveOpens", N_("%llu active connection openings"), number}, {"AttemptFails", N_("%llu failed connection attempts"), number}, {"CurrEstab", N_("%llu connections established"), number}, {"EstabResets", N_("%llu connection resets received"), number}, {"InErrs", N_("%llu bad segments received"), number}, {"InSegs", N_("%llu segments received"), number}, {"MaxConn", "", number}, {"OutRsts", N_("%llu resets sent"), number}, {"OutSegs", N_("%llu segments sent out"), number}, {"PassiveOpens", N_("%llu passive connection openings"), number}, {"RetransSegs", N_("%llu segments retransmitted"), number}, {"RtoAlgorithm", N_("RTO algorithm is %s"), i_rto_alg | I_STATIC}, {"RtoMax", "", number}, {"RtoMin", "", number}, }; static const struct entry Udptab[] = { /* Keep the entries sorted! */ {"InDatagrams", N_("%llu packets received"), number}, {"InErrors", N_("%llu packet receive errors"), number}, {"NoPorts", N_("%llu packets to unknown port received"), number}, {"OutDatagrams", N_("%llu packets sent"), number}, {"RcvbufErrors", N_("%llu receive buffer errors"), number}, {"SndbufErrors", N_("%llu send buffer errors"), number}, }; static const struct entry Udp6tab[] = { /* Keep the entries sorted! */ {"Udp6InDatagrams", N_("%llu packets received"), number}, {"Udp6InErrors", N_("%llu packet receive errors"), number}, {"Udp6NoPorts", N_("%llu packets to unknown port received"), number}, {"Udp6OutDatagrams", N_("%llu packets sent"), number}, }; static const struct entry Tcpexttab[] = { /* Keep the entries sorted! */ {"DelayedACKLocked", N_("%llu delayed acks further delayed because of locked socket"), opt_number}, {"DelayedACKLost", N_("Quick ack mode was activated %llu times"), opt_number}, {"DelayedACKs", N_("%llu delayed acks sent"), opt_number}, {"EmbryonicRsts", N_("%llu resets received for embryonic SYN_RECV sockets"), opt_number}, {"ListenDrops", N_("%llu SYNs to LISTEN sockets dropped"), opt_number}, {"ListenOverflows", N_("%llu times the listen queue of a socket overflowed"), opt_number}, {"LockDroppedIcmps", N_("%llu ICMP packets dropped because socket was locked"), opt_number}, {"OfoPruned", N_("%llu packets dropped from out-of-order queue because of socket buffer overrun"), opt_number}, {"OutOfWindowIcmps", N_("%llu ICMP packets dropped because they were out-of-window"), opt_number}, {"PAWSActive", N_("%llu active connections rejected because of time stamp"), opt_number}, {"PAWSEstab", N_("%llu packetes rejected in established connections because of timestamp"), opt_number}, {"PAWSPassive", N_("%llu passive connections rejected because of time stamp"), opt_number}, {"PruneCalled", N_("%llu packets pruned from receive queue because of socket buffer overrun"), opt_number}, {"RcvPruned", N_("%llu packets pruned from receive queue"), opt_number}, {"SockMallocOOM", N_("Ran %llu times out of system memory during packet sending"), opt_number}, {"SyncookiesFailed", N_("%llu invalid SYN cookies received"), opt_number}, {"SyncookiesRecv", N_("%llu SYN cookies received"), opt_number}, {"SyncookiesSent", N_("%llu SYN cookies sent"), opt_number}, {"TCPAbortFailed", N_("%llu times unable to send RST due to no memory"), opt_number}, {"TCPAbortOnClose", N_("%llu connections reset due to early user close"), opt_number}, {"TCPAbortOnData", N_("%llu connections reset due to unexpected data"), opt_number}, {"TCPAbortOnLinger", N_("%llu connections aborted after user close in linger timeout"), opt_number}, {"TCPAbortOnMemory", N_("%llu connections aborted due to memory pressure"), opt_number}, {"TCPAbortOnSyn", N_("%llu connections reset due to unexpected SYN"), opt_number}, {"TCPAbortOnTimeout", N_("%llu connections aborted due to timeout"), opt_number}, {"TCPDirectCopyFromBacklog", N_("%llu bytes directly in process context from backlog"), opt_number}, {"TCPDirectCopyFromPrequeue", N_("%llu bytes directly received in process context from prequeue"), opt_number}, {"TCPDSACKOfoRecv", N_("%llu DSACKs for out of order packets received"), opt_number}, {"TCPDSACKOfoSent", N_("%llu DSACKs sent for out of order packets"), opt_number}, {"TCPDSACKOldSent", N_("%llu DSACKs sent for old packets"), opt_number}, {"TCPDSACKRecv", N_("%llu DSACKs received"), opt_number}, {"TCPDSackUndo", N_("%llu congestion window recovered without slow start using DSACK"), opt_number}, {"TCPDSACKUndo", N_("%llu congestion windows recovered without slow start by DSACK"), opt_number}, {"TCPFACKReorder", N_("Detected reordering %llu times using FACK"), opt_number}, {"TCPFastRetrans", N_("%llu fast retransmits"), opt_number}, {"TCPForwardRetrans", N_("%llu forward retransmits"), opt_number}, {"TCPFullUndo", N_("%llu congestion windows fully recovered without slow start"), opt_number}, {"TCPHPAcks", N_("%llu predicted acknowledgments"), opt_number}, {"TCPHPHits", N_("%llu packet headers predicted"), number}, {"TCPHPHitsToUser", N_("%llu packet headers predicted and directly queued to user"), opt_number}, {"TCPLossFailures", N_("%llu timeouts in loss state"), opt_number}, {"TCPLoss", N_("%llu TCP data loss events"), opt_number}, {"TCPLossUndo", N_("%llu congestion windows recovered without slow start after partial ack"), opt_number}, {"TCPLostRetransmits", N_("%llu retransmits lost"), opt_number}, {"TCPMemoryPressures", N_("TCP ran low on memory %llu times"), opt_number}, {"TCPPartialUndo", N_("%llu congestion windows partially recovered using Hoe heuristic"), opt_number}, {"TCPPrequeued", N_("%llu packets directly queued to recvmsg prequeue"), opt_number}, {"TCPPrequeueDropped", N_("%llu packets dropped from prequeue"), opt_number}, {"TCPPureAcks", N_("%llu acknowledgments not containing data payload received"), opt_number}, {"TCPRcvCollapsed", N_("%llu packets collapsed in receive queue due to low socket buffer"), opt_number}, {"TCPRenoFailures", N_("%llu timeouts after reno fast retransmit"), opt_number}, {"TCPRenoRecoveryFailed", N_("%llu reno fast retransmits failed"), opt_number}, {"TCPRenoRecoveryFail", N_("%llu classic Reno fast retransmits failed"), opt_number}, {"TCPRenoRecovery", N_("%llu times recovered from packet loss due to fast retransmit"), opt_number}, {"TCPRenoReorder", N_("Detected reordering %llu times using reno fast retransmit"), opt_number}, {"TCPSackFailures", N_("%llu timeouts after SACK recovery"), opt_number}, {"TCPSackRecoveryFail", N_("%llu SACK retransmits failed"), opt_number}, {"TCPSackRecovery", N_("%llu times recovered from packet loss by selective acknowledgements"), opt_number}, {"TCPSACKReneging", N_("%llu bad SACK blocks received"), opt_number}, {"TCPSACKReorder", N_("Detected reordering %llu times using SACK"), opt_number}, {"TCPSchedulerFailed", N_("%llu times receiver scheduled too late for direct processing"), opt_number}, {"TCPSlowStartRetrans", N_("%llu retransmits in slow start"), opt_number}, {"TCPTimeouts", N_("%llu other TCP timeouts"), opt_number}, {"TCPTSReorder", N_("Detected reordering %llu times using time stamp"), opt_number}, {"TWKilled", N_("%llu TCP sockets finished time wait in slow timer"), opt_number}, {"TW", N_("%llu TCP sockets finished time wait in fast timer"), opt_number}, {"TWRecycled", N_("%llu time wait sockets recycled by time stamp"), opt_number}, }; static const struct entry Sctptab[] = { /* Keep the entries sorted! */ {"SctpAborteds", N_("%llu Number of Aborteds "), number}, {"SctpActiveEstabs", N_("%llu Active Associations"), number}, {"SctpChecksumErrors", N_("%llu Number of Packets with invalid Checksum"), number}, {"SctpCurrEstab", N_("%llu Current Associations"), number}, {"SctpFragUsrMsgs", N_("%llu Number of messages fragmented"), number}, {"SctpInCtrlChunks", N_("%llu Number of control chunks received"), number}, {"SctpInOrderChunks", N_("%llu Number of ordered chunks received"), number}, {"SctpInSCTPPacks", N_("%llu Number of SCTP packets received"), number}, {"SctpInUnorderChunks", N_("%llu Number of Unordered chunks received"), number}, {"SctpOutCtrlChunks", N_("%llu Number of control chunks sent"), number}, {"SctpOutOfBlues", N_("%llu Number of Out of Blue packets"), number}, {"SctpOutOrderChunks", N_("%llu Number of ordered chunks sent"), number}, {"SctpOutSCTPPacks", N_("%llu Number of SCTP packets sent"), number}, {"SctpOutUnorderChunks", N_("%llu Number of Unordered chunks sent"), number}, {"SctpPassiveEstabs", N_("%llu Passive Associations"), number}, {"SctpReasmUsrMsgs", N_("%llu Number of messages reassembled "), number}, {"SctpShutdowns", N_("%llu Number of Graceful Terminations"), number}, }; struct tabtab { const char *title; const struct entry *tab; size_t size; int *flag; }; static const 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}, {"Sctp", Sctptab, sizeof(Sctptab), &f_sctp}, {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp}, {NULL} }; static const struct tabtab snmp6tabs[] = { {"Ip6", Ip6tab, sizeof(Ip6tab), &f_raw}, {"Icmp6", Icmp6tab, sizeof(Icmp6tab), &f_raw}, {"Udp6", Udp6tab, sizeof(Udp6tab), &f_udp}, {"Tcp6", Tcptab, sizeof(Tcptab), &f_tcp}, {NULL} }; /* XXX IGMP */ static int cmpentries(const void *a, const void *b) { return strcmp(((struct entry *) a)->title, ((struct entry *) b)->title); } static void printval(const struct tabtab *tab, const char *title, unsigned long long 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 */ if (val) printf("%*s%s: %llu\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; } static const struct tabtab *newtable(const struct tabtab *tabs, const char *title) { const 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; } static int process_fd(FILE *f, int all, const char *filter) { size_t filter_len = filter ? strlen(filter) : 0; static char *buf1, *buf2; static size_t buf1_len, buf2_len; char *sp, *np, *p; while (getline(&buf1, &buf1_len, f) > 0) { int endflag; const struct tabtab *tab; if (buf1[0] == '\n') // skip empty first line in 2.6 kernels continue; if (getline(&buf2, &buf2_len, f) <= 0) break; sp = strchr(buf1, ':'); np = strchr(buf2, ':'); if (!np || !sp) goto formaterr; *sp = '\0'; if (!all) if (strncmp(buf1, filter, filter_len)) continue; 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, strtoull(np, &np, 10)); sp = p + 1; } } return 0; formaterr: return -1; } static void cpytitle(const char *original, char *new) { const char *ptr = original; while(*ptr != '6' && *ptr != '\0') { *new = *ptr; new++; ptr++; } *new = *ptr; new++; *new = '\0'; } static void process6_fd(FILE *f) { char buf1[1024],buf2[50],buf3[1024]; unsigned long long val; const struct tabtab *tab = NULL; int cpflg = 0; while (fgets(buf1, sizeof buf1, f)) { sscanf(buf1, "%s %llu", buf2, &val); if(!cpflg) { cpytitle(buf2, buf3); tab = newtable(snmp6tabs, buf3); cpflg = 1; } if(!strstr(buf2, buf3)) { cpytitle(buf2, buf3); tab = newtable(snmp6tabs, buf3); } if (*(tab->flag)) printval(tab, buf2, val); } } /* Process a file with name-value lines (like /proc/net/sctp/snmp) */ static void process_fd2(FILE *f, const char *filename) { char buf1[1024]; char *sp; const struct tabtab *tab; tab = newtable(snmptabs, "Sctp"); while (fgets(buf1, sizeof buf1, f)) { sp = buf1 + strcspn(buf1, " \t\n"); if (!sp) { fprintf(stderr, _("error parsing %s\n"), filename); return; } *sp = '\0'; sp++; sp += strspn(sp, " \t\n"); if (*sp != '\0' && *(tab->flag)) printval(tab, buf1, strtoul(sp, 0, 10)); } } void 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_sctp = flag_sctp; f = proc_fopen("/proc/net/snmp"); if (!f) { perror(_("cannot open /proc/net/snmp")); return; } if (process_fd(f, 1, NULL) < 0) fprintf(stderr, _("Problem while parsing /proc/net/snmp\n")); if (ferror(f)) perror("/proc/net/snmp"); fclose(f); f = proc_fopen("/proc/net/netstat"); if (f) { if (process_fd(f, 1, NULL) <0) fprintf(stderr, _("Problem while parsing /proc/net/netstat\n")); if (ferror(f)) perror("/proc/net/netstat"); fclose(f); } f = proc_fopen("/proc/net/sctp/snmp"); if (f) { process_fd2(f,"/proc/net/sctp/snmp"); if (ferror(f)) { perror("/proc/net/sctp/snmp"); fclose(f); } } } void parsesnmp6(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/snmp6", "r"); if (!f) { perror(_("cannot open /proc/net/snmp6")); return; } process6_fd(f); if (ferror(f)) perror("/proc/net/snmp6"); fclose(f); f = fopen("/proc/net/snmp", "r"); if (!f) { perror(_("cannot open /proc/net/snmp")); return; } process_fd(f, 0, "Tcp"); if (ferror(f)) perror("/proc/net/snmp"); fclose(f); }