Commit 3dcbe7a6 authored by pdw's avatar pdw
Browse files

Updated SPEC file.

Updated to version 0.8pre1.
Now compiles with older libpcap (without SLL support).
Further fixes to display of rates.
parent 6da4be8a
......@@ -6,6 +6,8 @@ $Id$
Added support for displaying port numbers
Minor fix to rate display
Minor fix to netmask handling (specifying /32 was broken)
Updated RPM spec file
Iain Lea <iain@bricbrac.de>
0.7 02/10/02
......
......@@ -27,7 +27,7 @@ MANDIR = man
#MANDIR = share/man # FHS-ish
# You shouldn't need to change anything below this point.
VERSION = 0.7
VERSION = 0.8pre1
CFLAGS += -g -Wall "-DIFTOP_VERSION=\"$(VERSION)\""
LDFLAGS += -g
LDLIBS += -lpcap -lpthread -lcurses -lm
......
......@@ -346,9 +346,14 @@ void packet_init() {
else if(dlt == DLT_RAW) {
packet_handler = handle_raw_packet;
}
/*
* SLL support not available in older libpcaps
*/
#ifdef DLT_LINUX_SLL
else if(dlt == DLT_LINUX_SLL) {
packet_handler = handle_cooked_packet;
packet_handler = handle_cooked_packet;
}
#endif
else {
fprintf(stderr, "Unsupported datalink type: %d\n"
"Please email pdw@ex-parrot.com, quoting the datalink type and what you were\n"
......
Summary: iftop - provides realtime bandwith usage on an interface
Name: iftop
Version: 0.3
Version: 0.8pre1
Release: 1
License: GPL
Group: Applications/Internet
Source0: http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.3.tar.gz
Source0: http://www.ex-parrot.com/~pdw/iftop/download/iftop-0.8pre1.tar.gz
URL: http://www.ex-parrot.com/~pdw/iftop/
Buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
Packager: Riku Meskanen <mesrik@cc.jyu.fi>
......@@ -29,19 +29,21 @@ make
make DESTDIR=$RPM_BUILD_ROOT iftop
gzip -9 iftop.8
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} ${RPM_BUILD_ROOT}%{_mandir}/man8
install -o root -g root -m 755 iftop ${RPM_BUILD_ROOT}%{_sbindir}
install -o root -g root -m 644 iftop.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8
install -m 755 iftop ${RPM_BUILD_ROOT}%{_sbindir}
install -m 644 iftop.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%defattr(-,root,root)
%doc README CHANGES COPYING TODO INSTALL
%attr(755,root,root) %{_sbindir}/iftop
%{_mandir}/man8/*
%changelog
* Fri Aug 30 2002 Iain Lea <iain@bricbrac.de>
- Updated build for Red Hat 7.3 version
* Sat Apr 13 2002 Riku Meskanen <mesrik@cc.jyu.fi>
- Initial build for Red Hat 7.2 version
......@@ -63,11 +63,11 @@ int screen_line_compare(void* a, void* b) {
}
void readable_size(float n, char* buf, int bsize, int ksize, int bytes) {
if(n >= ksize * ksize) {
if(n >= 10 * ksize * ksize) {
snprintf(buf, bsize, " %4.1f%s", n / (ksize * ksize), bytes ? "MB" : "M");
}
if(n >= 100 * ksize) {
snprintf(buf, bsize, " %4.0f%s", n / ksize, bytes ? "KB" : "K" );
if(n >= ksize * ksize) {
snprintf(buf, bsize, " %4.2f%s", n / (ksize * ksize), bytes ? "MB" : "M" );
}
else if(n >= ksize) {
snprintf(buf, bsize, " %4.1f%s", n / ksize, bytes ? "KB" : "K" );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment