1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 enum NetAddressFamily {
13 struct NetAddressIPv4 {
14 // The port number. This is in the local machine's endianness.
17 // The address is expressed in network byte order, so the most significant
18 // byte ("127" in the address "127.0.0.1") will be at index 0.
22 // All members are expressed in network byte order.
23 struct NetAddressIPv6 {
24 // The port number. This is in the local machine's endianness.
27 // The address is expressed in network byte order, so the most significant
28 // byte is at index 0.
29 array<uint8, 16> addr;
33 NetAddressFamily family = UNSPECIFIED;
35 // At most one of the following fields is non-NULL depending on the value of