1010 */
1111#ifndef INTER_CONNECT_INTERNAL_H
1212#define INTER_CONNECT_INTERNAL_H
13+ #include <stdint.h>
14+ #include <stdlib.h>
15+ #include <sys/time.h>
16+ #include <sys/queue.h>
17+ #include <pthread.h>
1318
1419#include "tcp/ic_tcp.h"
1520#include "udp/ic_udpifc.h"
@@ -33,6 +38,27 @@ typedef enum MotionConnState
3338 mcsEosSent
3439} MotionConnState ;
3540
41+ struct udp_send_vars
42+ {
43+ /* send sequence variables */
44+ uint32_t snd_una ; /* send unacknoledged */
45+ uint32_t snd_wnd ; /* send window (unscaled) */
46+
47+ /* retransmission timeout variables */
48+ uint8_t nrtx ; /* number of retransmission */
49+ uint8_t max_nrtx ; /* max number of retransmission */
50+ uint32_t rto ; /* retransmission timeout */
51+ uint32_t ts_rto ; /* timestamp for retransmission timeout */
52+
53+ /* congestion control variables */
54+ uint32_t cwnd ; /* congestion window */
55+ uint32_t ssthresh ; /* slow start threshold */
56+
57+ TAILQ_ENTRY (MotionConnUDP ) send_link ;
58+ TAILQ_ENTRY (MotionConnUDP ) timer_link ; /* timer link (rto list) */
59+
60+ };
61+
3662/*
3763 * Structure used for keeping track of a pt-to-pt connection between two
3864 * Cdb Entities (either QE or QD).
@@ -153,6 +179,32 @@ typedef struct MotionConnUDP
153179 uint64 stat_count_resent ;
154180 uint64 stat_max_resent ;
155181 uint64 stat_count_dropped ;
182+
183+ struct {
184+ uint32_t ts_rto ;
185+ uint32_t rto ;
186+ uint32_t srtt ;
187+ uint32_t rttvar ;
188+ uint32_t snd_una ;
189+ uint16_t nrtx ;
190+ uint16_t max_nrtx ;
191+ uint32_t mss ;
192+ uint32_t cwnd ;
193+ uint32_t ssthresh ;
194+ uint32_t fss ;
195+ uint8_t loss_count ;
196+ uint32_t mdev ;
197+ uint32_t mdev_max ;
198+ uint32_t rtt_seq ; /* sequence number to update rttvar */
199+ uint32_t ts_all_rto ;
200+ bool karn_mode ;
201+ } rttvar ;
202+
203+ uint8_t on_timewait_list ;
204+ int16_t on_rto_idx ;
205+
206+ uint32_t snd_nxt ; /* send next */
207+ struct udp_send_vars sndvar ;
156208} MotionConnUDP ;
157209
158210typedef struct MotionConnTCP
0 commit comments