4 #ifndef RUDIMENTS_HOSTENTRY_H
5 #define RUDIMENTS_HOSTENTRY_H
7 #include <rudiments/private/hostentryincludes.h>
9 #ifdef RUDIMENTS_NAMESPACE
13 class hostentryprivate;
26 static bool getAliasList(
const char *hostname,
30 static bool getAddressType(
const char *hostname,
31 int32_t *addresstype);
35 static bool getAddressLength(
const char *hostname,
36 int32_t *addresslength);
46 static bool getAddressList(
const char *hostname,
53 static bool getAddressString(
const char *hostname,
55 char **addressstring);
65 static bool getName(
const char *address,
66 int32_t len, int32_t type,
78 static bool getAliasList(
const char *address,
79 int32_t len, int32_t type,
91 static bool getAddressList(
const char *address,
92 int32_t len, int32_t type,
103 static bool getAddressString(
const char *address,
104 int32_t len, int32_t type,
106 char **addressstring);
123 bool initialize(
const char *hostname);
129 bool initialize(
const char *address,
130 int32_t len, int32_t type);
133 const char *getName()
const;
137 const char *
const *getAliasList()
const;
140 int32_t getAddressType()
const;
143 int32_t getAddressLength()
const;
147 const char *
const *getAddressList()
const;
153 char *getAddressString(int32_t index)
const;
160 static bool needsMutex();
165 static void setMutex(
mutex *mtx);
167 #include <rudiments/private/hostentry.h>
170 #ifdef RUDIMENTS_NAMESPACE