From 3013e69884ce99aa27049947408286e16905f302 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Mon, 9 Dec 2019 15:51:44 +0100 Subject: flowprobe: use explicit types in api Type: fix Signed-off-by: Ole Troan Change-Id: I4f1cccca7de0c07cee472bde80cd6b0ef60046bd --- src/plugins/flowprobe/flowprobe.api | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'src/plugins/flowprobe/flowprobe.api') diff --git a/src/plugins/flowprobe/flowprobe.api b/src/plugins/flowprobe/flowprobe.api index 830e4420e4e..8e8b90fc4e3 100644 --- a/src/plugins/flowprobe/flowprobe.api +++ b/src/plugins/flowprobe/flowprobe.api @@ -7,11 +7,27 @@ option version = "1.0.0"; +import "vnet/interface_types.api"; + +enum flowprobe_which_flags : u8 +{ + FLOWPROBE_WHICH_FLAG_IP4 = 0x1, + FLOWPROBE_WHICH_FLAG_L2 = 0x2, + FLOWPROBE_WHICH_FLAG_IP6 = 0x4, +}; + +enum flowprobe_record_flags : u8 +{ + FLOWPROBE_RECORD_FLAG_L2 = 0x1, + FLOWPROBE_RECORD_FLAG_L3 = 0x2, + FLOWPROBE_RECORD_FLAG_L4 = 0x4, +}; + /** \brief Enable / disable per-packet IPFIX recording on an interface @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @param is_add - add address if non-zero, else delete - @param is_ipv6 - if non-zero the address is ipv6, else ipv4 + @param which - flags indicating forwarding path @param sw_if_index - index of the interface */ autoreply manual_print define flowprobe_tx_interface_add_del @@ -23,11 +39,11 @@ autoreply manual_print define flowprobe_tx_interface_add_del u32 context; /* Enable / disable the feature */ - u8 is_add; - u8 which; /* 0 = ipv4, 1 = l2, 2 = ipv6 */ + bool is_add; + vl_api_flowprobe_which_flags_t which; /* Interface handle */ - u32 sw_if_index; + vl_api_interface_index_t sw_if_index; option vat_help = " [disable]"; }; @@ -35,9 +51,7 @@ autoreply define flowprobe_params { u32 client_index; u32 context; - u8 record_l2; - u8 record_l3; - u8 record_l4; + vl_api_flowprobe_record_flags_t record_flags; u32 active_timer; /* ~0 is off, 0 is default */ u32 passive_timer; /* ~0 is off, 0 is default */ option vat_help = "record <[l2] [l3] [l4]> [active passive ]"; -- cgit 1.2.3-korg