[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

UDNSCache



Overview:

UDNSCache is a PowerPlant class that is used for a local cache for DNS entries.

Methods :

The methods in this class are:

 

AddToDNSCache()  
CheckCache()  
CreateDNSCacheElem()  
GetAddressFromCache()  
GetNameFromCache()  
 

Data Members:

The data members in this class are:

 

sOTDNSNameCache  
sOTDNSAddressCache  

Source files:

(Networking Classes)

UDNSCache.h

UDNSCache.cp

AddToDNSCache()

Purpose:

Add an entry to the DNS cache.

Access :

Static, Public

Prototype:

static void AddToDNSCache( UInt32 inHostIP, 
   ConstStringPtr inHostName);
Parameters:

The parameters for this method are:

 

UInt32 inHostIP The host IP address.
ConstStringPtr inHostName The host name string.

Return:

None

CheckCache()

Purpose:

Verify the cache.

Access :

Static, Public

Prototype:

static void CheckCache();
Parameters:

None

Return:

None

CreateDNSCacheElem()

Purpose:

Create a DNS cache element.

Access :

Static, Protected

Prototype:

static void CreateDNSCacheElem(UInt32 inHostIP, 

	ConstStringPtr inHostName, 
   SDNSCacheElem& outElem );
Parameters:

The parameters for this method are:

 

UInt32 inHostIP The host IP address.
ConstStringPtr inHostName The host name string.
SDNSCacheElem& outElem The element.

Return:

None

GetAddressFromCache()

Purpose:

Retrieve a DNS entry from the cache.

Access :

Static, Public

Prototype:

static Boolean GetAddressFromCache( 
   UInt32 inHostIP,
	LStr255& outHostName );
Parameters:

The parameters for this method are:

 

UInt32 inHostIP The host IP address.
LStr255& outHostName The host name string.

Return:

None

GetNameFromCache()

Purpose:

Retrieve a DNS name from the cache.

Access :

Static, Public

Prototype:

static UInt32 GetNameFromCache(ConstStringPtr 
inHostName);
Parameters:

The parameters for this method are:

 

ConstStringPtr inHostName The host name string.

Return:

Returns the IP address if found in the cache. If not found, returns zero.

sOTDNSNameCache

Purpose:

The name cache array.

Access :

Static, Private

Prototype:

static LArray* sOTDNSNameCache;

sOTDNSAddressCache

Purpose:

The address cache array.

Access :

Static, Private

Prototype:

static LArray* sOTDNSAddressCache;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000