in6_addr

Defines an IPv6 address and is used to pass the address in network byte order to the sockaddr_in6 structure.

Service:Networking

Structure

  #include <netinet/in.h>
  
  struct in6_addr
  {
     union 
     {
        u_char   bytes[16];
        u_short  shorts[8];
        u_long   words[4];
     } in6a_u;
  
  #define in6a_shorts in6a_u.shorts
  #define in6a_words  in6a_u.words
  #define s6_addr     in6a_u.bytes
  };
  

Fields

bytes

Contains an IPv6 address formatted as 16 u_chars

shorts

Contains an IPv6 address formatted as 8 u_shorts.

words

Contains an IPv6 address formatted as 4 words.