1// Copyright 2022 The Android Open Source Project 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 15syntax = "proto3"; 16 17package netsim.startup; 18 19import "common.proto"; 20 21/** 22 * The startup info proto. 23 * 24 * When netsim is forked from a parent that owns all fds for HAL communication 25 * (like launch_cvd) it uses json format of this proto. 26 * 27 * Example: 28 * 29 * netsim -s ' 30 * {"devices": [ 31 * {serial: "emulator-5554", 32 * chips: [{kind: "WIFI", fdIn: 1, fdOut: 2}, 33 * {kind: "BLUETOOTH", fdIn: 20, fdOut:21}] 34 * }, 35 * {serial: "emulator-5555", 36 * chips: [{kind: "BLUETOOTH", fdIn: 3, fdOut: 4}, 37 * {kind: "UWB", fdIn: 5, fdOut: 6, model: "DW300"}] 38 * } 39 * ] 40 * }' 41 * 42 */ 43 44message StartupInfo { 45 message Device { 46 string name = 1; // name of device 47 repeated Chip chips = 2; // list of SoCs associated with device 48 } 49 repeated Device devices = 1; 50} 51 52message ChipInfo { 53 string name = 1; // name of device 54 Chip chip = 2; // single chip 55} 56 57message Chip { 58 common.ChipKind kind = 1; // the kind of chip 59 string id = 2; // optional like "rear-right" 60 string manufacturer = 3; // optional like Quorvo 61 string product_name = 4; // optional like DW300 62 int32 fd_in = 5; // optional guest os input 63 int32 fd_out = 6; // optional guest os output 64 bool loopback = 7; // optional for testing 65} 66