1
10
13
14
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
90
91
92
93
94
95
96
99
104
105
106
110
111
115
116
117
121
125
126
127
129
130
131
132
133
134
140
141
142
143
144
145
146
147
148
149
150
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_ip.h"
#ifdef FEATURE_NX_IPV6
#include "nx_ipv6.h"
#endif
#include "nx_packet.h"
#include "nx_tcp.h"
...
...
VOID _nx_tcp_socket_state_transmit_check(NX_TCP_SOCKET *socket_ptr)
{
ULONG tx_window_current;
if (socket_ptr -> nx_tcp_socket_transmit_suspension_list)
{
/* ... */
if (socket_ptr -> nx_tcp_socket_tx_window_advertised > socket_ptr -> nx_tcp_socket_tx_window_congestion)
{
tx_window_current = socket_ptr -> nx_tcp_socket_tx_window_congestion;
/* ... */
if ((socket_ptr -> nx_tcp_socket_duplicated_ack_received == 1) ||
(socket_ptr -> nx_tcp_socket_duplicated_ack_received == 2))
{
tx_window_current += (socket_ptr -> nx_tcp_socket_connect_mss << 1);
}if ((socket_ptr -> nx_tcp_socket_duplicated_ack_received == 1) || (socket_ptr -> nx_tcp_socket_duplicated_ack_received == 2)) { ... }
if (tx_window_current > socket_ptr -> nx_tcp_socket_tx_window_advertised)
{
tx_window_current = socket_ptr -> nx_tcp_socket_tx_window_advertised;
}if (tx_window_current > socket_ptr -> nx_tcp_socket_tx_window_advertised) { ... }
}if (socket_ptr -> nx_tcp_socket_tx_window_advertised > socket_ptr -> nx_tcp_socket_tx_window_congestion) { ... }
else
{
tx_window_current = socket_ptr -> nx_tcp_socket_tx_window_advertised;
}else { ... }
if (tx_window_current > socket_ptr -> nx_tcp_socket_tx_outstanding_bytes)
{
tx_window_current -= socket_ptr -> nx_tcp_socket_tx_outstanding_bytes;
}if (tx_window_current > socket_ptr -> nx_tcp_socket_tx_outstanding_bytes) { ... }
else
{
tx_window_current = 0;
}else { ... }
/* ... */
if ((tx_window_current) &&
(socket_ptr -> nx_tcp_socket_transmit_sent_count < socket_ptr -> nx_tcp_socket_transmit_queue_maximum))
{
if (socket_ptr -> nx_tcp_socket_window_update_notify)
{
(socket_ptr -> nx_tcp_socket_window_update_notify)(socket_ptr);
}if (socket_ptr -> nx_tcp_socket_window_update_notify) { ... }
socket_ptr -> nx_tcp_socket_transmit_suspended_count--;
_nx_tcp_socket_thread_resume(&(socket_ptr -> nx_tcp_socket_transmit_suspension_list), NX_SUCCESS);
}if ((tx_window_current) && (socket_ptr -> nx_tcp_socket_transmit_sent_count < socket_ptr -> nx_tcp_socket_transmit_queue_maximum)) { ... }
}if (socket_ptr -> nx_tcp_socket_transmit_suspension_list) { ... }
}{ ... }