Back to index

glibc  2.9
Defines
gethstbyad_r.c File Reference
#include <netdb.h>
#include <string.h>
#include "../nss/getXXbyYY_r.c"

Go to the source code of this file.

Defines

#define LOOKUP_TYPE   struct hostent
#define FUNCTION_NAME   gethostbyaddr
#define DATABASE_NAME   hosts
#define ADD_PARAMS   const void *addr, socklen_t len, int type
#define ADD_VARIABLES   addr, len, type
#define NEED_H_ERRNO   1
#define NEED__RES   1
#define NEED__RES_HCONF   1
#define PREPROCESS
#define POSTPROCESS
#define DB_LOOKUP_FCT   __nss_hosts_lookup2

Define Documentation

#define ADD_PARAMS   const void *addr, socklen_t len, int type

Definition at line 27 of file gethstbyad_r.c.

#define ADD_VARIABLES   addr, len, type

Definition at line 28 of file gethstbyad_r.c.

#define DATABASE_NAME   hosts

Definition at line 26 of file gethstbyad_r.c.

#define DB_LOOKUP_FCT   __nss_hosts_lookup2

Definition at line 51 of file gethstbyad_r.c.

Definition at line 25 of file gethstbyad_r.c.

#define LOOKUP_TYPE   struct hostent

Definition at line 24 of file gethstbyad_r.c.

#define NEED__RES   1

Definition at line 30 of file gethstbyad_r.c.

#define NEED__RES_HCONF   1

Definition at line 31 of file gethstbyad_r.c.

#define NEED_H_ERRNO   1

Definition at line 29 of file gethstbyad_r.c.

#define POSTPROCESS
Value:
if (status == NSS_STATUS_SUCCESS)                                    \
    {                                                                \
      _res_hconf_reorder_addrs (resbuf);                             \
      _res_hconf_trim_domains (resbuf);                                     \
    }

Definition at line 43 of file gethstbyad_r.c.

#define PREPROCESS
Value:
if (len == sizeof (struct in6_addr)                                         \
      && __builtin_expect (memcmp (&in6addr_any, addr,                      \
                               sizeof (struct in6_addr)), 1) == 0)          \
    {                                                                \
      *h_errnop = HOST_NOT_FOUND;                                    \
      *result = NULL;                                                       \
      return ENOENT;                                                 \
    }

Definition at line 34 of file gethstbyad_r.c.