Ole Troan | 793be46 | 2020-12-04 13:15:30 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020 Cisco and/or its affiliates. |
| 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 | */ |
| 15 | |
Ole Troan | ab9f573 | 2020-12-15 10:19:25 +0100 | [diff] [blame^] | 16 | option version="0.0.0"; |
Ole Troan | 793be46 | 2020-12-04 13:15:30 +0100 | [diff] [blame] | 17 | import "vnet/ip/ip_types.api"; |
Ole Troan | 71134f2 | 2021-02-17 14:10:04 +0100 | [diff] [blame] | 18 | import "vnet/interface_types.api"; |
Ole Troan | 793be46 | 2020-12-04 13:15:30 +0100 | [diff] [blame] | 19 | |
| 20 | autoreply define test_prefix { |
| 21 | vl_api_prefix_t pref; |
| 22 | }; |
| 23 | |
| 24 | enumflag test_enumflags { |
| 25 | RED = 0x1, |
| 26 | BLUE = 0x2, |
| 27 | GREEN = 0x4, |
| 28 | }; |
| 29 | |
| 30 | autoreply define test_enum { |
| 31 | vl_api_test_enumflags_t flags; |
| 32 | }; |
Ole Troan | fb0afab | 2021-02-11 11:13:46 +0100 | [diff] [blame] | 33 | |
| 34 | typedef test_stringtype { |
| 35 | string str[]; |
| 36 | }; |
| 37 | |
| 38 | autoreply define test_string { |
| 39 | vl_api_test_stringtype_t str; |
| 40 | }; |
Ole Troan | cf0102b | 2021-02-12 11:48:12 +0100 | [diff] [blame] | 41 | |
Ole Troan | fb0afab | 2021-02-11 11:13:46 +0100 | [diff] [blame] | 42 | autoreply define test_string2 { |
| 43 | string str[]; |
| 44 | }; |
Ole Troan | cf0102b | 2021-02-12 11:48:12 +0100 | [diff] [blame] | 45 | |
| 46 | /* Test of toplevel VLA with basetype */ |
| 47 | autoreply define test_vla { |
| 48 | u32 count; |
| 49 | u32 vla[count]; |
| 50 | }; |
| 51 | |
| 52 | /* Test of toplevel VLA with u8 */ |
| 53 | autoreply define test_vla2 { |
| 54 | u32 count; |
| 55 | u8 vla[count]; |
| 56 | }; |
| 57 | /* Test of toplevel VLA with user type */ |
| 58 | typedef test_vlatype { |
| 59 | u32 data; |
| 60 | }; |
| 61 | autoreply define test_vla3 { |
| 62 | u32 count; |
| 63 | vl_api_test_vlatype_t vla[count]; |
| 64 | }; |
| 65 | /* Test of typedefed VLA */ |
| 66 | typedef test_vlatype2 { |
| 67 | u32 count; |
| 68 | u32 vla[count]; |
| 69 | }; |
| 70 | autoreply define test_vla4 { |
| 71 | vl_api_test_vlatype2_t data; |
| 72 | }; |
| 73 | /* u8 string in typedef */ |
| 74 | typedef test_vlatype3 { |
| 75 | u32 count; |
| 76 | u8 vla[count]; |
| 77 | }; |
| 78 | autoreply define test_vla5 { |
| 79 | vl_api_test_vlatype3_t data; |
| 80 | }; |
| 81 | |
Ole Troan | 316967c | 2021-02-16 00:31:52 +0100 | [diff] [blame] | 82 | /* Addresses */ |
| 83 | autoreply define test_addresses { |
| 84 | vl_api_address_t a; |
| 85 | }; |
Ole Troan | 93c4b1b | 2021-02-16 18:09:51 +0100 | [diff] [blame] | 86 | autoreply define test_addresses2 { |
| 87 | vl_api_address_t a[2]; |
| 88 | }; |
| 89 | autoreply define test_addresses3 { |
| 90 | u32 n; |
| 91 | vl_api_address_t a[n]; |
| 92 | }; |
| 93 | |
| 94 | /* Empty */ |
| 95 | autoreply define test_empty { |
| 96 | u32 client_index; |
| 97 | u32 context; |
| 98 | }; |
Ole Troan | 71134f2 | 2021-02-17 14:10:04 +0100 | [diff] [blame] | 99 | |
| 100 | /* Interface */ |
| 101 | autoreply define test_interface { |
| 102 | vl_api_interface_index_t sw_if_index; |
| 103 | }; |