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
85
86
87
88
89
90
91
92
93
94
95
96
97
103
104
105
106
107
108
109
113
114
115
116
117
118
119
120
121
122
123
124
125
131
132
133
134
135
136
137
138
139
140
141
142
143
147
148
149
152
153
154
155
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
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_arp.h"
#ifndef NX_DISABLE_IPV4...
...
VOID _nx_arp_static_entry_delete_internal(NX_IP *ip_ptr, NX_ARP *arp_entry)
{
TX_INTERRUPT_SAVE_AREA
#ifndef NX_DISABLE_ARP_INFO
ip_ptr -> nx_ip_arp_static_entries--;/* ... */
#endif
TX_DISABLE
if (arp_entry -> nx_arp_active_list_head)
{
if (arp_entry == arp_entry -> nx_arp_active_next)
{
*(arp_entry -> nx_arp_active_list_head) = NX_NULL;
}if (arp_entry == arp_entry -> nx_arp_active_next) { ... }
else
{
if (*(arp_entry -> nx_arp_active_list_head) == arp_entry)
{
*(arp_entry -> nx_arp_active_list_head) = arp_entry -> nx_arp_active_next;
}if (*(arp_entry -> nx_arp_active_list_head) == arp_entry) { ... }
(arp_entry -> nx_arp_active_next) -> nx_arp_active_previous =
arp_entry -> nx_arp_active_previous;
(arp_entry -> nx_arp_active_previous) -> nx_arp_active_next =
arp_entry -> nx_arp_active_next;
}else { ... }
}if (arp_entry -> nx_arp_active_list_head) { ... }
if (arp_entry == arp_entry -> nx_arp_pool_next)
{
ip_ptr -> nx_ip_arp_static_list = NX_NULL;
}if (arp_entry == arp_entry -> nx_arp_pool_next) { ... }
else
{
(arp_entry -> nx_arp_pool_next) -> nx_arp_pool_previous =
arp_entry -> nx_arp_pool_previous;
(arp_entry -> nx_arp_pool_previous) -> nx_arp_pool_next =
arp_entry -> nx_arp_pool_next;
if (ip_ptr -> nx_ip_arp_static_list == arp_entry)
{
ip_ptr -> nx_ip_arp_static_list = arp_entry -> nx_arp_pool_next;
}if (ip_ptr -> nx_ip_arp_static_list == arp_entry) { ... }
}else { ... }
/* ... */
arp_entry -> nx_arp_route_static = NX_FALSE;
arp_entry -> nx_arp_active_list_head = NX_NULL;
/* ... */
if (ip_ptr -> nx_ip_arp_dynamic_list)
{
arp_entry -> nx_arp_pool_next = ip_ptr -> nx_ip_arp_dynamic_list;
arp_entry -> nx_arp_pool_previous = (ip_ptr -> nx_ip_arp_dynamic_list) -> nx_arp_pool_previous;
((ip_ptr -> nx_ip_arp_dynamic_list) -> nx_arp_pool_previous) -> nx_arp_pool_next = arp_entry;
(ip_ptr -> nx_ip_arp_dynamic_list) -> nx_arp_pool_previous = arp_entry;
}if (ip_ptr -> nx_ip_arp_dynamic_list) { ... }
else
{
ip_ptr -> nx_ip_arp_dynamic_list = arp_entry;
arp_entry -> nx_arp_pool_next = arp_entry;
arp_entry -> nx_arp_pool_previous = arp_entry;
}else { ... }
TX_RESTORE
}{ ... }
#endif/* ... */