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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
115
116
117
118
119
120
121
122
123
124
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_icmp.h"
#include "nx_icmpv6.h"
...
...
UINT _nxd_icmp_enable(NX_IP *ip_ptr)
{
NX_TRACE_IN_LINE_INSERT(NXD_TRACE_ICMP_ENABLE, ip_ptr, 0, 0, 0, NX_TRACE_ICMP_EVENTS, 0, 0);
tx_mutex_get(&(ip_ptr -> nx_ip_protection), TX_WAIT_FOREVER);
ip_ptr -> nx_ip_icmp_packet_receive = _nx_icmp_packet_receive;
#ifndef NX_DISABLE_IPV4
ip_ptr -> nx_ip_icmp_queue_process = _nx_icmp_queue_process;
ip_ptr -> nx_ip_icmpv4_packet_process = _nx_icmpv4_packet_process;/* ... */
#endif
#ifdef FEATURE_NX_IPV6
ip_ptr -> nx_ip_icmpv6_packet_process = _nx_icmpv6_packet_process;
ip_ptr -> nx_nd_cache_fast_periodic_update = _nx_nd_cache_fast_periodic_update;
ip_ptr -> nx_nd_cache_slow_periodic_update = _nx_nd_cache_slow_periodic_update;
memset(&ip_ptr -> nx_ipv6_nd_cache[0], 0, sizeof(ND_CACHE_ENTRY) * NX_IPV6_NEIGHBOR_CACHE_SIZE);
memset(&ip_ptr -> nx_ipv6_destination_table[0], 0, sizeof(NX_IPV6_DESTINATION_ENTRY) * NX_IPV6_DESTINATION_TABLE_SIZE);
ip_ptr -> nx_ipv6_destination_table_size = 0;
#ifdef NX_ENABLE_IPV6_PATH_MTU_DISCOVERY
ip_ptr -> nx_destination_table_periodic_update = _nx_icmpv6_destination_table_periodic_update;/* ... */
#endif
/* ... */
#endif
tx_mutex_put(&(ip_ptr -> nx_ip_protection));
return(NX_SUCCESS);
}{ ... }