// Copyright (C) 2023 The Android Open Source Project
//
// 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 openwrtcontrolserver;

import "google/protobuf/empty.proto";

service OpenwrtControlService {
  rpc LuciRpc (LuciRpcRequest) returns (LuciRpcReply) {}
  rpc OpenwrtIpaddr (google.protobuf.Empty) returns (OpenwrtIpaddrReply) {}
}

message LuciRpcRequest {
  string subpath = 1;
  string method = 2;
  repeated string params = 3;
}

message LuciRpcReply {
  int32 id = 1;
  string error = 2;
  string result = 3;
}

message OpenwrtIpaddrReply {
  string ipaddr = 1;
}
