syntax = "proto3";

package envoy.config.listener.v3;

import "envoy/config/core/v3/udp_socket_config.proto";
import "envoy/config/listener/v3/quic_config.proto";

import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";

option java_package = "io.envoyproxy.envoy.config.listener.v3";
option java_outer_classname = "UdpListenerConfigProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: UDP listener config]
// Listener :ref:`configuration overview <config_listeners>`

// [#next-free-field: 8]
message UdpListenerConfig {
  option (udpa.annotations.versioning).previous_message_type =
      "envoy.api.v2.listener.UdpListenerConfig";

  reserved 1, 2, 3, 4, 6;

  reserved "config";

  // UDP socket configuration for the listener. The default for
  // :ref:`prefer_gro <envoy_v3_api_field_config.core.v3.UdpSocketConfig.prefer_gro>` is false for
  // listener sockets. If receiving a large amount of datagrams from a small number of sources, it
  // may be worthwhile to enable this option after performance testing.
  core.v3.UdpSocketConfig downstream_socket_config = 5;

  // Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set
  // to the default object to enable QUIC without modifying any additional options.
  //
  // .. warning::
  //   QUIC support is currently alpha and should be used with caution. Please
  //   see :ref:`here <arch_overview_http3>` for details.
  QuicProtocolOptions quic_options = 7;
}

message ActiveRawUdpListenerConfig {
  option (udpa.annotations.versioning).previous_message_type =
      "envoy.api.v2.listener.ActiveRawUdpListenerConfig";
}
