Select one of the symbols to view example projects that use it.
 
Outline
...
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_tcp.h"
#include "nx_packet.h"
...
...
_nx_tcp_socket_packet_process(NX_TCP_SOCKET *, NX_PACKET *)
Files
loading (1/7)...
SourceVuSTM32 Libraries and Samplesnetxduocommon/src/nx_tcp_socket_packet_process.c
 
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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/**************************************************************************/ /* */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* */ /* This software is licensed under the Microsoft Software License */ /* Terms for Microsoft Azure RTOS. Full text of the license can be */ /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ /* and in the root directory of this software. */ /* */... /**************************************************************************/ ... /**************************************************************************/ /**************************************************************************/ /** */ /** NetX Component */ /** */ /** Transmission Control Protocol (TCP) */ /** */... /**************************************************************************/ /**************************************************************************/ #define NX_SOURCE_CODE /* Include necessary system files. */ #include "nx_api.h" #include "nx_tcp.h" #include "nx_packet.h" ... /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _nx_tcp_socket_packet_process PORTABLE C */ /* 6.1.10 */ /* AUTHOR */ /* */ /* Yuxin Zhou, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function processes an incoming TCP packet relative to the */ /* socket it belongs to, including processing state changes, and */ /* sending and receiving data. */ /* */ /* INPUT */ /* */ /* socket_ptr Pointer to owning socket */ /* packet_ptr Pointer to packet to process */ /* */ /* OUTPUT */ /* */ /* None */ /* */ /* CALLS */ /* */ /* _nx_packet_release Packet release function */ /* _nx_tcp_socket_connection_reset Reset connection */ /* _nx_tcp_socket_state_ack_check Process received ACKs */ /* _nx_tcp_socket_state_closing Process CLOSING state */ /* _nx_tcp_socket_state_data_check Process received data */ /* _nx_tcp_socket_state_established Process ESTABLISHED state */ /* _nx_tcp_socket_state_fin_wait1 Process FIN WAIT 1 state */ /* _nx_tcp_socket_state_fin_wait2 Process FIN WAIT 2 state */ /* _nx_tcp_socket_state_last_ack Process LAST ACK state */ /* _nx_tcp_socket_state_syn_received Process SYN RECEIVED state */ /* _nx_tcp_socket_state_syn_sent Process SYN SENT state */ /* _nx_tcp_socket_state_transmit_check Check for transmit ability */ /* (nx_tcp_urgent_data_callback) Application urgent callback */ /* function */ /* */ /* CALLED BY */ /* */ /* _nx_tcp_packet_process Process raw TCP packet */ /* */ /* RELEASE HISTORY */ /* */ /* DATE NAME DESCRIPTION */ /* */ /* 05-19-2020 Yuxin Zhou Initial Version 6.0 */ /* 09-30-2020 Yuxin Zhou Modified comment(s), */ /* resulting in version 6.1 */ /* 08-02-2021 Yuxin Zhou Modified comment(s), and */ /* supported TCP/IP offload, */ /* resulting in version 6.1.8 */ /* 01-31-2022 Yuxin Zhou Modified comment(s), and */ /* fixed unsigned integers */ /* comparison, */ /* resulting in version 6.1.10 */ /* */... /**************************************************************************/ VOID _nx_tcp_socket_packet_process(NX_TCP_SOCKET *socket_ptr, NX_PACKET *packet_ptr) { UINT packet_queued = NX_FALSE; NX_TCP_HEADER tcp_header_copy; VOID (*urgent_callback)(NX_TCP_SOCKET *socket_ptr); ULONG header_length; ULONG packet_data_length; ULONG packet_sequence; ULONG rx_sequence; ULONG rx_window; UINT outside_of_window; ULONG mss = 0; #ifdef NX_ENABLE_TCPIP_OFFLOAD ULONG tcpip_offload; tcpip_offload = socket_ptr -> nx_tcp_socket_connect_interface -> nx_interface_capability_flag & NX_INTERFACE_CAPABILITY_TCPIP_OFFLOAD;/* ... */ #endif /* NX_ENABLE_TCPIP_OFFLOAD */ /* Add debug information. */ NX_PACKET_DEBUG(__FILE__, __LINE__, packet_ptr); /* Copy the TCP header, since the actual packet can be delivered to a waiting socket/thread during this routine and before we are done using the header. *//* ... */ /*lint -e{927} -e{826} suppress cast of pointer to pointer, since it is necessary */ tcp_header_copy = *((NX_TCP_HEADER *)packet_ptr -> nx_packet_prepend_ptr); /* Get the size of the TCP header. */ header_length = (tcp_header_copy.nx_tcp_header_word_3 >> NX_TCP_HEADER_SHIFT) * (ULONG)sizeof(ULONG); /* Process the segment if socket state is equal or greater than NX_TCP_SYN_RECEIVED. According to RFC 793, Section 3.9, Page 69. */ if ((socket_ptr -> nx_tcp_socket_state >= NX_TCP_SYN_RECEIVED) #ifdef NX_ENABLE_TCPIP_OFFLOAD && (!tcpip_offload) #endif /* NX_ENABLE_TCPIP_OFFLOAD */ ) { /* Step1: Check sequence number. According to RFC 793, Section 3.9, Page 69. */ /* Pickup the sequence of this packet. */ packet_sequence = tcp_header_copy.nx_tcp_sequence_number; /* Calculate the data length in the packet. */ packet_data_length = packet_ptr -> nx_packet_length - header_length; /* Pickup the rx sequence. */ rx_sequence = socket_ptr -> nx_tcp_socket_rx_sequence; #ifdef NX_ENABLE_LOW_WATERMARK if ((socket_ptr -> nx_tcp_socket_rx_window_current == 0) && (socket_ptr -> nx_tcp_socket_receive_queue_head == NX_NULL) && (packet_ptr -> nx_packet_pool_owner -> nx_packet_pool_available >= packet_ptr -> nx_packet_pool_owner -> nx_packet_pool_low_watermark)) { /* Window was closed due to low watermark of packet pool. */ /* Now reset the window size. */ socket_ptr -> nx_tcp_socket_rx_window_current = socket_ptr -> nx_tcp_socket_rx_window_default; }if ((socket_ptr -> nx_tcp_socket_rx_window_current == 0) && (socket_ptr -> nx_tcp_socket_receive_queue_head == NX_NULL) && (packet_ptr -> nx_packet_pool_owner -> nx_packet_pool_available >= packet_ptr -> nx_packet_pool_owner -> nx_packet_pool_low_watermark)) { ... } /* ... */#endif /* NX_ENABLE_LOW_WATERMARK */ /* Pickup the rx window. */ rx_window = socket_ptr -> nx_tcp_socket_rx_window_current; /* There are four cases for the acceptability test for an incoming segment. Section 3.9 Page 69, RFC 793. *//* ... */ outside_of_window = NX_TRUE; if (packet_data_length == 0) { if (rx_window == 0) { if (packet_sequence == rx_sequence) { outside_of_window = NX_FALSE; }if (packet_sequence == rx_sequence) { ... } else if ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT) || (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_URG_BIT) || ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_CONTROL_MASK) == NX_TCP_ACK_BIT)) { /* If the RCV.WND is zero, no segments will be acceptable, but special allowance should be made to accept valid ACKs, URGs and RSTs. Section 3.9 Page 69, RFC 793. *//* ... */ outside_of_window = NX_FALSE; }else if ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT) || (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_URG_BIT) || ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_CONTROL_MASK) == NX_TCP_ACK_BIT)) { ... } }if (rx_window == 0) { ... } else if (((INT)(packet_sequence - rx_sequence) >= 0) && ((INT)(rx_sequence + rx_window - packet_sequence) > 0)) { outside_of_window = NX_FALSE; }else if (((INT)(packet_sequence - rx_sequence) >= 0) && ((INT)(rx_sequence + rx_window - packet_sequence) > 0)) { ... } }if (packet_data_length == 0) { ... } else { if ((rx_window > 0) && ((((INT)(packet_sequence - rx_sequence) >= 0) && ((INT)(rx_sequence + rx_window - packet_sequence) > 0)) || (((INT)(packet_sequence + (packet_data_length - 1) - rx_sequence) >= 0) && ((INT)(rx_sequence + 1 + (rx_window - packet_sequence) - packet_data_length) > 0)))) { outside_of_window = NX_FALSE; }if ((rx_window > 0) && ((((INT)(packet_sequence - rx_sequence) >= 0) && ((INT)(rx_sequence + rx_window - packet_sequence) > 0)) || (((INT)(packet_sequence + (packet_data_length - 1) - rx_sequence) >= 0) && ((INT)(rx_sequence + 1 + (rx_window - packet_sequence) - packet_data_length) > 0)))) { ... } }else { ... } /* Detect whether or not the data is outside the window. */ if (outside_of_window) { /* If an incoming segment is not acceptable, an acknowledgment should be sent in reply (unless the RST bit is set, if so drop the segment and return). Section 3.9, Page 69, RFC 793. *//* ... */ if (!(tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT)) { /* Send an immediate ACK. */ _nx_tcp_packet_send_ack(socket_ptr, socket_ptr -> nx_tcp_socket_tx_sequence); }if (!(tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT)) { ... } #ifndef NX_DISABLE_TCP_INFO /* Increment the TCP dropped packet count. */ socket_ptr -> nx_tcp_socket_ip_ptr -> nx_ip_tcp_receive_packets_dropped++;/* ... */ #endif /* Release the packet. */ _nx_packet_release(packet_ptr); /* Finished processing, simply return! */ return; }if (outside_of_window) { ... } /* Step2: Check the RST bit. According to RFC 793, Section 3.9, Page 70. */ if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT) { #ifndef NX_DISABLE_TCP_INFO /* Increment the resets received count. */ (socket_ptr -> nx_tcp_socket_ip_ptr) -> nx_ip_tcp_resets_received++;/* ... */ #endif /* If trace is enabled, insert this event into the trace buffer. */ NX_TRACE_IN_LINE_INSERT(NX_TRACE_INTERNAL_TCP_RESET_RECEIVE, socket_ptr -> nx_tcp_socket_ip_ptr, socket_ptr, packet_ptr, tcp_header_copy.nx_tcp_sequence_number, NX_TRACE_INTERNAL_EVENTS, 0, 0); /* Reset connection. */ _nx_tcp_socket_connection_reset(socket_ptr); /* Release the packet. */ _nx_packet_release(packet_ptr); /* Finished processing, simply return! */ return; }if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_RST_BIT) { ... } /* Step3: Check the SYN bit. According to RFC 793, Section 3.9, Page 71. */ if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_SYN_BIT) { /* The SYN is in the window it is an error, send a reset. */ /* Adjust the SEQ for the SYN bit. */ /* The reset logic uses the sequence number in tcp_header_ptr as its ACK number. */ tcp_header_copy.nx_tcp_sequence_number++; /* Send RST message. */ _nx_tcp_packet_send_rst(socket_ptr, &tcp_header_copy); /* Reset the connection. */ _nx_tcp_socket_connection_reset(socket_ptr); /* Release the packet. */ _nx_packet_release(packet_ptr); /* Finished processing, simply return! */ return; }if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_SYN_BIT) { ... } /* Step4: Check the ACK field. According to RFC 793, Section 3.9, Page 72. */ if (socket_ptr -> nx_tcp_socket_state != NX_TCP_SYN_RECEIVED) { /* Check the ACK field. */ if (_nx_tcp_socket_state_ack_check(socket_ptr, &tcp_header_copy) == NX_FALSE) { /* Release the packet. */ _nx_packet_release(packet_ptr); /* Finished processing, simply return! */ return; }if (_nx_tcp_socket_state_ack_check(socket_ptr, &tcp_header_copy) == NX_FALSE) { ... } }if (socket_ptr -> nx_tcp_socket_state != NX_TCP_SYN_RECEIVED) { ... } }if ((socket_ptr -> nx_tcp_socket_state >= NX_TCP_SYN_RECEIVED) #ifdef NX_ENABLE_TCPIP_OFFLOAD && (!tcpip_offload) #endif /* NX_ENABLE_TCPIP_OFFLOAD */) { ... } /* Illegal option length check. */ if (header_length > sizeof(NX_TCP_HEADER)) { /* There are one or more option words. */ /* The illegal option length is validated during MSS option get function. */ if (!_nx_tcp_mss_option_get((packet_ptr -> nx_packet_prepend_ptr + sizeof(NX_TCP_HEADER)), header_length - (ULONG)sizeof(NX_TCP_HEADER), &mss)) { /* TCP MUST be prepared to handle an illegal option length (e.g., zero) without crashing; a suggested procedure is to reset the connection and log the reason, outlined in RFC 1122, Section 4.2.2.5, Page85. *//* ... */ /* Preprocess the sequence number if the incoming segment does not have an ACK field. Reset Generation, RFC793, Section3.4, Page37. *//* ... */ if (!(tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_ACK_BIT)) { /* Update sequence number to set the reset acknowledge number. */ tcp_header_copy.nx_tcp_sequence_number += (packet_ptr -> nx_packet_length - header_length); /* Check the SYN and FIN bits. */ if ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_SYN_BIT) || (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_FIN_BIT)) { /* Update sequence number to set the reset acknowledge number. */ tcp_header_copy.nx_tcp_sequence_number++; }if ((tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_SYN_BIT) || (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_FIN_BIT)) { ... } }if (!(tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_ACK_BIT)) { ... } /* Send RST message. */ _nx_tcp_packet_send_rst(socket_ptr, &tcp_header_copy); /* Reset the connection. */ _nx_tcp_socket_connection_reset(socket_ptr); #ifndef NX_DISABLE_TCP_INFO /* Increment the TCP invalid packet error count. */ socket_ptr -> nx_tcp_socket_ip_ptr -> nx_ip_tcp_invalid_packets++;/* ... */ #endif /* NX_DISABLE_TCP_INFO */ /* Release the packet. */ _nx_packet_release(packet_ptr); return; }if (!_nx_tcp_mss_option_get((packet_ptr -> nx_packet_prepend_ptr + sizeof(NX_TCP_HEADER)), header_length - (ULONG)sizeof(NX_TCP_HEADER), &mss)) { ... } }if (header_length > sizeof(NX_TCP_HEADER)) { ... } /* Process relative to the state of the socket. */ switch (socket_ptr -> nx_tcp_socket_state) { case NX_TCP_SYN_SENT: /* Call the SYN SENT state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_syn_sent(socket_ptr, &tcp_header_copy, packet_ptr); /* Check whether socket is established. */ if (socket_ptr -> nx_tcp_socket_state == NX_TCP_ESTABLISHED) { /* Check for data in the current packet. */ packet_queued = _nx_tcp_socket_state_data_check(socket_ptr, packet_ptr); }if (socket_ptr -> nx_tcp_socket_state == NX_TCP_ESTABLISHED) { ... } /* State processing is complete. */ break; case NX_TCP_SYN_SENT: case NX_TCP_SYN_RECEIVED: /* Call the SYN RECEIVED state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_syn_received(socket_ptr, &tcp_header_copy); /* Check whether socket is established. */ if (socket_ptr -> nx_tcp_socket_state == NX_TCP_ESTABLISHED) { /* Check for data in the current packet. */ packet_queued = _nx_tcp_socket_state_data_check(socket_ptr, packet_ptr); }if (socket_ptr -> nx_tcp_socket_state == NX_TCP_ESTABLISHED) { ... } /* State processing is complete. */ break; case NX_TCP_SYN_RECEIVED: case NX_TCP_ESTABLISHED: /* Check for data in the current packet. */ packet_queued = _nx_tcp_socket_state_data_check(socket_ptr, packet_ptr); #ifdef NX_ENABLE_TCPIP_OFFLOAD if (!tcpip_offload) #endif /* NX_ENABLE_TCPIP_OFFLOAD */ { /* Call the ESTABLISHED state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_established(socket_ptr); /* Determine if any transmit suspension can be lifted. */ _nx_tcp_socket_state_transmit_check(socket_ptr); ...} /* State processing is complete. */ break; case NX_TCP_ESTABLISHED: case NX_TCP_CLOSE_WAIT: /* Determine if any transmit suspension can be lifted. */ _nx_tcp_socket_state_transmit_check(socket_ptr); /* State processing is complete. */ break; case NX_TCP_CLOSE_WAIT: case NX_TCP_LAST_ACK: /* Call the LAST ACK state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_last_ack(socket_ptr, &tcp_header_copy); /* State processing is complete. */ break; case NX_TCP_LAST_ACK: case NX_TCP_FIN_WAIT_1: /* Check for data in the current packet. */ packet_queued = _nx_tcp_socket_state_data_check(socket_ptr, packet_ptr); /* Call the FIN WAIT 1 state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_fin_wait1(socket_ptr); /* State processing is complete. */ break; case NX_TCP_FIN_WAIT_1: case NX_TCP_FIN_WAIT_2: /* Check for data in the current packet. */ packet_queued = _nx_tcp_socket_state_data_check(socket_ptr, packet_ptr); /* Call the FIN WAIT 2 state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_fin_wait2(socket_ptr); /* State processing is complete. */ break; case NX_TCP_FIN_WAIT_2: case NX_TCP_CLOSING: /* Call the CLOSING state handling function to process any state changes caused by this new packet. *//* ... */ _nx_tcp_socket_state_closing(socket_ptr, &tcp_header_copy); /* State processing is complete. */ break; case NX_TCP_CLOSING: case NX_TCP_TIMED_WAIT: /* State processing is complete. */ break; case NX_TCP_TIMED_WAIT: default: break;default }switch (socket_ptr -> nx_tcp_socket_state) { ... } /* Check for an URG (urgent) bit set. */ /*lint -e{644} suppress variable might not be initialized, since "tcp_header_copy" was initialized. */ if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_URG_BIT) { /* Yes, an Urgent bit is set. */ /* Pickup the urgent callback function specified when the socket was created. */ urgent_callback = socket_ptr -> nx_tcp_urgent_data_callback; /* Determine if there is an urgent callback function specified. */ if (urgent_callback) { /* Yes, call the application's urgent callback function to alert the application of the presence of the urgent bit. *//* ... */ (urgent_callback)(socket_ptr); }if (urgent_callback) { ... } }if (tcp_header_copy.nx_tcp_header_word_3 & NX_TCP_URG_BIT) { ... } /* Determine if we need to release the packet. */ if (!packet_queued) { /* Yes, the packet was not queued up above, so it needs to be released. */ _nx_packet_release(packet_ptr); }if (!packet_queued) { ... } }{ ... }
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.