aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* fix up signed/unsigned warningsMike Frysinger2011-11-2011-11/+11
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix up unused variable warningsMike Frysinger2011-11-2012-155/+127
| | | | | | | Some of these are unused, so drop them. Others are only used in debug code, so refactor those so things are always compiled. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* pull in stdlib.h for malloc() prototypeMike Frysinger2011-11-201-0/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* clean up const/unsigned pointers with aftype/hwtype structsMike Frysinger2011-11-2024-45/+45
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: avoid buffer overflows if proto name is too longMike Frysinger2011-11-201-10/+11
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: unify numeric handlingMike Frysinger2011-11-201-5/+7
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* get_sname: constify args/return when possibleMike Frysinger2011-11-202-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* corrected indentionBernd Eckenfels2011-01-271-2/+2
|
* Bug #17812 Fix the handling of some of the HAVE_* flags ifdef vs if. --jpa468Bernd Eckenfels2011-01-012-4/+6
|
* Remove garbage ipv6 scopes in netstat output (Debian Bug #508110)Bernd Eckenfels2010-07-051-4/+6
| | | | Thanks Marco Steinacher for reporting.
* interface: fix IPv6 parsing of interfaces with large indexes (> 255)Mike Frysinger2010-01-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch from Dave Johnson <djohnson@sw.starentnetworks.com> via Debian #433543 When running 'ifconfig' it will not show any IPv6 addresses for interfaces that have an ifindex > 255. Because the kernel will increment the ifindex every time an interface is added or removed, it is not necessary to have 256 interfaces at once, just creating 256 interfaces since system boot and they will no longer show IPv6 addresses. This is due to an improper fscanf() maximum range argument. Patch to fix the problem is below. Example: st34:~# ip addr list dev eth1.110 268: eth1.110@eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc noqueue link/ether 00:e0:81:2a:0d:2d brd ff:ff:ff:ff:ff:ff inet6 fd4d:5643:2886:6e::ea:0/64 scope global valid_lft forever preferred_lft forever inet6 fe80::2e0:81ff:fe2a:d2d/64 scope link valid_lft forever preferred_lft forever st34:~# ifconfig eth1.110 eth1.110 Link encap:Ethernet HWaddr 00:E0:81:2A:0D:2D UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:676 (676.0 b) st34:~# grep eth1.110 /proc/net/if_inet6 fd4d56432886006e0000000000ea0000 10c 40 00 80 eth1.110 fe8000000000000002e081fffe2a0d2d 10c 40 20 80 eth1.110 st34:~#
* interface slip: cast keepalive/outfill to unsigned long to fix warnings on ↵Mike Frysinger2009-12-311-3/+3
| | | | 64bit hosts -- no functional changes since these only have an 8bit range anyways
* netstat: add sctp connection decoding (Debian #306428 and Gentoo #258714)Mike Frysinger2009-09-061-0/+4
|
* ifconfig: fix no output when if_readlist_proc() failsMike Frysinger2009-09-061-5/+8
| | | | | | The rewrite of if_readlist() on 28 Jun 2003 broke the function when the proc interface isn't readable. Have if_readlist() return an error only if both if_readxxx funcs failed. This fixes Gentoo 238363.
* convert -idirafter to -IMike Frysinger2009-09-061-1/+1
| | | | | | | The local include trees no longer need -idirafter semantics, so use the normal -I flags to avoid random cruft on users' systems. This fixes Gentoo #283759 where user had local headers named the same as the net-tools local headers, but the toolchain defaulted to the system paths due to -idirafter.
* handle raw "IP" masqinfoMike Frysinger2009-09-061-2/+4
|
* Missing include to make compileable with gcc-4.3.2 and glibc-2.9_p20081201Bernd Eckenfels2009-09-061-1/+2
| | | | Patch from Petr Pisar [Berlios Bug#16232].
* scanf format length fix (non exploitable?) fromBernd Eckenfels2009-07-082-18/+18
| | | | Fabian Hugelshofer <hugelshofer2006@gmx.ch>
* UDPlite Support for net-stat by Brian Micek <bmicek@gmail.com>Bernd Eckenfels2008-12-011-0/+2
|
* Add hardware support for InfiniBand (Debian Bug #294252 Tom Duffy from Sun).Bernd Eckenfels2008-10-033-2/+157
|
* Faster pagesize aligned fopen for netstat -s (Eric Dumazet)Bernd Eckenfels2007-12-012-4/+26
|
* ROSE supportBernd Eckenfels2007-12-012-2/+9
|
* fixed signedness compiler warningBernd Eckenfels2006-10-111-1/+1
|
* X25 code compiles with 2.4 and 2.6 kernel headers (Debian Bug#271678)Bernd Eckenfels2005-09-041-1/+1
|
* Eric Oberlander reported in Debian Bug#323261 that byte counter unitBernd Eckenfels2005-08-231-3/+3
| | | | should be named "B" not "b".
* make ipx in 2.6 work (perhaps).Bernd Eckenfels2005-08-022-9/+17
| | | | Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=318503
* make it compile with 2.4 and 2.6 kernel headers (Debian Bug #271678)Bernd Eckenfels2005-05-161-2/+2
|
* token ring patch from http://www.linuxtr.net/download/net-tools-1.60.patchBernd Eckenfels2005-05-161-2/+18
| | | | Fixes Debian Bug #79462
* debians version of nstrcmp - ugly but worksBernd Eckenfels2004-06-031-17/+150
|
* merged debian patch to make it compile with new headersBernd Eckenfels2004-06-031-1/+1
|
* avoid namespace conflictsBernd Eckenfels2004-06-031-2/+2
|
* fix portability problem on 64-bit big endian.Phil Blundell2003-10-191-3/+3
| | | | patch from Mads Martin Joergensen <mmj@suse.de>
* Maik Broemme contributed gcc warning fixes (break after default: label)Bernd Eckenfels2003-10-111-0/+1
|
* bugfix: Skipping readlist, if readlist_proc sicceeded is not aBernd Eckenfels2003-06-281-7/+6
| | | | | | good idea. I Rewrote that section for clarity. This is also present in the 1.60-8 debian package, which fixed #197582 and #197924.
* added 'ull' prefix to unsigned long long constants to make gcc 3.3 happyBernd Eckenfels2003-05-291-138/+161
|
* fixed compile warning (unneeded default: label in switch)Bernd Eckenfels2003-05-281-1/+0
|
* use [::]:port as wildcard ipv6 address instead of *:portBernd Eckenfels2002-12-101-2/+2
|
* - change columns of netstat -i/ifconfig -s to avoid run-into (Stefan Illner)Bernd Eckenfels2002-12-101-4/+4
| | | | | - prevent segfault on protocol families without host error member - use /128 as default prefix if not specified instead of /0
* Bruno Hall contributed a small and working nstrcmp()Bernd Eckenfels2002-12-101-26/+16
|
* corrected typo to make lib/interfaces.c actually compileBernd Eckenfels2002-12-051-4/+4
|
* better ioctl fallback handling for interface listing, avoids duplicateBernd Eckenfels2002-12-051-12/+23
| | | | interfaces, thanks for the help from Bruno Hall.
* route now support -6 -4 or -46 optionBernd Eckenfels2002-07-301-12/+36
| | | | | | better layout for ipv6 routing table -C support for ipv6 routing cache more flags (i.e. reject) are recogniced for ipv6 routes
* more stable ipx parsing (no segfault anymore)Bernd Eckenfels2002-07-301-0/+3
|
* ethernet mac in lower case hex digitsBernd Eckenfels2002-07-301-2/+2
|
* thanks to "Erik A. Hendriks" <hendriks@lanl.gov> the interface naneBernd Eckenfels2002-06-141-10/+13
| | | | bug in debian (#135744) is fixed, with his patch in (#149579) hopefully.
* simple patch from Ajax <ajax@firest0rm.org> (corrected) to print DDPBernd Eckenfels2002-06-022-3/+72
| | | | (AppleTalk) routing table.
* brken buffer for printed irda address, reported by Christoph BartelmusBernd Eckenfels2002-05-011-4/+6
|
* export procnetdev_version, get_dev_fields, get_name fromBernd Eckenfels2002-03-051-4/+4
| | | | | lib/interface.c for general usage (e.g. in my next patch to iptunnel)
* make RX-OK and TX-OK col. in "netstat -i" 1 digit longer by left aligningBernd Eckenfels2002-02-231-4/+4
| | | | metric and TX-OVR and shorten max length of them.
* this fixes Debian Bug #109164 (netstat -ci does only print stats once). ItBernd Eckenfels2001-11-251-13/+13
| | | | | | | also renames add_interface and free_interface list to if_cache_add/free. I am not sure if removing the "proc_read" flag will harm performance, looks likt this check is never triggereed. Anyway, we need more efficient b-search sooner or later.