Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

dns_cache.c File Reference

dns_cache.c File Reference

DNS cache management. More...

Go to the source code of this file.

Functions

error_t dnsInit (void)
 DNS cache initialization.
void dnsFlushCache (NetInterface *interface)
 Flush DNS cache.
DnsCacheEntrydnsCreateEntry (void)
 Create a new entry in the DNS cache.
void dnsDeleteEntry (DnsCacheEntry *entry)
 Delete the specified DNS cache entry.
DnsCacheEntrydnsFindEntry (NetInterface *interface, const char_t *name, HostType type, HostnameResolver protocol)
 Search the DNS cache for a given domain name.
void dnsTick (void)
 DNS timer handler.

Detailed Description

DNS cache management.

License

Copyright (C) 2010-2017 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:
1.7.6

Definition in file dns_cache.c.


Function Documentation

DnsCacheEntry* dnsCreateEntry ( void   )

Create a new entry in the DNS cache.

Returns:
Pointer to the newly created entry

Definition at line 99 of file dns_cache.c.

void dnsDeleteEntry ( DnsCacheEntry entry )

Delete the specified DNS cache entry.

Parameters:
[in]entryPointer to the DNS cache entry to be deleted

Definition at line 142 of file dns_cache.c.

DnsCacheEntry* dnsFindEntry ( NetInterface *  interface,
const char_t *  name,
HostType  type,
HostnameResolver  protocol 
)

Search the DNS cache for a given domain name.

Parameters:
[in]interfaceUnderlying network interface
[in]nameDomain name
[in]typeHost type (IPv4 or IPv6)
[in]protocolHost name resolution protocol
Returns:
A pointer to the matching DNS entry is returned. NULL is returned if the specified domain name could not be found in the DNS cache

Definition at line 175 of file dns_cache.c.

void dnsFlushCache ( NetInterface *  interface )

Flush DNS cache.

Parameters:
[in]interfaceUnderlying network interface

Definition at line 72 of file dns_cache.c.

error_t dnsInit ( void   )

DNS cache initialization.

Returns:
Error code

Definition at line 57 of file dns_cache.c.

void dnsTick ( void   )

DNS timer handler.

This routine must be periodically called by the TCP/IP stack to manage DNS cache

Definition at line 217 of file dns_cache.c.