| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library test.benchmarkfidl; |
| |
| // The following are based on fuchsia.posix.socket.DatagramSocket.RecvMsg: |
| |
| type DatagramSocketRecvMsgRequest = struct { |
| addr_len uint32; |
| data_len uint32; |
| control_len uint32; |
| flags int16; |
| }; |
| |
| type DatagramSocketRecvMsgResponse = struct { |
| addr vector<uint8>:128; |
| data vector<uint8>; |
| control vector<uint8>; |
| truncated uint32; |
| }; |
| |
| type DatagramSocketRecvMsgResult = strict union { |
| 1: response DatagramSocketRecvMsgResponse; |
| 2: err uint32; |
| }; |
| |
| type DatagramSocketRecvMsgResultStruct = struct { |
| result DatagramSocketRecvMsgResult; |
| }; |
| |
| // The following are based on fuchsia.posix.socket.DatagramSocket.SendMsg2: |
| |
| type DatagramSocketSendMsg2Request = struct { |
| addr vector<uint8>:128; |
| data vector<uint8>:MAX; |
| control vector<uint8>; |
| flags int16; |
| }; |
| |
| type DatagramSocketSendMsg2Response = struct { |
| len int64; |
| }; |
| |
| type DatagramSocketSendMsg2Result = strict union { |
| 1: response DatagramSocketSendMsg2Response; |
| 2: err uint32; |
| }; |
| |
| type DatagramSocketSendMsg2ResultStruct = struct { |
| result DatagramSocketSendMsg2Result; |
| }; |