Loading README.md +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ * Clock synchronization between sending stack and receiving stack * Applications can specify packet-level expiration times * Different receive modes for ASAP and time-synchronized operation * Passive measurement of propagation delay, bottleneck data rate and packet loss rate * Packet-level timing analysis using [X-Lap](http://xlap.larn.systems) * [Hardware timestamping support](https://git.nt.uni-saarland.de/LARN/PRRT/wikis/hardware-timestamping) Loading examples/receiver.py +4 −3 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ import prrt port = int(sys.argv[1]) s = prrt.PrrtSocket(port=port, isSender=False) s = prrt.PrrtSocket(("127.0.0.1", port)) while True: d = s.recv() d, addr = s.recv() d = d.decode("utf8") if d != "Close": print d print(d, addr) else: break examples/sender.py +5 −4 Original line number Diff line number Diff line Loading @@ -3,10 +3,11 @@ import prrt host = sys.argv[1] port = int(sys.argv[2]) localport = int(sys.argv[3]) s = prrt.PrrtSocket(port=port, isSender=True) s.connect(host, port) s = prrt.PrrtSocket(("127.0.1.1", localport)) s.connect((host, port)) for i in range(10): s.send("Packet {}".format(i)) s.send("Close") s.send("Packet {}".format(i).encode("utf8")) s.send("Close".encode("utf8")) prrt/cprrt.pxd +13 −9 Original line number Diff line number Diff line include "posix/time.pxd" include "sockets.pxd" from libc.stdint cimport uint32_t, uint16_t, uint8_t, int32_t, uint64_t from libc.string cimport const_char cdef extern from "pthread.h" nogil: ctypedef struct pthread_t: pass Loading Loading @@ -123,14 +125,14 @@ cdef extern from "proto/socket.h": int PrrtSocket_connect(PrrtSocket *sock_ptr, const_char *host, const uint16_t port) int PrrtSocket_send(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len) int32_t PrrtSocket_recv(PrrtSocket *sock_ptr, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap(PrrtSocket *s, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap_timedwait(PrrtSocket *s, void *buf_ptr, timespec* deadline) 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_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil int32_t PrrtSocket_receive_asap_timedwait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, timespec* deadline) nogil int32_t PrrtSocket_receive_ordered(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_wait(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_timedwait(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us, timespec* deadline) nogil int32_t PrrtSocket_receive_ordered(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_timedwait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us, timespec* deadline) nogil bint PrrtSocket_set_sock_opt(PrrtSocket *sock_ptr, const_char *name, const uint32_t value) uint32_t PrrtSocket_get_sock_opt(PrrtSocket *sock_ptr, const_char *name) Loading @@ -139,7 +141,6 @@ cdef extern from "proto/socket.h": bint PrrtSocket_uses_thread_pinning(PrrtSocket *socket) bint PrrtSocket_uses_thread_pinning(PrrtSocket *socket) uint32_t PrrtSocket_get_rtprop_fwd(PrrtSocket *socket) float PrrtSocket_get_plr_fwd(PrrtSocket *socket) uint32_t PrrtSocket_get_delivery_rate_fwd(PrrtSocket *socket) Loading @@ -160,9 +161,11 @@ cdef extern from "proto/socket.h": bint PrrtSocket_get_bbr_round_start(PrrtSocket *s) uint32_t PrrtSocket_get_bbr_app_limited(PrrtSocket *socket) bint PrrtSocket_get_bbr_is_app_limited(PrrtSocket *socket) bint PrrtSocket_enable_thread_pinning(PrrtSocket *socket) char *PrrtSocket_inet_ntoa(in_addr*) uint16_t PrrtSocket_ntohs(uint16_t v) cdef extern from "proto/stores/packetDeliveryStore.h": ctypedef struct PrrtPacketDeliveryStore: pass Loading @@ -185,3 +188,4 @@ cdef extern from "util/pipe.h": cdef extern from "util/mpsc_queue.h": ctypedef struct MPSCQueue: pass prrt/proto/channelStateInformation.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ typedef struct prrtChannelStateInformation { PrrtChannelStateInformation* PrrtChannelStateInformation_create(void); prrtDeliveryRate_t PrrtChannelStateInformation_get_delivery_rate(PrrtChannelStateInformation *csi); bool PrrtChannelStateInformation_get_app_limited(PrrtChannelStateInformation *csi); prrtPacketLossRate_t PrrtChannelStateInformation_get_plr(PrrtChannelStateInformation* csi); void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, prrtSequenceNumber_t erasures, Loading Loading
README.md +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ * Clock synchronization between sending stack and receiving stack * Applications can specify packet-level expiration times * Different receive modes for ASAP and time-synchronized operation * Passive measurement of propagation delay, bottleneck data rate and packet loss rate * Packet-level timing analysis using [X-Lap](http://xlap.larn.systems) * [Hardware timestamping support](https://git.nt.uni-saarland.de/LARN/PRRT/wikis/hardware-timestamping) Loading
examples/receiver.py +4 −3 Original line number Diff line number Diff line Loading @@ -3,11 +3,12 @@ import prrt port = int(sys.argv[1]) s = prrt.PrrtSocket(port=port, isSender=False) s = prrt.PrrtSocket(("127.0.0.1", port)) while True: d = s.recv() d, addr = s.recv() d = d.decode("utf8") if d != "Close": print d print(d, addr) else: break
examples/sender.py +5 −4 Original line number Diff line number Diff line Loading @@ -3,10 +3,11 @@ import prrt host = sys.argv[1] port = int(sys.argv[2]) localport = int(sys.argv[3]) s = prrt.PrrtSocket(port=port, isSender=True) s.connect(host, port) s = prrt.PrrtSocket(("127.0.1.1", localport)) s.connect((host, port)) for i in range(10): s.send("Packet {}".format(i)) s.send("Close") s.send("Packet {}".format(i).encode("utf8")) s.send("Close".encode("utf8"))
prrt/cprrt.pxd +13 −9 Original line number Diff line number Diff line include "posix/time.pxd" include "sockets.pxd" from libc.stdint cimport uint32_t, uint16_t, uint8_t, int32_t, uint64_t from libc.string cimport const_char cdef extern from "pthread.h" nogil: ctypedef struct pthread_t: pass Loading Loading @@ -123,14 +125,14 @@ cdef extern from "proto/socket.h": int PrrtSocket_connect(PrrtSocket *sock_ptr, const_char *host, const uint16_t port) int PrrtSocket_send(PrrtSocket *sock_ptr, const uint8_t *data, const size_t data_len) int32_t PrrtSocket_recv(PrrtSocket *sock_ptr, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap(PrrtSocket *s, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr) nogil int32_t PrrtSocket_receive_asap_timedwait(PrrtSocket *s, void *buf_ptr, timespec* deadline) 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_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr) nogil int32_t PrrtSocket_receive_asap_timedwait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, timespec* deadline) nogil int32_t PrrtSocket_receive_ordered(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_wait(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_timedwait(PrrtSocket *s, void *buf_ptr, prrtTimedelta_t time_window_us, timespec* deadline) nogil int32_t PrrtSocket_receive_ordered(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_wait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us) nogil int32_t PrrtSocket_receive_ordered_timedwait(PrrtSocket *s, void *buf_ptr, sockaddr* addr, prrtTimedelta_t time_window_us, timespec* deadline) nogil bint PrrtSocket_set_sock_opt(PrrtSocket *sock_ptr, const_char *name, const uint32_t value) uint32_t PrrtSocket_get_sock_opt(PrrtSocket *sock_ptr, const_char *name) Loading @@ -139,7 +141,6 @@ cdef extern from "proto/socket.h": bint PrrtSocket_uses_thread_pinning(PrrtSocket *socket) bint PrrtSocket_uses_thread_pinning(PrrtSocket *socket) uint32_t PrrtSocket_get_rtprop_fwd(PrrtSocket *socket) float PrrtSocket_get_plr_fwd(PrrtSocket *socket) uint32_t PrrtSocket_get_delivery_rate_fwd(PrrtSocket *socket) Loading @@ -160,9 +161,11 @@ cdef extern from "proto/socket.h": bint PrrtSocket_get_bbr_round_start(PrrtSocket *s) uint32_t PrrtSocket_get_bbr_app_limited(PrrtSocket *socket) bint PrrtSocket_get_bbr_is_app_limited(PrrtSocket *socket) bint PrrtSocket_enable_thread_pinning(PrrtSocket *socket) char *PrrtSocket_inet_ntoa(in_addr*) uint16_t PrrtSocket_ntohs(uint16_t v) cdef extern from "proto/stores/packetDeliveryStore.h": ctypedef struct PrrtPacketDeliveryStore: pass Loading @@ -185,3 +188,4 @@ cdef extern from "util/pipe.h": cdef extern from "util/mpsc_queue.h": ctypedef struct MPSCQueue: pass
prrt/proto/channelStateInformation.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ typedef struct prrtChannelStateInformation { PrrtChannelStateInformation* PrrtChannelStateInformation_create(void); prrtDeliveryRate_t PrrtChannelStateInformation_get_delivery_rate(PrrtChannelStateInformation *csi); bool PrrtChannelStateInformation_get_app_limited(PrrtChannelStateInformation *csi); prrtPacketLossRate_t PrrtChannelStateInformation_get_plr(PrrtChannelStateInformation* csi); void PrrtChannelStateInformation_update_plr(PrrtChannelStateInformation *csi, prrtSequenceNumber_t erasures, Loading