Commit c948eab8 authored by Andreas Schmidt's avatar Andreas Schmidt

Merge branch 'develop'

parents c2c6cef3 e8a778ce
Pipeline #3959 failed with stages
in 1 minute and 20 seconds
...@@ -10,3 +10,5 @@ MANIFEST ...@@ -10,3 +10,5 @@ MANIFEST
prrt.cpython*.so prrt.cpython*.so
prrt.so prrt.so
.ipynb_checkpoints/ .ipynb_checkpoints/
.idea/
.venv/
...@@ -22,9 +22,9 @@ build:prrt: ...@@ -22,9 +22,9 @@ build:prrt:
- which cmake - which cmake
- which gcc - which gcc
- which g++ - which g++
- pip3 list | grep Cython - pip3 list --format=legacy | grep Cython
- pip3 list | grep numpy - pip3 list --format=legacy | grep numpy
- CC=gcc-5 CXX=g++-5 cmake . -DPRRT_TESTS=1 - CC=gcc-5 CXX=g++-5 cmake .
- make - make
build:container: build:container:
...@@ -65,6 +65,8 @@ test:prrt_functional: ...@@ -65,6 +65,8 @@ test:prrt_functional:
tags: tags:
- bash - bash
script: script:
- CC=gcc-5 CXX=g++-5 cmake . -DPRRT_TESTS=1
- make
- exec ./prrtTests - exec ./prrtTests
test:prrt_python_bindings: test:prrt_python_bindings:
...@@ -105,4 +107,4 @@ deploy:profile: ...@@ -105,4 +107,4 @@ deploy:profile:
paths: paths:
- gprof-send.txt - gprof-send.txt
- gprof-recv.txt - gprof-recv.txt
expire_in: 30 days expire_in: 30 days
\ No newline at end of file
...@@ -36,4 +36,4 @@ if(PRRT_TESTS) ...@@ -36,4 +36,4 @@ if(PRRT_TESTS)
endif() endif()
add_custom_target(perftest COMMAND python3 tests/eval.py) add_custom_target(perftest COMMAND python3 tests/eval.py)
add_custom_target(memtest COMMAND bash ./memtest.sh DEPENDS sender receiver) add_custom_target(memtest COMMAND bash ./memtest.sh DEPENDS sender receiver)
\ No newline at end of file
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
Cython = "*"
jupyter = "*"
numpy = "*"
pandas = "*"
matplotlib = "*"
ruamel-yaml = "*"
scikit-learn = "*"
graphviz = "*"
prrt = {editable = true, path = "."}
[requires]
python_version = "3.6"
This diff is collapsed.
...@@ -21,20 +21,23 @@ local pf_idx = ProtoField.uint8("prrt.index", "Index") ...@@ -21,20 +21,23 @@ local pf_idx = ProtoField.uint8("prrt.index", "Index")
local pf_seqN = ProtoField.uint16("prrt.sequenceNumber", "Sequence Number") local pf_seqN = ProtoField.uint16("prrt.sequenceNumber", "Sequence Number")
local pf_data = ProtoField.new("Data", "prrt.data", ftypes.BYTES, base.NONE) local pf_data = ProtoField.new("Data", "prrt.data", ftypes.BYTES, base.NONE)
local pf_data_length = ProtoField.uint32("prrt.data.length", "Length")
local pf_data_timestamp = ProtoField.uint32("prrt.data.timestamp", "Timestamp") local pf_data_timestamp = ProtoField.uint32("prrt.data.timestamp", "Timestamp")
local pf_data_groupRTprop = ProtoField.uint32("prrt.data.grouprtprop", "Group RTprop") local pf_data_btl_pace = ProtoField.uint32("prrt.data.btl_pace", "Bottleneck Pace")
local pf_data_length = ProtoField.uint32("prrt.data.length", "Length")
local pf_data_RTprop = ProtoField.uint32("prrt.data.RTprop", "RTprop")
local pf_data_packettimeout = ProtoField.uint32("prrt.data.packettimeout", "Packet Timeout") local pf_data_packettimeout = ProtoField.uint32("prrt.data.packettimeout", "Packet Timeout")
local pf_data_btlDatarate = ProtoField.uint32("prrt.data.btl_datarate", "Bottleneck Datarate")
local pf_red = ProtoField.new("Redundancy", "prrt.redundancy", ftypes.BYTES, base.NONE) local pf_red = ProtoField.new("Redundancy", "prrt.redundancy", ftypes.BYTES, base.NONE)
local pf_red_baseSeqN = ProtoField.uint16("prrt.redundancy.baseSequenceNumber", "Base Sequence Number", base.DEC)
local pf_red_timestamp = ProtoField.uint32("prrt.redundancy.timestamp", "Timestamp") local pf_red_timestamp = ProtoField.uint32("prrt.redundancy.timestamp", "Timestamp")
local pf_red_btl_pace = ProtoField.uint32("prrt.redundancy.btl_pace", "Bottleneck Pace")
local pf_red_baseSeqN = ProtoField.uint16("prrt.redundancy.baseSequenceNumber", "Base Sequence Number", base.DEC)
local pf_red_n = ProtoField.uint8("prrt.redundancy.n", "n") local pf_red_n = ProtoField.uint8("prrt.redundancy.n", "n")
local pf_red_k = ProtoField.uint8("prrt.redundancy.k", "k") local pf_red_k = ProtoField.uint8("prrt.redundancy.k", "k")
local pf_fb = ProtoField.new("Feedback", "prrt.feedback", ftypes.BYTES, base.NONE) local pf_fb = ProtoField.new("Feedback", "prrt.feedback", ftypes.BYTES, base.NONE)
local pf_fb_groupRTT = ProtoField.uint32("prrt.feedback.groupRTT", "Group RTT")
local pf_fb_ftt = ProtoField.uint32("prrt.feedback.FTT", "FTT") local pf_fb_ftt = ProtoField.uint32("prrt.feedback.FTT", "FTT")
local pf_fb_btlPace = ProtoField.uint32("prrt.feedback.btlPace", "Bottleneck pace")
local pf_fb_erasurecount = ProtoField.uint16("prrt.feedback.erasureCount", "Erasure count") local pf_fb_erasurecount = ProtoField.uint16("prrt.feedback.erasureCount", "Erasure count")
local pf_fb_packetcount = ProtoField.uint16("prrt.feedback.packetCount", "Packet count") local pf_fb_packetcount = ProtoField.uint16("prrt.feedback.packetCount", "Packet count")
local pf_fb_gaplength = ProtoField.uint16("prrt.feedback.gapLength", "Gap length") local pf_fb_gaplength = ProtoField.uint16("prrt.feedback.gapLength", "Gap length")
...@@ -52,20 +55,23 @@ prrt_proto.fields = { ...@@ -52,20 +55,23 @@ prrt_proto.fields = {
pf_seqN, pf_seqN,
pf_data, pf_data,
pf_data_length,
pf_data_timestamp, pf_data_timestamp,
pf_data_groupRTprop, pf_data_btl_pace,
pf_data_length,
pf_data_RTprop,
pf_data_packettimeout, pf_data_packettimeout,
pf_data_btlDatarate,
pf_red, pf_red,
pf_red_baseSeqN,
pf_red_timestamp, pf_red_timestamp,
pf_red_btl_pace,
pf_red_baseSeqN,
pf_red_n, pf_red_n,
pf_red_k, pf_red_k,
pf_fb, pf_fb,
pf_fb_groupRTT,
pf_fb_ftt, pf_fb_ftt,
pf_fb_btlPace,
pf_fb_erasurecount, pf_fb_erasurecount,
pf_fb_packetcount, pf_fb_packetcount,
pf_fb_gaplength, pf_fb_gaplength,
...@@ -111,10 +117,12 @@ local PRRT_MIN_SIZE = 8 ...@@ -111,10 +117,12 @@ local PRRT_MIN_SIZE = 8
-- create sub-dissectors for different types -- create sub-dissectors for different types
local function dissect_data(buffer, pinfo, root) local function dissect_data(buffer, pinfo, root)
local tree = root:add(pf_data, buffer:range(0)) local tree = root:add(pf_data, buffer:range(0))
tree:add(pf_data_length, buffer:range(0,4)) tree:add(pf_data_timestamp, buffer:range(0,4))
tree:add(pf_data_timestamp, buffer:range(4,4)) tree:add(pf_data_btl_pace, buffer:range(4,4))
tree:add(pf_data_groupRTprop, buffer:range(8,4)) tree:add(pf_data_length, buffer:range(8,4))
tree:add(pf_data_packettimeout, buffer:range(12,4)) tree:add(pf_data_RTprop, buffer:range(12,4))
tree:add(pf_data_packettimeout, buffer:range(16,4))
tree:add(pf_data_btlDatarate, buffer:range(20,4))
local label = "[D] Idx=" .. getIndex() .. " Len=" .. getDataLength() local label = "[D] Idx=" .. getIndex() .. " Len=" .. getDataLength()
tree:set_text(label) tree:set_text(label)
...@@ -123,10 +131,11 @@ end ...@@ -123,10 +131,11 @@ end
local function dissect_redundancy(buffer, pinfo, root) local function dissect_redundancy(buffer, pinfo, root)
local tree = root:add(pf_red, buffer:range(0)) local tree = root:add(pf_red, buffer:range(0))
tree:add(pf_red_baseSeqN, buffer:range(0,2)) tree:add(pf_red_timestamp, buffer:range(0,4))
tree:add(pf_red_timestamp, buffer:range(2,4)) tree:add(pf_red_btl_pace, buffer:range(4,4))
tree:add(pf_red_n, buffer:range(6,1)) tree:add(pf_red_baseSeqN, buffer:range(8,2))
tree:add(pf_red_k, buffer:range(7,1)) tree:add(pf_red_n, buffer:range(10,1))
tree:add(pf_red_k, buffer:range(11,1))
local label = "[R] Idx=" .. getIndex() .. " b=" .. getRedBaseSeqNo() .. " n=" .. getRedN() .. " k=" .. getRedK() local label = "[R] Idx=" .. getIndex() .. " b=" .. getRedBaseSeqNo() .. " n=" .. getRedN() .. " k=" .. getRedK()
tree:set_text(label) tree:set_text(label)
...@@ -135,8 +144,8 @@ end ...@@ -135,8 +144,8 @@ end
local function dissect_feedback(buffer, pinfo, root) local function dissect_feedback(buffer, pinfo, root)
local tree = root:add(pf_fb, buffer:range(0)) local tree = root:add(pf_fb, buffer:range(0))
tree:add(pf_fb_groupRTT, buffer:range(0,4)) tree:add(pf_fb_ftt, buffer:range(0,4))
tree:add(pf_fb_ftt, buffer:range(4,4)) tree:add(pf_fb_btlPace, buffer:range(4,4))
tree:add(pf_fb_erasurecount, buffer:range(8,2)) tree:add(pf_fb_erasurecount, buffer:range(8,2))
tree:add(pf_fb_packetcount, buffer:range(10,2)) tree:add(pf_fb_packetcount, buffer:range(10,2))
tree:add(pf_fb_gaplength, buffer:range(12,2)) tree:add(pf_fb_gaplength, buffer:range(12,2))
...@@ -205,4 +214,3 @@ function prrt_proto.prefs_changed() ...@@ -205,4 +214,3 @@ function prrt_proto.prefs_changed()
end end
end end
end end
...@@ -87,7 +87,7 @@ static int hf_prrt_payload = -1; /* payload with arbitrary length, depend ...@@ -87,7 +87,7 @@ static int hf_prrt_payload = -1; /* payload with arbitrary length, depend
static int hf_prrt_receiver_addr = -1; /* 32 bits IP address of the receiver */ static int hf_prrt_receiver_addr = -1; /* 32 bits IP address of the receiver */
static int hf_prrt_rtt_probe = -1; /* 32 bits timestamp of most recent data packet plus delay since reception of this packet. */ static int hf_prrt_rtt_probe = -1; /* 32 bits timestamp of most recent data packet plus delay since reception of this packet. */
static int hf_prrt_plr = -1; /* 32 bits packet loss rate measured at the receiver. */ static int hf_prrt_plr = -1; /* 32 bits packet loss rate measured at the receiver. */
static int hf_prrt_bw_est = -1; /* 32 bits bandwidth estimated at the receiver. */ static int hf_prrt_datarate_est = -1; /* 32 bits datarate estimated at the receiver. */
/* The following two fields are the payload of PRRT feedback packet (packet type: 3). */ /* The following two fields are the payload of PRRT feedback packet (packet type: 3). */
static int hf_prrt_packet_no = -1; /* 16 bits packet no of the first lost packet. */ static int hf_prrt_packet_no = -1; /* 16 bits packet no of the first lost packet. */
static int hf_prrt_retr_round = -1; /* 16 bits retransmission round of the first lost. (first transmission is 0.) */ static int hf_prrt_retr_round = -1; /* 16 bits retransmission round of the first lost. (first transmission is 0.) */
...@@ -323,7 +323,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -323,7 +323,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
if (len == 24) { if (len == 24) {
...@@ -364,7 +364,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -364,7 +364,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
if (len == 28) { if (len == 28) {
...@@ -484,10 +484,10 @@ proto_register_prrt(void) ...@@ -484,10 +484,10 @@ proto_register_prrt(void)
FT_UINT32, BASE_DEC, NULL, 0x0, FT_UINT32, BASE_DEC, NULL, 0x0,
"The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL } "The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL }
}, },
{ &hf_prrt_bw_est, { &hf_prrt_datarate_est,
{ "Estimated Bandwidth", "prrt.feedback.bw", { "Estimated Datarate", "prrt.feedback.datarate",
FT_UINT32, BASE_DEC, NULL, 0x0, FT_UINT32, BASE_DEC, NULL, 0x0,
"The bandwidth estimated at the receiver, stored in general PRRT feedback header", HFILL } "The datarate estimated at the receiver, stored in general PRRT feedback header", HFILL }
}, },
{ &hf_prrt_packet_no, { &hf_prrt_packet_no,
{ "Packet No", "prrt.feedback.packetno", { "Packet No", "prrt.feedback.packetno",
......
...@@ -92,7 +92,7 @@ static int hf_prrt_payload = -1; /* payload with arbitrary length, depend ...@@ -92,7 +92,7 @@ static int hf_prrt_payload = -1; /* payload with arbitrary length, depend
static int hf_prrt_receiver_addr = -1; /* 32 bits IP address of the receiver */ static int hf_prrt_receiver_addr = -1; /* 32 bits IP address of the receiver */
static int hf_prrt_rtt_probe = -1; /* 32 bits timestamp of most recent data packet plus delay since reception of this packet. */ static int hf_prrt_rtt_probe = -1; /* 32 bits timestamp of most recent data packet plus delay since reception of this packet. */
static int hf_prrt_plr = -1; /* 32 bits packet loss rate measured at the receiver. */ static int hf_prrt_plr = -1; /* 32 bits packet loss rate measured at the receiver. */
static int hf_prrt_bw_est = -1; /* 32 bits bandwidth estimated at the receiver. */ static int hf_prrt_datarate_est = -1; /* 32 bits datarate estimated at the receiver. */
/* The following two fields are the payload of PRRT feedback packet (packet type: 3). */ /* The following two fields are the payload of PRRT feedback packet (packet type: 3). */
static int hf_prrt_packet_no = -1; /* 16 bits packet no of the first lost packet. */ static int hf_prrt_packet_no = -1; /* 16 bits packet no of the first lost packet. */
static int hf_prrt_retr_round = -1; /* 16 bits retransmission round of the first lost. (first transmission is 0.) */ static int hf_prrt_retr_round = -1; /* 16 bits retransmission round of the first lost. (first transmission is 0.) */
...@@ -361,7 +361,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -361,7 +361,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
if (len == 24) { if (len == 24) {
...@@ -402,7 +402,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -402,7 +402,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
if (len == 28) { if (len == 28) {
...@@ -524,10 +524,10 @@ proto_register_prrt(void) ...@@ -524,10 +524,10 @@ proto_register_prrt(void)
FT_UINT32, BASE_DEC, NULL, 0x0, FT_UINT32, BASE_DEC, NULL, 0x0,
"The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL } "The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL }
}, },
{ &hf_prrt_bw_est, { &hf_prrt_datarate_est,
{ "Estimated Bandwidth", "prrt.feedback.bw", { "Estimated Datarate", "prrt.feedback.datarate",
FT_UINT32, BASE_DEC, NULL, 0x0, FT_UINT32, BASE_DEC, NULL, 0x0,
"The bandwidth estimated at the receiver, stored in general PRRT feedback header", HFILL } "The datarate estimated at the receiver, stored in general PRRT feedback header", HFILL }
}, },
{ &hf_prrt_packet_no, { &hf_prrt_packet_no,
{ "Packet No", "prrt.feedback.packetno", { "Packet No", "prrt.feedback.packetno",
......
...@@ -74,7 +74,7 @@ static int hf_prrt_gap = -1; ...@@ -74,7 +74,7 @@ static int hf_prrt_gap = -1;
static int hf_prrt_ngap = -1; static int hf_prrt_ngap = -1;
static int hf_prrt_burst = -1; static int hf_prrt_burst = -1;
static int hf_prrt_nburst = -1; static int hf_prrt_nburst = -1;
static int hf_prrt_bw_est = -1; static int hf_prrt_datarate_est = -1;
static int hf_prrt_buf_fb = -1; static int hf_prrt_buf_fb = -1;
/* Payload */ /* Payload */
...@@ -206,7 +206,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -206,7 +206,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2; offset += 2;
proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE);
offset += 2; offset += 2;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE);
} else if(packet_type == 4) { } else if(packet_type == 4) {
...@@ -236,7 +236,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ...@@ -236,7 +236,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 2; offset += 2;
proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE);
offset += 2; offset += 2;
proto_tree_add_item(prrt_tree, hf_prrt_bw_est, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_datarate_est, tvb, offset, 4, FALSE);
offset += 4; offset += 4;
proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE); proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE);
} else { } else {
...@@ -292,8 +292,8 @@ void proto_register_prrt(void) ...@@ -292,8 +292,8 @@ void proto_register_prrt(void)
{ "Aggregated Burst Length", "prrt.feedback.burst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }}, { "Aggregated Burst Length", "prrt.feedback.burst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
{ &hf_prrt_nburst, { &hf_prrt_nburst,
{ "Burst Count", "prrt.feedback.nburst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }}, { "Burst Count", "prrt.feedback.nburst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
{ &hf_prrt_bw_est, { &hf_prrt_datarate_est,
{ "Estimated Bandwidth", "prrt.feedback.bw", FT_UINT32, BASE_DEC, NULL, 0x0, "The bandwidth estimated at the receiver, stored in general PRRT feedback header", HFILL }}, { "Estimated Datarate", "prrt.feedback.datarate", FT_UINT32, BASE_DEC, NULL, 0x0, "The datarate estimated at the receiver, stored in general PRRT feedback header", HFILL }},
{ &hf_prrt_buf_fb, { &hf_prrt_buf_fb,
{ "Buffer Feedback", "prrt.feedback.buf_fb", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }}, { "Buffer Feedback", "prrt.feedback.buf_fb", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
{ &hf_prrt_payload, { &hf_prrt_payload,
......
FROM gcc:5 FROM gcc:8
MAINTAINER Andreas Schmidt <schmidt@nt.uni-saarland.de> MAINTAINER Andreas Schmidt <schmidt@nt.uni-saarland.de>
...@@ -7,6 +7,8 @@ ENV DEBIAN_FRONTEND noninteractive ...@@ -7,6 +7,8 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install --yes --force-yes \ RUN apt-get update && apt-get install --yes --force-yes \
bc \ bc \
cmake \ cmake \
iperf3 \
psmisc \
traceroute \ traceroute \
tshark tshark
...@@ -14,10 +16,11 @@ COPY CMakeLists.txt /prrt/ ...@@ -14,10 +16,11 @@ COPY CMakeLists.txt /prrt/
COPY prrt /prrt/prrt COPY prrt /prrt/prrt
COPY tests /prrt/tests COPY tests /prrt/tests
COPY docker/entrypoint.sh / COPY docker/entrypoint.sh /
COPY docker/sysctl.conf /etc/sysctl.d/01-disable-ipv6.conf
WORKDIR /prrt WORKDIR /prrt
RUN cmake . \ RUN cmake . -DCMAKE_BUILD_TYPE=DEBUG \
&& make && make
ENV PATH /prrt:$PATH ENV PATH /prrt:$PATH
......
FROM gcc:5 FROM gcc:8
MAINTAINER Andreas Schmidt <schmidt@nt.uni-saarland.de> MAINTAINER Andreas Schmidt <schmidt@nt.uni-saarland.de>
...@@ -7,6 +7,8 @@ ENV DEBIAN_FRONTEND noninteractive ...@@ -7,6 +7,8 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install --yes --force-yes \ RUN apt-get update && apt-get install --yes --force-yes \
bc \ bc \
cmake \ cmake \
iperf3 \
psmisc \
traceroute \ traceroute \
tshark tshark
...@@ -17,7 +19,7 @@ COPY docker/entrypoint.sh / ...@@ -17,7 +19,7 @@ COPY docker/entrypoint.sh /
WORKDIR /prrt WORKDIR /prrt
RUN cmake -DTCP=1 . \ RUN cmake -DTCP=1 -DCMAKE_BUILD_TYPE=DEBUG . \
&& make && make
ENV PATH /prrt:$PATH ENV PATH /prrt:$PATH
......
#!/bin/bash #!/bin/sh
dev=eth0 dev=eth0
...@@ -34,11 +34,11 @@ case $key in ...@@ -34,11 +34,11 @@ case $key in
shift shift
shift shift
;; ;;
-T|--threadpinning) -T|--threadpinning|-U)
PRRT+=("$1") PRRT+=("$1")
shift shift
;; ;;
-p|--port|-r|--rounds|-s|--size|-R|--rcvbuf|-S|--sndbuf|-o|--output|-a|--appdelay) -p|--port|-r|--rounds|-s|--size|-R|--rcvbuf|-S|--sndbuf|-o|--output|-a|--appdelay|-j|--appjitter)
PRRT+=("$1 $2") PRRT+=("$1 $2")
shift shift
shift shift
...@@ -56,16 +56,14 @@ NETEM_PARAMS="${NETEM[@]}" ...@@ -56,16 +56,14 @@ NETEM_PARAMS="${NETEM[@]}"
echo "Starting Wireshark." echo "Starting Wireshark."
tshark -i eth0 -w $OUTPUT.pcap & tshark -i eth0 -w $OUTPUT.pcap &
TSHARK_PID=$! TSHARK_PID=$!
sleep 5 sleep 2
start=$(date +%s.%N); start=$(date +%s.%N);
echo "Checking reachability of $TARGET." echo "Checking reachability of $TARGET."
until ping -c1 $TARGET &>/dev/null; sleep 1; do :; done until ping -c1 $TARGET &>/dev/null; do sleep 1; done
dur=$(echo "$(date +%s.%N) - $start" | bc); dur=$(echo "$(date +%s.%N) - $start" | bc);
printf "Reachable after %.6f seconds\n" $dur
traceroute $TARGET > $OUTPUT.tr printf "Reachable after %.6f seconds\n" $dur
echo "Traceroute done."
if [[ "$command" == "sender" || "$command" == "time-sender" ]]; then if [[ "$command" == "sender" || "$command" == "time-sender" ]]; then
echo "Delaying sender start." echo "Delaying sender start."
...@@ -73,11 +71,12 @@ else ...@@ -73,11 +71,12 @@ else
echo "Delaying receiver start." echo "Delaying receiver start."
fi fi
start=$(date +%s.%N);
echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters: \"$NETEM_PARAMS\"" echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters: \"$NETEM_PARAMS\""
trap 'echo "Caught SIGINT."; echo "$(ps -a)"; killall -SIGINT $command' INT
tc qdisc add dev $dev root netem $NETEM_PARAMS LOG=$(/prrt/$command $PRRT_PARAMS 2>&1)
/prrt/$command $PRRT_PARAMS echo "Exit status: $?"
echo "Done." printf "$LOG\n"
tc qdisc del dev $dev root dur=$(echo "$(date +%s.%N) - $start" | bc);
printf "Done after %.6f seconds\n" $dur
kill $TSHARK_PID kill $TSHARK_PID
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
...@@ -3,7 +3,7 @@ import prrt ...@@ -3,7 +3,7 @@ import prrt
port = int(sys.argv[1]) port = int(sys.argv[1])
s = prrt.PrrtSocket(("127.0.0.1", port)) s = prrt.PrrtSocket(("0.0.0.0", port))
while True: while True:
d, addr = s.recv() d, addr = s.recv()
......
...@@ -5,7 +5,7 @@ host = sys.argv[1] ...@@ -5,7 +5,7 @@ host = sys.argv[1]
port = int(sys.argv[2]) port = int(sys.argv[2])
localport = int(sys.argv[3]) localport = int(sys.argv[3])
s = prrt.PrrtSocket(("127.0.1.1", localport), maximum_payload_size=150) s = prrt.PrrtSocket(("0.0.0.0", localport), maximum_payload_size=150)
s.connect((host, port)) s.connect((host, port))
for i in range(10): for i in range(10):
......
...@@ -25,11 +25,14 @@ add_executable(receiver receiver.c) ...@@ -25,11 +25,14 @@ add_executable(receiver receiver.c)
add_executable(time-sender time-sender.c) add_executable(time-sender time-sender.c)
add_executable(time-receiver time-receiver.c) add_executable(time-receiver time-receiver.c)
target_link_libraries(sender LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(sender LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(receiver LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(receiver LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(time-sender LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(time-sender LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(time-receiver LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(time-receiver LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
add_executable(refcount refcount.c) add_executable(refcount refcount.c)
target_link_libraries(refcount LINK_PUBLIC PRRT UTIL ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(refcount LINK_PUBLIC prrt_shared prrtUtil_shared ${CMAKE_THREAD_LIBS_INIT})
install(DIRECTORY ./ DESTINATION include/prrt
FILES_MATCHING PATTERN "*.h")
\ No newline at end of file
...@@ -120,13 +120,14 @@ cdef extern from "proto/socket.h": ...@@ -120,13 +120,14 @@ cdef extern from "proto/socket.h":
ctypedef prrtSocket PrrtSocket ctypedef prrtSocket PrrtSocket
cdef PrrtSocket* PrrtSocket_create(const uint32_t maximum_payload_size, const uint32_t target_delay) cdef PrrtSocket* PrrtSocket_create(const uint32_t maximum_payload_size, const uint32_t target_delay)
bint PrrtSocket_bind(PrrtSocket *sock_ptr, const_char *ipAddress, const uint16_t port) int PrrtSocket_bind(PrrtSocket *sock_ptr, const_char *ipAddress, const uint16_t port)
bint PrrtSocket_enable_hardware_timestamping(PrrtSocket *s, const_char *interface_name)
int PrrtSocket_close(const PrrtSocket *sock_ptr) int PrrtSocket_close(const PrrtSocket *sock_ptr)
int PrrtSocket_connect(PrrtSocket *sock_ptr, const_char *host, const uint16_t port) int PrrtSocket_connect(PrrtSocket *sock_ptr, const_char *host, const uint16_t port)
int PrrtSocket_send_sync(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len) int PrrtSocket_send_sync(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len)
int PrrtSocket_send_async(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len) int PrrtSocket_send_async(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len)
int32_t PrrtSocket_recv(PrrtSocket *sock_ptr, void *buf_ptr, sockaddr* addr) nogil int32_t PrrtSocket_recv(PrrtSocket *sock_ptr, void *buf_ptr, sockaddr* addr) nogil
int32_t PrrtSocket_receive_asap(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil int32_t PrrtSocket_receive_asap(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil
int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil
...@@ -146,11 +147,11 @@ cdef extern from "proto/socket.h": ...@@ -146,11 +147,11 @@ cdef extern from "proto/socket.h":
uint32_t PrrtSocket_get_rtprop_fwd(PrrtSocket *socket) uint32_t PrrtSocket_get_rtprop_fwd(PrrtSocket *socket)
float PrrtSocket_get_plr_fwd(PrrtSocket *socket) float PrrtSocket_get_plr_fwd(PrrtSocket *socket)
uint32_t PrrtSocket_get_delivery_rate_fwd(PrrtSocket *socket) uint32_t PrrtSocket_get_delivery_rate_fwd(PrrtSocket *socket)
uint32_t PrrtSocket_get_btlbw_fwd(PrrtSocket *s); uint32_t PrrtSocket_get_btldatarate_fwd(PrrtSocket *s);
uint32_t PrrtSocket_get_btlbw_back(PrrtSocket *s); uint32_t PrrtSocket_get_btldatarate_back(PrrtSocket *s);
uint32_t PrrtSocket_get_bbr_state(PrrtSocket *s) uint32_t PrrtSocket_get_bbr_state(PrrtSocket *s)
uint64_t PrrtSocket_get_full_bw(PrrtSocket *s) uint64_t PrrtSocket_get_full_datarate(PrrtSocket *s)
bint PrrtSocket_get_filled_pipe(PrrtSocket *s) bint PrrtSocket_get_filled_pipe(PrrtSocket *s)
uint32_t PrrtSocket_get_cycle_index(PrrtSocket *s) uint32_t PrrtSocket_get_cycle_index(PrrtSocket *s)
float PrrtSocket_get_pacing_gain(PrrtSocket *s) float PrrtSocket_get_pacing_gain(PrrtSocket *s)
...@@ -187,4 +188,3 @@ cdef extern from "util/pipe.h": ...@@ -187,4 +188,3 @@ cdef extern from "util/pipe.h":
cdef extern from "util/mpsc_queue.h": cdef extern from "util/mpsc_queue.h":
ctypedef struct MPSCQueue: ctypedef struct MPSCQueue:
pass pass
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#define GF_BITS 8 #define GF_BITS 8
#define K_START 4 #define K_START 1
#define N_START 7 #define N_START 1
#define N_P_START 1 #define N_P_START 1
#define RRT_ALPHA 0.125 #define RRT_ALPHA 0.125
......
...@@ -9,6 +9,8 @@ set (PRRT_SOURCES ../defines.h ...@@ -9,6 +9,8 @@ set (PRRT_SOURCES ../defines.h
stores/dataPacketStore.c stores/dataPacketStore.h stores/dataPacketStore.c stores/dataPacketStore.h
stores/deliveredPacketTable.c stores/deliveredPacketTable.h stores/deliveredPacketTable.c stores/deliveredPacketTable.h
stores/inFlightPacketStore.c stores/inFlightPacketStore.h stores/inFlightPacketStore.c stores/inFlightPacketStore.h
stores/pace.c stores/pace.h
stores/paceFilter.c stores/paceFilter.h
stores/packetTimeoutTable.c stores/packetTimeoutTable.h stores/packetTimeoutTable.c stores/packetTimeoutTable.h
stores/packetDeliveryStore.c stores/packetDeliveryStore.h stores/packetDeliveryStore.c stores/packetDeliveryStore.h
stores/receptionTable.c stores/receptionTable.h stores/receptionTable.c stores/receptionTable.h
...@@ -26,6 +28,19 @@ if (XLAP) ...@@ -26,6 +28,19 @@ if (XLAP)
set(PRRT_SOURCES ${PRRT_SOURCES} ../xlap/xlap.c ../xlap/xlap.h) set(PRRT_SOURCES ${PRRT_SOURCES} ../xlap/xlap.c ../xlap/xlap.h)
endif() endif()
add_library(PRRT ${PRRT_SOURCES}) add_library(prrt_obj OBJECT ${PRRT_SOURCES})
set_property(TARGET prrt_obj PROPERTY POSITION_INDEPENDENT_CODE 1)
target_link_libraries(PRRT rt)
add_library(prrt_static STATIC $<TARGET_OBJECTS:prrt_obj>)