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
90
91
92
93
94
95
96
97
98
99
100
107
108
109
110
111
115
128
129
130
131
132
...
...
...
#define NX_SOURCE_CODE
#include "nx_api.h"
#include "nx_ipv6.h"
#include "nx_icmpv6.h"
#ifdef NX_IPSEC_ENABLE
#include "nx_ipsec.h"
#endif
#ifdef FEATURE_NX_IPV6
...
#ifndef NX_DISABLE_IPV6_DAD
VOID _nx_icmpv6_DAD_failure(NX_IP *ip_ptr, NXD_IPV6_ADDRESS *ipv6_address)
{
#ifdef NX_ENABLE_IPV6_ADDRESS_CHANGE_NOTIFY
UINT interface_index;
UINT ipv6_addr_index;/* ... */
#endif
NXD_IPV6_ADDRESS *address_ptr;
ipv6_address -> nxd_ipv6_address_state = NX_IPV6_ADDR_STATE_UNKNOWN;
ipv6_address -> nxd_ipv6_address_valid = NX_FALSE;
ipv6_address -> nxd_ipv6_address_DupAddrDetectTransmit = 0;
#ifdef NX_ENABLE_IPV6_ADDRESS_CHANGE_NOTIFY
if (ip_ptr -> nx_ipv6_address_change_notify)
{
ipv6_addr_index = (ULONG)ipv6_address -> nxd_ipv6_address_index;
interface_index = (ULONG)ipv6_address -> nxd_ipv6_address_attached -> nx_interface_index;
ip_ptr -> nx_ipv6_address_change_notify(ip_ptr, NX_IPV6_ADDRESS_DAD_FAILURE, interface_index, ipv6_addr_index, &ipv6_address -> nxd_ipv6_address[0]);
}if (ip_ptr -> nx_ipv6_address_change_notify) { ... }
/* ... */#else
NX_PARAMETER_NOT_USED(ip_ptr);
#endif
if (ipv6_address == ipv6_address -> nxd_ipv6_address_attached -> nxd_interface_ipv6_address_list_head)
{
ipv6_address -> nxd_ipv6_address_attached -> nxd_interface_ipv6_address_list_head = ipv6_address -> nxd_ipv6_address_next;
}if (ipv6_address == ipv6_address -> nxd_ipv6_address_attached -> nxd_interface_ipv6_address_list_head) { ... }
else
{
for (address_ptr = ipv6_address -> nxd_ipv6_address_attached -> nxd_interface_ipv6_address_list_head;
address_ptr != NX_NULL;
address_ptr = address_ptr -> nxd_ipv6_address_next)
{
if (address_ptr -> nxd_ipv6_address_next == ipv6_address)
{
address_ptr -> nxd_ipv6_address_next = ipv6_address -> nxd_ipv6_address_next;
}if (address_ptr -> nxd_ipv6_address_next == ipv6_address) { ... }
}for (address_ptr = ipv6_address -> nxd_ipv6_address_attached -> nxd_interface_ipv6_address_list_head; address_ptr != NX_NULL; address_ptr = address_ptr -> nxd_ipv6_address_next) { ... }
}else { ... }
}_nx_icmpv6_DAD_failure (NX_IP *ip_ptr, NXD_IPV6_ADDRESS *ipv6_address) { ... }
/* ... */
#endif /* ... */
#endif