| Index: mojo/services/public/interfaces/network/net_address.mojom
|
| diff --git a/mojo/services/public/interfaces/network/net_address.mojom b/mojo/services/public/interfaces/network/net_address.mojom
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..18a5a40f0c6138c97b498d1069e74bdd94000fa1
|
| --- /dev/null
|
| +++ b/mojo/services/public/interfaces/network/net_address.mojom
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +module mojo {
|
| +
|
| +enum NetAddressFamily {
|
| + UNSPECIFIED,
|
| + IPV4,
|
| + IPV6
|
| +};
|
| +
|
| +// All members are expressed in network byte order, i.e., the most significant
|
| +// byte is stored in the smallest address. For example, if we store 127.0.0.1 in
|
| +// |addr|, 127 should be at index 0.
|
| +struct NetAddressIPv4 {
|
| + uint16 port;
|
| + uint8[4] addr;
|
| +};
|
| +
|
| +// All members are expressed in network byte order.
|
| +struct NetAddressIPv6 {
|
| + uint16 port;
|
| + uint8[16] addr;
|
| +};
|
| +
|
| +struct NetAddress {
|
| + NetAddressFamily family = UNSPECIFIED;
|
| + // At most one of the following fields is non-NULL depending on the value of
|
| + // |family|.
|
| + NetAddressIPv4? ipv4;
|
| + NetAddressIPv6? ipv6;
|
| +};
|
| +
|
| +}
|
| +
|
|
|