packet capture tool for analyzing udx and dht-rpc traffic
# first install pcap and pcap header files for your system
# e.g. on ubuntu:
apt install pcap pcap-devel
# build the binary
make
# enable live capture without running as root
sudo setcap cap_net_raw,cap_net_admin+eip ./udxcaplive capture
# live capture on the first interface found, usually wifi or wired ethernet
udxcap
# live capture on specific interface
udxcap -i eth0
# live capture with a filter for specific address and port
udxcap -i lo -f 'host 127.0.0.1 and port 5001'
# read pcap file generated by tcpdump or wireshark
tcpdump -w capture.pcap [filter] # generate pcap
udxcap -r f.pcap
# generate and display throughput graph with gnuplot
udxcap -g
# generates file[s] in the current directory for each source_ip:source_port::dst_ip:dst_port:udx_remote_id quintuple
# to generate a graph file, edit the template.plot to point to the .dat file you're interested in and run
gnuplot -c template.plot