#include "hostNameCache.h"
Definition at line 31 of file hostNameCache.h.
Definition at line 31 of file hostNameCache.cpp.
36 hostNameBuf[
sizeof ( hostNameBuf ) - 1 ] =
'\0';
37 nameLength = strlen ( hostNameBuf );
unsigned epicsStdCall sockAddrToDottedIP(const struct sockaddr *paddr, char *pBuf, unsigned bufSize)
virtual void ipAddrToAscii(const osiSockAddr &, ipAddrToAsciiCallBack &)=0
virtual ipAddrToAsciiTransaction & createTransaction()=0
hostNameCache::~hostNameCache |
( |
| ) |
|
void hostNameCache::destroy |
( |
| ) |
|
unsigned hostNameCache::getName |
( |
char * |
pBuf, |
|
|
unsigned |
bufLength |
|
) |
| const |
Definition at line 67 of file hostNameCache.cpp.
70 if ( bufSize == 0u ) {
74 if ( this->nameLength > 0u ) {
75 if ( this->nameLength < bufSize ) {
76 strcpy ( pBuf, this->hostNameBuf );
77 return this->nameLength;
80 unsigned reducedSize = bufSize - 1u;
81 strncpy ( pBuf, this->hostNameBuf, reducedSize );
82 pBuf [ reducedSize ] =
'\0';
unsigned epicsStdCall sockAddrToDottedIP(const struct sockaddr *paddr, char *pBuf, unsigned bufSize)
virtual osiSockAddr address() const =0
const char * hostNameCache::pointer |
( |
| ) |
const |
|
inline |
void hostNameCache::transactionComplete |
( |
const char * |
pHostName | ) |
|
|
virtual |
Implements ipAddrToAsciiCallBack.
Definition at line 51 of file hostNameCache.cpp.
58 size_t newNameLen = strlen ( pHostNameIn );
59 if ( newNameLen >
sizeof ( this->hostNameBuf ) - 1u ) {
60 newNameLen =
sizeof ( this->hostNameBuf ) - 1u;
62 strncpy ( this->hostNameBuf,
"",
sizeof ( this->hostNameBuf ) );
63 strncpy ( this->hostNameBuf, pHostNameIn,
sizeof ( this->hostNameBuf ) - 1 );
64 this->nameLength = newNameLen;
The documentation for this class was generated from the following files: