1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** NetX Component */
17 /** */
18 /** Internet Control Message Protocol (ICMP) */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define NX_SOURCE_CODE
24
25
26 /* Include necessary system files. */
27
28 #include "nx_api.h"
29 #include "nx_nd_cache.h"
30 #include "nx_icmpv6.h"
31
32
33 #ifdef FEATURE_NX_IPV6
34
35
36 /**************************************************************************/
37 /* */
38 /* FUNCTION RELEASE */
39 /* */
40 /* _nx_icmp_DAD_clear_NDCache_entry PORTABLE C */
41 /* 6.1 */
42 /* AUTHOR */
43 /* */
44 /* Yuxin Zhou, Microsoft Corporation */
45 /* */
46 /* DESCRIPTION */
47 /* */
48 /* INPUT */
49 /* */
50 /* ip_ptr Pointer to the IP instance */
51 /* ip_addr Neighbor IPv6 address of cache*/
52 /* entry to delete */
53 /* */
54 /* OUTPUT */
55 /* */
56 /* None */
57 /* */
58 /* CALLS */
59 /* */
60 /* tx_mutex_get Obtain exclusive lock (on table)*/
61 /* tx_mutex_put Release exclusive lock */
62 /* _nx_nd_cache_find_entry Find cache entry by IP address */
63 /* */
64 /* CALLED BY */
65 /* */
66 /* _nx_icmpv6_perform_DAD Verify IPv6 address is unique */
67 /* */
68 /* RELEASE HISTORY */
69 /* */
70 /* DATE NAME DESCRIPTION */
71 /* */
72 /* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
73 /* 09-30-2020 Yuxin Zhou Modified comment(s), */
74 /* resulting in version 6.1 */
75 /* */
76 /**************************************************************************/
_nx_icmpv6_DAD_clear_NDCache_entry(NX_IP * ip_ptr,ULONG * ip_addr)77 void _nx_icmpv6_DAD_clear_NDCache_entry(NX_IP *ip_ptr, ULONG *ip_addr)
78 {
79
80 ND_CACHE_ENTRY *NDCacheEntry;
81
82 /* Find the ND CACHE entry. */
83 if (_nx_nd_cache_find_entry(ip_ptr, ip_addr, &NDCacheEntry) == NX_SUCCESS)
84 {
85
86 /*lint -e{644} suppress variable might not be initialized, since "NDCacheEntry" was initialized in _nx_nd_cache_find_entry. */
87 NDCacheEntry -> nx_nd_cache_nd_status = ND_CACHE_STATE_INVALID;
88 }
89
90 return;
91 }
92 #endif /* FEATURE_NX_IPV6 */
93
94