DNSCacheEntry Event

Fires once for each cached DNS entry.

Syntax

ANSI (Cross Platform)
virtual int FireDNSCacheEntry(IPInfoDNSCacheEntryEventParams *e);
typedef struct {
const char *RecordName;
int RecordType;
int TimeToLive;
int DataLength;
const char *Section;
const char *RecordValue;
const char *RecordInfo; int reserved; } IPInfoDNSCacheEntryEventParams; Unicode (Windows) virtual INT FireDNSCacheEntry(IPInfoDNSCacheEntryEventParams *e);
typedef struct {
LPCWSTR RecordName;
INT RecordType;
INT TimeToLive;
INT DataLength;
LPCWSTR Section;
LPCWSTR RecordValue;
LPCWSTR RecordInfo; INT reserved; } IPInfoDNSCacheEntryEventParams;
- (void)onDNSCacheEntry:(NSString*)recordName :(int)recordType :(int)timeToLive :(int)dataLength :(NSString*)section :(NSString*)recordValue :(NSString*)recordInfo;
#define EID_IPINFO_DNSCACHEENTRY 1

virtual INT IPWORKS_CALL FireDNSCacheEntry(LPSTR &lpszRecordName, INT &iRecordType, INT &iTimeToLive, INT &iDataLength, LPSTR &lpszSection, LPSTR &lpszRecordValue, LPSTR &lpszRecordInfo);

Remarks

This event fires once for each entry in the local DNS cache when DisplayDNSCache is called.

RecordName is the host name to which the record applies.

RecordType is the type of response. For instance 1 is an A record.

TimeToLive is the time in seconds after which the cached entry expires.

DataLength is the length of the data in bytes. For instance if the RecordType is A and an IPv4 address is cached DataLength would be 4. CNAME and PTR records will contain the length of the address in memory where the value is held.

Section is the section of the DNS response from which the record is taken. Most commonly this is the "Answer" section.

RecordValue is the actual value that is cached. For instance this may be an IP address for A records.

RecordInfo is a text representation of the other parameters. This is suitable for use in a log file, or to display.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]