arp_cache.h File Reference

ARP cache management. More...

#include "core/net.h"
#include "ipv4/arp.h"

Go to the source code of this file.

Functions

void arpChangeState (ArpCacheEntry *entry, ArpState newState)
 Update ARP cache entry state. More...
 
ArpCacheEntryarpCreateEntry (NetInterface *interface)
 Create a new entry in the ARP cache. More...
 
ArpCacheEntryarpFindEntry (NetInterface *interface, Ipv4Addr ipAddr)
 Search the ARP cache for a given IPv4 address. More...
 
void arpFlushCache (NetInterface *interface)
 Flush ARP cache. More...
 
void arpSendQueuedPackets (NetInterface *interface, ArpCacheEntry *entry)
 Send packets that are waiting for address resolution. More...
 
void arpFlushQueuedPackets (NetInterface *interface, ArpCacheEntry *entry)
 Flush packet queue. More...
 

Detailed Description

ARP 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file arp_cache.h.

Function Documentation

◆ arpChangeState()

void arpChangeState ( ArpCacheEntry entry,
ArpState  newState 
)

Update ARP cache entry state.

Parameters
[in]entryPointer to a ARP cache entry
[in]newStateNew state to switch to

Definition at line 55 of file arp_cache.c.

◆ arpCreateEntry()

ArpCacheEntry* arpCreateEntry ( NetInterface interface)

Create a new entry in the ARP cache.

Parameters
[in]interfaceUnderlying network interface
Returns
Pointer to the newly created entry

Definition at line 74 of file arp_cache.c.

◆ arpFindEntry()

ArpCacheEntry* arpFindEntry ( NetInterface interface,
Ipv4Addr  ipAddr 
)

Search the ARP cache for a given IPv4 address.

Parameters
[in]interfaceUnderlying network interface
[in]ipAddrIPv4 address
Returns
A pointer to the matching ARP entry is returned. NULL is returned if the specified IPv4 address could not be found in ARP cache

Definition at line 156 of file arp_cache.c.

◆ arpFlushCache()

void arpFlushCache ( NetInterface interface)

Flush ARP cache.

Parameters
[in]interfaceUnderlying network interface

Definition at line 188 of file arp_cache.c.

◆ arpFlushQueuedPackets()

void arpFlushQueuedPackets ( NetInterface interface,
ArpCacheEntry entry 
)

Flush packet queue.

Parameters
[in]interfaceUnderlying network interface
[in]entryPointer to a ARP cache entry

Definition at line 262 of file arp_cache.c.

◆ arpSendQueuedPackets()

void arpSendQueuedPackets ( NetInterface interface,
ArpCacheEntry entry 
)

Send packets that are waiting for address resolution.

Parameters
[in]interfaceUnderlying network interface
[in]entryPointer to a ARP cache entry

Definition at line 222 of file arp_cache.c.