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