diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 00:04:09 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-09 00:04:09 +0000 |
commit | ee9bdfce0a8f58d136bf2df3b4a6e4542f5b6c1f (patch) | |
tree | dcae373df1061e20e0d06debb3e93bfa2b169561 /ppapi/api | |
parent | 5747e990bc49a046840bef4c0b9e70178a44771e (diff) | |
download | chromium_src-ee9bdfce0a8f58d136bf2df3b4a6e4542f5b6c1f.zip chromium_src-ee9bdfce0a8f58d136bf2df3b4a6e4542f5b6c1f.tar.gz chromium_src-ee9bdfce0a8f58d136bf2df3b4a6e4542f5b6c1f.tar.bz2 |
PPB_NetAddress_Private: add getter methods for sockaddr.
This CL is mostly contributed by Vinay(vinaya@adobe.com): http://codereview.chromium.org/9235035
Comparing with 9235035, this change:
- fixes the NaCl Proxy.
- adds untrusted tests.
- does other small fixes.
BUG=None
TEST=test_net_address_private and test_net_address_private_untrusted
Review URL: https://chromiumcodereview.appspot.com/9307115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r-- | ppapi/api/private/ppb_net_address_private.idl | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/ppapi/api/private/ppb_net_address_private.idl b/ppapi/api/private/ppb_net_address_private.idl index 97bc59f..ecf6416 100644 --- a/ppapi/api/private/ppb_net_address_private.idl +++ b/ppapi/api/private/ppb_net_address_private.idl @@ -8,7 +8,8 @@ */ label Chrome { - M17 = 0.1 + M17 = 0.1, + M18 = 1.0 }; /** @@ -58,4 +59,28 @@ interface PPB_NetAddress_Private { */ void GetAnyAddress([in] PP_Bool is_ipv6, [out] PP_NetAddress_Private addr); + + /** + * Gets the address family. + */ + [version=1.0] + uint16_t GetFamily([in] PP_NetAddress_Private addr); + + /** + * Gets the port. The port is returned in host byte order. + */ + [version=1.0] + uint16_t GetPort([in] PP_NetAddress_Private addr); + + /** + * Gets the address. The output, address, must be large enough for the + * current socket family. The output will be the binary representation of an + * address for the current socket family. For IPv4 and IPv6 the address is in + * network byte order. PP_TRUE is returned if the address was successfully + * retrieved. + */ + [version=1.0] + PP_Bool GetAddress([in] PP_NetAddress_Private addr, + [out] mem_t address, + [in] uint16_t address_size); }; |