summaryrefslogtreecommitdiffstats
path: root/iv/orodja/ldmitm/tcp_times.h
blob: 3368c7b94373386f44380b38b360132de1573a31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define TCP_TIMES_PRINTF_FORMAT "fd: %d, ts_recent_stamp: %d, ts_recent: %u, rcv_tsval: %u, rcv_tsecr: %u, saw_tstamp: %u, tstamp_ok: %u, dsack: %u, wscale_ok: %u, sack_ok: %u, snd_wscale: %u, rcv_wscale: %u, advmss: %u, rttvar_us: %u, srtt_us: %u, rcv_rtt_est.rtt_us: %u, rcv_rtt_est.seq: %u, rcv_rtt_est.time: %lu, rtt_us: %u, mdev_max_us: %u"
#define TCP_TIMES_PRINTF_VARIABLES(tt) tt fd, tt ts_recent_stamp, tt ts_recent, tt rcv_tsval, tt rcv_tsecr, tt saw_tstamp, tt tstamp_ok, tt dsack, tt wscale_ok, tt sack_ok, tt snd_wscale, tt rcv_wscale, tt advmss, tt rttvar_us, tt srtt_us, tt rcv_rtt_est.rtt_us, tt rcv_rtt_est.seq, tt rcv_rtt_est.time, tt rtt_us, tt mdev_max_us
struct tcp_times {	// Polja so pobrana iz jedra. Glej https://elixir.bootlin.com/linux/v6.11-rc4/source/include/linux/tcp.h#L302
	int		fd;
	int		ts_recent_stamp;/* Time we stored ts_recent (for aging) */
	uint32_t	ts_recent;	/* Time stamp to echo next		*/
	uint32_t	rcv_tsval;	/* Time stamp value             	*/
	uint32_t	rcv_tsecr;	/* Time stamp echo reply        	*/
	uint16_t	saw_tstamp : 1,	/* Saw TIMESTAMP on last packet		*/
			tstamp_ok : 1,	/* TIMESTAMP seen on SYN packet		*/
			dsack : 1,	/* D-SACK is scheduled			*/
			wscale_ok : 1,	/* Wscale seen on SYN packet		*/
			sack_ok : 3,	/* SACK seen on SYN packet		*/
			smc_ok : 1,	/* SMC seen on SYN packet		*/
			snd_wscale : 4,	/* Window scaling received from sender	*/
			rcv_wscale : 4;	/* Window scaling to send to receiver	*/
	uint16_t	advmss;		/* Advertised MSS			*/
	uint32_t	rttvar_us;	/* smoothed mdev_max			*/
	uint32_t	srtt_us;	/* smoothed round trip time << 3 in usecs */
	struct {
		uint32_t	rtt_us;
		uint32_t	seq;
		uint64_t	time;
	} rcv_rtt_est;
	uint32_t	rtt_us;		/* Associated RTT */
	uint32_t	mdev_max_us;	/* maximal mdev for the last rtt period	*/
}; // Ne vem, kaj veliko polj tu pomeni, vendar jih dodajam. Mogoče bodo uporabna.