blob: dff3eec370d516a38980b1c590c3ee4e8a0b9dc6 [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
Ting Xu337960b2022-03-08 07:22:56 +000016option version = "0.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{
29 u32 client_index;
30 u32 context;
31 vl_api_flow_rule_t flow;
32 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>]";
33};
34
Ting Xu337960b2022-03-08 07:22:56 +000035/** \brief flow add request v2
36 @param client_index - opaque cookie to identify the sender
37 @param context - sender context, to match reply w/ request
38 @param flow - flow rule v2
39*/
40define flow_add_v2
41{
42 u32 client_index;
43 u32 context;
44 vl_api_flow_rule_v2_t flow;
45 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>]";
46};
47
Chenmin Sund0236f72020-07-27 17:54:40 +080048/** \brief reply for adding flow
49 @param context - sender context, to match reply w/ request
50 @param retval - return code
51 @param flow_index - flow index, can be used for flow del/enable/disable
52*/
53define flow_add_reply
54{
55 u32 context;
56 i32 retval;
57 u32 flow_index;
58};
59
Ting Xu337960b2022-03-08 07:22:56 +000060/** \brief reply for adding flow v2
61 @param context - sender context, to match reply w/ request
62 @param retval - return code
63 @param flow_index - flow index, can be used for flow del/enable/disable
64*/
65define flow_add_v2_reply
66{
67 u32 context;
68 i32 retval;
69 u32 flow_index;
70};
71
Chenmin Sund0236f72020-07-27 17:54:40 +080072/** \brief flow del request
73 @param client_index - opaque cookie to identify the sender
74 @param context - sender context, to match reply w/ request
75 @param flow_index - flow index
76*/
77autoreply define flow_del
78{
79 u32 client_index;
80 u32 context;
81 u32 flow_index;
82 option vat_help = "test flow del index <index>";
83};
84
85/** \brief flow enable request
86 @param client_index - opaque cookie to identify the sender
87 @param context - sender context, to match reply w/ request
88 @param flow_index - flow index
89 @param hw_if_index - hardware interface index
90*/
91autoreply define flow_enable
92{
93 u32 client_index;
94 u32 context;
95 u32 flow_index;
96 u32 hw_if_index;
97 option vat_help = "test flow enable index <index> <interface name>";
98};
99
100/** \brief flow disable request
101 @param client_index - opaque cookie to identify the sender
102 @param context - sender context, to match reply w/ request
103 @param flow_index - flow index
104 @param hw_if_index - hardware interface index
105*/
106autoreply define flow_disable
107{
108 u32 client_index;
109 u32 context;
110 u32 flow_index;
111 u32 hw_if_index;
112 option vat_help = "test flow disable index <index> <interface name>";
113};
114
115/*
116 * Local Variables:
117 * eval: (c-set-style "gnu")
118 * End:
119 */