Commit 4e8f2461 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

+= cross-layer pacing

parent e97556e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,3 +10,4 @@ MANIFEST
prrt.cpython*.so
prrt.so
.ipynb_checkpoints/
.idea/
+26 −14
Original line number Diff line number Diff line
@@ -22,19 +22,23 @@ local pf_seqN = ProtoField.uint16("prrt.sequenceNumber", "Sequence Number")

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_btl_pace = ProtoField.uint32("prrt.data.btl_pace", "Bottleneck Pace")
local pf_data_timestamp = ProtoField.uint32("prrt.data.timestamp", "Timestamp")
local pf_data_groupRTprop = ProtoField.uint32("prrt.data.grouprtprop", "Group RTprop")
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_baseSeqN = ProtoField.uint16("prrt.redundancy.baseSequenceNumber", "Base Sequence Number", base.DEC)
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_n = ProtoField.uint8("prrt.redundancy.n", "n")
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_groupRTT = ProtoField.uint32("prrt.feedback.groupRTT", "Group RTT")
local pf_fb_ftt = ProtoField.uint32("prrt.feedback.FTT", "FTT")
local pf_fb_btl_pace = ProtoField.uint32("prrt.feedback.btl_pace", "Bottleneck Pace")
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_gaplength = ProtoField.uint16("prrt.feedback.gapLength", "Gap length")
@@ -53,19 +57,23 @@ prrt_proto.fields = {

    pf_data,
    pf_data_length,
    pf_data_btl_pace,
    pf_data_timestamp,
    pf_data_groupRTprop,
    pf_data_packettimeout,
    pf_data_btlDatarate,

    pf_red,
    pf_red_baseSeqN,
    pf_red_timestamp,
    pf_red_btl_pace,
    pf_red_n,
    pf_red_k,

    pf_fb,
    pf_fb_groupRTT,
    pf_fb_ftt,
    pf_fb_btl_pace,
    pf_fb_erasurecount,
    pf_fb_packetcount,
    pf_fb_gaplength,
@@ -111,10 +119,12 @@ local PRRT_MIN_SIZE = 8
-- create sub-dissectors for different types
local function dissect_data(buffer, pinfo, root)
    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(4,4))
    tree:add(pf_data_groupRTprop, buffer:range(8,4))
    tree:add(pf_data_packettimeout, buffer:range(12,4))
    tree:add(pf_data_btl_pace, buffer:range(0,4))
    tree:add(pf_data_length, buffer:range(4,4))
    tree:add(pf_data_timestamp, buffer:range(8,4))
    tree:add(pf_data_groupRTprop, 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()
    tree:set_text(label)
@@ -125,8 +135,9 @@ local function dissect_redundancy(buffer, pinfo, root)
    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(2,4))
    tree:add(pf_red_n, buffer:range(6,1))
    tree:add(pf_red_k, buffer:range(7,1))
    tree:add(pf_red_btl_pace, buffer:range(6,4))
    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()
    tree:set_text(label)
@@ -137,14 +148,15 @@ local function dissect_feedback(buffer, pinfo, root)
    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(4,4))
    tree:add(pf_fb_erasurecount, buffer:range(8,2))
    tree:add(pf_fb_packetcount, buffer:range(10,2))
    tree:add(pf_fb_gaplength, buffer:range(12,2))
    tree:add(pf_fb_gapcount, buffer:range(14,2))
    tree:add(pf_fb_burstlength, buffer:range(16,2))
    tree:add(pf_fb_burstcount, buffer:range(18,2))
    tree:add(pf_fb_acktype, buffer:range(20,1))
    tree:add(pf_fb_ackSeqN, buffer:range(21, 2))
    tree:add(pf_fb_btl_pace, buffer:range(8,4))
    tree:add(pf_fb_erasurecount, buffer:range(12,2))
    tree:add(pf_fb_packetcount, buffer:range(14,2))
    tree:add(pf_fb_gaplength, buffer:range(16,2))
    tree:add(pf_fb_gapcount, buffer:range(18,2))
    tree:add(pf_fb_burstlength, buffer:range(20,2))
    tree:add(pf_fb_burstcount, buffer:range(22,2))
    tree:add(pf_fb_acktype, buffer:range(24,1))
    tree:add(pf_fb_ackSeqN, buffer:range(25, 2))

    local label = "[F]"
    tree:set_text(label)
+6 −6
Original line number Diff line number Diff line
@@ -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_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_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). */
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.) */
@@ -323,7 +323,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      offset += 4;
      proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
      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;

      if (len == 24) {
@@ -364,7 +364,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      offset += 4;
      proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
      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;

      if (len == 28) {
@@ -484,10 +484,10 @@ proto_register_prrt(void)
      FT_UINT32, BASE_DEC, NULL, 0x0,
      "The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL }
    },
    { &hf_prrt_bw_est,
      { "Estimated Bandwidth", "prrt.feedback.bw",
    { &hf_prrt_datarate_est,
      { "Estimated Datarate", "prrt.feedback.datarate",
      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,
      { "Packet No", "prrt.feedback.packetno",
+6 −6
Original line number Diff line number Diff line
@@ -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_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_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). */
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.) */
@@ -361,7 +361,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      offset += 4;
      proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
      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;

      if (len == 24) {
@@ -402,7 +402,7 @@ dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      offset += 4;
      proto_tree_add_item(prrt_tree, hf_prrt_plr, tvb, offset, 4, FALSE);
      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;

      if (len == 28) {
@@ -524,10 +524,10 @@ proto_register_prrt(void)
      FT_UINT32, BASE_DEC, NULL, 0x0,
      "The packet loss rate measured at the receiver, stored in general PRRT feedback header", HFILL }
    },
    { &hf_prrt_bw_est,
      { "Estimated Bandwidth", "prrt.feedback.bw",
    { &hf_prrt_datarate_est,
      { "Estimated Datarate", "prrt.feedback.datarate",
      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,
      { "Packet No", "prrt.feedback.packetno",
+5 −5
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static int hf_prrt_gap = -1;
static int hf_prrt_ngap = -1;
static int hf_prrt_burst = -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;

/* Payload */
@@ -206,7 +206,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        offset += 2;
                        proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE);
                        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;
                        proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE);
                } else if(packet_type == 4) {
@@ -236,7 +236,7 @@ static void dissect_prrt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        offset += 2;
                        proto_tree_add_item(prrt_tree, hf_prrt_nburst, tvb, offset, 2, FALSE);
                        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;
                        proto_tree_add_item(prrt_tree, hf_prrt_buf_fb, tvb, offset, 4, FALSE);
                } else {
@@ -292,8 +292,8 @@ void proto_register_prrt(void)
                  { "Aggregated Burst Length", "prrt.feedback.burst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
                { &hf_prrt_nburst,
                  { "Burst Count", "prrt.feedback.nburst", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL }},
                { &hf_prrt_bw_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 }},
                { &hf_prrt_datarate_est,
                  { "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,
                  { "Buffer Feedback", "prrt.feedback.buf_fb", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }},
                { &hf_prrt_payload,
Loading