blob: 1e807b539d5532a1bf29800a999ef4662892880d [file] [log] [blame]
Chenmin Sund0236f72020-07-27 17:54:40 +08001/*
2 * Copyright (c) 2020 Intel 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
Andrew Yourtchenko9c7e0332023-08-01 12:54:36 +020016option version = "1.0.3";
Chenmin Sund0236f72020-07-27 17:54:40 +080017
18import "vnet/interface_types.api";
19import "vnet/ip/ip_types.api";
20import "vnet/flow/flow_types.api";
21
22/** \brief flow add request
23 @param client_index - opaque cookie to identify the sender
24 @param context - sender context, to match reply w/ request
25 @param flow - flow rule
26*/
27define flow_add
28{
Ondrej Fabry39d76992023-04-13 08:33:38 +020029 option deprecated;
30
Chenmin Sund0236f72020-07-27 17:54:40 +080031 u32 client_index;
32 u32 context;
33 vl_api_flow_rule_t flow;
34 option vat_help = "test flow add [src-ip <ip-addr/mask>] [dst-ip <ip-addr/mask>] [src-port <port/mask>] [dst-port <port/mask>] [proto <ip-proto>]";
35};
36
Ting Xu337960b2022-03-08 07:22:56 +000037/** \brief flow add request v2
38 @param client_index - opaque cookie to identify the sender
39 @param context - sender context, to match reply w/ request
40 @param flow - flow rule v2
41*/
42define flow_add_v2
43{
44 u32 client_index;
45 u32 context;
46 vl_api_flow_rule_v2_t flow;
47 option vat_help = "test flow add [src-ip <ip-addr/mask>] [dst-ip <ip-addr/mask>] [src-port <port/mask>] [dst-port <port/mask>] [proto <ip-proto>] [spec <spec-string>] [mask <mask-string>]";
48};
49
Chenmin Sund0236f72020-07-27 17:54:40 +080050/** \brief reply for adding flow
51 @param context - sender context, to match reply w/ request
52 @param retval - return code
53 @param flow_index - flow index, can be used for flow del/enable/disable
54*/
55define flow_add_reply
56{
Ondrej Fabry39d76992023-04-13 08:33:38 +020057 option deprecated;
58
Chenmin Sund0236f72020-07-27 17:54:40 +080059 u32 context;
60 i32 retval;
61 u32 flow_index;
62};
63
Ting Xu337960b2022-03-08 07:22:56 +000064/** \brief reply for adding flow v2
65 @param context - sender context, to match reply w/ request
66 @param retval - return code
67 @param flow_index - flow index, can be used for flow del/enable/disable
68*/
69define flow_add_v2_reply
70{
71 u32 context;
72 i32 retval;
73 u32 flow_index;
74};
75
Chenmin Sund0236f72020-07-27 17:54:40 +080076/** \brief flow del request
77 @param client_index - opaque cookie to identify the sender
78 @param context - sender context, to match reply w/ request
79 @param flow_index - flow index
80*/
81autoreply define flow_del
82{
83 u32 client_index;
84 u32 context;
85 u32 flow_index;
86 option vat_help = "test flow del index <index>";
87};
88
89/** \brief flow enable request
90 @param client_index - opaque cookie to identify the sender
91 @param context - sender context, to match reply w/ request
92 @param flow_index - flow index
93 @param hw_if_index - hardware interface index
94*/
95autoreply define flow_enable
96{
97 u32 client_index;
98 u32 context;
99 u32 flow_index;
100 u32 hw_if_index;
101 option vat_help = "test flow enable index <index> <interface name>";
102};
103
104/** \brief flow disable request
105 @param client_index - opaque cookie to identify the sender
106 @param context - sender context, to match reply w/ request
107 @param flow_index - flow index
108 @param hw_if_index - hardware interface index
109*/
110autoreply define flow_disable
111{
112 u32 client_index;
113 u32 context;
114 u32 flow_index;
115 u32 hw_if_index;
116 option vat_help = "test flow disable index <index> <interface name>";
117};
118
119/*
120 * Local Variables:
121 * eval: (c-set-style "gnu")
122 * End:
123 */