Data Fields


Detailed Description

The PPB_NetAddress interface provides operations on network addresses.


Field Documentation

Creates a PPB_NetAddress resource with the specified IPv4 address.

Parameters:
[in]instanceA PP_Instance identifying one instance of a module.
[in]ipv4_addrAn IPv4 address.
Returns:
A PP_Resource representing the same address as ipv4_addr or 0 on failure.

Creates a PPB_NetAddress resource with the specified IPv6 address.

Parameters:
[in]instanceA PP_Instance identifying one instance of a module.
[in]ipv6_addrAn IPv6 address.
Returns:
A PP_Resource representing the same address as ipv6_addr or 0 on failure.

Fills a PP_NetAddress_IPv4 structure if the network address is of PP_NETADDRESS_FAMILY_IPV4 address family.

Note that passing a network address of PP_NETADDRESS_FAMILY_IPV6 address family will fail even if the address is an IPv4-mapped IPv6 address.

Parameters:
[in]addrA PP_Resource corresponding to a network address.
[out]ipv4_addrA PP_NetAddress_IPv4 structure to store the result.
Returns:
A PP_Bool value indicating whether the operation succeeded.

Fills a PP_NetAddress_IPv6 structure if the network address is of PP_NETADDRESS_FAMILY_IPV6 address family.

Note that passing a network address of PP_NETADDRESS_FAMILY_IPV4 address family will fail - this method doesn't map it to an IPv6 address.

Parameters:
[in]addrA PP_Resource corresponding to a network address.
[out]ipv6_addrA PP_NetAddress_IPv6 structure to store the result.
Returns:
A PP_Bool value indicating whether the operation succeeded.
struct PP_Var(* PPB_NetAddress::DescribeAsString)(PP_Resource addr, PP_Bool include_port) [read]

Returns a human-readable description of the network address.

The description is in the form of host [ ":" port ] and conforms to http://tools.ietf.org/html/rfc3986#section-3.2 for IPv4 and IPv6 addresses (e.g., "192.168.0.1", "192.168.0.1:99", or "[::1]:80").

Parameters:
[in]addrA PP_Resource corresponding to a network address.
[in]include_portWhether to include the port number in the description.
Returns:
A string PP_Var on success; an undefined PP_Var on failure.

Gets the address family.

Parameters:
[in]addrA PP_Resource corresponding to a network address.
Returns:
The address family on success; PP_NETADDRESS_FAMILY_UNSPECIFIED on failure.

Determines if a given resource is a network address.

Parameters:
[in]resourceA PP_Resource to check.
Returns:
PP_TRUE if the input is a PPB_NetAddress resource; PP_FALSE otherwise.

The documentation for this struct was generated from the following file:
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.