removed lpthread dependency.
authorGeorgios Kontaxis <redacted>
Thu, 9 Apr 2015 19:04:23 +0000 (15:04 -0400)
committerGeorgios Kontaxis <redacted>
Thu, 9 Apr 2015 19:04:23 +0000 (15:04 -0400)
SIGUSR1 for real-time stats.

Makefile
Readme.txt

index 01757cd51a4bdb16cf033d3ab3d633488bd4cf07..3a9de62c802ff60e87cdc142e8b450528da7c52e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,30 +6,28 @@ debug: tcpstat_dbg tcpstat_noether_dbg
 
 tcpstat: tcpstat.c
        gcc -Wall \
-               -D__WITH_THREADS__ \
                tcpstat.c \
-               -lpcap -lpthread \
+               -lpcap \
                -o tcpstat
 
 tcpstat_dbg: tcpstat.c
        gcc -Wall -ggdb -O0 -D__DEBUG__ \
-               -D__WITH_THREADS__ \
                tcpstat.c \
-               -lpcap -lpthread \
+               -lpcap \
                -o tcpstat_dbg
 
 tcpstat_noether: tcpstat.c
        gcc -Wall \
-               -D__WITH_THREADS__ -D__NO_ETHERNET__ \
+               -D__NO_ETHERNET__ \
                tcpstat.c \
-               -lpcap -lpthread \
+               -lpcap \
                -o tcpstat_noether
 
 tcpstat_noether_dbg: tcpstat.c
        gcc -Wall -ggdb -O0 -D__DEBUG__ \
-               -D__WITH_THREADS__ -D__NO_ETHERNET__ \
+               -D__NO_ETHERNET__ \
                tcpstat.c \
-               -lpcap -lpthread \
+               -lpcap \
                -o tcpstat_noether_dbg
 
 
index 54e1fef9c4090f49523e4acebd7cad7e4a133403..783cac383b5e3b80d96c9a9f064b2fcaf20e8375 100644 (file)
@@ -34,3 +34,5 @@ sudo ./tcpstat_noether -i tun0
 # All packets processed will be written to file ./tun0.pcap
 sudo ./tcpstat_noether_dbg -i tun0
 
+# Signals: receipt of SIGUSR1 will print current packet counts to stdout
+sudo pkill --signal SIGUSR1 -x tcpstat
git clone https://git.99rst.org/PROJECT