diff --git a/Changelog b/Changelog index 5d2b05a..08b2671 100644 --- a/Changelog +++ b/Changelog @@ -44,7 +44,7 @@ Changelog -using standard C++ maps instead of custom structures -many more code cleanups -documentation --split up ui code in seperate module +-split up ui code in separate module ------------------------------------------------- diff --git a/DESIGN b/DESIGN index e6682ff..6ff0d4a 100644 --- a/DESIGN +++ b/DESIGN @@ -1,4 +1,4 @@ -Rough design notitions: +Rough design notes: decpcap handles pcap. nethogs.cpp asks to be notified of all IPv4 or IPv6 TCP packets. @@ -25,7 +25,7 @@ table should be updated regularly. There are some global data structures: connection.cpp: - connections. 'ConnList' list containting all currently known connections. + connections. 'ConnList' list containing all currently known connections. A connection removes itself from the global 'connections' list in its destructor. diff --git a/README.md b/README.md index c54327f..0ce7fd4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Introduction NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, **it groups bandwidth by process**. -NetHogs does not rely on a special kernel module to be loaded. If there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth. +NetHogs does not rely on a special kernel module to be loaded. If there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to identify programs that have gone wild and are suddenly taking up your bandwidth. Since NetHogs heavily relies on `/proc`, most features are only available on Linux. NetHogs can be built on Mac OS X, but it will only show connections, not processes. diff --git a/src/MakeLib.mk b/src/MakeLib.mk index 88969dd..d6dc097 100644 --- a/src/MakeLib.mk +++ b/src/MakeLib.mk @@ -20,7 +20,7 @@ ODIR_BASE := obj ifeq ($(DEBUG),1) # Debug mode options - $(info Bulding debug version) + $(info Building debug version) ODIR:=$(ODIR_BASE)/lib/debug CFLAGS?=-Wall -Wextra -O0 -g -fPIC $(VISIBILITY) CXXFLAGS?=-Wall -Wextra -Wno-missing-field-initializers --std=c++0x -O0 -g -fPIC $(VISIBILITY) $(CXXINCLUDES) diff --git a/src/connection.cpp b/src/connection.cpp index ce4f76a..5add391 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -202,7 +202,7 @@ Connection *findConnection(Packet *packet) { * and removes 'old' packets. * * Returns sum of sent packages (by address) - * sum of recieved packages (by address) + * sum of received packages (by address) */ void Connection::sumanddel(timeval t, u_int32_t *recv, u_int32_t *sent) { (*sent) = (*recv) = 0; diff --git a/src/inode2prog.cpp b/src/inode2prog.cpp index 0da8484..e2b7972 100644 --- a/src/inode2prog.cpp +++ b/src/inode2prog.cpp @@ -196,7 +196,7 @@ void reread_mapping() { DIR *proc = opendir("/proc"); if (proc == 0) { - std::cerr << "Error reading /proc, neede to get inode-to-pid-maping\n"; + std::cerr << "Error reading /proc, needed to get inode-to-pid-maping\n"; exit(1); } diff --git a/src/libnethogs.cpp b/src/libnethogs.cpp index 51e8cae..18a30e2 100644 --- a/src/libnethogs.cpp +++ b/src/libnethogs.cpp @@ -173,7 +173,7 @@ static void nethogsmonitor_handle_update(NethogsMonitorCallback cb) { assert(curproc->getVal() != NULL); assert(nproc == processes->size()); - /* remove timed-out processes (unless it's one of the the unknown process) + /* remove timed-out processes (unless it's one of the unknown process) */ if ((curproc->getVal()->getLastPacket() + PROCESSTIMEOUT <= curtime.tv_sec) && diff --git a/src/libnethogs.h b/src/libnethogs.h index cdc0e40..75340fe 100644 --- a/src/libnethogs.h +++ b/src/libnethogs.h @@ -32,9 +32,9 @@ typedef struct NethogsMonitorRecord { /** * @brief Defines a callback to handle updates about applications - * @param action NETHOGS_APP_ACTION_SET if data is beeing added or updated, - * NETHOGS_APP_ACTION_REMOVE if data is beeing removed. - * the record_id member is used to uniquely identify the data beeing + * @param action NETHOGS_APP_ACTION_SET if data is being added or updated, + * NETHOGS_APP_ACTION_REMOVE if data is being removed. + * the record_id member is used to uniquely identify the data being * update or removed. * @param data a pointer to an application usage data. the pointer remains valid * until diff --git a/src/nethogs.h b/src/nethogs.h index b4f5102..3b1a17f 100644 --- a/src/nethogs.h +++ b/src/nethogs.h @@ -41,11 +41,11 @@ /* take the average speed over the last 5 seconds */ #define PERIOD 5 -/* the amount of time after the last packet was recieved +/* the amount of time after the last packet was received * after which a process is removed */ #define PROCESSTIMEOUT 150 -/* the amount of time after the last packet was recieved +/* the amount of time after the last packet was received * after which a connection is removed */ #define CONNTIMEOUT 50