Back to index

glibc  2.9
Classes | Functions
mapv4v6hostent.h File Reference
#include <arpa/nameser.h>
#include <sys/socket.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


union  align


static void map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)

Class Documentation

union align

Definition at line 134 of file gethnamaddr.c.

Class Members
char ac
int32_t al

Function Documentation

static void map_v4v6_hostent ( struct hostent hp,
char **  bpp,
int lenp 
) [static]

Definition at line 61 of file mapv4v6hostent.h.

  char **ap;

  if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
  hp->h_addrtype = AF_INET6;
  hp->h_length = IN6ADDRSZ;
  for (ap = hp->h_addr_list; *ap; ap++)
      int i = sizeof (align) - ((u_long) *bpp % sizeof (align));

      if (*lenp < (i + IN6ADDRSZ))
         /* Out of memory.  Truncate address list here.  XXX */
         *ap = NULL;
      *bpp += i;
      *lenp -= i;
      map_v4v6_address (*ap, *bpp);
      *ap = *bpp;
      *bpp += IN6ADDRSZ;
      *lenp -= IN6ADDRSZ;

Here is the call graph for this function: