timer/link.h

18 lines
387 B
C

#pragma once
#include <stdint.h>
#include <time.h>
#include <netinet/in.h>
#define RTT_AVERAGE_SAMPLES 4
struct link_state {
uint64_t send_sequence;
uint64_t recv_sequence;
struct timespec remote_average_rtt; // relative
struct timespec ping_pong_rtt[RTT_AVERAGE_SAMPLES]; // relative
struct timespec last_pong; // absolute
int rtt_ix;
struct sockaddr_in6 dest_addr;
};