removed some old files, small updates
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
Changelog
|
||||
|
||||
27/08/05 (Arnout)
|
||||
- giving all unknown connections their own
|
||||
`unknown' process
|
||||
- UDP support
|
||||
- investigated memleak, turns out to be a problem in libc:
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273051
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=103142
|
||||
|
||||
18/09/04 (Arnout)
|
||||
- also compile with gcc-3.4
|
||||
|
||||
|
||||
4
Makefile
4
Makefile
@@ -10,8 +10,8 @@ man8 := $(DESTDIR)/share/man/man8/
|
||||
|
||||
all: nethogs
|
||||
|
||||
#CFLAGS=-g -Wall
|
||||
CFLAGS=-O2
|
||||
CFLAGS=-g -Wall
|
||||
#CFLAGS=-O2
|
||||
OBJS=structs.o packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o
|
||||
GCC=g++
|
||||
.PHONY: tgz
|
||||
|
||||
4
cui.cpp
4
cui.cpp
@@ -268,7 +268,9 @@ void do_refresh()
|
||||
uid_t uid = curproc->getVal()->getUid();
|
||||
if (!ROBUST)
|
||||
{
|
||||
assert (getpwuid(uid) != NULL);
|
||||
struct passwd * pwuid = getpwuid(uid);
|
||||
assert (pwuid != NULL);
|
||||
free (pwuid);
|
||||
assert (curproc->getVal()->pid >= 0);
|
||||
assert (n < nproc);
|
||||
}
|
||||
|
||||
33
hashtbl.h
33
hashtbl.h
@@ -1,33 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
class HashNode
|
||||
{
|
||||
public:
|
||||
~HashNode();
|
||||
|
||||
char * key;
|
||||
void * content;
|
||||
HashNode * next;
|
||||
};
|
||||
|
||||
class HashTable
|
||||
{
|
||||
public:
|
||||
HashTable(int n_size);
|
||||
~HashTable();
|
||||
|
||||
/* after calling 'add', the calling application
|
||||
* must free the string */
|
||||
void add(char * key, void * content);
|
||||
void * get(char * key);
|
||||
|
||||
private:
|
||||
int size;
|
||||
HashNode ** table;
|
||||
|
||||
HashNode * newHashNode(char * key, void * content, HashNode * next);
|
||||
unsigned int HashString(const char * str);
|
||||
|
||||
HashTable(); // We leave this unimplemented ;)
|
||||
};
|
||||
Reference in New Issue
Block a user