L3 cross connect
[vpp.git] / src / plugins / l3xc / l3xc.api
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2016 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 /** \file
18     This file defines the vpp control-plane API messages
19     used to control the L3XC plugin
20 */
21
22 option version = "1.0.0";
23
24 import "vnet/fib/fib_types.api";
25
26 /** \brief Get the plugin version
27     @param client_index - opaque cookie to identify the sender
28     @param context - sender context, to match reply w/ request
29 */
30 define l3xc_plugin_get_version
31 {
32   u32 client_index;
33   u32 context;
34 };
35
36 /** \brief Reply to get the plugin version
37     @param context - returned sender context, to match reply w/ request
38     @param major - Incremented every time a known breaking behavior change is introduced
39     @param minor - Incremented with small changes, may be used to avoid buggy versions
40 */
41 define l3xc_plugin_get_version_reply
42 {
43   u32 context;
44   u32 major;
45   u32 minor;
46 };
47
48 /** \brief A description of an L3XC policy
49     @param input interface of the x-connect
50     @param n_paths Number of paths
51     @param paths The set of forwarding paths.
52  */
53 typeonly define l3xc
54 {
55   u32 sw_if_index;
56   u8 is_ip6;
57   u8 n_paths;
58   vl_api_fib_path_t paths[n_paths];
59 };
60
61 define l3xc_update
62 {
63   u32 client_index;
64   u32 context;
65   vl_api_l3xc_t l3xc;
66 };
67 define l3xc_update_reply
68 {
69   u32 context;
70   i32 retval;
71   u32 stats_index;
72 };
73
74
75 autoreply define l3xc_del
76 {
77   u32 client_index;
78   u32 context;
79   u32 sw_if_index;
80   u8 is_ip6;
81 };
82
83 /** \brief Dump all L3XC policies
84  */
85 define l3xc_dump
86 {
87   u32 client_index;
88   u32 context;
89   u32 sw_if_index;
90 };
91
92 /** \brief description returned in the dump
93  */
94 define l3xc_details
95 {
96   u32 context;
97   vl_api_l3xc_t l3xc;
98 };