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