This is Unofficial EPICS BASE Doxygen Site
hostNameCache.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  *
12  *
13  * L O S A L A M O S
14  * Los Alamos National Laboratory
15  * Los Alamos, New Mexico 87545
16  *
17  * Copyright, 1986, The Regents of the University of California.
18  *
19  *
20  * Author Jeffrey O. Hill
21  * johill@lanl.gov
22  * 505 665 1831
23  */
24 
25 #ifndef INC_hostNameCache_H
26 #define INC_hostNameCache_H
27 
29 #include "epicsMutex.h"
30 
32 public:
33  hostNameCache ( const osiSockAddr & addr, ipAddrToAsciiEngine & engine );
34  ~hostNameCache ();
35  void destroy ();
36  void transactionComplete ( const char * pHostName );
37  unsigned getName ( char *pBuf, unsigned bufLength ) const;
38  const char * pointer () const;
39 private:
40  char hostNameBuf [128];
41  mutable epicsMutex mutex;
42  ipAddrToAsciiTransaction & dnsTransaction;
43  unsigned nameLength;
44 };
45 
46 inline const char * hostNameCache::pointer () const
47 {
48  return this->hostNameBuf;
49 }
50 
51 #endif // #ifndef INC_hostNameCache_H
hostNameCache(const osiSockAddr &addr, ipAddrToAsciiEngine &engine)
void transactionComplete(const char *pHostName)
APIs for the epicsMutex mutual exclusion semaphore.
unsigned getName(char *pBuf, unsigned bufLength) const
const char * pointer() const
Definition: hostNameCache.h:46