some small changes to get nethogs into a more releaseable state again
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
Changelog
|
||||
|
||||
08/06/08 (Arnout, thanks to MeneerJansen for sparking some activity again :) )
|
||||
- add 'if (DEBUG)' to debug message
|
||||
- fix compiler warning by marking some constant
|
||||
strings 'const'
|
||||
- set view mode to 'kbps' by default,
|
||||
instead of the 'grand total' number of bytes
|
||||
|
||||
27/08/05 (Arnout)
|
||||
- giving all unknown connections their own
|
||||
`unknown' process
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION := 0
|
||||
SUBVERSION := 6
|
||||
MINORVERSION := 2pre2
|
||||
SUBVERSION := 7
|
||||
MINORVERSION := snapshot
|
||||
|
||||
#DESTDIR := /usr
|
||||
DESTDIR := /usr/local
|
||||
@@ -8,7 +8,8 @@ DESTDIR := /usr/local
|
||||
bin := $(DESTDIR)/bin
|
||||
man8 := $(DESTDIR)/share/man/man8/
|
||||
|
||||
all: nethogs decpcap_test nethogs_testsum
|
||||
all: nethogs decpcap_test
|
||||
# nethogs_testsum
|
||||
|
||||
CFLAGS=-g -Wall
|
||||
#CFLAGS=-O2
|
||||
|
||||
@@ -146,7 +146,10 @@ void Connection::add (Packet * packet)
|
||||
std::cout << "Incoming: " << packet->len << std::endl;
|
||||
}
|
||||
sumRecv += packet->len;
|
||||
std::cout << "sumRecv now: " << sumRecv << std::endl;
|
||||
if (DEBUG)
|
||||
{
|
||||
std::cout << "sumRecv now: " << sumRecv << std::endl;
|
||||
}
|
||||
recv_packets->add (packet);
|
||||
}
|
||||
}
|
||||
|
||||
2
cui.cpp
2
cui.cpp
@@ -24,7 +24,7 @@ int VIEWMODE_KBPS = 0;
|
||||
int VIEWMODE_TOTAL_KB = 1;
|
||||
int VIEWMODE_TOTAL_B = 2;
|
||||
int VIEWMODE_TOTAL_MB = 3;
|
||||
int viewMode = VIEWMODE_TOTAL_B;
|
||||
int viewMode = VIEWMODE_KBPS;
|
||||
int nViewModes = 4;
|
||||
|
||||
class Line
|
||||
|
||||
@@ -44,7 +44,7 @@ class Process
|
||||
{
|
||||
public:
|
||||
/* the process makes a copy of the device name and name. */
|
||||
Process (unsigned long m_inode, char * m_devicename, char * m_name = NULL)
|
||||
Process (unsigned long m_inode, const char * m_devicename, const char * m_name = NULL)
|
||||
{
|
||||
//std::cout << "ARN: Process created with dev " << m_devicename << std::endl;
|
||||
if (DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user