chromium/native_client_sdk/doc_generated/pepper_beta/c/struct_p_p_b___net_address__1__0.html

{{+bindTo:partials.standard_nacl_api}}
<h1>PPB_NetAddress Struct Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
  <div>
<!-- Generated by Doxygen 1.7.6.1 -->


</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="PPB_NetAddress" --><h2>
Data Fields</h2><table class="memberdecls">

<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a82fab17541bec1817622932f102afdf9">CreateFromIPv4Address</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a> *ipv4_addr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a7531096a8ddbda89e83b1b57958337df">CreateFromIPv6Address</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a> *ipv6_addr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a13f63cdfe4ee93b2539f73ec23739422">IsNetAddress</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga43636bcadf9aa312a4c345d210ae6c55">PP_NetAddress_Family</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a139a1f09d00f0dcfce2eaad70af24124">GetFamily</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a7552e536b89cc3aa4415f41a5c7ee7ee">DescribeAsString</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> include_port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#af04c1b08407b0db414d796d2c733f0c0">DescribeAsIPv4Address</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, struct <a class="el" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a> *ipv4_addr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___net_address__1__0.html#a613670dcb447c3c32c2b39c8faa14b88">DescribeAsIPv6Address</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, struct <a class="el" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a> *ipv6_addr)</td></tr>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <code>PPB_NetAddress</code> interface provides operations on network addresses. </p>
</div><hr /><h2>Field Documentation</h2>
<a class="anchor" id="a82fab17541bec1817622932f102afdf9"></a><!-- doxytag: member="PPB_NetAddress::CreateFromIPv4Address" ref="a82fab17541bec1817622932f102afdf9" args=")(PP_Instance instance, const struct PP_NetAddress_IPv4 *ipv4_addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a82fab17541bec1817622932f102afdf9">PPB_NetAddress::CreateFromIPv4Address</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a> *ipv4_addr)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a <code>PPB_NetAddress</code> resource with the specified IPv4 address. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ipv4_addr</td><td>An IPv4 address.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> representing the same address as <code>ipv4_addr</code> or 0 on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a7531096a8ddbda89e83b1b57958337df"></a><!-- doxytag: member="PPB_NetAddress::CreateFromIPv6Address" ref="a7531096a8ddbda89e83b1b57958337df" args=")(PP_Instance instance, const struct PP_NetAddress_IPv6 *ipv6_addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a7531096a8ddbda89e83b1b57958337df">PPB_NetAddress::CreateFromIPv6Address</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance, const struct <a class="el" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a> *ipv6_addr)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a <code>PPB_NetAddress</code> resource with the specified IPv6 address. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying one instance of a module. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ipv6_addr</td><td>An IPv6 address.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> representing the same address as <code>ipv6_addr</code> or 0 on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="af04c1b08407b0db414d796d2c733f0c0"></a><!-- doxytag: member="PPB_NetAddress::DescribeAsIPv4Address" ref="af04c1b08407b0db414d796d2c733f0c0" args=")(PP_Resource addr, struct PP_NetAddress_IPv4 *ipv4_addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#af04c1b08407b0db414d796d2c733f0c0">PPB_NetAddress::DescribeAsIPv4Address</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, struct <a class="el" href="struct_p_p___net_address___i_pv4.html">PP_NetAddress_IPv4</a> *ipv4_addr)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fills a <code><a class="el" href="struct_p_p___net_address___i_pv4.html" title="All members are expressed in network byte order.">PP_NetAddress_IPv4</a></code> structure if the network address is of <code>PP_NETADDRESS_FAMILY_IPV4</code> address family. </p>
<p>Note that passing a network address of <code>PP_NETADDRESS_FAMILY_IPV6</code> address family will fail even if the address is an IPv4-mapped IPv6 address.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>A <code>PP_Resource</code> corresponding to a network address. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ipv4_addr</td><td>A <code><a class="el" href="struct_p_p___net_address___i_pv4.html" title="All members are expressed in network byte order.">PP_NetAddress_IPv4</a></code> structure to store the result.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> value indicating whether the operation succeeded. </dd></dl>
</div>
</div>
<a class="anchor" id="a613670dcb447c3c32c2b39c8faa14b88"></a><!-- doxytag: member="PPB_NetAddress::DescribeAsIPv6Address" ref="a613670dcb447c3c32c2b39c8faa14b88" args=")(PP_Resource addr, struct PP_NetAddress_IPv6 *ipv6_addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a613670dcb447c3c32c2b39c8faa14b88">PPB_NetAddress::DescribeAsIPv6Address</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, struct <a class="el" href="struct_p_p___net_address___i_pv6.html">PP_NetAddress_IPv6</a> *ipv6_addr)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Fills a <code><a class="el" href="struct_p_p___net_address___i_pv6.html" title="All members are expressed in network byte order.">PP_NetAddress_IPv6</a></code> structure if the network address is of <code>PP_NETADDRESS_FAMILY_IPV6</code> address family. </p>
<p>Note that passing a network address of <code>PP_NETADDRESS_FAMILY_IPV4</code> address family will fail - this method doesn't map it to an IPv6 address.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>A <code>PP_Resource</code> corresponding to a network address. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">ipv6_addr</td><td>A <code><a class="el" href="struct_p_p___net_address___i_pv6.html" title="All members are expressed in network byte order.">PP_NetAddress_IPv6</a></code> structure to store the result.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> value indicating whether the operation succeeded. </dd></dl>
</div>
</div>
<a class="anchor" id="a7552e536b89cc3aa4415f41a5c7ee7ee"></a><!-- doxytag: member="PPB_NetAddress::DescribeAsString" ref="a7552e536b89cc3aa4415f41a5c7ee7ee" args=")(PP_Resource addr, PP_Bool include_port)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a7552e536b89cc3aa4415f41a5c7ee7ee">PPB_NetAddress::DescribeAsString</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> include_port)<code> [read]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns a human-readable description of the network address. </p>
<p>The description is in the form of host [ ":" port ] and conforms to <a href="http://tools.ietf.org/html/rfc3986#section-3.2">http://tools.ietf.org/html/rfc3986#section-3.2</a> for IPv4 and IPv6 addresses (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80").</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>A <code>PP_Resource</code> corresponding to a network address. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">include_port</td><td>Whether to include the port number in the description.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A string <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> on success; an undefined <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a139a1f09d00f0dcfce2eaad70af24124"></a><!-- doxytag: member="PPB_NetAddress::GetFamily" ref="a139a1f09d00f0dcfce2eaad70af24124" args=")(PP_Resource addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga43636bcadf9aa312a4c345d210ae6c55">PP_NetAddress_Family</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a139a1f09d00f0dcfce2eaad70af24124">PPB_NetAddress::GetFamily</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> addr)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the address family. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>A <code>PP_Resource</code> corresponding to a network address.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The address family on success; <code>PP_NETADDRESS_FAMILY_UNSPECIFIED</code> on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a13f63cdfe4ee93b2539f73ec23739422"></a><!-- doxytag: member="PPB_NetAddress::IsNetAddress" ref="a13f63cdfe4ee93b2539f73ec23739422" args=")(PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___net_address__1__0.html#a13f63cdfe4ee93b2539f73ec23739422">PPB_NetAddress::IsNetAddress</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determines if a given resource is a network address. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> to check.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the input is a <code>PPB_NetAddress</code> resource; <code>PP_FALSE</code> otherwise. </dd></dl>
</div>
</div>
<hr />The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="ppb__net__address_8h.html">ppb_net_address.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}