flowprobe: use explicit types in api
[vpp.git] / src / plugins / flowprobe / flowprobe.api
1 /* Define a simple enable-disable binary API to control the feature */
2
3 /** \file
4     This file defines the vpp control-plane API messages
5     used to control the flowprobe plugin
6 */
7
8 option version = "1.0.0";
9
10 import "vnet/interface_types.api";
11
12 enum flowprobe_which_flags : u8
13 {
14   FLOWPROBE_WHICH_FLAG_IP4 = 0x1,
15   FLOWPROBE_WHICH_FLAG_L2  = 0x2,
16   FLOWPROBE_WHICH_FLAG_IP6 = 0x4,
17 };
18
19 enum flowprobe_record_flags : u8
20 {
21   FLOWPROBE_RECORD_FLAG_L2 = 0x1,
22   FLOWPROBE_RECORD_FLAG_L3 = 0x2,
23   FLOWPROBE_RECORD_FLAG_L4 = 0x4,
24 };
25
26 /** \brief Enable / disable per-packet IPFIX recording on an interface
27     @param client_index - opaque cookie to identify the sender
28     @param context - sender context, to match reply w/ request
29     @param is_add - add address if non-zero, else delete
30     @param which - flags indicating forwarding path
31     @param sw_if_index - index of the interface
32 */
33 autoreply manual_print define flowprobe_tx_interface_add_del
34 {
35   /* Client identifier, set from api_main.my_client_index */
36   u32 client_index;
37
38   /* Arbitrary context, so client can match reply to request */
39   u32 context;
40
41   /* Enable / disable the feature */
42   bool is_add;
43   vl_api_flowprobe_which_flags_t which;
44
45   /* Interface handle */
46   vl_api_interface_index_t sw_if_index;
47   option vat_help = "<intfc> [disable]";
48 };
49
50 autoreply define flowprobe_params
51 {
52   u32 client_index;
53   u32 context;
54   vl_api_flowprobe_record_flags_t record_flags;
55   u32 active_timer;  /* ~0 is off, 0 is default */
56   u32 passive_timer; /* ~0 is off, 0 is default */
57   option vat_help = "record <[l2] [l3] [l4]> [active <timer> passive <timer>]";
58 };