Loading prrt/proto/processes/dataReceiver.c +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ void *receive_data_loop(void *ptr) { prrtPacketType_t packetType = PrrtPacket_type(packet); debug(DEBUG_DATARECEIVER, "received packet %d:%u", (int) packetType, seqno); packet->channelReceive = packet_recv_timestamp; enum XlapTimestampPacketKind kind = ts_any_packet; prrtTimestamp_t sentTimestamp; Loading prrt/proto/socket.c +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "socket.h" static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffer, PrrtPacket *packet) { size_t timespec_size = sizeof(struct timespec); prrtPacketLength_t len = 0; if(packet != NULL) { XlapTimeStampClock(s, ts_data_packet, packet->sequenceNumber, PrrtReceivePackage); Loading @@ -28,6 +29,9 @@ static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffe len = (prrtPacketLength_t) (packet->payloadLength - PRRT_PACKET_DATA_HEADER_SIZE); XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputStart); PrrtPacket_copy_payload_to_buffer(buffer, packet, PRRT_PACKET_DATA_HEADER_SIZE); memcpy(buffer + len, &packet->channelReceive, timespec_size); len += timespec_size; XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputEnd); XlapTimeStampClock(s, ts_data_packet, packet->sequenceNumber, PrrtDeliver); Loading prrt/proto/types/packet.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ typedef struct prrtPacket { prrtIndex_t index; prrtSequenceNumber_t sequenceNumber; void *payload; struct timespec channelReceive; prrtPacketLength_t payloadLength; // Packet State field that are not put into the packet on the wire Loading prrt/time-receiver.c +4 −4 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ int main(int argc, char **argv) { } #endif long long int *rtts = calloc((size_t) rounds, sizeof(uint64_t)); long long int *rtts = calloc((size_t) rounds, sizeof(long long int)); s = PrrtSocket_create(false, HALF_TIMESTAMP-1); check(s != NULL, "Could not create socket."); Loading @@ -126,13 +126,13 @@ int main(int argc, char **argv) { continue; } int round = 0; struct timespec now; struct timespec * old; clock_gettime(CLOCK_REALTIME, &now); struct timespec * channel; sscanf(buffer, "%10d", &round); old = (struct timespec *) (buffer + 20); channel = (struct timespec *) (buffer + n - sizeof(struct timespec)); rtts[round] = timedelta(&now, old); rtts[round] = timedelta(channel, old); i++; } Loading prrt/time-sender.c +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ int main(int argc, char **argv) { XlapTimestampTableInstall(s, ts_redundancy_packet, tstable_redundancy); uint32_t j = 0; char buf[150]; char buf[75]; memset(buf, 0x0, sizeof(buf)); assert(sizeof(buf) >= sizeof(struct timespec)); while (j < rounds) { Loading Loading
prrt/proto/processes/dataReceiver.c +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ void *receive_data_loop(void *ptr) { prrtPacketType_t packetType = PrrtPacket_type(packet); debug(DEBUG_DATARECEIVER, "received packet %d:%u", (int) packetType, seqno); packet->channelReceive = packet_recv_timestamp; enum XlapTimestampPacketKind kind = ts_any_packet; prrtTimestamp_t sentTimestamp; Loading
prrt/proto/socket.c +4 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "socket.h" static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffer, PrrtPacket *packet) { size_t timespec_size = sizeof(struct timespec); prrtPacketLength_t len = 0; if(packet != NULL) { XlapTimeStampClock(s, ts_data_packet, packet->sequenceNumber, PrrtReceivePackage); Loading @@ -28,6 +29,9 @@ static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffe len = (prrtPacketLength_t) (packet->payloadLength - PRRT_PACKET_DATA_HEADER_SIZE); XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputStart); PrrtPacket_copy_payload_to_buffer(buffer, packet, PRRT_PACKET_DATA_HEADER_SIZE); memcpy(buffer + len, &packet->channelReceive, timespec_size); len += timespec_size; XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputEnd); XlapTimeStampClock(s, ts_data_packet, packet->sequenceNumber, PrrtDeliver); Loading
prrt/proto/types/packet.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ typedef struct prrtPacket { prrtIndex_t index; prrtSequenceNumber_t sequenceNumber; void *payload; struct timespec channelReceive; prrtPacketLength_t payloadLength; // Packet State field that are not put into the packet on the wire Loading
prrt/time-receiver.c +4 −4 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ int main(int argc, char **argv) { } #endif long long int *rtts = calloc((size_t) rounds, sizeof(uint64_t)); long long int *rtts = calloc((size_t) rounds, sizeof(long long int)); s = PrrtSocket_create(false, HALF_TIMESTAMP-1); check(s != NULL, "Could not create socket."); Loading @@ -126,13 +126,13 @@ int main(int argc, char **argv) { continue; } int round = 0; struct timespec now; struct timespec * old; clock_gettime(CLOCK_REALTIME, &now); struct timespec * channel; sscanf(buffer, "%10d", &round); old = (struct timespec *) (buffer + 20); channel = (struct timespec *) (buffer + n - sizeof(struct timespec)); rtts[round] = timedelta(&now, old); rtts[round] = timedelta(channel, old); i++; } Loading
prrt/time-sender.c +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ int main(int argc, char **argv) { XlapTimestampTableInstall(s, ts_redundancy_packet, tstable_redundancy); uint32_t j = 0; char buf[150]; char buf[75]; memset(buf, 0x0, sizeof(buf)); assert(sizeof(buf) >= sizeof(struct timespec)); while (j < rounds) { Loading