IPV6 Socket Address Structure

Source: Internet
Author: User

IPV6 Socket Address Structure

struct in6_addr{

unit8_t sa_addr[16];

};

#define Sin6_len

struct sockaddr_in6{

unit8_t Sin6_len;

sa_family_t sin6_family;

in_port_t Port;

unit32_t Sin6_flowinfo;

struct IN6_ADDR sin6_addr;

Unit32-t sin6_scope_id;

};

If the system supports length fields in the socket address structure, then the Sin6_len constant must be defined

The address cluster of the IPV6 is Af_inet6, and IPv4 's address cluster is af_inet

The order of the fields in the structure is arranged so that if the SOCKADDR_IN6 structure is 64-bit aligned, the 128-bit SIN6_ADDR field is also 64-bit aligned

The Sin6_flowinfo field is divided into 2 fields:

Low-order 20-bit is stream high-order 12-bit reserved

IPV6 Socket Address Structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.