sigar_inet_ntoa should only be used internally now

This commit is contained in:
Doug MacEachern 2006-07-05 18:11:25 +00:00
parent a58b419690
commit f410dfa739
2 changed files with 5 additions and 15 deletions

View File

@ -651,12 +651,6 @@ typedef struct {
SIGAR_DECLARE(sigar_version_t *) sigar_version_get(void);
#define SIGAR_INET_ADDR_LEN (3 * 4 + 3 + 1)
SIGAR_DECLARE(int) sigar_inet_ntoa(sigar_t *sigar,
sigar_uint64_t address,
char *addr_str);
#define SIGAR_FQDN_LEN 512
SIGAR_DECLARE(int) sigar_fqdn_get(sigar_t *sigar, char *name, int namelen);

View File

@ -1606,18 +1606,14 @@ int sigar_net_interface_list_get(sigar_t *sigar,
#endif
/* threadsafe alternative to inet_ntoa (inet_ntop4 from apr) */
SIGAR_DECLARE(int) sigar_inet_ntoa(sigar_t *sigar,
sigar_uint64_t address,
char *addr_str)
static int sigar_inet_ntoa(sigar_t *sigar,
sigar_uint32_t address,
char *addr_str)
{
char *next=addr_str;
int n=0;
const unsigned char *src;
struct in_addr addr;
addr.s_addr = address;
src = (const unsigned char *)&addr.s_addr;
const unsigned char *src =
(const unsigned char *)&address;
do {
unsigned char u = *src++;