Repository: envoyproxy/envoy
File: api/envoy/config/core/v3/address.proto (Protocol Buffers)

Code before:
    // <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
    // named resolver is capable of named port resolution.
    string named_port = 4;
  }

  // The name of the custom resolver. This must have been registered with Envoy. If
  // this is empty, a context dependent default applies. If the address is a concrete
  // IP address, no resolution will occur. If address is a hostname this
  // should be set for resolution other than DNS. Specifying a custom resolver with
  // ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
  string resolver_name = 5;

  // When binding to an IPv6 address above, this enables `IPv4 compatibility
  // <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
  // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
  // IPv6 space as ``::FFFF:<IPv4-address>``.
  bool ipv4_compat = 6;

  // Filepath that specifies the Linux network namespace this socket will be created in (see ``man 7
  // network_namespaces``). If this field is set, Envoy will create the socket in the specified
  // network namespace.
  //
  // When configured for a listener, the network namespace filepath is also populated into the filter
  // state with key ``envoy.network.network_namespace`` when a connection is accepted. This provides
  // read-only access to the network namespace for filters, access logs, and other components.
  //
  // .. note::
  //    Setting this parameter requires Envoy to run with the ``CAP_NET_ADMIN`` capability.
  //
  // .. attention::
  //     Network namespaces are only configurable on Linux. Otherwise, this field has no effect.
  string network_namespace_filepath = 7;
}

message TcpKeepalive {
  option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.TcpKeepalive";

  // Maximum number of keepalive probes to send without response before deciding
  // the connection is dead. Default is to use the OS level configuration (unless
  // overridden, Linux defaults to 9.)
  google.protobuf.UInt32Value keepalive_probes = 1;

  // The number of seconds a connection needs to be idle before keep-alive probes
  // start being sent. Default is to use the OS level configuration (unless
  // overridden, Linux defaults to 7200s (i.e., 2 hours.)
  google.protobuf.UInt32Value keepalive_time = 2;

  // The number of seconds between keep-alive probes. Default is to use the OS
  // level configuration (unless overridden, Linux defaults to 75s.)
  google.protobuf.UInt32Value keepalive_interval = 3;
}

Review comment (suggestion):
Sorry one comment..

I think it's more appropriate to have this comment on the socket address field inside the Listener proto. The actual `SocketAddress` proto here is used by other data planes (gRPC comes to mind) and this behavior is specific to Envoy.

Code after:
    // <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the
    // named resolver is capable of named port resolution.
    string named_port = 4;
  }

  // The name of the custom resolver. This must have been registered with Envoy. If
  // this is empty, a context dependent default applies. If the address is a concrete
  // IP address, no resolution will occur. If address is a hostname this
  // should be set for resolution other than DNS. Specifying a custom resolver with
  // ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
  string resolver_name = 5;

  // When binding to an IPv6 address above, this enables `IPv4 compatibility
  // <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will
  // allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into
  // IPv6 space as ``::FFFF:<IPv4-address>``.
  bool ipv4_compat = 6;

  // Filepath that specifies the Linux network namespace this socket will be created in (see ``man 7
  // network_namespaces``). If this field is set, Envoy will create the socket in the specified
  // network namespace.
  //
  // .. note::
  //    Setting this parameter requires Envoy to run with the ``CAP_NET_ADMIN`` capability.
  //
  // .. attention::
  //     Network namespaces are only configurable on Linux. Otherwise, this field has no effect.
  string network_namespace_filepath = 7;
}

message TcpKeepalive {
  option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.TcpKeepalive";

  // Maximum number of keepalive probes to send without response before deciding
  // the connection is dead. Default is to use the OS level configuration (unless
  // overridden, Linux defaults to 9.)
  google.protobuf.UInt32Value keepalive_probes = 1;

  // The number of seconds a connection needs to be idle before keep-alive probes
  // start being sent. Default is to use the OS level configuration (unless
  // overridden, Linux defaults to 7200s (i.e., 2 hours.)
  google.protobuf.UInt32Value keepalive_time = 2;

  // The number of seconds between keep-alive probes. Default is to use the OS
  // level configuration (unless overridden, Linux defaults to 75s.)
  google.protobuf.UInt32Value keepalive_interval = 3;
}

message ExtraSourceAddress {
  // The additional address to bind.
  SocketAddress address = 1 [(validate.rules).message = {required: true}];