Commit f76f6549 authored by Andreas Schmidt's avatar Andreas Schmidt

Merge branch 'develop' into feature/congestionControl

parents bc42bc24 52ff185a
......@@ -231,7 +231,7 @@ int PrrtSocket_connect(PrrtSocket *s, const char *host, const uint16_t port) {
int PrrtSocket_send(PrrtSocket *s, const uint8_t *data, const size_t data_len) {
if (data_len > s->mtu) {
PERROR("Data to be sent (%d bytes) is too long, as MTU is %d.\n", data_len, s->mtu);
PERROR("Data to be sent (%ld bytes) is too long, as MTU is %d.\n", data_len, s->mtu);
return -1;
}
XlapTimestampPlaceholder tsph;
......@@ -289,7 +289,7 @@ int32_t PrrtSocket_recv(PrrtSocket *s, void *buf_ptr, struct sockaddr* addr) {
int32_t PrrtSocket_receive_ordered(PrrtSocket *s, void *buf_ptr, struct sockaddr* addr, prrtTimedelta_t time_window_us) {
prrtTimestamp_t now = PrrtClock_get_current_time_us();
PrrtPacket *packet = PrrtPacketDeliveryStore_get_packet(s->packetDeliveryStore, now - time_window_us,
PrrtPacket *packet = PrrtPacketDeliveryStore_get_packet(s->packetDeliveryStore, now,
now + time_window_us);
return deliver_packet(s, buf_ptr, packet, addr);
}
......@@ -298,7 +298,7 @@ int32_t PrrtSocket_receive_ordered_wait(PrrtSocket *s, void *buf_ptr, struct soc
PrrtPacket *packet;
do {
prrtTimestamp_t now = PrrtClock_get_current_time_us();
packet = PrrtPacketDeliveryStore_get_packet_wait(s->packetDeliveryStore, now - time_window_us,
packet = PrrtPacketDeliveryStore_get_packet_wait(s->packetDeliveryStore, now,
now + time_window_us);
if (PrrtSocket_closing(s)) {
return -1;
......
......@@ -19,20 +19,20 @@ static struct argp_option options[] = {
{ 0 }
};
static struct arguments
typedef struct arguments
{
uint16_t port;
uint16_t rounds;
char* outfile;
bool thread_pinning;
char* hardwarestamping_interface;
};
} arguments_t;
static char args_doc[] = "";
static error_t parse_opt (int key, char *arg, struct argp_state *state)
{
struct arguments *arguments = state->input;
arguments_t *arguments = state->input;
char* pEnd;
switch (key)
......
......@@ -18,7 +18,7 @@ static struct argp_option options[] = {
{ 0 }
};
static struct arguments
typedef struct arguments
{
char* target;
uint16_t port;
......@@ -27,13 +27,13 @@ static struct arguments
char* outfile;
bool thread_pinning;
char* hardwarestamping_interface;
};
} arguments_t;
static char args_doc[] = "";
static error_t parse_opt (int key, char *arg, struct argp_state *state)
{
struct arguments *arguments = state->input;
arguments_t* arguments = state->input;
char* pEnd;
switch (key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment