Back to index

glibc  2.9
mapv4v6addr.h File Reference
#include <string.h>
#include <arpa/nameser.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


static void map_v4v6_address (const char *src, char *dst)

Function Documentation

static void map_v4v6_address ( const char *  src,
char *  dst 
) [static]

Definition at line 56 of file mapv4v6addr.h.

  u_char *p = (u_char *) dst;
  int i;

  /* Move the IPv4 part to the right position.  */
  memcpy (dst + 12, src, INADDRSZ);

  /* Mark this ipv6 addr as a mapped ipv4. */
  for (i = 0; i < 10; i++)
    *p++ = 0x00;
  *p++ = 0xff;
  *p = 0xff;