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
88
89
90
91
92
93
94
95
96
97
98
99
100
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
124
125
126
132
133
134
135
136
137
138
139
143
144
145
146
147
148
152
156
157
158
159
160
161
162
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_tcp.h"
...
...
UINT _nx_tcp_mss_option_get(UCHAR *option_ptr, ULONG option_area_size, ULONG *mss)
{
ULONG option_length;
*mss = 0;
while (option_area_size >= 4)
{
if (*option_ptr == NX_TCP_MSS_KIND)
{
option_ptr++;
if (*option_ptr++ != 4)
{
return(NX_FALSE);
}if (*option_ptr++ != 4) { ... }
*mss = (ULONG)*option_ptr++;
*mss = (*mss << 8) | (ULONG)*option_ptr;
break;
}if (*option_ptr == NX_TCP_MSS_KIND) { ... }
if (*option_ptr == NX_TCP_EOL_KIND)
{
break;
}if (*option_ptr == NX_TCP_EOL_KIND) { ... }
if (*option_ptr++ == NX_TCP_NOP_KIND)
{
option_area_size--;
}if (*option_ptr++ == NX_TCP_NOP_KIND) { ... }
else
{
option_length = ((ULONG)*option_ptr);
if (option_length == 0)
{
return(NX_FALSE);
}if (option_length == 0) { ... }
option_ptr = option_ptr + (option_length - 1);
if (option_length > option_area_size)
{
return(NX_FALSE);
}if (option_length > option_area_size) { ... }
else
{
option_area_size = option_area_size - option_length;
}else { ... }
}else { ... }
}while (option_area_size >= 4) { ... }
return(NX_TRUE);
}{ ... }