Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 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 | /** \brief Enable/Disable span to mirror traffic from one interface to another |
| 18 | @param client_index - opaque cookie to identify the sender |
| 19 | @param context - sender context which was passed in the request |
| 20 | @param sw_if_index_from - interface to be mirorred |
| 21 | @param sw_if_index_to - interface where the traffic is mirrored |
| 22 | @param state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled |
Eyal Bari | 5b31120 | 2017-07-31 13:12:30 +0300 | [diff] [blame] | 23 | @param is_l2 - 0 = mirror at hw device level, 1 = mirror at L2 |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 24 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 25 | autoreply define sw_interface_span_enable_disable { |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 26 | u32 client_index; |
| 27 | u32 context; |
| 28 | u32 sw_if_index_from; |
| 29 | u32 sw_if_index_to; |
| 30 | u8 state; |
Eyal Bari | 001fd40 | 2017-07-16 09:34:53 +0300 | [diff] [blame] | 31 | u8 is_l2; |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 32 | }; |
| 33 | |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 34 | /** \brief SPAN dump request |
| 35 | @param client_index - opaque cookie to identify the sender |
| 36 | @param context - sender context, to match reply w/ request |
Eyal Bari | 5b31120 | 2017-07-31 13:12:30 +0300 | [diff] [blame] | 37 | @param is_l2 - 0 = hw device level, 1 = L2 |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 38 | */ |
| 39 | define sw_interface_span_dump { |
| 40 | u32 client_index; |
| 41 | u32 context; |
Eyal Bari | 5b31120 | 2017-07-31 13:12:30 +0300 | [diff] [blame] | 42 | u8 is_l2; |
Pavel Kotucek | 3a2a1c4 | 2016-12-06 10:10:10 +0100 | [diff] [blame] | 43 | }; |
| 44 | |
| 45 | /** \brief Reply to SPAN dump request |
| 46 | @param context - sender context which was passed in the request |
| 47 | @param sw_if_index_from - mirorred interface |
| 48 | @param sw_if_index_to - interface where the traffic is mirrored |
| 49 | @param state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled |
| 50 | */ |
| 51 | define sw_interface_span_details { |
| 52 | u32 context; |
| 53 | u32 sw_if_index_from; |
| 54 | u32 sw_if_index_to; |
| 55 | u8 state; |
Ole Troan | 399ca1c | 2016-12-06 23:00:38 +0100 | [diff] [blame] | 56 | }; |