summaryrefslogtreecommitdiffstats
path: root/iv/orodja/ldmitm/tcp_times.h
diff options
context:
space:
mode:
Diffstat (limited to 'iv/orodja/ldmitm/tcp_times.h')
-rw-r--r--iv/orodja/ldmitm/tcp_times.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/iv/orodja/ldmitm/tcp_times.h b/iv/orodja/ldmitm/tcp_times.h
new file mode 100644
index 0000000..3368c7b
--- /dev/null
+++ b/iv/orodja/ldmitm/tcp_times.h
@@ -0,0 +1,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.