GBP Endpoint Updates
[vpp.git] / src / plugins / gbp / gbp.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 option version = "2.0.0";
18
19 import "vnet/ip/ip_types.api";
20 import "vnet/ethernet/ethernet_types.api";
21
22 /** \brief Endpoint
23     @param client_index - opaque cookie to identify the sender
24     @param context - sender context, to match reply w/ request
25 */
26
27 typedef gbp_endpoint
28 {
29   u32 sw_if_index;
30   u16 epg_id;
31   vl_api_mac_address_t mac;
32   u8 n_ips;
33   vl_api_address_t ips[n_ips];
34 };
35
36 define gbp_endpoint_add
37 {
38   u32 client_index;
39   u32 context;
40   vl_api_gbp_endpoint_t endpoint;
41 };
42
43 define gbp_endpoint_add_reply
44 {
45   u32 context;
46   i32 retval;
47   u32 handle;
48 };
49
50 autoreply define gbp_endpoint_del
51 {
52   u32 client_index;
53   u32 context;
54   u32 handle;
55 };
56
57 define gbp_endpoint_dump
58 {
59   u32 client_index;
60   u32 context;
61 };
62
63 define gbp_endpoint_details
64 {
65   u32 context;
66   vl_api_gbp_endpoint_t endpoint;
67 };
68
69 typeonly define gbp_endpoint_group
70 {
71   u16 epg_id;
72   u32 bd_id;
73   u32 ip4_table_id;
74   u32 ip6_table_id;
75   u32 uplink_sw_if_index;
76 };
77
78 autoreply define gbp_endpoint_group_add_del
79 {
80   u32 client_index;
81   u32 context;
82   u8  is_add;
83   vl_api_gbp_endpoint_group_t epg;
84 };
85
86 define gbp_endpoint_group_dump
87 {
88   u32 client_index;
89   u32 context;
90 };
91
92 define gbp_endpoint_group_details
93 {
94   u32 context;
95   vl_api_gbp_endpoint_group_t epg;
96 };
97
98 typeonly define gbp_recirc
99 {
100   u32 sw_if_index;
101   u16 epg_id;
102   u8  is_ext;
103 };
104
105 autoreply define gbp_recirc_add_del
106 {
107   u32 client_index;
108   u32 context;
109   u8  is_add;
110   vl_api_gbp_recirc_t recirc;
111 };
112
113 define gbp_recirc_dump
114 {
115   u32 client_index;
116   u32 context;
117 };
118
119 define gbp_recirc_details
120 {
121   u32 context;
122   vl_api_gbp_recirc_t recirc;
123 };
124
125 typeonly define gbp_subnet
126 {
127   u32 table_id;
128   u32 sw_if_index;
129   u16 epg_id;
130   u8  is_internal;
131   vl_api_prefix_t prefix;
132 };
133
134 autoreply define gbp_subnet_add_del
135 {
136   u32 client_index;
137   u32 context;
138   u8  is_add;
139   vl_api_gbp_subnet_t subnet;
140 };
141
142 define gbp_subnet_dump
143 {
144   u32 client_index;
145   u32 context;
146 };
147
148 define gbp_subnet_details
149 {
150   u32 context;
151   vl_api_gbp_subnet_t subnet;
152 };
153
154 typeonly define gbp_contract
155 {
156   u16 src_epg;
157   u16 dst_epg;
158   u32 acl_index;
159 };
160
161 autoreply define gbp_contract_add_del
162 {
163   u32 client_index;
164   u32 context;
165   u8  is_add;
166   vl_api_gbp_contract_t contract;
167 };
168
169 define gbp_contract_dump
170 {
171   u32 client_index;
172   u32 context;
173 };
174
175 define gbp_contract_details
176 {
177   u32 context;
178   vl_api_gbp_contract_t contract;
179 };
180
181 /*
182  * Local Variables:
183  * eval: (c-set-style "gnu")
184  * End:
185  */