// Copyright 2020 Anapaya Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package proto.control_plane.v1;

option go_package = "github.com/scionproto/scion/pkg/proto/control_plane";

// A ServiceResolutionRequest must always fit within a UDP datagram. If the
// request does not fit, there is no mechanism for clients and servers to
// establish control-plane reachability.
message ServiceResolutionRequest {}

// A ServiceResolutionResponse must always fit within a UDP datagram. If the
// response does not fit, there is no mechanism for clients and servers to
// establish control-plane reachability.
message ServiceResolutionResponse {
  // Supported transports to reach the service,
  //
  // List of known transports:
  // - QUIC
  //
  // Unknown values should be ignored by clients.
  map<string, Transport> transports = 1;
}

message Transport {
  // Protocol specific server address descriptor.
  //
  // Supported address format for QUIC:
  //  192.168.0.1:80
  //  [2001:db8::1]:80
  //
  //  Missing ports / zero port / invalid port values should be treated by
  //  clients as errors.
  string address = 1;
}
