[packages/iftop] Rel .3. Use git upstream changes mainly.
arekm
arekm at pld-linux.org
Wed Aug 5 11:46:17 CEST 2026
commit f0c258ec150035e0ac42c1b78e722509d5b34a72
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 5 11:45:09 2026 +0200
Rel .3. Use git upstream changes mainly.
iftop-bar-scale.patch | 54 +++
iftop-cleanup.patch | 11 -
iftop-configure-sizeof.patch | 20 +
iftop-gcc15.patch | 11 -
iftop-git.patch | 869 ++++++++++++++++++++++++++++++++++++++++
iftop-iff-running.patch | 11 -
iftop-ipv6-dns-resolution.patch | 34 --
iftop-mac-address-format.patch | 11 -
iftop-multi-gigabit.patch | 31 --
iftop-resolver.patch | 18 -
iftop.spec | 23 +-
11 files changed, 950 insertions(+), 143 deletions(-)
---
diff --git a/iftop.spec b/iftop.spec
index 7a40595..e4ed3ca 100644
--- a/iftop.spec
+++ b/iftop.spec
@@ -3,20 +3,16 @@ Summary: Display bandwidth usage on an interface
Summary(pl.UTF-8): Wyświetlanie ruchu na danym interfejsie
Name: iftop
Version: 1.0
-Release: 0.%{pre}.2
+Release: 0.%{pre}.3
Epoch: 1
License: GPL v2
Group: Networking/Utilities
Source0: http://www.ex-parrot.com/~pdw/iftop/download/%{name}-%{version}%{pre}.tar.gz
# Source0-md5: 7e6decb4958e8a4890cccac335239f24
-Patch0: %{name}-resolver.patch
-Patch1: %{name}-mac-address-format.patch
-Patch2: %{name}-cleanup.patch
-Patch3: %{name}-multi-gigabit.patch
-Patch4: %{name}-ipv6-dns-resolution.patch
-Patch5: %{name}-gcc15.patch
-Patch6: %{name}-iff-running.patch
-Patch7: %{name}-fno-common.patch
+Patch0: %{name}-git.patch
+Patch1: %{name}-fno-common.patch
+Patch2: %{name}-configure-sizeof.patch
+Patch3: %{name}-bar-scale.patch
URL: http://www.ex-parrot.com/~pdw/iftop/
BuildRequires: autoconf
BuildRequires: automake
@@ -39,14 +35,10 @@ wolne?".
%prep
%setup -q -n %{name}-%{version}%{pre}
-#%%patch 0 -p1
+%patch 0 -p1
%patch 1 -p1
%patch 2 -p1
%patch 3 -p1
-%patch 4 -p1
-%patch 5 -p1
-%patch 6 -p1
-%patch 7 -p1
%build
rm -f missing
@@ -55,8 +47,7 @@ rm -f missing
%{__autoconf}
%{__automake}
%configure \
- CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" \
- --with-resolver=getnameinfo
+ CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
%{__make}
%install
diff --git a/iftop-bar-scale.patch b/iftop-bar-scale.patch
new file mode 100644
index 0000000..029b7d4
--- /dev/null
+++ b/iftop-bar-scale.patch
@@ -0,0 +1,54 @@
+The 10G and 100G scale entries do not fit in a long on 32-bit targets, so the
+table ends up unsorted there; use long long instead.
+
+rateidx_init advanced one entry past the matching scale because of the
+post-increment in the loop condition, and neither loop was bounded by the
+table size.
+
+--- iftop-1.0pre4.orig/ui.c
++++ iftop-1.0pre4/ui.c
+@@ -71,7 +71,7 @@
+
+ /* Barchart scales. */
+ static struct {
+- long max; int interval;
++ long long max; int interval;
+ } scale[] = {
+ { 64000, 10 }, /* 64 kbit/s */
+ { 128000, 10 },
+@@ -83,6 +83,7 @@
+ {10000000000, 100 },
+ {100000000000, 100 }
+ };
++#define NSCALES ((int)(sizeof scale / sizeof *scale))
+ static int rateidx = 0, wantbiggerrate;
+
+ static int rateidx_init = 0;
+@@ -107,14 +108,15 @@
+ }
+
+ /* rate in bits */
+-static int get_bar_length(const long rate) {
++static int get_bar_length(const long long rate) {
+ float l;
+ if (rate <= 0)
+ return 0;
+ if (rate > scale[rateidx].max) {
+ wantbiggerrate = 1;
+ if(! rateidx_init) {
+- while(rate > scale[rateidx_init++].max) {
++ while(rateidx_init < NSCALES - 1 && rate > scale[rateidx_init].max) {
++ rateidx_init++;
+ }
+ rateidx = rateidx_init;
+ }
+@@ -422,7 +424,8 @@
+
+ /* Bar chart auto scale */
+ if (wantbiggerrate && options.max_bandwidth == 0) {
+- ++rateidx;
++ if (rateidx < NSCALES - 1)
++ ++rateidx;
+ wantbiggerrate = 0;
+ }
+ }
diff --git a/iftop-cleanup.patch b/iftop-cleanup.patch
deleted file mode 100644
index e5d46d8..0000000
--- a/iftop-cleanup.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iftop-1.0pre4.orig/iftop.c 2014-01-19 21:21:19.000000000 +0100
-+++ iftop.c 2026-03-09 15:26:43.709389780 +0100
-@@ -839,6 +839,8 @@
- }
-
- pthread_cancel(thread);
-+ pthread_join(thread, NULL);
-+ pcap_close(pd);
-
- ui_finish();
-
diff --git a/iftop-configure-sizeof.patch b/iftop-configure-sizeof.patch
new file mode 100644
index 0000000..010e3a8
--- /dev/null
+++ b/iftop-configure-sizeof.patch
@@ -0,0 +1,20 @@
+The u_int<n>_t size probe never compiled: sizeof($1) expands to the configure
+script's first positional parameter (empty), and exit() is called without
+<stdlib.h>, which is a hard error since C23. Every size therefore came out as
+"unknown type" and integers.h fell back to re-typedef'ing the C99 types.
+
+--- iftop-1.0pre4.orig/configure.ac
++++ iftop-1.0pre4/configure.ac
+@@ -111,9 +111,9 @@
+ int main() {
+ $type dummy;
+ FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
+- fprintf(f, "%d\n", sizeof($1));
+- exit(0);
++ if (!f) return 1;
++ fprintf(f, "%d\n", (int)sizeof($type));
++ return 0;
+ }
+ ])], [
+ x=`cat conftestval`
diff --git a/iftop-gcc15.patch b/iftop-gcc15.patch
deleted file mode 100644
index 0fe4ea4..0000000
--- a/iftop-gcc15.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iftop-1.0pre4.orig/cfgfile.h 2014-01-05 19:47:53.000000000 +0100
-+++ cfgfile.h 2026-03-09 15:26:43.736435958 +0100
-@@ -13,7 +13,7 @@
- int value;
- } config_enumeration_type;
-
--int read_config();
-+int read_config(char *file, int whinge_on_error);
-
- char *config_get_string(const char *directive);
- int config_get_bool(const char *directive);
diff --git a/iftop-git.patch b/iftop-git.patch
new file mode 100644
index 0000000..661f066
--- /dev/null
+++ b/iftop-git.patch
@@ -0,0 +1,869 @@
+Upstream commits made after the 1.0pre4 release, taken from
+https://code.blinkace.com/pdw/iftop master branch (75d18181, 2025-06-21).
+There has been no new release since 2014.
+
+Notable fixes: short packet handling, MAC address display, libpcap cleanup on
+exit, IPv6 reverse DNS lookups, first "running" instead of first "up"
+interface, bar chart scales beyond 1 Gbit/s, packet rate display (-u packets),
+unlimited number of lines in text mode, read_config() prototype.
+
+--- iftop-1.0pre4.orig/ChangeLog
++++ iftop-1.0pre4/ChangeLog
+@@ -1,11 +1,29 @@
+ Change log for iftop
+-$Id: ChangeLog,v 1.42 2014/01/19 20:32:50 pdw Exp $
+
+ Attributions apply to all preceding items up to the next blank line.
+ Unattributed items are by Paul Warren and Chris Lightfoot.
+
++
+ 1.0
+
++* Compilation fix
++ Til Kaiser <mail at tk154.de>
++
++* Choose first running interface, rather than first "up" interface (Redhat #1403025)
++ Robert Scheck <robert at fedoraproject.org>
++
++* Support for unlimited number of lines of output for text mode
++ Roman Hoog Antink <rha at open.ch>
++
++* Fix handling of short packets
++ Frédéric Perrin <fperrin at brocade.com>
++
++* Fix MAC address display
++ Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>
++
++* Clean up libpcap on exit
++ Brian Russell <brian.russell at brocade.com>
++
+ * Remove blinking cursor from UI
+ Gerrit Renker <renker at ualberta.ca>
+
+--- iftop-1.0pre4.orig/addrs_dlpi.c
++++ iftop-1.0pre4/addrs_dlpi.c
+@@ -50,7 +50,7 @@
+ */
+
+ int
+-get_addrs_dlpi(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
++get_addrs_dlpi(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr)
+ {
+ int got_hw_addr = 0;
+ int got_ip_addr = 0;
+--- iftop-1.0pre4.orig/addrs_ioctl.c
++++ iftop-1.0pre4/addrs_ioctl.c
+@@ -45,7 +45,7 @@
+ */
+
+ int
+-get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr)
++get_addrs_ioctl(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr)
+ {
+ int s;
+ struct ifreq ifr = {};
+--- iftop-1.0pre4.orig/addrs_ioctl.h
++++ iftop-1.0pre4/addrs_ioctl.h
+@@ -7,6 +7,6 @@
+ #define __ADDRS_IOCTL_H_
+
+ int
+-get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr);
++get_addrs_ioctl(char *interface, u_int8_t if_hw_addr[], struct in_addr *if_ip_addr, struct in6_addr *if_ip6_addr);
+
+ #endif /* __ADDRS_IOCTL_H_ */
+--- iftop-1.0pre4.orig/cfgfile.c
++++ iftop-1.0pre4/cfgfile.c
+@@ -30,7 +30,8 @@
+ "promiscuous",
+ "hide-source",
+ "hide-destination",
+- "use-bytes",
++ "use-bytes",
++ "bandwidth-unit",
+ "sort",
+ "line-display",
+ "show-totals",
+--- iftop-1.0pre4.orig/cfgfile.h
++++ iftop-1.0pre4/cfgfile.h
+@@ -13,7 +13,7 @@
+ int value;
+ } config_enumeration_type;
+
+-int read_config();
++int read_config(char *file, int whinge_on_error);
+
+ char *config_get_string(const char *directive);
+ int config_get_bool(const char *directive);
+--- iftop-1.0pre4.orig/configure.ac
++++ iftop-1.0pre4/configure.ac
+@@ -442,23 +442,3 @@
+
+ AC_OUTPUT(Makefile config/Makefile)
+
+-if echo $PACKAGE_VERSION | grep 'pre' > /dev/null ; then
+- AC_MSG_WARN([
+-******************************************************************************
+-
+-This is a pre-release version. Pre-releases are subject to limited
+-announcements, and therefore limited circulation, as a means of testing
+-the more widely circulated final releases.
+-
+-Please do not be surprised if this release is broken, and if it is broken, do
+-not assume that someone else has spotted it. Instead, please drop a note on
+-the mailing list, or a brief email to me on pdw at ex-parrot.com
+-
+-Thank you for taking the time to be the testing phase of this development
+-process.
+-
+-Paul Warren
+-
+-******************************************************************************
+-])
+-fi
+--- iftop-1.0pre4.orig/iftop.8
++++ iftop-1.0pre4/iftop.8
+@@ -11,7 +11,7 @@
+
+ .SH SYNOPSIS
+ \fBiftop\fP \fB-h\fP |
+-[\fB-nNpblBP\fP] [\fB-i\fP \fIinterface\fP] [\fB-f\fP \fIfilter code\fP] [\fB-F\fP \fInet\fP/\fImask\fP]
++[\fB-nNpblP\fP] [\fB-u\fP \fIunit\fP] [\fB-i\fP \fIinterface\fP] [\fB-f\fP \fIfilter code\fP] [\fB-F\fP \fInet\fP/\fImask\fP]
+ [\fB-G\fP \fInet6\fP/\fImask6\fP]
+ .SH DESCRIPTION
+ \fBiftop\fP listens to network traffic on a named \fIinterface\fP, or on the
+@@ -75,8 +75,11 @@
+ \fB-m\fP \fIlimit\fP
+ Set the upper limit for the bandwidth scale. Specified as a number with a 'K', 'M' or 'G' suffix.
+ .TP
++\fB-u\fP \fIbits\fP|\fIbytes\fP|\fIpackets\fP
++Display bandwidth rates in the given unit (per second).
++.TP
+ \fB-B\fP
+-Display bandwidth rates in bytes/sec rather than bits/sec.
++Synonym for \fB-u\fP \fIbits\fP.
+ .TP
+ \fB-i\fP \fIinterface\fP
+ Listen to packets on \fIinterface\fP.
+@@ -236,8 +239,11 @@
+ \fBhide-destination:\fP \fI(yes|no)\fP
+ Hides destination host names.
+ .TP
++\fBbandwidth-unit:\fP \fI(bits|bytes|packets)\fP
++Use the specified unit for bandwidth display. The default is bits.
++.TP
+ \fBuse-bytes:\fP \fI(yes|no)\fP
+-Use bytes for bandwidth display, rather than bits.
++\fBuse-bytes: yes\fP is a synonym of \fBbandwidth-unit: packets\fP.
+ .TP
+ \fBsort:\fP \fI(2s|10s|40s|source|destination)\fP
+ Sets which column is used to sort the display.
+--- iftop-1.0pre4.orig/iftop.c
++++ iftop-1.0pre4/iftop.c
+@@ -55,7 +55,7 @@
+
+ /* ethernet address of interface. */
+ int have_hw_addr = 0;
+-char if_hw_addr[6];
++u_int8_t if_hw_addr[6];
+
+ /* IP address of interface */
+ int have_ip_addr = 0;
+@@ -146,7 +146,7 @@
+ if(t - last_timestamp >= RESOLUTION) {
+ analyse_data();
+ if (options.no_curses) {
+- if (!options.timed_output || (options.timed_output && t - first_timestamp >= options.timed_output)) {
++ if (!options.timed_output || (t - first_timestamp >= options.timed_output)) {
+ tui_print();
+ if (options.timed_output) {
+ finish(SIGINT);
+@@ -249,16 +249,16 @@
+ }
+ }
+
+-static void handle_ip_packet(struct ip* iptr, int hw_dir)
++static void handle_ip_packet(struct ip* iptr, int hw_dir, int pld_len)
+ {
+ int direction = 0; /* incoming */
++ int len;
+ history_type* ht;
+ union {
+ history_type **ht_pp;
+ void **void_pp;
+ } u_ht = { &ht };
+ addr_pair ap;
+- unsigned int len = 0;
+ struct in6_addr scribdst; /* Scratch pad. */
+ struct in6_addr scribsrc; /* Scratch pad. */
+ /* Reinterpret packet type. */
+@@ -268,7 +268,21 @@
+
+ tick(0);
+
+- if( (IP_V(iptr) ==4 && options.netfilter == 0)
++ /*
++ * Sanity check: drop obviously short packets.
++ * pld_len comes from pcaphdr->len - sizeof(struct l2_header).
++ *
++ * It is assumed that the snaplen (currently hard-coded to 1000) is
++ * big enough to always capture the IP header past the L2 encap, and
++ * that pcap never truncates the packet to less than snaplen; in
++ * other words, that pcaphdr->caplen = MIN(pcaphdr->len, snaplen).
++ */
++ if (pld_len < sizeof (struct ip))
++ return;
++ if (IP_V(iptr) == 6 && pld_len < sizeof (struct ip6_hdr))
++ return;
++
++ if( (IP_V(iptr) == 4 && options.netfilter == 0)
+ || (IP_V(iptr) == 6 && options.netfilter6 == 0) ) {
+ /*
+ * Net filter is off, so assign direction based on MAC address
+@@ -424,21 +438,22 @@
+ break;
+ }
+
+-
+ if(hash_find(history, &ap, u_ht.void_pp) == HASH_STATUS_KEY_NOT_FOUND) {
+ ht = history_create();
+ hash_insert(history, &ap, ht);
+ }
+
+ /* Do accounting. */
+- switch (IP_V(iptr)) {
+- case 4:
+- len = ntohs(iptr->ip_len);
+- break;
+- case 6:
+- len = ntohs(ip6tr->ip6_plen) + 40;
++ switch (options.bandwidth_unit) {
++ case OPTION_BW_BITS:
++ case OPTION_BW_BYTES:
++ len = pld_len;
++ break;
++ case OPTION_BW_PKTS:
++ len = 1;
++ break;
+ default:
+- break;
++ return;
+ }
+
+ /* Update record */
+@@ -468,7 +483,7 @@
+
+ static void handle_raw_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+ {
+- handle_ip_packet((struct ip*)packet, -1);
++ handle_ip_packet((struct ip*)packet, -1, pkthdr->len);
+ }
+
+ #ifdef DLT_PFLOG
+@@ -482,18 +497,19 @@
+ hdrlen = BPF_WORDALIGN(hdr->length);
+ length -= hdrlen;
+ packet += hdrlen;
+- handle_ip_packet((struct ip*)packet, -1);
++ handle_ip_packet((struct ip*)packet, -1, length);
+ }
+ #endif
+
+ static void handle_null_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+ {
+- handle_ip_packet((struct ip*)(packet + 4), -1);
++ handle_ip_packet((struct ip*)(packet + 4), -1, pkthdr->len);
+ }
+
+-static void handle_llc_packet(const struct llc* llc, int dir) {
+-
+- struct ip* ip = (struct ip*)((void*)llc + sizeof(struct llc));
++static void handle_llc_packet(const struct llc* llc, int dir, int llclen) {
++ int hdrlen = sizeof(struct llc);
++ int pldlen = llclen - hdrlen;
++ struct ip* ip = (struct ip*)((void*)llc + hdrlen);
+
+ /* Taken from tcpdump/print-llc.c */
+ if(llc->ssap == LLCSAP_SNAP && llc->dsap == LLCSAP_SNAP
+@@ -505,11 +521,11 @@
+ switch(orgcode) {
+ case OUI_ENCAP_ETHER:
+ case OUI_CISCO_90:
+- handle_ip_packet(ip, dir);
++ handle_ip_packet(ip, dir, pldlen);
+ break;
+ case OUI_APPLETALK:
+ if(et == ETHERTYPE_ATALK) {
+- handle_ip_packet(ip, dir);
++ handle_ip_packet(ip, dir, pldlen);
+ }
+ break;
+ default:;
+@@ -521,34 +537,36 @@
+ static void handle_tokenring_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+ {
+ struct token_header *trp;
++ int hdrlen = 0;
+ int dir = -1;
+ trp = (struct token_header *)packet;
+
+ if(IS_SOURCE_ROUTED(trp)) {
+- packet += RIF_LENGTH(trp);
++ hdrlen += RIF_LENGTH(trp);
+ }
+- packet += TOKEN_HDRLEN;
++ hdrlen += TOKEN_HDRLEN;
++ packet += hdrlen;
+
+ if(memcmp(trp->token_shost, if_hw_addr, 6) == 0 ) {
+ /* packet leaving this i/f */
+ dir = 1;
+- }
+- else if(memcmp(trp->token_dhost, if_hw_addr, 6) == 0 || memcmp("\xFF\xFF\xFF\xFF\xFF\xFF", trp->token_dhost, 6) == 0) {
++ }
++ else if(memcmp(trp->token_dhost, if_hw_addr, 6) == 0 || memcmp("\xFF\xFF\xFF\xFF\xFF\xFF", trp->token_dhost, 6) == 0) {
+ /* packet entering this i/f */
+ dir = 0;
+ }
+
+ /* Only know how to deal with LLC encapsulated packets */
+ if(FRAME_TYPE(trp) == TOKEN_FC_LLC) {
+- handle_llc_packet((struct llc*)packet, dir);
++ handle_llc_packet((struct llc*)packet, dir, pkthdr->len - hdrlen);
+ }
+ }
+
+ static void handle_ppp_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+ {
+- register u_int length = pkthdr->len;
+- register u_int caplen = pkthdr->caplen;
+- u_int proto;
++ register u_int length = pkthdr->len;
++ register u_int caplen = pkthdr->caplen;
++ u_int proto;
+
+ if (caplen < 2)
+ return;
+@@ -558,14 +576,14 @@
+ return;
+
+ packet += 2;
+- length -= 2;
++ length -= 2;
+
+ proto = EXTRACT_16BITS(packet);
+ packet += 2;
+ length -= 2;
+
+ if(proto == PPP_IP || proto == ETHERTYPE_IP || proto == ETHERTYPE_IPV6) {
+- handle_ip_packet((struct ip*)packet, -1);
++ handle_ip_packet((struct ip*)packet, -1, length);
+ }
+ }
+ }
+@@ -588,24 +606,25 @@
+ dir=1;
+ break;
+ }
+- handle_ip_packet((struct ip*)(packet+SLL_HDR_LEN), dir);
++ handle_ip_packet((struct ip*)(packet+SLL_HDR_LEN), dir,
++ thdr->len - SLL_HDR_LEN);
+ }
+ #endif /* DLT_LINUX_SLL */
+
+ static void handle_eth_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet)
+ {
+ struct ether_header *eptr;
+- int ether_type;
+- const unsigned char *payload;
++ int ether_type, hdrlen;
++
+ eptr = (struct ether_header*)packet;
+ ether_type = ntohs(eptr->ether_type);
+- payload = packet + sizeof(struct ether_header);
++ hdrlen = sizeof(struct ether_header);
+
+ if(ether_type == ETHERTYPE_8021Q) {
+ struct vlan_8021q_header* vptr;
+- vptr = (struct vlan_8021q_header*)payload;
++ vptr = (struct vlan_8021q_header*) (packet + hdrlen);
+ ether_type = ntohs(vptr->ether_type);
+- payload += sizeof(struct vlan_8021q_header);
++ hdrlen += sizeof(struct vlan_8021q_header);
+ }
+
+ if(ether_type == ETHERTYPE_IP || ether_type == ETHERTYPE_IPV6) {
+@@ -629,8 +648,8 @@
+ }
+
+ /* Distinguishing ip_hdr and ip6_hdr will be done later. */
+- iptr = (struct ip*)(payload); /* alignment? */
+- handle_ip_packet(iptr, dir);
++ iptr = (struct ip*) (packet + hdrlen); /* alignment? */
++ handle_ip_packet(iptr, dir, pkthdr->len - hdrlen);
+ }
+ }
+
+@@ -643,7 +662,8 @@
+ {
+ /* 802.11 MAC header is = 34 bytes (not sure if that's universally true) */
+ /* We could try harder to figure out hardware direction from the MAC header */
+- handle_ip_packet((struct ip*)(packet + ((struct radiotap_header *)packet)->it_len + 34),-1);
++ int hdrlen = ((struct radiotap_header *)packet)->it_len + 34;
++ handle_ip_packet((struct ip*)(packet + hdrlen), -1, pkthdr->len - hdrlen);
+ }
+
+
+@@ -839,6 +859,8 @@
+ }
+
+ pthread_cancel(thread);
++ pthread_join(thread, NULL);
++ pcap_close(pd);
+
+ ui_finish();
+
+--- iftop-1.0pre4.orig/options.c
++++ iftop-1.0pre4/options.c
+@@ -30,7 +30,7 @@
+
+ options_t options;
+
+-char optstr[] = "+i:f:nNF:G:lhpbBPm:c:s:tL:o:";
++char optstr[] = "+i:f:nNF:G:lhpbBu:Pm:c:s:tL:o:";
+
+ /* Global options. */
+
+@@ -75,6 +75,13 @@
+ { NULL, -1 }
+ };
+
++config_enumeration_type bandwidth_unit_enumeration[] = {
++ { "bits", OPTION_BW_BITS },
++ { "bytes", OPTION_BW_BYTES },
++ { "packets", OPTION_BW_PKTS },
++ { NULL, -1 }
++};
++
+ static int is_bad_interface_name(char *i) {
+ char **p;
+ for (p = bad_interface_names; *p; ++p)
+@@ -103,7 +110,7 @@
+ while(nameindex[j].if_index != 0) {
+ if (strcmp(nameindex[j].if_name, "lo") != 0 && !is_bad_interface_name(nameindex[j].if_name)) {
+ strncpy(ifr.ifr_name, nameindex[j].if_name, sizeof(ifr.ifr_name));
+- if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) || (ifr.ifr_flags & IFF_UP)) {
++ if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) || (ifr.ifr_flags & IFF_RUNNING)) {
+ i = xstrdup(nameindex[j].if_name);
+ break;
+ }
+@@ -145,7 +152,7 @@
+ options.aggregate_dest = 0;
+ options.paused = 0;
+ options.showhelp = 0;
+- options.bandwidth_in_bytes = 0;
++ options.bandwidth_unit = OPTION_BW_BITS;
+ options.sort = OPTION_SORT_DIV2;
+ options.screenfilter = NULL;
+ options.freezeorder = 0;
+@@ -188,7 +195,8 @@
+ " -p run in promiscuous mode (show traffic between other\n"
+ " hosts on the same network segment)\n"
+ " -b don't display a bar graph of traffic\n"
+-" -B Display bandwidth in bytes\n"
++" -B display bandwidth in bytes\n"
++" -a display bandwidth in packets\n"
+ " -i interface listen on named interface\n"
+ " -f filter code use filter code to select packets to count\n"
+ " (default: none, but only IP packets are counted)\n"
+@@ -271,9 +279,13 @@
+ break;
+
+ case 'B':
+- config_set_string("use-bytes", "true");
++ config_set_string("bandwidth-unit", "bytes");
+ break;
+
++ case 'u':
++ config_set_string("bandwidth-unit", optarg);
++ break;
++
+ case 's':
+ config_set_string("timed-output", optarg);
+ break;
+@@ -370,6 +382,23 @@
+ return 0;
+ }
+
++int options_config_get_bw_unit() {
++ int i;
++
++ if (options_config_get_enum("bandwidth-unit", bandwidth_unit_enumeration,
++ (int*)&options.bandwidth_unit))
++ return 1;
++ /* compatibility with use-bytes / -B */
++ if (options_config_get_bool("use-bytes", &i)) {
++ if (i)
++ options.bandwidth_unit = OPTION_BW_BYTES;
++ else
++ options.bandwidth_unit = OPTION_BW_BITS;
++ return 1;
++ }
++ return 0;
++}
++
+ int options_config_get_bw_rate(char *directive, long long* result) {
+ char* units;
+ long long mult = 1;
+@@ -544,7 +573,7 @@
+ options_config_get_promiscuous();
+ options_config_get_bool("hide-source", &options.aggregate_src);
+ options_config_get_bool("hide-destination", &options.aggregate_dest);
+- options_config_get_bool("use-bytes", &options.bandwidth_in_bytes);
++ options_config_get_bw_unit();
+ options_config_get_enum("sort", sort_enumeration, (int*)&options.sort);
+ options_config_get_enum("line-display", linedisplay_enumeration, (int*)&options.linedisplay);
+ options_config_get_bool("show-totals", &options.show_totals);
+--- iftop-1.0pre4.orig/options.h
++++ iftop-1.0pre4/options.h
+@@ -34,6 +34,12 @@
+ OPTION_LINEDISPLAY_ONE_LINE_SENT
+ } option_linedisplay_t;
+
++typedef enum {
++ OPTION_BW_BITS,
++ OPTION_BW_BYTES,
++ OPTION_BW_PKTS,
++} option_bw_unit_t;
++
+ /*
+ * This structure has to be defined in the same order as the config
+ * directives in cfgfile.c. Clearly this is EBW.
+@@ -59,7 +65,7 @@
+ int timed_output;
+ int no_curses;
+ int num_lines;
+- int bandwidth_in_bytes;
++ option_bw_unit_t bandwidth_unit;
+ option_sort_t sort;
+
+ int bar_interval;
+--- iftop-1.0pre4.orig/resolver.c
++++ iftop-1.0pre4/resolver.c
+@@ -438,11 +438,11 @@
+ char **ch_pp;
+ void **void_pp;
+ } u_old = { &old };
+- if(hash_find(ns_hash, &addr, u_old.void_pp) == HASH_STATUS_OK) {
++ if(hash_find(ns_hash, &addr.as_addr6, u_old.void_pp) == HASH_STATUS_OK) {
+ hash_delete(ns_hash, &addr);
+ xfree(old);
+ }
+- hash_insert(ns_hash, &addr, (void*)hostname);
++ hash_insert(ns_hash, &addr.as_addr6, (void*)hostname);
+ }
+
+ }
+@@ -488,7 +488,7 @@
+
+ pthread_mutex_lock(&resolver_queue_mutex);
+
+- if(hash_find(ns_hash, raddr, u_hostname.void_pp) == HASH_STATUS_OK) {
++ if(hash_find(ns_hash, &raddr->as_addr6, u_hostname.void_pp) == HASH_STATUS_OK) {
+ /* Found => already resolved, or on the queue, no need to keep
+ * it around */
+ free(raddr);
+@@ -497,7 +497,7 @@
+ hostname = xmalloc(INET6_ADDRSTRLEN);
+ inet_ntop(af, &raddr->addr, hostname, INET6_ADDRSTRLEN);
+
+- hash_insert(ns_hash, raddr, hostname);
++ hash_insert(ns_hash, &raddr->as_addr6, hostname);
+
+ if(((head + 1) % RESOLVE_QUEUE_LENGTH) == tail) {
+ /* queue full */
+--- iftop-1.0pre4.orig/tui.c
++++ iftop-1.0pre4/tui.c
+@@ -73,7 +73,7 @@
+ printf("\n");
+
+ /* Traverse the list of all connections */
+- while((nn = sorted_list_next_item(&screen_list, nn)) != NULL && l < options.num_lines) {
++ while((nn = sorted_list_next_item(&screen_list, nn)) != NULL && (!options.num_lines || l < options.num_lines)) {
+ /* Increment the line counter */
+ l++;
+
+@@ -87,7 +87,7 @@
+ /* Send rate per connection */
+ printf("%4d %s%s", l, host1, " =>");
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size(screen_line->sent[j], buf0_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(screen_line->sent[j], buf0_10, 10, 1024, options.bandwidth_unit);
+ printf(" %10s", buf0_10);
+ }
+ /* Cumulative sent data per connection */
+@@ -97,7 +97,7 @@
+ /* Receive rate per connection */
+ printf(" %s%s", host2, " <=");
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size(screen_line->recv[j], buf0_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(screen_line->recv[j], buf0_10, 10, 1024, options.bandwidth_unit);
+ printf(" %10s", buf0_10);
+ }
+ /* Cumulative received data per connection */
+@@ -115,21 +115,21 @@
+ snprintf(labellong, PRINT_WIDTH + 9, "%-*s", PRINT_WIDTH + 9, "Total send rate:");
+ printf("%s ", labellong);
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size((((host_pair_line *)&totals)->sent[j]) , buf0_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(((host_pair_line *)&totals)->sent[j], buf0_10, 10, 1024, options.bandwidth_unit);
+ printf("%10s%c", buf0_10, j == HISTORY_DIVISIONS - 1 ? '\n' : ' ');
+ }
+
+ snprintf(labellong, PRINT_WIDTH + 9, "%-*s", PRINT_WIDTH + 9, "Total receive rate:");
+ printf("%s ", labellong);
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size((((host_pair_line *)&totals)->recv[j]) , buf0_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(((host_pair_line *)&totals)->recv[j], buf0_10, 10, 1024, options.bandwidth_unit);
+ printf("%10s%c", buf0_10, j == HISTORY_DIVISIONS - 1 ? '\n' : ' ');
+ }
+
+ snprintf(labellong, PRINT_WIDTH + 9, "%-*s", PRINT_WIDTH + 9, "Total send and receive rate:");
+ printf("%s ", labellong);
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size((((host_pair_line *)&totals)->sent[j] + ((host_pair_line *)&totals)->recv[j]) , buf0_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(((host_pair_line *)&totals)->sent[j] + ((host_pair_line *)&totals)->recv[j], buf0_10, 10, 1024, options.bandwidth_unit);
+ printf("%10s%c", buf0_10, j == HISTORY_DIVISIONS - 1 ? '\n' : ' ');
+ }
+
+@@ -141,9 +141,9 @@
+
+ /* Peak traffic */
+ snprintf(labellong, PRINT_WIDTH + 9, "%-*s", PRINT_WIDTH + 9, "Peak rate (sent/received/total):");
+- readable_size(peaksent / RESOLUTION, buf0_10, 10, 1024, options.bandwidth_in_bytes);
+- readable_size(peakrecv / RESOLUTION, buf1_10, 10, 1024, options.bandwidth_in_bytes);
+- readable_size(peaktotal / RESOLUTION, buf2_10, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(peaksent / RESOLUTION, buf0_10, 10, 1024, options.bandwidth_unit);
++ readable_size(peakrecv / RESOLUTION, buf1_10, 10, 1024, options.bandwidth_unit);
++ readable_size(peaktotal / RESOLUTION, buf2_10, 10, 1024, options.bandwidth_unit);
+ printf("%s %10s %10s %10s\n", labellong, buf0_10, buf1_10, buf2_10);
+
+ /* Cumulative totals */
+--- iftop-1.0pre4.orig/ui.c
++++ iftop-1.0pre4/ui.c
+@@ -71,7 +71,7 @@
+
+ /* Barchart scales. */
+ static struct {
+- int max, interval;
++ long max; int interval;
+ } scale[] = {
+ { 64000, 10 }, /* 64 kbit/s */
+ { 128000, 10 },
+@@ -79,7 +79,9 @@
+ { 1000000, 10 }, /* 1 Mbit/s */
+ { 10000000, 10 },
+ { 100000000, 100 },
+- { 1000000000, 100 } /* 1 Gbit/s */
++ { 1000000000, 100 }, /* 1 Gbit/s */
++ {10000000000, 100 },
++ {100000000000, 100 }
+ };
+ static int rateidx = 0, wantbiggerrate;
+
+@@ -105,16 +107,16 @@
+ }
+
+ /* rate in bits */
+-static int get_bar_length(const int rate) {
++static int get_bar_length(const long rate) {
+ float l;
+ if (rate <= 0)
+ return 0;
+ if (rate > scale[rateidx].max) {
+ wantbiggerrate = 1;
+ if(! rateidx_init) {
+- while(rate > scale[rateidx_init++].max) {
+- }
+- rateidx = rateidx_init;
++ while(rate > scale[rateidx_init++].max) {
++ }
++ rateidx = rateidx_init;
+ }
+ }
+ if(options.log_scale) {
+@@ -153,7 +155,7 @@
+ char s[40], *p;
+ int x;
+ /* This 1024 vs 1000 stuff is just plain evil */
+- readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, options.bandwidth_in_bytes);
++ readable_size(i, s, sizeof s, options.log_scale ? 1000 : 1024, options.bandwidth_unit);
+ p = s + strspn(s, " ");
+ x = get_bar_length(i * 8);
+ mvaddch(*y + 1, x, ACS_BTEE);
+@@ -177,13 +179,13 @@
+ }
+ }
+
+-void draw_line_total(float sent, float recv, int y, int x, option_linedisplay_t linedisplay, int bytes) {
++void draw_line_total(float sent, float recv, int y, int x, option_linedisplay_t linedisplay, option_bw_unit_t unit) {
+ char buf[10];
+ float n = 0;
+ switch(linedisplay) {
+ case OPTION_LINEDISPLAY_TWO_LINE:
+- draw_line_total(sent, recv, y, x, OPTION_LINEDISPLAY_ONE_LINE_SENT, bytes);
+- draw_line_total(sent, recv, y+1, x, OPTION_LINEDISPLAY_ONE_LINE_RECV, bytes);
++ draw_line_total(sent, recv, y, x, OPTION_LINEDISPLAY_ONE_LINE_SENT, unit);
++ draw_line_total(sent, recv, y+1, x, OPTION_LINEDISPLAY_ONE_LINE_RECV, unit);
+ break;
+ case OPTION_LINEDISPLAY_ONE_LINE_SENT:
+ n = sent;
+@@ -196,7 +198,7 @@
+ break;
+ }
+ if(linedisplay != OPTION_LINEDISPLAY_TWO_LINE) {
+- readable_size(n, buf, 10, 1024, bytes);
++ readable_size(n, buf, 10, 1024, unit);
+ mvaddstr(y, x, buf);
+ }
+ }
+@@ -214,7 +216,7 @@
+ int x = (COLS - 8 * HISTORY_DIVISIONS);
+
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- draw_line_total(line->sent[j], line->recv[j], y, x, linedisplay, options.bandwidth_in_bytes);
++ draw_line_total(line->sent[j], line->recv[j], y, x, linedisplay, options.bandwidth_unit);
+ x += 8;
+ }
+
+@@ -247,7 +249,7 @@
+ draw_line_totals(y, totals, OPTION_LINEDISPLAY_TWO_LINE);
+ y += 2;
+ for(j = 0; j < HISTORY_DIVISIONS; j++) {
+- readable_size((totals->sent[j] + totals->recv[j]) , buf, 10, 1024, options.bandwidth_in_bytes);
++ readable_size((totals->sent[j] + totals->recv[j]) , buf, 10, 1024, options.bandwidth_unit);
+ mvaddstr(y, x, buf);
+ x += 8;
+ }
+@@ -262,6 +264,7 @@
+ static char *line;
+ static int lcols;
+ int y = 0;
++ option_bw_unit_t cumunit;
+
+ if (dontshowdisplay)
+ return;
+@@ -375,25 +378,31 @@
+ /* Cummulative totals */
+ mvaddstr(y, 16, "cum: ");
+
+- readable_size(history_totals.total_sent, line, 10, 1024, 1);
++ /* Previous versions of iftop always displayed totals in bytes, even when
++ use-bytes = false. Stay compatible when the default unit hasn't been
++ changed. */
++ cumunit = options.bandwidth_unit;
++ if (cumunit == OPTION_BW_BITS)
++ cumunit = OPTION_BW_BYTES;
++ readable_size(history_totals.total_sent, line, 10, 1024, cumunit);
+ mvaddstr(y, 22, line);
+
+- readable_size(history_totals.total_recv, line, 10, 1024, 1);
++ readable_size(history_totals.total_recv, line, 10, 1024, cumunit);
+ mvaddstr(y+1, 22, line);
+
+- readable_size(history_totals.total_recv + history_totals.total_sent, line, 10, 1024, 1);
++ readable_size(history_totals.total_recv + history_totals.total_sent, line, 10, 1024, cumunit);
+ mvaddstr(y+2, 22, line);
+
+ /* peak traffic */
+ mvaddstr(y, 32, "peak: ");
+
+- readable_size(peaksent / RESOLUTION, line, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(peaksent / RESOLUTION, line, 10, 1024, options.bandwidth_unit);
+ mvaddstr(y, 39, line);
+
+- readable_size(peakrecv / RESOLUTION, line, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(peakrecv / RESOLUTION, line, 10, 1024, options.bandwidth_unit);
+ mvaddstr(y+1, 39, line);
+
+- readable_size(peaktotal / RESOLUTION, line, 10, 1024, options.bandwidth_in_bytes);
++ readable_size(peaktotal / RESOLUTION, line, 10, 1024, options.bandwidth_unit);
+ mvaddstr(y+2, 39, line);
+
+ mvaddstr(y, COLS - 8 * HISTORY_DIVISIONS - 8, "rates:");
+--- iftop-1.0pre4.orig/ui_common.c
++++ iftop-1.0pre4/ui_common.c
+@@ -21,8 +21,11 @@
+ int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};
+
+ #define UNIT_DIVISIONS 4
+-char* unit_bits[UNIT_DIVISIONS] = { "b", "Kb", "Mb", "Gb"};
+-char* unit_bytes[UNIT_DIVISIONS] = { "B", "KB", "MB", "GB"};
++char* unit_disp[][UNIT_DIVISIONS] = {
++ [OPTION_BW_BITS] = { "b", "Kb", "Mb", "Gb"},
++ [OPTION_BW_BYTES] = { "B", "KB", "MB", "GB"},
++ [OPTION_BW_PKTS] = { "p", "Kp", "Mp", "GB"},
++};
+
+ extern hash_type* history;
+ extern int history_pos;
+@@ -121,29 +124,34 @@
+ /*
+ * Format a data size in human-readable format
+ */
+-void readable_size(float n, char* buf, int bsize, int ksize, int bytes) {
++void readable_size(float n, char* buf, int bsize, int ksize,
++ option_bw_unit_t unit) {
+
+ int i = 0;
+ float size = 1;
+
+ /* Convert to bits? */
+- if(bytes == 0) {
++ if (unit == OPTION_BW_BITS) {
+ n *= 8;
+ }
+
++ /* Force power of ten for pps */
++ if (unit == OPTION_BW_PKTS)
++ ksize = 1000;
++
+ while(1) {
+ if(n < size * 1000 || i >= UNIT_DIVISIONS - 1) {
+- snprintf(buf, bsize, " %4.0f%s", n / size, bytes ? unit_bytes[i] : unit_bits[i]);
++ snprintf(buf, bsize, " %4.0f%s", n / size, unit_disp[unit][i]);
+ break;
+ }
+ i++;
+ size *= ksize;
+ if(n < size * 10) {
+- snprintf(buf, bsize, " %4.2f%s", n / size, bytes ? unit_bytes[i] : unit_bits[i]);
++ snprintf(buf, bsize, " %4.2f%s", n / size, unit_disp[unit][i]);
+ break;
+ }
+ else if(n < size * 100) {
+- snprintf(buf, bsize, " %4.1f%s", n / size, bytes ? unit_bytes[i] : unit_bits[i]);
++ snprintf(buf, bsize, " %4.1f%s", n / size, unit_disp[unit][i]);
+ break;
+ }
+ }
+@@ -263,9 +271,6 @@
+ } u_screen_line = { &screen_line };
+ addr_pair ap;
+ int i;
+- int tsent, trecv;
+- tsent = trecv = 0;
+-
+
+ ap = *(addr_pair*)n->key;
+
+--- iftop-1.0pre4.orig/ui_common.h
++++ iftop-1.0pre4/ui_common.h
+@@ -43,6 +43,6 @@
+ void analyse_data(void);
+ void screen_list_init(void);
+ void sprint_host(char * line, int af, struct in6_addr* addr, unsigned int port, unsigned int protocol, int L, int unspecified_as_star);
+-void readable_size(float, char*, int, int, int);
++void readable_size(float, char*, int, int, option_bw_unit_t);
+
+ #endif /* __UI_COMMON_H_ */
diff --git a/iftop-iff-running.patch b/iftop-iff-running.patch
deleted file mode 100644
index fb102b3..0000000
--- a/iftop-iff-running.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iftop-1.0pre4.orig/options.c 2014-01-19 21:16:43.000000000 +0100
-+++ options.c 2026-03-09 15:26:43.742227923 +0100
-@@ -103,7 +103,7 @@
- while(nameindex[j].if_index != 0) {
- if (strcmp(nameindex[j].if_name, "lo") != 0 && !is_bad_interface_name(nameindex[j].if_name)) {
- strncpy(ifr.ifr_name, nameindex[j].if_name, sizeof(ifr.ifr_name));
-- if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) || (ifr.ifr_flags & IFF_UP)) {
-+ if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) || (ifr.ifr_flags & IFF_RUNNING)) {
- i = xstrdup(nameindex[j].if_name);
- break;
- }
diff --git a/iftop-ipv6-dns-resolution.patch b/iftop-ipv6-dns-resolution.patch
deleted file mode 100644
index 1e67a7e..0000000
--- a/iftop-ipv6-dns-resolution.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- iftop-1.0pre4.orig/resolver.c 2014-01-19 19:52:33.000000000 +0100
-+++ resolver.c 2026-03-09 15:26:43.730616121 +0100
-@@ -438,11 +438,11 @@
- char **ch_pp;
- void **void_pp;
- } u_old = { &old };
-- if(hash_find(ns_hash, &addr, u_old.void_pp) == HASH_STATUS_OK) {
-+ if(hash_find(ns_hash, &addr.as_addr6, u_old.void_pp) == HASH_STATUS_OK) {
- hash_delete(ns_hash, &addr);
- xfree(old);
- }
-- hash_insert(ns_hash, &addr, (void*)hostname);
-+ hash_insert(ns_hash, &addr.as_addr6, (void*)hostname);
- }
-
- }
-@@ -488,7 +488,7 @@
-
- pthread_mutex_lock(&resolver_queue_mutex);
-
-- if(hash_find(ns_hash, raddr, u_hostname.void_pp) == HASH_STATUS_OK) {
-+ if(hash_find(ns_hash, &raddr->as_addr6, u_hostname.void_pp) == HASH_STATUS_OK) {
- /* Found => already resolved, or on the queue, no need to keep
- * it around */
- free(raddr);
-@@ -497,7 +497,7 @@
- hostname = xmalloc(INET6_ADDRSTRLEN);
- inet_ntop(af, &raddr->addr, hostname, INET6_ADDRSTRLEN);
-
-- hash_insert(ns_hash, raddr, hostname);
-+ hash_insert(ns_hash, &raddr->as_addr6, hostname);
-
- if(((head + 1) % RESOLVE_QUEUE_LENGTH) == tail) {
- /* queue full */
diff --git a/iftop-mac-address-format.patch b/iftop-mac-address-format.patch
deleted file mode 100644
index f528815..0000000
--- a/iftop-mac-address-format.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- iftop-1.0pre4.orig/iftop.c 2014-01-19 21:21:19.000000000 +0100
-+++ iftop.c 2026-03-09 15:26:43.703219190 +0100
-@@ -713,7 +713,7 @@
- if(have_hw_addr) {
- fprintf(stderr, "MAC address is:");
- for (i = 0; i < 6; ++i)
-- fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned int)if_hw_addr[i]);
-+ fprintf(stderr, "%c%02x", i ? ':' : ' ', (unsigned char)if_hw_addr[i]);
- fprintf(stderr, "\n");
- }
-
diff --git a/iftop-multi-gigabit.patch b/iftop-multi-gigabit.patch
deleted file mode 100644
index 6212f06..0000000
--- a/iftop-multi-gigabit.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- iftop-1.0pre4.orig/ui.c 2014-01-19 19:48:30.000000000 +0100
-+++ ui.c 2026-03-09 15:26:43.719297092 +0100
-@@ -71,7 +71,7 @@
-
- /* Barchart scales. */
- static struct {
-- int max, interval;
-+ long max; int interval;
- } scale[] = {
- { 64000, 10 }, /* 64 kbit/s */
- { 128000, 10 },
-@@ -79,7 +79,9 @@
- { 1000000, 10 }, /* 1 Mbit/s */
- { 10000000, 10 },
- { 100000000, 100 },
-- { 1000000000, 100 } /* 1 Gbit/s */
-+ { 1000000000, 100 }, /* 1 Gbit/s */
-+ {10000000000, 100 },
-+ {100000000000, 100 }
- };
- static int rateidx = 0, wantbiggerrate;
-
-@@ -105,7 +107,7 @@
- }
-
- /* rate in bits */
--static int get_bar_length(const int rate) {
-+static int get_bar_length(const long rate) {
- float l;
- if (rate <= 0)
- return 0;
diff --git a/iftop-resolver.patch b/iftop-resolver.patch
deleted file mode 100644
index 5d3c2b4..0000000
--- a/iftop-resolver.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- iftop-1.0pre2/configure.in~ 2011-11-13 11:21:13.000000000 +0100
-+++ iftop-1.0pre2/configure.in 2011-11-13 11:22:16.996495550 +0100
-@@ -172,13 +172,14 @@
- dnl From this point on, resolver is our preferred resolver given the
- dnl experiments we've done so far, or "guess" if we have no idea.
- specified_resolver=$resolver
--if test x$specified_resolver = xguess ; then
-+if test x$specified_resolver = xguess -o test x$specified_resolver = xgetnameinfo; then
- dnl Best possibility is getnameinfo.
- use_getnameinfo=0
- AC_SEARCH_LIBS(getnameinfo, [], [use_getnameinfo=1])
-
- if test $use_getnameinfo = 1 ; then
- dnl Done.
-+ resolver=getnameinfo
- AC_DEFINE(USE_GETNAMEINFO, 1, [use getnameinfo for name resolution])
- else
- dnl Best hope is netdb, which presently means gethostbyaddr_r.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/iftop.git/commitdiff/f0c258ec150035e0ac42c1b78e722509d5b34a72
More information about the pld-cvs-commit
mailing list