Neighbor and destination cache management. More...
#include "core/net.h"
#include "ipv6/ipv6_misc.h"
#include "ipv6/icmpv6.h"
#include "ipv6/ndp.h"
#include "ipv6/ndp_cache.h"
#include "ipv6/ndp_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL NDP_TRACE_LEVEL |
Functions | |
void | ndpChangeState (NdpNeighborCacheEntry *entry, NdpState newState) |
Update Neighbor cache entry state. More... | |
NdpNeighborCacheEntry * | ndpCreateNeighborCacheEntry (NetInterface *interface) |
Create a new entry in the Neighbor cache. More... | |
NdpNeighborCacheEntry * | ndpFindNeighborCacheEntry (NetInterface *interface, const Ipv6Addr *ipAddr) |
Search the Neighbor cache for a given IPv6 address. More... | |
void | ndpUpdateNeighborCache (NetInterface *interface) |
Periodically update Neighbor cache. More... | |
void | ndpFlushNeighborCache (NetInterface *interface) |
Flush Neighbor cache. More... | |
uint_t | ndpSendQueuedPackets (NetInterface *interface, NdpNeighborCacheEntry *entry) |
Send packets that are waiting for address resolution. More... | |
void | ndpFlushQueuedPackets (NetInterface *interface, NdpNeighborCacheEntry *entry) |
Flush packet queue. More... | |
NdpDestCacheEntry * | ndpCreateDestCacheEntry (NetInterface *interface) |
Create a new entry in the Destination Cache. More... | |
NdpDestCacheEntry * | ndpFindDestCacheEntry (NetInterface *interface, const Ipv6Addr *destAddr) |
Search the Destination Cache for a given destination address. More... | |
void | ndpFlushDestCache (NetInterface *interface) |
Flush Destination Cache. More... | |
Detailed Description
Neighbor and destination cache management.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file ndp_cache.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL NDP_TRACE_LEVEL |
Definition at line 32 of file ndp_cache.c.
Function Documentation
◆ ndpChangeState()
void ndpChangeState | ( | NdpNeighborCacheEntry * | entry, |
NdpState | newState | ||
) |
Update Neighbor cache entry state.
- Parameters
-
[in] entry Pointer to a Neighbor cache entry [in] newState New state to switch to
Definition at line 53 of file ndp_cache.c.
◆ ndpCreateDestCacheEntry()
NdpDestCacheEntry* ndpCreateDestCacheEntry | ( | NetInterface * | interface | ) |
Create a new entry in the Destination Cache.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Pointer to the newly created entry
Definition at line 452 of file ndp_cache.c.
◆ ndpCreateNeighborCacheEntry()
NdpNeighborCacheEntry* ndpCreateNeighborCacheEntry | ( | NetInterface * | interface | ) |
Create a new entry in the Neighbor cache.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Pointer to the newly created entry
Definition at line 72 of file ndp_cache.c.
◆ ndpFindDestCacheEntry()
NdpDestCacheEntry* ndpFindDestCacheEntry | ( | NetInterface * | interface, |
const Ipv6Addr * | destAddr | ||
) |
Search the Destination Cache for a given destination address.
- Parameters
-
[in] interface Underlying network interface [in] destAddr Destination IPv6 address
- Returns
- A pointer to the matching entry is returned. NULL is returned if the specified address could not be found in the Destination cache
Definition at line 503 of file ndp_cache.c.
◆ ndpFindNeighborCacheEntry()
NdpNeighborCacheEntry* ndpFindNeighborCacheEntry | ( | NetInterface * | interface, |
const Ipv6Addr * | ipAddr | ||
) |
Search the Neighbor cache for a given IPv6 address.
- Parameters
-
[in] interface Underlying network interface [in] ipAddr IPv6 address
- Returns
- A pointer to the matching entry is returned. NULL is returned if the specified IPv6 address could not be found in the Neighbor cache
Definition at line 154 of file ndp_cache.c.
◆ ndpFlushDestCache()
void ndpFlushDestCache | ( | NetInterface * | interface | ) |
Flush Destination Cache.
- Parameters
-
[in] interface Underlying network interface
Definition at line 532 of file ndp_cache.c.
◆ ndpFlushNeighborCache()
void ndpFlushNeighborCache | ( | NetInterface * | interface | ) |
Flush Neighbor cache.
- Parameters
-
[in] interface Underlying network interface
Definition at line 315 of file ndp_cache.c.
◆ ndpFlushQueuedPackets()
void ndpFlushQueuedPackets | ( | NetInterface * | interface, |
NdpNeighborCacheEntry * | entry | ||
) |
Flush packet queue.
- Parameters
-
[in] interface Underlying network interface [in] entry Pointer to a Neighbor cache entry
Definition at line 409 of file ndp_cache.c.
◆ ndpSendQueuedPackets()
uint_t ndpSendQueuedPackets | ( | NetInterface * | interface, |
NdpNeighborCacheEntry * | entry | ||
) |
Send packets that are waiting for address resolution.
- Parameters
-
[in] interface Underlying network interface [in] entry Pointer to a Neighbor cache entry
- Returns
- The number of packets that have been sent
Definition at line 350 of file ndp_cache.c.
◆ ndpUpdateNeighborCache()
void ndpUpdateNeighborCache | ( | NetInterface * | interface | ) |
Periodically update Neighbor cache.
- Parameters
-
[in] interface Underlying network interface
Definition at line 187 of file ndp_cache.c.