Skip to content

Commit

Permalink
fix build on alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
lwimmer committed Apr 20, 2017
1 parent e2c13c6 commit c507a73
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config.guess
config.log
config.status
config.sub
configure.lineno
install-sh
depcomp
missing
Expand Down
100 changes: 50 additions & 50 deletions src/rmbt_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "rmbt_common.h"

#include <stdatomic.h>
#include <sys/socket.h>

#include "rmbt_json.h"

Expand All @@ -29,72 +29,72 @@
* The "introduced in" comments refer to git commit ids of the linux kernel sources.
* */
struct rmbt_tcp_info {
u_int8_t tcpi_state;
u_int8_t tcpi_ca_state;
u_int8_t tcpi_retransmits;
u_int8_t tcpi_probes;
u_int8_t tcpi_backoff;
u_int8_t tcpi_options;
u_int8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
uint8_t tcpi_state;
uint8_t tcpi_ca_state;
uint8_t tcpi_retransmits;
uint8_t tcpi_probes;
uint8_t tcpi_backoff;
uint8_t tcpi_options;
uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
/* next one introduced in eb8329e0a04db0061f714f033b4454326ba147f4 (4.9) */
u_int8_t tcpi_delivery_rate_app_limited:1;
uint8_t tcpi_delivery_rate_app_limited:1;

u_int32_t tcpi_rto;
u_int32_t tcpi_ato;
u_int32_t tcpi_snd_mss;
u_int32_t tcpi_rcv_mss;
uint32_t tcpi_rto;
uint32_t tcpi_ato;
uint32_t tcpi_snd_mss;
uint32_t tcpi_rcv_mss;

u_int32_t tcpi_unacked;
u_int32_t tcpi_sacked;
u_int32_t tcpi_lost;
u_int32_t tcpi_retrans;
u_int32_t tcpi_fackets;
uint32_t tcpi_unacked;
uint32_t tcpi_sacked;
uint32_t tcpi_lost;
uint32_t tcpi_retrans;
uint32_t tcpi_fackets;

/* Times. */
u_int32_t tcpi_last_data_sent;
u_int32_t tcpi_last_ack_sent;
u_int32_t tcpi_last_data_recv;
u_int32_t tcpi_last_ack_recv;
uint32_t tcpi_last_data_sent;
uint32_t tcpi_last_ack_sent;
uint32_t tcpi_last_data_recv;
uint32_t tcpi_last_ack_recv;

/* Metrics. */
u_int32_t tcpi_pmtu;
u_int32_t tcpi_rcv_ssthresh;
u_int32_t tcpi_rtt;
u_int32_t tcpi_rttvar;
u_int32_t tcpi_snd_ssthresh;
u_int32_t tcpi_snd_cwnd;
u_int32_t tcpi_advmss;
u_int32_t tcpi_reordering;

u_int32_t tcpi_rcv_rtt;
u_int32_t tcpi_rcv_space;

u_int32_t tcpi_total_retrans;

u_int64_t tcpi_pacing_rate;
u_int64_t tcpi_max_pacing_rate;
uint32_t tcpi_pmtu;
uint32_t tcpi_rcv_ssthresh;
uint32_t tcpi_rtt;
uint32_t tcpi_rttvar;
uint32_t tcpi_snd_ssthresh;
uint32_t tcpi_snd_cwnd;
uint32_t tcpi_advmss;
uint32_t tcpi_reordering;

uint32_t tcpi_rcv_rtt;
uint32_t tcpi_rcv_space;

uint32_t tcpi_total_retrans;

uint64_t tcpi_pacing_rate;
uint64_t tcpi_max_pacing_rate;
/* introduced in 0df48c26d8418c5c9fba63fac15b660d70ca2f1c (4.1) */
u_int64_t tcpi_bytes_acked;
uint64_t tcpi_bytes_acked;
/* introduced in bdd1f9edacb5f5835d1e6276571bbbe5b88ded48 (4.1) */
u_int64_t tcpi_bytes_received;
uint64_t tcpi_bytes_received;
/* introduced in 2efd055c53c06b7e89c167c98069bab9afce7e59 (4.2) */
u_int32_t tcpi_segs_out;
u_int32_t tcpi_segs_in;
uint32_t tcpi_segs_out;
uint32_t tcpi_segs_in;

/* introduced in cd9b266095f422267bddbec88f9098b48ea548fc (4.6) */
u_int32_t tcpi_notsent_bytes;
u_int32_t tcpi_min_rtt;
uint32_t tcpi_notsent_bytes;
uint32_t tcpi_min_rtt;
/* introduced in a44d6eacdaf56f74fad699af7f4925a5f5ac0e7f (4.6) */
u_int32_t tcpi_data_segs_in;
u_int32_t tcpi_data_segs_out;
uint32_t tcpi_data_segs_in;
uint32_t tcpi_data_segs_out;

/* introduced in eb8329e0a04db0061f714f033b4454326ba147f4 (4.9) */
u_int64_t tcpi_delivery_rate;
uint64_t tcpi_delivery_rate;

/* introduced in efd90174167530c67a54273fd5d8369c87f9bd32 (4.10) */
u_int64_t tcpi_busy_time;
u_int64_t tcpi_rwnd_limited;
u_int64_t tcpi_sndbuf_limited;
uint64_t tcpi_busy_time;
uint64_t tcpi_rwnd_limited;
uint64_t tcpi_sndbuf_limited;
};

/* macro to check if specified member was actually returned by getsockopt
Expand Down

0 comments on commit c507a73

Please sign in to comment.