OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /** | 6 /** |
7 * This file defines the <code>PPB_NetAddress_Private</code> interface. | 7 * This file defines the <code>PPB_NetAddress_Private</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M17 = 0.1 | 11 M17 = 0.1, |
| 12 M18 = 1.0 |
12 }; | 13 }; |
13 | 14 |
14 /** | 15 /** |
15 * This is an opaque type holding a network address. | 16 * This is an opaque type holding a network address. |
16 */ | 17 */ |
17 [assert_size(132)] | 18 [assert_size(132)] |
18 struct PP_NetAddress_Private { | 19 struct PP_NetAddress_Private { |
19 uint32_t size; | 20 uint32_t size; |
20 char[128] data; | 21 char[128] data; |
21 }; | 22 }; |
(...skipping 29 matching lines...) Expand all Loading... |
51 */ | 52 */ |
52 PP_Bool ReplacePort([in] PP_NetAddress_Private src_addr, | 53 PP_Bool ReplacePort([in] PP_NetAddress_Private src_addr, |
53 [in] uint16_t port, | 54 [in] uint16_t port, |
54 [out] PP_NetAddress_Private dest_addr); | 55 [out] PP_NetAddress_Private dest_addr); |
55 | 56 |
56 /** | 57 /** |
57 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. | 58 * Gets the "any" address (for IPv4 or IPv6); for use with UDP Bind. |
58 */ | 59 */ |
59 void GetAnyAddress([in] PP_Bool is_ipv6, | 60 void GetAnyAddress([in] PP_Bool is_ipv6, |
60 [out] PP_NetAddress_Private addr); | 61 [out] PP_NetAddress_Private addr); |
| 62 |
| 63 /** |
| 64 * Gets the address family. |
| 65 */ |
| 66 [version=1.0] |
| 67 uint16_t GetFamily([in] PP_NetAddress_Private addr); |
| 68 |
| 69 /** |
| 70 * Gets the port. The port is returned in host byte order. |
| 71 */ |
| 72 [version=1.0] |
| 73 uint16_t GetPort([in] PP_NetAddress_Private addr); |
| 74 |
| 75 /** |
| 76 * Gets the address. The output, address, must be large enough for the |
| 77 * current socket family. The output will be the binary representation of an |
| 78 * address for the current socket family. For IPv4 and IPv6 the address is in |
| 79 * network byte order. PP_TRUE is returned if the address was successfully |
| 80 * retrieved. |
| 81 */ |
| 82 [version=1.0] |
| 83 PP_Bool GetAddress([in] PP_NetAddress_Private addr, |
| 84 [out] mem_t address, |
| 85 [in] uint16_t address_size); |
61 }; | 86 }; |
OLD | NEW |