--- deliantra/server/include/client.h 2007/07/26 00:27:08 1.64 +++ deliantra/server/include/client.h 2007/07/28 00:15:03 1.65 @@ -28,6 +28,43 @@ #include #include +#if HAVE_TCP_INFO +# include +#else + struct tcpi_info { + // dummy + char tcpi_state; + char tcpi_ca_state; + char tcpi_retransmits; + char tcpi_probes; + char tcpi_backoff; + char tcpi_options; + char tcpi_snd_wscale; + char tcpi_rcv_wscale; + char tcpi_rto; + char tcpi_ato; + char tcpi_snd_mss; + char tcpi_rcv_mss; + char tcpi_unacked; + char tcpi_sacked; + char tcpi_lost; + char tcpi_retrans; + char tcpi_fackets; + char tcpi_last_data_sent; + char tcpi_last_ack_sent; + char tcpi_last_data_recv; + char tcpi_last_ack_recv; + char tcpi_pmtu; + char tcpi_rcv_ssthresh; + char tcpi_rtt; + char tcpi_rttvar; + char tcpi_snd_ssthresh; + char tcpi_snd_cwnd; + char tcpi_advmss; + char tcpi_reordering; + }; +#endif + // (possibly) max. number of objects "per page" in the ground container #define FLOORBOX_PAGESIZE 50 @@ -200,14 +237,46 @@ tstamp ACC (RW, last_send); // last data send on socket. - int ACC (RW, rtt), ACC (RW, rttvar); /* round-trip time and -variance, if known */ - int ACC (RW, outq); // current socket outq length, or 0 if indeterminable - int ACC (RW, rate_avail); // current rate balance int ACC (RW, max_rate); // max. # of bytes to send per tick faceidx ACC (RW, scrub_idx); // which face to send next int ACC (RW, bg_scrub); // how many ticks till the next background face send + struct tcp_info tcpi; + tstamp next_rate_adjust; +#if FOR_PERL + // unfortunately, this emans that we *require* tcp_info now... + ACC (RW, tcpi.tcpi_state); + ACC (RW, tcpi.tcpi_ca_state); + ACC (RW, tcpi.tcpi_retransmits); + ACC (RW, tcpi.tcpi_probes); + ACC (RW, tcpi.tcpi_backoff); + ACC (RW, tcpi.tcpi_options); + ACC (RO, tcpi.tcpi_snd_wscale); + ACC (RO, tcpi.tcpi_rcv_wscale); + ACC (RW, tcpi.tcpi_rto); + ACC (RW, tcpi.tcpi_ato); + ACC (RW, tcpi.tcpi_snd_mss); + ACC (RW, tcpi.tcpi_rcv_mss); + ACC (RW, tcpi.tcpi_unacked); + ACC (RW, tcpi.tcpi_sacked); + ACC (RW, tcpi.tcpi_lost); + ACC (RW, tcpi.tcpi_retrans); + ACC (RW, tcpi.tcpi_fackets); + ACC (RW, tcpi.tcpi_last_data_sent); + ACC (RW, tcpi.tcpi_last_ack_sent); + ACC (RW, tcpi.tcpi_last_data_recv); + ACC (RW, tcpi.tcpi_last_ack_recv); + ACC (RW, tcpi.tcpi_pmtu); + ACC (RW, tcpi.tcpi_rcv_ssthresh); + ACC (RW, tcpi.tcpi_rtt); + ACC (RW, tcpi.tcpi_rttvar); + ACC (RW, tcpi.tcpi_snd_ssthresh); + ACC (RW, tcpi.tcpi_snd_cwnd); + ACC (RW, tcpi.tcpi_advmss); + ACC (RW, tcpi.tcpi_reordering); +#endif + struct ixsend { int16_t pri; // unused faceidx idx;