FD.io VPP  v21.06
Vector Packet Processing
lcp.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Linux Control Plane API
4  *
5  * Copyright 2020 Rubicon Communications, LLC.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at:
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 option version = "1.0.0";
21 
22 import "vnet/interface_types.api";
23 
24 /** \brief Set the default Linux Control Plane namespace
25  @param client_index - opaque cookie to identify the sender
26  @param context - sender context, to match reply w/ request
27  @param namespace - the new default namespace; namespace[0] == 0 iff none
28 */
29 autoreply define lcp_default_ns_set
30 {
33  string namespace[32]; /* LCP_NS_LEN */
34 };
35 
36 /** \brief get the default Linux Control Plane namespace
37  @param client_index - opaque cookie to identify the sender
38  @param context - sender context, to match reply w/ request
39 */
40 define lcp_default_ns_get
41 {
44 };
45 
46 /** \brief get the default Linux Control Plane namespace
47  @param client_index - opaque cookie to identify the sender
48  @param context - sender context, to match reply w/ request
49  @param namespace - the default namespace; namespace[0] == 0 iff none
50 */
51 define lcp_default_ns_get_reply
52 {
54  string namespace[32]; /* LCP_NS_LEN */
55 };
56 
58 {
61 };
62 
63 /** \brief Add or delete a Linux Conrol Plane interface pair
64  @param client_index - opaque cookie to identify the sender
65  @param context - sender context, to match reply w/ request
66  @param is_add - 0 if deleting, != 0 if adding
67  @param sw_if_index - index of VPP PHY SW interface
68  @param host_if_name - host tap interface name
69  @param host_if_type - the type of host interface to create (tun, tap)
70  @param namespace - optional tap namespace; namespace[0] == 0 iff none
71 */
72 autoreply autoendian define lcp_itf_pair_add_del
73 {
76  bool is_add;
77  vl_api_interface_index_t sw_if_index;
78  string host_if_name[16]; /* IFNAMSIZ */
79  vl_api_lcp_itf_host_type_t host_if_type;
80  string namespace[32]; /* LCP_NS_LEN */
81 };
82 autoendian define lcp_itf_pair_add_del_v2
83 {
86  bool is_add;
87  vl_api_interface_index_t sw_if_index;
88  string host_if_name[16]; /* IFNAMSIZ */
89  vl_api_lcp_itf_host_type_t host_if_type;
90  string namespace[32]; /* LCP_NS_LEN */
91 };
92 define lcp_itf_pair_add_del_v2_reply
93 {
96  vl_api_interface_index_t host_sw_if_index;
97 };
98 
99 /** \brief Dump Linux Control Plane interface pair data
100  @param client_index - opaque cookie to identify the sender
101  @param context - sender context, to match reply w/ request
102  @param sw_if_index - interface to use as filter (~0 == "all")
103 */
105 {
109 };
110 define lcp_itf_pair_get_reply
111 {
115 };
116 
117 /** \brief Linux Control Plane interface pair dump response
118  @param context - sender context which was passed in the request
119  @param phy_sw_if_index - VPP's sw_if_index for the PHY
120  @param host_sw_if_index - VPP's sw_if_index for the host tap
121  @param vif_index - tap linux index
122  @param host_if_name - host interface name
123  @param host_if_type - host interface type (tun, tap)
124  @param namespace - host interface namespace
125 */
126 autoendian define lcp_itf_pair_details
127 {
129  vl_api_interface_index_t phy_sw_if_index;
130  vl_api_interface_index_t host_sw_if_index;
132  string host_if_name[16]; /* IFNAMSIZ */
133  vl_api_lcp_itf_host_type_t host_if_type;
134  string namespace[32]; /* LCP_NS_LEN */
135 };
136 
138  rpc lcp_itf_pair_get returns lcp_itf_pair_get_reply
139  stream lcp_itf_pair_details;
140 };
141 
142 /** \brief Replace end/begin
143  */
145 {
148 };
149 autoreply define lcp_itf_pair_replace_end
150 {
153 };
154 
155 /*
156  * Linux-CP Error counters/messages
157  */
158 counters linuxcp {
159  packets {
160  severity info;
161  type counter64;
162  units "packets";
163  description "ARP packets processed";
164  };
166  severity info;
168  units "packets";
169  description "ARP replies copied to host";
170  };
171 };
172 
174  "/err/linux-cp-arp-phy" "linuxcp";
175  "/err/linux-cp-arp-host" "linuxcp";
176 };
177 
178 /*
179  * Local Variables:
180  * eval: (c-set-style "gnu")
181  * End:
182  */
int lcp_itf_pair_replace_end(void)
vl_api_lcp_itf_host_type_t host_if_type
Definition: lcp.api:89
copies
Definition: lcp.api:165
option version
Definition: lcp.api:20
paths
Definition: lcp.api:173
vl_api_interface_index_t phy_sw_if_index
Definition: lcp.api:129
service
Definition: lcp.api:137
lcp_itf_host_type
Definition: lcp.api:57
unsigned char u8
Definition: types.h:56
unsigned int u32
Definition: types.h:88
vl_api_lcp_itf_host_type_t host_if_type
Definition: lcp.api:79
units packets
Definition: lcp.api:168
type counter64
Definition: lcp.api:167
vl_api_interface_index_t host_sw_if_index
Definition: lcp.api:130
vl_api_fib_path_type_t type
Definition: fib_types.api:123
counters linuxcp
Definition: lcp.api:158
vl_api_interface_index_t host_sw_if_index
Definition: lcp.api:96
vl_api_lcp_itf_host_type_t host_if_type
Definition: lcp.api:133
signed int i32
Definition: types.h:77
vl_api_interface_index_t sw_if_index
Definition: lcp.api:87
lcp_itf_pair_t * lcp_itf_pair_get(u32 index)
Get an interface-pair object from its VPP index.
int lcp_itf_pair_replace_begin(void)
Begin and End the replace process.
vl_api_interface_index_t sw_if_index
Definition: lcp.api:77