-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReadme.txt
More file actions
38 lines (31 loc) · 1.24 KB
/
Copy pathReadme.txt
File metadata and controls
38 lines (31 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This program counts the number of packets per protocol port.
# Can be used for instance to get an idea of how much HTTP (TCP 80)
# vs HTTPS (TCP 443) traffic is present in the network.
#
# For TCP it makes sense to set a BPF* to count flows instead of total packets.
# For UDP we don't have that option. TODO implement conntrack.
# For ICMP all packets are mapped to port 0.
#
# Important! A BPF MUST limit packet capture to a single protocol (e.g., TCP)
# otherwise counts for the same port in different protocols will be aggregated.
#
# *: If no BPF is set the default filter captures HTTP/HTTPS flows.
# To run with an empty BPF (no recommended) use: -f ""
#
# kontaxis 2014-11-03
# Build
make
# Clean
make clean
# Run on an ethernet interface.
sudo ./tcpstat -i eth0
# Run on an ethernet interface. (debug/verbose)
# All packets processed will be written to file ./eth0.pcap
sudo ./tcpstat_dbg -i eth0
# Run on a raw IP interface. (e.g., P-t-P tunnel)
sudo ./tcpstat_noether -i tun0
# Run on a raw IP interface. (e.g., P-t-P tunnel) (debug/verbose)
# 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