- 29 Aug, 2015 3 commits
-
-
Mike Frysinger authored
Mark all the read-only strings in this file as const.
-
Mike Frysinger authored
The vast majority of these aren't used outside of this file, so mark them all static accordingly.
-
Mike Frysinger authored
-
- 26 Aug, 2015 6 commits
-
-
Mike Frysinger authored
Some of the globs might expand into files that start with a dash, so pass -- everywhere to keep problems from showing up. Some call sites don't actually need this, but better to be consistent.
-
Mike Frysinger authored
There's no need to cast the char* to a struct in6_addr*, so delete that logic. Switch the hardcoded 80 limit to the INET6_ADDRSTRLEN constant. Make sure the buffer we pass into inet_ntop is always NUL terminated.
-
Mike Frysinger authored
This is only used in this file, so localize it.
-
Mike Frysinger authored
This might end up violating alignment requirements, so memcpy the variable through a short variable instead. For most systems, this will optimize into the same code anyways, and for the rest, we need to do it this way to avoid unaligned accesses crashing. URL: https://bugs.gentoo.org/558436
-
Mike Frysinger authored
This avoids casting from a char* pointer to a struct in_addr* pointer which have different alignment requirements, and moves away from the deprecated inet_ntoa function. URL: https://bugs.gentoo.org/558436
-
Mike Frysinger authored
-
- 25 Aug, 2015 10 commits
-
-
Mike Frysinger authored
The former is the standard name now while the latter is the old one.
-
Mike Frysinger authored
The code assumes that sizeof(sin_addr.s_addr) == sizeof(long) == 4 which fails badly on 64bit systems -- we end up reading 4 extra bytes into the storage. Instead, load things indirectly via uint32_t variables since these are IPv4 addresses.
-
Mike Frysinger authored
-
Mike Frysinger authored
Use inet_ntop everywhere so that we only have one code path between IPv4 and IPv6. This also fixes some alignment warnings (due to gethostname returning char* pointers which we then cast up to in_addr structs). URL: https://bugs.gentoo.org/558436
-
Mike Frysinger authored
Most callers never modify this structure, so constify it everywhere.
-
Mike Frysinger authored
Most callers never modify this structure, so constify it everywhere.
-
Mike Frysinger authored
These strings are static data set in sub-modules and never modified.
-
Mike Frysinger authored
This string is never modified, so constify it.
-
Mike Frysinger authored
These are only used internally to initialize themselves, so mark them static.
-
Mike Frysinger authored
These functions are almost entirely the same, so re-use the existing function rather than duplicate the body.
-
- 23 Jul, 2015 1 commit
-
-
Felix Janda authored
-
- 15 Jul, 2015 1 commit
-
-
Felix Janda authored
Wrong conditional includes intended for support of libc5 and glibc 2.0 prevented compilation under systems with alternative libcs, such as musl. For simplicity, remove these includes necessary for libc5 and glibc 2.0.
-
- 13 Jul, 2015 1 commit
-
-
Felix Janda authored
Currently uses sysconf(_SC_TC_CLK) to be more portable.
-
- 26 May, 2015 1 commit
-
-
Mike Frysinger authored
Make sure we use 64-bit filesystem functions everywhere. This applies not only to being able to read large files (which generally doesn't apply to us), but also being able to simply stat them (as they might be using large inodes).
-
- 18 May, 2015 2 commits
-
-
Felix Janda authored
-
Felix Janda authored
-
- 05 Apr, 2015 2 commits
-
-
Lubomir Rintel authored
No L2CAP or RFCOMM stats doesn't imply no support for Bluetooth; merely a protocol missing.
-
Lubomir Rintel authored
An address type field was added, messing up our l2cap status parsing.
-
- 07 Jan, 2015 1 commit
-
-
Jiri Popelka authored
When an interface has transferred exbibytes (> 0.8 EiB, i.e. > 819 PiB) of traffic, the short display is rounded incorrectly. For example: bytes 2154408931384050514 (275.0 PiB) while correct is (1913.4 PiB) This happens because we times the rx/tx bytes values by 10, then calculate the short version from that result: lib/interface.c:ife_print_long() tx = ptr->stats.tx_bytes; short_tx = tx * 10; if (tx > 1125899906842624ull) { short_tx /= 1125899906842624ull; Text = "PiB"; } But multiplying anything more than 819 PiB by 10 overflows a ull which is a uint64_t (max value of 9223372036854775807). We'll never get accuracy over 8192 PiB (2^64) when using ull, but we can at least correctly handle values between 819 - 8192 PiB.
-
- 11 Nov, 2014 1 commit
-
-
Jiri Popelka authored
The reason is that debugfs is accessible only by root user: _PATH_SYS_BLUETOOTH_L2CAP /sys/kernel/debug/bluetooth/l2cap _PATH_SYS_BLUETOOTH_RFCOMM /sys/kernel/debug/bluetooth/rfcom URL: https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt URL: https://bugzilla.redhat.com/show_bug.cgi?id=1162284
-
- 19 Oct, 2014 6 commits
-
-
Mike Frysinger authored
This reverts commit 343192d1. This fix from RedHat was actually a fix for one of their custom patches. Applying it to mainline breaks interface stats.
-
Mike Frysinger authored
-
Jaromír Končický authored
When using a bucket of protocols (like -A inet), do not warn/abort when some protocols are not supported. URL: https://bugzilla.redhat.com/1063906 URL: https://bugzilla.redhat.com/1063913
-
Karel Zak authored
For virtual interfaces created using the ifcfg-ethN:X scripts the ifconfig and netstat -i report statistics of the last real adapter listed in /proc/dev/net. URL: https://bugzilla.redhat.com/143981
-
Masaki MAENO authored
The display of "netstat -o" (on|off|keepalive|unkn-X) is not accurate. I think that "unkn-4" should be "probe0" that is working "probe0 timer (= ICSK_TIME_PROBE0 status = TCP Window Size is Zero)" in kernel. URL: https://bugzilla.redhat.com/466845
-
Mike Frysinger authored
A bunch of these funcs are only used by interface.c, so drop them from interface.h and mark them static. Also mark a bunch of buffers as const when they aren't written to.
-
- 07 Oct, 2014 5 commits
-
-
Bernd Eckenfels authored
-
Bernd Eckenfels authored
-
Lubomir Rintel authored
-
Lubomir Rintel authored
Yay for the ABI breakage.
-
Lubomir Rintel authored
-