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
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
124
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
158
159
160
161
162
163
164
165
169
170
171
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_arp.h"
...
...
UINT _nx_arp_entry_delete(NX_IP *ip_ptr, ULONG ip_address)
{
#ifndef NX_DISABLE_IPV4
UINT status;
NX_ARP *arp_ptr;
NX_ARP *arp_list_head;
NX_ARP *search_ptr;
UINT index;
tx_mutex_get(&(ip_ptr -> nx_ip_protection), TX_WAIT_FOREVER);
/* ... */
index = (UINT)((ip_address + (ip_address >> 8)) & NX_ARP_TABLE_MASK);
arp_list_head = ip_ptr -> nx_ip_arp_table[index];
search_ptr = arp_list_head;
arp_ptr = NX_NULL;
while (search_ptr)
{
if (search_ptr -> nx_arp_ip_address == ip_address)
{
arp_ptr = search_ptr;
break;
}if (search_ptr -> nx_arp_ip_address == ip_address) { ... }
search_ptr = search_ptr -> nx_arp_active_next;
/* ... */
if (search_ptr == arp_list_head)
{
break;
}if (search_ptr == arp_list_head) { ... }
}while (search_ptr) { ... }
if (arp_ptr == NX_NULL)
{
tx_mutex_put(&(ip_ptr -> nx_ip_protection));
return(NX_ENTRY_NOT_FOUND);
}if (arp_ptr == NX_NULL) { ... }
if (arp_ptr -> nx_arp_route_static == NX_TRUE)
{
status = _nx_arp_static_entry_delete(ip_ptr, ip_address,
arp_ptr -> nx_arp_physical_address_msw,
arp_ptr -> nx_arp_physical_address_lsw);
}if (arp_ptr -> nx_arp_route_static == NX_TRUE) { ... }
else
{
status = _nx_arp_dynamic_entry_delete(ip_ptr, arp_ptr);
}else { ... }
tx_mutex_put(&(ip_ptr -> nx_ip_protection));
return(status);/* ... */
#else
NX_PARAMETER_NOT_USED(ip_ptr);
NX_PARAMETER_NOT_USED(ip_address);
return(NX_NOT_SUPPORTED);/* ... */
#endif
}{ ... }