ipfix-export: support creating multiple exporters
[vpp.git] / src / vnet / ipfix-export / ipfix_export.api
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
16 option version = "2.0.3";
17
18 import "vnet/ip/ip_types.api";
19
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 */
31 autoreply define set_ipfix_exporter
32 {
33   u32 client_index;
34   u32 context;
35   vl_api_address_t collector_address;
36   u16 collector_port;
37   vl_api_address_t src_address;
38   u32 vrf_id;
39   u32 path_mtu;
40   u32 template_interval;
41   bool udp_checksum;
42 };
43
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;
67   vl_api_address_t collector_address;
68   u16 collector_port;
69   vl_api_address_t src_address;
70   u32 vrf_id;
71   u32 path_mtu;
72   u32 template_interval;
73   bool udp_checksum;
74 };
75
76
77 /** Configure IPFIX exporter within the exporting process.
78     The exporting process can contain multiple independent exporters,
79     each of which have their own state.  The collector_address is the key
80     field that identifies a unique exporter. The already existing API
81     'set_ipfix_exporter' is used to modify a single exporter (which will
82     always have stat index 0).  If more than one exporter is required then
83     they can be created and deleted using this API.
84
85     @param client_index - opaque cookie to identify the sender
86     @param context - sender context, to match reply w/ request
87     @param is_create - True for create, False for delete
88     @param collector_address - address of IPFIX collector
89     @param collector_port - port of IPFIX collector
90     @param src_address - address of IPFIX exporter
91     @param vrf_id - VRF / fib table ID
92     @param path_mtu - Path MTU between exporter and collector
93     @param template_interval - number of seconds after which to resend template
94     @param udp_checksum - UDP checksum calculation enable flag
95 */
96
97 define ipfix_exporter_create_delete {
98   u32 client_index;
99   u32 context;
100   bool is_create;
101   vl_api_address_t collector_address;
102   u16 collector_port;
103   vl_api_address_t src_address;
104   u32 vrf_id;
105   u32 path_mtu;
106   u32 template_interval;
107   bool udp_checksum;
108 };
109
110 define ipfix_exporter_create_delete_reply {
111   u32 context;
112   i32 retval;
113   u32 stat_index;
114 };
115
116 /** \brief IPFIX classify stream configure request
117     @param client_index - opaque cookie to identify the sender
118     @param context - sender context, to match reply w/ request
119     @param domain_id - domain ID reported in IPFIX messages for classify stream
120     @param src_port - source port of UDP session for classify stream
121 */
122 autoreply define set_ipfix_classify_stream {
123     u32 client_index;
124     u32 context;
125     u32 domain_id;
126     u16 src_port;
127 };
128
129 /** \brief IPFIX classify stream dump request
130     @param client_index - opaque cookie to identify the sender
131     @param context - sender context, to match reply w/ request
132 */
133 define ipfix_classify_stream_dump {
134     u32 client_index;
135     u32 context;
136 };
137
138 /** \brief Reply to IPFIX classify stream dump request
139     @param context - sender context, to match reply w/ request
140     @param domain_id - domain ID reported in IPFIX messages for classify stream
141     @param src_port - source port of UDP session for classify stream
142 */
143 define ipfix_classify_stream_details {
144     u32 context;
145     u32 domain_id;
146     u16 src_port;
147 };
148
149 /** \brief IPFIX add or delete classifier table request
150     @param client_index - opaque cookie to identify the sender
151     @param context - sender context, to match reply w/ request
152     @param table_id - classifier table ID
153     @param ip_version - version of IP used in the classifier table
154     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
155 */
156 autoreply define ipfix_classify_table_add_del {
157     u32 client_index;
158     u32 context;
159     u32 table_id;
160     vl_api_address_family_t ip_version;
161     vl_api_ip_proto_t transport_protocol;
162     bool is_add;
163 };
164
165 /** \brief IPFIX classify tables dump request
166     @param client_index - opaque cookie to identify the sender
167     @param context - sender context, to match reply w/ request
168 */
169 define ipfix_classify_table_dump {
170     u32 client_index;
171     u32 context;
172 };
173
174 /** \brief Reply to IPFIX classify tables dump request
175     @param context - sender context, to match reply w/ request
176     @param table_id - classifier table ID
177     @param ip_version - version of IP used in the classifier table
178     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
179 */
180 define ipfix_classify_table_details {
181     u32 context;
182     u32 table_id;
183     vl_api_address_family_t ip_version;
184     vl_api_ip_proto_t transport_protocol;
185 };
186
187 autoreply define ipfix_flush {
188     u32 client_index;
189     u32 context;
190 };
191
192 /*
193  * Local Variables:
194  * eval: (c-set-style "gnu")
195  * End:
196  */