FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
span.api
Go to the documentation of this file.
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 option version = "2.0.0";
18 
19 import "vnet/interface_types.api";
20 
22 {
27 };
28 
29  /** \brief Enable/Disable span to mirror traffic from one interface to another
30  @param client_index - opaque cookie to identify the sender
31  @param context - sender context which was passed in the request
32  @param sw_if_index_from - interface to be mirrored
33  @param sw_if_index_to - interface where the traffic is mirrored
34  @param state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled
35  @param is_l2 - 0 = mirror at hw device level, 1 = mirror at L2
36 */
37 autoreply define sw_interface_span_enable_disable {
40  vl_api_interface_index_t sw_if_index_from;
41  vl_api_interface_index_t sw_if_index_to;
42  vl_api_span_state_t state;
43  bool is_l2;
44 };
45 
46 /** \brief SPAN dump request
47  @param client_index - opaque cookie to identify the sender
48  @param context - sender context, to match reply w/ request
49  @param is_l2 - 0 = hw device level, 1 = L2
50 */
51 define sw_interface_span_dump {
54  bool is_l2;
55 };
56 
57 /** \brief Reply to SPAN dump request
58  @param context - sender context which was passed in the request
59  @param sw_if_index_from - mirrored interface
60  @param sw_if_index_to - interface where the traffic is mirrored
61  @param state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled
62  @param is_l2 - 0 = mirrored at hw device level, 1 = mirrored at l2
63 */
64 define sw_interface_span_details {
66  vl_api_interface_index_t sw_if_index_from;
67  vl_api_interface_index_t sw_if_index_to;
68  vl_api_span_state_t state;
69  bool is_l2;
70 };
span_state
span_state
Definition: span.api:21
vl_api_sw_interface_span_details_t
Reply to SPAN dump request.
Definition: span.api:64
vl_api_sw_interface_span_enable_disable_t::sw_if_index_from
vl_api_interface_index_t sw_if_index_from
Definition: span.api:40
vl_api_sw_interface_span_dump_t::is_l2
bool is_l2
Definition: span.api:54
vl_api_sw_interface_span_enable_disable_t::state
vl_api_span_state_t state
Definition: span.api:42
vl_api_sw_interface_span_details_t::is_l2
bool is_l2
Definition: span.api:69
vl_api_sw_interface_span_enable_disable_t::context
u32 context
Definition: span.api:39
SPAN_STATE_API_TX
@ SPAN_STATE_API_TX
Definition: span.api:25
vl_api_sw_interface_span_enable_disable_t::client_index
u32 client_index
Definition: span.api:38
vl_api_sw_interface_span_details_t::context
u32 context
Definition: span.api:65
vl_api_sw_interface_span_enable_disable_t::is_l2
bool is_l2
Definition: span.api:43
vl_api_sw_interface_span_dump_t::client_index
u32 client_index
Definition: span.api:52
vl_api_sw_interface_span_enable_disable_t::sw_if_index_to
vl_api_interface_index_t sw_if_index_to
Definition: span.api:41
vl_api_sw_interface_span_details_t::state
vl_api_span_state_t state
Definition: span.api:68
vl_api_sw_interface_span_dump_t::context
u32 context
Definition: span.api:53
u32
unsigned int u32
Definition: types.h:88
vl_api_sw_interface_span_dump_t
SPAN dump request.
Definition: span.api:51
SPAN_STATE_API_RX_TX
@ SPAN_STATE_API_RX_TX
Definition: span.api:26
vl_api_sw_interface_span_details_t::sw_if_index_from
vl_api_interface_index_t sw_if_index_from
Definition: span.api:66
vl_api_sw_interface_span_details_t::sw_if_index_to
vl_api_interface_index_t sw_if_index_to
Definition: span.api:67
SPAN_STATE_API_DISABLED
@ SPAN_STATE_API_DISABLED
Definition: span.api:23
version
option version
Definition: span.api:17
SPAN_STATE_API_RX
@ SPAN_STATE_API_RX
Definition: span.api:24
vl_api_sw_interface_span_enable_disable_t
Enable/Disable span to mirror traffic from one interface to another.
Definition: span.api:37