Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 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 | |
Matthew Smith | baa1870 | 2021-04-28 11:48:39 -0500 | [diff] [blame] | 16 | option version = "2.0.3"; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 17 | |
| 18 | import "vnet/ip/ip_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 19 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 20 | /** \brief Configure IPFIX exporter process request |
| 21 | @param client_index - opaque cookie to identify the sender |
| 22 | @param context - sender context, to match reply w/ request |
| 23 | @param collector_address - address of IPFIX collector |
| 24 | @param collector_port - port of IPFIX collector |
| 25 | @param src_address - address of IPFIX exporter |
| 26 | @param vrf_id - VRF / fib table ID |
| 27 | @param path_mtu - Path MTU between exporter and collector |
| 28 | @param template_interval - number of seconds after which to resend template |
| 29 | @param udp_checksum - UDP checksum calculation enable flag |
| 30 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 31 | autoreply define set_ipfix_exporter |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 32 | { |
| 33 | u32 client_index; |
| 34 | u32 context; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 35 | vl_api_address_t collector_address; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 36 | u16 collector_port; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 37 | vl_api_address_t src_address; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 38 | u32 vrf_id; |
| 39 | u32 path_mtu; |
| 40 | u32 template_interval; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 41 | bool udp_checksum; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 42 | }; |
| 43 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 44 | /** \brief IPFIX exporter dump request |
| 45 | @param client_index - opaque cookie to identify the sender |
| 46 | @param context - sender context, to match reply w/ request |
| 47 | */ |
| 48 | define ipfix_exporter_dump |
| 49 | { |
| 50 | u32 client_index; |
| 51 | u32 context; |
| 52 | }; |
| 53 | |
| 54 | /** \brief Reply to IPFIX exporter dump request |
| 55 | @param context - sender context which was passed in the request |
| 56 | @param collector_address - address of IPFIX collector |
| 57 | @param collector_port - port of IPFIX collector |
| 58 | @param src_address - address of IPFIX exporter |
| 59 | @param fib_index - fib table index |
| 60 | @param path_mtu - Path MTU between exporter and collector |
| 61 | @param template_interval - number of seconds after which to resend template |
| 62 | @param udp_checksum - UDP checksum calculation enable flag |
| 63 | */ |
| 64 | define ipfix_exporter_details |
| 65 | { |
| 66 | u32 context; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 67 | vl_api_address_t collector_address; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 68 | u16 collector_port; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 69 | vl_api_address_t src_address; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 70 | u32 vrf_id; |
| 71 | u32 path_mtu; |
| 72 | u32 template_interval; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 73 | bool udp_checksum; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 74 | }; |
| 75 | |
Paul Atkins | d747dd9 | 2021-09-22 14:56:17 +0100 | [diff] [blame] | 76 | /** Configure IPFIX exporter within the exporting process. |
| 77 | The exporting process can contain multiple independent exporters, |
| 78 | each of which have their own state. The collector_address is the key |
| 79 | field that identifies a unique exporter. The already existing API |
| 80 | 'set_ipfix_exporter' is used to modify a single exporter (which will |
| 81 | always have stat index 0). If more than one exporter is required then |
| 82 | they can be created and deleted using this API. |
| 83 | |
| 84 | @param client_index - opaque cookie to identify the sender |
| 85 | @param context - sender context, to match reply w/ request |
| 86 | @param is_create - True for create, False for delete |
| 87 | @param collector_address - address of IPFIX collector |
| 88 | @param collector_port - port of IPFIX collector |
| 89 | @param src_address - address of IPFIX exporter |
| 90 | @param vrf_id - VRF / fib table ID |
| 91 | @param path_mtu - Path MTU between exporter and collector |
| 92 | @param template_interval - number of seconds after which to resend template |
| 93 | @param udp_checksum - UDP checksum calculation enable flag |
| 94 | */ |
| 95 | |
| 96 | define ipfix_exporter_create_delete { |
| 97 | u32 client_index; |
| 98 | u32 context; |
| 99 | bool is_create; |
| 100 | vl_api_address_t collector_address; |
| 101 | u16 collector_port; |
| 102 | vl_api_address_t src_address; |
| 103 | u32 vrf_id; |
| 104 | u32 path_mtu; |
| 105 | u32 template_interval; |
| 106 | bool udp_checksum; |
| 107 | }; |
| 108 | |
| 109 | define ipfix_exporter_create_delete_reply { |
| 110 | u32 context; |
| 111 | i32 retval; |
| 112 | u32 stat_index; |
| 113 | }; |
| 114 | |
Paul Atkins | acb0d2d | 2021-09-23 09:28:50 +0100 | [diff] [blame] | 115 | service { |
| 116 | rpc ipfix_all_exporter_get returns ipfix_all_exporter_get_reply |
| 117 | stream ipfix_all_exporter_details; |
| 118 | }; |
| 119 | |
| 120 | define ipfix_all_exporter_get |
| 121 | { |
| 122 | u32 client_index; |
| 123 | u32 context; |
| 124 | u32 cursor; |
| 125 | }; |
| 126 | |
| 127 | define ipfix_all_exporter_get_reply |
| 128 | { |
| 129 | u32 context; |
| 130 | i32 retval; |
| 131 | u32 cursor; |
| 132 | }; |
| 133 | |
| 134 | /** \brief Ipfix meter details in response to the get_meters command |
| 135 | @param context - sender context, to match reply w/ request |
| 136 | @param name The name of the ipfix meter |
| 137 | */ |
| 138 | define ipfix_all_exporter_details |
| 139 | { |
| 140 | u32 context; |
| 141 | vl_api_address_t collector_address; |
| 142 | u16 collector_port; |
| 143 | vl_api_address_t src_address; |
| 144 | u32 vrf_id; |
| 145 | u32 path_mtu; |
| 146 | u32 template_interval; |
| 147 | bool udp_checksum; |
| 148 | }; |
| 149 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 150 | /** \brief IPFIX classify stream configure request |
| 151 | @param client_index - opaque cookie to identify the sender |
| 152 | @param context - sender context, to match reply w/ request |
| 153 | @param domain_id - domain ID reported in IPFIX messages for classify stream |
| 154 | @param src_port - source port of UDP session for classify stream |
| 155 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 156 | autoreply define set_ipfix_classify_stream { |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 157 | u32 client_index; |
| 158 | u32 context; |
| 159 | u32 domain_id; |
| 160 | u16 src_port; |
| 161 | }; |
| 162 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 163 | /** \brief IPFIX classify stream dump request |
| 164 | @param client_index - opaque cookie to identify the sender |
| 165 | @param context - sender context, to match reply w/ request |
| 166 | */ |
| 167 | define ipfix_classify_stream_dump { |
| 168 | u32 client_index; |
| 169 | u32 context; |
| 170 | }; |
| 171 | |
| 172 | /** \brief Reply to IPFIX classify stream dump request |
| 173 | @param context - sender context, to match reply w/ request |
| 174 | @param domain_id - domain ID reported in IPFIX messages for classify stream |
| 175 | @param src_port - source port of UDP session for classify stream |
| 176 | */ |
| 177 | define ipfix_classify_stream_details { |
| 178 | u32 context; |
| 179 | u32 domain_id; |
| 180 | u16 src_port; |
| 181 | }; |
| 182 | |
| 183 | /** \brief IPFIX add or delete classifier table request |
| 184 | @param client_index - opaque cookie to identify the sender |
| 185 | @param context - sender context, to match reply w/ request |
| 186 | @param table_id - classifier table ID |
| 187 | @param ip_version - version of IP used in the classifier table |
| 188 | @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified |
| 189 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 190 | autoreply define ipfix_classify_table_add_del { |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 191 | u32 client_index; |
| 192 | u32 context; |
| 193 | u32 table_id; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 194 | vl_api_address_family_t ip_version; |
| 195 | vl_api_ip_proto_t transport_protocol; |
| 196 | bool is_add; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 197 | }; |
| 198 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 199 | /** \brief IPFIX classify tables dump request |
| 200 | @param client_index - opaque cookie to identify the sender |
| 201 | @param context - sender context, to match reply w/ request |
| 202 | */ |
| 203 | define ipfix_classify_table_dump { |
| 204 | u32 client_index; |
| 205 | u32 context; |
| 206 | }; |
| 207 | |
| 208 | /** \brief Reply to IPFIX classify tables dump request |
| 209 | @param context - sender context, to match reply w/ request |
| 210 | @param table_id - classifier table ID |
| 211 | @param ip_version - version of IP used in the classifier table |
| 212 | @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified |
| 213 | */ |
| 214 | define ipfix_classify_table_details { |
| 215 | u32 context; |
| 216 | u32 table_id; |
Jakub Grajciar | 2f71a88 | 2019-10-10 14:21:22 +0200 | [diff] [blame] | 217 | vl_api_address_family_t ip_version; |
| 218 | vl_api_ip_proto_t transport_protocol; |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 219 | }; |
| 220 | |
Paul Vinciguerra | 21b83e9 | 2019-06-24 09:55:46 -0400 | [diff] [blame] | 221 | autoreply define ipfix_flush { |
| 222 | u32 client_index; |
| 223 | u32 context; |
| 224 | }; |
| 225 | |
Pavel Kotucek | eb9e666 | 2017-01-24 13:40:26 +0100 | [diff] [blame] | 226 | /* |
| 227 | * Local Variables: |
| 228 | * eval: (c-set-style "gnu") |
| 229 | * End: |
| 230 | */ |