...
 
Commits (2)
...@@ -21,22 +21,21 @@ local pf_idx = ProtoField.uint8("prrt.index", "Index") ...@@ -21,22 +21,21 @@ 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_btl_pace = ProtoField.uint32("prrt.data.btl_pace", "Bottleneck Pace")
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_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_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_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")
...@@ -56,22 +55,21 @@ prrt_proto.fields = { ...@@ -56,22 +55,21 @@ prrt_proto.fields = {
pf_seqN, pf_seqN,
pf_data, pf_data,
pf_data_length,
pf_data_btl_pace,
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_data_btlDatarate,
pf_red, pf_red,
pf_red_baseSeqN,
pf_red_timestamp, pf_red_timestamp,
pf_red_btl_pace, 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_btlPace,
pf_fb_erasurecount, pf_fb_erasurecount,
...@@ -119,10 +117,10 @@ local PRRT_MIN_SIZE = 8 ...@@ -119,10 +117,10 @@ 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_btl_pace, buffer:range(0,4)) tree:add(pf_data_timestamp, buffer:range(0,4))
tree:add(pf_data_length, buffer:range(4,4)) tree:add(pf_data_btl_pace, buffer:range(4,4))
tree:add(pf_data_timestamp, buffer:range(8,4)) tree:add(pf_data_length, buffer:range(8,4))
tree:add(pf_data_groupRTprop, 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_packettimeout, buffer:range(16,4))
tree:add(pf_data_btlDatarate, buffer:range(20,4)) tree:add(pf_data_btlDatarate, buffer:range(20,4))
...@@ -133,9 +131,9 @@ end ...@@ -133,9 +131,9 @@ 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_btl_pace, buffer:range(6,4)) tree:add(pf_red_baseSeqN, buffer:range(8,2))
tree:add(pf_red_n, buffer:range(10,1)) tree:add(pf_red_n, buffer:range(10,1))
tree:add(pf_red_k, buffer:range(11,1)) tree:add(pf_red_k, buffer:range(11,1))
...@@ -146,17 +144,16 @@ end ...@@ -146,17 +144,16 @@ 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_btlPace, buffer:range(8,4)) tree:add(pf_fb_erasurecount, buffer:range(8,2))
tree:add(pf_fb_erasurecount, buffer:range(12,2)) tree:add(pf_fb_packetcount, buffer:range(10,2))
tree:add(pf_fb_packetcount, buffer:range(14,2)) tree:add(pf_fb_gaplength, buffer:range(12,2))
tree:add(pf_fb_gaplength, buffer:range(16,2)) tree:add(pf_fb_gapcount, buffer:range(14,2))
tree:add(pf_fb_gapcount, buffer:range(18,2)) tree:add(pf_fb_burstlength, buffer:range(16,2))
tree:add(pf_fb_burstlength, buffer:range(20,2)) tree:add(pf_fb_burstcount, buffer:range(18,2))
tree:add(pf_fb_burstcount, buffer:range(22,2)) tree:add(pf_fb_acktype, buffer:range(20,1))
tree:add(pf_fb_acktype, buffer:range(24,1)) tree:add(pf_fb_ackSeqN, buffer:range(21, 2))
tree:add(pf_fb_ackSeqN, buffer:range(25, 2))
local label = "[F]" local label = "[F]"
tree:set_text(label) tree:set_text(label)
......
...@@ -88,9 +88,8 @@ static bool send_feedback(PrrtSocket *sock_ptr, ...@@ -88,9 +88,8 @@ static bool send_feedback(PrrtSocket *sock_ptr,
PrrtLossStatistics stats = sock_ptr->lossStatistics; PrrtLossStatistics stats = sock_ptr->lossStatistics;
int group_RTT = 0; // TODO: To be determined.
uint32_t local_bottleneck_pace = MAX(PrrtPace_get_effective(sock_ptr->appDeliverPace), PrrtPace_get_effective(sock_ptr->prrtReceivePace)); uint32_t local_bottleneck_pace = MAX(PrrtPace_get_effective(sock_ptr->appDeliverPace), PrrtPace_get_effective(sock_ptr->prrtReceivePace));
PrrtPacket *feedback_pkt_ptr = PrrtPacket_create_feedback_packet(0, sock_ptr->sequenceNumberFeedback++, group_RTT, PrrtPacket *feedback_pkt_ptr = PrrtPacket_create_feedback_packet(0, sock_ptr->sequenceNumberFeedback++,
stats.gapLength, stats.gapCount, stats.burstLength, stats.gapLength, stats.gapCount, stats.burstLength,
stats.burstCount, forwardTripTime, stats.burstCount, forwardTripTime,
stats.erasureCount, stats.packetCount, stats.erasureCount, stats.packetCount,
...@@ -123,7 +122,7 @@ static void handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) { ...@@ -123,7 +122,7 @@ static void handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
PrrtPacketDataPayload *payload = packet->payload; PrrtPacketDataPayload *payload = packet->payload;
prrtTimestamp_t sentTimestamp = payload->timestamp; prrtTimestamp_t sentTimestamp = payload->timestamp;
sock_ptr->lastSentTimestamp = sentTimestamp; sock_ptr->lastSentTimestamp = sentTimestamp;
PrrtClock_update(&sock_ptr->clock, sentTimestamp, payload->groupRTprop_us); //PrrtClock_update(&sock_ptr->clock, sentTimestamp, payload->RTprop_us);
debug(DEBUG_DATARECEIVER, "Timeout: %lu", payload->packetTimeout_us); debug(DEBUG_DATARECEIVER, "Timeout: %lu", payload->packetTimeout_us);
PrrtPacketTimeout *packetTimeout = PrrtPacketTimeout_create(packet); PrrtPacketTimeout *packetTimeout = PrrtPacketTimeout_create(packet);
......
...@@ -240,7 +240,7 @@ void PrrtDataTransmitter_transmit(PrrtSocket *sock_ptr, PrrtPacket *packet) { ...@@ -240,7 +240,7 @@ void PrrtDataTransmitter_transmit(PrrtSocket *sock_ptr, PrrtPacket *packet) {
packet->index = (uint8_t) (packet->sequenceNumber - sock_ptr->receiveBlock->baseSequenceNumber); packet->index = (uint8_t) (packet->sequenceNumber - sock_ptr->receiveBlock->baseSequenceNumber);
PrrtPacketDataPayload *payload = packet->payload; PrrtPacketDataPayload *payload = packet->payload;
payload->groupRTprop_us = PrrtSocket_get_rtprop_fwd(sock_ptr); payload->RTprop_us = PrrtSocket_get_rtprop_fwd(sock_ptr);
PrrtPacket *packetToSend = PrrtPacket_copy(packet); PrrtPacket *packetToSend = PrrtPacket_copy(packet);
debug(DEBUG_DATATRANSMITTER, "Send: %i", packet->sequenceNumber); debug(DEBUG_DATATRANSMITTER, "Send: %i", packet->sequenceNumber);
......
...@@ -81,7 +81,7 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt ...@@ -81,7 +81,7 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt
check_mem(s); check_mem(s);
s->nextSendTime = 0; s->nextSendTime = 0;
s->pacingEnabled = true; s->pacingEnabled = false;
s->maximum_payload_size = maximum_payload_size; s->maximum_payload_size = maximum_payload_size;
s->isHardwareTimestamping = false; s->isHardwareTimestamping = false;
s->interfaceName = NULL; s->interfaceName = NULL;
......
...@@ -40,7 +40,7 @@ int PrrtPacket_print(PrrtPacket *packet_ptr) { ...@@ -40,7 +40,7 @@ int PrrtPacket_print(PrrtPacket *packet_ptr) {
PrrtPacketDataPayload *payload = packet_ptr->payload; PrrtPacketDataPayload *payload = packet_ptr->payload;
printf("| %61u |\n", payload->timestamp); printf("| %61u |\n", payload->timestamp);
printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n"); printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
printf("| %61u |\n", payload->groupRTprop_us); printf("| %61u |\n", payload->RTprop_us);
printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n"); printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
printf("| %61u |\n", payload->packetTimeout_us); printf("| %61u |\n", payload->packetTimeout_us);
printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n"); printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
...@@ -55,8 +55,6 @@ int PrrtPacket_print(PrrtPacket *packet_ptr) { ...@@ -55,8 +55,6 @@ int PrrtPacket_print(PrrtPacket *packet_ptr) {
PrrtPacketFeedbackPayload *payload = packet_ptr->payload; PrrtPacketFeedbackPayload *payload = packet_ptr->payload;
printf("| %61u |\n", payload->groupRTT_us);
printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
printf("| %61u |\n", payload->forwardTripTimestamp_us); printf("| %61u |\n", payload->forwardTripTimestamp_us);
printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n"); printf("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n");
printf("| %29u | %29u |\n", payload->erasureCount, payload->packetCount); printf("| %29u | %29u |\n", payload->erasureCount, payload->packetCount);
...@@ -170,9 +168,9 @@ bool PrrtPacket_encode(void *buf_ptr, uint16_t buf_size, PrrtPacket *packet_ptr) ...@@ -170,9 +168,9 @@ bool PrrtPacket_encode(void *buf_ptr, uint16_t buf_size, PrrtPacket *packet_ptr)
void *encode_redundancy_header(void *buf_ptr, const void *payload) { void *encode_redundancy_header(void *buf_ptr, const void *payload) {
const PrrtPacketRedundancyPayload *redundancyPayload = payload; const PrrtPacketRedundancyPayload *redundancyPayload = payload;
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtSequenceNumber_t, baseSequenceNumber, htons);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimestamp_t, timestamp, htonl); PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimestamp_t, timestamp, htonl);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimedelta_t , btl_pace, htonl); PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtTimedelta_t , btl_pace, htonl);
PrrtPacketField_encode(redundancyPayload, buf_ptr, prrtSequenceNumber_t, baseSequenceNumber, htons);
PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, n, identity); PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, n, identity);
PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, k, identity); PrrtPacketField_encode(redundancyPayload, buf_ptr, uint8_t, k, identity);
...@@ -182,7 +180,6 @@ void *encode_redundancy_header(void *buf_ptr, const void *payload) { ...@@ -182,7 +180,6 @@ void *encode_redundancy_header(void *buf_ptr, const void *payload) {
void *encode_feedback_header(void *buf_ptr, const void *payload) { void *encode_feedback_header(void *buf_ptr, const void *payload) {
const PrrtPacketFeedbackPayload *feedbackPayload = payload; const PrrtPacketFeedbackPayload *feedbackPayload = payload;
PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtTimedelta_t, groupRTT_us, htonl);
PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtTimestamp_t, forwardTripTimestamp_us, htonl); PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtTimestamp_t, forwardTripTimestamp_us, htonl);
PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtTimedelta_t, btl_pace, htonl); PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtTimedelta_t, btl_pace, htonl);
PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtSequenceNumber_t, erasureCount, htons); PrrtPacketField_encode(feedbackPayload, buf_ptr, prrtSequenceNumber_t, erasureCount, htons);
...@@ -200,10 +197,10 @@ void *encode_feedback_header(void *buf_ptr, const void *payload) { ...@@ -200,10 +197,10 @@ void *encode_feedback_header(void *buf_ptr, const void *payload) {
void *encode_data_header(void *buf_ptr, const void *payload) { void *encode_data_header(void *buf_ptr, const void *payload) {
const PrrtPacketDataPayload *data_payload = payload; const PrrtPacketDataPayload *data_payload = payload;
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, timestamp, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, btl_pace, htonl); PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, btl_pace, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtPacketLength_t, dataLength, htonl); PrrtPacketField_encode(data_payload, buf_ptr, prrtPacketLength_t, dataLength, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, timestamp, htonl); PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, RTprop_us, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimedelta_t, groupRTprop_us, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, packetTimeout_us, htonl); PrrtPacketField_encode(data_payload, buf_ptr, prrtTimestamp_t, packetTimeout_us, htonl);
PrrtPacketField_encode(data_payload, buf_ptr, prrtDeliveryRate_t, btl_datarate, htonl); PrrtPacketField_encode(data_payload, buf_ptr, prrtDeliveryRate_t, btl_datarate, htonl);
...@@ -271,9 +268,9 @@ bool PrrtPacket_decode(void *srcBuffer, uint16_t srcBufferSize, PrrtPacket *targ ...@@ -271,9 +268,9 @@ bool PrrtPacket_decode(void *srcBuffer, uint16_t srcBufferSize, PrrtPacket *targ
void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer) { void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer) {
PrrtPacketRedundancyPayload *redundancyPayload = (PrrtPacketRedundancyPayload *) srcBuffer; PrrtPacketRedundancyPayload *redundancyPayload = (PrrtPacketRedundancyPayload *) srcBuffer;
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtSequenceNumber_t, baseSequenceNumber, ntohs);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimestamp_t, timestamp, ntohl); PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimestamp_t, timestamp, ntohl);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimedelta_t , btl_pace, ntohl); PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtTimedelta_t , btl_pace, ntohl);
PrrtPacketField_decode(redundancyPayload, dstBuffer, prrtSequenceNumber_t, baseSequenceNumber, ntohs);
PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, n, identity); PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, n, identity);
PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, k, identity); PrrtPacketField_decode(redundancyPayload, dstBuffer, uint8_t, k, identity);
...@@ -283,7 +280,6 @@ void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer) { ...@@ -283,7 +280,6 @@ void *decode_redundancy_header(void *dstBuffer, const void *srcBuffer) {
void *decode_feedback_header(void *dstBuffer, const void *srcBuffer) { void *decode_feedback_header(void *dstBuffer, const void *srcBuffer) {
PrrtPacketFeedbackPayload *feedback_payload = (PrrtPacketFeedbackPayload *) srcBuffer; PrrtPacketFeedbackPayload *feedback_payload = (PrrtPacketFeedbackPayload *) srcBuffer;
PrrtPacketField_decode(feedback_payload, dstBuffer, prrtTimedelta_t, groupRTT_us, ntohl);
PrrtPacketField_decode(feedback_payload, dstBuffer, prrtTimestamp_t, forwardTripTimestamp_us, ntohl); PrrtPacketField_decode(feedback_payload, dstBuffer, prrtTimestamp_t, forwardTripTimestamp_us, ntohl);
PrrtPacketField_decode(feedback_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl); PrrtPacketField_decode(feedback_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl);
PrrtPacketField_decode(feedback_payload, dstBuffer, prrtSequenceNumber_t, erasureCount, ntohs); PrrtPacketField_decode(feedback_payload, dstBuffer, prrtSequenceNumber_t, erasureCount, ntohs);
...@@ -301,10 +297,10 @@ void *decode_feedback_header(void *dstBuffer, const void *srcBuffer) { ...@@ -301,10 +297,10 @@ void *decode_feedback_header(void *dstBuffer, const void *srcBuffer) {
void *decode_data_header(void *dstBuffer, const void *srcBuffer) { void *decode_data_header(void *dstBuffer, const void *srcBuffer) {
PrrtPacketDataPayload *data_payload = (PrrtPacketDataPayload *) srcBuffer; PrrtPacketDataPayload *data_payload = (PrrtPacketDataPayload *) srcBuffer;
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimestamp_t, timestamp, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl); PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtPacketLength_t, dataLength, ntohl); PrrtPacketField_decode(data_payload, dstBuffer, prrtPacketLength_t, dataLength, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimestamp_t, timestamp, ntohl); PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, RTprop_us, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, groupRTprop_us, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, packetTimeout_us, ntohl); PrrtPacketField_decode(data_payload, dstBuffer, prrtTimedelta_t, packetTimeout_us, ntohl);
PrrtPacketField_decode(data_payload, dstBuffer, prrtDeliveryRate_t, btl_datarate, ntohl); PrrtPacketField_decode(data_payload, dstBuffer, prrtDeliveryRate_t, btl_datarate, ntohl);
...@@ -339,7 +335,6 @@ PrrtPacket *PrrtPacket_create_data_packet(uint8_t priority, const void *payloadP ...@@ -339,7 +335,6 @@ PrrtPacket *PrrtPacket_create_data_packet(uint8_t priority, const void *payloadP
dataPayload->dataLength = dataLength; dataPayload->dataLength = dataLength;
dataPayload->timestamp = PrrtClock_get_current_time_us(); dataPayload->timestamp = PrrtClock_get_current_time_us();
dataPayload->packetTimeout_us = dataPayload->timestamp + targetDelay; dataPayload->packetTimeout_us = dataPayload->timestamp + targetDelay;
dataPayload->groupRTprop_us = 0;
PrrtPacket_copy_buffer_to_payload(packet, payloadPointer, PRRT_PACKET_DATA_HEADER_SIZE) PrrtPacket_copy_buffer_to_payload(packet, payloadPointer, PRRT_PACKET_DATA_HEADER_SIZE)
return packet; return packet;
...@@ -397,7 +392,7 @@ PrrtPacket *PrrtPacket_create_redundancy_packet(uint8_t priority, void *payloadP ...@@ -397,7 +392,7 @@ PrrtPacket *PrrtPacket_create_redundancy_packet(uint8_t priority, void *payloadP
} }
PrrtPacket * PrrtPacket *
PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenceNumber, prrtTimedelta_t groupRTT, PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenceNumber,
prrtSequenceNumber_t gapLength, prrtSequenceNumber_t gapCount, prrtSequenceNumber_t gapLength, prrtSequenceNumber_t gapCount,
prrtSequenceNumber_t burstLength, prrtSequenceNumber_t burstCount, prrtSequenceNumber_t burstLength, prrtSequenceNumber_t burstCount,
prrtTimestamp_t forwardTripTime, prrtSequenceNumber_t erasureCount, prrtTimestamp_t forwardTripTime, prrtSequenceNumber_t erasureCount,
...@@ -410,7 +405,6 @@ PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenc ...@@ -410,7 +405,6 @@ PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenc
check_mem(payload); check_mem(payload);
packet->payload = payload; packet->payload = payload;
payload->btl_pace = btl_pace; payload->btl_pace = btl_pace;
payload->groupRTT_us = groupRTT;
payload->forwardTripTimestamp_us = forwardTripTime; payload->forwardTripTimestamp_us = forwardTripTime;
payload->erasureCount = erasureCount; payload->erasureCount = erasureCount;
payload->packetCount = packetCount; payload->packetCount = packetCount;
......
...@@ -71,7 +71,7 @@ typedef struct prrtPacket { ...@@ -71,7 +71,7 @@ typedef struct prrtPacket {
typedef struct prrtPacketDataPayload { typedef struct prrtPacketDataPayload {
prrtPacketLength_t dataLength; prrtPacketLength_t dataLength;
prrtTimestamp_t timestamp; prrtTimestamp_t timestamp;
prrtTimedelta_t groupRTprop_us; prrtTimedelta_t RTprop_us;
prrtTimestamp_t packetTimeout_us; prrtTimestamp_t packetTimeout_us;
prrtDeliveryRate_t btl_datarate; prrtDeliveryRate_t btl_datarate;
prrtTimedelta_t btl_pace; prrtTimedelta_t btl_pace;
...@@ -101,7 +101,6 @@ typedef struct prrtPacketRedundancyPayload { ...@@ -101,7 +101,6 @@ typedef struct prrtPacketRedundancyPayload {
sizeof(uint8_t) ) sizeof(uint8_t) )
typedef struct prrtPacketFeedbackPayload { typedef struct prrtPacketFeedbackPayload {
prrtTimedelta_t groupRTT_us;
prrtTimestamp_t forwardTripTimestamp_us; prrtTimestamp_t forwardTripTimestamp_us;
prrtTimedelta_t btl_pace; prrtTimedelta_t btl_pace;
prrtSequenceNumber_t erasureCount; prrtSequenceNumber_t erasureCount;
...@@ -149,7 +148,7 @@ PrrtPacket *PrrtPacket_reconstruct_data_packet(PrrtPacketDataPayload *payload, p ...@@ -149,7 +148,7 @@ PrrtPacket *PrrtPacket_reconstruct_data_packet(PrrtPacketDataPayload *payload, p
prrtSequenceNumber_t sequenceNumber); prrtSequenceNumber_t sequenceNumber);
PrrtPacket * PrrtPacket *
PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenceNumber, prrtTimedelta_t groupRTT, PrrtPacket_create_feedback_packet(uint8_t priority, prrtSequenceNumber_t sequenceNumber,
prrtSequenceNumber_t gapLength, prrtSequenceNumber_t gapCount, prrtSequenceNumber_t gapLength, prrtSequenceNumber_t gapCount,
prrtSequenceNumber_t burstLength, prrtSequenceNumber_t burstCount, prrtSequenceNumber_t burstLength, prrtSequenceNumber_t burstCount,
prrtTimestamp_t forwardTripTime, prrtSequenceNumber_t erasureCount, prrtTimestamp_t forwardTripTime, prrtSequenceNumber_t erasureCount,
......