Skip to content

Commit

Permalink
use tcpdump to capture pcaps (#133)
Browse files Browse the repository at this point in the history
* Use `tcpdump` to capture a second set of pcaps

* Don't capture pcaps with ns3
  • Loading branch information
larseggert authored Sep 5, 2024
1 parent de21ef0 commit e5f7217
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN cd /wait-for-it-quic && go build .
FROM ubuntu:24.04

RUN apt-get update && \
apt-get install -y net-tools iptables libgsl-dev libxml2 libsqlite3-0 && \
apt-get install -y net-tools iptables libgsl-dev libxml2 libsqlite3-0 tcpdump && \
apt-get clean

WORKDIR /ns3
Expand Down
2 changes: 2 additions & 0 deletions sim/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ fi

echo "Using scenario:" $SCENARIO

tcpdump -i eth0 -U -w "/logs/trace_node_left.pcap" &
tcpdump -i eth1 -U -w "/logs/trace_node_right.pcap" &
eval ./scratch/"$SCENARIO &"

PID=`jobs -p`
Expand Down
4 changes: 0 additions & 4 deletions sim/scenarios/helper/quic-point-to-point-helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ void QuicPointToPointHelper::SetQueueSize(StringValue size) {

NetDeviceContainer QuicPointToPointHelper::Install(Ptr<Node> a, Ptr<Node> b) {
NetDeviceContainer devices = PointToPointHelper::Install(a, b);
// capture a pcap of all packets
EnablePcap("/logs/trace_node_left.pcap", devices.Get(0), false, true);
EnablePcap("/logs/trace_node_right.pcap", devices.Get(1), false, true);

TrafficControlHelper tch;
tch.SetRootQueueDisc("ns3::PfifoFastQueueDisc", "MaxSize", queue_size_);
tch.Install(devices);
Expand Down

0 comments on commit e5f7217

Please sign in to comment.