119 lines
6.0 KiB
HTML
119 lines
6.0 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE html
|
||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html lang="en-us" xml:lang="en-us">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<meta name="security" content="public" />
|
||
<meta name="Robots" content="index,follow" />
|
||
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
<meta name="DC.Type" content="reference" />
|
||
<meta name="DC.Title" content="AF_INET6 address family" />
|
||
<meta name="abstract" content="This address family provides support for the Internet Protocol version 6 (IPv6). AF_INET6 address family uses a 128 bit (16 byte) address." />
|
||
<meta name="description" content="This address family provides support for the Internet Protocol version 6 (IPv6). AF_INET6 address family uses a 128 bit (16 byte) address." />
|
||
<meta name="DC.Relation" scheme="URI" content="address.htm" />
|
||
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
<meta name="DC.Format" content="XHTML" />
|
||
<meta name="DC.Identifier" content="cafinet6" />
|
||
<meta name="DC.Language" content="en-us" />
|
||
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
<!-- US Government Users Restricted Rights -->
|
||
<!-- Use, duplication or disclosure restricted by -->
|
||
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
<title>AF_INET6 address family</title>
|
||
</head>
|
||
<body id="cafinet6"><a name="cafinet6"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">AF_INET6 address family</h1>
|
||
<div><p>This address family provides support for the Internet Protocol
|
||
version 6 (IPv6). AF_INET6 address family uses a 128 bit (16 byte) address.</p>
|
||
<div class="section"><p>The basic architecture of these addresses includes
|
||
64 bits for a network number and another 64 bits for the host number. You
|
||
can specify AF_INET6 addresses as x:x:x:x:x:x:x:x, where the x's
|
||
are the hexadecimal values of eight 16–bit pieces of the address. For example,
|
||
a valid address looks like this: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210.</p>
|
||
</div>
|
||
<div class="section"><p>For a socket application that uses TCP, User Datagram Protocol
|
||
(UDP) or RAW, the AF_INET6 address family uses the sockaddr_in6 address structure.
|
||
This address structure changes if you use _XOPEN_SOURCE macro to implement
|
||
BSD 4.4/ UNIX<sup>®</sup> 98
|
||
specifications. For the sockaddr_in6 address structure, these differences
|
||
are summarized in this table:</p>
|
||
</div>
|
||
<div class="section"><div class="p">
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Differences between BSD 4.3 and BSD 4.4/ UNIX 98 for sockaddr_in6
|
||
address structure</caption><thead align="left"><tr><th valign="top" id="d0e35">BSD 4.3 sockaddr_in6 address structure</th>
|
||
<th valign="top" id="d0e37">BSD 4.4/ UNIX 98 sockaddr_in6 address structure</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" headers="d0e35 "> <pre> struct sockaddr_in6 {
|
||
sa_family_t sin6_family;
|
||
in_port_t sin6_port;
|
||
uint32_t sin6_flowinfo;
|
||
struct in6_addr sin6_addr;
|
||
uint32_t sin6_scope_id;
|
||
};</pre>
|
||
</td>
|
||
<td valign="top" headers="d0e37 "> <pre> struct sockaddr_in6 {
|
||
uint8_t sin6_len;
|
||
sa_family_t sin6_family;
|
||
in_port_t sin6_port;
|
||
uint32_t sin6_flowinfo;
|
||
struct in6_addr sin6_addr;
|
||
uint32_t sin6_scope_id;
|
||
};</pre>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section"><div class="p">
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 2. AF_INET6 address structure </caption><thead align="left"><tr><th valign="top" id="d0e63">Address structure field</th>
|
||
<th valign="top" id="d0e65">Definition</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" headers="d0e63 ">sin6_len</td>
|
||
<td valign="top" headers="d0e65 ">This field contains the length of the address for UNIX 98
|
||
specifications. <div class="note"><span class="notetitle">Note:</span> The: sin6_len field is only provided for BSD 4.4 compatibility.
|
||
It is not necessary to use this field even when using BSD 4.4/ UNIX 98 compatibility.
|
||
The field is ignored on input addresses.</div>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e63 ">sin6_family</td>
|
||
<td valign="top" headers="d0e65 ">This field specifies the AF_INET6 address family.</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e63 ">sin6_port</td>
|
||
<td valign="top" headers="d0e65 ">This field contains the transport layer port.</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e63 ">sin6_flowinfo</td>
|
||
<td valign="top" headers="d0e65 ">This field contains two pieces of information: the traffic
|
||
class and the flow label. <div class="note"><span class="notetitle">Note:</span> This field is currently not supported and
|
||
should be set to zero for upward compatibility.</div>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e63 ">sin6_addr</td>
|
||
<td valign="top" headers="d0e65 ">This field specifies the IPv6 address.</td>
|
||
</tr>
|
||
<tr><td valign="top" headers="d0e63 ">sin6_scope_id</td>
|
||
<td valign="top" headers="d0e65 "><p>This field identifies a set of interfaces
|
||
as appropriate for the scope of the address carried in the <strong>sin6_addr</strong> field.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="address.htm" title="The address family parameter on a socket() determines the format of the address structure to use on socket functions.">Socket address family</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |