1 Star 0 Fork 43

yuexiaodong/sarudp

forked from yuanhack/sarudp
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
unprtt.h 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef __unp_rtt_h
#define __unp_rtt_h
#include <stdint.h>
#include <sys/types.h>
struct rtt_info {
float rtt_rtt; /* most recent measured RTT, seconds */
float rtt_srtt; /* smoothed RTT estimator, seconds */
float rtt_rttvar; /* smoothed mean deviation, seconds */
float rtt_rto; /* current RTO to use, seconds */
int rtt_nrexmt; /* #times retransmitted: 0, 1, 2, ... */
uint32_t rtt_base; /* #sec since 1/1/1970 at start */
uint8_t rtt_retry;
};
#define RTT_RXTMIN 2 /* min retransmit timeout value, seconds */
#define RTT_RXTMAX 60 /* max retransmit timeout value, seconds */
#define RTT_MAXNREXMT 4 /* max #times to retransmit */
#define RTT_MAXRTO 12
/* function prototypes */
void rtt_debug(struct rtt_info *);
void rtt_init(struct rtt_info *, uint8_t);
void rtt_newpack(struct rtt_info *);
int rtt_start(struct rtt_info *);
void rtt_stop(struct rtt_info *, uint32_t);
int rtt_timeout(struct rtt_info *);
uint32_t rtt_ts(struct rtt_info *);
extern int rtt_d_flag; /* can be set nonzero for addl info */
#endif /* __unp_rtt_h */
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/yuexiaodong/sarudp.git
[email protected]:yuexiaodong/sarudp.git
yuexiaodong
sarudp
sarudp
master

搜索帮助