• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020 The gRPC Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Local copy of Envoy xDS proto file, used for testing only.
16
17syntax = "proto3";
18
19package envoy.config.core.v3;
20
21import "google/protobuf/wrappers.proto";
22
23// [#protodoc-title: Network addresses]
24
25// [#next-free-field: 7]
26message SocketAddress {
27  // The address for this socket. :ref:`Listeners <config_listeners>` will bind
28  // to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::``
29  // to bind to any address. [#comment:TODO(zuercher) reinstate when implemented:
30  // It is possible to distinguish a Listener address via the prefix/suffix matching
31  // in :ref:`FilterChainMatch <envoy_api_msg_config.listener.v3.FilterChainMatch>`.] When used
32  // within an upstream :ref:`BindConfig <envoy_api_msg_config.core.v3.BindConfig>`, the address
33  // controls the source address of outbound connections. For :ref:`clusters
34  // <envoy_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the
35  // address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS
36  // (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized
37  // via :ref:`resolver_name <envoy_api_field_config.core.v3.SocketAddress.resolver_name>`.
38  string address = 2;
39
40  oneof port_specifier {
41    uint32 port_value = 3;
42  }
43}
44
45// Addresses specify either a logical or physical address and port, which are
46// used to tell Envoy where to bind/listen, connect to upstream and find
47// management servers.
48message Address {
49  oneof address {
50    SocketAddress socket_address = 1;
51  }
52}
53
54// CidrRange specifies an IP Address and a prefix length to construct
55// the subnet mask for a `CIDR <https://tools.ietf.org/html/rfc4632>`_ range.
56message CidrRange {
57  // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``.
58  string address_prefix = 1;
59
60  // Length of prefix, e.g. 0, 32.
61  google.protobuf.UInt32Value prefix_len = 2;
62}
63