Loading prrt/proto/channelStateInformation.c +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, pr } void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtRateSample *rateSample) { void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, prrtDeliveryRate_t rate) { pthread_mutex_lock(&csi->lock); csi->deliveryRate = rateSample->delivery_rate; csi->deliveryRate = rate; pthread_mutex_unlock(&csi->lock); } void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited) { Loading prrt/proto/channelStateInformation.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ bool PrrtChannelStateInformation_get_app_limited(PrrtChannelStateInformation *cs prrtPacketLossRate_t PrrtChannelStateInformation_get_plr(PrrtChannelStateInformation* csi); void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, prrtSequenceNumber_t erasures, prrtSequenceNumber_t packets); void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtRateSample *rate); void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, prrtDeliveryRate_t rate); void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited); bool PrrtChannelStateInformation_destroy(PrrtChannelStateInformation* csi); Loading prrt/proto/processes/dataReceiver.c +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) { false) { PrrtPacket_destroy(packet); } else { PrrtChannelStateInformation_update_delivery_rate(sock_ptr->senderChannelStateInformation, payload->btlbw); prrtSequenceNumber_t baseSequenceNumber = packet->sequenceNumber - packet->index; PrrtPacket *reference = PrrtPacket_copy(packet); Loading prrt/proto/processes/dataTransmitter.c +1 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ static bool send_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) { // Update timestamp if(PrrtPacket_type(packet) == PACKET_TYPE_DATA) { ((PrrtPacketDataPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us(); ((PrrtPacketDataPayload*) (packet->payload))->btlbw = BBR_getBtlBw(sock_ptr->receiver->bbr); } else if(PrrtPacket_type(packet) == PACKET_TYPE_REDUNDANCY) { ((PrrtPacketRedundancyPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us(); } Loading prrt/proto/receiver.c +1 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ void PrrtReceiver_on_ack(PrrtReceiver *receiver, PrrtPacketFeedbackPayload * fee bool valid_sample = PrrtReceiver_updateAndGenerateRateSample(receiver, feedbackPayload->ackSequenceNumber, feedbackPayload->ackPacketType, receiveTime, rtt); if(valid_sample) { PrrtChannelStateInformation_update_delivery_rate(receiver->csi, receiver->rateSample); PrrtChannelStateInformation_update_delivery_rate(receiver->csi, receiver->rateSample->delivery_rate); } PrrtChannelStateInformation_update_app_limited(receiver->csi, receiver->rateSample->is_app_limited); Loading Loading
prrt/proto/channelStateInformation.c +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, pr } void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtRateSample *rateSample) { void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, prrtDeliveryRate_t rate) { pthread_mutex_lock(&csi->lock); csi->deliveryRate = rateSample->delivery_rate; csi->deliveryRate = rate; pthread_mutex_unlock(&csi->lock); } void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited) { Loading
prrt/proto/channelStateInformation.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ bool PrrtChannelStateInformation_get_app_limited(PrrtChannelStateInformation *cs prrtPacketLossRate_t PrrtChannelStateInformation_get_plr(PrrtChannelStateInformation* csi); void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, prrtSequenceNumber_t erasures, prrtSequenceNumber_t packets); void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, PrrtRateSample *rate); void PrrtChannelStateInformation_update_delivery_rate(PrrtChannelStateInformation *csi, prrtDeliveryRate_t rate); void PrrtChannelStateInformation_update_app_limited(PrrtChannelStateInformation *csi, bool appLimited); bool PrrtChannelStateInformation_destroy(PrrtChannelStateInformation* csi); Loading
prrt/proto/processes/dataReceiver.c +1 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) { false) { PrrtPacket_destroy(packet); } else { PrrtChannelStateInformation_update_delivery_rate(sock_ptr->senderChannelStateInformation, payload->btlbw); prrtSequenceNumber_t baseSequenceNumber = packet->sequenceNumber - packet->index; PrrtPacket *reference = PrrtPacket_copy(packet); Loading
prrt/proto/processes/dataTransmitter.c +1 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,7 @@ static bool send_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) { // Update timestamp if(PrrtPacket_type(packet) == PACKET_TYPE_DATA) { ((PrrtPacketDataPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us(); ((PrrtPacketDataPayload*) (packet->payload))->btlbw = BBR_getBtlBw(sock_ptr->receiver->bbr); } else if(PrrtPacket_type(packet) == PACKET_TYPE_REDUNDANCY) { ((PrrtPacketRedundancyPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us(); } Loading
prrt/proto/receiver.c +1 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ void PrrtReceiver_on_ack(PrrtReceiver *receiver, PrrtPacketFeedbackPayload * fee bool valid_sample = PrrtReceiver_updateAndGenerateRateSample(receiver, feedbackPayload->ackSequenceNumber, feedbackPayload->ackPacketType, receiveTime, rtt); if(valid_sample) { PrrtChannelStateInformation_update_delivery_rate(receiver->csi, receiver->rateSample); PrrtChannelStateInformation_update_delivery_rate(receiver->csi, receiver->rateSample->delivery_rate); } PrrtChannelStateInformation_update_app_limited(receiver->csi, receiver->rateSample->is_app_limited); Loading